spotcharge-types 1.0.413 → 1.0.415

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.
@@ -3,9 +3,10 @@ export declare const ChargingSessionStatus: {
3
3
  readonly Starting: "starting";
4
4
  readonly Charging: "charging";
5
5
  readonly Stopping: "stopping";
6
+ readonly Paused: "paused";
6
7
  readonly Stopped: "stopped";
7
8
  };
8
9
  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"];
10
+ /** Session is on the plug until stop completes. `paused` still occupies the connector. */
11
+ export declare const LIVE_CHARGING_SESSION_STATUSES: readonly ["starting", "charging", "stopping", "paused"];
11
12
  //# sourceMappingURL=charging-session-status.const.d.ts.map
@@ -1 +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"}
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;;;;;;CAMxB,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC;AAEvG,0FAA0F;AAC1F,eAAO,MAAM,8BAA8B,yDAKU,CAAC"}
@@ -6,12 +6,14 @@ exports.ChargingSessionStatus = {
6
6
  Starting: 'starting',
7
7
  Charging: 'charging',
8
8
  Stopping: 'stopping',
9
+ Paused: 'paused',
9
10
  Stopped: 'stopped',
10
11
  };
11
- /** Session is on the plug until stop completes. */
12
+ /** Session is on the plug until stop completes. `paused` still occupies the connector. */
12
13
  exports.LIVE_CHARGING_SESSION_STATUSES = [
13
14
  exports.ChargingSessionStatus.Starting,
14
15
  exports.ChargingSessionStatus.Charging,
15
16
  exports.ChargingSessionStatus.Stopping,
17
+ exports.ChargingSessionStatus.Paused,
16
18
  ];
17
19
  //# sourceMappingURL=charging-session-status.const.js.map
@@ -1 +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"}
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,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;CACV,CAAC;AAIX,0FAA0F;AAC7E,QAAA,8BAA8B,GAAG;IAC5C,6BAAqB,CAAC,QAAQ;IAC9B,6BAAqB,CAAC,QAAQ;IAC9B,6BAAqB,CAAC,QAAQ;IAC9B,6BAAqB,CAAC,MAAM;CACuB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { ChargingBookingKind } from '../../../consts/consumer/charging-booking-kind.const';
2
2
  import { ChargingBookingPayMethod } from '../../../consts/consumer/charging-booking-pay-method.const';
3
3
  import { ChargingBookingStatus } from '../../../consts/consumer/charging-booking-status.const';
4
+ import { ChargingBookingTaxType } from '../../../consts/consumer/charging-booking-tax-type.const';
4
5
  import { ApiSortDirection } from '../users/admin-user.api.model';
5
6
  import { ServiceChargeModel } from '../../service-charge.model';
6
7
  import { IsoDateTime } from '../users/shared.api.model';
@@ -49,6 +50,13 @@ export interface ChargingBookingApiModel {
49
50
  amount: number;
50
51
  serviceCharge: number;
51
52
  taxAmount: number;
53
+ taxType: ChargingBookingTaxType;
54
+ cgstRate: number;
55
+ sgstRate: number;
56
+ igstRate: number;
57
+ cgstAmount: number;
58
+ sgstAmount: number;
59
+ igstAmount: number;
52
60
  isServiceChargeApplicable: boolean;
53
61
  serviceChargeInfo: ServiceChargeModel;
54
62
  vehicle: ChargingBookingVehicleApiModel | null;
@@ -131,6 +139,13 @@ export interface QuoteChargingBookingApiModel {
131
139
  energyAmount: number;
132
140
  serviceCharge: number;
133
141
  taxAmount: number;
142
+ taxType: ChargingBookingTaxType;
143
+ cgstRate: number;
144
+ sgstRate: number;
145
+ igstRate: number;
146
+ cgstAmount: number;
147
+ sgstAmount: number;
148
+ igstAmount: number;
134
149
  pricePerKwh: number;
135
150
  }
136
151
  /** POST /api/booking/bookings */
@@ -196,6 +211,17 @@ export interface ChargingBookingStartContextApiModel {
196
211
  /** Next other customer's slot after now (informational). */
197
212
  nextOtherSlotStartsAt?: IsoDateTime;
198
213
  }
214
+ /** POST /api/booking/bookings/:id/start — creates `consumer.charging_sessions` and RemoteStart. */
215
+ export interface StartChargingSessionApiModel {
216
+ /** consumer.charging_sessions.id (uuid). */
217
+ sessionId: string;
218
+ /** consumer.bookings.id (uuid). */
219
+ bookingId: string;
220
+ /** Human invoice number on the PDF. */
221
+ invoiceNo: number;
222
+ /** OCPP idTag (`PUB_ORDER_` + 10 digits). Not the session uuid. */
223
+ idTag: string;
224
+ }
199
225
  export interface BookLaterSlotApiModel {
200
226
  startsAt: IsoDateTime;
201
227
  endsAt: IsoDateTime;
@@ -1 +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,MAAM,sDAAsD,CAAC;AAC3F,OAAO,EAAE,wBAAwB,EAAE,MAAM,4DAA4D,CAAC;AACtG,OAAO,EAAE,qBAAqB,EAAE,MAAM,wDAAwD,CAAC;AAC/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD;;;;;GAKG;AAEH,oDAAoD;AACpD,MAAM,WAAW,8BAA8B;IAC7C,2CAA2C;IAC3C,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAED,gEAAgE;AAChE,MAAM,WAAW,uBAAuB;IACtC,mCAAmC;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,qBAAqB,CAAC;IAC9B,IAAI,EAAE,mBAAmB,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,gCAAgC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,yCAAyC;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,qEAAqE;IACrE,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,C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;AAED,yCAAyC;AACzC,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,wBAAwB,CAAC;IACjC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,6FAA6F;AAC7F,MAAM,WAAW,4BAA4B;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,gDAAgD;AAChD,MAAM,WAAW,gCAAgC;IAC/C,+DAA+D;IAC/D,QAAQ,EAAE,WAAW,CAAC;CACvB;AAED,+FAA+F;AAC/F,MAAM,MAAM,+BAA+B,GACvC,iBAAiB,GACjB,0BAA0B,GAC1B,uBAAuB,CAAC;AAE5B,MAAM,WAAW,mCAAmC;IAClD,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,+BAA+B,CAAC;IACvC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8DAA8D;IAC9D,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yDAAyD;IACzD,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,4DAA4D;IAC5D,qBAAqB,CAAC,EAAE,WAAW,CAAC;CACrC;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"}
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,MAAM,sDAAsD,CAAC;AAC3F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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,74 @@
1
+ import { ChargingBookingTaxType } from '../../../consts/consumer/charging-booking-tax-type.const';
2
+ import { ChargingSessionStatus } from '../../../consts/consumer/charging-session-status.const';
3
+ import { IsoDateTime } from '../users/shared.api.model';
4
+ /**
5
+ * One charge and its invoice (`consumer.charging_sessions`).
6
+ *
7
+ * Times are ISO 8601 strings. Money is rupees with two decimals.
8
+ * `InvoiceApiModel` is the old Firestore document and is not this contract.
9
+ */
10
+ export interface ChargingSessionApiModel {
11
+ /** consumer.charging_sessions.id (uuid). */
12
+ sessionId: string;
13
+ /** consumer.bookings.id (uuid). Null on a later continuation charge. */
14
+ bookingId: string | null;
15
+ /** Human invoice number on the PDF. */
16
+ invoiceNo: number;
17
+ status: ChargingSessionStatus;
18
+ stopReason: string | null;
19
+ customerName: string;
20
+ phoneE164: string | null;
21
+ /** infrastructure.chargers.id (uuid). */
22
+ chargerId: string;
23
+ chargePointId: string;
24
+ stationName: string;
25
+ stationAddress: string;
26
+ connectorNo: number;
27
+ outputType: string;
28
+ energyLimitKwh: number;
29
+ energyKwh: number;
30
+ pricePerKwh: number;
31
+ subtotal: number;
32
+ serviceCharge: number;
33
+ cgstAmount: number;
34
+ sgstAmount: number;
35
+ igstAmount: number;
36
+ taxAmount: number;
37
+ billedAmount: number;
38
+ gstin: string | null;
39
+ taxType: ChargingBookingTaxType | null;
40
+ cgstRate: number;
41
+ sgstRate: number;
42
+ igstRate: number;
43
+ lastSocPercent: number | null;
44
+ lastPowerKw: number | null;
45
+ cutoffAt: IsoDateTime | null;
46
+ startedAt: IsoDateTime | null;
47
+ stopRequestedAt: IsoDateTime | null;
48
+ stoppedAt: IsoDateTime | null;
49
+ registrationNo: string | null;
50
+ vehicleLabel: string | null;
51
+ batteryCapacityKwh: number | null;
52
+ /** True when the CSMS has an OCPP WebSocket for this chargePointId. */
53
+ chargerConnected: boolean;
54
+ transactions: ChargingSessionTransactionApiModel[];
55
+ }
56
+ /** One OCPP transaction on a charging session. */
57
+ export interface ChargingSessionTransactionApiModel {
58
+ id: string;
59
+ startedAt: IsoDateTime | null;
60
+ stoppedAt: IsoDateTime | null;
61
+ energyKwh: number;
62
+ meterHealth: string;
63
+ }
64
+ /** Seek page for GET /api/booking/sessions?status=stopped. */
65
+ export interface ChargingSessionListCursorApiModel {
66
+ stoppedAt: IsoDateTime;
67
+ id: string;
68
+ }
69
+ /** GET /api/booking/sessions */
70
+ export interface ChargingSessionListApiModel {
71
+ sessions: ChargingSessionApiModel[];
72
+ nextCursor: ChargingSessionListCursorApiModel | null;
73
+ }
74
+ //# sourceMappingURL=charging-session.api.model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"charging-session.api.model.d.ts","sourceRoot":"","sources":["../../../../src/models/api/consumer/charging-session.api.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0DAA0D,CAAC;AAClG,OAAO,EAAE,qBAAqB,EAAE,MAAM,wDAAwD,CAAC;AAC/F,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB;IACtC,4CAA4C;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,uCAAuC;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,qBAAqB,CAAC;IAC9B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,YAAY,EAAE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ClD,MAAM,WAAW,kCAAkC;IACjD,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,8DAA8D;AAC9D,MAAM,WAAW,iCAAiC;IAChD,SAAS,EAAE,WAAW,CAAC;IACvB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,gCAAgC;AAChC,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,uBAAuB,EAAE,CAAC;IACpC,UAAU,EAAE,iCAAiC,GAAG,IAAI,CAAC;CACtD"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=charging-session.api.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"charging-session.api.model.js","sourceRoot":"","sources":["../../../../src/models/api/consumer/charging-session.api.model.ts"],"names":[],"mappings":""}
@@ -5,7 +5,8 @@ export { RegisterPushTokenRequest, ConsumerPushTokenApiModel, UnregisterPushToke
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
7
  export { ChargingSettingsApiModel, UpdateChargingSettingsRequest, } from './charging-settings.api.model';
8
- export { ChargingBookingApiModel, ChargingBookingListApiModel, AdminChargingBookingListOrderBy, AdminChargingBookingListApiModel, AdminChargingBookingDetailApiModel, AdminChargingBookingPaymentSummaryApiModel, AppClientMetaApiModel, ChargingBookingCountApiModel, CreateChargingBookingRequest, QuoteChargingBookingRequest, QuoteChargingBookingApiModel, ChargingBookingQuoteLock, PayChargingBookingApiModel, PayChargingBookingRequest, CancelChargingBookingRequest, RescheduleChargingBookingRequest, ChargingBookingStartContextCode, ChargingBookingStartContextApiModel, BookLaterSlotApiModel, BookLaterSlotListApiModel, ChargingBookingVehicleApiModel, } from './charging-booking.api.model';
8
+ export { ChargingBookingApiModel, ChargingBookingListApiModel, AdminChargingBookingListOrderBy, AdminChargingBookingListApiModel, AdminChargingBookingDetailApiModel, AdminChargingBookingPaymentSummaryApiModel, AppClientMetaApiModel, ChargingBookingCountApiModel, CreateChargingBookingRequest, QuoteChargingBookingRequest, QuoteChargingBookingApiModel, ChargingBookingQuoteLock, PayChargingBookingApiModel, PayChargingBookingRequest, CancelChargingBookingRequest, RescheduleChargingBookingRequest, ChargingBookingStartContextCode, ChargingBookingStartContextApiModel, StartChargingSessionApiModel, BookLaterSlotApiModel, BookLaterSlotListApiModel, ChargingBookingVehicleApiModel, } from './charging-booking.api.model';
9
+ export { ChargingSessionApiModel, ChargingSessionListApiModel, ChargingSessionListCursorApiModel, ChargingSessionTransactionApiModel, } from './charging-session.api.model';
9
10
  export { ConsumerNotificationApiModel, ConsumerNotificationListApiModel, ConsumerNotificationListCursorApiModel, } from './consumer-notification.api.model';
10
11
  export { AdminConsumerListOrderBy, AdminConsumerListItemApiModel, AdminConsumerListApiModel, AdminConsumerAccountApiModel, AdminConsumerDetailApiModel, AdminUpdateConsumerRequest, BlockConsumerRequest, AdjustConsumerWalletRequest, AdjustConsumerWalletResponse, AdminConsumerWalletTransactionListApiModel, } from './admin-consumer.api.model';
11
12
  //# 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,GAC9B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,uBAAuB,EACvB,2BAA2B,EAC3B,+BAA+B,EAC/B,gCAAgC,EAChC,kCAAkC,EAClC,0CAA0C,EAC1C,qBAAqB,EACrB,4BAA4B,EAC5B,4BAA4B,EAC5B,2BAA2B,EAC3B,4BAA4B,EAC5B,wBAAwB,EACxB,0BAA0B,EAC1B,yBAAyB,EACzB,4BAA4B,EAC5B,gCAAgC,EAChC,+BAA+B,EAC/B,mCAAmC,EACnC,qBAAqB,EACrB,yBAAyB,EACzB,8BAA8B,GAC/B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,4BAA4B,EAC5B,gCAAgC,EAChC,sCAAsC,GACvC,MAAM,mCAAmC,CAAC;AAC3C,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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C,MAAM,4BAA4B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spotcharge-types",
3
- "version": "1.0.413",
3
+ "version": "1.0.415",
4
4
  "description": "Spotcharge types",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -3,14 +3,16 @@ export const ChargingSessionStatus = {
3
3
  Starting: 'starting',
4
4
  Charging: 'charging',
5
5
  Stopping: 'stopping',
6
+ Paused: 'paused',
6
7
  Stopped: 'stopped',
7
8
  } as const;
8
9
 
9
10
  export type ChargingSessionStatus = (typeof ChargingSessionStatus)[keyof typeof ChargingSessionStatus];
10
11
 
11
- /** Session is on the plug until stop completes. */
12
+ /** Session is on the plug until stop completes. `paused` still occupies the connector. */
12
13
  export const LIVE_CHARGING_SESSION_STATUSES = [
13
14
  ChargingSessionStatus.Starting,
14
15
  ChargingSessionStatus.Charging,
15
16
  ChargingSessionStatus.Stopping,
17
+ ChargingSessionStatus.Paused,
16
18
  ] as const satisfies readonly ChargingSessionStatus[];
@@ -1,6 +1,7 @@
1
1
  import { ChargingBookingKind } from '../../../consts/consumer/charging-booking-kind.const';
2
2
  import { ChargingBookingPayMethod } from '../../../consts/consumer/charging-booking-pay-method.const';
3
3
  import { ChargingBookingStatus } from '../../../consts/consumer/charging-booking-status.const';
4
+ import { ChargingBookingTaxType } from '../../../consts/consumer/charging-booking-tax-type.const';
4
5
  import { ApiSortDirection } from '../users/admin-user.api.model';
5
6
  import { ServiceChargeModel } from '../../service-charge.model';
6
7
  import { IsoDateTime } from '../users/shared.api.model';
@@ -52,6 +53,13 @@ export interface ChargingBookingApiModel {
52
53
  amount: number;
53
54
  serviceCharge: number;
54
55
  taxAmount: number;
56
+ taxType: ChargingBookingTaxType;
57
+ cgstRate: number;
58
+ sgstRate: number;
59
+ igstRate: number;
60
+ cgstAmount: number;
61
+ sgstAmount: number;
62
+ igstAmount: number;
55
63
  isServiceChargeApplicable: boolean;
56
64
  serviceChargeInfo: ServiceChargeModel;
57
65
  vehicle: ChargingBookingVehicleApiModel | null;
@@ -152,6 +160,13 @@ export interface QuoteChargingBookingApiModel {
152
160
  energyAmount: number;
153
161
  serviceCharge: number;
154
162
  taxAmount: number;
163
+ taxType: ChargingBookingTaxType;
164
+ cgstRate: number;
165
+ sgstRate: number;
166
+ igstRate: number;
167
+ cgstAmount: number;
168
+ sgstAmount: number;
169
+ igstAmount: number;
155
170
  pricePerKwh: number;
156
171
  }
157
172
 
@@ -228,6 +243,18 @@ export interface ChargingBookingStartContextApiModel {
228
243
  nextOtherSlotStartsAt?: IsoDateTime;
229
244
  }
230
245
 
246
+ /** POST /api/booking/bookings/:id/start — creates `consumer.charging_sessions` and RemoteStart. */
247
+ export interface StartChargingSessionApiModel {
248
+ /** consumer.charging_sessions.id (uuid). */
249
+ sessionId: string;
250
+ /** consumer.bookings.id (uuid). */
251
+ bookingId: string;
252
+ /** Human invoice number on the PDF. */
253
+ invoiceNo: number;
254
+ /** OCPP idTag (`PUB_ORDER_` + 10 digits). Not the session uuid. */
255
+ idTag: string;
256
+ }
257
+
231
258
  export interface BookLaterSlotApiModel {
232
259
  startsAt: IsoDateTime;
233
260
  endsAt: IsoDateTime;
@@ -0,0 +1,77 @@
1
+ import { ChargingBookingTaxType } from '../../../consts/consumer/charging-booking-tax-type.const';
2
+ import { ChargingSessionStatus } from '../../../consts/consumer/charging-session-status.const';
3
+ import { IsoDateTime } from '../users/shared.api.model';
4
+
5
+ /**
6
+ * One charge and its invoice (`consumer.charging_sessions`).
7
+ *
8
+ * Times are ISO 8601 strings. Money is rupees with two decimals.
9
+ * `InvoiceApiModel` is the old Firestore document and is not this contract.
10
+ */
11
+ export interface ChargingSessionApiModel {
12
+ /** consumer.charging_sessions.id (uuid). */
13
+ sessionId: string;
14
+ /** consumer.bookings.id (uuid). Null on a later continuation charge. */
15
+ bookingId: string | null;
16
+ /** Human invoice number on the PDF. */
17
+ invoiceNo: number;
18
+ status: ChargingSessionStatus;
19
+ stopReason: string | null;
20
+ customerName: string;
21
+ phoneE164: string | null;
22
+ /** infrastructure.chargers.id (uuid). */
23
+ chargerId: string;
24
+ chargePointId: string;
25
+ stationName: string;
26
+ stationAddress: string;
27
+ connectorNo: number;
28
+ outputType: string;
29
+ energyLimitKwh: number;
30
+ energyKwh: number;
31
+ pricePerKwh: number;
32
+ subtotal: number;
33
+ serviceCharge: number;
34
+ cgstAmount: number;
35
+ sgstAmount: number;
36
+ igstAmount: number;
37
+ taxAmount: number;
38
+ billedAmount: number;
39
+ gstin: string | null;
40
+ taxType: ChargingBookingTaxType | null;
41
+ cgstRate: number;
42
+ sgstRate: number;
43
+ igstRate: number;
44
+ lastSocPercent: number | null;
45
+ lastPowerKw: number | null;
46
+ cutoffAt: IsoDateTime | null;
47
+ startedAt: IsoDateTime | null;
48
+ stopRequestedAt: IsoDateTime | null;
49
+ stoppedAt: IsoDateTime | null;
50
+ registrationNo: string | null;
51
+ vehicleLabel: string | null;
52
+ batteryCapacityKwh: number | null;
53
+ /** True when the CSMS has an OCPP WebSocket for this chargePointId. */
54
+ chargerConnected: boolean;
55
+ transactions: ChargingSessionTransactionApiModel[];
56
+ }
57
+
58
+ /** One OCPP transaction on a charging session. */
59
+ export interface ChargingSessionTransactionApiModel {
60
+ id: string;
61
+ startedAt: IsoDateTime | null;
62
+ stoppedAt: IsoDateTime | null;
63
+ energyKwh: number;
64
+ meterHealth: string;
65
+ }
66
+
67
+ /** Seek page for GET /api/booking/sessions?status=stopped. */
68
+ export interface ChargingSessionListCursorApiModel {
69
+ stoppedAt: IsoDateTime;
70
+ id: string;
71
+ }
72
+
73
+ /** GET /api/booking/sessions */
74
+ export interface ChargingSessionListApiModel {
75
+ sessions: ChargingSessionApiModel[];
76
+ nextCursor: ChargingSessionListCursorApiModel | null;
77
+ }
@@ -53,10 +53,17 @@ export {
53
53
  RescheduleChargingBookingRequest,
54
54
  ChargingBookingStartContextCode,
55
55
  ChargingBookingStartContextApiModel,
56
+ StartChargingSessionApiModel,
56
57
  BookLaterSlotApiModel,
57
58
  BookLaterSlotListApiModel,
58
59
  ChargingBookingVehicleApiModel,
59
60
  } from './charging-booking.api.model';
61
+ export {
62
+ ChargingSessionApiModel,
63
+ ChargingSessionListApiModel,
64
+ ChargingSessionListCursorApiModel,
65
+ ChargingSessionTransactionApiModel,
66
+ } from './charging-session.api.model';
60
67
  export {
61
68
  ConsumerNotificationApiModel,
62
69
  ConsumerNotificationListApiModel,