@lark-project/js-sdk 0.0.24 → 0.0.25
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 +39 -1
- package/dist/lib/index.js +42 -1
- package/dist/types/index.d.ts +39 -1
- package/package.json +1 -1
package/dist/es/index.js
CHANGED
|
@@ -242,7 +242,7 @@ var SDKClient = _SDKClient;
|
|
|
242
242
|
/**
|
|
243
243
|
* SDK 版本号
|
|
244
244
|
*/
|
|
245
|
-
SDKClient.version = "0.0.
|
|
245
|
+
SDKClient.version = "0.0.25";
|
|
246
246
|
|
|
247
247
|
// src/types/biz.ts
|
|
248
248
|
var FieldType = /* @__PURE__ */ ((FieldType2) => {
|
|
@@ -302,6 +302,41 @@ var InterceptionEvent = /* @__PURE__ */ ((InterceptionEvent2) => {
|
|
|
302
302
|
return InterceptionEvent2;
|
|
303
303
|
})(InterceptionEvent || {});
|
|
304
304
|
|
|
305
|
+
// src/errors.ts
|
|
306
|
+
var CustomError = class extends Error {
|
|
307
|
+
constructor(options) {
|
|
308
|
+
super(options.message);
|
|
309
|
+
this.originMessage = options.originMessage;
|
|
310
|
+
}
|
|
311
|
+
};
|
|
312
|
+
var NotFoundError = class extends CustomError {
|
|
313
|
+
constructor(options) {
|
|
314
|
+
super({
|
|
315
|
+
message: "not found",
|
|
316
|
+
originMessage: options.originMessage
|
|
317
|
+
});
|
|
318
|
+
this.name = "NotFoundError";
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
var NoAuthError = class extends CustomError {
|
|
322
|
+
constructor(options) {
|
|
323
|
+
super({
|
|
324
|
+
message: "no auth",
|
|
325
|
+
originMessage: options.originMessage
|
|
326
|
+
});
|
|
327
|
+
this.name = "NoAuthError";
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
var InternalError = class extends CustomError {
|
|
331
|
+
constructor(options) {
|
|
332
|
+
super({
|
|
333
|
+
message: "internal error",
|
|
334
|
+
originMessage: options.originMessage
|
|
335
|
+
});
|
|
336
|
+
this.name = "InternalError";
|
|
337
|
+
}
|
|
338
|
+
};
|
|
339
|
+
|
|
305
340
|
// src/index.ts
|
|
306
341
|
var src_default = SDKClient;
|
|
307
342
|
export {
|
|
@@ -313,7 +348,10 @@ export {
|
|
|
313
348
|
HostEnv,
|
|
314
349
|
IMPL_KEY,
|
|
315
350
|
InterceptionEvent,
|
|
351
|
+
InternalError,
|
|
316
352
|
MEEGO_BIZ_HUB,
|
|
353
|
+
NoAuthError,
|
|
354
|
+
NotFoundError,
|
|
317
355
|
SDKClient,
|
|
318
356
|
Session,
|
|
319
357
|
Space,
|
package/dist/lib/index.js
CHANGED
|
@@ -56,7 +56,10 @@ __export(src_exports, {
|
|
|
56
56
|
HostEnv: () => HostEnv,
|
|
57
57
|
IMPL_KEY: () => IMPL_KEY,
|
|
58
58
|
InterceptionEvent: () => InterceptionEvent,
|
|
59
|
+
InternalError: () => InternalError,
|
|
59
60
|
MEEGO_BIZ_HUB: () => MEEGO_BIZ_HUB,
|
|
61
|
+
NoAuthError: () => NoAuthError,
|
|
62
|
+
NotFoundError: () => NotFoundError,
|
|
60
63
|
SDKClient: () => SDKClient,
|
|
61
64
|
Session: () => Session,
|
|
62
65
|
Space: () => Space,
|
|
@@ -280,7 +283,7 @@ var SDKClient = _SDKClient;
|
|
|
280
283
|
/**
|
|
281
284
|
* SDK 版本号
|
|
282
285
|
*/
|
|
283
|
-
SDKClient.version = "0.0.
|
|
286
|
+
SDKClient.version = "0.0.25";
|
|
284
287
|
|
|
285
288
|
// src/types/biz.ts
|
|
286
289
|
var FieldType = /* @__PURE__ */ ((FieldType2) => {
|
|
@@ -340,6 +343,41 @@ var InterceptionEvent = /* @__PURE__ */ ((InterceptionEvent2) => {
|
|
|
340
343
|
return InterceptionEvent2;
|
|
341
344
|
})(InterceptionEvent || {});
|
|
342
345
|
|
|
346
|
+
// src/errors.ts
|
|
347
|
+
var CustomError = class extends Error {
|
|
348
|
+
constructor(options) {
|
|
349
|
+
super(options.message);
|
|
350
|
+
this.originMessage = options.originMessage;
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
var NotFoundError = class extends CustomError {
|
|
354
|
+
constructor(options) {
|
|
355
|
+
super({
|
|
356
|
+
message: "not found",
|
|
357
|
+
originMessage: options.originMessage
|
|
358
|
+
});
|
|
359
|
+
this.name = "NotFoundError";
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
var NoAuthError = class extends CustomError {
|
|
363
|
+
constructor(options) {
|
|
364
|
+
super({
|
|
365
|
+
message: "no auth",
|
|
366
|
+
originMessage: options.originMessage
|
|
367
|
+
});
|
|
368
|
+
this.name = "NoAuthError";
|
|
369
|
+
}
|
|
370
|
+
};
|
|
371
|
+
var InternalError = class extends CustomError {
|
|
372
|
+
constructor(options) {
|
|
373
|
+
super({
|
|
374
|
+
message: "internal error",
|
|
375
|
+
originMessage: options.originMessage
|
|
376
|
+
});
|
|
377
|
+
this.name = "InternalError";
|
|
378
|
+
}
|
|
379
|
+
};
|
|
380
|
+
|
|
343
381
|
// src/index.ts
|
|
344
382
|
var src_default = SDKClient;
|
|
345
383
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -352,7 +390,10 @@ var src_default = SDKClient;
|
|
|
352
390
|
HostEnv,
|
|
353
391
|
IMPL_KEY,
|
|
354
392
|
InterceptionEvent,
|
|
393
|
+
InternalError,
|
|
355
394
|
MEEGO_BIZ_HUB,
|
|
395
|
+
NoAuthError,
|
|
396
|
+
NotFoundError,
|
|
356
397
|
SDKClient,
|
|
357
398
|
Session,
|
|
358
399
|
Space,
|
package/dist/types/index.d.ts
CHANGED
|
@@ -716,6 +716,44 @@ declare class SDKClient {
|
|
|
716
716
|
config(options: SDKClientOptions): Promise<this>;
|
|
717
717
|
}
|
|
718
718
|
|
|
719
|
+
/**
|
|
720
|
+
* @internal
|
|
721
|
+
*/
|
|
722
|
+
declare class CustomError extends Error {
|
|
723
|
+
originMessage: string;
|
|
724
|
+
constructor(options: {
|
|
725
|
+
message: string;
|
|
726
|
+
originMessage: string;
|
|
727
|
+
});
|
|
728
|
+
}
|
|
729
|
+
/**
|
|
730
|
+
* @public
|
|
731
|
+
* 未找到对应数据的异常
|
|
732
|
+
*/
|
|
733
|
+
declare class NotFoundError extends CustomError {
|
|
734
|
+
constructor(options: {
|
|
735
|
+
originMessage: string;
|
|
736
|
+
});
|
|
737
|
+
}
|
|
738
|
+
/**
|
|
739
|
+
* @public
|
|
740
|
+
* 无权限访问对应数据的异常
|
|
741
|
+
*/
|
|
742
|
+
declare class NoAuthError extends CustomError {
|
|
743
|
+
constructor(options: {
|
|
744
|
+
originMessage: string;
|
|
745
|
+
});
|
|
746
|
+
}
|
|
747
|
+
/**
|
|
748
|
+
* @public
|
|
749
|
+
* 内部逻辑异常
|
|
750
|
+
*/
|
|
751
|
+
declare class InternalError extends CustomError {
|
|
752
|
+
constructor(options: {
|
|
753
|
+
originMessage: string;
|
|
754
|
+
});
|
|
755
|
+
}
|
|
756
|
+
|
|
719
757
|
/**
|
|
720
758
|
* 用于飞书项目插件读取系统数据的 JSSDK
|
|
721
759
|
*
|
|
@@ -725,4 +763,4 @@ declare class SDKClient {
|
|
|
725
763
|
* @packageDocumentation
|
|
726
764
|
*/
|
|
727
765
|
|
|
728
|
-
export { BizLine, BriefField, BriefNode, BriefTemplate, BriefView, BriefWorkItem, BriefWorkObject, ButtonFeatureContext, ButtonScene, ControlFeatureContext, Cursor, Field, FieldType, FlowMode, HostEnv, IMPL_KEY, IntegrationFeatureContext, InterceptionEvent, InterceptionFeatureContext, Language, MEEGO_BIZ_HUB, PageFeatureContext, Role, RoleOwners, SDKClient, SDKClientOptions, Session, Space, TabFeatureContext, User, ViewFeatureContext, WorkItem, WorkObject, SDKClient as default, unwatch };
|
|
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 };
|