diff --git a/doc/api.md b/doc/api.md index 454f8b0..7ec9147 100644 --- a/doc/api.md +++ b/doc/api.md @@ -196,7 +196,7 @@ OpenWhisk credentials can also be read from environment variables `__OW_NAMESPAC | --- | --- | --- | | [config] | object | used to init the sdk | | [config.ow] | [OpenWhiskCredentials](#OpenWhiskCredentials) | [OpenWhiskCredentials](#OpenWhiskCredentials). Set those if you want to use ootb credentials to access the state management service. OpenWhisk namespace and auth can also be passed through environment variables: `__OW_NAMESPACE` and `__OW_API_KEY` | -| [config.region] | string | optional region to use, accepted values: `amer` (default), `emea` | +| [config.region] | string | optional region to use, accepted values: `amer` (default), `emea`, `apac` | diff --git a/lib/init.js b/lib/init.js index bbe79c3..15de0eb 100644 --- a/lib/init.js +++ b/lib/init.js @@ -42,7 +42,7 @@ const { AdobeState } = require('./AdobeState') * to use ootb credentials to access the state management service. OpenWhisk * namespace and auth can also be passed through environment variables: * `__OW_NAMESPACE` and `__OW_API_KEY` - * @param {string} [config.region] optional region to use, accepted values: `amer` (default), `emea` + * @param {string} [config.region] optional region to use, accepted values: `amer` (default), `emea`, `apac` * @returns {Promise} An AdobeState instance */ async function init (config = {}) { diff --git a/test/AdobeState.test.js b/test/AdobeState.test.js index 9f73356..dd37824 100644 --- a/test/AdobeState.test.js +++ b/test/AdobeState.test.js @@ -705,7 +705,7 @@ describe('private methods', () => { mockCLIEnv.mockReturnValue(env) await expect(AdobeState.init({ ...fakeCredentials, region })).rejects - .toThrow('[AdobeStateLib:ERROR_BAD_ARGUMENT] /region must be equal to one of the allowed values: amer, emea') + .toThrow(new Error('[AdobeStateLib:ERROR_BAD_ARGUMENT] /region must be equal to one of the allowed values: amer, emea, apac')) }) }) diff --git a/types.d.ts b/types.d.ts index 33dd5be..d51483d 100644 --- a/types.d.ts +++ b/types.d.ts @@ -165,7 +165,7 @@ export type OpenWhiskCredentials = { * to use ootb credentials to access the state management service. OpenWhisk * namespace and auth can also be passed through environment variables: * `__OW_NAMESPACE` and `__OW_API_KEY` - * @param [config.region] - optional region to use, accepted values: `amer` (default), `emea` + * @param [config.region] - optional region to use, accepted values: `amer` (default), `emea`, `apac` * @returns An AdobeState instance */ export function init(config?: {