diff --git a/CHANGELOG.md b/CHANGELOG.md index d4b04a44..17475dce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [2.4.0] + +- Add custom properties to a KuzzleRequest + ## [2.3.0] - Add an option to accept bad SSL certificate diff --git a/doc/2/core-classes/kuzzle/query/index.md b/doc/2/core-classes/kuzzle/query/index.md index 9948e1ab..5b5f41c7 100644 --- a/doc/2/core-classes/kuzzle/query/index.md +++ b/doc/2/core-classes/kuzzle/query/index.md @@ -24,7 +24,7 @@ This is a low-level method, exposed to allow advanced SDK users to bypass high-l | Argument | Type | Description | | --------- | ----------------- | ---------------------- | -| `request` |
KuzzleRequest| API request | +| `request` |
[KuzzleRequest](/sdk/dart/2/core-classes/request)| API request | | `volatile` |
Map| Additional information to send to Kuzzle | | `queueable` |
bool| If true, queues the request during downtime, until connected to Kuzzle again | diff --git a/doc/2/core-classes/request/index.md b/doc/2/core-classes/request/index.md new file mode 100644 index 00000000..5606888f --- /dev/null +++ b/doc/2/core-classes/request/index.md @@ -0,0 +1,7 @@ +--- +code: true +type: branch +title: KuzzleRequest +description: KuzzleRequest object documentation +order: 0 +--- \ No newline at end of file diff --git a/doc/2/core-classes/request/introduction/index.md b/doc/2/core-classes/request/introduction/index.md new file mode 100644 index 00000000..be91aa39 --- /dev/null +++ b/doc/2/core-classes/request/introduction/index.md @@ -0,0 +1,36 @@ +--- +code: false +type: page +title: Introduction +description: KuzzleRequest object description +order: 0 +--- + +## KuzzleRequest + +`KuzzleRequest` is a **serializable** class representing a raw Kuzzle request. + + +## Properties + +| Property | Type | Description | +|--- |--- |--- | +| `action` |
String| Executed Kuzzle API controller's action ` +| `body` |
Map| +| `collection` |body
String| Impacted collection | +| `controller` |
String| Executed Kuzzle API controller | +| `index` |
String| Impacted index | +| `jwt` |
String| Authentication token | +| `lang` |
String| ES lang | +| `requestId` |
String| Request unique identifier | +| `waitForRefresh` |
bool| If set to `true`, Kuzzle will wait for the persistence layer to finish indexing | +| `volatile` |
Map| Volatile data | +| `from` |
int
int
String
String| The scrollId if using scroll option | +| `sort` |
List| Contains a list of fields, used to [sort search results](https://www.elastic.co/guide/en/elasticsearch/reference/7.3/search-request-sort.html), in order of importance. | + +## Overrided operators + +The `[]` and `[]=` are overrided so you can dynamically add any args you want to this class and it will be taken in consideration in the request sent to Kuzzle. diff --git a/lib/src/kuzzle/request.dart b/lib/src/kuzzle/request.dart index c4fc9abe..a4ff77ab 100644 --- a/lib/src/kuzzle/request.dart +++ b/lib/src/kuzzle/request.dart @@ -111,8 +111,13 @@ class KuzzleRequest { includeKuzzleMeta = data['includeKuzzleMeta'] as bool; } + final Map