From 7c9fabf7150d6031d95cc0220c091405ce77367e Mon Sep 17 00:00:00 2001 From: Yvonne Pan <103622026+yvonnep165@users.noreply.github.com> Date: Tue, 24 Mar 2026 17:14:07 -0400 Subject: [PATCH] Refactor the parameters for timestamp expressions and change all timegranularity value to lowercase --- .../firestore/api-report/firestore.api.md | 42 +++---- .../firestore/dev/src/pipelines/expression.ts | 117 ++++-------------- handwritten/firestore/types/firestore.d.ts | 116 ++++------------- 3 files changed, 63 insertions(+), 212 deletions(-) diff --git a/handwritten/firestore/api-report/firestore.api.md b/handwritten/firestore/api-report/firestore.api.md index 78383dbd1d8..6bd66ae03d1 100644 --- a/handwritten/firestore/api-report/firestore.api.md +++ b/handwritten/firestore/api-report/firestore.api.md @@ -1137,7 +1137,7 @@ abstract class Expression implements firestore.Pipelines.Expression, HasUserData ifError(catchValue: unknown): FunctionExpression; isAbsent(): BooleanExpression; isError(): BooleanExpression; - isType(type: Type): BooleanExpression; + isType(type: string): BooleanExpression; join(delimiterExpression: Expression): Expression; join(delimiter: string): Expression; last(): AggregateFunction; @@ -1206,13 +1206,13 @@ abstract class Expression implements firestore.Pipelines.Expression, HasUserData subtract(subtrahend: number): FunctionExpression; sum(): AggregateFunction; timestampAdd(unit: Expression, amount: Expression): FunctionExpression; - timestampAdd(unit: 'microsecond' | 'millisecond' | 'second' | 'minute' | 'hour' | 'day', amount: number): FunctionExpression; + timestampAdd(unit: firestore.Pipelines.TimeUnit, amount: number): FunctionExpression; timestampDiff(start: Expression, unit: Expression): FunctionExpression; - timestampDiff(start: string | Expression, unit: 'microsecond' | 'millisecond' | 'second' | 'minute' | 'hour' | 'day'): FunctionExpression; + timestampDiff(start: string | Expression, unit: firestore.Pipelines.TimeUnit): FunctionExpression; timestampExtract(part: firestore.Pipelines.TimePart, timezone?: string | Expression): FunctionExpression; timestampExtract(part: Expression, timezone?: string | Expression): FunctionExpression; timestampSubtract(unit: Expression, amount: Expression): FunctionExpression; - timestampSubtract(unit: 'microsecond' | 'millisecond' | 'second' | 'minute' | 'hour' | 'day', amount: number): FunctionExpression; + timestampSubtract(unit: firestore.Pipelines.TimeUnit, amount: number): FunctionExpression; timestampToUnixMicros(): FunctionExpression; timestampToUnixMillis(): FunctionExpression; timestampToUnixSeconds(): FunctionExpression; @@ -1418,6 +1418,8 @@ class Firestore implements firestore.Firestore { // Warning: (tsdoc-param-tag-with-invalid-name) The @param block should be followed by a valid parameter name: The identifier cannot non-word characters // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' constructor(settings?: firestore.Settings); + // @internal + get alwaysUseImplicitOrderBy(): boolean; // Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag // Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" batch(): WriteBatch; @@ -1650,10 +1652,10 @@ function isAbsent(field: string): BooleanExpression; function isError(value: Expression): BooleanExpression; // @beta -function isType(fieldName: string, type: Type): BooleanExpression; +function isType(fieldName: string, type: string): BooleanExpression; // @beta -function isType(expression: Expression, type: Type): BooleanExpression; +function isType(expression: Expression, type: string): BooleanExpression; // @beta function join(arrayFieldName: string, delimiter: string): Expression; @@ -2118,7 +2120,6 @@ declare namespace Pipelines { arrayConcat, type, isType, - Type, timestampTruncate, timestampExtract, timestampDiff, @@ -2360,7 +2361,7 @@ export class Query