1.0.2 • Published 3 years ago

egg-h3yun v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

egg-h3yun

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Install

$ npm i egg-h3yun --save

Usage

// {app_root}/config/plugin.js
exports.h3yun = {
  enable: true,
  package: 'egg-h3yun',
};

Configuration

// {app_root}/config/config.default.js
exports.h3yun = {
  engineCode: 'xxx',
  engineSecret: 'xxx',
};

see config/config.default.js for more detail.

Example

loadBizObject

  const ctx = this.ctx;
  const schemaCode = 'D000888WorkOrders';
  const bizObjectId = '2fcd7593-65ab-4f19-ba36-246d7be4a7e7';
  const rsp = await ctx.service.h3yun.loadBizObject(schemaCode, bizObjectId);

loadBizObjects

  const ctx = this.ctx;
  const { AndMatcher, ItemMatcher, Op, Filter } = ctx.helper;
  const schemaCode = 'D000888WorkOrders';
  const matchers = new AndMatcher().add(new AndMatcher().add(new ItemMatcher('Site', Op.eq, 'TEST')));
  const filter = new Filter(matchers);
  const rsp = await ctx.service.h3yun.loadBizObjects(schemaCode, filter);

Questions & Suggestions

Please open an issue here.

License

MIT