-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update measure model for localization (#385)
* feat: update measure model for localization * feat: update asset model for localization and description * feat: add modelFriendlyName in asset mapping and in asset create endpoint * feat: implement updateModelFriendlyName * feat: add asset history for modelFriendlyName update * style: change naming * fix: update Container definition for ci * docs: add documentation for asset model and updateModelLocales endpoint * feat: add locales in MeasureModelContent type * fix: let locales optional in measure model * feat: add scroll to assets query * feat: update entiry the method to include assetHistory in scroll loop * fix: update to use only updateByQuery * fix: update documentation * fix: change PUT to PATCH in documentation * feat: group result by index * feat: implement error management 206, 400 * refactor: update wordings and errors * refactor: remove AssetHistoryEventModelLocales type
- Loading branch information
Showing
19 changed files
with
316 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
code: true | ||
type: page | ||
title: updateModelLocales | ||
description: Update all assets localization | ||
--- | ||
|
||
# update | ||
|
||
Update all existing assets localization. | ||
|
||
The `updateModelLocales` operation allows you to update the `locales` of all `assets` related to the specified `asset model`. | ||
The process retrieve the locales values stored in the asset model and update the locales of all the assets with these values. For the moment, this operation has to be done `manually` when the asset model locales changed to make the `search` operation on assets to `be up to date`. | ||
|
||
## Query Syntax | ||
|
||
### HTTP | ||
|
||
```http | ||
URL: http://kuzzle:7512/_/device-manager/assets/modelLocales | ||
Method: PATCH | ||
``` | ||
|
||
## Other protocols | ||
|
||
```js | ||
{ | ||
"controller": "device-manager/assets", | ||
"action": "updateModelLocales", | ||
"model": "Container", | ||
"engineGroup": "commons" | ||
} | ||
``` | ||
|
||
## Arguments | ||
|
||
- `engineGroup`: Engine group | ||
- `model`: asset model | ||
|
||
## Response | ||
|
||
```js | ||
{ | ||
"action": "updateModelLocales", | ||
"collection": "assets", | ||
"controller": "device-manager/assets", | ||
"error": null, | ||
"headers": {}, | ||
"index": "engine-ayse", | ||
"node": "knode-gigantic-iago-99422", | ||
"requestId": "3b86b6d1-8004-4273-ba03-94526b019b8a", | ||
"status": 200, | ||
"volatile": null | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.