@@ -261,126 +261,125 @@ interface FacetFunctionResult {
261261 [ facetName : string ] : number
262262}
263263
264- declare global {
265- interface SolrData {
266- [ key : string ] : SolrDataValue
267- }
264+ export interface SolrData {
265+ [ key : string ] : SolrDataValue
266+ }
268267
269- /**
270- * Fields are defined in the fields element of `schema.xml`.
271- * Once you have the **field types** set up, defining the fields themselves is simple.
272- *
273- * @see https://lucene.apache.org/solr/guide/7_5/defining-fields.html
274- * @see https://lucene.apache.org/solr/guide/7_5/defining-fields.html#optional-field-type-override-properties
275- */
276- type FieldProperties = FieldGeneralProperties & FieldTypeDefaultProperties
268+ /**
269+ * Fields are defined in the fields element of `schema.xml`.
270+ * Once you have the **field types** set up, defining the fields themselves is simple.
271+ *
272+ * @see https://lucene.apache.org/solr/guide/7_5/defining-fields.html
273+ * @see https://lucene.apache.org/solr/guide/7_5/defining-fields.html#optional-field-type-override-properties
274+ */
275+ export type FieldProperties = FieldGeneralProperties &
276+ FieldTypeDefaultProperties
277277
278- /**
279- * A field type defines the analysis that will occur on a field when documents are indexed
280- * or queries are sent to the index.
281- * A field type definition can include four types of information:
282- * - The `name` of the field type (**mandatory**).
283- * - An implementation `class` name (**mandatory**).
284- * - If the field type is `TextField`, a description of the field analysis for the field type.
285- * - Field type properties - depending on the implementation class,
286- * some properties **may be mandatory**.
287- *
288- * The field type `class` determines most of the behavior of a field type, but optional properties
289- * can also be defined.
290- *
291- * The properties that can be specified for a given field type fall into three major categories:
292- * - Properties specific to the field type’s class.
293- * - General Properties {@link FieldTypeGeneralProperties} that Solr supports for any field type.
294- * - Field Default Properties {@link FieldTypeDefaultProperties} that can be specified on the field
295- * type that will be inherited by fields that use this type instead of the default behavior.
296- */
297- type FieldTypeProperties = FieldTypeGeneralProperties &
298- FieldTypeDefaultProperties
278+ /**
279+ * A field type defines the analysis that will occur on a field when documents are indexed
280+ * or queries are sent to the index.
281+ * A field type definition can include four types of information:
282+ * - The `name` of the field type (**mandatory**).
283+ * - An implementation `class` name (**mandatory**).
284+ * - If the field type is `TextField`, a description of the field analysis for the field type.
285+ * - Field type properties - depending on the implementation class,
286+ * some properties **may be mandatory**.
287+ *
288+ * The field type `class` determines most of the behavior of a field type, but optional properties
289+ * can also be defined.
290+ *
291+ * The properties that can be specified for a given field type fall into three major categories:
292+ * - Properties specific to the field type’s class.
293+ * - General Properties {@link FieldTypeGeneralProperties} that Solr supports for any field type.
294+ * - Field Default Properties {@link FieldTypeDefaultProperties} that can be specified on the field
295+ * type that will be inherited by fields that use this type instead of the default behavior.
296+ */
297+ export type FieldTypeProperties = FieldTypeGeneralProperties &
298+ FieldTypeDefaultProperties
299299
300- interface SolrDocument {
301- id : string
302- _childDocuments_ ?: SolrFragmentWithId | SolrFragmentWithId [ ]
303- [ key : string ] : SolrDataValue | SolrData
304- }
300+ export interface SolrDocument {
301+ id : string
302+ _childDocuments_ ?: SolrFragmentWithId | SolrFragmentWithId [ ]
303+ [ key : string ] : SolrDataValue | SolrData
304+ }
305305
306- /**
307- * This type definition contains just the most important parts.
308- */
309- interface SolrResponse {
310- status ?: string
311- facets ?: {
312- count ?: number
313- } & {
314- [ facetName : string ] : ( TermsFacet | FacetFunctionResult ) [ ] // TODO: to be completed
315- }
316- response ?: {
317- docs : SolrDocument [ ]
318- numFound : number
319- start : number
320- }
321- responseHeader : SolrResponseHeader
306+ /**
307+ * This type definition contains just the most important parts.
308+ */
309+ export interface SolrResponse {
310+ status ?: string
311+ facets ?: {
312+ count ?: number
313+ } & {
314+ [ facetName : string ] : ( TermsFacet | FacetFunctionResult ) [ ] // TODO: to be completed
315+ }
316+ response ?: {
317+ docs : SolrDocument [ ]
318+ numFound : number
319+ start : number
322320 }
321+ responseHeader : SolrResponseHeader
322+ }
323323
324- /**
325- * This type definition contains just the most important parts.
326- */
327- interface SolrException {
324+ /**
325+ * This type definition contains just the most important parts.
326+ */
327+ export interface SolrException {
328+ config
329+ message : string
330+ request : ClientRequest
331+ response : {
328332 config
329- message : string
330- request : ClientRequest
331- response : {
332- config
333- data : {
334- error : {
335- code : number
336- details : {
337- errorMessages : string [ ]
338- [ key : string ] : object
339- } [ ]
340- metadata : string [ ]
341- }
342- responseHeader : SolrResponseHeader
333+ data : {
334+ error : {
335+ code : number
336+ details : {
337+ errorMessages : string [ ]
338+ [ key : string ] : object
339+ } [ ]
340+ metadata : string [ ]
343341 }
344- headers
345- request : ClientRequest
346- status : number
347- statusText : string
342+ responseHeader : SolrResponseHeader
348343 }
349- stack : string
344+ headers
345+ request : ClientRequest
346+ status : number
347+ statusText : string
350348 }
349+ stack : string
350+ }
351351
352- interface SolrQuery {
353- query ?
354- filter ?
355- start ?
356- limit ?
357- sort ?
358- facet ?
359- params ?: {
360- hl ?: "on" | "off"
361- "hl.simple.pre" ?: string
362- "hl.simple.post" ?: string
363- "hl.fl" ?: string
364- indent ?: "off" | "on"
365- }
352+ export interface SolrQuery {
353+ query ?
354+ filter ?
355+ start ?
356+ limit ?
357+ sort ?
358+ facet ?
359+ params ?: {
360+ hl ?: "on" | "off"
361+ "hl.simple.pre" ?: string
362+ "hl.simple.post" ?: string
363+ "hl.fl" ?: string
364+ indent ?: "off" | "on"
366365 }
366+ }
367367
368- interface SolrConfig {
369- urlConfig : UrlObject & {
370- query : {
371- overwrite : boolean
372- commitWithin : number
373- wt : "json" | "xml" | "python" | "ruby" | "php" | "csv"
374- [ key : string ] : any
375- }
368+ export interface SolrConfig {
369+ urlConfig ?: UrlObject & {
370+ query ?: {
371+ overwrite ?: boolean
372+ commitWithin ?: number
373+ wt ?: "json" | "xml" | "python" | "ruby" | "php" | "csv"
374+ [ key : string ] : any
376375 }
377- debug : boolean
378- core ?: string
379- apiPrefix : string
380376 }
377+ debug ?: boolean
378+ core ?: string
379+ apiPrefix ?: string
380+ }
381381
382- interface DeleteQuery {
383- id ?: string
384- query ?: any
385- }
382+ export interface DeleteQuery {
383+ id ?: string
384+ query ?: any
386385}
0 commit comments