@tmlmobilidade/interfaces 20260615.1553.39 → 20260615.2224.24

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.
@@ -1,3 +1,4 @@
1
+ import { type OptionalIf } from '@tmlmobilidade/types';
1
2
  import { Filter } from 'mongodb';
2
3
  interface MatchStage<T> {
3
4
  $match: Filter<T>;
@@ -35,13 +36,21 @@ interface AddFieldsStage {
35
36
  $addFields: Record<string, any>;
36
37
  }
37
38
  interface LookupStage {
38
- $lookup: {
39
+ $lookup: OptionalIf<{
39
40
  as: string;
40
- foreignField: string;
41
+ foreignField?: string;
41
42
  from: string;
42
- localField: string;
43
- };
43
+ let?: Record<string, any>;
44
+ localField?: string;
45
+ pipeline?: any[];
46
+ }, 'pipeline', 'foreignField' | 'localField'>;
47
+ }
48
+ interface SetStage {
49
+ $set: Record<string, any>;
50
+ }
51
+ interface UnsetStage {
52
+ $unset: string | string[];
44
53
  }
45
- type AggregationStage<T> = AddFieldsStage | GroupStage | LimitStage | LookupStage | MatchStage<T> | ProjectStage<T> | ReplaceRootStage | SkipStage | SortStage<T> | UnwindStage;
54
+ type AggregationStage<T> = AddFieldsStage | GroupStage | LimitStage | LookupStage | MatchStage<T> | ProjectStage<T> | ReplaceRootStage | SetStage | SkipStage | SortStage<T> | UnsetStage | UnwindStage;
46
55
  export type AggregationPipeline<T> = AggregationStage<T>[];
47
56
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmlmobilidade/interfaces",
3
- "version": "20260615.1553.39",
3
+ "version": "20260615.2224.24",
4
4
  "author": {
5
5
  "email": "iso@tmlmobilidade.pt",
6
6
  "name": "TML-ISO"