Skip to content

Commit 6a968aa

Browse files
committed
API report review and fixes
1 parent f817c54 commit 6a968aa

File tree

10 files changed

+260
-238
lines changed

10 files changed

+260
-238
lines changed

common/api-review/firestore-lite-pipelines.api.md

Lines changed: 31 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export function add(first: Expression, second: Expression | unknown): FunctionEx
1818
// @beta
1919
export function add(fieldName: string, second: Expression | unknown): FunctionExpression;
2020

21-
// @public
21+
// @beta
2222
export type AddFieldsStageOptions = StageOptions & {
2323
fields: Selectable[];
2424
};
@@ -31,7 +31,7 @@ export class AggregateFunction {
3131
exprType: ExpressionType;
3232
}
3333

34-
// @public
34+
// @beta
3535
export type AggregateStageOptions = StageOptions & {
3636
accumulators: AliasedAggregate[];
3737
groups?: Array<string | Selectable>;
@@ -171,7 +171,7 @@ export function charLength(fieldName: string): FunctionExpression;
171171
// @beta
172172
export function charLength(stringExpression: Expression): FunctionExpression;
173173

174-
// @public
174+
// @beta
175175
export type CollectionGroupStageOptions = StageOptions & {
176176
collectionId: string;
177177
forceIndex?: string;
@@ -183,7 +183,7 @@ export function collectionId(fieldName: string): FunctionExpression;
183183
// @beta
184184
export function collectionId(expression: Expression): FunctionExpression;
185185

186-
// @public
186+
// @beta
187187
export type CollectionStageOptions = StageOptions & {
188188
collection: string | Query;
189189
forceIndex?: string;
@@ -268,7 +268,7 @@ export function countIf(booleanExpr: BooleanExpression): AggregateFunction;
268268
// @beta
269269
export function currentTimestamp(): FunctionExpression;
270270

271-
// @public
271+
// @beta
272272
export type DatabaseStageOptions = StageOptions & {};
273273

274274
// @beta
@@ -277,7 +277,7 @@ export function descending(expr: Expression): Ordering;
277277
// @beta
278278
export function descending(fieldName: string): Ordering;
279279

280-
// @public
280+
// @beta
281281
export type DistinctStageOptions = StageOptions & {
282282
groups: Array<string | Selectable>;
283283
};
@@ -300,7 +300,7 @@ export function documentId(documentPath: string | DocumentReference): FunctionEx
300300
// @beta
301301
export function documentId(documentPathExpr: Expression): FunctionExpression;
302302

303-
// @public
303+
// @beta
304304
export type DocumentsStageOptions = StageOptions & {
305305
docs: Array<string | DocumentReference>;
306306
};
@@ -647,12 +647,11 @@ export class Field extends Expression implements Selectable {
647647
export function field(name: string): Field;
648648

649649
// Warning: (ae-forgotten-export) The symbol "FieldPath" needs to be exported by the entry point pipelines.d.ts
650-
// Warning: (ae-incompatible-release-tags) The symbol "field" is marked as @public, but its signature references "Field" which is marked as @beta
651650
//
652-
// @public (undocumented)
651+
// @beta
653652
export function field(path: FieldPath): Field;
654653

655-
// @public
654+
// @beta
656655
export type FindNearestStageOptions = StageOptions & {
657656
field: Field | string;
658657
vectorValue: VectorValue | number[];
@@ -785,7 +784,7 @@ export function like(stringExpression: Expression, pattern: string): BooleanExpr
785784
// @beta
786785
export function like(stringExpression: Expression, pattern: Expression): BooleanExpression;
787786

788-
// @public
787+
// @beta
789788
export type LimitStageOptions = StageOptions & {
790789
limit: number;
791790
};
@@ -910,12 +909,12 @@ export function notEqualAny(element: Expression, arrayExpression: Expression): B
910909
// @beta
911910
export function notEqualAny(fieldName: string, arrayExpression: Expression): BooleanExpression;
912911

913-
// @public
912+
// @beta
914913
export type OffsetStageOptions = StageOptions & {
915914
offset: number;
916915
};
917916

918-
// @public
917+
// @beta
919918
export type OneOf<T> = {
920919
[K in keyof T]: Pick<T, K> & {
921920
[P in Exclude<keyof T, K>]?: undefined;
@@ -937,64 +936,40 @@ export class Ordering {
937936
// @beta
938937
export class Pipeline {
939938
/* Excluded from this release type: _db */
940-
addFields(field: Selectable, ...additionalFields: Selectable[]): Pipeline;
939+
/* Excluded from this release type: userDataReader */
941940
/* Excluded from this release type: _userDataWriter */
941+
/* Excluded from this release type: stages */
942+
/* Excluded from this release type: __constructor */
943+
addFields(field: Selectable, ...additionalFields: Selectable[]): Pipeline;
942944
addFields(options: AddFieldsStageOptions): Pipeline;
943-
/* Excluded from this release type: _userDataWriter */
944945
aggregate(accumulator: AliasedAggregate, ...additionalAccumulators: AliasedAggregate[]): Pipeline;
945-
/* Excluded from this release type: _userDataWriter */
946946
aggregate(options: AggregateStageOptions): Pipeline;
947-
/* Excluded from this release type: _userDataWriter */
948947
distinct(group: string | Selectable, ...additionalGroups: Array<string | Selectable>): Pipeline;
949-
/* Excluded from this release type: _userDataWriter */
950948
distinct(options: DistinctStageOptions): Pipeline;
951-
/* Excluded from this release type: _userDataWriter */
952949
findNearest(options: FindNearestStageOptions): Pipeline;
953-
/* Excluded from this release type: _userDataWriter */
954950
limit(limit: number): Pipeline;
955-
/* Excluded from this release type: _userDataWriter */
956951
limit(options: LimitStageOptions): Pipeline;
957-
/* Excluded from this release type: _userDataWriter */
958952
offset(offset: number): Pipeline;
959-
/* Excluded from this release type: _userDataWriter */
960953
offset(options: OffsetStageOptions): Pipeline;
961-
/* Excluded from this release type: _userDataWriter */
962954
rawStage(name: string, params: unknown[], options?: {
963955
[key: string]: Expression | unknown;
964956
}): Pipeline;
965-
/* Excluded from this release type: _userDataWriter */
966957
removeFields(fieldValue: Field | string, ...additionalFields: Array<Field | string>): Pipeline;
967-
/* Excluded from this release type: _userDataWriter */
968958
removeFields(options: RemoveFieldsStageOptions): Pipeline;
969-
/* Excluded from this release type: _userDataWriter */
970959
replaceWith(fieldName: string): Pipeline;
971-
/* Excluded from this release type: _userDataWriter */
972960
replaceWith(expr: Expression): Pipeline;
973-
/* Excluded from this release type: _userDataWriter */
974961
replaceWith(options: ReplaceWithStageOptions): Pipeline;
975-
/* Excluded from this release type: _userDataWriter */
976962
sample(documents: number): Pipeline;
977-
/* Excluded from this release type: _userDataWriter */
978963
sample(options: SampleStageOptions): Pipeline;
979-
/* Excluded from this release type: _userDataWriter */
980964
select(selection: Selectable | string, ...additionalSelections: Array<Selectable | string>): Pipeline;
981-
/* Excluded from this release type: _userDataWriter */
982965
select(options: SelectStageOptions): Pipeline;
983-
/* Excluded from this release type: _userDataWriter */
984966
sort(ordering: Ordering, ...additionalOrderings: Ordering[]): Pipeline;
985-
/* Excluded from this release type: _userDataWriter */
986967
sort(options: SortStageOptions): Pipeline;
987-
/* Excluded from this release type: _userDataWriter */
988968
union(other: Pipeline): Pipeline;
989-
/* Excluded from this release type: _userDataWriter */
990969
union(options: UnionStageOptions): Pipeline;
991-
/* Excluded from this release type: _userDataWriter */
992970
unnest(selectable: Selectable, indexField?: string): Pipeline;
993-
/* Excluded from this release type: _userDataWriter */
994971
unnest(options: UnnestStageOptions): Pipeline;
995-
/* Excluded from this release type: _userDataWriter */
996972
where(condition: BooleanExpression): Pipeline;
997-
/* Excluded from this release type: _userDataWriter */
998973
where(options: WhereStageOptions): Pipeline;
999974
}
1000975

@@ -1069,12 +1044,12 @@ export function regexMatch(stringExpression: Expression, pattern: string): Boole
10691044
// @beta
10701045
export function regexMatch(stringExpression: Expression, pattern: Expression): BooleanExpression;
10711046

1072-
// @public
1047+
// @beta
10731048
export type RemoveFieldsStageOptions = StageOptions & {
10741049
fields: Array<Field | string>;
10751050
};
10761051

1077-
// @public
1052+
// @beta
10781053
export type ReplaceWithStageOptions = StageOptions & {
10791054
map: Expression | string;
10801055
};
@@ -1097,7 +1072,7 @@ export function round(fieldName: string, decimalPlaces: number | Expression): Fu
10971072
// @beta
10981073
export function round(expression: Expression, decimalPlaces: number | Expression): FunctionExpression;
10991074

1100-
// @public
1075+
// @beta
11011076
export type SampleStageOptions = StageOptions & OneOf<{
11021077
percentage: number;
11031078
documents: number;
@@ -1109,12 +1084,12 @@ export interface Selectable {
11091084
selectable: true;
11101085
}
11111086

1112-
// @public
1087+
// @beta
11131088
export type SelectStageOptions = StageOptions & {
11141089
selections: Array<Selectable | string>;
11151090
};
11161091

1117-
// @public
1092+
// @beta
11181093
export type SortStageOptions = StageOptions & {
11191094
orderings: Ordering[];
11201095
};
@@ -1137,7 +1112,7 @@ export function sqrt(expression: Expression): FunctionExpression;
11371112
// @beta
11381113
export function sqrt(fieldName: string): FunctionExpression;
11391114

1140-
// @public
1115+
// @beta
11411116
export interface StageOptions {
11421117
rawOptions?: {
11431118
[name: string]: unknown;
@@ -1210,7 +1185,7 @@ export function sum(expression: Expression): AggregateFunction;
12101185
// @beta
12111186
export function sum(fieldName: string): AggregateFunction;
12121187

1213-
// @public (undocumented)
1188+
// @beta
12141189
export type TimeGranularity = 'microsecond' | 'millisecond' | 'second' | 'minute' | 'hour' | 'day' | 'week' | 'week(monday)' | 'week(tuesday)' | 'week(wednesday)' | 'week(thursday)' | 'week(friday)' | 'week(saturday)' | 'week(sunday)' | 'isoWeek' | 'month' | 'quarter' | 'year' | 'isoYear';
12151190

12161191
// @beta
@@ -1249,28 +1224,16 @@ export function timestampToUnixSeconds(expr: Expression): FunctionExpression;
12491224
// @beta
12501225
export function timestampToUnixSeconds(fieldName: string): FunctionExpression;
12511226

1252-
// Warning: (ae-incompatible-release-tags) The symbol "timestampTruncate" is marked as @public, but its signature references "Expression" which is marked as @beta
1253-
// Warning: (ae-incompatible-release-tags) The symbol "timestampTruncate" is marked as @public, but its signature references "FunctionExpression" which is marked as @beta
1254-
//
1255-
// @public
1227+
// @beta
12561228
export function timestampTruncate(fieldName: string, granularity: TimeGranularity, timezone?: string | Expression): FunctionExpression;
12571229

1258-
// Warning: (ae-incompatible-release-tags) The symbol "timestampTruncate" is marked as @public, but its signature references "Expression" which is marked as @beta
1259-
// Warning: (ae-incompatible-release-tags) The symbol "timestampTruncate" is marked as @public, but its signature references "FunctionExpression" which is marked as @beta
1260-
//
1261-
// @public
1230+
// @beta
12621231
export function timestampTruncate(fieldName: string, granularity: Expression, timezone?: string | Expression): FunctionExpression;
12631232

1264-
// Warning: (ae-incompatible-release-tags) The symbol "timestampTruncate" is marked as @public, but its signature references "Expression" which is marked as @beta
1265-
// Warning: (ae-incompatible-release-tags) The symbol "timestampTruncate" is marked as @public, but its signature references "FunctionExpression" which is marked as @beta
1266-
//
1267-
// @public
1233+
// @beta
12681234
export function timestampTruncate(timestampExpression: Expression, granularity: TimeGranularity, timezone?: string | Expression): FunctionExpression;
12691235

1270-
// Warning: (ae-incompatible-release-tags) The symbol "timestampTruncate" is marked as @public, but its signature references "Expression" which is marked as @beta
1271-
// Warning: (ae-incompatible-release-tags) The symbol "timestampTruncate" is marked as @public, but its signature references "FunctionExpression" which is marked as @beta
1272-
//
1273-
// @public
1236+
// @beta
12741237
export function timestampTruncate(timestampExpression: Expression, granularity: Expression, timezone?: string | Expression): FunctionExpression;
12751238

12761239
// @beta
@@ -1297,7 +1260,7 @@ export function type(fieldName: string): FunctionExpression;
12971260
// @beta
12981261
export function type(expression: Expression): FunctionExpression;
12991262

1300-
// @public
1263+
// @beta
13011264
export type UnionStageOptions = StageOptions & {
13021265
other: Pipeline;
13031266
};
@@ -1320,7 +1283,7 @@ export function unixSecondsToTimestamp(expr: Expression): FunctionExpression;
13201283
// @beta
13211284
export function unixSecondsToTimestamp(fieldName: string): FunctionExpression;
13221285

1323-
// @public
1286+
// @beta
13241287
export type UnnestStageOptions = StageOptions & {
13251288
selectable: Selectable;
13261289
indexField?: string;
@@ -1332,7 +1295,7 @@ export function vectorLength(vectorExpression: Expression): FunctionExpression;
13321295
// @beta
13331296
export function vectorLength(fieldName: string): FunctionExpression;
13341297

1335-
// @public
1298+
// @beta
13361299
export type WhereStageOptions = StageOptions & {
13371300
condition: BooleanExpression;
13381301
};
@@ -1343,19 +1306,7 @@ export function xor(first: BooleanExpression, second: BooleanExpression, ...addi
13431306

13441307
// Warnings were encountered during analysis:
13451308
//
1346-
// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/pipelines.d.ts:71:5 - (ae-incompatible-release-tags) The symbol "fields" is marked as @public, but its signature references "Selectable" which is marked as @beta
1347-
// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/pipelines.d.ts:110:5 - (ae-incompatible-release-tags) The symbol "accumulators" is marked as @public, but its signature references "AliasedAggregate" which is marked as @beta
1348-
// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/pipelines.d.ts:115:5 - (ae-incompatible-release-tags) The symbol "groups" is marked as @public, but its signature references "Selectable" which is marked as @beta
1349-
// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/pipelines.d.ts:772:5 - (ae-forgotten-export) The symbol "Query" needs to be exported by the entry point pipelines.d.ts
1350-
// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/pipelines.d.ts:1090:5 - (ae-incompatible-release-tags) The symbol "groups" is marked as @public, but its signature references "Selectable" which is marked as @beta
1351-
// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/pipelines.d.ts:3254:5 - (ae-incompatible-release-tags) The symbol "field" is marked as @public, but its signature references "Field" which is marked as @beta
1352-
// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/pipelines.d.ts:5774:5 - (ae-incompatible-release-tags) The symbol "fields" is marked as @public, but its signature references "Field" which is marked as @beta
1353-
// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/pipelines.d.ts:5784:5 - (ae-incompatible-release-tags) The symbol "map" is marked as @public, but its signature references "Expression" which is marked as @beta
1354-
// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/pipelines.d.ts:5908:5 - (ae-incompatible-release-tags) The symbol "selections" is marked as @public, but its signature references "Selectable" which is marked as @beta
1355-
// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/pipelines.d.ts:5918:5 - (ae-incompatible-release-tags) The symbol "orderings" is marked as @public, but its signature references "Ordering" which is marked as @beta
1356-
// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/pipelines.d.ts:6715:5 - (ae-incompatible-release-tags) The symbol "other" is marked as @public, but its signature references "Pipeline" which is marked as @beta
1357-
// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/pipelines.d.ts:6815:5 - (ae-incompatible-release-tags) The symbol "selectable" is marked as @public, but its signature references "Selectable" which is marked as @beta
1358-
// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/pipelines.d.ts:6857:5 - (ae-incompatible-release-tags) The symbol "condition" is marked as @public, but its signature references "BooleanExpression" which is marked as @beta
1309+
// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/pipelines.d.ts:782:5 - (ae-forgotten-export) The symbol "Query" needs to be exported by the entry point pipelines.d.ts
13591310

13601311
// (No @packageDocumentation comment for this package)
13611312

0 commit comments

Comments
 (0)