@manycore/budget-plugin-api 0.0.1-alpha.3 → 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.3",
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,6 +73,14 @@ 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);
72
86
  __decorate([anno.decl.event(), __metadata("design:type", Object)], ListingService.prototype, "syncDesignEvent", void 0);
@@ -75,6 +89,7 @@ __decorate([anno.decl.api(), __metadata("design:type", Function), __metadata("de
75
89
  __decorate([anno.decl.api(), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Object)], ListingService.prototype, "lock", null);
76
90
  __decorate([anno.decl.api(), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Object)], ListingService.prototype, "unlock", null);
77
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);
78
93
  ListingService = __decorate([anno.decl({
79
94
  id: 'sapp.listing.service',
80
95
  version: '1.0.0'
@@ -1,5 +1,21 @@
1
1
  import { ServService } from 'servkit';
2
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,6 +213,19 @@ 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
  */
@@ -214,4 +251,8 @@ export declare class ListingService extends ServService {
214
251
  * 获取当前清单id
215
252
  */
216
253
  getCurrentListingId(): ServAPIRetn<string>;
254
+ /**
255
+ * 更新项目信息
256
+ */
257
+ updateProjectInfo(params: IProjectInfoUpdateParams): ServAPIRetn<Promise<void>>;
217
258
  }