@lark-project/js-sdk 0.0.25 → 0.0.27
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/dist/es/index.js +15 -9
- package/dist/lib/index.js +15 -9
- package/dist/types/index.d.ts +26 -5
- package/package.json +1 -1
package/dist/es/index.js
CHANGED
|
@@ -226,7 +226,7 @@ var _SDKClient = class {
|
|
|
226
226
|
if (typeof __MEEGO_BIZ_HUB__ !== "function") {
|
|
227
227
|
throw new Error("The application does not support the sdk");
|
|
228
228
|
}
|
|
229
|
-
this._meegoBizHub = __MEEGO_BIZ_HUB__({
|
|
229
|
+
this._meegoBizHub = yield __MEEGO_BIZ_HUB__({
|
|
230
230
|
sdkVersion: _SDKClient.version
|
|
231
231
|
});
|
|
232
232
|
yield this._meegoBizHub.configure({
|
|
@@ -242,7 +242,7 @@ var SDKClient = _SDKClient;
|
|
|
242
242
|
/**
|
|
243
243
|
* SDK 版本号
|
|
244
244
|
*/
|
|
245
|
-
SDKClient.version = "0.0.
|
|
245
|
+
SDKClient.version = "0.0.27";
|
|
246
246
|
|
|
247
247
|
// src/types/biz.ts
|
|
248
248
|
var FieldType = /* @__PURE__ */ ((FieldType2) => {
|
|
@@ -302,22 +302,26 @@ var InterceptionEvent = /* @__PURE__ */ ((InterceptionEvent2) => {
|
|
|
302
302
|
return InterceptionEvent2;
|
|
303
303
|
})(InterceptionEvent || {});
|
|
304
304
|
|
|
305
|
-
// src/errors.ts
|
|
305
|
+
// src/errors/CustomError.ts
|
|
306
306
|
var CustomError = class extends Error {
|
|
307
307
|
constructor(options) {
|
|
308
308
|
super(options.message);
|
|
309
309
|
this.originMessage = options.originMessage;
|
|
310
310
|
}
|
|
311
311
|
};
|
|
312
|
-
|
|
312
|
+
|
|
313
|
+
// src/errors/InternalError.ts
|
|
314
|
+
var InternalError = class extends CustomError {
|
|
313
315
|
constructor(options) {
|
|
314
316
|
super({
|
|
315
|
-
message: "
|
|
317
|
+
message: "internal error",
|
|
316
318
|
originMessage: options.originMessage
|
|
317
319
|
});
|
|
318
|
-
this.name = "
|
|
320
|
+
this.name = "InternalError";
|
|
319
321
|
}
|
|
320
322
|
};
|
|
323
|
+
|
|
324
|
+
// src/errors/NoAuthError.ts
|
|
321
325
|
var NoAuthError = class extends CustomError {
|
|
322
326
|
constructor(options) {
|
|
323
327
|
super({
|
|
@@ -327,13 +331,15 @@ var NoAuthError = class extends CustomError {
|
|
|
327
331
|
this.name = "NoAuthError";
|
|
328
332
|
}
|
|
329
333
|
};
|
|
330
|
-
|
|
334
|
+
|
|
335
|
+
// src/errors/NotFoundError.ts
|
|
336
|
+
var NotFoundError = class extends CustomError {
|
|
331
337
|
constructor(options) {
|
|
332
338
|
super({
|
|
333
|
-
message: "
|
|
339
|
+
message: "not found",
|
|
334
340
|
originMessage: options.originMessage
|
|
335
341
|
});
|
|
336
|
-
this.name = "
|
|
342
|
+
this.name = "NotFoundError";
|
|
337
343
|
}
|
|
338
344
|
};
|
|
339
345
|
|
package/dist/lib/index.js
CHANGED
|
@@ -267,7 +267,7 @@ var _SDKClient = class {
|
|
|
267
267
|
if (typeof __MEEGO_BIZ_HUB__ !== "function") {
|
|
268
268
|
throw new Error("The application does not support the sdk");
|
|
269
269
|
}
|
|
270
|
-
this._meegoBizHub = __MEEGO_BIZ_HUB__({
|
|
270
|
+
this._meegoBizHub = yield __MEEGO_BIZ_HUB__({
|
|
271
271
|
sdkVersion: _SDKClient.version
|
|
272
272
|
});
|
|
273
273
|
yield this._meegoBizHub.configure({
|
|
@@ -283,7 +283,7 @@ var SDKClient = _SDKClient;
|
|
|
283
283
|
/**
|
|
284
284
|
* SDK 版本号
|
|
285
285
|
*/
|
|
286
|
-
SDKClient.version = "0.0.
|
|
286
|
+
SDKClient.version = "0.0.27";
|
|
287
287
|
|
|
288
288
|
// src/types/biz.ts
|
|
289
289
|
var FieldType = /* @__PURE__ */ ((FieldType2) => {
|
|
@@ -343,22 +343,26 @@ var InterceptionEvent = /* @__PURE__ */ ((InterceptionEvent2) => {
|
|
|
343
343
|
return InterceptionEvent2;
|
|
344
344
|
})(InterceptionEvent || {});
|
|
345
345
|
|
|
346
|
-
// src/errors.ts
|
|
346
|
+
// src/errors/CustomError.ts
|
|
347
347
|
var CustomError = class extends Error {
|
|
348
348
|
constructor(options) {
|
|
349
349
|
super(options.message);
|
|
350
350
|
this.originMessage = options.originMessage;
|
|
351
351
|
}
|
|
352
352
|
};
|
|
353
|
-
|
|
353
|
+
|
|
354
|
+
// src/errors/InternalError.ts
|
|
355
|
+
var InternalError = class extends CustomError {
|
|
354
356
|
constructor(options) {
|
|
355
357
|
super({
|
|
356
|
-
message: "
|
|
358
|
+
message: "internal error",
|
|
357
359
|
originMessage: options.originMessage
|
|
358
360
|
});
|
|
359
|
-
this.name = "
|
|
361
|
+
this.name = "InternalError";
|
|
360
362
|
}
|
|
361
363
|
};
|
|
364
|
+
|
|
365
|
+
// src/errors/NoAuthError.ts
|
|
362
366
|
var NoAuthError = class extends CustomError {
|
|
363
367
|
constructor(options) {
|
|
364
368
|
super({
|
|
@@ -368,13 +372,15 @@ var NoAuthError = class extends CustomError {
|
|
|
368
372
|
this.name = "NoAuthError";
|
|
369
373
|
}
|
|
370
374
|
};
|
|
371
|
-
|
|
375
|
+
|
|
376
|
+
// src/errors/NotFoundError.ts
|
|
377
|
+
var NotFoundError = class extends CustomError {
|
|
372
378
|
constructor(options) {
|
|
373
379
|
super({
|
|
374
|
-
message: "
|
|
380
|
+
message: "not found",
|
|
375
381
|
originMessage: options.originMessage
|
|
376
382
|
});
|
|
377
|
-
this.name = "
|
|
383
|
+
this.name = "NotFoundError";
|
|
378
384
|
}
|
|
379
385
|
};
|
|
380
386
|
|
package/dist/types/index.d.ts
CHANGED
|
@@ -167,6 +167,20 @@ declare enum FieldType {
|
|
|
167
167
|
*/
|
|
168
168
|
workitemRelatedMultiSelect = "workitem_related_multi_select"
|
|
169
169
|
}
|
|
170
|
+
/**
|
|
171
|
+
* @public
|
|
172
|
+
* 空间(仅含关键属性)
|
|
173
|
+
*/
|
|
174
|
+
interface BriefSpace {
|
|
175
|
+
/**
|
|
176
|
+
* 唯一标识
|
|
177
|
+
*/
|
|
178
|
+
id: string;
|
|
179
|
+
/**
|
|
180
|
+
* 名称
|
|
181
|
+
*/
|
|
182
|
+
name: string;
|
|
183
|
+
}
|
|
170
184
|
/**
|
|
171
185
|
* @public
|
|
172
186
|
* 字段(仅含关键属性)
|
|
@@ -437,6 +451,10 @@ declare abstract class Cursor extends BaseModel {
|
|
|
437
451
|
* @internal
|
|
438
452
|
*/
|
|
439
453
|
protected static [IMPL_KEY]: string;
|
|
454
|
+
/**
|
|
455
|
+
* 主空间信息(左侧导航栏选中的空间)
|
|
456
|
+
*/
|
|
457
|
+
abstract mainSpace?: Partial<BriefSpace>;
|
|
440
458
|
/**
|
|
441
459
|
* 详情页的状态
|
|
442
460
|
*/
|
|
@@ -726,15 +744,17 @@ declare class CustomError extends Error {
|
|
|
726
744
|
originMessage: string;
|
|
727
745
|
});
|
|
728
746
|
}
|
|
747
|
+
|
|
729
748
|
/**
|
|
730
749
|
* @public
|
|
731
|
-
*
|
|
750
|
+
* 内部逻辑异常
|
|
732
751
|
*/
|
|
733
|
-
declare class
|
|
752
|
+
declare class InternalError extends CustomError {
|
|
734
753
|
constructor(options: {
|
|
735
754
|
originMessage: string;
|
|
736
755
|
});
|
|
737
756
|
}
|
|
757
|
+
|
|
738
758
|
/**
|
|
739
759
|
* @public
|
|
740
760
|
* 无权限访问对应数据的异常
|
|
@@ -744,11 +764,12 @@ declare class NoAuthError extends CustomError {
|
|
|
744
764
|
originMessage: string;
|
|
745
765
|
});
|
|
746
766
|
}
|
|
767
|
+
|
|
747
768
|
/**
|
|
748
769
|
* @public
|
|
749
|
-
*
|
|
770
|
+
* 未找到对应数据的异常
|
|
750
771
|
*/
|
|
751
|
-
declare class
|
|
772
|
+
declare class NotFoundError extends CustomError {
|
|
752
773
|
constructor(options: {
|
|
753
774
|
originMessage: string;
|
|
754
775
|
});
|
|
@@ -763,4 +784,4 @@ declare class InternalError extends CustomError {
|
|
|
763
784
|
* @packageDocumentation
|
|
764
785
|
*/
|
|
765
786
|
|
|
766
|
-
export { BizLine, BriefField, BriefNode, BriefTemplate, BriefView, BriefWorkItem, BriefWorkObject, ButtonFeatureContext, ButtonScene, ControlFeatureContext, Cursor, Field, FieldType, FlowMode, HostEnv, IMPL_KEY, IntegrationFeatureContext, InterceptionEvent, InterceptionFeatureContext, InternalError, Language, MEEGO_BIZ_HUB, NoAuthError, NotFoundError, PageFeatureContext, Role, RoleOwners, SDKClient, SDKClientOptions, Session, Space, TabFeatureContext, User, ViewFeatureContext, WorkItem, WorkObject, SDKClient as default, unwatch };
|
|
787
|
+
export { BizLine, BriefField, BriefNode, BriefSpace, BriefTemplate, BriefView, BriefWorkItem, BriefWorkObject, ButtonFeatureContext, ButtonScene, ControlFeatureContext, Cursor, Field, FieldType, FlowMode, HostEnv, IMPL_KEY, IntegrationFeatureContext, InterceptionEvent, InterceptionFeatureContext, InternalError, Language, MEEGO_BIZ_HUB, NoAuthError, NotFoundError, PageFeatureContext, Role, RoleOwners, SDKClient, SDKClientOptions, Session, Space, TabFeatureContext, User, ViewFeatureContext, WorkItem, WorkObject, SDKClient as default, unwatch };
|