Skip to content
Merged

Beta #760

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)


Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>",
"repository": {
Expand Down
48 changes: 25 additions & 23 deletions src/controllers/Document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -716,29 +716,7 @@ export class DocumentController extends BaseController {
query: JSONObject,
changes: Partial<TKDocumentContent>,
options: ArgsDocumentControllerUpdateByQuery = {}
): Promise<{
/**
* Array of successfully updated documents
*/
successes: KDocument<TKDocumentContent>[];
/**
* Array of failed creation
*/
errors: Array<{
/**
* Document that cause the error
*/
document: KDocument<TKDocumentContent>;
/**
* HTTP error status
*/
status: number;
/**
* Human readable reason
*/
reason: string;
}>;
}> {
): Promise<UpdateByQueryResponse<TKDocumentContent>> {
const request = {
action: "updateByQuery",
body: { changes, query },
Expand Down Expand Up @@ -940,3 +918,27 @@ export interface ArgsDocumentControllerUpsert<TKDocumentContent>
}

export type ArgsDocumentControllerValidate = ArgsDefault;

export interface UpdateByQueryResponse<TKDocumentContent> {
/**
* Array of successfully updated documents
*/
successes: KDocument<TKDocumentContent>[];
/**
* Array of failed creation
*/
errors: Array<{
/**
* Document that cause the error
*/
document: KDocument<TKDocumentContent>;
/**
* HTTP error status
*/
status: number;
/**
* Human readable reason
*/
reason: string;
}>;
}
2 changes: 1 addition & 1 deletion src/controllers/Security.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class SecurityController extends BaseController {
checkRights(
kuid,
requestPayload,
options: ArgsSecurityControllerCheckRights
options: ArgsSecurityControllerCheckRights = {}
) {
const request = {
action: "checkRights",
Expand Down