BeefreeSDK / beefree-sdk-npm-official

Official NPM package of Beefree SDK
https://developers.beefree.io
Apache License 2.0
19 stars 7 forks source link

Fix/issue 80 save as template type #81

Closed davidesamp closed 2 years ago

davidesamp commented 2 years ago

Description

Motivation and Context

Close https://github.com/BEE-Plugin/Bee-plugin-official/issues/80

Usage examples

import BeePLugin from '@mailupinc/bee-plugin'

const template = {....}

const beeConfig :IBeeConfig = {
  uid: 'test1-clientside',
  container: 'bee-plugin-container',
  onSaveAsTemplate: (json) => void save('newsletter-template.json', json),
  ...
}

const beePlugin = new BeePlugin()
beePlugin.getToken().then(() => {
    beePlugin.start(beeConfig, template, '', { shared: false })
})

Types of changes

github-actions[bot] commented 2 years ago

Code Coverage Report

Coverage after merging fix/issue-80-saveAsTemplate-type into master

84.00%
Coverage Report
FileBranchesFuncsLinesUncovered Lines
src
   index.ts50%7.89%61.97%..., 93, 94, 98, 99
src/services
   api.ts100%50%100%
   axios.ts100%100%100%
src/types
   bee.ts100%100%100%
src/utils
   Constants.ts100%100%100%
   utils.ts0%0%70.59%..., 8, 8, 9, 9