@apideck/vault-js
Advanced tools
Comparing version 1.4.0 to 1.5.1
@@ -18,2 +18,3 @@ export declare enum ConnectionViewType { | ||
initialView?: ConnectionViewType; | ||
locale?: string; | ||
} | ||
@@ -20,0 +21,0 @@ export interface Metadata { |
{ | ||
"version": "1.4.0", | ||
"version": "1.5.1", | ||
"license": "MIT", | ||
@@ -4,0 +4,0 @@ "main": "dist/index.js", |
@@ -74,2 +74,26 @@ <img src="https://user-images.githubusercontent.com/8850410/208065819-716c6e02-98c9-4df5-b687-e5acd1e3c4e5.png" width="100%" /> | ||
If you want to open a specific view you can pass the `initialView` prop. The available views are `settings`, `configurable-resources`, and `custom-mapping`. | ||
```js | ||
import { ApideckVault } from '@apideck/vault-js'; | ||
ApideckVault.open({ | ||
token: 'REPLACE_WITH_SESSION_TOKEN', | ||
unifiedApi: 'accounting', | ||
serviceId: 'quickbooks', | ||
initialView: 'custom-mapping', | ||
}); | ||
``` | ||
If you want to open vault in a specific language you can pass a locale. The available locales are `en` (default), `nl`, `de`, `fr`, and `es`. | ||
```js | ||
import { ApideckVault } from '@apideck/vault-js'; | ||
ApideckVault.open({ | ||
token: 'REPLACE_WITH_SESSION_TOKEN', | ||
locale: 'nl', | ||
}); | ||
You can also close the modal programmatically by calling `ApideckVault.close()`. | ||
@@ -82,3 +106,3 @@ | ||
| Property | Type | Required | Default | Description | | ||
|--------------------|----------------------------------|----------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| ------------------ | -------------------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | | ||
| token | string | true | - | The JSON Web Token returned from the [Create Session API](https://docs.apideck.com/apis/vault/reference#operation/sessionsCreate) | | ||
@@ -95,1 +119,4 @@ | showAttribution | boolean | false | true | Show "Powered by Apideck" in the backdrop of the modal backdrop | | ||
| showConsumer | boolean | false | false | If true it shows the current consumer metadata at the bottom of the modal | | ||
| initialView | ConnectionViewType | false | - | Open Vault in a specific view for a connection: "settings", "configurable-resources", or "custom-mapping" | | ||
| locale | string | false | "en" | Open Vault in a specific language: "en", "nl", "de", "fr" or "es" | | ||
``` |
@@ -19,2 +19,3 @@ export enum ConnectionViewType { | ||
initialView?: ConnectionViewType; | ||
locale?: string; // en, fr, nl, de, es | ||
} | ||
@@ -21,0 +22,0 @@ |
56067
590
120