tb-apps-sdk
Advanced tools
Comparing version 0.6.3 to 0.6.4
@@ -6,3 +6,5 @@ import { IFactory } from './base'; | ||
finish(...params: any[]): Promise<void>; | ||
requestLeavingLock(): Promise<void>; | ||
releaseLeavingLock(): Promise<void>; | ||
} | ||
export declare const hostAPI: IFactory<ReportAppAPI>; |
@@ -31,2 +31,8 @@ "use strict"; | ||
}; | ||
HostAPI.prototype.requestLeavingLock = function () { | ||
return this.call('requestLeavingLock'); | ||
}; | ||
HostAPI.prototype.releaseLeavingLock = function () { | ||
return this.call('releaseLeavingLock'); | ||
}; | ||
return HostAPI; | ||
@@ -33,0 +39,0 @@ }(base_1.APIBase)); |
{ | ||
"name": "tb-apps-sdk", | ||
"version": "0.6.3", | ||
"version": "0.6.4", | ||
"description": "A sdk for communications between teambiton web and other envs.", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
@@ -25,5 +25,13 @@ [](https://coveralls.io/github/teambition/tb-apps-sdk?branch=refactor/typescript) | ||
callService({ isCI: true, method: 'essage', params: [/* ... */] }) | ||
callService({ isCI: true, method: 'essage', params: { /* 参数 */ } }) | ||
``` | ||
openDetail | ||
```ts | ||
callService({ origin: PLUGIN_ORIGIN, method: 'open', params: { _id: TASKID }, toOrigin: TARGET_ORIGIN_ADDRESS }) | ||
// TARGET_ORIGIN_ADDRESS e.g. www.teambition.com 或者 其他部署地址 或者 通配符 * | ||
// PLUGIN_ORIGIN e.g. 当前页面的 origin 可以使用 document.origin | ||
``` | ||
## For Other Environment | ||
@@ -96,3 +104,3 @@ | ||
| isCI | 是否是 CI 环境 | boolean | / | | ||
| origin | UNKNOWN | string | - | | ||
| origin | fromOrigin | string | - | | ||
| toOrigin | 反向通讯的地址 | string | / | | ||
@@ -99,0 +107,0 @@ | onSuccess | 执行成功后的回调 | () => void | / | |
25257
539
122