Skip to content

Commit 1d26283

Browse files
author
Adrien Maret
authored
Release 7.9.1: Make document metadata optional in KDocumentContent (#688)
## What does this PR do ? Make document metadata optional in KDocumentContent so users can instantiate their own document content without having to fill the `_kuzzle_info` field. ### Other changes - add missing sincebadge
1 parent cfd8b52 commit 1d26283

File tree

8 files changed

+15
-6
lines changed

8 files changed

+15
-6
lines changed

doc/7/core-classes/base-controller/introduction/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ order: 0
88

99
# BaseController
1010

11-
Base class for a [custom SDK controller](/sdk/js/7/essentials/extend-sdk#define-a-custom-sdk-controller).
11+
<SinceBadge version="7.9.0"/>
12+
13+
Base class for a [custom SDK controller](/sdk/js/7/essentials/extend-sdk#define-a-custom-sdk-controller).
1214

1315
Custom SDK controllers have to extend the `BaseController` class to be added with the [Kuzzle.useController](/sdk/js/7/core-classes/kuzzle/use-controller) method.

doc/7/core-classes/base-controller/properties/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ description: BaseController Properties
77

88
# Properties
99

10+
<SinceBadge version="7.9.0"/>
11+
1012
| Property name | Type | Description |
1113
| -------------------- | -------- | --------------------------------------- |
1214
| `name` | <pre>string</pre> | Controller name |

doc/7/core-classes/base-controller/query/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ description: Wrapper around the Kuzzle.query method
77

88
# query
99

10-
Base method used to send queries to a Kuzzle controller, following the [API Documentation](/core/2/api).
10+
<SinceBadge version="7.9.0"/>
11+
12+
Base method used to send queries to a Kuzzle controller, following the [API Documentation](/core/2/api).
1113

1214
This method injects the controller name into the the request and forwards it to the original [Kuzzle.query](/sdk/js/7/core-classes/kuzzle/query) method.
1315

doc/7/essentials/batch-processing/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ order: 600
88

99
# Batch Processing
1010

11+
<SinceBadge version="7.9.0"/>
12+
1113
Most of the methods of the Document controller have a batch alternative:
1214
- create => mCreate
1315
- replace => mReplace
@@ -35,7 +37,6 @@ The BatchController can be used with [strong typing](/sdk/js/7/essentials/strong
3537
```js
3638
const doc = await batch.get<DeviceContent>('nyc-open-data', 'yellow-taxi', 'aschen');
3739
```
38-
3940
:::
4041

4142

doc/7/essentials/strong-typing/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ The SDK exposes numerous types to help Typescript developer to maintain a safer
1212

1313
## Kuzzle Document (KDocument)
1414

15+
<SinceBadge version="7.9.0"/>
16+
1517
The Document controller methods can be used with an explicit type that represents the content of the manipulated document.
1618

1719
Document content must be defined by extending the `KDocumentContent` interface.

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "kuzzle-sdk",
3-
"version": "7.9.0",
3+
"version": "7.9.1",
44
"description": "Official Javascript SDK for Kuzzle",
55
"author": "The Kuzzle Team <support@kuzzle.io>",
66
"repository": {

src/types/KDocument.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export interface KDocumentKuzzleInfo {
2929
* Base interface for a Kuzzle document content
3030
*/
3131
export interface KDocumentContent {
32-
_kuzzle_info: KDocumentKuzzleInfo;
32+
_kuzzle_info?: KDocumentKuzzleInfo;
3333
}
3434

3535
/**

0 commit comments

Comments
 (0)