Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update json schema for cloud storage items #121

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions docs/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.

<!-- tabs:start -->

#### **Version 2**
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down