@pulsecharterconnect/types 0.2.53 → 0.2.54
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.
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Duration } from "luxon";
|
|
2
|
+
import { IProposal } from "./Proposal";
|
|
3
|
+
import { IRequestForProposal } from "./RequestForProposal";
|
|
4
|
+
import { ITransportationRequest, TransportRequestType } from "./TransportationRequest";
|
|
5
|
+
import { ITrip } from "./Trip";
|
|
6
|
+
export declare enum AnalyticsRequestType {
|
|
7
|
+
CaseDetails = "Case Details",
|
|
8
|
+
CaseSummary = "Case Summary"
|
|
9
|
+
}
|
|
10
|
+
export interface ICaseAnalyticsDetails {
|
|
11
|
+
caseData: {
|
|
12
|
+
transportationRequest: ITransportationRequest;
|
|
13
|
+
trip: ITrip;
|
|
14
|
+
rfps: IRequestForProposal[];
|
|
15
|
+
proposals: IProposal[];
|
|
16
|
+
}[];
|
|
17
|
+
}
|
|
18
|
+
export interface ICaseAnalyticsSummary {
|
|
19
|
+
numberOfCases: number;
|
|
20
|
+
numberOfRfps: number;
|
|
21
|
+
numberOfProposals: number;
|
|
22
|
+
numberOfTrips: number;
|
|
23
|
+
numberOfOperators: number;
|
|
24
|
+
averageResponseTime: Duration;
|
|
25
|
+
averageTimeBetweenRequestAndRecovery: Duration;
|
|
26
|
+
averageTripDistanceMiles: number;
|
|
27
|
+
}
|
|
28
|
+
export interface IAnalyticsFilterOptions {
|
|
29
|
+
startDate?: number;
|
|
30
|
+
endDate?: number;
|
|
31
|
+
transplantCenterId?: string;
|
|
32
|
+
transportationRequestType?: TransportRequestType;
|
|
33
|
+
}
|
|
34
|
+
export declare class AnalyticsRequestDto {
|
|
35
|
+
requestType: AnalyticsRequestType;
|
|
36
|
+
filterOptions?: IAnalyticsFilterOptions;
|
|
37
|
+
constructor(requestType: AnalyticsRequestType);
|
|
38
|
+
}
|
|
39
|
+
export declare class CaseAnalyticsDetailsResponseDto implements ICaseAnalyticsDetails {
|
|
40
|
+
caseData: {
|
|
41
|
+
transportationRequest: ITransportationRequest;
|
|
42
|
+
trip: ITrip;
|
|
43
|
+
rfps: IRequestForProposal[];
|
|
44
|
+
proposals: IProposal[];
|
|
45
|
+
}[];
|
|
46
|
+
constructor(caseData: {
|
|
47
|
+
transportationRequest: ITransportationRequest;
|
|
48
|
+
trip: ITrip;
|
|
49
|
+
rfps: IRequestForProposal[];
|
|
50
|
+
proposals: IProposal[];
|
|
51
|
+
}[]);
|
|
52
|
+
}
|
|
53
|
+
export declare class CaseAnalyticsSummaryResponseDto implements ICaseAnalyticsSummary {
|
|
54
|
+
numberOfCases: number;
|
|
55
|
+
numberOfRfps: number;
|
|
56
|
+
numberOfProposals: number;
|
|
57
|
+
numberOfTrips: number;
|
|
58
|
+
numberOfOperators: number;
|
|
59
|
+
averageResponseTime: Duration;
|
|
60
|
+
averageTimeBetweenRequestAndRecovery: Duration;
|
|
61
|
+
averageTripDistanceMiles: number;
|
|
62
|
+
constructor(summary: ICaseAnalyticsSummary);
|
|
63
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CaseAnalyticsSummaryResponseDto = exports.CaseAnalyticsDetailsResponseDto = exports.AnalyticsRequestDto = exports.AnalyticsRequestType = void 0;
|
|
4
|
+
const luxon_1 = require("luxon");
|
|
5
|
+
var AnalyticsRequestType;
|
|
6
|
+
(function (AnalyticsRequestType) {
|
|
7
|
+
AnalyticsRequestType["CaseDetails"] = "Case Details";
|
|
8
|
+
AnalyticsRequestType["CaseSummary"] = "Case Summary";
|
|
9
|
+
})(AnalyticsRequestType = exports.AnalyticsRequestType || (exports.AnalyticsRequestType = {}));
|
|
10
|
+
class AnalyticsRequestDto {
|
|
11
|
+
constructor(requestType) {
|
|
12
|
+
this.requestType = requestType;
|
|
13
|
+
this.filterOptions = this.filterOptions;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.AnalyticsRequestDto = AnalyticsRequestDto;
|
|
17
|
+
class CaseAnalyticsDetailsResponseDto {
|
|
18
|
+
constructor(caseData) {
|
|
19
|
+
this.caseData = caseData || [];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.CaseAnalyticsDetailsResponseDto = CaseAnalyticsDetailsResponseDto;
|
|
23
|
+
class CaseAnalyticsSummaryResponseDto {
|
|
24
|
+
constructor(summary) {
|
|
25
|
+
this.numberOfCases = summary.numberOfCases || 0;
|
|
26
|
+
this.numberOfRfps = summary.numberOfRfps || 0;
|
|
27
|
+
this.numberOfProposals = summary.numberOfProposals || 0;
|
|
28
|
+
this.numberOfTrips = summary.numberOfTrips || 0;
|
|
29
|
+
this.numberOfOperators = summary.numberOfOperators || 0;
|
|
30
|
+
this.averageResponseTime =
|
|
31
|
+
summary.averageResponseTime || luxon_1.Duration.fromObject({ seconds: 0 });
|
|
32
|
+
this.averageTimeBetweenRequestAndRecovery =
|
|
33
|
+
summary.averageTimeBetweenRequestAndRecovery ||
|
|
34
|
+
luxon_1.Duration.fromObject({ seconds: 0 });
|
|
35
|
+
this.averageTripDistanceMiles = summary.averageTripDistanceMiles || 0;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.CaseAnalyticsSummaryResponseDto = CaseAnalyticsSummaryResponseDto;
|
|
@@ -156,6 +156,7 @@ export interface ITransportationRequest {
|
|
|
156
156
|
status: TransportationRequestStatus;
|
|
157
157
|
cancellationReason?: string;
|
|
158
158
|
eventLog?: IEventLog[];
|
|
159
|
+
isTrainingMode?: boolean;
|
|
159
160
|
createdAt?: number;
|
|
160
161
|
updatedAt?: number;
|
|
161
162
|
}
|
|
@@ -180,6 +181,7 @@ export declare class TransportationRequest implements ITransportationRequest {
|
|
|
180
181
|
status: TransportationRequestStatus;
|
|
181
182
|
cancellationReason?: string | undefined;
|
|
182
183
|
eventLog?: IEventLog[] | undefined;
|
|
184
|
+
isTrainingMode?: boolean;
|
|
183
185
|
createdAt?: number;
|
|
184
186
|
updatedAt?: number;
|
|
185
187
|
constructor(transportationRequest: ITransportationRequest);
|
|
@@ -191,6 +191,7 @@ class TransportationRequest {
|
|
|
191
191
|
this.status = transportationRequest.status;
|
|
192
192
|
this.cancellationReason = transportationRequest.cancellationReason;
|
|
193
193
|
this.eventLog = transportationRequest.eventLog;
|
|
194
|
+
this.isTrainingMode = transportationRequest.isTrainingMode || false;
|
|
194
195
|
this.createdAt = transportationRequest.createdAt;
|
|
195
196
|
this.updatedAt = transportationRequest.updatedAt;
|
|
196
197
|
}
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED