@@ -40,7 +40,6 @@ import {
4040 DatabaseStageOptions ,
4141 DocumentsStageOptions
4242} from './stage_options' ;
43- import { UserDataReader , UserDataSource } from './user_data_reader' ;
4443
4544/**
4645 * @beta
@@ -55,12 +54,10 @@ export class PipelineSource<PipelineType> {
5554 * @internal
5655 * @private
5756 * @param databaseId
58- * @param userDataReader
5957 * @param _createPipeline
6058 */
6159 constructor (
6260 private databaseId : DatabaseId ,
63- private userDataReader : UserDataReader ,
6461 /**
6562 * @internal
6663 * @private
@@ -108,14 +105,6 @@ export class PipelineSource<PipelineType> {
108105 // Create stage object
109106 const stage = new CollectionSource ( normalizedCollection , options ) ;
110107
111- // User data must be read in the context of the API method to
112- // provide contextual errors
113- const parseContext = this . userDataReader . createContext (
114- UserDataSource . Argument ,
115- 'collection'
116- ) ;
117- stage . _readUserData ( parseContext ) ;
118-
119108 // Add stage to the pipeline
120109 return this . _createPipeline ( [ stage ] ) ;
121110 }
@@ -148,14 +137,6 @@ export class PipelineSource<PipelineType> {
148137 // Create stage object
149138 const stage = new CollectionGroupSource ( collectionId , options ) ;
150139
151- // User data must be read in the context of the API method to
152- // provide contextual errors
153- const parseContext = this . userDataReader . createContext (
154- UserDataSource . Argument ,
155- 'collectionGroup'
156- ) ;
157- stage . _readUserData ( parseContext ) ;
158-
159140 // Add stage to the pipeline
160141 return this . _createPipeline ( [ stage ] ) ;
161142 }
@@ -178,14 +159,6 @@ export class PipelineSource<PipelineType> {
178159 // Create stage object
179160 const stage = new DatabaseSource ( options ) ;
180161
181- // User data must be read in the context of the API method to
182- // provide contextual errors
183- const parseContext = this . userDataReader . createContext (
184- UserDataSource . Argument ,
185- 'database'
186- ) ;
187- stage . _readUserData ( parseContext ) ;
188-
189162 // Add stage to the pipeline
190163 return this . _createPipeline ( [ stage ] ) ;
191164 }
@@ -236,14 +209,6 @@ export class PipelineSource<PipelineType> {
236209 // Create stage object
237210 const stage = new DocumentsSource ( normalizedDocs , options ) ;
238211
239- // User data must be read in the context of the API method to
240- // provide contextual errors
241- const parseContext = this . userDataReader . createContext (
242- UserDataSource . Argument ,
243- 'documents'
244- ) ;
245- stage . _readUserData ( parseContext ) ;
246-
247212 // Add stage to the pipeline
248213 return this . _createPipeline ( [ stage ] ) ;
249214 }
0 commit comments