@tmlmobilidade/interfaces 20260421.1115.34 → 20260424.1050.20
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.
|
@@ -68,7 +68,7 @@ export declare abstract class MongoCollectionClass<T extends Document, TCreate,
|
|
|
68
68
|
* @param key The key to find distinct values for.
|
|
69
69
|
* @returns A promise that resolves to an array of distinct values for the given key.
|
|
70
70
|
*/
|
|
71
|
-
distinct<Key extends keyof WithId<T>>(key: Key, filter
|
|
71
|
+
distinct<Key extends keyof WithId<T>>(key: Key, filter?: Filter<T>): Promise<Array<Flatten<WithId<T>[Key]>>>;
|
|
72
72
|
/**
|
|
73
73
|
* Checks if a document with the given key and value exists in the collection.
|
|
74
74
|
* @param key The key to check for existence.
|
|
@@ -107,8 +107,13 @@ export class MongoCollectionClass {
|
|
|
107
107
|
async disconnect() {
|
|
108
108
|
await this.mongoConnector.disconnect();
|
|
109
109
|
}
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
/**
|
|
111
|
+
* Finds all distinct values for a key in the collection.
|
|
112
|
+
* @param key The key to find distinct values for.
|
|
113
|
+
* @returns A promise that resolves to an array of distinct values for the given key.
|
|
114
|
+
*/
|
|
115
|
+
async distinct(key, filter) {
|
|
116
|
+
return this.mongoCollection.distinct(key, filter);
|
|
112
117
|
}
|
|
113
118
|
/**
|
|
114
119
|
* Checks if a document with the given key and value exists in the collection.
|
|
@@ -62,6 +62,13 @@ declare class EventsClass extends MongoCollectionClass<Event, CreateEventDto, Up
|
|
|
62
62
|
lines_to_include?: string[] | undefined;
|
|
63
63
|
same_weekday?: boolean | undefined;
|
|
64
64
|
})[];
|
|
65
|
+
associated_patterns: {
|
|
66
|
+
_id: string;
|
|
67
|
+
code: string;
|
|
68
|
+
line_id: string;
|
|
69
|
+
headsign: string;
|
|
70
|
+
route_id: string;
|
|
71
|
+
}[];
|
|
65
72
|
updated_by?: string | undefined;
|
|
66
73
|
}>[]>;
|
|
67
74
|
protected getCollectionIndexes(): IndexDescription[];
|
|
@@ -69,6 +69,8 @@ declare class PatternsClass extends MongoCollectionClass<Pattern, CreatePatternD
|
|
|
69
69
|
lines_to_include?: string[] | undefined;
|
|
70
70
|
same_weekday?: boolean | undefined;
|
|
71
71
|
})[];
|
|
72
|
+
headsign: string;
|
|
73
|
+
route_id: string;
|
|
72
74
|
comments: ({
|
|
73
75
|
created_at: number & {
|
|
74
76
|
__brand: "UnixTimestamp";
|
|
@@ -115,8 +117,6 @@ declare class PatternsClass extends MongoCollectionClass<Pattern, CreatePatternD
|
|
|
115
117
|
_id?: string | undefined;
|
|
116
118
|
updated_by?: string | undefined;
|
|
117
119
|
})[];
|
|
118
|
-
headsign: string;
|
|
119
|
-
route_id: string;
|
|
120
120
|
destination: string;
|
|
121
121
|
direction: "outbound" | "inbound";
|
|
122
122
|
origin: string;
|
|
@@ -28,10 +28,10 @@ declare class RidesClass extends MongoCollectionClass<Ride, CreateRideDto, Updat
|
|
|
28
28
|
pattern_id: string;
|
|
29
29
|
trip_id: string;
|
|
30
30
|
seen_last_at: import("@tmlmobilidade/types").UnixTimestamp | null;
|
|
31
|
-
driver_ids: string[];
|
|
32
31
|
headsign: string;
|
|
33
|
-
plan_id: string;
|
|
34
32
|
route_id: string;
|
|
33
|
+
driver_ids: string[];
|
|
34
|
+
plan_id: string;
|
|
35
35
|
vehicle_ids: number[];
|
|
36
36
|
operational_date: string & {
|
|
37
37
|
__brand: "OperationalDate";
|
|
@@ -177,10 +177,10 @@ declare class RidesClass extends MongoCollectionClass<Ride, CreateRideDto, Updat
|
|
|
177
177
|
pattern_id: string;
|
|
178
178
|
trip_id: string;
|
|
179
179
|
seen_last_at: import("@tmlmobilidade/types").UnixTimestamp | null;
|
|
180
|
-
driver_ids: string[];
|
|
181
180
|
headsign: string;
|
|
182
|
-
plan_id: string;
|
|
183
181
|
route_id: string;
|
|
182
|
+
driver_ids: string[];
|
|
183
|
+
plan_id: string;
|
|
184
184
|
vehicle_ids: number[];
|
|
185
185
|
operational_date: string & {
|
|
186
186
|
__brand: "OperationalDate";
|
|
@@ -326,10 +326,10 @@ declare class RidesClass extends MongoCollectionClass<Ride, CreateRideDto, Updat
|
|
|
326
326
|
pattern_id: string;
|
|
327
327
|
trip_id: string;
|
|
328
328
|
seen_last_at: import("@tmlmobilidade/types").UnixTimestamp | null;
|
|
329
|
-
driver_ids: string[];
|
|
330
329
|
headsign: string;
|
|
331
|
-
plan_id: string;
|
|
332
330
|
route_id: string;
|
|
331
|
+
driver_ids: string[];
|
|
332
|
+
plan_id: string;
|
|
333
333
|
vehicle_ids: number[];
|
|
334
334
|
operational_date: string & {
|
|
335
335
|
__brand: "OperationalDate";
|
|
@@ -475,10 +475,10 @@ declare class RidesClass extends MongoCollectionClass<Ride, CreateRideDto, Updat
|
|
|
475
475
|
pattern_id: string;
|
|
476
476
|
trip_id: string;
|
|
477
477
|
seen_last_at: import("@tmlmobilidade/types").UnixTimestamp | null;
|
|
478
|
-
driver_ids: string[];
|
|
479
478
|
headsign: string;
|
|
480
|
-
plan_id: string;
|
|
481
479
|
route_id: string;
|
|
480
|
+
driver_ids: string[];
|
|
481
|
+
plan_id: string;
|
|
482
482
|
vehicle_ids: number[];
|
|
483
483
|
operational_date: string & {
|
|
484
484
|
__brand: "OperationalDate";
|
|
@@ -624,10 +624,10 @@ declare class RidesClass extends MongoCollectionClass<Ride, CreateRideDto, Updat
|
|
|
624
624
|
pattern_id: string;
|
|
625
625
|
trip_id: string;
|
|
626
626
|
seen_last_at: import("@tmlmobilidade/types").UnixTimestamp | null;
|
|
627
|
-
driver_ids: string[];
|
|
628
627
|
headsign: string;
|
|
629
|
-
plan_id: string;
|
|
630
628
|
route_id: string;
|
|
629
|
+
driver_ids: string[];
|
|
630
|
+
plan_id: string;
|
|
631
631
|
vehicle_ids: number[];
|
|
632
632
|
operational_date: string & {
|
|
633
633
|
__brand: "OperationalDate";
|
|
@@ -773,10 +773,10 @@ declare class RidesClass extends MongoCollectionClass<Ride, CreateRideDto, Updat
|
|
|
773
773
|
pattern_id: string;
|
|
774
774
|
trip_id: string;
|
|
775
775
|
seen_last_at: import("@tmlmobilidade/types").UnixTimestamp | null;
|
|
776
|
-
driver_ids: string[];
|
|
777
776
|
headsign: string;
|
|
778
|
-
plan_id: string;
|
|
779
777
|
route_id: string;
|
|
778
|
+
driver_ids: string[];
|
|
779
|
+
plan_id: string;
|
|
780
780
|
vehicle_ids: number[];
|
|
781
781
|
operational_date: string & {
|
|
782
782
|
__brand: "OperationalDate";
|