@manycore/budget-plugin-api 0.0.1-alpha.2 → 0.0.1-alpha.4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manycore/budget-plugin-api",
3
- "version": "0.0.1-alpha.2",
3
+ "version": "0.0.1-alpha.4",
4
4
  "title": "@manycore/budget-plugin-api",
5
5
  "description": "清单插件平台二开应用的API",
6
6
  "license": "MIT",
@@ -17,6 +17,12 @@ var __metadata = this && this.__metadata || function (k, v) {
17
17
  if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
18
18
  };
19
19
  import { anno, API_UNSUPPORT, ServService } from 'servkit';
20
+ // 是否系统字段
21
+ export var ESystematic;
22
+ (function (ESystematic) {
23
+ ESystematic[ESystematic["SYSTEMATIC"] = 0] = "SYSTEMATIC";
24
+ ESystematic[ESystematic["CUSTOM"] = 1] = "CUSTOM";
25
+ })(ESystematic || (ESystematic = {}));
20
26
  /**
21
27
  * 清单插件平台API,给插件提供读写清单数据的api
22
28
  */
@@ -67,13 +73,23 @@ var ListingService = /*#__PURE__*/function (_ServService) {
67
73
  value: function getCurrentListingId() {
68
74
  return API_UNSUPPORT();
69
75
  }
76
+ /**
77
+ * 更新项目信息
78
+ */
79
+ }, {
80
+ key: "updateProjectInfo",
81
+ value: function updateProjectInfo(params) {
82
+ return API_UNSUPPORT();
83
+ }
70
84
  }]);
71
85
  }(ServService);
86
+ __decorate([anno.decl.event(), __metadata("design:type", Object)], ListingService.prototype, "syncDesignEvent", void 0);
72
87
  __decorate([anno.decl.api(), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Object)], ListingService.prototype, "getDetail", null);
73
88
  __decorate([anno.decl.api(), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Object)], ListingService.prototype, "updateCells", null);
74
89
  __decorate([anno.decl.api(), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Object)], ListingService.prototype, "lock", null);
75
90
  __decorate([anno.decl.api(), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Object)], ListingService.prototype, "unlock", null);
76
91
  __decorate([anno.decl.api(), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Object)], ListingService.prototype, "getCurrentListingId", null);
92
+ __decorate([anno.decl.api(), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Object)], ListingService.prototype, "updateProjectInfo", null);
77
93
  ListingService = __decorate([anno.decl({
78
94
  id: 'sapp.listing.service',
79
95
  version: '1.0.0'
@@ -17,6 +17,12 @@ var __metadata = this && this.__metadata || function (k, v) {
17
17
  if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
18
18
  };
19
19
  import { anno, API_UNSUPPORT, ServService } from 'servkit';
20
+ export var SyncDesignStatus;
21
+ (function (SyncDesignStatus) {
22
+ SyncDesignStatus["success"] = "success";
23
+ SyncDesignStatus["error"] = "error";
24
+ SyncDesignStatus["loading"] = "loading";
25
+ })(SyncDesignStatus || (SyncDesignStatus = {}));
20
26
  var SappUiToastService = /*#__PURE__*/function (_ServService) {
21
27
  function SappUiToastService() {
22
28
  _classCallCheck(this, SappUiToastService);
@@ -69,6 +75,11 @@ var SappUiToastService = /*#__PURE__*/function (_ServService) {
69
75
  value: function loading(msg) {
70
76
  return API_UNSUPPORT();
71
77
  }
78
+ }, {
79
+ key: "setSyncDesignStatus",
80
+ value: function setSyncDesignStatus(status) {
81
+ return API_UNSUPPORT();
82
+ }
72
83
  }]);
73
84
  }(ServService);
74
85
  __decorate([anno.decl.api(), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Object)], SappUiToastService.prototype, "success", null);
@@ -76,6 +87,7 @@ __decorate([anno.decl.api(), __metadata("design:type", Function), __metadata("de
76
87
  __decorate([anno.decl.api(), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Object)], SappUiToastService.prototype, "info", null);
77
88
  __decorate([anno.decl.api(), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Object)], SappUiToastService.prototype, "warning", null);
78
89
  __decorate([anno.decl.api(), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Object)], SappUiToastService.prototype, "loading", null);
90
+ __decorate([anno.decl.api(), __metadata("design:type", Function), __metadata("design:paramtypes", [String]), __metadata("design:returntype", Object)], SappUiToastService.prototype, "setSyncDesignStatus", null);
79
91
  SappUiToastService = __decorate([anno.decl({
80
92
  id: 's.app.ui.',
81
93
  version: '1.0.0'
@@ -1,5 +1,21 @@
1
1
  import { ServService } from 'servkit';
2
- import type { ServAPIRetn } from 'servkit';
2
+ import type { ServAPIRetn, ServEventer } from 'servkit';
3
+ export declare enum ESystematic {
4
+ SYSTEMATIC = 0,
5
+ CUSTOM = 1
6
+ }
7
+ export interface IProject {
8
+ obsId: string;
9
+ listingId: string;
10
+ name: string;
11
+ value: string;
12
+ struct?: string;
13
+ type: 1 | 2 | 3;
14
+ systemic: ESystematic;
15
+ order: number;
16
+ created: number;
17
+ lastmodified: number;
18
+ }
3
19
  /**
4
20
  * 表格元信息
5
21
  */
@@ -143,6 +159,14 @@ export interface IListingMeta {
143
159
  * 用户ID
144
160
  */
145
161
  userId: string;
162
+ /**
163
+ * 用户邮箱
164
+ */
165
+ email?: string;
166
+ /**
167
+ * 清单项目信息列表
168
+ */
169
+ projectInfos: Array<IProject>;
146
170
  }
147
171
  /**
148
172
  * 清单详情
@@ -189,10 +213,24 @@ export interface IListingLockParams {
189
213
  */
190
214
  message: string;
191
215
  }
216
+ /**
217
+ * 更新项目信息参数
218
+ */
219
+ export interface IProjectInfoUpdateParams {
220
+ /**
221
+ * 清单ID
222
+ */
223
+ listingId: string;
224
+ /**
225
+ * 清单项目信息列表
226
+ */
227
+ projectInfos: IProject[];
228
+ }
192
229
  /**
193
230
  * 清单插件平台API,给插件提供读写清单数据的api
194
231
  */
195
232
  export declare class ListingService extends ServService {
233
+ syncDesignEvent: ServEventer<void>;
196
234
  /**
197
235
  * 读清单数据
198
236
  */
@@ -213,4 +251,8 @@ export declare class ListingService extends ServService {
213
251
  * 获取当前清单id
214
252
  */
215
253
  getCurrentListingId(): ServAPIRetn<string>;
254
+ /**
255
+ * 更新项目信息
256
+ */
257
+ updateProjectInfo(params: IProjectInfoUpdateParams): ServAPIRetn<Promise<void>>;
216
258
  }
@@ -1,5 +1,10 @@
1
1
  import { ServService } from 'servkit';
2
2
  import type { ServAPIRetn } from 'servkit';
3
+ export declare enum SyncDesignStatus {
4
+ success = "success",
5
+ error = "error",
6
+ loading = "loading"
7
+ }
3
8
  export interface IToastConfig {
4
9
  title: string;
5
10
  content: string;
@@ -30,4 +35,5 @@ export declare class SappUiToastService extends ServService {
30
35
  * @param msg 可以传字符串,也可以传 T
31
36
  */
32
37
  loading(msg: string | IToastConfig): ServAPIRetn<void>;
38
+ setSyncDesignStatus(status: SyncDesignStatus): ServAPIRetn<void>;
33
39
  }