Skip to content

Commit 8181614

Browse files
committed
Export all public API types and hide internals. This allows the API report steps of the build to complete
1 parent ba9aa24 commit 8181614

File tree

6 files changed

+25
-10
lines changed

6 files changed

+25
-10
lines changed

packages/firestore/lite/pipelines/pipelines.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,3 +194,5 @@ export {
194194
AggregateFunction,
195195
TimeGranularity
196196
} from '../../src/lite-api/expressions';
197+
198+
export { Stage } from '../../src/lite-api/stage';

packages/firestore/pipelines/pipelines.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ export type {
4747
SnapshotMetadata,
4848
Bytes,
4949
SnapshotListenOptions,
50-
Unsubscribe
50+
Unsubscribe,
51+
DocumentChangeType,
52+
ListenSource
5153
} from '../src/api';
5254

5355
export * from '../src/api_pipelines';

packages/firestore/src/api_pipelines.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,21 @@ export {
2525
pipelineResultEqual
2626
} from './lite-api/pipeline-result';
2727

28-
export { RealtimePipelineSnapshot } from './api/snapshot';
28+
export { RealtimePipelineSnapshot, ResultChange } from './api/snapshot';
2929

3030
export { Pipeline } from './api/pipeline';
3131

32+
export { Stage } from './lite-api/stage';
33+
3234
export { RealtimePipeline } from './api/realtime_pipeline';
3335

3436
// Rename here because we want the exported name to be onSnapshot
3537
// internally the name has to be onPipelineSnapshot to avoid
3638
// name collisions.
3739
import { onPipelineSnapshot as onSnapshot } from './api/reference_impl';
3840

41+
export { PipelineListenOptions } from './api/reference_impl';
42+
3943
export { execute } from './api/pipeline_impl';
4044

4145
export { PipelineExecuteOptions } from './lite-api/pipeline_options';

packages/firestore/src/core/expressions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ export class CoreField implements EvaluableExpr {
317317
});
318318
}
319319
// Return 'UNSET' if the field doesn't exist, otherwise the Value.
320-
const result = input.data.field(this.expr.fieldPath);
320+
const result = input.data.field(this.expr._fieldPath);
321321

322322
function getServerTimestampValue(
323323
context: EvaluationContext,

packages/firestore/src/lite-api/expressions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2581,14 +2581,14 @@ export class Field extends Expression implements Selectable {
25812581
* @private
25822582
*/
25832583
constructor(
2584-
readonly fieldPath: InternalFieldPath,
2584+
readonly _fieldPath: InternalFieldPath,
25852585
readonly _methodName: string | undefined
25862586
) {
25872587
super();
25882588
}
25892589

25902590
get fieldName(): string {
2591-
return this.fieldPath.canonicalString();
2591+
return this._fieldPath.canonicalString();
25922592
}
25932593

25942594
get alias(): string {
@@ -2605,7 +2605,7 @@ export class Field extends Expression implements Selectable {
26052605
*/
26062606
_toProto(serializer: JsonProtoSerializer): ProtoValue {
26072607
return {
2608-
fieldReferenceValue: this.fieldPath.canonicalString()
2608+
fieldReferenceValue: this._fieldPath.canonicalString()
26092609
};
26102610
}
26112611

packages/firestore/src/lite-api/pipeline-result.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ export class PipelineResult {
105105
private readonly _createTime: Timestamp | undefined;
106106
private readonly _updateTime: Timestamp | undefined;
107107

108+
readonly _metadata: SnapshotMetadata | undefined;
109+
readonly _listenOptions: ListenOptions | undefined;
110+
108111
/**
109112
* @internal
110113
* @private
@@ -128,21 +131,25 @@ export class PipelineResult {
128131
* this document.
129132
* @param createTime The time when the document was created if the result is a document, undefined otherwise.
130133
* @param updateTime The time when the document was last updated if the result is a document, undefined otherwise.
134+
* @param metadata
135+
* @param listenOptions
131136
*/
132137
constructor(
133138
userDataWriter: AbstractUserDataWriter,
134139
ref?: DocumentReference,
135140
fields?: ObjectValue,
136141
createTime?: Timestamp,
137142
updateTime?: Timestamp,
138-
readonly metadata?: SnapshotMetadata,
139-
readonly listenOptions?: ListenOptions
143+
metadata?: SnapshotMetadata,
144+
listenOptions?: ListenOptions
140145
) {
141146
this._ref = ref;
142147
this._userDataWriter = userDataWriter;
143148
this._createTime = createTime;
144149
this._updateTime = updateTime;
145150
this._fields = fields ?? ObjectValue.empty();
151+
this._metadata = metadata;
152+
this._listenOptions = listenOptions;
146153
}
147154

148155
/**
@@ -234,7 +241,7 @@ export class PipelineResult {
234241
data(): DocumentData {
235242
return this._userDataWriter.convertValue(
236243
this._fields.value,
237-
this.listenOptions?.serverTimestampBehavior
244+
this._listenOptions?.serverTimestampBehavior
238245
) as DocumentData;
239246
}
240247

@@ -274,7 +281,7 @@ export class PipelineResult {
274281
if (value !== null) {
275282
return this._userDataWriter.convertValue(
276283
value,
277-
this.listenOptions?.serverTimestampBehavior
284+
this._listenOptions?.serverTimestampBehavior
278285
);
279286
}
280287
}

0 commit comments

Comments
 (0)