-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2129 from kuzzleio/2.14.0-proposal
Release 2.14.0
- Loading branch information
Showing
104 changed files
with
4,046 additions
and
2,097 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
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
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,6 @@ | ||
--- | ||
type: branch | ||
title: BackendImport | ||
description: BackendImport class definition | ||
code: true | ||
--- |
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,80 @@ | ||
--- | ||
code: true | ||
type: page | ||
title: mappings | ||
description: BackendImport.mappings method | ||
--- | ||
|
||
# `mappings()` | ||
|
||
<SinceBadge version="2.14.0" /> | ||
<CustomBadge type="error" text="Experimental: non-backward compatible changes or removal may occur in any future release."/> | ||
|
||
Loads mappings into the app. | ||
|
||
This method is idempotent. If a collection mappings is defined multiple times, only the last definition will be retained. | ||
|
||
::: info | ||
This method can only be used before the application is started. | ||
::: | ||
|
||
```ts | ||
mappings(mappings: JSONObject): void | ||
``` | ||
|
||
<br/> | ||
|
||
| Argument | Type | Description | | ||
|------------|-----------------------|-------------------------------| | ||
| `mappings` | <pre>JSONObject</pre> | Object containing index and their collection [mappings](/core/2/guides/main-concepts/data-storage#mappings-properties). | | ||
|
||
## Usage | ||
|
||
```js | ||
app.import.mappings({ | ||
index1: { | ||
collection1: { | ||
mappings: { | ||
dynamic: 'strict', | ||
_meta: { | ||
field: 'value', | ||
}, | ||
properties: { | ||
fieldA: { type: 'keyword'}, | ||
fieldB: { type: 'integer'} | ||
}, | ||
}, | ||
settings: { | ||
analysis : { | ||
analyzer:{ | ||
content:{ | ||
type:'custom', | ||
tokenizer:'whitespace' | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
collection2: { | ||
mappings: { | ||
properties: { | ||
fieldC: { | ||
type: 'keyword' | ||
} | ||
} | ||
} | ||
}, | ||
}, | ||
index2: { | ||
collection1: { | ||
mappings: { | ||
properties: { | ||
fieldD: { | ||
type: 'integer' | ||
} | ||
} | ||
} | ||
}, | ||
}, | ||
}) | ||
``` |
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,61 @@ | ||
--- | ||
code: true | ||
type: page | ||
title: profiles | ||
description: BackendImport.profiles method | ||
--- | ||
|
||
# `profiles()` | ||
|
||
<SinceBadge version="2.14.0" /> | ||
<CustomBadge type="error" text="Experimental: non-backward compatible changes or removal may occur in any future release."/> | ||
|
||
Loads profiles into the app. | ||
|
||
This method is idempotent. If a profile is defined multiple times, only the last definition will be retained. | ||
|
||
::: info | ||
This method can only be used before the application is started. | ||
::: | ||
|
||
```ts | ||
profiles(profiles: JSONObject): void | ||
``` | ||
|
||
<br/> | ||
|
||
| Argument | Type | Description | | ||
|------------|-----------------------|-------------------------------| | ||
| `profiles` | <pre>JSONObject</pre> | Object containing profiles and their [definitions](/core/2/guides/main-concepts/permissions#profiles). | | ||
|
||
## Usage | ||
|
||
```js | ||
app.import.profiles({ | ||
profileA: { | ||
rateLimit: 50, | ||
policies: [ | ||
{ | ||
roleId: 'roleA' | ||
}, | ||
{ | ||
roleId: 'roleB', | ||
restrictedTo: [ | ||
{ | ||
index: 'index1' | ||
}, | ||
{ | ||
index: 'index2', | ||
collections: [ 'collectionA', 'collectionB'] | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
profileB: { | ||
policies: [ | ||
{ roleId: 'roleA' } | ||
] | ||
}, | ||
}) | ||
``` |
16 changes: 16 additions & 0 deletions
16
doc/2/framework/classes/backend-import/properties/index.md
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,16 @@ | ||
--- | ||
code: false | ||
type: page | ||
title: Properties | ||
description: BackendImport class properties | ||
--- | ||
|
||
# BackendImport | ||
|
||
The `BackendImport` class handles mappings, permissions and users import. | ||
|
||
It is accessible from the [Backend.import](/core/2/framework/classes/backend/properties#import) property. | ||
|
||
::: info | ||
This class does not have any properties. | ||
::: |
Oops, something went wrong.