mobx-lark 2.5.0 → 2.6.0-rc.1
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/ReadMe.md +2 -1
- package/dist/Lark.d.ts +18 -4
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/module/Document/index.d.ts +6 -82
- package/dist/module/Document/model/Block.d.ts +82 -0
- package/dist/module/Drive/index.d.ts +31 -0
- package/dist/module/Drive/type.d.ts +2 -0
- package/dist/module/Wiki/type.d.ts +2 -1
- package/dist/module/index.d.ts +1 -0
- package/dist/type.d.ts +1 -0
- package/package.json +17 -17
- package/src/Lark.ts +91 -36
- package/src/module/Document/index.ts +7 -306
- package/src/module/Document/model/Block.ts +307 -0
- package/src/module/Drive/index.ts +100 -0
- package/src/module/Drive/type.ts +12 -0
- package/src/module/Wiki/type.ts +14 -13
- package/src/module/index.ts +1 -0
- package/src/type.ts +10 -1
package/ReadMe.md
CHANGED
|
@@ -150,11 +150,12 @@ await writeFile('document.html', markup);
|
|
|
150
150
|
## Scaffolds
|
|
151
151
|
|
|
152
152
|
1. https://github.com/idea2app/Lark-Next-Bootstrap-ts
|
|
153
|
+
2. https://github.com/idea2app/Lark-Next-Shadcn-ts
|
|
153
154
|
|
|
154
155
|
## User cases
|
|
155
156
|
|
|
156
157
|
1. [idea2app web-site](https://github.com/idea2app/idea2app.github.io/tree/main/models)
|
|
157
|
-
2. [
|
|
158
|
+
2. [Open-Source-Bazaar web-site](https://github.com/Open-Source-Bazaar/Open-Source-Bazaar.github.io/tree/main/models)
|
|
158
159
|
|
|
159
160
|
## Related with
|
|
160
161
|
|
package/dist/Lark.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Context, HTTPClient } from 'koajax';
|
|
2
|
-
import {
|
|
2
|
+
import { CopiedFile, DocumentModel, DriveFileModel, UserIdType, WikiNode, WikiNodeModel } from './module';
|
|
3
|
+
import { LarkDocumentType, UploadTargetType, UserMeta } from './type';
|
|
3
4
|
export interface LarkAppBaseOption {
|
|
4
5
|
host?: string;
|
|
5
6
|
id: string;
|
|
@@ -18,6 +19,9 @@ export declare class LarkApp implements LarkAppOption {
|
|
|
18
19
|
secret: string;
|
|
19
20
|
client: HTTPClient<Context>;
|
|
20
21
|
accessToken: string;
|
|
22
|
+
driveFileStore: DriveFileModel;
|
|
23
|
+
wikiNodeStore: WikiNodeModel;
|
|
24
|
+
documentStore: DocumentModel;
|
|
21
25
|
constructor(option: LarkAppServerOption | LarkAppClientOption);
|
|
22
26
|
private boot;
|
|
23
27
|
getAccessToken(code?: string): Promise<string>;
|
|
@@ -44,15 +48,25 @@ export declare class LarkApp implements LarkAppOption {
|
|
|
44
48
|
*/
|
|
45
49
|
getJSTicket: (...data: never[]) => Promise<string>;
|
|
46
50
|
/**
|
|
47
|
-
* @see {@link
|
|
51
|
+
* @see {@link DriveFileModel#downloadOne}
|
|
48
52
|
*/
|
|
49
53
|
downloadFile(id: string): Promise<File>;
|
|
50
54
|
/**
|
|
51
|
-
* @see {@link
|
|
55
|
+
* @see {@link DriveFileModel#uploadOne}
|
|
52
56
|
*/
|
|
53
57
|
uploadFile(file: File, parent_type: UploadTargetType, parent_node: string): Promise<string>;
|
|
54
58
|
/**
|
|
55
|
-
* @see {@link
|
|
59
|
+
* @see {@link DriveFileModel#copyOne}
|
|
60
|
+
* @see {@link WikiNodeModel#moveDocument}
|
|
61
|
+
*/
|
|
62
|
+
copyFile(URI: `${string}/wiki/${string}`, name?: string, parent_node_token?: string, user_id_type?: UserIdType): Promise<WikiNode>;
|
|
63
|
+
copyFile(URI: `${string}/${LarkDocumentType}/${string}`, name?: string, folder_token?: string, user_id_type?: UserIdType): Promise<CopiedFile>;
|
|
64
|
+
/**
|
|
65
|
+
* @see {@link WikiNodeModel#getOne}
|
|
66
|
+
*/
|
|
67
|
+
wiki2drive(id: string): Promise<WikiNode>;
|
|
68
|
+
/**
|
|
69
|
+
* @deprecated Use {@link LarkApp#wiki2drive} instead
|
|
56
70
|
*/
|
|
57
71
|
wiki2docx(id: string): Promise<string>;
|
|
58
72
|
static documentPathPattern: RegExp;
|