@cpzxrobot/sdk 1.1.20 → 1.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,6 +23,10 @@ class FactoryGateway extends Object {
23
23
  const response = await axios.get(`/api/v1/workshop/unit/${id}`);
24
24
  return response.data;
25
25
  }
26
+ async add(factory) {
27
+ var axios = await this.context.ready;
28
+ return axios.post("/api/v2/company/factory", factory);
29
+ }
26
30
  //获得工厂的应用信息, 如果指定withRoles为true,则返回app和app的详细角色信息
27
31
  async apps(id, withRoles = false) {
28
32
  var axios = await this.context.ready;
@@ -28,6 +28,11 @@ export class FactoryGateway extends Object {
28
28
  return response.data;
29
29
  }
30
30
 
31
+ async add(factory: Factory) {
32
+ var axios = await this.context.ready;
33
+ return axios.post("/api/v2/company/factory", factory);
34
+ }
35
+
31
36
  //获得工厂的应用信息, 如果指定withRoles为true,则返回app和app的详细角色信息
32
37
  async apps(id: number, withRoles = false): Promise<any> {
33
38
  var axios = await this.context.ready;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.1.20",
3
+ "version": "1.1.21",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {