mobx-lark 2.4.3 → 2.6.0-rc.0

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/Lark.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { Context, HTTPClient } from 'koajax';
2
- import { UploadTargetType, UserMeta } from './type';
2
+ import { CopiedFile, DocumentModel, DriveModel, 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
+ driveStore: DriveModel;
23
+ wikiNodeStore: WikiNodeModel;
24
+ documentStore: DocumentModel;
21
25
  constructor(option: LarkAppServerOption | LarkAppClientOption);
22
26
  private boot;
23
27
  getAccessToken(code?: string): Promise<string>;
@@ -44,20 +48,30 @@ export declare class LarkApp implements LarkAppOption {
44
48
  */
45
49
  getJSTicket: (...data: never[]) => Promise<string>;
46
50
  /**
47
- * @see {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/download}
51
+ * @see {@link DriveModel#downloadFile}
48
52
  */
49
53
  downloadFile(id: string): Promise<File>;
50
54
  /**
51
- * @see {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/upload_all}
55
+ * @see {@link DriveModel#uploadFile}
52
56
  */
53
57
  uploadFile(file: File, parent_type: UploadTargetType, parent_node: string): Promise<string>;
54
58
  /**
55
- * @see {@link WikiNodeModel.getOne}
59
+ * @see {@link DriveModel#copyFile}
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;
59
73
  /**
60
- * @see {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/docs-v1/content/get}
74
+ * @see {@link DocumentModel#getOneContent}
61
75
  */
62
76
  downloadMarkdown(URI: string): Promise<string>;
63
77
  }