@moxi.gmbh/moxi-typescriptmodels 0.1.1121-test-server → 0.1.1121

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 (2) hide show
  1. package/common.d.ts +471 -239
  2. package/package.json +1 -1
package/common.d.ts CHANGED
@@ -1,10 +1,44 @@
1
1
 
2
+ export interface AbstractFindMyRides {
3
+ accountId?: string;
4
+ descending?: boolean;
5
+ filter?: RideFilter;
6
+ maxSize?: number;
7
+ term?: string;
8
+ }
9
+
10
+ export interface AbstractFindRides {
11
+ descending?: boolean;
12
+ filter?: RideFilter;
13
+ maxSize?: number;
14
+ term?: string;
15
+ }
16
+
17
+ export interface AbstractFindRidesForDriver {
18
+ accountId?: string;
19
+ descending?: boolean;
20
+ filter?: RideFilter;
21
+ maxSize?: number;
22
+ term?: string;
23
+ }
24
+
25
+ export interface AbstractFindRidesInMarketplace {
26
+ accountId?: string;
27
+ descending?: boolean;
28
+ filter?: RideFilter;
29
+ /**
30
+ * @deprecated
31
+ */
32
+ maxSize?: number;
33
+ term?: string;
34
+ }
35
+
2
36
  export interface AcceptRide extends RideDriverCommand {
3
37
  driver?: AccountOrTeamRef;
4
38
  }
5
39
 
6
- export interface AcceptRideSeries extends RideDriverSeriesCommand {
7
- dispatcher?: AccountOrTeamRef;
40
+ export interface AcceptRideSeries extends SeriesDriverCommand {
41
+ driver?: AccountOrTeamRef;
8
42
  }
9
43
 
10
44
  export interface AcceptUserAgreement extends UserEdit {
@@ -26,6 +60,12 @@ export interface Account {
26
60
  drivePermissions?: DrivePermission[];
27
61
  info?: AccountInfo;
28
62
  integrationSettings?: any[];
63
+ operateAccounts?: string[];
64
+ operators?: string[];
65
+ /**
66
+ * Derived from subscriptions. Includes organisation types that have not been confirmed yet by a superadmin or are active in past or future.
67
+ */
68
+ organisationTypes?: OrganisationType[];
29
69
  subscriptions?: Subscription[];
30
70
  teams?: Team[];
31
71
  unconfirmedCriticalInfo?: CriticalAccountInfo;
@@ -67,6 +107,10 @@ export interface AccountPermissionCommand extends UserUpdate {
67
107
  accountId?: string;
68
108
  }
69
109
 
110
+ export interface AccountPermissionFilter {
111
+ roles?: AccountRole[];
112
+ }
113
+
70
114
  export interface AccountRef {
71
115
  accountId?: string;
72
116
  name?: string;
@@ -78,14 +122,15 @@ export interface AccountUpcaster {
78
122
  export interface AccountUpdate extends AccountCommand {
79
123
  }
80
124
 
81
- /**
82
- * Address info of a google-validated address, including geolocation and district code
83
- */
125
+ export interface AddOperations extends AccountUpdate {
126
+ operateAccount?: string;
127
+ }
128
+
84
129
  export interface AddressInfo {
85
130
  addition?: string;
86
131
  city?: string;
87
132
  /**
88
- * Derived from districtNutsCode
133
+ * The NUTS country code, derived from districtNutsCode
89
134
  */
90
135
  country?: string;
91
136
  districtNutsCode?: string;
@@ -94,12 +139,12 @@ export interface AddressInfo {
94
139
  number?: string;
95
140
  placeName?: string;
96
141
  /**
97
- * Derived from districtNutsCode
142
+ * The NUTS level 1 code, derived from districtNutsCode
98
143
  */
99
144
  state?: string;
100
145
  street?: string;
101
146
  /**
102
- * Derived from districtNutsCode
147
+ * The NUTS level 2 code, derived from districtNutsCode
103
148
  */
104
149
  subState?: string;
105
150
  zipCode?: string;
@@ -119,37 +164,31 @@ export interface AmbulanceFilter extends DrivePermissionFilter {
119
164
  }
120
165
 
121
166
  /**
122
- * Filled if (and only if) vehicleType == ambulance
167
+ * Mandatory if the vehicleType is ambulance, forbidden if taxi
123
168
  */
124
169
  export interface AmbulanceInfo {
125
170
  /**
126
- * Derived from infectionDescription != blank
171
+ * True if infectionDescription is given
127
172
  */
128
173
  hasInfection?: boolean;
129
174
  infectionDescription?: string;
130
175
  monitoringDescription?: string;
131
176
  oxygenLiterPerHour?: number;
132
177
  /**
133
- * Derived from monitoringDescription != blank
178
+ * True if monitoringDescription is given
134
179
  */
135
180
  requiresMonitoring?: boolean;
136
181
  /**
137
- * Derived from oxygenLiterPerHour != null
182
+ * True if oxygenLiterPerHour is given
138
183
  */
139
184
  requiresOxygen?: boolean;
140
185
  requiresSuctionAspirator?: boolean;
141
186
  }
142
187
 
143
- /**
144
- * Same as RideInfo, except it does not contain an appointment
145
- */
146
- export interface AnonymizedGenericRideInfo extends GenericRideInfo {
188
+ export interface AnonymizedRideInfo extends RideInfo {
147
189
  }
148
190
 
149
- /**
150
- * Information about the ride, from the creator of the ride
151
- */
152
- export interface AnonymizedRideInfo extends RideInfo {
191
+ export interface AnonymizedSeriesRideInfo extends SeriesRideInfo {
153
192
  }
154
193
 
155
194
  export interface Appointment {
@@ -157,7 +196,11 @@ export interface Appointment {
157
196
  time?: string;
158
197
  }
159
198
 
160
- export interface AssignDriver extends RideCommand {
199
+ export interface AssignDriver extends RideOperatorCommand {
200
+ driver?: AccountOrTeamRef;
201
+ }
202
+
203
+ export interface AssignRideSeriesDriver extends SeriesOperatorCommand {
161
204
  driver?: AccountOrTeamRef;
162
205
  }
163
206
 
@@ -179,39 +222,31 @@ export interface AuthenticationResponse {
179
222
  userProfile?: UserProfile;
180
223
  }
181
224
 
182
- export interface AuthenticationService {
225
+ export interface AuthenticationResponseFactory {
183
226
  }
184
227
 
185
- export interface BatchUpdateRideSeriesInfo extends RideSeriesPostConfirmCommand {
186
- info?: GenericRideInfo;
187
- updater?: AccountOrTeamRef;
188
- }
189
-
190
- export interface BatchUpdateRideSeriesTimes extends RideSeriesPostConfirmCommand {
191
- rides?: SingleRideUpdate[];
192
- updater?: AccountOrTeamRef;
228
+ export interface AuthenticationService {
193
229
  }
194
230
 
195
231
  export interface BookRide extends CreateRideCommand {
196
- booker?: AccountOrTeamRef;
197
232
  info?: RideInfo;
198
233
  }
199
234
 
200
- export interface BookRideSeries extends RideBookerSeriesCommand {
201
- booker?: AccountOrTeamRef;
202
- info?: GenericRideInfo;
203
- rides?: SingleRide[];
235
+ export interface BookRideSeries extends CreateSeriesCommand {
236
+ rideSummaries?: RideSummary[];
204
237
  }
205
238
 
206
239
  export interface CancelRide extends RideBookerCommand {
207
240
  reason?: string;
208
241
  }
209
242
 
210
- export interface CancelRideSeries extends RideBookerSeriesCommand {
243
+ export interface CancelRideSeries extends SeriesCommandWithSeparateEvent {
244
+ reason?: string;
211
245
  }
212
246
 
213
- export interface CancelRidesInSeries extends RideSeriesPostConfirmCommand {
214
- updater?: AccountOrTeamRef;
247
+ export interface CancelRideSeriesEvent extends SeriesBookerCommand {
248
+ cancelRides?: string[];
249
+ reason?: string;
215
250
  }
216
251
 
217
252
  export interface CeliosSettings {
@@ -233,6 +268,20 @@ export interface CheckIfUserSignedUp {
233
268
  userId?: string;
234
269
  }
235
270
 
271
+ export interface CheckSession {
272
+ userId?: string;
273
+ }
274
+
275
+ /**
276
+ * You can send in custom values. For every value you don't send in, we lookup the default setting you set up in your account.
277
+ */
278
+ export interface CleaningAndSlack {
279
+ cleaningAtGarage?: boolean;
280
+ cleaningDuration?: number;
281
+ dropoffDuration?: number;
282
+ pickupDuration?: number;
283
+ }
284
+
236
285
  export interface ConfirmAccount extends AccountCommand {
237
286
  }
238
287
 
@@ -243,9 +292,6 @@ export interface ConfirmDrivePermission extends AccountUpdate {
243
292
  export interface ConfirmEverythingInAccount extends AccountCommand {
244
293
  }
245
294
 
246
- export interface ConfirmRideSeries extends RideDriverSeriesCommand {
247
- }
248
-
249
295
  export interface ConfirmSubscription extends AccountUpdate {
250
296
  subscriptionId?: string;
251
297
  }
@@ -274,14 +320,12 @@ export interface CreateOptimizationPlan extends OptimizerMessage {
274
320
  }
275
321
 
276
322
  export interface CreateRideCommand extends RideBookerCommand {
277
- booker?: AccountOrTeamId;
323
+ booker?: AccountOrTeamRef;
278
324
  }
279
325
 
280
- export interface CreateRideFromSeries extends RideDriverCommand {
326
+ export interface CreateSeriesCommand extends SeriesBookerCommand {
281
327
  booker?: AccountOrTeamRef;
282
- driver?: AccountOrTeamRef;
283
- info?: RideInfo;
284
- seriesInfo?: SeriesInfo;
328
+ info?: SeriesRideInfo;
285
329
  }
286
330
 
287
331
  export interface CreateSqueezeInPlan extends OptimizerMessage {
@@ -317,6 +361,11 @@ export interface DateRange {
317
361
  export interface DeleteUser extends UserEdit {
318
362
  }
319
363
 
364
+ export interface DetailsFilter extends WebsocketFilter {
365
+ id?: string;
366
+ screen: "ride_details";
367
+ }
368
+
320
369
  export interface DisconnectClient {
321
370
  clientId?: string;
322
371
  tokenId?: string;
@@ -427,44 +476,25 @@ export interface FindAccounts {
427
476
  term?: string;
428
477
  }
429
478
 
430
- export interface FindMyAcceptedRides {
479
+ export interface FindDuplicateRides {
431
480
  accountId?: string;
432
- descending?: boolean;
433
- filter?: RideFilter;
434
- maxSize?: number;
435
- term?: string;
481
+ appointmentTime?: string;
482
+ patientBirthDay?: string;
483
+ patientFirstName?: string;
484
+ patientLastName?: string;
436
485
  }
437
486
 
438
- /**
439
- * @deprecated
440
- */
441
- export interface FindMyRideOffers {
442
- accountId?: string;
443
- descending?: boolean;
444
- filter?: RideFilter;
445
- maxSize?: number;
446
- term?: string;
487
+ export interface FindMyRides extends AbstractFindMyRides {
447
488
  }
448
489
 
449
- export interface FindMyRideSeries {
450
- accountId?: string;
451
- descending?: boolean;
452
- filter?: RideFilter;
453
- maxSize?: number;
454
- term?: string;
490
+ export interface FindMyRidesAndSeries extends AbstractFindMyRides {
455
491
  }
456
492
 
457
- export interface FindMyRides {
458
- accountId?: string;
459
- descending?: boolean;
460
- filter?: RideFilter;
461
- maxSize?: number;
462
- term?: string;
493
+ export interface FindMySeries extends AbstractFindMyRides {
463
494
  }
464
495
 
465
496
  export interface FindMyTokens {
466
497
  accountId?: string;
467
- teamId?: string;
468
498
  term?: string;
469
499
  }
470
500
 
@@ -474,27 +504,27 @@ export interface FindMyUsers {
474
504
  term?: string;
475
505
  }
476
506
 
477
- export interface FindPotentialRideSeries {
478
- accountId?: string;
479
- descending?: boolean;
480
- filter?: RideInfoFilter;
481
- maxSize?: number;
482
- timeRange?: InstantRange;
507
+ export interface FindRides extends AbstractFindRides {
483
508
  }
484
509
 
485
- export interface FindPotentialRides {
486
- accountId?: string;
487
- descending?: boolean;
488
- filter?: RideFilter;
489
- maxSize?: number;
490
- term?: string;
510
+ export interface FindRidesAndSeries extends AbstractFindRides {
491
511
  }
492
512
 
493
- export interface FindRides {
494
- descending?: boolean;
495
- filter?: RideFilter;
496
- maxSize?: number;
497
- term?: string;
513
+ export interface FindRidesAndSeriesForDriver extends AbstractFindRidesForDriver {
514
+ }
515
+
516
+ export interface FindRidesAndSeriesInMarketplace extends AbstractFindRidesInMarketplace {
517
+ }
518
+
519
+ export interface FindRidesAndSeriesResult {
520
+ ridesAndSeries?: RideOrMinimizedSeries[];
521
+ ridesCount?: RideFilterCount;
522
+ }
523
+
524
+ export interface FindRidesForDriver extends AbstractFindRidesForDriver {
525
+ }
526
+
527
+ export interface FindRidesInMarketplace extends AbstractFindRidesInMarketplace {
498
528
  }
499
529
 
500
530
  export interface FindRidesResult {
@@ -502,23 +532,47 @@ export interface FindRidesResult {
502
532
  rides?: Ride[];
503
533
  }
504
534
 
535
+ export interface FindSeries extends AbstractFindRides {
536
+ }
537
+
538
+ export interface FindSeriesForDriver extends AbstractFindRidesForDriver {
539
+ }
540
+
541
+ export interface FindSeriesInMarketplace extends AbstractFindRidesInMarketplace {
542
+ }
543
+
505
544
  export interface FindTokens {
506
545
  term?: string;
507
546
  }
508
547
 
509
548
  export interface FindUsers {
549
+ accountFilter?: AccountFilter;
550
+ accountPermissionFilter?: AccountPermissionFilter;
510
551
  term?: string;
511
552
  }
512
553
 
554
+ export interface FirebaseMessage {
555
+ data?: { [index: string]: string };
556
+ notification?: Notification;
557
+ topic?: string;
558
+ }
559
+
560
+ export interface FleetOverviewFilter extends WebsocketFilter {
561
+ queryFilter?: FindRidesAndSeriesForDriver;
562
+ screen: "fleet_overview";
563
+ }
564
+
513
565
  export interface GenerateToken {
514
566
  accountPermission?: AccountPermission;
515
567
  info?: TokenInfo;
516
568
  tokenId?: string;
517
569
  }
518
570
 
519
- /**
520
- * Same as RideInfo, except it does not contain an appointment
521
- */
571
+ export interface GenerateTokenResult {
572
+ entity?: Token;
573
+ jwt?: string;
574
+ }
575
+
522
576
  export interface GenericRideInfo {
523
577
  ambulanceInfo?: AmbulanceInfo;
524
578
  attendantsPresent?: number;
@@ -534,7 +588,6 @@ export interface GenericRideInfo {
534
588
  patient?: Person;
535
589
  plannedDuration?: RideDuration;
536
590
  preferredDriver?: string;
537
- purpose?: RidePurpose;
538
591
  to?: AddressInfo;
539
592
  vehicleType?: VehicleType;
540
593
  weightInKg?: number;
@@ -570,10 +623,16 @@ export interface GetAccount {
570
623
  accountId?: string;
571
624
  }
572
625
 
573
- export interface GetAccountsOfPotentialDrivers extends GetPotentialDrivers {
626
+ /**
627
+ * @deprecated
628
+ */
629
+ export interface GetAccountsOfPotentialDrivers extends IGetPotentialDrivers {
574
630
  }
575
631
 
576
- export interface GetAccountsOfPotentialDriversAsAdmin extends GetPotentialDrivers {
632
+ /**
633
+ * @deprecated
634
+ */
635
+ export interface GetAccountsOfPotentialDriversAsAdmin extends IGetPotentialDrivers {
577
636
  }
578
637
 
579
638
  export interface GetDistrict {
@@ -596,32 +655,17 @@ export interface GetIsoStates {
596
655
  export interface GetMonopolyAccounts {
597
656
  }
598
657
 
599
- export interface GetMyAcceptedRides {
600
- accountId?: string;
601
- maxSize?: number;
602
- timeRange?: InstantRange;
603
- }
604
-
605
658
  export interface GetMyAccounts {
606
659
  filter?: AccountFilter;
607
660
  }
608
661
 
609
- /**
610
- * @deprecated
611
- */
612
- export interface GetMyRideOffers {
613
- accountId?: string;
614
- maxSize?: number;
615
- timeRange?: InstantRange;
616
- }
617
-
618
- export interface GetMyRideSeries {
662
+ export interface GetMyRides {
619
663
  accountId?: string;
620
664
  maxSize?: number;
621
665
  timeRange?: InstantRange;
622
666
  }
623
667
 
624
- export interface GetMyRides {
668
+ export interface GetMySeries {
625
669
  accountId?: string;
626
670
  maxSize?: number;
627
671
  timeRange?: InstantRange;
@@ -636,20 +680,27 @@ export interface GetMyUserProfile {
636
680
  export interface GetNutsStates {
637
681
  }
638
682
 
639
- export interface GetPotentialDrivers {
683
+ export interface GetOneSeries {
684
+ rideSeriesId?: string;
685
+ }
686
+
687
+ export interface GetPotentialDriverIds extends GetPotentialDriversAbstract {
688
+ }
689
+
690
+ /**
691
+ * Common information shared across all rides in a series. Similar to RideInfo but without appointment-specific details that vary per ride.
692
+
693
+ */
694
+ export interface GetPotentialDrivers extends GetPotentialDriversAbstract {
695
+ }
696
+
697
+ export interface GetPotentialDriversAbstract {
640
698
  fromDistrict?: string;
641
699
  mobility?: Mobility;
642
- toDistrict?: string;
643
700
  vehicleType?: VehicleType;
644
701
  weightInKg?: number;
645
702
  }
646
703
 
647
- export interface GetPotentialRides {
648
- accountId?: string;
649
- maxSize?: number;
650
- timeRange?: InstantRange;
651
- }
652
-
653
704
  export interface GetRide {
654
705
  rideId?: string;
655
706
  }
@@ -669,12 +720,38 @@ export interface GetRideLog {
669
720
  rideId?: string;
670
721
  }
671
722
 
672
- export interface GetRideSeries {
673
- rideSeriesId?: string;
723
+ export interface GetRideOrSeries {
724
+ id?: string;
725
+ }
726
+
727
+ export interface GetRidesForDriver {
728
+ accountId?: string;
729
+ maxSize?: number;
730
+ timeRange?: InstantRange;
731
+ }
732
+
733
+ export interface GetRidesInMarketplace {
734
+ accountId?: string;
735
+ maxSize?: number;
736
+ timeRange?: InstantRange;
674
737
  }
675
738
 
676
739
  export interface GetRidesInSeries {
677
- filter?: RideFilter;
740
+ rideSeriesId?: string;
741
+ }
742
+
743
+ export interface GetSeriesForDriver {
744
+ accountId?: string;
745
+ maxSize?: number;
746
+ timeRange?: InstantRange;
747
+ }
748
+
749
+ export interface GetSeriesInMarketplace {
750
+ accountId?: string;
751
+ maxSize?: number;
752
+ }
753
+
754
+ export interface GetSeriesLog {
678
755
  rideSeriesId?: string;
679
756
  }
680
757
 
@@ -704,6 +781,23 @@ export interface GiveTeamPermission extends AccountPermissionCommand {
704
781
  teamPermission?: TeamPermission;
705
782
  }
706
783
 
784
+ export interface HalfHourBeforeStart {
785
+ rideId?: string;
786
+ }
787
+
788
+ export interface HospitalOverviewFilter extends WebsocketFilter {
789
+ queryFilter?: FindMyRidesAndSeries;
790
+ screen: "hospital_overview";
791
+ }
792
+
793
+ export interface IGetPotentialDrivers {
794
+ fromDistrict?: string;
795
+ mobility?: Mobility;
796
+ toDistrict?: string;
797
+ vehicleType?: VehicleType;
798
+ weightInKg?: number;
799
+ }
800
+
707
801
  export interface ImpersonateUser {
708
802
  userId?: string;
709
803
  }
@@ -744,6 +838,11 @@ export interface IsoState {
744
838
  nutsCode?: string;
745
839
  }
746
840
 
841
+ export interface MarketplaceOverviewFilter extends WebsocketFilter {
842
+ queryFilter?: FindRidesAndSeriesInMarketplace;
843
+ screen: "marketplace";
844
+ }
845
+
747
846
  export interface Metric {
748
847
  clientId?: string;
749
848
  clientSegment?: number[];
@@ -754,6 +853,18 @@ export interface Metric {
754
853
  updates?: string[];
755
854
  }
756
855
 
856
+ /**
857
+ * A series of rides.
858
+ */
859
+ export interface MinimizedRideSeries extends RideSeries, RideOrMinimizedSeries {
860
+ info?: SeriesRideInfo;
861
+ }
862
+
863
+ export interface Notification {
864
+ body?: string;
865
+ title?: string;
866
+ }
867
+
757
868
  export interface NutsDistrict {
758
869
  code?: string;
759
870
  name?: string;
@@ -776,6 +887,15 @@ export interface OffsetTimeRange {
776
887
  start?: Date;
777
888
  }
778
889
 
890
+ export interface OneHourAfterEnd {
891
+ rideId?: string;
892
+ }
893
+
894
+ export interface OperationsOverviewFilter extends WebsocketFilter {
895
+ queryFilter?: FindRidesAndSeries;
896
+ screen: "operations_overview";
897
+ }
898
+
779
899
  export interface OptimizerMessage {
780
900
  }
781
901
 
@@ -792,7 +912,7 @@ export interface Person {
792
912
  }
793
913
 
794
914
  /**
795
- * Filled if (and only if) patient exceeds 130 kg
915
+ * Mandatory if weight exceeds 130 kg, otherwise forbidden
796
916
  */
797
917
  export interface PersonDimensions {
798
918
  heightInCm?: number;
@@ -812,7 +932,7 @@ export interface ReadUpdates {
812
932
  maxSize?: number;
813
933
  maxTimeout?: number;
814
934
  tokenId?: string;
815
- updateTypes?: TrackingUpdateType[];
935
+ updateTypes?: EntityType[];
816
936
  }
817
937
 
818
938
  export interface ReadUpdatesResult {
@@ -821,6 +941,24 @@ export interface ReadUpdatesResult {
821
941
  updates?: any[];
822
942
  }
823
943
 
944
+ export interface RefreshTokenData {
945
+ expiresAt?: string;
946
+ hashedToken?: string;
947
+ userId?: string;
948
+ }
949
+
950
+ export interface RefreshTokenService {
951
+ }
952
+
953
+ export interface RefreshUserToken {
954
+ refreshToken?: string;
955
+ }
956
+
957
+ export interface RefreshableAuthenticationResponse extends AuthenticationResponse {
958
+ refreshToken?: string;
959
+ refreshTokenDeadline?: string;
960
+ }
961
+
824
962
  export interface Region {
825
963
  nutsCode?: string;
826
964
  }
@@ -844,6 +982,14 @@ export interface RegisterEinsatz {
844
982
  export interface RemoveAccount extends AccountUpdate {
845
983
  }
846
984
 
985
+ export interface RemoveOperations extends AccountUpdate {
986
+ operateAccount?: string;
987
+ }
988
+
989
+ export interface RemoveOperator extends AccountUpdate {
990
+ operator?: string;
991
+ }
992
+
847
993
  export interface RemoveSettings extends AccountUpdate {
848
994
  type?: IntegrationType;
849
995
  }
@@ -893,7 +1039,7 @@ export interface ResetPosition {
893
1039
  export interface ReturnRide extends RideDriverModifyCommand {
894
1040
  }
895
1041
 
896
- export interface ReturnRideSeries extends RideDriverSeriesCommand {
1042
+ export interface ReturnRideSeries extends SeriesDriverCommand {
897
1043
  }
898
1044
 
899
1045
  export interface Review {
@@ -916,6 +1062,9 @@ export interface RevokeDrivePermission extends AccountUpdate {
916
1062
  drivePermissionId?: string;
917
1063
  }
918
1064
 
1065
+ export interface RevokeSecondaryTokenPermission extends SecondaryTokenPermissionCommand {
1066
+ }
1067
+
919
1068
  export interface RevokeSubscription extends AccountUpdate {
920
1069
  subscriptionId?: string;
921
1070
  }
@@ -923,75 +1072,70 @@ export interface RevokeSubscription extends AccountUpdate {
923
1072
  export interface RevokeToken extends TokenUpdate {
924
1073
  }
925
1074
 
926
- export interface Ride {
1075
+ export interface RevokeUserRefreshTokens {
1076
+ userId?: string;
1077
+ }
1078
+
1079
+ export interface Ride extends RideOrSeries, RideOrMinimizedSeries {
927
1080
  /**
928
- * Derived from driver != null
1081
+ * 'accepted' is true if a driver has accepted the ride.
929
1082
  */
930
1083
  accepted?: boolean;
1084
+ acceptedTime?: string;
931
1085
  actualEndTime?: string;
932
1086
  actualStartTime?: string;
933
1087
  /**
934
- * Derived from driveStatus != null
1088
+ * 'arrived' is true if the driver has reported driveStatus is 'arrived_at_origin'.
935
1089
  */
936
1090
  arrived?: boolean;
937
1091
  /**
938
- * Derived from bookedTime != null
1092
+ * 'booked' is false if the ride has only been saved.
939
1093
  */
940
1094
  booked?: boolean;
941
- bookedTime?: string;
942
1095
  booker?: AccountOrTeamRef;
943
1096
  bookerReview?: Review;
944
- bookingStatus?: BookingStatus;
945
1097
  cancelReason?: string;
946
1098
  cancelled?: boolean;
947
1099
  /**
948
- * Derived from driveStatus == completed
1100
+ * 'completed' is true if the driver has reported driveStatus is 'completed'.
949
1101
  */
950
1102
  completed?: boolean;
951
1103
  /**
952
- * Desired Time of Arrival at the Destination/Drop-off location. Derived from info.appointment and info.plannedDuration
1104
+ * The booker determines the desiredEndTime via 'info.appointment' and 'info.plannedDuration'. It means the desired time of arrival at the 'to' or 'drop-off' location.
953
1105
  */
954
1106
  desiredEndTime?: string;
955
1107
  /**
956
- * Desired Time of Arrival at the Origin/Pick-up location. Derived from info.appointment and info.plannedDuration
1108
+ * The booker determines the desiredStartTime via 'info.appointment' and 'info.plannedDuration'. It means the desired time of arrival at the 'from' or 'pick-up' location.
957
1109
  */
958
1110
  desiredStartTime?: string;
959
1111
  driveStatus?: DriveStatus;
960
- driver?: AccountOrTeamRef;
961
1112
  driverReview?: Review;
962
1113
  driverSyncStatus?: SyncStatus;
963
1114
  endTimeDelay?: number;
964
1115
  /**
965
- * Expected Time of Arrival at the Destination/Drop-off location.
1116
+ * The driver determines the expectedEndTime when indicating delays. It means the expected time of arrival at the 'to' or 'drop-off' location.
966
1117
  */
967
1118
  expectedEndTime?: string;
968
1119
  /**
969
- * Expected Time of Arrival at the Origin/Pick-up location.
1120
+ * The driver determines the expectedEndTime when indicating delays. It means the expected time of arrival at the 'from' or 'pick-up' location.
970
1121
  */
971
1122
  expectedStartTime?: string;
972
1123
  info?: RideInfo;
1124
+ marketplaceTime?: string;
973
1125
  /**
974
- * Derived from plannedStartTime != null
1126
+ * 'planned' is true if the driver has reported a planned time for the ride.
975
1127
  */
976
1128
  planned?: boolean;
977
1129
  /**
978
- * Planned Time of Arrival at the Destination/Drop-off location, reported by the driver.
1130
+ * The driver determines the plannedEndTime. It means the planned time of arrival at the 'to' or 'drop-off' location.
979
1131
  */
980
1132
  plannedEndTime?: string;
981
1133
  plannedStartTime?: string;
982
1134
  rideId?: string;
983
- /**
984
- * The time until which rides can be found. It's the planned time or else the desired time.
985
- */
986
- searchEndTime?: string;
987
- /**
988
- * The time from which rides can be found. It's the planned time or else the desired time.
989
- */
990
- searchStartTime?: string;
991
1135
  seriesInfo?: SeriesInfo;
992
1136
  startTimeDelay?: number;
993
1137
  /**
994
- * Derived from driveStatus != null
1138
+ * 'started' is true if the driver has reported a driveStatus.
995
1139
  */
996
1140
  started?: boolean;
997
1141
  }
@@ -999,9 +1143,6 @@ export interface Ride {
999
1143
  export interface RideBookerCommand extends RideCommand {
1000
1144
  }
1001
1145
 
1002
- export interface RideBookerSeriesCommand extends RideSeriesCommand {
1003
- }
1004
-
1005
1146
  export interface RideCommand {
1006
1147
  rideId?: string;
1007
1148
  }
@@ -1012,16 +1153,19 @@ export interface RideDriverCommand extends RideCommand {
1012
1153
  export interface RideDriverModifyCommand extends RideDriverCommand {
1013
1154
  }
1014
1155
 
1015
- export interface RideDriverSeriesCommand extends RideSeriesPreConfirmCommand {
1016
- }
1017
-
1018
- /**
1019
- * All durations in seconds
1020
- */
1021
1156
  export interface RideDuration {
1022
1157
  driving?: number;
1158
+ /**
1159
+ * Seconds of slack for dropping off the patient, currently hardcoded to 15 minutes
1160
+ */
1023
1161
  droppingOff?: number;
1162
+ /**
1163
+ * Seconds of slack for picking up the patient, currently hardcoded to 15 minutes
1164
+ */
1024
1165
  pickingUp?: number;
1166
+ /**
1167
+ * Seconds of driving time plus the pick-up and drop-off slack times
1168
+ */
1025
1169
  total?: number;
1026
1170
  }
1027
1171
 
@@ -1030,6 +1174,7 @@ export interface RideFilter {
1030
1174
  driveStatuses?: DriveStatus[];
1031
1175
  driverAccountNames?: string[];
1032
1176
  driverTeamNames?: string[];
1177
+ entityType?: EntityType;
1033
1178
  hasInfection?: boolean;
1034
1179
  heavyWeight?: boolean;
1035
1180
  mobilities?: Mobility[];
@@ -1041,6 +1186,7 @@ export interface RideFilter {
1041
1186
  riderAccountNames?: string[];
1042
1187
  riderTeamNames?: string[];
1043
1188
  timeRange?: InstantRange;
1189
+ unfoldRideSeries?: boolean;
1044
1190
  vehicleType?: VehicleType;
1045
1191
  }
1046
1192
 
@@ -1066,41 +1212,9 @@ export interface RideIdResult {
1066
1212
  rideId?: string;
1067
1213
  }
1068
1214
 
1069
- /**
1070
- * Information about the ride, from the creator of the ride
1071
- */
1072
- export interface RideInfo {
1073
- ambulanceInfo?: AmbulanceInfo;
1215
+ export interface RideInfo extends GenericRideInfo {
1074
1216
  appointment?: Appointment;
1075
- attendantsPresent?: number;
1076
- comment?: string;
1077
- dimensions?: PersonDimensions;
1078
- distanceInMeters?: number;
1079
- from?: AddressInfo;
1080
- /**
1081
- * Derived from weightInKg != null
1082
- */
1083
- heavyWeight?: boolean;
1084
- mobility?: Mobility;
1085
- patient?: Person;
1086
- plannedDuration?: RideDuration;
1087
- preferredDriver?: string;
1088
1217
  purpose?: RidePurpose;
1089
- to?: AddressInfo;
1090
- vehicleType?: VehicleType;
1091
- weightInKg?: number;
1092
- }
1093
-
1094
- export interface RideInfoFilter {
1095
- hasInfection?: boolean;
1096
- heavyWeight?: boolean;
1097
- mobilities?: Mobility[];
1098
- purposes?: RidePurpose[];
1099
- region?: Region;
1100
- requiresMonitoring?: boolean;
1101
- requiresOxygen?: boolean;
1102
- requiresSuctionAspirator?: boolean;
1103
- vehicleType?: VehicleType;
1104
1218
  }
1105
1219
 
1106
1220
  export interface RideLog {
@@ -1119,39 +1233,62 @@ export interface RideLog {
1119
1233
  token?: boolean;
1120
1234
  }
1121
1235
 
1122
- export interface RideOfferInfo {
1123
- appointment?: Appointment;
1236
+ export interface RideOperatorCommand extends RideCommand {
1124
1237
  }
1125
1238
 
1126
- export interface RideSeries {
1127
- accepted?: boolean;
1128
- booked?: boolean;
1129
- booker?: AccountOrTeamRef;
1130
- cancelled?: boolean;
1131
- confirmed?: boolean;
1132
- driver?: AccountOrTeamRef;
1133
- endTime?: string;
1239
+ export interface RideOrMinimizedSeries {
1240
+ bookingStatus?: BookingStatus;
1241
+ entityType?: EntityType;
1134
1242
  info?: GenericRideInfo;
1135
- rideSeriesId?: string;
1136
- rides?: SingleRide[];
1137
- startTime?: string;
1138
- status?: RideSeriesStatus;
1243
+ searchEndTime?: string;
1244
+ searchStartTime?: string;
1139
1245
  }
1140
1246
 
1141
- export interface RideSeriesCommand {
1142
- rideSeriesId?: string;
1247
+ export interface RideOrSeries {
1248
+ bookedTime?: string;
1249
+ bookingStatus?: BookingStatus;
1250
+ cleaningAndSlack?: CleaningAndSlack;
1251
+ driver?: AccountOrTeamRef;
1252
+ entityType?: EntityType;
1253
+ info?: GenericRideInfo;
1254
+ totalDuration?: number;
1143
1255
  }
1144
1256
 
1145
- export interface RideSeriesIdResult {
1257
+ /**
1258
+ * A series of rides.
1259
+ */
1260
+ export interface RideSeries extends RideOrSeries {
1261
+ /**
1262
+ * 'accepted' is true if a driver has accepted the series.
1263
+ */
1264
+ accepted?: boolean;
1265
+ /**
1266
+ * The number of rides in the series that are not cancelled.
1267
+ */
1268
+ activeRideCount?: number;
1269
+ /**
1270
+ * 'booked' is false if the series has only been saved.
1271
+ */
1272
+ booked?: boolean;
1273
+ booker?: AccountOrTeamRef;
1274
+ cancelReason?: string;
1275
+ cancelled?: boolean;
1276
+ info?: SeriesRideInfo;
1146
1277
  rideSeriesId?: string;
1278
+ rides?: Ride[];
1279
+ ridesSummaries?: RideSummary[];
1280
+ /**
1281
+ * searchEndTime is the time from which series can be found in our system. It's the searchEndTime of the last ride in the series.
1282
+ */
1283
+ searchEndTime?: string;
1284
+ /**
1285
+ * searchStartTime is the time from which series can be found in our system. It's the searchStartTime of the first ride in the series.
1286
+ */
1287
+ searchStartTime?: string;
1147
1288
  }
1148
1289
 
1149
- export interface RideSeriesPostConfirmCommand {
1290
+ export interface RideSeriesIdResult {
1150
1291
  rideSeriesId?: string;
1151
- ridesToModify?: Ride[];
1152
- }
1153
-
1154
- export interface RideSeriesPreConfirmCommand extends RideSeriesCommand {
1155
1292
  }
1156
1293
 
1157
1294
  export interface RideSeriesUpdate {
@@ -1164,12 +1301,23 @@ export interface RideSeriesUpdate {
1164
1301
  type: "rideseries";
1165
1302
  }
1166
1303
 
1304
+ export interface RideSeriesUtils {
1305
+ }
1306
+
1167
1307
  export interface RideStatisticsQuery {
1168
1308
  dateRange?: DateRange;
1169
- timezoneOrDefault?: string;
1170
1309
  zoneId?: string;
1171
1310
  }
1172
1311
 
1312
+ /**
1313
+ * Individual ride timing within a series. Once a ride series is accepted, you cannot add rides, only remove
1314
+ */
1315
+ export interface RideSummary {
1316
+ appointmentTime?: string;
1317
+ returnTrip?: boolean;
1318
+ rideId?: string;
1319
+ }
1320
+
1173
1321
  export interface RideSystemCommand extends RideCommand {
1174
1322
  }
1175
1323
 
@@ -1186,17 +1334,24 @@ export interface RideUpdate {
1186
1334
  type: "ride";
1187
1335
  }
1188
1336
 
1189
- export interface Role<T> {
1337
+ export interface Role {
1190
1338
  }
1191
1339
 
1192
1340
  /**
1193
1341
  * Save a new ride or update a previously saved ride. Not allowed to saveRide after the ride has been booked.
1194
1342
  */
1195
1343
  export interface SaveRide extends CreateRideCommand {
1196
- booker?: AccountOrTeamRef;
1197
1344
  info?: RideInfo;
1198
1345
  }
1199
1346
 
1347
+ export interface SaveRideSeries extends CreateSeriesCommand {
1348
+ rideSummaries?: RideSummary[];
1349
+ }
1350
+
1351
+ export interface SecondaryTokenPermissionCommand extends TokenUpdate {
1352
+ accountId?: string;
1353
+ }
1354
+
1200
1355
  export interface SendConfirmationEmail {
1201
1356
  userId?: string;
1202
1357
  }
@@ -1208,6 +1363,7 @@ export interface SendEmail {
1208
1363
  export interface SendFreshdeskNewTicket {
1209
1364
  email?: string;
1210
1365
  message?: string;
1366
+ subject?: string;
1211
1367
  }
1212
1368
 
1213
1369
  export interface SendInvitationEmail {
@@ -1215,17 +1371,62 @@ export interface SendInvitationEmail {
1215
1371
  userId?: string;
1216
1372
  }
1217
1373
 
1374
+ export interface SendKChat {
1375
+ channel?: KChatChannel;
1376
+ message?: string;
1377
+ }
1378
+
1218
1379
  export interface SendSlack {
1219
1380
  channel?: SlackChannel;
1220
1381
  message?: string;
1221
1382
  }
1222
1383
 
1384
+ export interface SendToFirebase {
1385
+ message?: FirebaseMessage;
1386
+ }
1387
+
1388
+ export interface SeriesBookerCommand extends SeriesCommand {
1389
+ }
1390
+
1391
+ export interface SeriesCommand {
1392
+ rideSeriesId?: string;
1393
+ }
1394
+
1395
+ export interface SeriesCommandWithSeparateEvent {
1396
+ rideSeriesId?: string;
1397
+ }
1398
+
1399
+ export interface SeriesDriverCommand extends SeriesCommand {
1400
+ }
1401
+
1223
1402
  /**
1224
- * Information about a ride that is part of series.
1403
+ * If the ride is part of a series, seriesInfo will contain context about the position of the ride within the series.
1225
1404
  */
1226
1405
  export interface SeriesInfo {
1406
+ desyncedFromSeries?: boolean;
1407
+ positionInSeries?: number;
1227
1408
  returnTrip?: boolean;
1228
1409
  rideSeriesId?: string;
1410
+ totalRidesInSeries?: number;
1411
+ }
1412
+
1413
+ export interface SeriesOperatorCommand extends SeriesCommand {
1414
+ }
1415
+
1416
+ export interface SeriesRideInfo extends GenericRideInfo {
1417
+ purpose?: SeriesPurpose;
1418
+ }
1419
+
1420
+ export interface SetOperations extends AccountUpdate {
1421
+ operateAccounts?: string[];
1422
+ }
1423
+
1424
+ export interface SetOperator extends AccountUpdate {
1425
+ operator?: string;
1426
+ }
1427
+
1428
+ export interface SetSecondaryTokenPermission extends SecondaryTokenPermissionCommand {
1429
+ accountPermission?: AccountPermission;
1229
1430
  }
1230
1431
 
1231
1432
  export interface SetSettings extends AccountUpdate {
@@ -1255,16 +1456,6 @@ export interface SignUpUser {
1255
1456
  userId?: string;
1256
1457
  }
1257
1458
 
1258
- export interface SingleRide {
1259
- desiredStartTime?: string;
1260
- returnTrip?: boolean;
1261
- }
1262
-
1263
- export interface SingleRideUpdate {
1264
- desiredStartTime?: string;
1265
- rideId?: string;
1266
- }
1267
-
1268
1459
  export interface StopImpersonatingUser {
1269
1460
  }
1270
1461
 
@@ -1314,10 +1505,11 @@ export interface TimedPermission {
1314
1505
  }
1315
1506
 
1316
1507
  export interface Token {
1317
- accountPermission?: AccountPermission;
1508
+ accountPermissions?: AccountPermission[];
1318
1509
  createdBy?: string;
1319
1510
  info?: TokenInfo;
1320
1511
  lastUpdatedBy?: string;
1512
+ owner?: string;
1321
1513
  revoked?: boolean;
1322
1514
  tokenId?: string;
1323
1515
  }
@@ -1360,9 +1552,19 @@ export interface UpdateRidePlan extends RideDriverModifyCommand {
1360
1552
  plannedStartTime?: string;
1361
1553
  }
1362
1554
 
1363
- export interface UpdateRideSeries extends RideBookerSeriesCommand {
1364
- info?: GenericRideInfo;
1365
- rides?: SingleRide[];
1555
+ export interface UpdateRideSeries extends SeriesCommandWithSeparateEvent {
1556
+ booker?: AccountOrTeamRef;
1557
+ info?: SeriesRideInfo;
1558
+ rideSummaries?: RideSummary[];
1559
+ }
1560
+
1561
+ export interface UpdateRideSeriesEvent extends SeriesBookerCommand {
1562
+ addRides?: string[];
1563
+ booker?: AccountOrTeamRef;
1564
+ cancelRides?: string[];
1565
+ info?: SeriesRideInfo;
1566
+ rideSummaries?: RideSummary[];
1567
+ updateRides?: string[];
1366
1568
  }
1367
1569
 
1368
1570
  export interface UpdateTeam extends TeamUpdate {
@@ -1416,12 +1618,32 @@ export interface UserUpdate extends UserCommand {
1416
1618
  export interface UserUpdateAfterSignup extends UserUpdate {
1417
1619
  }
1418
1620
 
1621
+ export interface WebsocketFilter {
1622
+ screen: "ride_details" | "fleet_overview" | "hospital_overview" | "marketplace" | "operations_overview";
1623
+ }
1624
+
1625
+ export interface WebsocketMultipleUpdates extends WebsocketUpdate {
1626
+ ridesAndSeries?: RideOrMinimizedSeries[];
1627
+ ridesCount?: RideFilterCount;
1628
+ type: "multiple_updates";
1629
+ }
1630
+
1631
+ export interface WebsocketSingleUpdate extends WebsocketUpdate {
1632
+ id?: string;
1633
+ rideOrSeries?: RideOrMinimizedSeries;
1634
+ type: "single_update";
1635
+ }
1636
+
1637
+ export interface WebsocketUpdate {
1638
+ type: "multiple_updates" | "single_update";
1639
+ }
1640
+
1419
1641
  export interface ZonedTimeRange {
1420
1642
  end?: Date;
1421
1643
  start?: Date;
1422
1644
  }
1423
1645
 
1424
- export type AccountRole = "ridebooker" | "dispatcher" | "admin" | "owner";
1646
+ export type AccountRole = "ridebooker" | "dispatcher" | "operator" | "admin" | "owner";
1425
1647
 
1426
1648
  export type AuthenticationResult = "SUCCESS" | "NOT_CONFIRMED";
1427
1649
 
@@ -1431,32 +1653,42 @@ export type DrivePermissionFilterUnion = AmbulanceFilter | TaxiFilter;
1431
1653
 
1432
1654
  export type DriveStatus = "driving_to_origin" | "arrived_at_origin" | "driving_to_destination" | "arrived_at_destination" | "completed";
1433
1655
 
1656
+ export type EntityType = "ride" | "rideseries";
1657
+
1434
1658
  export type GeometryUnion = GeoPolygon | GeoMultiPolygon;
1435
1659
 
1436
1660
  export type InsuranceType = "public_insurance" | "private_insurance" | "german_accident_insurance" | "no_or_unknown_insurance";
1437
1661
 
1438
1662
  export type IntegrationType = "dispolive" | "celios";
1439
1663
 
1664
+ export type KChatChannel = "ride_notifications" | "urgent_issues" | "account_tasks" | "customer_issues";
1665
+
1440
1666
  export type Mobility = "wheelchair" | "big_or_electric_wheelchair" | "carry_chair" | "stretcher";
1441
1667
 
1442
- export type OrganisationType = "medical" | "fleet";
1668
+ export type OrganisationType = "medical" | "fleet" | "operator";
1443
1669
 
1444
1670
  export type RidePurpose = "admission" | "relocation" | "discharge" | "consultation";
1445
1671
 
1446
- export type RideSeriesStatus = "booked" | "accepted" | "confirmed" | "cancelled";
1672
+ export type Screen = "marketplace" | "operations_overview" | "hospital_overview" | "fleet_overview" | "ride_details";
1673
+
1674
+ export type SeriesPurpose = "consultation";
1447
1675
 
1448
- export type Service = "pro_medical" | "pro_fleet" | "celios_integration" | "dispolive_integration";
1676
+ export type Service = "pro_medical" | "pro_fleet" | "pro_operator" | "celios_integration" | "dispolive_integration" | "moxi_operations";
1449
1677
 
1450
1678
  export type SlackChannel = "admin_monitoring" | "admin_respond_immediately" | "admin_respond_within_hour" | "admin_reported_issues";
1451
1679
 
1452
- export type StandaloneService = "pro_medical" | "pro_fleet";
1680
+ export type StandaloneService = "pro_medical" | "pro_fleet" | "pro_operator";
1453
1681
 
1454
1682
  export type SyncStatus = "not_synced" | "synced" | "update_not_synced";
1455
1683
 
1456
1684
  export type TeamRole = "dispatcher" | "ridebooker";
1457
1685
 
1458
- export type TrackingUpdateType = "ride" | "rideseries";
1459
-
1460
1686
  export type UserRole = "superadmin";
1461
1687
 
1462
1688
  export type VehicleType = "taxi" | "ambulance";
1689
+
1690
+ export type WebsocketFilterUnion = MarketplaceOverviewFilter | HospitalOverviewFilter | FleetOverviewFilter | OperationsOverviewFilter | DetailsFilter;
1691
+
1692
+ export type WebsocketUpdateType = "single_update" | "multiple_updates";
1693
+
1694
+ export type WebsocketUpdateUnion = WebsocketSingleUpdate | WebsocketMultipleUpdates;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@moxi.gmbh/moxi-typescriptmodels",
3
- "version": "0.1.1121-test-server",
3
+ "version": "0.1.1121",
4
4
  "types": "common.d.ts"
5
5
  }