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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/common.d.ts CHANGED
@@ -1,6 +1,41 @@
1
1
 
2
- export interface AcceptDrive extends FleetCommand {
3
- driveOwner?: AccountOrTeamRef;
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
+
33
+ export interface AcceptRide extends RideDriverCommand {
34
+ driver?: AccountOrTeamRef;
35
+ }
36
+
37
+ export interface AcceptRideSeries extends SeriesDriverCommand {
38
+ driver?: AccountOrTeamRef;
4
39
  }
5
40
 
6
41
  export interface AcceptUserAgreement extends UserEdit {
@@ -9,6 +44,10 @@ export interface AcceptUserAgreement extends UserEdit {
9
44
 
10
45
  export interface Account {
11
46
  accountId?: string;
47
+ /**
48
+ * Derived from subscriptions
49
+ */
50
+ activeOrganisationTypes?: OrganisationType[];
12
51
  /**
13
52
  * Derived from subscriptions
14
53
  */
@@ -18,6 +57,12 @@ export interface Account {
18
57
  drivePermissions?: DrivePermission[];
19
58
  info?: AccountInfo;
20
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[];
21
66
  subscriptions?: Subscription[];
22
67
  teams?: Team[];
23
68
  unconfirmedCriticalInfo?: CriticalAccountInfo;
@@ -36,7 +81,7 @@ export interface AccountInfo {
36
81
  defaultLanguage?: string;
37
82
  notificationEmails?: string[];
38
83
  phoneNumber?: PhoneNumber;
39
- zoneId?: ZoneId;
84
+ zoneId?: string;
40
85
  }
41
86
 
42
87
  export interface AccountOrTeamId {
@@ -64,9 +109,16 @@ export interface AccountRef {
64
109
  name?: string;
65
110
  }
66
111
 
112
+ export interface AccountUpcaster {
113
+ }
114
+
67
115
  export interface AccountUpdate extends AccountCommand {
68
116
  }
69
117
 
118
+ export interface AddOperations extends AccountUpdate {
119
+ operateAccount?: string;
120
+ }
121
+
70
122
  /**
71
123
  * Address info of a google-validated address, including geolocation and district code
72
124
  */
@@ -102,13 +154,13 @@ export interface AdminSetUserPassword {
102
154
  userId?: string;
103
155
  }
104
156
 
105
- export interface AmbulanceFilter extends RideTypeSpecificFilter {
157
+ export interface AmbulanceFilter extends DrivePermissionFilter {
106
158
  heavyWeightAllowed?: boolean;
107
159
  type: "ambulance";
108
160
  }
109
161
 
110
162
  /**
111
- * Filled if (and only if) rideType == ambulance
163
+ * Filled if (and only if) vehicleType == ambulance
112
164
  */
113
165
  export interface AmbulanceInfo {
114
166
  /**
@@ -129,13 +181,29 @@ export interface AmbulanceInfo {
129
181
  requiresSuctionAspirator?: boolean;
130
182
  }
131
183
 
184
+ /**
185
+ * Information about the ride, from the creator of the ride
186
+ */
187
+ export interface AnonymizedRideInfo extends RideInfo {
188
+ }
189
+
190
+ /**
191
+ * Information about the ride, from the creator of the ride
192
+ */
193
+ export interface AnonymizedSeriesRideInfo extends SeriesRideInfo {
194
+ }
195
+
132
196
  export interface Appointment {
133
197
  pickup?: boolean;
134
198
  time?: string;
135
199
  }
136
200
 
137
- export interface AssignDriver extends RideCommand {
138
- driveOwner?: AccountOrTeamRef;
201
+ export interface AssignDriver extends RideOperatorCommand {
202
+ driver?: AccountOrTeamRef;
203
+ }
204
+
205
+ export interface AssignRideSeriesDriver extends SeriesOperatorCommand {
206
+ driver?: AccountOrTeamRef;
139
207
  }
140
208
 
141
209
  export interface Attachment {
@@ -161,13 +229,22 @@ export interface AuthenticationService {
161
229
 
162
230
  export interface BookRide extends CreateRideCommand {
163
231
  info?: RideInfo;
164
- owner?: AccountOrTeamRef;
165
232
  }
166
233
 
167
- export interface CancelDrive extends FleetModifyCommand {
234
+ export interface BookRideSeries extends CreateSeriesCommand {
235
+ rideSummaries?: RideSummary[];
236
+ }
237
+
238
+ export interface CancelRide extends RideBookerCommand {
239
+ reason?: string;
240
+ }
241
+
242
+ export interface CancelRideSeries extends SeriesCommandWithSeparateEvent {
243
+ reason?: string;
168
244
  }
169
245
 
170
- export interface CancelRide extends RidePlannerCommand {
246
+ export interface CancelRideSeriesEvent extends SeriesBookerCommand {
247
+ cancelRides?: string[];
171
248
  reason?: string;
172
249
  }
173
250
 
@@ -227,8 +304,13 @@ export interface CreateOptimizationPlan extends OptimizerMessage {
227
304
  timeRange?: InstantRange;
228
305
  }
229
306
 
230
- export interface CreateRideCommand extends RidePlannerCommand {
231
- owner?: AccountOrTeamId;
307
+ export interface CreateRideCommand extends RideBookerCommand {
308
+ booker?: AccountOrTeamRef;
309
+ }
310
+
311
+ export interface CreateSeriesCommand extends SeriesBookerCommand {
312
+ booker?: AccountOrTeamRef;
313
+ info?: SeriesRideInfo;
232
314
  }
233
315
 
234
316
  export interface CreateSqueezeInPlan extends OptimizerMessage {
@@ -264,6 +346,11 @@ export interface DateRange {
264
346
  export interface DeleteUser extends UserEdit {
265
347
  }
266
348
 
349
+ export interface DisconnectClient {
350
+ clientId?: string;
351
+ tokenId?: string;
352
+ }
353
+
267
354
  export interface DispoliveSettings {
268
355
  key?: string;
269
356
  type: "dispolive";
@@ -296,14 +383,18 @@ export interface DrivePermission {
296
383
  revoked?: boolean;
297
384
  }
298
385
 
386
+ export interface DrivePermissionFilter {
387
+ type: "ambulance" | "taxi";
388
+ }
389
+
299
390
  export interface DrivePermissionInfo {
300
- filter?: RideTypeSpecificFilterUnion;
391
+ filter?: DrivePermissionFilterUnion;
301
392
  monopoly?: boolean;
302
393
  regions?: Region[];
303
394
  }
304
395
 
305
396
  export interface DrivePermissionInfoRequest {
306
- filter?: RideTypeSpecificFilterUnion;
397
+ filter?: DrivePermissionFilterUnion;
307
398
  regions?: Region[];
308
399
  }
309
400
 
@@ -365,36 +456,17 @@ export interface FindAccounts {
365
456
  term?: string;
366
457
  }
367
458
 
368
- export interface FindMyAcceptedRides {
369
- accountId?: string;
370
- descending?: boolean;
371
- filter?: RideFilter;
372
- maxSize?: number;
373
- term?: string;
459
+ export interface FindMyRides extends AbstractFindMyRides {
374
460
  }
375
461
 
376
- /**
377
- * @deprecated
378
- */
379
- export interface FindMyRideOffers {
380
- accountId?: string;
381
- descending?: boolean;
382
- filter?: RideFilter;
383
- maxSize?: number;
384
- term?: string;
462
+ export interface FindMyRidesAndSeries extends AbstractFindMyRides {
385
463
  }
386
464
 
387
- export interface FindMyRides {
388
- accountId?: string;
389
- descending?: boolean;
390
- filter?: RideFilter;
391
- maxSize?: number;
392
- term?: string;
465
+ export interface FindMySeries extends AbstractFindMyRides {
393
466
  }
394
467
 
395
468
  export interface FindMyTokens {
396
469
  accountId?: string;
397
- teamId?: string;
398
470
  term?: string;
399
471
  }
400
472
 
@@ -404,19 +476,27 @@ export interface FindMyUsers {
404
476
  term?: string;
405
477
  }
406
478
 
407
- export interface FindPotentialRides {
408
- accountId?: string;
409
- descending?: boolean;
410
- filter?: RideFilter;
411
- maxSize?: number;
412
- term?: string;
479
+ export interface FindRides extends AbstractFindRides {
413
480
  }
414
481
 
415
- export interface FindRides {
416
- descending?: boolean;
417
- filter?: RideFilter;
418
- maxSize?: number;
419
- term?: string;
482
+ export interface FindRidesAndSeries extends AbstractFindRides {
483
+ }
484
+
485
+ export interface FindRidesAndSeriesForDriver extends AbstractFindRidesForDriver {
486
+ }
487
+
488
+ export interface FindRidesAndSeriesInMarketplace extends AbstractFindRidesInMarketplace {
489
+ }
490
+
491
+ export interface FindRidesAndSeriesResult {
492
+ ridesAndSeries?: RideOrMinimizedSeries[];
493
+ ridesCount?: RideFilterCount;
494
+ }
495
+
496
+ export interface FindRidesForDriver extends AbstractFindRidesForDriver {
497
+ }
498
+
499
+ export interface FindRidesInMarketplace extends AbstractFindRidesInMarketplace {
420
500
  }
421
501
 
422
502
  export interface FindRidesResult {
@@ -424,6 +504,15 @@ export interface FindRidesResult {
424
504
  rides?: Ride[];
425
505
  }
426
506
 
507
+ export interface FindSeries extends AbstractFindRides {
508
+ }
509
+
510
+ export interface FindSeriesForDriver extends AbstractFindRidesForDriver {
511
+ }
512
+
513
+ export interface FindSeriesInMarketplace extends AbstractFindRidesInMarketplace {
514
+ }
515
+
427
516
  export interface FindTokens {
428
517
  term?: string;
429
518
  }
@@ -432,10 +521,10 @@ export interface FindUsers {
432
521
  term?: string;
433
522
  }
434
523
 
435
- export interface FleetCommand extends RideCommand {
436
- }
437
-
438
- export interface FleetModifyCommand extends FleetCommand {
524
+ export interface FirebaseMessage {
525
+ data?: { [index: string]: string };
526
+ notification?: Notification;
527
+ topic?: string;
439
528
  }
440
529
 
441
530
  export interface GenerateToken {
@@ -444,6 +533,35 @@ export interface GenerateToken {
444
533
  tokenId?: string;
445
534
  }
446
535
 
536
+ export interface GenerateTokenResult {
537
+ entity?: Token;
538
+ jwt?: string;
539
+ }
540
+
541
+ /**
542
+ * Common information shared across all rides in a series. Similar to RideInfo but without appointment-specific details that vary per ride.
543
+
544
+ */
545
+ export interface GenericRideInfo {
546
+ ambulanceInfo?: AmbulanceInfo;
547
+ attendantsPresent?: number;
548
+ comment?: string;
549
+ dimensions?: PersonDimensions;
550
+ distanceInMeters?: number;
551
+ from?: AddressInfo;
552
+ /**
553
+ * Derived from weightInKg != null
554
+ */
555
+ heavyWeight?: boolean;
556
+ mobility?: Mobility;
557
+ patient?: Person;
558
+ plannedDuration?: RideDuration;
559
+ preferredDriver?: string;
560
+ to?: AddressInfo;
561
+ vehicleType?: VehicleType;
562
+ weightInKg?: number;
563
+ }
564
+
447
565
  export interface GeoJson {
448
566
  features?: Feature[];
449
567
  }
@@ -474,10 +592,16 @@ export interface GetAccount {
474
592
  accountId?: string;
475
593
  }
476
594
 
477
- export interface GetAccountsOfPotentialDrivers extends GetPotentialDrivers {
595
+ /**
596
+ * @deprecated
597
+ */
598
+ export interface GetAccountsOfPotentialDrivers extends IGetPotentialDrivers {
478
599
  }
479
600
 
480
- export interface GetAccountsOfPotentialDriversAsAdmin extends GetPotentialDrivers {
601
+ /**
602
+ * @deprecated
603
+ */
604
+ export interface GetAccountsOfPotentialDriversAsAdmin extends IGetPotentialDrivers {
481
605
  }
482
606
 
483
607
  export interface GetDistrict {
@@ -500,26 +624,17 @@ export interface GetIsoStates {
500
624
  export interface GetMonopolyAccounts {
501
625
  }
502
626
 
503
- export interface GetMyAcceptedRides {
504
- accountId?: string;
505
- maxSize?: number;
506
- timeRange?: InstantRange;
507
- }
508
-
509
627
  export interface GetMyAccounts {
510
628
  filter?: AccountFilter;
511
629
  }
512
630
 
513
- /**
514
- * @deprecated
515
- */
516
- export interface GetMyRideOffers {
631
+ export interface GetMyRides {
517
632
  accountId?: string;
518
633
  maxSize?: number;
519
634
  timeRange?: InstantRange;
520
635
  }
521
636
 
522
- export interface GetMyRides {
637
+ export interface GetMySeries {
523
638
  accountId?: string;
524
639
  maxSize?: number;
525
640
  timeRange?: InstantRange;
@@ -534,20 +649,36 @@ export interface GetMyUserProfile {
534
649
  export interface GetNutsStates {
535
650
  }
536
651
 
537
- export interface GetPotentialDrivers {
652
+ export interface GetOneSeries {
653
+ rideSeriesId?: string;
654
+ }
655
+
656
+ /**
657
+ * Common information shared across all rides in a series. Similar to RideInfo but without appointment-specific details that vary per ride.
658
+
659
+ */
660
+ export interface GetPotentialDriverIds extends GetPotentialDriversAbstract {
661
+ }
662
+
663
+ /**
664
+ * Common information shared across all rides in a series. Similar to RideInfo but without appointment-specific details that vary per ride.
665
+
666
+ */
667
+ export interface GetPotentialDrivers extends GetPotentialDriversAbstract {
668
+ }
669
+
670
+ /**
671
+ * Common information shared across all rides in a series. Similar to RideInfo but without appointment-specific details that vary per ride.
672
+
673
+ */
674
+ export interface GetPotentialDriversAbstract {
538
675
  fromDistrict?: string;
539
676
  mobility?: Mobility;
540
- rideType?: RideType;
541
677
  toDistrict?: string;
678
+ vehicleType?: VehicleType;
542
679
  weightInKg?: number;
543
680
  }
544
681
 
545
- export interface GetPotentialRides {
546
- accountId?: string;
547
- maxSize?: number;
548
- timeRange?: InstantRange;
549
- }
550
-
551
682
  export interface GetRide {
552
683
  rideId?: string;
553
684
  }
@@ -555,14 +686,53 @@ export interface GetRide {
555
686
  export interface GetRideCsv extends RideStatisticsQuery {
556
687
  }
557
688
 
558
- export interface GetRideData extends RideStatisticsQuery {
559
- rideOwner?: string;
689
+ export interface GetRideDataForBooker extends RideStatisticsQuery {
690
+ accountId?: string;
691
+ }
692
+
693
+ export interface GetRideDataForDriver extends RideStatisticsQuery {
694
+ accountId?: string;
560
695
  }
561
696
 
562
697
  export interface GetRideLog {
563
698
  rideId?: string;
564
699
  }
565
700
 
701
+ export interface GetRideOrSeries {
702
+ id?: string;
703
+ }
704
+
705
+ export interface GetRidesForDriver {
706
+ accountId?: string;
707
+ maxSize?: number;
708
+ timeRange?: InstantRange;
709
+ }
710
+
711
+ export interface GetRidesInMarketplace {
712
+ accountId?: string;
713
+ maxSize?: number;
714
+ timeRange?: InstantRange;
715
+ }
716
+
717
+ export interface GetRidesInSeries {
718
+ rideSeriesId?: string;
719
+ }
720
+
721
+ export interface GetSeriesForDriver {
722
+ accountId?: string;
723
+ maxSize?: number;
724
+ timeRange?: InstantRange;
725
+ }
726
+
727
+ export interface GetSeriesInMarketplace {
728
+ accountId?: string;
729
+ maxSize?: number;
730
+ }
731
+
732
+ export interface GetSeriesLog {
733
+ rideSeriesId?: string;
734
+ }
735
+
566
736
  export interface GetTeam {
567
737
  teamId?: string;
568
738
  }
@@ -589,6 +759,18 @@ export interface GiveTeamPermission extends AccountPermissionCommand {
589
759
  teamPermission?: TeamPermission;
590
760
  }
591
761
 
762
+ export interface HalfHourBeforeStart {
763
+ rideId?: string;
764
+ }
765
+
766
+ export interface IGetPotentialDrivers {
767
+ fromDistrict?: string;
768
+ mobility?: Mobility;
769
+ toDistrict?: string;
770
+ vehicleType?: VehicleType;
771
+ weightInKg?: number;
772
+ }
773
+
592
774
  export interface ImpersonateUser {
593
775
  userId?: string;
594
776
  }
@@ -629,6 +811,28 @@ export interface IsoState {
629
811
  nutsCode?: string;
630
812
  }
631
813
 
814
+ export interface Metric {
815
+ clientId?: string;
816
+ clientSegment?: number[];
817
+ maxSize?: number;
818
+ maxTimeout?: string;
819
+ tokenId?: string;
820
+ type?: string;
821
+ updates?: string[];
822
+ }
823
+
824
+ /**
825
+ * RideSeries is a grouped ride series. A singular object, that is later split into individual rides, once a driver has accepted the series as a group.
826
+ */
827
+ export interface MinimizedRideSeries extends RideSeries, RideOrMinimizedSeries {
828
+ info?: SeriesRideInfo;
829
+ }
830
+
831
+ export interface Notification {
832
+ body?: string;
833
+ title?: string;
834
+ }
835
+
632
836
  export interface NutsDistrict {
633
837
  code?: string;
634
838
  name?: string;
@@ -651,6 +855,10 @@ export interface OffsetTimeRange {
651
855
  start?: Date;
652
856
  }
653
857
 
858
+ export interface OneHourAfterEnd {
859
+ rideId?: string;
860
+ }
861
+
654
862
  export interface OptimizerMessage {
655
863
  }
656
864
 
@@ -678,6 +886,24 @@ export interface PersonDimensions {
678
886
  export interface PhoneNumber {
679
887
  }
680
888
 
889
+ export interface PlanRide extends RideDriverModifyCommand {
890
+ plannedStartTime?: string;
891
+ }
892
+
893
+ export interface ReadUpdates {
894
+ clientId?: string;
895
+ maxSize?: number;
896
+ maxTimeout?: number;
897
+ tokenId?: string;
898
+ updateTypes?: EntityType[];
899
+ }
900
+
901
+ export interface ReadUpdatesResult {
902
+ clientSegment?: number[];
903
+ lastIndex?: number;
904
+ updates?: any[];
905
+ }
906
+
681
907
  export interface Region {
682
908
  nutsCode?: string;
683
909
  }
@@ -686,16 +912,11 @@ export interface RegisterAuthenticationToken extends UserUpdate {
686
912
  hashedToken?: string;
687
913
  }
688
914
 
689
- export interface RegisterDifferentEta extends FleetModifyCommand {
690
- destinationEta?: string;
691
- originEta?: string;
692
- }
693
-
694
- export interface RegisterDriveStatus extends FleetModifyCommand {
915
+ export interface RegisterDriveStatus extends RideDriverModifyCommand {
695
916
  driveStatus?: DriveStatus;
696
917
  }
697
918
 
698
- export interface RegisterDriverSynced extends FleetModifyCommand {
919
+ export interface RegisterDriverSynced extends RideDriverModifyCommand {
699
920
  }
700
921
 
701
922
  export interface RegisterEinsatz {
@@ -706,6 +927,14 @@ export interface RegisterEinsatz {
706
927
  export interface RemoveAccount extends AccountUpdate {
707
928
  }
708
929
 
930
+ export interface RemoveOperations extends AccountUpdate {
931
+ operateAccount?: string;
932
+ }
933
+
934
+ export interface RemoveOperator extends AccountUpdate {
935
+ operator?: string;
936
+ }
937
+
709
938
  export interface RemoveSettings extends AccountUpdate {
710
939
  type?: IntegrationType;
711
940
  }
@@ -722,6 +951,13 @@ export interface ReportIssue {
722
951
  issue?: string;
723
952
  }
724
953
 
954
+ /**
955
+ * Can only report delays when ride has started and has not arrived at destination.
956
+ */
957
+ export interface ReportRideDelay extends RideDriverModifyCommand {
958
+ minutes?: number;
959
+ }
960
+
725
961
  export interface RequestDrivePermission extends AccountUpdate {
726
962
  drivePermissionId?: string;
727
963
  info?: DrivePermissionInfoRequest;
@@ -736,16 +972,31 @@ export interface RequestUserReset {
736
972
  email?: string;
737
973
  }
738
974
 
975
+ /**
976
+ * Resets the lastIndex position of your token.
977
+ */
978
+ export interface ResetPosition {
979
+ index?: number;
980
+ timestamp?: string;
981
+ tokenId?: string;
982
+ }
983
+
984
+ export interface ReturnRide extends RideDriverModifyCommand {
985
+ }
986
+
987
+ export interface ReturnRideSeries extends SeriesDriverCommand {
988
+ }
989
+
739
990
  export interface Review {
740
991
  comment?: string;
741
992
  stars?: number;
742
993
  }
743
994
 
744
- export interface ReviewRideAsDriver extends FleetModifyCommand {
995
+ export interface ReviewRideAsBooker extends RideBookerCommand {
745
996
  review?: Review;
746
997
  }
747
998
 
748
- export interface ReviewRideAsRider extends RidePlannerCommand {
999
+ export interface ReviewRideAsDriver extends RideDriverModifyCommand {
749
1000
  review?: Review;
750
1001
  }
751
1002
 
@@ -756,6 +1007,9 @@ export interface RevokeDrivePermission extends AccountUpdate {
756
1007
  drivePermissionId?: string;
757
1008
  }
758
1009
 
1010
+ export interface RevokeSecondaryTokenPermission extends SecondaryTokenPermissionCommand {
1011
+ }
1012
+
759
1013
  export interface RevokeSubscription extends AccountUpdate {
760
1014
  subscriptionId?: string;
761
1015
  }
@@ -763,17 +1017,23 @@ export interface RevokeSubscription extends AccountUpdate {
763
1017
  export interface RevokeToken extends TokenUpdate {
764
1018
  }
765
1019
 
766
- export interface Ride {
1020
+ export interface Ride extends RideOrSeries, RideOrMinimizedSeries {
767
1021
  /**
768
- * Derived from driveOwner != null
1022
+ * Derived from driver != null
769
1023
  */
770
1024
  accepted?: boolean;
1025
+ actualEndTime?: string;
1026
+ actualStartTime?: string;
1027
+ /**
1028
+ * Derived from driveStatus != null
1029
+ */
1030
+ arrived?: boolean;
771
1031
  /**
772
1032
  * Derived from bookedTime != null
773
1033
  */
774
1034
  booked?: boolean;
775
- bookedTime?: string;
776
- bookingStatus?: BookingStatus;
1035
+ booker?: AccountOrTeamRef;
1036
+ bookerReview?: Review;
777
1037
  cancelReason?: string;
778
1038
  cancelled?: boolean;
779
1039
  /**
@@ -781,39 +1041,65 @@ export interface Ride {
781
1041
  */
782
1042
  completed?: boolean;
783
1043
  /**
784
- * Estimated Time of Arrival at the Destination/Drop-off location. Will differ from destinationPta if the driver reported a delay
1044
+ * Desired Time of Arrival at the Destination/Drop-off location. Derived from info.appointment and info.plannedDuration
785
1045
  */
786
- destinationEta?: string;
1046
+ desiredEndTime?: string;
787
1047
  /**
788
- * Planned Time of Arrival at the Destination/Drop-off location. Derived from info.appointment and info.plannedDuration
1048
+ * Desired Time of Arrival at the Origin/Pick-up location. Derived from info.appointment and info.plannedDuration
789
1049
  */
790
- destinationPta?: string;
791
- driveOwner?: AccountOrTeamRef;
1050
+ desiredStartTime?: string;
792
1051
  driveStatus?: DriveStatus;
793
1052
  driverReview?: Review;
794
1053
  driverSyncStatus?: SyncStatus;
1054
+ endTimeDelay?: number;
1055
+ /**
1056
+ * Expected Time of Arrival at the Destination/Drop-off location.
1057
+ */
1058
+ expectedEndTime?: string;
1059
+ /**
1060
+ * Expected Time of Arrival at the Origin/Pick-up location.
1061
+ */
1062
+ expectedStartTime?: string;
795
1063
  info?: RideInfo;
796
1064
  /**
797
- * Estimated Time of Arrival at the Origin/Pick-up location. Will differ from originPta if the driver reported a delay
1065
+ * Derived from plannedStartTime != null
798
1066
  */
799
- originEta?: string;
1067
+ planned?: boolean;
800
1068
  /**
801
- * Planned Time of Arrival at the Origin/Pick-up location. Derived from info.appointment and info.plannedDuration
1069
+ * Planned Time of Arrival at the Destination/Drop-off location, reported by the driver.
802
1070
  */
803
- originPta?: string;
1071
+ plannedEndTime?: string;
1072
+ plannedStartTime?: string;
804
1073
  rideId?: string;
805
- rideOwner?: AccountOrTeamRef;
806
- riderReview?: Review;
1074
+ /**
1075
+ * The time until which rides can be found. It's the planned time or else the desired time.
1076
+ */
1077
+ searchEndTime?: string;
1078
+ /**
1079
+ * The time from which rides can be found. It's the planned time or else the desired time.
1080
+ */
1081
+ searchStartTime?: string;
1082
+ seriesInfo?: SeriesInfo;
1083
+ startTimeDelay?: number;
807
1084
  /**
808
1085
  * Derived from driveStatus != null
809
1086
  */
810
1087
  started?: boolean;
811
1088
  }
812
1089
 
1090
+ export interface RideBookerCommand extends RideCommand {
1091
+ }
1092
+
813
1093
  export interface RideCommand {
814
1094
  rideId?: string;
815
1095
  }
816
1096
 
1097
+ export interface RideDriverCommand extends RideCommand {
1098
+ }
1099
+
1100
+ export interface RideDriverModifyCommand extends RideDriverCommand {
1101
+ }
1102
+
817
1103
  /**
818
1104
  * All durations in seconds
819
1105
  */
@@ -826,39 +1112,41 @@ export interface RideDuration {
826
1112
 
827
1113
  export interface RideFilter {
828
1114
  bookingStatuses?: BookingStatus[];
829
- directions?: Direction[];
830
1115
  driveStatuses?: DriveStatus[];
831
1116
  driverAccountNames?: string[];
832
1117
  driverTeamNames?: string[];
1118
+ entityType?: EntityType;
833
1119
  hasInfection?: boolean;
834
1120
  heavyWeight?: boolean;
835
1121
  mobilities?: Mobility[];
1122
+ purposes?: RidePurpose[];
836
1123
  region?: Region;
837
1124
  requiresMonitoring?: boolean;
838
1125
  requiresOxygen?: boolean;
839
1126
  requiresSuctionAspirator?: boolean;
840
- rideType?: RideType;
841
1127
  riderAccountNames?: string[];
842
1128
  riderTeamNames?: string[];
843
1129
  timeRange?: InstantRange;
1130
+ unfoldRideSeries?: boolean;
1131
+ vehicleType?: VehicleType;
844
1132
  }
845
1133
 
846
1134
  export interface RideFilterCount {
847
1135
  bookingStatuses?: { [P in BookingStatus]?: number };
848
- directions?: { [P in Direction]?: number };
849
1136
  driveStatuses?: { [P in DriveStatus]?: number };
850
1137
  driverAccountNames?: { [index: string]: number };
851
1138
  driverTeamNames?: { [index: string]: number };
852
1139
  hasInfection?: number;
853
1140
  heavyWeight?: number;
854
1141
  mobilities?: { [P in Mobility]?: number };
1142
+ purposes?: { [P in RidePurpose]?: number };
855
1143
  requiresMonitoring?: number;
856
1144
  requiresOxygen?: number;
857
1145
  requiresSuctionAspirator?: number;
858
- rideTypes?: { [P in RideType]?: number };
859
1146
  riderAccountNames?: { [index: string]: number };
860
1147
  riderTeamNames?: { [index: string]: number };
861
1148
  total?: number;
1149
+ vehicleTypes?: { [P in VehicleType]?: number };
862
1150
  }
863
1151
 
864
1152
  export interface RideIdResult {
@@ -868,26 +1156,9 @@ export interface RideIdResult {
868
1156
  /**
869
1157
  * Information about the ride, from the creator of the ride
870
1158
  */
871
- export interface RideInfo {
872
- ambulanceInfo?: AmbulanceInfo;
1159
+ export interface RideInfo extends GenericRideInfo {
873
1160
  appointment?: Appointment;
874
- attendantsPresent?: number;
875
- comment?: string;
876
- dimensions?: PersonDimensions;
877
- direction?: Direction;
878
- distanceInMeters?: number;
879
- from?: AddressInfo;
880
- /**
881
- * Derived from weightInKg != null
882
- */
883
- heavyWeight?: boolean;
884
- mobility?: Mobility;
885
- patient?: Person;
886
- plannedDuration?: RideDuration;
887
- preferredDriver?: string;
888
- rideType?: RideType;
889
- to?: AddressInfo;
890
- weightInKg?: number;
1161
+ purpose?: RidePurpose;
891
1162
  }
892
1163
 
893
1164
  export interface RideLog {
@@ -906,24 +1177,95 @@ export interface RideLog {
906
1177
  token?: boolean;
907
1178
  }
908
1179
 
909
- export interface RideOfferInfo {
910
- appointment?: Appointment;
1180
+ export interface RideOperatorCommand extends RideCommand {
911
1181
  }
912
1182
 
913
- export interface RidePlannerCommand extends RideCommand {
1183
+ export interface RideOrMinimizedSeries {
1184
+ bookingStatus?: BookingStatus;
1185
+ entityType?: EntityType;
1186
+ info?: GenericRideInfo;
1187
+ }
1188
+
1189
+ export interface RideOrSeries {
1190
+ bookedTime?: string;
1191
+ bookingStatus?: BookingStatus;
1192
+ driver?: AccountOrTeamRef;
1193
+ entityType?: EntityType;
1194
+ info?: GenericRideInfo;
1195
+ }
1196
+
1197
+ /**
1198
+ * RideSeries is a grouped ride series. A singular object, that is later split into individual rides, once a driver has accepted the series as a group.
1199
+ */
1200
+ export interface RideSeries extends RideOrSeries {
1201
+ /**
1202
+ * Derived from driver != null
1203
+ */
1204
+ accepted?: boolean;
1205
+ activeRideCount?: number;
1206
+ /**
1207
+ * Derived from bookedTime != null
1208
+ */
1209
+ booked?: boolean;
1210
+ booker?: AccountOrTeamRef;
1211
+ cancelReason?: string;
1212
+ cancelled?: boolean;
1213
+ info?: SeriesRideInfo;
1214
+ rideSeriesId?: string;
1215
+ rides?: Ride[];
1216
+ ridesSummaries?: RideSummary[];
1217
+ searchEndTime?: string;
1218
+ searchStartTime?: string;
1219
+ }
1220
+
1221
+ export interface RideSeriesIdResult {
1222
+ rideSeriesId?: string;
1223
+ }
1224
+
1225
+ export interface RideSeriesUpdate {
1226
+ after?: RideSeries;
1227
+ before?: RideSeries;
1228
+ entityId?: string;
1229
+ eventType?: string;
1230
+ index?: number;
1231
+ timestamp?: string;
1232
+ type: "rideseries";
1233
+ }
1234
+
1235
+ export interface RideSeriesUtils {
914
1236
  }
915
1237
 
916
1238
  export interface RideStatisticsQuery {
917
1239
  dateRange?: DateRange;
918
- timezoneOrDefault?: ZoneId;
919
- zoneId?: ZoneId;
1240
+ zoneId?: string;
920
1241
  }
921
1242
 
922
- export interface RideTypeSpecificFilter {
923
- type: "ambulance" | "taxi";
1243
+ /**
1244
+ * Individual ride timing within a series. Once a ride series is split, you cannot add rides, only remove
1245
+ */
1246
+ export interface RideSummary {
1247
+ appointmentTime?: string;
1248
+ returnTrip?: boolean;
1249
+ rideId?: string;
924
1250
  }
925
1251
 
926
- export interface Role<T> {
1252
+ export interface RideSystemCommand extends RideCommand {
1253
+ }
1254
+
1255
+ export interface RideUpcaster {
1256
+ }
1257
+
1258
+ export interface RideUpdate {
1259
+ after?: Ride;
1260
+ before?: Ride;
1261
+ entityId?: string;
1262
+ eventType?: string;
1263
+ index?: number;
1264
+ timestamp?: string;
1265
+ type: "ride";
1266
+ }
1267
+
1268
+ export interface Role {
927
1269
  }
928
1270
 
929
1271
  /**
@@ -931,7 +1273,14 @@ export interface Role<T> {
931
1273
  */
932
1274
  export interface SaveRide extends CreateRideCommand {
933
1275
  info?: RideInfo;
934
- owner?: AccountOrTeamRef;
1276
+ }
1277
+
1278
+ export interface SaveRideSeries extends CreateSeriesCommand {
1279
+ rideSummaries?: RideSummary[];
1280
+ }
1281
+
1282
+ export interface SecondaryTokenPermissionCommand extends TokenUpdate {
1283
+ accountId?: string;
935
1284
  }
936
1285
 
937
1286
  export interface SendConfirmationEmail {
@@ -945,6 +1294,7 @@ export interface SendEmail {
945
1294
  export interface SendFreshdeskNewTicket {
946
1295
  email?: string;
947
1296
  message?: string;
1297
+ subject?: string;
948
1298
  }
949
1299
 
950
1300
  export interface SendInvitationEmail {
@@ -957,7 +1307,55 @@ export interface SendSlack {
957
1307
  message?: string;
958
1308
  }
959
1309
 
960
- export interface Serializable {
1310
+ export interface SendToFirebase {
1311
+ message?: FirebaseMessage;
1312
+ }
1313
+
1314
+ export interface SeriesBookerCommand extends SeriesCommand {
1315
+ }
1316
+
1317
+ export interface SeriesCommand {
1318
+ rideSeriesId?: string;
1319
+ }
1320
+
1321
+ export interface SeriesCommandWithSeparateEvent {
1322
+ rideSeriesId?: string;
1323
+ }
1324
+
1325
+ export interface SeriesDriverCommand extends SeriesCommand {
1326
+ }
1327
+
1328
+ /**
1329
+ * Information about a ride that is part of series.
1330
+ */
1331
+ export interface SeriesInfo {
1332
+ desyncedFromSeries?: boolean;
1333
+ positionInSeries?: number;
1334
+ returnTrip?: boolean;
1335
+ rideSeriesId?: string;
1336
+ totalRidesInSeries?: number;
1337
+ }
1338
+
1339
+ export interface SeriesOperatorCommand extends SeriesCommand {
1340
+ }
1341
+
1342
+ /**
1343
+ * Information about the ride, from the creator of the ride
1344
+ */
1345
+ export interface SeriesRideInfo extends GenericRideInfo {
1346
+ purpose?: SeriesPurpose;
1347
+ }
1348
+
1349
+ export interface SetOperations extends AccountUpdate {
1350
+ operateAccounts?: string[];
1351
+ }
1352
+
1353
+ export interface SetOperator extends AccountUpdate {
1354
+ operator?: string;
1355
+ }
1356
+
1357
+ export interface SetSecondaryTokenPermission extends SecondaryTokenPermissionCommand {
1358
+ accountPermission?: AccountPermission;
961
1359
  }
962
1360
 
963
1361
  export interface SetSettings extends AccountUpdate {
@@ -1000,7 +1398,7 @@ export interface SubscriptionInfo extends TimedPermission {
1000
1398
  service?: Service;
1001
1399
  }
1002
1400
 
1003
- export interface TaxiFilter extends RideTypeSpecificFilter {
1401
+ export interface TaxiFilter extends DrivePermissionFilter {
1004
1402
  allowedMobilities?: Mobility[];
1005
1403
  type: "taxi";
1006
1404
  }
@@ -1036,10 +1434,11 @@ export interface TimedPermission {
1036
1434
  }
1037
1435
 
1038
1436
  export interface Token {
1039
- accountPermission?: AccountPermission;
1437
+ accountPermissions?: AccountPermission[];
1040
1438
  createdBy?: string;
1041
1439
  info?: TokenInfo;
1042
1440
  lastUpdatedBy?: string;
1441
+ owner?: string;
1043
1442
  revoked?: boolean;
1044
1443
  tokenId?: string;
1045
1444
  }
@@ -1067,9 +1466,34 @@ export interface UpdateAccountPermission extends AccountPermissionCommand {
1067
1466
  accountPermission?: AccountPermission;
1068
1467
  }
1069
1468
 
1070
- export interface UpdateRideBooking extends RidePlannerCommand {
1469
+ export interface UpdatePosition {
1470
+ clientSegment?: number[];
1471
+ lastIndex?: number;
1472
+ tokenId?: string;
1473
+ }
1474
+
1475
+ export interface UpdateRide extends RideBookerCommand {
1476
+ booker?: AccountOrTeamRef;
1071
1477
  info?: RideInfo;
1072
- owner?: AccountOrTeamRef;
1478
+ }
1479
+
1480
+ export interface UpdateRidePlan extends RideDriverModifyCommand {
1481
+ plannedStartTime?: string;
1482
+ }
1483
+
1484
+ export interface UpdateRideSeries extends SeriesCommandWithSeparateEvent {
1485
+ booker?: AccountOrTeamRef;
1486
+ info?: SeriesRideInfo;
1487
+ rideSummaries?: RideSummary[];
1488
+ }
1489
+
1490
+ export interface UpdateRideSeriesEvent extends SeriesBookerCommand {
1491
+ addRides?: string[];
1492
+ booker?: AccountOrTeamRef;
1493
+ cancelRides?: string[];
1494
+ info?: SeriesRideInfo;
1495
+ rideSummaries?: RideSummary[];
1496
+ updateRides?: string[];
1073
1497
  }
1074
1498
 
1075
1499
  export interface UpdateTeam extends TeamUpdate {
@@ -1085,6 +1509,9 @@ export interface UpdateUserInfo extends UserEdit {
1085
1509
  info?: UserInfo;
1086
1510
  }
1087
1511
 
1512
+ export interface UserAndTokenUpcaster {
1513
+ }
1514
+
1088
1515
  export interface UserCommand {
1089
1516
  userId?: string;
1090
1517
  }
@@ -1120,44 +1547,47 @@ export interface UserUpdate extends UserCommand {
1120
1547
  export interface UserUpdateAfterSignup extends UserUpdate {
1121
1548
  }
1122
1549
 
1123
- export interface ZoneId extends Serializable {
1124
- }
1125
-
1126
1550
  export interface ZonedTimeRange {
1127
1551
  end?: Date;
1128
1552
  start?: Date;
1129
1553
  }
1130
1554
 
1131
- export type AccountRole = "rideplanner" | "driveplanner" | "admin" | "owner";
1555
+ export type AccountRole = "ridebooker" | "dispatcher" | "operator" | "admin" | "owner";
1132
1556
 
1133
1557
  export type AuthenticationResult = "SUCCESS" | "NOT_CONFIRMED";
1134
1558
 
1135
- export type BookingStatus = "saved" | "booked" | "accepted" | "started" | "completed" | "cancelled";
1559
+ export type BookingStatus = "saved" | "booked" | "accepted" | "planned" | "started" | "completed" | "cancelled";
1136
1560
 
1137
- export type Direction = "admission" | "relocation" | "discharge" | "consultation";
1561
+ export type DrivePermissionFilterUnion = AmbulanceFilter | TaxiFilter;
1138
1562
 
1139
1563
  export type DriveStatus = "driving_to_origin" | "arrived_at_origin" | "driving_to_destination" | "arrived_at_destination" | "completed";
1140
1564
 
1565
+ export type EntityType = "ride" | "rideseries";
1566
+
1141
1567
  export type GeometryUnion = GeoPolygon | GeoMultiPolygon;
1142
1568
 
1143
1569
  export type InsuranceType = "public_insurance" | "private_insurance" | "german_accident_insurance" | "no_or_unknown_insurance";
1144
1570
 
1145
1571
  export type IntegrationType = "dispolive" | "celios";
1146
1572
 
1147
- export type Mobility = "wheelchair" | "big_or_electric_wheelchair" | "carry_chair" | "lying_down";
1573
+ export type Mobility = "wheelchair" | "big_or_electric_wheelchair" | "carry_chair" | "stretcher";
1148
1574
 
1149
- export type RideType = "taxi" | "ambulance";
1575
+ export type OrganisationType = "medical" | "fleet" | "operator";
1150
1576
 
1151
- export type RideTypeSpecificFilterUnion = AmbulanceFilter | TaxiFilter;
1577
+ export type RidePurpose = "admission" | "relocation" | "discharge" | "consultation";
1152
1578
 
1153
- export type Service = "rideplanning" | "driveplanning" | "celios_integration" | "dispolive_integration";
1579
+ export type SeriesPurpose = "consultation";
1580
+
1581
+ export type Service = "pro_medical" | "pro_fleet" | "pro_operator" | "celios_integration" | "dispolive_integration" | "moxi_operations";
1154
1582
 
1155
1583
  export type SlackChannel = "admin_monitoring" | "admin_respond_immediately" | "admin_respond_within_hour" | "admin_reported_issues";
1156
1584
 
1157
- export type StandaloneService = "rideplanning" | "driveplanning";
1585
+ export type StandaloneService = "pro_medical" | "pro_fleet" | "pro_operator";
1158
1586
 
1159
1587
  export type SyncStatus = "not_synced" | "synced" | "update_not_synced";
1160
1588
 
1161
- export type TeamRole = "driveplanner" | "rideplanner";
1589
+ export type TeamRole = "dispatcher" | "ridebooker";
1162
1590
 
1163
1591
  export type UserRole = "superadmin";
1592
+
1593
+ 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.911-test-server",
3
+ "version": "0.1.911",
4
4
  "types": "common.d.ts"
5
5
  }
File without changes