Skip to content

Commit 3d08804

Browse files
committed
api-review update
1 parent 0790424 commit 3d08804

File tree

3 files changed

+194
-82
lines changed

3 files changed

+194
-82
lines changed

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

Lines changed: 65 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,9 @@ export function concat(fieldName: string, second: Expression | unknown, ...other
199199
export function conditional(condition: BooleanExpression, thenExpr: Expression, elseExpr: Expression): FunctionExpression;
200200

201201
// @beta
202-
export function constant(value: number): Expression;
202+
export function constant(value: number, options?: {
203+
preferIntegers: boolean;
204+
}): Expression;
203205

204206
// @beta
205207
export function constant(value: string): Expression;
@@ -673,7 +675,11 @@ export class FunctionExpression extends Expression {
673675
constructor(name: string, params: Expression[], _methodName: string | undefined);
674676
// (undocumented)
675677
readonly expressionType: ExpressionType;
676-
}
678+
// (undocumented)
679+
readonly name: string;
680+
// (undocumented)
681+
readonly params: Expression[];
682+
}
677683

678684
// @beta
679685
export function greaterThan(left: Expression, right: Expression): BooleanExpression;
@@ -937,76 +943,81 @@ export class Ordering {
937943
// @beta
938944
export class Pipeline {
939945
/* Excluded from this release type: _db */
940-
addFields(field: Selectable, ...additionalFields: Selectable[]): Pipeline;
946+
/* Excluded from this release type: userDataReader */
941947
/* Excluded from this release type: _userDataWriter */
948+
addFields(field: Selectable, ...additionalFields: Selectable[]): Pipeline;
949+
/* Excluded from this release type: __constructor */
942950
addFields(options: AddFieldsStageOptions): Pipeline;
943-
/* Excluded from this release type: _userDataWriter */
951+
/* Excluded from this release type: __constructor */
944952
aggregate(accumulator: AliasedAggregate, ...additionalAccumulators: AliasedAggregate[]): Pipeline;
945-
/* Excluded from this release type: _userDataWriter */
953+
/* Excluded from this release type: __constructor */
946954
aggregate(options: AggregateStageOptions): Pipeline;
947-
/* Excluded from this release type: _userDataWriter */
955+
/* Excluded from this release type: __constructor */
948956
distinct(group: string | Selectable, ...additionalGroups: Array<string | Selectable>): Pipeline;
949-
/* Excluded from this release type: _userDataWriter */
957+
/* Excluded from this release type: __constructor */
950958
distinct(options: DistinctStageOptions): Pipeline;
951-
/* Excluded from this release type: _userDataWriter */
959+
/* Excluded from this release type: __constructor */
952960
findNearest(options: FindNearestStageOptions): Pipeline;
953-
/* Excluded from this release type: _userDataWriter */
961+
/* Excluded from this release type: __constructor */
954962
limit(limit: number): Pipeline;
955-
/* Excluded from this release type: _userDataWriter */
963+
/* Excluded from this release type: __constructor */
956964
limit(options: LimitStageOptions): Pipeline;
957-
/* Excluded from this release type: _userDataWriter */
965+
/* Excluded from this release type: __constructor */
958966
offset(offset: number): Pipeline;
959-
/* Excluded from this release type: _userDataWriter */
967+
/* Excluded from this release type: __constructor */
960968
offset(options: OffsetStageOptions): Pipeline;
961-
/* Excluded from this release type: _userDataWriter */
969+
/* Excluded from this release type: __constructor */
962970
rawStage(name: string, params: unknown[], options?: {
963971
[key: string]: Expression | unknown;
964972
}): Pipeline;
965-
/* Excluded from this release type: _userDataWriter */
973+
/* Excluded from this release type: __constructor */
966974
removeFields(fieldValue: Field | string, ...additionalFields: Array<Field | string>): Pipeline;
967-
/* Excluded from this release type: _userDataWriter */
975+
/* Excluded from this release type: __constructor */
968976
removeFields(options: RemoveFieldsStageOptions): Pipeline;
969-
/* Excluded from this release type: _userDataWriter */
977+
/* Excluded from this release type: __constructor */
970978
replaceWith(fieldName: string): Pipeline;
971-
/* Excluded from this release type: _userDataWriter */
979+
/* Excluded from this release type: __constructor */
972980
replaceWith(expr: Expression): Pipeline;
973-
/* Excluded from this release type: _userDataWriter */
981+
/* Excluded from this release type: __constructor */
974982
replaceWith(options: ReplaceWithStageOptions): Pipeline;
975-
/* Excluded from this release type: _userDataWriter */
983+
/* Excluded from this release type: __constructor */
976984
sample(documents: number): Pipeline;
977-
/* Excluded from this release type: _userDataWriter */
985+
/* Excluded from this release type: __constructor */
978986
sample(options: SampleStageOptions): Pipeline;
979-
/* Excluded from this release type: _userDataWriter */
987+
/* Excluded from this release type: __constructor */
980988
select(selection: Selectable | string, ...additionalSelections: Array<Selectable | string>): Pipeline;
981-
/* Excluded from this release type: _userDataWriter */
989+
/* Excluded from this release type: __constructor */
982990
select(options: SelectStageOptions): Pipeline;
983-
/* Excluded from this release type: _userDataWriter */
991+
/* Excluded from this release type: __constructor */
984992
sort(ordering: Ordering, ...additionalOrderings: Ordering[]): Pipeline;
985-
/* Excluded from this release type: _userDataWriter */
993+
/* Excluded from this release type: __constructor */
986994
sort(options: SortStageOptions): Pipeline;
987-
/* Excluded from this release type: _userDataWriter */
995+
/* Excluded from this release type: __constructor */
996+
// (undocumented)
997+
readonly stages: Stage[];
998+
/* Excluded from this release type: __constructor */
988999
union(other: Pipeline): Pipeline;
989-
/* Excluded from this release type: _userDataWriter */
1000+
/* Excluded from this release type: __constructor */
9901001
union(options: UnionStageOptions): Pipeline;
991-
/* Excluded from this release type: _userDataWriter */
1002+
/* Excluded from this release type: __constructor */
9921003
unnest(selectable: Selectable, indexField?: string): Pipeline;
993-
/* Excluded from this release type: _userDataWriter */
1004+
/* Excluded from this release type: __constructor */
9941005
unnest(options: UnnestStageOptions): Pipeline;
995-
/* Excluded from this release type: _userDataWriter */
1006+
/* Excluded from this release type: __constructor */
9961007
where(condition: BooleanExpression): Pipeline;
997-
/* Excluded from this release type: _userDataWriter */
1008+
/* Excluded from this release type: __constructor */
9981009
where(options: WhereStageOptions): Pipeline;
9991010
}
10001011

1001-
// Warning: (ae-forgotten-export) The symbol "DocumentData" needs to be exported by the entry point pipelines.d.ts
1002-
//
10031012
// @beta
1004-
export class PipelineResult<AppModelType = DocumentData> {
1013+
export class PipelineResult {
10051014
/* Excluded from this release type: _ref */
10061015
/* Excluded from this release type: _fields */
10071016
/* Excluded from this release type: __constructor */
1017+
/* Excluded from this release type: fromDocument */
10081018
get createTime(): Timestamp | undefined;
1009-
data(): AppModelType;
1019+
// Warning: (ae-forgotten-export) The symbol "DocumentData" needs to be exported by the entry point pipelines.d.ts
1020+
data(): DocumentData;
10101021
get(fieldPath: string | FieldPath | Field): any;
10111022
get id(): string | undefined;
10121023
get ref(): DocumentReference | undefined;
@@ -1026,7 +1037,7 @@ export class PipelineSource<PipelineType> {
10261037
collection(options: CollectionStageOptions): PipelineType;
10271038
collectionGroup(collectionId: string): PipelineType;
10281039
collectionGroup(options: CollectionGroupStageOptions): PipelineType;
1029-
createFrom(query: Query): Pipeline;
1040+
createFrom(query: Query): PipelineType;
10301041
database(): PipelineType;
10311042
database(options: DatabaseStageOptions): PipelineType;
10321043
documents(docs: Array<string | DocumentReference>): PipelineType;
@@ -1137,6 +1148,16 @@ export function sqrt(expression: Expression): FunctionExpression;
11371148
// @beta
11381149
export function sqrt(fieldName: string): FunctionExpression;
11391150

1151+
// @beta (undocumented)
1152+
export abstract class Stage {
1153+
/* Excluded from this release type: optionsProto */
1154+
constructor(options: StageOptions);
1155+
// (undocumented)
1156+
protected knownOptions: Record<string, unknown>;
1157+
// (undocumented)
1158+
protected rawOptions?: Record<string, unknown>;
1159+
}
1160+
11401161
// @public
11411162
export interface StageOptions {
11421163
rawOptions?: {
@@ -1347,15 +1368,15 @@ export function xor(first: BooleanExpression, second: BooleanExpression, ...addi
13471368
// /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
13481369
// /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
13491370
// /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
1371+
// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/pipelines.d.ts:1092:5 - (ae-incompatible-release-tags) The symbol "groups" is marked as @public, but its signature references "Selectable" which is marked as @beta
1372+
// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/pipelines.d.ts:3255:5 - (ae-incompatible-release-tags) The symbol "field" is marked as @public, but its signature references "Field" which is marked as @beta
1373+
// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/pipelines.d.ts:5776:5 - (ae-incompatible-release-tags) The symbol "fields" is marked as @public, but its signature references "Field" which is marked as @beta
1374+
// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/pipelines.d.ts:5786:5 - (ae-incompatible-release-tags) The symbol "map" is marked as @public, but its signature references "Expression" which is marked as @beta
1375+
// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/pipelines.d.ts:5910:5 - (ae-incompatible-release-tags) The symbol "selections" is marked as @public, but its signature references "Selectable" which is marked as @beta
1376+
// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/pipelines.d.ts:5920:5 - (ae-incompatible-release-tags) The symbol "orderings" is marked as @public, but its signature references "Ordering" which is marked as @beta
1377+
// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/pipelines.d.ts:6726:5 - (ae-incompatible-release-tags) The symbol "other" is marked as @public, but its signature references "Pipeline" which is marked as @beta
1378+
// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/pipelines.d.ts:6826:5 - (ae-incompatible-release-tags) The symbol "selectable" is marked as @public, but its signature references "Selectable" which is marked as @beta
1379+
// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/pipelines.d.ts:6868:5 - (ae-incompatible-release-tags) The symbol "condition" is marked as @public, but its signature references "BooleanExpression" which is marked as @beta
13591380

13601381
// (No @packageDocumentation comment for this package)
13611382

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,13 @@ export interface Settings {
399399
// @public
400400
export function snapshotEqual<AppModelType, DbModelType extends DocumentData>(left: DocumentSnapshot<AppModelType, DbModelType> | QuerySnapshot<AppModelType, DbModelType>, right: DocumentSnapshot<AppModelType, DbModelType> | QuerySnapshot<AppModelType, DbModelType>): boolean;
401401

402+
// @public
403+
export class SnapshotMetadata {
404+
readonly fromCache: boolean;
405+
readonly hasPendingWrites: boolean;
406+
isEqual(other: SnapshotMetadata): boolean;
407+
}
408+
402409
// @public
403410
export function startAfter<AppModelType, DbModelType extends DocumentData>(snapshot: DocumentSnapshot<AppModelType, DbModelType>): QueryStartAtConstraint;
404411

0 commit comments

Comments
 (0)