diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e3b88e2..df1611e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +# [7.15.0-beta.1](https://github.com/kuzzleio/sdk-javascript/compare/v7.14.0...v7.15.0-beta.1) (2025-02-12) + + +### Bug Fixes + +* add default options to security:checkRights ([#757](https://github.com/kuzzleio/sdk-javascript/issues/757)) ([b07f061](https://github.com/kuzzleio/sdk-javascript/commit/b07f0617a38cb16d7e0022af8363bb1f3e8d79a8)) + + +### Features + +* create an interface to export and use in KDM ([#758](https://github.com/kuzzleio/sdk-javascript/issues/758)) ([84e7a1b](https://github.com/kuzzleio/sdk-javascript/commit/84e7a1b403a7da0b93f73a8d30e3c94e40b83993)) + # [7.14.0](https://github.com/kuzzleio/sdk-javascript/compare/v7.13.0...v7.14.0) (2024-11-05) diff --git a/package-lock.json b/package-lock.json index d0489dfe..489a52e7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "kuzzle-sdk", - "version": "7.14.0", + "version": "7.15.0-beta.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "kuzzle-sdk", - "version": "7.14.0", + "version": "7.15.0-beta.1", "license": "Apache-2.0", "dependencies": { "min-req-promise": "^1.0.1", diff --git a/package.json b/package.json index ec59a482..fa0bdbc5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kuzzle-sdk", - "version": "7.14.0", + "version": "7.15.0-beta.1", "description": "Official Javascript SDK for Kuzzle", "author": "The Kuzzle Team ", "repository": { 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; + }>; +} diff --git a/src/controllers/Security.ts b/src/controllers/Security.ts index 6a832337..b16aae98 100644 --- a/src/controllers/Security.ts +++ b/src/controllers/Security.ts @@ -52,7 +52,7 @@ export class SecurityController extends BaseController { checkRights( kuid, requestPayload, - options: ArgsSecurityControllerCheckRights + options: ArgsSecurityControllerCheckRights = {} ) { const request = { action: "checkRights",