diff --git a/src/controllers/Document.ts b/src/controllers/Document.ts index 92be9930..cb8dbf36 100644 --- a/src/controllers/Document.ts +++ b/src/controllers/Document.ts @@ -716,29 +716,7 @@ export class DocumentController extends BaseController { query: JSONObject, changes: Partial, options: ArgsDocumentControllerUpdateByQuery = {} - ): Promise<{ - /** - * Array of successfully updated documents - */ - successes: KDocument[]; - /** - * Array of failed creation - */ - errors: Array<{ - /** - * Document that cause the error - */ - document: KDocument; - /** - * HTTP error status - */ - status: number; - /** - * Human readable reason - */ - reason: string; - }>; - }> { + ): Promise> { const request = { action: "updateByQuery", body: { changes, query }, @@ -940,3 +918,27 @@ export interface ArgsDocumentControllerUpsert } export type ArgsDocumentControllerValidate = ArgsDefault; + +export interface UpdateByQueryResponse { + /** + * Array of successfully updated documents + */ + successes: KDocument[]; + /** + * Array of failed creation + */ + errors: Array<{ + /** + * Document that cause the error + */ + document: KDocument; + /** + * HTTP error status + */ + status: number; + /** + * Human readable reason + */ + reason: string; + }>; +}