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

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 +464 -274
  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;
@@ -41,6 +81,7 @@ export interface AccountFilter {
41
81
 
42
82
  export interface AccountInfo {
43
83
  address?: AddressInfo;
84
+ companyInfo?: CompanyInfo;
44
85
  defaultLanguage?: string;
45
86
  notificationEmails?: string[];
46
87
  phoneNumber?: PhoneNumber;
@@ -67,6 +108,10 @@ export interface AccountPermissionCommand extends UserUpdate {
67
108
  accountId?: string;
68
109
  }
69
110
 
111
+ export interface AccountPermissionFilter {
112
+ roles?: AccountRole[];
113
+ }
114
+
70
115
  export interface AccountRef {
71
116
  accountId?: string;
72
117
  name?: string;
@@ -78,14 +123,15 @@ export interface AccountUpcaster {
78
123
  export interface AccountUpdate extends AccountCommand {
79
124
  }
80
125
 
81
- /**
82
- * Address info of a google-validated address, including geolocation and district code
83
- */
126
+ export interface AddOperations extends AccountUpdate {
127
+ operateAccount?: string;
128
+ }
129
+
84
130
  export interface AddressInfo {
85
131
  addition?: string;
86
132
  city?: string;
87
133
  /**
88
- * Derived from districtNutsCode
134
+ * The NUTS country code, derived from districtNutsCode
89
135
  */
90
136
  country?: string;
91
137
  districtNutsCode?: string;
@@ -94,12 +140,12 @@ export interface AddressInfo {
94
140
  number?: string;
95
141
  placeName?: string;
96
142
  /**
97
- * Derived from districtNutsCode
143
+ * The NUTS level 1 code, derived from districtNutsCode
98
144
  */
99
145
  state?: string;
100
146
  street?: string;
101
147
  /**
102
- * Derived from districtNutsCode
148
+ * The NUTS level 2 code, derived from districtNutsCode
103
149
  */
104
150
  subState?: string;
105
151
  zipCode?: string;
@@ -119,38 +165,31 @@ export interface AmbulanceFilter extends DrivePermissionFilter {
119
165
  }
120
166
 
121
167
  /**
122
- * Filled if (and only if) vehicleType == ambulance
168
+ * Mandatory if the vehicleType is ambulance, forbidden if taxi
123
169
  */
124
170
  export interface AmbulanceInfo {
125
171
  /**
126
- * Derived from infectionDescription != blank
172
+ * True if infectionDescription is given
127
173
  */
128
174
  hasInfection?: boolean;
129
175
  infectionDescription?: string;
130
176
  monitoringDescription?: string;
131
177
  oxygenLiterPerHour?: number;
132
178
  /**
133
- * Derived from monitoringDescription != blank
179
+ * True if monitoringDescription is given
134
180
  */
135
181
  requiresMonitoring?: boolean;
136
182
  /**
137
- * Derived from oxygenLiterPerHour != null
183
+ * True if oxygenLiterPerHour is given
138
184
  */
139
185
  requiresOxygen?: boolean;
140
186
  requiresSuctionAspirator?: boolean;
141
187
  }
142
188
 
143
- /**
144
- * Common information shared across all rides in a series. Similar to RideInfo but without appointment-specific details that vary per ride.
145
-
146
- */
147
- export interface AnonymizedGenericRideInfo extends GenericRideInfo {
189
+ export interface AnonymizedRideInfo extends RideInfo {
148
190
  }
149
191
 
150
- /**
151
- * Information about the ride, from the creator of the ride
152
- */
153
- export interface AnonymizedRideInfo extends RideInfo {
192
+ export interface AnonymizedSeriesRideInfo extends SeriesRideInfo {
154
193
  }
155
194
 
156
195
  export interface Appointment {
@@ -158,7 +197,11 @@ export interface Appointment {
158
197
  time?: string;
159
198
  }
160
199
 
161
- export interface AssignDriver extends RideCommand {
200
+ export interface AssignDriver extends RideOperatorCommand {
201
+ driver?: AccountOrTeamRef;
202
+ }
203
+
204
+ export interface AssignRideSeriesDriver extends SeriesOperatorCommand {
162
205
  driver?: AccountOrTeamRef;
163
206
  }
164
207
 
@@ -180,38 +223,31 @@ export interface AuthenticationResponse {
180
223
  userProfile?: UserProfile;
181
224
  }
182
225
 
183
- export interface AuthenticationService {
184
- }
185
-
186
- export interface BatchUpdateRideSeriesInfo extends RideSeriesPostConfirmCommand {
187
- info?: GenericRideInfo;
188
- updater?: AccountOrTeamRef;
226
+ export interface AuthenticationResponseFactory {
189
227
  }
190
228
 
191
- export interface BatchUpdateRideSeriesTimes extends RideSeriesPostConfirmCommand {
192
- rides?: SingleRideUpdate[];
193
- updater?: AccountOrTeamRef;
229
+ export interface AuthenticationService {
194
230
  }
195
231
 
196
232
  export interface BookRide extends CreateRideCommand {
197
- booker?: AccountOrTeamRef;
198
233
  info?: RideInfo;
199
234
  }
200
235
 
201
- export interface BookRideSeries extends RideBookerSeriesCommand {
202
- booker?: AccountOrTeamRef;
203
- info?: GenericRideInfo;
204
- rides?: SingleRide[];
236
+ export interface BookRideSeries extends CreateSeriesCommand {
237
+ rideSummaries?: RideSummary[];
205
238
  }
206
239
 
207
240
  export interface CancelRide extends RideBookerCommand {
208
241
  reason?: string;
209
242
  }
210
243
 
211
- export interface CancelRideSeries extends RideBookerSeriesCommand {
244
+ export interface CancelRideSeries extends SeriesCommandWithSeparateEvent {
245
+ reason?: string;
212
246
  }
213
247
 
214
- export interface CancelRidesInSeries extends RideSeriesPostConfirmCommand {
248
+ export interface CancelRideSeriesEvent extends SeriesBookerCommand {
249
+ cancelRides?: string[];
250
+ reason?: string;
215
251
  }
216
252
 
217
253
  export interface CeliosSettings {
@@ -233,6 +269,28 @@ export interface CheckIfUserSignedUp {
233
269
  userId?: string;
234
270
  }
235
271
 
272
+ export interface CheckSession {
273
+ userId?: string;
274
+ }
275
+
276
+ /**
277
+ * 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.
278
+ */
279
+ export interface CleaningAndSlack {
280
+ cleaningAtGarage?: boolean;
281
+ cleaningDuration?: number;
282
+ dropoffDuration?: number;
283
+ pickupDuration?: number;
284
+ }
285
+
286
+ export interface CompanyInfo {
287
+ businessLicenseDocument?: Document;
288
+ creationDate?: string;
289
+ hasLiabilityInsurance?: boolean;
290
+ publicLiabilityPolicyDocument?: Document;
291
+ registrationNumber?: string;
292
+ }
293
+
236
294
  export interface ConfirmAccount extends AccountCommand {
237
295
  }
238
296
 
@@ -271,17 +329,12 @@ export interface CreateOptimizationPlan extends OptimizerMessage {
271
329
  }
272
330
 
273
331
  export interface CreateRideCommand extends RideBookerCommand {
274
- booker?: AccountOrTeamId;
275
- }
276
-
277
- export interface CreateRideFromSeries extends RideDriverCommand {
278
332
  booker?: AccountOrTeamRef;
279
- driver?: AccountOrTeamRef;
280
- info?: RideInfo;
281
- seriesInfo?: SeriesInfo;
282
333
  }
283
334
 
284
- export interface CreateRidesFromSeries extends RideDriverSeriesCommand {
335
+ export interface CreateSeriesCommand extends SeriesBookerCommand {
336
+ booker?: AccountOrTeamRef;
337
+ info?: SeriesRideInfo;
285
338
  }
286
339
 
287
340
  export interface CreateSqueezeInPlan extends OptimizerMessage {
@@ -317,6 +370,11 @@ export interface DateRange {
317
370
  export interface DeleteUser extends UserEdit {
318
371
  }
319
372
 
373
+ export interface DetailsFilter extends WebsocketFilter {
374
+ id?: string;
375
+ screen: "ride_details";
376
+ }
377
+
320
378
  export interface DisconnectClient {
321
379
  clientId?: string;
322
380
  tokenId?: string;
@@ -340,6 +398,12 @@ export interface DistrictInfo {
340
398
  type?: string;
341
399
  }
342
400
 
401
+ export interface Document {
402
+ id?: string;
403
+ name?: string;
404
+ size?: number;
405
+ }
406
+
343
407
  export interface DownloadableFile {
344
408
  base64Data?: string;
345
409
  fileName?: string;
@@ -427,47 +491,25 @@ export interface FindAccounts {
427
491
  term?: string;
428
492
  }
429
493
 
430
- /**
431
- * @deprecated
432
- */
433
- export interface FindMyAcceptedRides {
494
+ export interface FindDuplicateRides {
434
495
  accountId?: string;
435
- descending?: boolean;
436
- filter?: RideFilter;
437
- maxSize?: number;
438
- term?: string;
496
+ appointmentTime?: string;
497
+ patientBirthDay?: string;
498
+ patientFirstName?: string;
499
+ patientLastName?: string;
439
500
  }
440
501
 
441
- /**
442
- * @deprecated
443
- */
444
- export interface FindMyRideOffers {
445
- accountId?: string;
446
- descending?: boolean;
447
- filter?: RideFilter;
448
- maxSize?: number;
449
- term?: string;
502
+ export interface FindMyRides extends AbstractFindMyRides {
450
503
  }
451
504
 
452
- export interface FindMyRideSeries {
453
- accountId?: string;
454
- descending?: boolean;
455
- maxSize?: number;
456
- term?: string;
457
- timeRange?: InstantRange;
505
+ export interface FindMyRidesAndSeries extends AbstractFindMyRides {
458
506
  }
459
507
 
460
- export interface FindMyRides {
461
- accountId?: string;
462
- descending?: boolean;
463
- filter?: RideFilter;
464
- maxSize?: number;
465
- term?: string;
508
+ export interface FindMySeries extends AbstractFindMyRides {
466
509
  }
467
510
 
468
511
  export interface FindMyTokens {
469
512
  accountId?: string;
470
- teamId?: string;
471
513
  term?: string;
472
514
  }
473
515
 
@@ -477,45 +519,27 @@ export interface FindMyUsers {
477
519
  term?: string;
478
520
  }
479
521
 
480
- export interface FindPotentialRideSeries {
481
- accountId?: string;
482
- descending?: boolean;
483
- filter?: RideInfoFilter;
484
- maxSize?: number;
522
+ export interface FindRides extends AbstractFindRides {
485
523
  }
486
524
 
487
- /**
488
- * @deprecated
489
- */
490
- export interface FindPotentialRides {
491
- accountId?: string;
492
- descending?: boolean;
493
- filter?: RideFilter;
494
- maxSize?: number;
495
- term?: string;
525
+ export interface FindRidesAndSeries extends AbstractFindRides {
496
526
  }
497
527
 
498
- export interface FindRides {
499
- descending?: boolean;
500
- filter?: RideFilter;
501
- maxSize?: number;
502
- term?: string;
528
+ export interface FindRidesAndSeriesForDriver extends AbstractFindRidesForDriver {
503
529
  }
504
530
 
505
- export interface FindRidesForDriver {
506
- accountId?: string;
507
- descending?: boolean;
508
- filter?: RideFilter;
509
- maxSize?: number;
510
- term?: string;
531
+ export interface FindRidesAndSeriesInMarketplace extends AbstractFindRidesInMarketplace {
511
532
  }
512
533
 
513
- export interface FindRidesInMarketplace {
514
- accountId?: string;
515
- descending?: boolean;
516
- filter?: RideFilter;
517
- maxSize?: number;
518
- term?: string;
534
+ export interface FindRidesAndSeriesResult {
535
+ ridesAndSeries?: RideOrMinimizedSeries[];
536
+ ridesCount?: RideFilterCount;
537
+ }
538
+
539
+ export interface FindRidesForDriver extends AbstractFindRidesForDriver {
540
+ }
541
+
542
+ export interface FindRidesInMarketplace extends AbstractFindRidesInMarketplace {
519
543
  }
520
544
 
521
545
  export interface FindRidesResult {
@@ -523,24 +547,47 @@ export interface FindRidesResult {
523
547
  rides?: Ride[];
524
548
  }
525
549
 
550
+ export interface FindSeries extends AbstractFindRides {
551
+ }
552
+
553
+ export interface FindSeriesForDriver extends AbstractFindRidesForDriver {
554
+ }
555
+
556
+ export interface FindSeriesInMarketplace extends AbstractFindRidesInMarketplace {
557
+ }
558
+
526
559
  export interface FindTokens {
527
560
  term?: string;
528
561
  }
529
562
 
530
563
  export interface FindUsers {
564
+ accountFilter?: AccountFilter;
565
+ accountPermissionFilter?: AccountPermissionFilter;
531
566
  term?: string;
532
567
  }
533
568
 
569
+ export interface FirebaseMessage {
570
+ data?: { [index: string]: string };
571
+ notification?: Notification;
572
+ topic?: string;
573
+ }
574
+
575
+ export interface FleetOverviewFilter extends WebsocketFilter {
576
+ queryFilter?: FindRidesAndSeriesForDriver;
577
+ screen: "fleet_overview";
578
+ }
579
+
534
580
  export interface GenerateToken {
535
581
  accountPermission?: AccountPermission;
536
582
  info?: TokenInfo;
537
583
  tokenId?: string;
538
584
  }
539
585
 
540
- /**
541
- * Common information shared across all rides in a series. Similar to RideInfo but without appointment-specific details that vary per ride.
586
+ export interface GenerateTokenResult {
587
+ entity?: Token;
588
+ jwt?: string;
589
+ }
542
590
 
543
- */
544
591
  export interface GenericRideInfo {
545
592
  ambulanceInfo?: AmbulanceInfo;
546
593
  attendantsPresent?: number;
@@ -556,7 +603,6 @@ export interface GenericRideInfo {
556
603
  patient?: Person;
557
604
  plannedDuration?: RideDuration;
558
605
  preferredDriver?: string;
559
- purpose?: RidePurpose;
560
606
  to?: AddressInfo;
561
607
  vehicleType?: VehicleType;
562
608
  weightInKg?: number;
@@ -592,22 +638,16 @@ export interface GetAccount {
592
638
  accountId?: string;
593
639
  }
594
640
 
595
- export interface GetAccountsOfPotentialDrivers extends GetPotentialDrivers {
596
- }
597
-
598
- export interface GetAccountsOfPotentialDriversAsAdmin extends GetPotentialDrivers {
599
- }
600
-
601
- export interface GetAllRideSeriesForDriver {
602
- accountId?: string;
603
- descending?: boolean;
604
- maxSize?: number;
605
- timeRange?: InstantRange;
641
+ /**
642
+ * @deprecated
643
+ */
644
+ export interface GetAccountsOfPotentialDrivers extends IGetPotentialDrivers {
606
645
  }
607
646
 
608
- export interface GetAllRideSeriesInMarketplace {
609
- accountId?: string;
610
- maxSize?: number;
647
+ /**
648
+ * @deprecated
649
+ */
650
+ export interface GetAccountsOfPotentialDriversAsAdmin extends IGetPotentialDrivers {
611
651
  }
612
652
 
613
653
  export interface GetDistrict {
@@ -630,29 +670,17 @@ export interface GetIsoStates {
630
670
  export interface GetMonopolyAccounts {
631
671
  }
632
672
 
633
- /**
634
- * @deprecated
635
- */
636
- export interface GetMyAcceptedRides {
637
- accountId?: string;
638
- maxSize?: number;
639
- timeRange?: InstantRange;
640
- }
641
-
642
673
  export interface GetMyAccounts {
643
674
  filter?: AccountFilter;
644
675
  }
645
676
 
646
- /**
647
- * @deprecated
648
- */
649
- export interface GetMyRideOffers {
677
+ export interface GetMyRides {
650
678
  accountId?: string;
651
679
  maxSize?: number;
652
680
  timeRange?: InstantRange;
653
681
  }
654
682
 
655
- export interface GetMyRides {
683
+ export interface GetMySeries {
656
684
  accountId?: string;
657
685
  maxSize?: number;
658
686
  timeRange?: InstantRange;
@@ -667,21 +695,25 @@ export interface GetMyUserProfile {
667
695
  export interface GetNutsStates {
668
696
  }
669
697
 
670
- export interface GetPotentialDrivers {
671
- fromDistrict?: string;
672
- mobility?: Mobility;
673
- toDistrict?: string;
674
- vehicleType?: VehicleType;
675
- weightInKg?: number;
698
+ export interface GetOneSeries {
699
+ rideSeriesId?: string;
700
+ }
701
+
702
+ export interface GetPotentialDriverIds extends GetPotentialDriversAbstract {
676
703
  }
677
704
 
678
705
  /**
679
- * @deprecated
706
+ * Common information shared across all rides in a series. Similar to RideInfo but without appointment-specific details that vary per ride.
707
+
680
708
  */
681
- export interface GetPotentialRides {
682
- accountId?: string;
683
- maxSize?: number;
684
- timeRange?: InstantRange;
709
+ export interface GetPotentialDrivers extends GetPotentialDriversAbstract {
710
+ }
711
+
712
+ export interface GetPotentialDriversAbstract {
713
+ fromDistrict?: string;
714
+ mobility?: Mobility;
715
+ vehicleType?: VehicleType;
716
+ weightInKg?: number;
685
717
  }
686
718
 
687
719
  export interface GetRide {
@@ -703,30 +735,38 @@ export interface GetRideLog {
703
735
  rideId?: string;
704
736
  }
705
737
 
706
- export interface GetRideSeries {
707
- rideSeriesId?: string;
738
+ export interface GetRideOrSeries {
739
+ id?: string;
708
740
  }
709
741
 
710
- export interface GetRideSeriesForDriver {
742
+ export interface GetRidesForDriver {
711
743
  accountId?: string;
712
744
  maxSize?: number;
713
745
  timeRange?: InstantRange;
714
746
  }
715
747
 
716
- export interface GetRidesForDriver {
748
+ export interface GetRidesInMarketplace {
717
749
  accountId?: string;
718
750
  maxSize?: number;
719
751
  timeRange?: InstantRange;
720
752
  }
721
753
 
722
- export interface GetRidesInMarketplace {
754
+ export interface GetRidesInSeries {
755
+ rideSeriesId?: string;
756
+ }
757
+
758
+ export interface GetSeriesForDriver {
723
759
  accountId?: string;
724
760
  maxSize?: number;
725
761
  timeRange?: InstantRange;
726
762
  }
727
763
 
728
- export interface GetRidesInSeries {
729
- filter?: RideFilter;
764
+ export interface GetSeriesInMarketplace {
765
+ accountId?: string;
766
+ maxSize?: number;
767
+ }
768
+
769
+ export interface GetSeriesLog {
730
770
  rideSeriesId?: string;
731
771
  }
732
772
 
@@ -756,6 +796,23 @@ export interface GiveTeamPermission extends AccountPermissionCommand {
756
796
  teamPermission?: TeamPermission;
757
797
  }
758
798
 
799
+ export interface HalfHourBeforeStart {
800
+ rideId?: string;
801
+ }
802
+
803
+ export interface HospitalOverviewFilter extends WebsocketFilter {
804
+ queryFilter?: FindMyRidesAndSeries;
805
+ screen: "hospital_overview";
806
+ }
807
+
808
+ export interface IGetPotentialDrivers {
809
+ fromDistrict?: string;
810
+ mobility?: Mobility;
811
+ toDistrict?: string;
812
+ vehicleType?: VehicleType;
813
+ weightInKg?: number;
814
+ }
815
+
759
816
  export interface ImpersonateUser {
760
817
  userId?: string;
761
818
  }
@@ -796,6 +853,11 @@ export interface IsoState {
796
853
  nutsCode?: string;
797
854
  }
798
855
 
856
+ export interface MarketplaceOverviewFilter extends WebsocketFilter {
857
+ queryFilter?: FindRidesAndSeriesInMarketplace;
858
+ screen: "marketplace";
859
+ }
860
+
799
861
  export interface Metric {
800
862
  clientId?: string;
801
863
  clientSegment?: number[];
@@ -806,6 +868,18 @@ export interface Metric {
806
868
  updates?: string[];
807
869
  }
808
870
 
871
+ /**
872
+ * A series of rides.
873
+ */
874
+ export interface MinimizedRideSeries extends RideSeries, RideOrMinimizedSeries {
875
+ info?: SeriesRideInfo;
876
+ }
877
+
878
+ export interface Notification {
879
+ body?: string;
880
+ title?: string;
881
+ }
882
+
809
883
  export interface NutsDistrict {
810
884
  code?: string;
811
885
  name?: string;
@@ -828,6 +902,15 @@ export interface OffsetTimeRange {
828
902
  start?: Date;
829
903
  }
830
904
 
905
+ export interface OneHourAfterEnd {
906
+ rideId?: string;
907
+ }
908
+
909
+ export interface OperationsOverviewFilter extends WebsocketFilter {
910
+ queryFilter?: FindRidesAndSeries;
911
+ screen: "operations_overview";
912
+ }
913
+
831
914
  export interface OptimizerMessage {
832
915
  }
833
916
 
@@ -844,7 +927,7 @@ export interface Person {
844
927
  }
845
928
 
846
929
  /**
847
- * Filled if (and only if) patient exceeds 130 kg
930
+ * Mandatory if weight exceeds 130 kg, otherwise forbidden
848
931
  */
849
932
  export interface PersonDimensions {
850
933
  heightInCm?: number;
@@ -864,7 +947,7 @@ export interface ReadUpdates {
864
947
  maxSize?: number;
865
948
  maxTimeout?: number;
866
949
  tokenId?: string;
867
- updateTypes?: TrackingUpdateType[];
950
+ updateTypes?: EntityType[];
868
951
  }
869
952
 
870
953
  export interface ReadUpdatesResult {
@@ -873,6 +956,24 @@ export interface ReadUpdatesResult {
873
956
  updates?: any[];
874
957
  }
875
958
 
959
+ export interface RefreshTokenData {
960
+ expiresAt?: string;
961
+ hashedToken?: string;
962
+ userId?: string;
963
+ }
964
+
965
+ export interface RefreshTokenService {
966
+ }
967
+
968
+ export interface RefreshUserToken {
969
+ refreshToken?: string;
970
+ }
971
+
972
+ export interface RefreshableAuthenticationResponse extends AuthenticationResponse {
973
+ refreshToken?: string;
974
+ refreshTokenDeadline?: string;
975
+ }
976
+
876
977
  export interface Region {
877
978
  nutsCode?: string;
878
979
  }
@@ -896,6 +997,14 @@ export interface RegisterEinsatz {
896
997
  export interface RemoveAccount extends AccountUpdate {
897
998
  }
898
999
 
1000
+ export interface RemoveOperations extends AccountUpdate {
1001
+ operateAccount?: string;
1002
+ }
1003
+
1004
+ export interface RemoveOperator extends AccountUpdate {
1005
+ operator?: string;
1006
+ }
1007
+
899
1008
  export interface RemoveSettings extends AccountUpdate {
900
1009
  type?: IntegrationType;
901
1010
  }
@@ -945,7 +1054,7 @@ export interface ResetPosition {
945
1054
  export interface ReturnRide extends RideDriverModifyCommand {
946
1055
  }
947
1056
 
948
- export interface ReturnRideSeries extends RideDriverSeriesCommand {
1057
+ export interface ReturnRideSeries extends SeriesDriverCommand {
949
1058
  }
950
1059
 
951
1060
  export interface Review {
@@ -968,6 +1077,9 @@ export interface RevokeDrivePermission extends AccountUpdate {
968
1077
  drivePermissionId?: string;
969
1078
  }
970
1079
 
1080
+ export interface RevokeSecondaryTokenPermission extends SecondaryTokenPermissionCommand {
1081
+ }
1082
+
971
1083
  export interface RevokeSubscription extends AccountUpdate {
972
1084
  subscriptionId?: string;
973
1085
  }
@@ -975,75 +1087,70 @@ export interface RevokeSubscription extends AccountUpdate {
975
1087
  export interface RevokeToken extends TokenUpdate {
976
1088
  }
977
1089
 
978
- export interface Ride {
1090
+ export interface RevokeUserRefreshTokens {
1091
+ userId?: string;
1092
+ }
1093
+
1094
+ export interface Ride extends RideOrSeries, RideOrMinimizedSeries {
979
1095
  /**
980
- * Derived from driver != null
1096
+ * 'accepted' is true if a driver has accepted the ride.
981
1097
  */
982
1098
  accepted?: boolean;
1099
+ acceptedTime?: string;
983
1100
  actualEndTime?: string;
984
1101
  actualStartTime?: string;
985
1102
  /**
986
- * Derived from driveStatus != null
1103
+ * 'arrived' is true if the driver has reported driveStatus is 'arrived_at_origin'.
987
1104
  */
988
1105
  arrived?: boolean;
989
1106
  /**
990
- * Derived from bookedTime != null
1107
+ * 'booked' is false if the ride has only been saved.
991
1108
  */
992
1109
  booked?: boolean;
993
- bookedTime?: string;
994
1110
  booker?: AccountOrTeamRef;
995
1111
  bookerReview?: Review;
996
- bookingStatus?: BookingStatus;
997
1112
  cancelReason?: string;
998
1113
  cancelled?: boolean;
999
1114
  /**
1000
- * Derived from driveStatus == completed
1115
+ * 'completed' is true if the driver has reported driveStatus is 'completed'.
1001
1116
  */
1002
1117
  completed?: boolean;
1003
1118
  /**
1004
- * Desired Time of Arrival at the Destination/Drop-off location. Derived from info.appointment and info.plannedDuration
1119
+ * 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.
1005
1120
  */
1006
1121
  desiredEndTime?: string;
1007
1122
  /**
1008
- * Desired Time of Arrival at the Origin/Pick-up location. Derived from info.appointment and info.plannedDuration
1123
+ * 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.
1009
1124
  */
1010
1125
  desiredStartTime?: string;
1011
1126
  driveStatus?: DriveStatus;
1012
- driver?: AccountOrTeamRef;
1013
1127
  driverReview?: Review;
1014
1128
  driverSyncStatus?: SyncStatus;
1015
1129
  endTimeDelay?: number;
1016
1130
  /**
1017
- * Expected Time of Arrival at the Destination/Drop-off location.
1131
+ * The driver determines the expectedEndTime when indicating delays. It means the expected time of arrival at the 'to' or 'drop-off' location.
1018
1132
  */
1019
1133
  expectedEndTime?: string;
1020
1134
  /**
1021
- * Expected Time of Arrival at the Origin/Pick-up location.
1135
+ * The driver determines the expectedEndTime when indicating delays. It means the expected time of arrival at the 'from' or 'pick-up' location.
1022
1136
  */
1023
1137
  expectedStartTime?: string;
1024
1138
  info?: RideInfo;
1139
+ marketplaceTime?: string;
1025
1140
  /**
1026
- * Derived from plannedStartTime != null
1141
+ * 'planned' is true if the driver has reported a planned time for the ride.
1027
1142
  */
1028
1143
  planned?: boolean;
1029
1144
  /**
1030
- * Planned Time of Arrival at the Destination/Drop-off location, reported by the driver.
1145
+ * The driver determines the plannedEndTime. It means the planned time of arrival at the 'to' or 'drop-off' location.
1031
1146
  */
1032
1147
  plannedEndTime?: string;
1033
1148
  plannedStartTime?: string;
1034
1149
  rideId?: string;
1035
- /**
1036
- * The time until which rides can be found. It's the planned time or else the desired time.
1037
- */
1038
- searchEndTime?: string;
1039
- /**
1040
- * The time from which rides can be found. It's the planned time or else the desired time.
1041
- */
1042
- searchStartTime?: string;
1043
1150
  seriesInfo?: SeriesInfo;
1044
1151
  startTimeDelay?: number;
1045
1152
  /**
1046
- * Derived from driveStatus != null
1153
+ * 'started' is true if the driver has reported a driveStatus.
1047
1154
  */
1048
1155
  started?: boolean;
1049
1156
  }
@@ -1051,9 +1158,6 @@ export interface Ride {
1051
1158
  export interface RideBookerCommand extends RideCommand {
1052
1159
  }
1053
1160
 
1054
- export interface RideBookerSeriesCommand extends RideSeriesCommand {
1055
- }
1056
-
1057
1161
  export interface RideCommand {
1058
1162
  rideId?: string;
1059
1163
  }
@@ -1064,16 +1168,19 @@ export interface RideDriverCommand extends RideCommand {
1064
1168
  export interface RideDriverModifyCommand extends RideDriverCommand {
1065
1169
  }
1066
1170
 
1067
- export interface RideDriverSeriesCommand extends RideSeriesPreConfirmCommand {
1068
- }
1069
-
1070
- /**
1071
- * All durations in seconds
1072
- */
1073
1171
  export interface RideDuration {
1074
1172
  driving?: number;
1173
+ /**
1174
+ * Seconds of slack for dropping off the patient, currently hardcoded to 15 minutes
1175
+ */
1075
1176
  droppingOff?: number;
1177
+ /**
1178
+ * Seconds of slack for picking up the patient, currently hardcoded to 15 minutes
1179
+ */
1076
1180
  pickingUp?: number;
1181
+ /**
1182
+ * Seconds of driving time plus the pick-up and drop-off slack times
1183
+ */
1077
1184
  total?: number;
1078
1185
  }
1079
1186
 
@@ -1082,6 +1189,7 @@ export interface RideFilter {
1082
1189
  driveStatuses?: DriveStatus[];
1083
1190
  driverAccountNames?: string[];
1084
1191
  driverTeamNames?: string[];
1192
+ entityType?: EntityType;
1085
1193
  hasInfection?: boolean;
1086
1194
  heavyWeight?: boolean;
1087
1195
  mobilities?: Mobility[];
@@ -1093,6 +1201,7 @@ export interface RideFilter {
1093
1201
  riderAccountNames?: string[];
1094
1202
  riderTeamNames?: string[];
1095
1203
  timeRange?: InstantRange;
1204
+ unfoldRideSeries?: boolean;
1096
1205
  vehicleType?: VehicleType;
1097
1206
  }
1098
1207
 
@@ -1118,41 +1227,9 @@ export interface RideIdResult {
1118
1227
  rideId?: string;
1119
1228
  }
1120
1229
 
1121
- /**
1122
- * Information about the ride, from the creator of the ride
1123
- */
1124
- export interface RideInfo {
1125
- ambulanceInfo?: AmbulanceInfo;
1230
+ export interface RideInfo extends GenericRideInfo {
1126
1231
  appointment?: Appointment;
1127
- attendantsPresent?: number;
1128
- comment?: string;
1129
- dimensions?: PersonDimensions;
1130
- distanceInMeters?: number;
1131
- from?: AddressInfo;
1132
- /**
1133
- * Derived from weightInKg != null
1134
- */
1135
- heavyWeight?: boolean;
1136
- mobility?: Mobility;
1137
- patient?: Person;
1138
- plannedDuration?: RideDuration;
1139
- preferredDriver?: string;
1140
1232
  purpose?: RidePurpose;
1141
- to?: AddressInfo;
1142
- vehicleType?: VehicleType;
1143
- weightInKg?: number;
1144
- }
1145
-
1146
- export interface RideInfoFilter {
1147
- hasInfection?: boolean;
1148
- heavyWeight?: boolean;
1149
- mobilities?: Mobility[];
1150
- purposes?: RidePurpose[];
1151
- region?: Region;
1152
- requiresMonitoring?: boolean;
1153
- requiresOxygen?: boolean;
1154
- requiresSuctionAspirator?: boolean;
1155
- vehicleType?: VehicleType;
1156
1233
  }
1157
1234
 
1158
1235
  export interface RideLog {
@@ -1171,39 +1248,64 @@ export interface RideLog {
1171
1248
  token?: boolean;
1172
1249
  }
1173
1250
 
1174
- export interface RideOfferInfo {
1175
- appointment?: Appointment;
1251
+ export interface RideOperatorCommand extends RideCommand {
1176
1252
  }
1177
1253
 
1178
- export interface RideSeries {
1179
- accepted?: boolean;
1180
- booked?: boolean;
1181
- booker?: AccountOrTeamRef;
1182
- cancelled?: boolean;
1183
- confirmed?: boolean;
1184
- driver?: AccountOrTeamRef;
1185
- endTime?: string;
1254
+ export interface RideOrMinimizedSeries {
1255
+ bookingStatus?: BookingStatus;
1256
+ entityType?: EntityType;
1186
1257
  info?: GenericRideInfo;
1187
- rideSeriesId?: string;
1188
- rides?: SingleRide[];
1189
- startTime?: string;
1190
- status?: RideSeriesStatus;
1258
+ searchEndTime?: string;
1259
+ searchStartTime?: string;
1191
1260
  }
1192
1261
 
1193
- export interface RideSeriesCommand {
1194
- rideSeriesId?: string;
1262
+ export interface RideOrSeries {
1263
+ bookedTime?: string;
1264
+ bookingStatus?: BookingStatus;
1265
+ cleaningAndSlack?: CleaningAndSlack;
1266
+ driver?: AccountOrTeamRef;
1267
+ entityType?: EntityType;
1268
+ info?: GenericRideInfo;
1269
+ totalDuration?: number;
1195
1270
  }
1196
1271
 
1197
- export interface RideSeriesIdResult {
1272
+ /**
1273
+ * A series of rides.
1274
+ */
1275
+ export interface RideSeries extends RideOrSeries {
1276
+ /**
1277
+ * 'accepted' is true if a driver has accepted the series.
1278
+ */
1279
+ accepted?: boolean;
1280
+ acceptedTime?: string;
1281
+ /**
1282
+ * The number of rides in the series that are not cancelled.
1283
+ */
1284
+ activeRideCount?: number;
1285
+ /**
1286
+ * 'booked' is false if the series has only been saved.
1287
+ */
1288
+ booked?: boolean;
1289
+ booker?: AccountOrTeamRef;
1290
+ cancelReason?: string;
1291
+ cancelled?: boolean;
1292
+ info?: SeriesRideInfo;
1293
+ marketplaceTime?: string;
1198
1294
  rideSeriesId?: string;
1295
+ rides?: Ride[];
1296
+ ridesSummaries?: RideSummary[];
1297
+ /**
1298
+ * searchEndTime is the time from which series can be found in our system. It's the searchEndTime of the last ride in the series.
1299
+ */
1300
+ searchEndTime?: string;
1301
+ /**
1302
+ * searchStartTime is the time from which series can be found in our system. It's the searchStartTime of the first ride in the series.
1303
+ */
1304
+ searchStartTime?: string;
1199
1305
  }
1200
1306
 
1201
- export interface RideSeriesPostConfirmCommand {
1307
+ export interface RideSeriesIdResult {
1202
1308
  rideSeriesId?: string;
1203
- ridesToModify?: Ride[];
1204
- }
1205
-
1206
- export interface RideSeriesPreConfirmCommand extends RideSeriesCommand {
1207
1309
  }
1208
1310
 
1209
1311
  export interface RideSeriesUpdate {
@@ -1216,11 +1318,23 @@ export interface RideSeriesUpdate {
1216
1318
  type: "rideseries";
1217
1319
  }
1218
1320
 
1321
+ export interface RideSeriesUtils {
1322
+ }
1323
+
1219
1324
  export interface RideStatisticsQuery {
1220
1325
  dateRange?: DateRange;
1221
1326
  zoneId?: string;
1222
1327
  }
1223
1328
 
1329
+ /**
1330
+ * Individual ride timing within a series. Once a ride series is accepted, you cannot add rides, only remove
1331
+ */
1332
+ export interface RideSummary {
1333
+ appointmentTime?: string;
1334
+ returnTrip?: boolean;
1335
+ rideId?: string;
1336
+ }
1337
+
1224
1338
  export interface RideSystemCommand extends RideCommand {
1225
1339
  }
1226
1340
 
@@ -1237,17 +1351,24 @@ export interface RideUpdate {
1237
1351
  type: "ride";
1238
1352
  }
1239
1353
 
1240
- export interface Role<T> {
1354
+ export interface Role {
1241
1355
  }
1242
1356
 
1243
1357
  /**
1244
1358
  * Save a new ride or update a previously saved ride. Not allowed to saveRide after the ride has been booked.
1245
1359
  */
1246
1360
  export interface SaveRide extends CreateRideCommand {
1247
- booker?: AccountOrTeamRef;
1248
1361
  info?: RideInfo;
1249
1362
  }
1250
1363
 
1364
+ export interface SaveRideSeries extends CreateSeriesCommand {
1365
+ rideSummaries?: RideSummary[];
1366
+ }
1367
+
1368
+ export interface SecondaryTokenPermissionCommand extends TokenUpdate {
1369
+ accountId?: string;
1370
+ }
1371
+
1251
1372
  export interface SendConfirmationEmail {
1252
1373
  userId?: string;
1253
1374
  }
@@ -1259,6 +1380,7 @@ export interface SendEmail {
1259
1380
  export interface SendFreshdeskNewTicket {
1260
1381
  email?: string;
1261
1382
  message?: string;
1383
+ subject?: string;
1262
1384
  }
1263
1385
 
1264
1386
  export interface SendInvitationEmail {
@@ -1271,12 +1393,52 @@ export interface SendSlack {
1271
1393
  message?: string;
1272
1394
  }
1273
1395
 
1396
+ export interface SendToFirebase {
1397
+ message?: FirebaseMessage;
1398
+ }
1399
+
1400
+ export interface SeriesBookerCommand extends SeriesCommand {
1401
+ }
1402
+
1403
+ export interface SeriesCommand {
1404
+ rideSeriesId?: string;
1405
+ }
1406
+
1407
+ export interface SeriesCommandWithSeparateEvent {
1408
+ rideSeriesId?: string;
1409
+ }
1410
+
1411
+ export interface SeriesDriverCommand extends SeriesCommand {
1412
+ }
1413
+
1274
1414
  /**
1275
- * Information about a ride that is part of series.
1415
+ * If the ride is part of a series, seriesInfo will contain context about the position of the ride within the series.
1276
1416
  */
1277
1417
  export interface SeriesInfo {
1418
+ desyncedFromSeries?: boolean;
1419
+ positionInSeries?: number;
1278
1420
  returnTrip?: boolean;
1279
1421
  rideSeriesId?: string;
1422
+ totalRidesInSeries?: number;
1423
+ }
1424
+
1425
+ export interface SeriesOperatorCommand extends SeriesCommand {
1426
+ }
1427
+
1428
+ export interface SeriesRideInfo extends GenericRideInfo {
1429
+ purpose?: SeriesPurpose;
1430
+ }
1431
+
1432
+ export interface SetOperations extends AccountUpdate {
1433
+ operateAccounts?: string[];
1434
+ }
1435
+
1436
+ export interface SetOperator extends AccountUpdate {
1437
+ operator?: string;
1438
+ }
1439
+
1440
+ export interface SetSecondaryTokenPermission extends SecondaryTokenPermissionCommand {
1441
+ accountPermission?: AccountPermission;
1280
1442
  }
1281
1443
 
1282
1444
  export interface SetSettings extends AccountUpdate {
@@ -1306,19 +1468,6 @@ export interface SignUpUser {
1306
1468
  userId?: string;
1307
1469
  }
1308
1470
 
1309
- /**
1310
- * Individual ride timing within a series
1311
- */
1312
- export interface SingleRide {
1313
- desiredStartTime?: string;
1314
- returnTrip?: boolean;
1315
- }
1316
-
1317
- export interface SingleRideUpdate {
1318
- desiredStartTime?: string;
1319
- rideId?: string;
1320
- }
1321
-
1322
1471
  export interface StopImpersonatingUser {
1323
1472
  }
1324
1473
 
@@ -1368,10 +1517,11 @@ export interface TimedPermission {
1368
1517
  }
1369
1518
 
1370
1519
  export interface Token {
1371
- accountPermission?: AccountPermission;
1520
+ accountPermissions?: AccountPermission[];
1372
1521
  createdBy?: string;
1373
1522
  info?: TokenInfo;
1374
1523
  lastUpdatedBy?: string;
1524
+ owner?: string;
1375
1525
  revoked?: boolean;
1376
1526
  tokenId?: string;
1377
1527
  }
@@ -1414,9 +1564,19 @@ export interface UpdateRidePlan extends RideDriverModifyCommand {
1414
1564
  plannedStartTime?: string;
1415
1565
  }
1416
1566
 
1417
- export interface UpdateRideSeries extends RideBookerSeriesCommand {
1418
- info?: GenericRideInfo;
1419
- rides?: SingleRide[];
1567
+ export interface UpdateRideSeries extends SeriesCommandWithSeparateEvent {
1568
+ booker?: AccountOrTeamRef;
1569
+ info?: SeriesRideInfo;
1570
+ rideSummaries?: RideSummary[];
1571
+ }
1572
+
1573
+ export interface UpdateRideSeriesEvent extends SeriesBookerCommand {
1574
+ addRides?: string[];
1575
+ booker?: AccountOrTeamRef;
1576
+ cancelRides?: string[];
1577
+ info?: SeriesRideInfo;
1578
+ rideSummaries?: RideSummary[];
1579
+ updateRides?: string[];
1420
1580
  }
1421
1581
 
1422
1582
  export interface UpdateTeam extends TeamUpdate {
@@ -1470,21 +1630,45 @@ export interface UserUpdate extends UserCommand {
1470
1630
  export interface UserUpdateAfterSignup extends UserUpdate {
1471
1631
  }
1472
1632
 
1633
+ export interface WebsocketFilter {
1634
+ screen: "ride_details" | "fleet_overview" | "hospital_overview" | "marketplace" | "operations_overview";
1635
+ }
1636
+
1637
+ export interface WebsocketMultipleUpdates extends WebsocketUpdate {
1638
+ ridesAndSeries?: RideOrMinimizedSeries[];
1639
+ ridesCount?: RideFilterCount;
1640
+ type: "multiple_updates";
1641
+ }
1642
+
1643
+ export interface WebsocketSingleUpdate extends WebsocketUpdate {
1644
+ id?: string;
1645
+ rideOrSeries?: RideOrMinimizedSeries;
1646
+ type: "single_update";
1647
+ }
1648
+
1649
+ export interface WebsocketUpdate {
1650
+ type: "multiple_updates" | "single_update";
1651
+ }
1652
+
1473
1653
  export interface ZonedTimeRange {
1474
1654
  end?: Date;
1475
1655
  start?: Date;
1476
1656
  }
1477
1657
 
1478
- export type AccountRole = "ridebooker" | "dispatcher" | "admin" | "owner";
1658
+ export type AccountRole = "ridebooker" | "dispatcher" | "operator" | "admin" | "owner";
1479
1659
 
1480
1660
  export type AuthenticationResult = "SUCCESS" | "NOT_CONFIRMED";
1481
1661
 
1482
1662
  export type BookingStatus = "saved" | "booked" | "accepted" | "planned" | "started" | "completed" | "cancelled";
1483
1663
 
1664
+ export type DocumentType = "businessLicense" | "publicLiabilityPolicy";
1665
+
1484
1666
  export type DrivePermissionFilterUnion = AmbulanceFilter | TaxiFilter;
1485
1667
 
1486
1668
  export type DriveStatus = "driving_to_origin" | "arrived_at_origin" | "driving_to_destination" | "arrived_at_destination" | "completed";
1487
1669
 
1670
+ export type EntityType = "ride" | "rideseries";
1671
+
1488
1672
  export type GeometryUnion = GeoPolygon | GeoMultiPolygon;
1489
1673
 
1490
1674
  export type InsuranceType = "public_insurance" | "private_insurance" | "german_accident_insurance" | "no_or_unknown_insurance";
@@ -1493,24 +1677,30 @@ export type IntegrationType = "dispolive" | "celios";
1493
1677
 
1494
1678
  export type Mobility = "wheelchair" | "big_or_electric_wheelchair" | "carry_chair" | "stretcher";
1495
1679
 
1496
- export type OrganisationType = "medical" | "fleet";
1680
+ export type OrganisationType = "medical" | "fleet" | "operator";
1497
1681
 
1498
1682
  export type RidePurpose = "admission" | "relocation" | "discharge" | "consultation";
1499
1683
 
1500
- export type RideSeriesStatus = "booked" | "accepted" | "confirmed" | "cancelled";
1684
+ export type Screen = "marketplace" | "operations_overview" | "hospital_overview" | "fleet_overview" | "ride_details";
1685
+
1686
+ export type SeriesPurpose = "consultation";
1501
1687
 
1502
- export type Service = "pro_medical" | "pro_fleet" | "celios_integration" | "dispolive_integration" | "ride_series";
1688
+ export type Service = "pro_medical" | "pro_fleet" | "pro_operator" | "celios_integration" | "dispolive_integration" | "moxi_operations";
1503
1689
 
1504
1690
  export type SlackChannel = "admin_monitoring" | "admin_respond_immediately" | "admin_respond_within_hour" | "admin_reported_issues";
1505
1691
 
1506
- export type StandaloneService = "pro_medical" | "pro_fleet";
1692
+ export type StandaloneService = "pro_medical" | "pro_fleet" | "pro_operator";
1507
1693
 
1508
1694
  export type SyncStatus = "not_synced" | "synced" | "update_not_synced";
1509
1695
 
1510
1696
  export type TeamRole = "dispatcher" | "ridebooker";
1511
1697
 
1512
- export type TrackingUpdateType = "ride" | "rideseries";
1513
-
1514
1698
  export type UserRole = "superadmin";
1515
1699
 
1516
1700
  export type VehicleType = "taxi" | "ambulance";
1701
+
1702
+ export type WebsocketFilterUnion = MarketplaceOverviewFilter | HospitalOverviewFilter | FleetOverviewFilter | OperationsOverviewFilter | DetailsFilter;
1703
+
1704
+ export type WebsocketUpdateType = "single_update" | "multiple_updates";
1705
+
1706
+ 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.1301-test-server",
3
+ "version": "0.1.1301",
4
4
  "types": "common.d.ts"
5
5
  }