Skip to content

Commit 8006776

Browse files
committed
MEP for firestore lite building
1 parent e23ecfb commit 8006776

File tree

10 files changed

+2164
-1956
lines changed

10 files changed

+2164
-1956
lines changed

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

Lines changed: 1846 additions & 0 deletions
Large diffs are not rendered by default.

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

Lines changed: 40 additions & 1754 deletions
Large diffs are not rendered by default.

packages/firestore/externs.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
"packages/app-check-interop-types/index.d.ts",
1818
"packages/auth-interop-types/index.d.ts",
1919
"packages/firestore/dist/lite/internal.d.ts",
20+
"packages/firestore/dist/lite/internal.pipelines.d.ts",
2021
"packages/firestore/dist/internal.d.ts",
22+
"packages/firestore/dist/internal.pipelines.d.ts",
2123
"packages/firestore-types/index.d.ts",
2224
"packages/firebase/compat/index.d.ts",
2325
"packages/component/dist/src/component.d.ts",

packages/firestore/lite/index.ts

Lines changed: 0 additions & 167 deletions
Original file line numberDiff line numberDiff line change
@@ -27,173 +27,6 @@
2727
import { registerFirestore } from './register';
2828
registerFirestore();
2929

30-
export { PipelineSource } from '../src/lite-api/pipeline-source';
31-
32-
export { PipelineResult } from '../src/lite-api/pipeline-result';
33-
34-
export { Pipeline } from '../src/lite-api/pipeline';
35-
36-
export {
37-
useFluentPipelines,
38-
pipeline,
39-
execute
40-
} from '../src/lite-api/pipeline_impl';
41-
42-
export {
43-
Stage,
44-
FindNearestOptions,
45-
AddFields,
46-
Aggregate,
47-
Distinct,
48-
CollectionSource,
49-
CollectionGroupSource,
50-
DatabaseSource,
51-
DocumentsSource,
52-
Where,
53-
FindNearest,
54-
Limit,
55-
Offset,
56-
Select,
57-
Sort,
58-
GenericStage
59-
} from '../src/lite-api/stage';
60-
61-
export {
62-
add,
63-
subtract,
64-
multiply,
65-
divide,
66-
mod,
67-
eq,
68-
neq,
69-
lt,
70-
lte,
71-
gt,
72-
gte,
73-
arrayConcat,
74-
arrayContains,
75-
arrayContainsAny,
76-
arrayContainsAll,
77-
arrayLength,
78-
eqAny,
79-
notEqAny,
80-
xor,
81-
cond,
82-
not,
83-
logicalMaximum,
84-
logicalMinimum,
85-
exists,
86-
isNan,
87-
reverse,
88-
replaceFirst,
89-
replaceAll,
90-
byteLength,
91-
charLength,
92-
like,
93-
regexContains,
94-
regexMatch,
95-
strContains,
96-
startsWith,
97-
endsWith,
98-
toLower,
99-
toUpper,
100-
trim,
101-
strConcat,
102-
mapGet,
103-
countAll,
104-
minimum,
105-
maximum,
106-
cosineDistance,
107-
dotProduct,
108-
euclideanDistance,
109-
vectorLength,
110-
unixMicrosToTimestamp,
111-
timestampToUnixMicros,
112-
unixMillisToTimestamp,
113-
timestampToUnixMillis,
114-
unixSecondsToTimestamp,
115-
timestampToUnixSeconds,
116-
timestampAdd,
117-
timestampSub,
118-
genericFunction,
119-
ascending,
120-
descending,
121-
ExprWithAlias,
122-
Field,
123-
Fields,
124-
Constant,
125-
FirestoreFunction,
126-
Add,
127-
Subtract,
128-
Multiply,
129-
Divide,
130-
Mod,
131-
Eq,
132-
Neq,
133-
Lt,
134-
Lte,
135-
Gt,
136-
Gte,
137-
ArrayConcat,
138-
ArrayReverse,
139-
ArrayContains,
140-
ArrayContainsAll,
141-
ArrayContainsAny,
142-
ArrayLength,
143-
ArrayElement,
144-
EqAny,
145-
IsNan,
146-
Exists,
147-
Not,
148-
And,
149-
Or,
150-
Xor,
151-
Cond,
152-
LogicalMaximum,
153-
LogicalMinimum,
154-
Reverse,
155-
ReplaceFirst,
156-
ReplaceAll,
157-
CharLength,
158-
ByteLength,
159-
Like,
160-
RegexContains,
161-
RegexMatch,
162-
StrContains,
163-
StartsWith,
164-
EndsWith,
165-
ToLower,
166-
ToUpper,
167-
Trim,
168-
StrConcat,
169-
MapGet,
170-
Count,
171-
Sum,
172-
Avg,
173-
Minimum,
174-
Maximum,
175-
CosineDistance,
176-
DotProduct,
177-
EuclideanDistance,
178-
VectorLength,
179-
UnixMicrosToTimestamp,
180-
TimestampToUnixMicros,
181-
UnixMillisToTimestamp,
182-
TimestampToUnixMillis,
183-
UnixSecondsToTimestamp,
184-
TimestampToUnixSeconds,
185-
TimestampAdd,
186-
TimestampSub,
187-
Ordering,
188-
ExprType,
189-
AccumulatorTarget,
190-
FilterExpr,
191-
SelectableExpr,
192-
Selectable,
193-
FilterCondition,
194-
Accumulator
195-
} from '../src/lite-api/expressions';
196-
19730
export {
19831
aggregateQuerySnapshotEqual,
19932
getCount,
Lines changed: 215 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,215 @@
1+
/**
2+
* Firestore Lite Pipelines
3+
*
4+
* @remarks Firestore Lite is a small online-only SDK that allows read
5+
* and write access to your Firestore database. All operations connect
6+
* directly to the backend, and `onSnapshot()` APIs are not supported.
7+
* @packageDocumentation
8+
*/
9+
/**
10+
* @license
11+
* Copyright 2024 Google LLC
12+
*
13+
* Licensed under the Apache License, Version 2.0 (the "License");
14+
* you may not use this file except in compliance with the License.
15+
* You may obtain a copy of the License at
16+
*
17+
* http://www.apache.org/licenses/LICENSE-2.0
18+
*
19+
* Unless required by applicable law or agreed to in writing, software
20+
* distributed under the License is distributed on an "AS IS" BASIS,
21+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22+
* See the License for the specific language governing permissions and
23+
* limitations under the License.
24+
*/
25+
26+
// External exports: ./index
27+
// These external exports will be stripped from the dist/pipelines.d.ts file
28+
// by the prune-dts script, in order to reduce type duplication. However, these
29+
// types need to be exported here to ensure that api-extractor behaves
30+
// correctly. If a type from api.ts is missing from this export, then
31+
// api-extractor may rename it with a suffix `_#`, e.g. `YourType_2`.
32+
export type {
33+
Timestamp,
34+
DocumentReference,
35+
VectorValue,
36+
GeoPoint,
37+
FieldPath,
38+
DocumentData,
39+
Query,
40+
Firestore,
41+
FirestoreDataConverter,
42+
WithFieldValue,
43+
PartialWithFieldValue,
44+
SetOptions,
45+
QueryDocumentSnapshot,
46+
Primitive,
47+
FieldValue
48+
} from './index';
49+
50+
export { PipelineSource } from '../src/lite-api/pipeline-source';
51+
52+
export { PipelineResult } from '../src/lite-api/pipeline-result';
53+
54+
export { Pipeline } from '../src/lite-api/pipeline';
55+
56+
export {
57+
useFluentPipelines,
58+
pipeline,
59+
execute
60+
} from '../src/lite-api/pipeline_impl';
61+
62+
export {
63+
Stage,
64+
FindNearestOptions,
65+
AddFields,
66+
Aggregate,
67+
Distinct,
68+
CollectionSource,
69+
CollectionGroupSource,
70+
DatabaseSource,
71+
DocumentsSource,
72+
Where,
73+
FindNearest,
74+
Limit,
75+
Offset,
76+
Select,
77+
Sort,
78+
GenericStage
79+
} from '../src/lite-api/stage';
80+
81+
export {
82+
add,
83+
subtract,
84+
multiply,
85+
divide,
86+
mod,
87+
eq,
88+
neq,
89+
lt,
90+
lte,
91+
gt,
92+
gte,
93+
arrayConcat,
94+
arrayContains,
95+
arrayContainsAny,
96+
arrayContainsAll,
97+
arrayLength,
98+
eqAny,
99+
notEqAny,
100+
xor,
101+
cond,
102+
not,
103+
logicalMaximum,
104+
logicalMinimum,
105+
exists,
106+
isNan,
107+
reverse,
108+
replaceFirst,
109+
replaceAll,
110+
byteLength,
111+
charLength,
112+
like,
113+
regexContains,
114+
regexMatch,
115+
strContains,
116+
startsWith,
117+
endsWith,
118+
toLower,
119+
toUpper,
120+
trim,
121+
strConcat,
122+
mapGet,
123+
countAll,
124+
minimum,
125+
maximum,
126+
cosineDistance,
127+
dotProduct,
128+
euclideanDistance,
129+
vectorLength,
130+
unixMicrosToTimestamp,
131+
timestampToUnixMicros,
132+
unixMillisToTimestamp,
133+
timestampToUnixMillis,
134+
unixSecondsToTimestamp,
135+
timestampToUnixSeconds,
136+
timestampAdd,
137+
timestampSub,
138+
genericFunction,
139+
ascending,
140+
descending,
141+
ExprWithAlias,
142+
Field,
143+
Fields,
144+
Constant,
145+
FirestoreFunction,
146+
Add,
147+
Subtract,
148+
Multiply,
149+
Divide,
150+
Mod,
151+
Eq,
152+
Neq,
153+
Lt,
154+
Lte,
155+
Gt,
156+
Gte,
157+
ArrayConcat,
158+
ArrayReverse,
159+
ArrayContains,
160+
ArrayContainsAll,
161+
ArrayContainsAny,
162+
ArrayLength,
163+
ArrayElement,
164+
EqAny,
165+
IsNan,
166+
Exists,
167+
Not,
168+
And,
169+
Or,
170+
Xor,
171+
Cond,
172+
LogicalMaximum,
173+
LogicalMinimum,
174+
Reverse,
175+
ReplaceFirst,
176+
ReplaceAll,
177+
CharLength,
178+
ByteLength,
179+
Like,
180+
RegexContains,
181+
RegexMatch,
182+
StrContains,
183+
StartsWith,
184+
EndsWith,
185+
ToLower,
186+
ToUpper,
187+
Trim,
188+
StrConcat,
189+
MapGet,
190+
Count,
191+
Sum,
192+
Avg,
193+
Minimum,
194+
Maximum,
195+
CosineDistance,
196+
DotProduct,
197+
EuclideanDistance,
198+
VectorLength,
199+
UnixMicrosToTimestamp,
200+
TimestampToUnixMicros,
201+
UnixMillisToTimestamp,
202+
TimestampToUnixMillis,
203+
UnixSecondsToTimestamp,
204+
TimestampToUnixSeconds,
205+
TimestampAdd,
206+
TimestampSub,
207+
Ordering,
208+
ExprType,
209+
AccumulatorTarget,
210+
FilterExpr,
211+
SelectableExpr,
212+
Selectable,
213+
FilterCondition,
214+
Accumulator
215+
} from '../src/lite-api/expressions';

0 commit comments

Comments
 (0)