diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e7d5ff..f23be25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.15.3] - 2021-12-23 + +### Fixed + +- fixed json schema definition for cloud storage items in REQUIRE_CONTEXT event payload + ## [1.15.2] - 2021-12-07 ### Added diff --git a/docs/events.md b/docs/events.md index a19010f..9703ad5 100644 --- a/docs/events.md +++ b/docs/events.md @@ -26,6 +26,17 @@ Must be sent on application startup to get initial application context from the } ``` + `cloudStorageKeys` is an optional array of cloud storage key definitions specific to the client application running inside shell. Client application must provide here definitions for all cloud storage keys which later will be requested by the app with `V1.GET_STORAGE_ITEM` or `V2.GET_STORAGE_ITEM` events. If definition for key requested by `V1.GET_STORAGE_ITEM` or `V2.GET_STORAGE_ITEM` events wasn't previously provided in `cloudStorageKeys` array with `REQUIRE_CONTEXT` event payload, error will be generated by the shell host application. + + below definition for CloudStorageKey interface which should be used to provide key definitions: + ```typescript + interface CloudStorageKey { + name: CloudStorageKeyName; + dataVersion: number; + companyDependent: boolean; + } + ``` + The property `targetOutletName` is added automatically by the FSM-Shell in case the request is sent by an extension inside an outlet. It should not be added by the extension itself. * Response payload @@ -228,6 +239,8 @@ Request permissions for specified object from the shell With this event you can get user specific settings. You can find the available settings in the FSM admin page in "Users -> select a user -> User Settings". [Here](https://help.sap.com/viewer/fsm_admin/Cloud/en-US/users.html) you can find more information about users. +NOTE: keys specific to the client application must be registered by providing it's definitions in `cloudStorageKeys` property for [REQUIRE_CONTEXT](#REQUIRE_CONTEXT) event payload at client application startup. Refer [REQUIRE_CONTEXT](#REQUIRE_CONTEXT) event documentation for more details. + #### **Version 2** diff --git a/package-lock.json b/package-lock.json index 36519b2..479cd48 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "fsm-shell", - "version": "1.15.2", + "version": "1.15.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 2abaa0f..b908d01 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fsm-shell", - "version": "1.15.2", + "version": "1.15.3", "description": "client library for FSM shell", "main": "release/fsm-shell-client.js", "module": "release/fsm-shell-client.es.js", diff --git a/src/validation/schemas/require-context/require-context-request.v1.schema.ts b/src/validation/schemas/require-context/require-context-request.v1.schema.ts index 8e1b5e6..739f14b 100644 --- a/src/validation/schemas/require-context/require-context-request.v1.schema.ts +++ b/src/validation/schemas/require-context/require-context-request.v1.schema.ts @@ -12,7 +12,23 @@ export const requireContextRequest_v1_schema = { cloudStorageKeys: { type: 'array', items: { - type: 'string', + type: 'object', + properties: { + name: { + type: 'string' + }, + dataVersion: { + type: 'number' + }, + companyDependent: { + type: 'boolean' + } + }, + required: [ + 'name', + 'dataVersion', + 'companyDependent' + ] }, }, auth: authRequest_v1_schema,