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

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 +431 -237
  2. package/package.json +1 -1
package/common.d.ts CHANGED
@@ -1,10 +1,41 @@
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
+ maxSize?: number;
30
+ term?: string;
31
+ }
32
+
2
33
  export interface AcceptRide extends RideDriverCommand {
3
34
  driver?: AccountOrTeamRef;
4
35
  }
5
36
 
6
- export interface AcceptRideSeries extends RideDriverSeriesCommand {
7
- dispatcher?: AccountOrTeamRef;
37
+ export interface AcceptRideSeries extends SeriesDriverCommand {
38
+ driver?: AccountOrTeamRef;
8
39
  }
9
40
 
10
41
  export interface AcceptUserAgreement extends UserEdit {
@@ -13,6 +44,10 @@ export interface AcceptUserAgreement extends UserEdit {
13
44
 
14
45
  export interface Account {
15
46
  accountId?: string;
47
+ /**
48
+ * Derived from subscriptions
49
+ */
50
+ activeOrganisationTypes?: OrganisationType[];
16
51
  /**
17
52
  * Derived from subscriptions
18
53
  */
@@ -22,6 +57,12 @@ export interface Account {
22
57
  drivePermissions?: DrivePermission[];
23
58
  info?: AccountInfo;
24
59
  integrationSettings?: any[];
60
+ operateAccounts?: string[];
61
+ operators?: string[];
62
+ /**
63
+ * Derived from subscriptions. Includes organisation types that have not been confirmed yet by a superadmin or are active in past or future.
64
+ */
65
+ organisationTypes?: OrganisationType[];
25
66
  subscriptions?: Subscription[];
26
67
  teams?: Team[];
27
68
  unconfirmedCriticalInfo?: CriticalAccountInfo;
@@ -63,6 +104,10 @@ export interface AccountPermissionCommand extends UserUpdate {
63
104
  accountId?: string;
64
105
  }
65
106
 
107
+ export interface AccountPermissionFilter {
108
+ roles?: AccountRole[];
109
+ }
110
+
66
111
  export interface AccountRef {
67
112
  accountId?: string;
68
113
  name?: string;
@@ -74,14 +119,15 @@ export interface AccountUpcaster {
74
119
  export interface AccountUpdate extends AccountCommand {
75
120
  }
76
121
 
77
- /**
78
- * Address info of a google-validated address, including geolocation and district code
79
- */
122
+ export interface AddOperations extends AccountUpdate {
123
+ operateAccount?: string;
124
+ }
125
+
80
126
  export interface AddressInfo {
81
127
  addition?: string;
82
128
  city?: string;
83
129
  /**
84
- * Derived from districtNutsCode
130
+ * The NUTS country code, derived from districtNutsCode
85
131
  */
86
132
  country?: string;
87
133
  districtNutsCode?: string;
@@ -90,12 +136,12 @@ export interface AddressInfo {
90
136
  number?: string;
91
137
  placeName?: string;
92
138
  /**
93
- * Derived from districtNutsCode
139
+ * The NUTS level 1 code, derived from districtNutsCode
94
140
  */
95
141
  state?: string;
96
142
  street?: string;
97
143
  /**
98
- * Derived from districtNutsCode
144
+ * The NUTS level 2 code, derived from districtNutsCode
99
145
  */
100
146
  subState?: string;
101
147
  zipCode?: string;
@@ -115,31 +161,31 @@ export interface AmbulanceFilter extends DrivePermissionFilter {
115
161
  }
116
162
 
117
163
  /**
118
- * Filled if (and only if) vehicleType == ambulance
164
+ * Mandatory if the vehicleType is ambulance, forbidden if taxi
119
165
  */
120
166
  export interface AmbulanceInfo {
121
167
  /**
122
- * Derived from infectionDescription != blank
168
+ * True if infectionDescription is given
123
169
  */
124
170
  hasInfection?: boolean;
125
171
  infectionDescription?: string;
126
172
  monitoringDescription?: string;
127
173
  oxygenLiterPerHour?: number;
128
174
  /**
129
- * Derived from monitoringDescription != blank
175
+ * True if monitoringDescription is given
130
176
  */
131
177
  requiresMonitoring?: boolean;
132
178
  /**
133
- * Derived from oxygenLiterPerHour != null
179
+ * True if oxygenLiterPerHour is given
134
180
  */
135
181
  requiresOxygen?: boolean;
136
182
  requiresSuctionAspirator?: boolean;
137
183
  }
138
184
 
139
- /**
140
- * Same as RideInfo, except it does not contain an appointment
141
- */
142
- export interface AnonymizedRideInfo extends GenericRideInfo {
185
+ export interface AnonymizedRideInfo extends RideInfo {
186
+ }
187
+
188
+ export interface AnonymizedSeriesRideInfo extends SeriesRideInfo {
143
189
  }
144
190
 
145
191
  export interface Appointment {
@@ -147,7 +193,11 @@ export interface Appointment {
147
193
  time?: string;
148
194
  }
149
195
 
150
- export interface AssignDriver extends RideCommand {
196
+ export interface AssignDriver extends RideOperatorCommand {
197
+ driver?: AccountOrTeamRef;
198
+ }
199
+
200
+ export interface AssignRideSeriesDriver extends SeriesOperatorCommand {
151
201
  driver?: AccountOrTeamRef;
152
202
  }
153
203
 
@@ -169,39 +219,31 @@ export interface AuthenticationResponse {
169
219
  userProfile?: UserProfile;
170
220
  }
171
221
 
172
- export interface AuthenticationService {
173
- }
174
-
175
- export interface BatchUpdateRideSeriesInfo extends RideSeriesPostConfirmCommand {
176
- info?: GenericRideInfo;
177
- updater?: AccountOrTeamRef;
222
+ export interface AuthenticationResponseFactory {
178
223
  }
179
224
 
180
- export interface BatchUpdateRideSeriesTimes extends RideSeriesPostConfirmCommand {
181
- rides?: SingleRideUpdate[];
182
- updater?: AccountOrTeamRef;
225
+ export interface AuthenticationService {
183
226
  }
184
227
 
185
228
  export interface BookRide extends CreateRideCommand {
186
- booker?: AccountOrTeamRef;
187
229
  info?: RideInfo;
188
230
  }
189
231
 
190
- export interface BookRideSeries extends RideBookerSeriesCommand {
191
- booker?: AccountOrTeamRef;
192
- info?: GenericRideInfo;
193
- rides?: SingleRide[];
232
+ export interface BookRideSeries extends CreateSeriesCommand {
233
+ rideSummaries?: RideSummary[];
194
234
  }
195
235
 
196
236
  export interface CancelRide extends RideBookerCommand {
197
237
  reason?: string;
198
238
  }
199
239
 
200
- export interface CancelRideSeries extends RideBookerSeriesCommand {
240
+ export interface CancelRideSeries extends SeriesCommandWithSeparateEvent {
241
+ reason?: string;
201
242
  }
202
243
 
203
- export interface CancelRidesInSeries extends RideSeriesPostConfirmCommand {
204
- updater?: AccountOrTeamRef;
244
+ export interface CancelRideSeriesEvent extends SeriesBookerCommand {
245
+ cancelRides?: string[];
246
+ reason?: string;
205
247
  }
206
248
 
207
249
  export interface CeliosSettings {
@@ -223,6 +265,16 @@ export interface CheckIfUserSignedUp {
223
265
  userId?: string;
224
266
  }
225
267
 
268
+ /**
269
+ * 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.
270
+ */
271
+ export interface CleaningAndSlack {
272
+ cleaningAtGarage?: boolean;
273
+ cleaningDuration?: number;
274
+ dropoffDuration?: number;
275
+ pickupDuration?: number;
276
+ }
277
+
226
278
  export interface ConfirmAccount extends AccountCommand {
227
279
  }
228
280
 
@@ -233,9 +285,6 @@ export interface ConfirmDrivePermission extends AccountUpdate {
233
285
  export interface ConfirmEverythingInAccount extends AccountCommand {
234
286
  }
235
287
 
236
- export interface ConfirmRideSeries extends RideDriverSeriesCommand {
237
- }
238
-
239
288
  export interface ConfirmSubscription extends AccountUpdate {
240
289
  subscriptionId?: string;
241
290
  }
@@ -264,15 +313,12 @@ export interface CreateOptimizationPlan extends OptimizerMessage {
264
313
  }
265
314
 
266
315
  export interface CreateRideCommand extends RideBookerCommand {
267
- booker?: AccountOrTeamId;
316
+ booker?: AccountOrTeamRef;
268
317
  }
269
318
 
270
- export interface CreateRideFromSeries extends RideDriverCommand {
319
+ export interface CreateSeriesCommand extends SeriesBookerCommand {
271
320
  booker?: AccountOrTeamRef;
272
- driver?: AccountOrTeamRef;
273
- info?: RideInfo;
274
- returnTrip?: boolean;
275
- rideSeriesId?: string;
321
+ info?: SeriesRideInfo;
276
322
  }
277
323
 
278
324
  export interface CreateSqueezeInPlan extends OptimizerMessage {
@@ -418,44 +464,25 @@ export interface FindAccounts {
418
464
  term?: string;
419
465
  }
420
466
 
421
- export interface FindMyAcceptedRides {
467
+ export interface FindDuplicateRides {
422
468
  accountId?: string;
423
- descending?: boolean;
424
- filter?: RideFilter;
425
- maxSize?: number;
426
- term?: string;
469
+ appointmentTime?: string;
470
+ patientBirthDay?: string;
471
+ patientFirstName?: string;
472
+ patientLastName?: string;
427
473
  }
428
474
 
429
- /**
430
- * @deprecated
431
- */
432
- export interface FindMyRideOffers {
433
- accountId?: string;
434
- descending?: boolean;
435
- filter?: RideFilter;
436
- maxSize?: number;
437
- term?: string;
475
+ export interface FindMyRides extends AbstractFindMyRides {
438
476
  }
439
477
 
440
- export interface FindMyRideSeries {
441
- accountId?: string;
442
- descending?: boolean;
443
- filter?: RideFilter;
444
- maxSize?: number;
445
- term?: string;
478
+ export interface FindMyRidesAndSeries extends AbstractFindMyRides {
446
479
  }
447
480
 
448
- export interface FindMyRides {
449
- accountId?: string;
450
- descending?: boolean;
451
- filter?: RideFilter;
452
- maxSize?: number;
453
- term?: string;
481
+ export interface FindMySeries extends AbstractFindMyRides {
454
482
  }
455
483
 
456
484
  export interface FindMyTokens {
457
485
  accountId?: string;
458
- teamId?: string;
459
486
  term?: string;
460
487
  }
461
488
 
@@ -465,27 +492,27 @@ export interface FindMyUsers {
465
492
  term?: string;
466
493
  }
467
494
 
468
- export interface FindPotentialRideSeries {
469
- accountId?: string;
470
- descending?: boolean;
471
- filter?: RideInfoFilter;
472
- maxSize?: number;
473
- timeRange?: InstantRange;
495
+ export interface FindRides extends AbstractFindRides {
474
496
  }
475
497
 
476
- export interface FindPotentialRides {
477
- accountId?: string;
478
- descending?: boolean;
479
- filter?: RideFilter;
480
- maxSize?: number;
481
- term?: string;
498
+ export interface FindRidesAndSeries extends AbstractFindRides {
482
499
  }
483
500
 
484
- export interface FindRides {
485
- descending?: boolean;
486
- filter?: RideFilter;
487
- maxSize?: number;
488
- term?: string;
501
+ export interface FindRidesAndSeriesForDriver extends AbstractFindRidesForDriver {
502
+ }
503
+
504
+ export interface FindRidesAndSeriesInMarketplace extends AbstractFindRidesInMarketplace {
505
+ }
506
+
507
+ export interface FindRidesAndSeriesResult {
508
+ ridesAndSeries?: RideOrMinimizedSeries[];
509
+ ridesCount?: RideFilterCount;
510
+ }
511
+
512
+ export interface FindRidesForDriver extends AbstractFindRidesForDriver {
513
+ }
514
+
515
+ export interface FindRidesInMarketplace extends AbstractFindRidesInMarketplace {
489
516
  }
490
517
 
491
518
  export interface FindRidesResult {
@@ -493,23 +520,42 @@ export interface FindRidesResult {
493
520
  rides?: Ride[];
494
521
  }
495
522
 
523
+ export interface FindSeries extends AbstractFindRides {
524
+ }
525
+
526
+ export interface FindSeriesForDriver extends AbstractFindRidesForDriver {
527
+ }
528
+
529
+ export interface FindSeriesInMarketplace extends AbstractFindRidesInMarketplace {
530
+ }
531
+
496
532
  export interface FindTokens {
497
533
  term?: string;
498
534
  }
499
535
 
500
536
  export interface FindUsers {
537
+ accountFilter?: AccountFilter;
538
+ accountPermissionFilter?: AccountPermissionFilter;
501
539
  term?: string;
502
540
  }
503
541
 
542
+ export interface FirebaseMessage {
543
+ data?: { [index: string]: string };
544
+ notification?: Notification;
545
+ topic?: string;
546
+ }
547
+
504
548
  export interface GenerateToken {
505
549
  accountPermission?: AccountPermission;
506
550
  info?: TokenInfo;
507
551
  tokenId?: string;
508
552
  }
509
553
 
510
- /**
511
- * Same as RideInfo, except it does not contain an appointment
512
- */
554
+ export interface GenerateTokenResult {
555
+ entity?: Token;
556
+ jwt?: string;
557
+ }
558
+
513
559
  export interface GenericRideInfo {
514
560
  ambulanceInfo?: AmbulanceInfo;
515
561
  attendantsPresent?: number;
@@ -525,7 +571,6 @@ export interface GenericRideInfo {
525
571
  patient?: Person;
526
572
  plannedDuration?: RideDuration;
527
573
  preferredDriver?: string;
528
- purpose?: RidePurpose;
529
574
  to?: AddressInfo;
530
575
  vehicleType?: VehicleType;
531
576
  weightInKg?: number;
@@ -561,10 +606,16 @@ export interface GetAccount {
561
606
  accountId?: string;
562
607
  }
563
608
 
564
- export interface GetAccountsOfPotentialDrivers extends GetPotentialDrivers {
609
+ /**
610
+ * @deprecated
611
+ */
612
+ export interface GetAccountsOfPotentialDrivers extends IGetPotentialDrivers {
565
613
  }
566
614
 
567
- export interface GetAccountsOfPotentialDriversAsAdmin extends GetPotentialDrivers {
615
+ /**
616
+ * @deprecated
617
+ */
618
+ export interface GetAccountsOfPotentialDriversAsAdmin extends IGetPotentialDrivers {
568
619
  }
569
620
 
570
621
  export interface GetDistrict {
@@ -587,32 +638,17 @@ export interface GetIsoStates {
587
638
  export interface GetMonopolyAccounts {
588
639
  }
589
640
 
590
- export interface GetMyAcceptedRides {
591
- accountId?: string;
592
- maxSize?: number;
593
- timeRange?: InstantRange;
594
- }
595
-
596
641
  export interface GetMyAccounts {
597
642
  filter?: AccountFilter;
598
643
  }
599
644
 
600
- /**
601
- * @deprecated
602
- */
603
- export interface GetMyRideOffers {
604
- accountId?: string;
605
- maxSize?: number;
606
- timeRange?: InstantRange;
607
- }
608
-
609
- export interface GetMyRideSeries {
645
+ export interface GetMyRides {
610
646
  accountId?: string;
611
647
  maxSize?: number;
612
648
  timeRange?: InstantRange;
613
649
  }
614
650
 
615
- export interface GetMyRides {
651
+ export interface GetMySeries {
616
652
  accountId?: string;
617
653
  maxSize?: number;
618
654
  timeRange?: InstantRange;
@@ -627,20 +663,27 @@ export interface GetMyUserProfile {
627
663
  export interface GetNutsStates {
628
664
  }
629
665
 
630
- export interface GetPotentialDrivers {
666
+ export interface GetOneSeries {
667
+ rideSeriesId?: string;
668
+ }
669
+
670
+ export interface GetPotentialDriverIds extends GetPotentialDriversAbstract {
671
+ }
672
+
673
+ /**
674
+ * Common information shared across all rides in a series. Similar to RideInfo but without appointment-specific details that vary per ride.
675
+
676
+ */
677
+ export interface GetPotentialDrivers extends GetPotentialDriversAbstract {
678
+ }
679
+
680
+ export interface GetPotentialDriversAbstract {
631
681
  fromDistrict?: string;
632
682
  mobility?: Mobility;
633
- toDistrict?: string;
634
683
  vehicleType?: VehicleType;
635
684
  weightInKg?: number;
636
685
  }
637
686
 
638
- export interface GetPotentialRides {
639
- accountId?: string;
640
- maxSize?: number;
641
- timeRange?: InstantRange;
642
- }
643
-
644
687
  export interface GetRide {
645
688
  rideId?: string;
646
689
  }
@@ -660,12 +703,38 @@ export interface GetRideLog {
660
703
  rideId?: string;
661
704
  }
662
705
 
663
- export interface GetRideSeries {
664
- rideSeriesId?: string;
706
+ export interface GetRideOrSeries {
707
+ id?: string;
708
+ }
709
+
710
+ export interface GetRidesForDriver {
711
+ accountId?: string;
712
+ maxSize?: number;
713
+ timeRange?: InstantRange;
714
+ }
715
+
716
+ export interface GetRidesInMarketplace {
717
+ accountId?: string;
718
+ maxSize?: number;
719
+ timeRange?: InstantRange;
665
720
  }
666
721
 
667
722
  export interface GetRidesInSeries {
668
- filter?: RideFilter;
723
+ rideSeriesId?: string;
724
+ }
725
+
726
+ export interface GetSeriesForDriver {
727
+ accountId?: string;
728
+ maxSize?: number;
729
+ timeRange?: InstantRange;
730
+ }
731
+
732
+ export interface GetSeriesInMarketplace {
733
+ accountId?: string;
734
+ maxSize?: number;
735
+ }
736
+
737
+ export interface GetSeriesLog {
669
738
  rideSeriesId?: string;
670
739
  }
671
740
 
@@ -695,6 +764,18 @@ export interface GiveTeamPermission extends AccountPermissionCommand {
695
764
  teamPermission?: TeamPermission;
696
765
  }
697
766
 
767
+ export interface HalfHourBeforeStart {
768
+ rideId?: string;
769
+ }
770
+
771
+ export interface IGetPotentialDrivers {
772
+ fromDistrict?: string;
773
+ mobility?: Mobility;
774
+ toDistrict?: string;
775
+ vehicleType?: VehicleType;
776
+ weightInKg?: number;
777
+ }
778
+
698
779
  export interface ImpersonateUser {
699
780
  userId?: string;
700
781
  }
@@ -745,6 +826,18 @@ export interface Metric {
745
826
  updates?: string[];
746
827
  }
747
828
 
829
+ /**
830
+ * A series of rides.
831
+ */
832
+ export interface MinimizedRideSeries extends RideSeries, RideOrMinimizedSeries {
833
+ info?: SeriesRideInfo;
834
+ }
835
+
836
+ export interface Notification {
837
+ body?: string;
838
+ title?: string;
839
+ }
840
+
748
841
  export interface NutsDistrict {
749
842
  code?: string;
750
843
  name?: string;
@@ -767,6 +860,10 @@ export interface OffsetTimeRange {
767
860
  start?: Date;
768
861
  }
769
862
 
863
+ export interface OneHourAfterEnd {
864
+ rideId?: string;
865
+ }
866
+
770
867
  export interface OptimizerMessage {
771
868
  }
772
869
 
@@ -783,7 +880,7 @@ export interface Person {
783
880
  }
784
881
 
785
882
  /**
786
- * Filled if (and only if) patient exceeds 130 kg
883
+ * Mandatory if weight exceeds 130 kg, otherwise forbidden
787
884
  */
788
885
  export interface PersonDimensions {
789
886
  heightInCm?: number;
@@ -803,7 +900,7 @@ export interface ReadUpdates {
803
900
  maxSize?: number;
804
901
  maxTimeout?: number;
805
902
  tokenId?: string;
806
- updateTypes?: TrackingUpdateType[];
903
+ updateTypes?: EntityType[];
807
904
  }
808
905
 
809
906
  export interface ReadUpdatesResult {
@@ -812,6 +909,24 @@ export interface ReadUpdatesResult {
812
909
  updates?: any[];
813
910
  }
814
911
 
912
+ export interface RefreshTokenData {
913
+ expiresAt?: string;
914
+ hashedToken?: string;
915
+ userId?: string;
916
+ }
917
+
918
+ export interface RefreshTokenService {
919
+ }
920
+
921
+ export interface RefreshUserToken {
922
+ refreshToken?: string;
923
+ }
924
+
925
+ export interface RefreshableAuthenticationResponse extends AuthenticationResponse {
926
+ refreshToken?: string;
927
+ refreshTokenDeadline?: string;
928
+ }
929
+
815
930
  export interface Region {
816
931
  nutsCode?: string;
817
932
  }
@@ -835,6 +950,14 @@ export interface RegisterEinsatz {
835
950
  export interface RemoveAccount extends AccountUpdate {
836
951
  }
837
952
 
953
+ export interface RemoveOperations extends AccountUpdate {
954
+ operateAccount?: string;
955
+ }
956
+
957
+ export interface RemoveOperator extends AccountUpdate {
958
+ operator?: string;
959
+ }
960
+
838
961
  export interface RemoveSettings extends AccountUpdate {
839
962
  type?: IntegrationType;
840
963
  }
@@ -884,7 +1007,7 @@ export interface ResetPosition {
884
1007
  export interface ReturnRide extends RideDriverModifyCommand {
885
1008
  }
886
1009
 
887
- export interface ReturnRideSeries extends RideDriverSeriesCommand {
1010
+ export interface ReturnRideSeries extends SeriesDriverCommand {
888
1011
  }
889
1012
 
890
1013
  export interface Review {
@@ -907,6 +1030,9 @@ export interface RevokeDrivePermission extends AccountUpdate {
907
1030
  drivePermissionId?: string;
908
1031
  }
909
1032
 
1033
+ export interface RevokeSecondaryTokenPermission extends SecondaryTokenPermissionCommand {
1034
+ }
1035
+
910
1036
  export interface RevokeSubscription extends AccountUpdate {
911
1037
  subscriptionId?: string;
912
1038
  }
@@ -914,76 +1040,78 @@ export interface RevokeSubscription extends AccountUpdate {
914
1040
  export interface RevokeToken extends TokenUpdate {
915
1041
  }
916
1042
 
917
- export interface Ride {
1043
+ export interface RevokeUserRefreshTokens {
1044
+ userId?: string;
1045
+ }
1046
+
1047
+ export interface Ride extends RideOrSeries, RideOrMinimizedSeries {
918
1048
  /**
919
- * Derived from driver != null
1049
+ * 'accepted' is true if a driver has accepted the ride.
920
1050
  */
921
1051
  accepted?: boolean;
1052
+ acceptedTime?: string;
922
1053
  actualEndTime?: string;
923
1054
  actualStartTime?: string;
924
1055
  /**
925
- * Derived from driveStatus != null
1056
+ * 'arrived' is true if the driver has reported driveStatus is 'arrived_at_origin'.
926
1057
  */
927
1058
  arrived?: boolean;
928
1059
  /**
929
- * Derived from bookedTime != null
1060
+ * 'booked' is false if the ride has only been saved.
930
1061
  */
931
1062
  booked?: boolean;
932
- bookedTime?: string;
933
1063
  booker?: AccountOrTeamRef;
934
1064
  bookerReview?: Review;
935
- bookingStatus?: BookingStatus;
936
1065
  cancelReason?: string;
937
1066
  cancelled?: boolean;
938
1067
  /**
939
- * Derived from driveStatus == completed
1068
+ * 'completed' is true if the driver has reported driveStatus is 'completed'.
940
1069
  */
941
1070
  completed?: boolean;
942
1071
  /**
943
- * Desired Time of Arrival at the Destination/Drop-off location. Derived from info.appointment and info.plannedDuration
1072
+ * 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.
944
1073
  */
945
1074
  desiredEndTime?: string;
946
1075
  /**
947
- * Desired Time of Arrival at the Origin/Pick-up location. Derived from info.appointment and info.plannedDuration
1076
+ * 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.
948
1077
  */
949
1078
  desiredStartTime?: string;
950
- /**
951
- * Display time is the planned time, or else the desired time
952
- */
953
- displayEndTime?: string;
954
- /**
955
- * Display time is the planned time, or else the desired time
956
- */
957
- displayStartTime?: string;
958
1079
  driveStatus?: DriveStatus;
959
- driver?: AccountOrTeamRef;
960
1080
  driverReview?: Review;
961
1081
  driverSyncStatus?: SyncStatus;
962
1082
  endTimeDelay?: number;
963
1083
  /**
964
- * Expected Time of Arrival at the Destination/Drop-off location.
1084
+ * The driver determines the expectedEndTime when indicating delays. It means the expected time of arrival at the 'to' or 'drop-off' location.
965
1085
  */
966
1086
  expectedEndTime?: string;
967
1087
  /**
968
- * Expected Time of Arrival at the Origin/Pick-up location.
1088
+ * The driver determines the expectedEndTime when indicating delays. It means the expected time of arrival at the 'from' or 'pick-up' location.
969
1089
  */
970
1090
  expectedStartTime?: string;
971
1091
  info?: RideInfo;
1092
+ marketplaceTime?: string;
972
1093
  /**
973
- * Derived from plannedStartTime != null
1094
+ * 'planned' is true if the driver has reported a planned time for the ride.
974
1095
  */
975
1096
  planned?: boolean;
976
1097
  /**
977
- * Planned Time of Arrival at the Destination/Drop-off location, reported by the driver.
1098
+ * The driver determines the plannedEndTime. It means the planned time of arrival at the 'to' or 'drop-off' location.
978
1099
  */
979
1100
  plannedEndTime?: string;
980
1101
  plannedStartTime?: string;
981
- returnTrip?: boolean;
982
1102
  rideId?: string;
983
- rideSeriesId?: string;
1103
+ /**
1104
+ * searchEndTime is the time until which rides can be found in our system. It's the planned time, or else the desired time.
1105
+ */
1106
+ searchEndTime?: string;
1107
+ /**
1108
+ * searchStartTime is the time from which rides can be found in our system. It's the planned time, or else the desired time.
1109
+ */
1110
+ searchStartTime?: string;
1111
+ seriesInfo?: SeriesInfo;
984
1112
  startTimeDelay?: number;
985
1113
  /**
986
- * Derived from driveStatus != null
1114
+ * 'started' is true if the driver has reported a driveStatus.
987
1115
  */
988
1116
  started?: boolean;
989
1117
  }
@@ -991,9 +1119,6 @@ export interface Ride {
991
1119
  export interface RideBookerCommand extends RideCommand {
992
1120
  }
993
1121
 
994
- export interface RideBookerSeriesCommand extends RideSeriesCommand {
995
- }
996
-
997
1122
  export interface RideCommand {
998
1123
  rideId?: string;
999
1124
  }
@@ -1004,16 +1129,19 @@ export interface RideDriverCommand extends RideCommand {
1004
1129
  export interface RideDriverModifyCommand extends RideDriverCommand {
1005
1130
  }
1006
1131
 
1007
- export interface RideDriverSeriesCommand extends RideSeriesPreConfirmCommand {
1008
- }
1009
-
1010
- /**
1011
- * All durations in seconds
1012
- */
1013
1132
  export interface RideDuration {
1014
1133
  driving?: number;
1134
+ /**
1135
+ * Seconds of slack for dropping off the patient, currently hardcoded to 15 minutes
1136
+ */
1015
1137
  droppingOff?: number;
1138
+ /**
1139
+ * Seconds of slack for picking up the patient, currently hardcoded to 15 minutes
1140
+ */
1016
1141
  pickingUp?: number;
1142
+ /**
1143
+ * Seconds of driving time plus the pick-up and drop-off slack times
1144
+ */
1017
1145
  total?: number;
1018
1146
  }
1019
1147
 
@@ -1022,6 +1150,7 @@ export interface RideFilter {
1022
1150
  driveStatuses?: DriveStatus[];
1023
1151
  driverAccountNames?: string[];
1024
1152
  driverTeamNames?: string[];
1153
+ entityType?: EntityType;
1025
1154
  hasInfection?: boolean;
1026
1155
  heavyWeight?: boolean;
1027
1156
  mobilities?: Mobility[];
@@ -1033,6 +1162,7 @@ export interface RideFilter {
1033
1162
  riderAccountNames?: string[];
1034
1163
  riderTeamNames?: string[];
1035
1164
  timeRange?: InstantRange;
1165
+ unfoldRideSeries?: boolean;
1036
1166
  vehicleType?: VehicleType;
1037
1167
  }
1038
1168
 
@@ -1058,41 +1188,9 @@ export interface RideIdResult {
1058
1188
  rideId?: string;
1059
1189
  }
1060
1190
 
1061
- /**
1062
- * Information about the ride, from the creator of the ride
1063
- */
1064
- export interface RideInfo {
1065
- ambulanceInfo?: AmbulanceInfo;
1191
+ export interface RideInfo extends GenericRideInfo {
1066
1192
  appointment?: Appointment;
1067
- attendantsPresent?: number;
1068
- comment?: string;
1069
- dimensions?: PersonDimensions;
1070
- distanceInMeters?: number;
1071
- from?: AddressInfo;
1072
- /**
1073
- * Derived from weightInKg != null
1074
- */
1075
- heavyWeight?: boolean;
1076
- mobility?: Mobility;
1077
- patient?: Person;
1078
- plannedDuration?: RideDuration;
1079
- preferredDriver?: string;
1080
1193
  purpose?: RidePurpose;
1081
- to?: AddressInfo;
1082
- vehicleType?: VehicleType;
1083
- weightInKg?: number;
1084
- }
1085
-
1086
- export interface RideInfoFilter {
1087
- hasInfection?: boolean;
1088
- heavyWeight?: boolean;
1089
- mobilities?: Mobility[];
1090
- purposes?: RidePurpose[];
1091
- region?: Region;
1092
- requiresMonitoring?: boolean;
1093
- requiresOxygen?: boolean;
1094
- requiresSuctionAspirator?: boolean;
1095
- vehicleType?: VehicleType;
1096
1194
  }
1097
1195
 
1098
1196
  export interface RideLog {
@@ -1111,39 +1209,60 @@ export interface RideLog {
1111
1209
  token?: boolean;
1112
1210
  }
1113
1211
 
1114
- export interface RideOfferInfo {
1115
- appointment?: Appointment;
1212
+ export interface RideOperatorCommand extends RideCommand {
1116
1213
  }
1117
1214
 
1118
- export interface RideSeries {
1119
- accepted?: boolean;
1120
- booked?: boolean;
1121
- booker?: AccountOrTeamRef;
1122
- cancelled?: boolean;
1123
- confirmed?: boolean;
1124
- driver?: AccountOrTeamRef;
1125
- endTime?: string;
1215
+ export interface RideOrMinimizedSeries {
1216
+ bookingStatus?: BookingStatus;
1217
+ entityType?: EntityType;
1126
1218
  info?: GenericRideInfo;
1127
- rideSeriesId?: string;
1128
- rides?: SingleRide[];
1129
- startTime?: string;
1130
- status?: RideSeriesStatus;
1131
1219
  }
1132
1220
 
1133
- export interface RideSeriesCommand {
1134
- rideSeriesId?: string;
1221
+ export interface RideOrSeries {
1222
+ bookedTime?: string;
1223
+ bookingStatus?: BookingStatus;
1224
+ cleaningAndSlack?: CleaningAndSlack;
1225
+ driver?: AccountOrTeamRef;
1226
+ entityType?: EntityType;
1227
+ info?: GenericRideInfo;
1228
+ totalDuration?: number;
1135
1229
  }
1136
1230
 
1137
- export interface RideSeriesIdResult {
1231
+ /**
1232
+ * A series of rides.
1233
+ */
1234
+ export interface RideSeries extends RideOrSeries {
1235
+ /**
1236
+ * 'accepted' is true if a driver has accepted the series.
1237
+ */
1238
+ accepted?: boolean;
1239
+ /**
1240
+ * The number of rides in the series that are not cancelled.
1241
+ */
1242
+ activeRideCount?: number;
1243
+ /**
1244
+ * 'booked' is false if the series has only been saved.
1245
+ */
1246
+ booked?: boolean;
1247
+ booker?: AccountOrTeamRef;
1248
+ cancelReason?: string;
1249
+ cancelled?: boolean;
1250
+ info?: SeriesRideInfo;
1138
1251
  rideSeriesId?: string;
1252
+ rides?: Ride[];
1253
+ ridesSummaries?: RideSummary[];
1254
+ /**
1255
+ * searchEndTime is the time from which series can be found in our system. It's the searchEndTime of the last ride in the series.
1256
+ */
1257
+ searchEndTime?: string;
1258
+ /**
1259
+ * searchStartTime is the time from which series can be found in our system. It's the searchStartTime of the first ride in the series.
1260
+ */
1261
+ searchStartTime?: string;
1139
1262
  }
1140
1263
 
1141
- export interface RideSeriesPostConfirmCommand {
1264
+ export interface RideSeriesIdResult {
1142
1265
  rideSeriesId?: string;
1143
- ridesToModify?: Ride[];
1144
- }
1145
-
1146
- export interface RideSeriesPreConfirmCommand extends RideSeriesCommand {
1147
1266
  }
1148
1267
 
1149
1268
  export interface RideSeriesUpdate {
@@ -1156,12 +1275,23 @@ export interface RideSeriesUpdate {
1156
1275
  type: "rideseries";
1157
1276
  }
1158
1277
 
1278
+ export interface RideSeriesUtils {
1279
+ }
1280
+
1159
1281
  export interface RideStatisticsQuery {
1160
1282
  dateRange?: DateRange;
1161
- timezoneOrDefault?: string;
1162
1283
  zoneId?: string;
1163
1284
  }
1164
1285
 
1286
+ /**
1287
+ * Individual ride timing within a series. Once a ride series is accepted, you cannot add rides, only remove
1288
+ */
1289
+ export interface RideSummary {
1290
+ appointmentTime?: string;
1291
+ returnTrip?: boolean;
1292
+ rideId?: string;
1293
+ }
1294
+
1165
1295
  export interface RideSystemCommand extends RideCommand {
1166
1296
  }
1167
1297
 
@@ -1178,17 +1308,24 @@ export interface RideUpdate {
1178
1308
  type: "ride";
1179
1309
  }
1180
1310
 
1181
- export interface Role<T> {
1311
+ export interface Role {
1182
1312
  }
1183
1313
 
1184
1314
  /**
1185
1315
  * Save a new ride or update a previously saved ride. Not allowed to saveRide after the ride has been booked.
1186
1316
  */
1187
1317
  export interface SaveRide extends CreateRideCommand {
1188
- booker?: AccountOrTeamRef;
1189
1318
  info?: RideInfo;
1190
1319
  }
1191
1320
 
1321
+ export interface SaveRideSeries extends CreateSeriesCommand {
1322
+ rideSummaries?: RideSummary[];
1323
+ }
1324
+
1325
+ export interface SecondaryTokenPermissionCommand extends TokenUpdate {
1326
+ accountId?: string;
1327
+ }
1328
+
1192
1329
  export interface SendConfirmationEmail {
1193
1330
  userId?: string;
1194
1331
  }
@@ -1200,6 +1337,7 @@ export interface SendEmail {
1200
1337
  export interface SendFreshdeskNewTicket {
1201
1338
  email?: string;
1202
1339
  message?: string;
1340
+ subject?: string;
1203
1341
  }
1204
1342
 
1205
1343
  export interface SendInvitationEmail {
@@ -1207,11 +1345,64 @@ export interface SendInvitationEmail {
1207
1345
  userId?: string;
1208
1346
  }
1209
1347
 
1348
+ export interface SendKChat {
1349
+ channel?: KChatChannel;
1350
+ message?: string;
1351
+ }
1352
+
1210
1353
  export interface SendSlack {
1211
1354
  channel?: SlackChannel;
1212
1355
  message?: string;
1213
1356
  }
1214
1357
 
1358
+ export interface SendToFirebase {
1359
+ message?: FirebaseMessage;
1360
+ }
1361
+
1362
+ export interface SeriesBookerCommand extends SeriesCommand {
1363
+ }
1364
+
1365
+ export interface SeriesCommand {
1366
+ rideSeriesId?: string;
1367
+ }
1368
+
1369
+ export interface SeriesCommandWithSeparateEvent {
1370
+ rideSeriesId?: string;
1371
+ }
1372
+
1373
+ export interface SeriesDriverCommand extends SeriesCommand {
1374
+ }
1375
+
1376
+ /**
1377
+ * If the ride is part of a series, seriesInfo will contain context about the position of the ride within the series.
1378
+ */
1379
+ export interface SeriesInfo {
1380
+ desyncedFromSeries?: boolean;
1381
+ positionInSeries?: number;
1382
+ returnTrip?: boolean;
1383
+ rideSeriesId?: string;
1384
+ totalRidesInSeries?: number;
1385
+ }
1386
+
1387
+ export interface SeriesOperatorCommand extends SeriesCommand {
1388
+ }
1389
+
1390
+ export interface SeriesRideInfo extends GenericRideInfo {
1391
+ purpose?: SeriesPurpose;
1392
+ }
1393
+
1394
+ export interface SetOperations extends AccountUpdate {
1395
+ operateAccounts?: string[];
1396
+ }
1397
+
1398
+ export interface SetOperator extends AccountUpdate {
1399
+ operator?: string;
1400
+ }
1401
+
1402
+ export interface SetSecondaryTokenPermission extends SecondaryTokenPermissionCommand {
1403
+ accountPermission?: AccountPermission;
1404
+ }
1405
+
1215
1406
  export interface SetSettings extends AccountUpdate {
1216
1407
  settings?: any;
1217
1408
  }
@@ -1239,16 +1430,6 @@ export interface SignUpUser {
1239
1430
  userId?: string;
1240
1431
  }
1241
1432
 
1242
- export interface SingleRide {
1243
- desiredStartTime?: string;
1244
- returnTrip?: boolean;
1245
- }
1246
-
1247
- export interface SingleRideUpdate {
1248
- desiredStartTime?: string;
1249
- rideId?: string;
1250
- }
1251
-
1252
1433
  export interface StopImpersonatingUser {
1253
1434
  }
1254
1435
 
@@ -1298,10 +1479,11 @@ export interface TimedPermission {
1298
1479
  }
1299
1480
 
1300
1481
  export interface Token {
1301
- accountPermission?: AccountPermission;
1482
+ accountPermissions?: AccountPermission[];
1302
1483
  createdBy?: string;
1303
1484
  info?: TokenInfo;
1304
1485
  lastUpdatedBy?: string;
1486
+ owner?: string;
1305
1487
  revoked?: boolean;
1306
1488
  tokenId?: string;
1307
1489
  }
@@ -1344,9 +1526,19 @@ export interface UpdateRidePlan extends RideDriverModifyCommand {
1344
1526
  plannedStartTime?: string;
1345
1527
  }
1346
1528
 
1347
- export interface UpdateRideSeries extends RideBookerSeriesCommand {
1348
- info?: GenericRideInfo;
1349
- rides?: SingleRide[];
1529
+ export interface UpdateRideSeries extends SeriesCommandWithSeparateEvent {
1530
+ booker?: AccountOrTeamRef;
1531
+ info?: SeriesRideInfo;
1532
+ rideSummaries?: RideSummary[];
1533
+ }
1534
+
1535
+ export interface UpdateRideSeriesEvent extends SeriesBookerCommand {
1536
+ addRides?: string[];
1537
+ booker?: AccountOrTeamRef;
1538
+ cancelRides?: string[];
1539
+ info?: SeriesRideInfo;
1540
+ rideSummaries?: RideSummary[];
1541
+ updateRides?: string[];
1350
1542
  }
1351
1543
 
1352
1544
  export interface UpdateTeam extends TeamUpdate {
@@ -1405,7 +1597,7 @@ export interface ZonedTimeRange {
1405
1597
  start?: Date;
1406
1598
  }
1407
1599
 
1408
- export type AccountRole = "ridebooker" | "dispatcher" | "admin" | "owner";
1600
+ export type AccountRole = "ridebooker" | "dispatcher" | "operator" | "admin" | "owner";
1409
1601
 
1410
1602
  export type AuthenticationResult = "SUCCESS" | "NOT_CONFIRMED";
1411
1603
 
@@ -1415,32 +1607,34 @@ export type DrivePermissionFilterUnion = AmbulanceFilter | TaxiFilter;
1415
1607
 
1416
1608
  export type DriveStatus = "driving_to_origin" | "arrived_at_origin" | "driving_to_destination" | "arrived_at_destination" | "completed";
1417
1609
 
1610
+ export type EntityType = "ride" | "rideseries";
1611
+
1418
1612
  export type GeometryUnion = GeoPolygon | GeoMultiPolygon;
1419
1613
 
1420
1614
  export type InsuranceType = "public_insurance" | "private_insurance" | "german_accident_insurance" | "no_or_unknown_insurance";
1421
1615
 
1422
1616
  export type IntegrationType = "dispolive" | "celios";
1423
1617
 
1618
+ export type KChatChannel = "ride_notifications" | "urgent_issues" | "account_tasks" | "customer_issues";
1619
+
1424
1620
  export type Mobility = "wheelchair" | "big_or_electric_wheelchair" | "carry_chair" | "stretcher";
1425
1621
 
1426
- export type OrganisationType = "medical" | "fleet";
1622
+ export type OrganisationType = "medical" | "fleet" | "operator";
1427
1623
 
1428
1624
  export type RidePurpose = "admission" | "relocation" | "discharge" | "consultation";
1429
1625
 
1430
- export type RideSeriesStatus = "booked" | "accepted" | "confirmed" | "cancelled";
1626
+ export type SeriesPurpose = "consultation";
1431
1627
 
1432
- export type Service = "pro_medical" | "pro_fleet" | "celios_integration" | "dispolive_integration";
1628
+ export type Service = "pro_medical" | "pro_fleet" | "pro_operator" | "celios_integration" | "dispolive_integration" | "moxi_operations";
1433
1629
 
1434
1630
  export type SlackChannel = "admin_monitoring" | "admin_respond_immediately" | "admin_respond_within_hour" | "admin_reported_issues";
1435
1631
 
1436
- export type StandaloneService = "pro_medical" | "pro_fleet";
1632
+ export type StandaloneService = "pro_medical" | "pro_fleet" | "pro_operator";
1437
1633
 
1438
1634
  export type SyncStatus = "not_synced" | "synced" | "update_not_synced";
1439
1635
 
1440
1636
  export type TeamRole = "dispatcher" | "ridebooker";
1441
1637
 
1442
- export type TrackingUpdateType = "ride" | "rideseries";
1443
-
1444
1638
  export type UserRole = "superadmin";
1445
1639
 
1446
1640
  export type VehicleType = "taxi" | "ambulance";
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@moxi.gmbh/moxi-typescriptmodels",
3
- "version": "0.1.1091-test-server",
3
+ "version": "0.1.1091",
4
4
  "types": "common.d.ts"
5
5
  }