mobx-lark 2.1.1 → 2.2.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/LICENSE +165 -165
- package/ReadMe.md +39 -39
- package/dist/Lark.d.ts +7 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/module/BITable/index.d.ts +14 -4
- package/package.json +5 -5
- package/src/Lark.ts +242 -226
- package/src/index.ts +3 -3
- package/src/module/BITable/index.ts +294 -283
- package/src/module/BITable/type.ts +120 -120
- package/src/module/BITable/utility.ts +57 -57
- package/src/module/InstantMessenger/index.ts +82 -82
- package/src/module/InstantMessenger/type/index.ts +60 -60
- package/src/module/InstantMessenger/type/message.ts +141 -141
- package/src/module/SpreadSheet/index.ts +78 -78
- package/src/module/SpreadSheet/type.ts +31 -31
- package/src/module/Task/index.ts +278 -278
- package/src/module/Task/type.ts +168 -168
- package/src/module/Wiki/type.ts +16 -16
- package/src/module/base.ts +34 -34
- package/src/module/index.ts +6 -6
- package/src/type.ts +75 -75
- package/tsconfig.json +21 -21
|
@@ -1,141 +1,141 @@
|
|
|
1
|
-
import { I18nKey, TranslationMap } from '../../../type';
|
|
2
|
-
|
|
3
|
-
export interface TextMessage {
|
|
4
|
-
text: string;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export interface TextTag extends TextMessage {
|
|
8
|
-
tag: 'text';
|
|
9
|
-
un_escape?: boolean;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface LinkTag extends TextMessage {
|
|
13
|
-
tag: 'a';
|
|
14
|
-
href: string;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface AtTag {
|
|
18
|
-
tag: 'at';
|
|
19
|
-
user_id: string;
|
|
20
|
-
user_name?: string;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export interface ImageTag {
|
|
24
|
-
tag: 'img';
|
|
25
|
-
image_key: string;
|
|
26
|
-
width?: number;
|
|
27
|
-
height?: number;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export type RichTextTag = TextTag | LinkTag | AtTag | ImageTag;
|
|
31
|
-
|
|
32
|
-
export type RichTextMessage = Record<
|
|
33
|
-
I18nKey,
|
|
34
|
-
{
|
|
35
|
-
title: string;
|
|
36
|
-
content: RichTextTag[][];
|
|
37
|
-
}
|
|
38
|
-
>;
|
|
39
|
-
|
|
40
|
-
export interface UserCardMessage {
|
|
41
|
-
type: 'share_user';
|
|
42
|
-
user_id: string;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export interface ChatCardMessage {
|
|
46
|
-
type: 'share_chat';
|
|
47
|
-
chat_id: string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export interface FileMessage<T extends string = 'file'> {
|
|
51
|
-
type: T;
|
|
52
|
-
file_key: string;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export type StickerMessage = FileMessage<'sticker'>;
|
|
56
|
-
|
|
57
|
-
export type AudioMessage = FileMessage<'audio'>;
|
|
58
|
-
|
|
59
|
-
export type VideoMessage = FileMessage<'media'> & Pick<ImageTag, 'image_key'>;
|
|
60
|
-
|
|
61
|
-
export interface TextCardTag {
|
|
62
|
-
tag: 'plain_text' | 'lark_md';
|
|
63
|
-
content?: string;
|
|
64
|
-
i18n?: TranslationMap;
|
|
65
|
-
lines?: number;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export interface HrCardTag {
|
|
69
|
-
tag: 'hr';
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export type URLCardTag = Record<
|
|
73
|
-
`${'' | 'pc_' | 'android_' | 'ios_'}url`,
|
|
74
|
-
string
|
|
75
|
-
>;
|
|
76
|
-
|
|
77
|
-
export type ConfirmCardTag = Record<'title' | 'text', TextCardTag>;
|
|
78
|
-
|
|
79
|
-
export interface ButtonCardTag {
|
|
80
|
-
tag: 'button';
|
|
81
|
-
type?: 'default' | 'primary' | 'danger';
|
|
82
|
-
text: TextCardTag;
|
|
83
|
-
value?: Record<string, string>;
|
|
84
|
-
url?: string;
|
|
85
|
-
multi_url?: URLCardTag;
|
|
86
|
-
confirm?: ConfirmCardTag;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export interface DivCardTag {
|
|
90
|
-
tag: 'div';
|
|
91
|
-
text?: TextCardTag;
|
|
92
|
-
fields?: {
|
|
93
|
-
is_short: boolean;
|
|
94
|
-
text: TextCardTag;
|
|
95
|
-
}[];
|
|
96
|
-
extra?: ButtonCardTag;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export interface ActionCardTag {
|
|
100
|
-
tag: 'action';
|
|
101
|
-
layout: 'bisected';
|
|
102
|
-
actions: ButtonCardTag[];
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export type CardTag = HrCardTag | DivCardTag | ActionCardTag;
|
|
106
|
-
|
|
107
|
-
export type TemplateColor =
|
|
108
|
-
| 'blue'
|
|
109
|
-
| 'wathet'
|
|
110
|
-
| 'turquoise'
|
|
111
|
-
| 'green'
|
|
112
|
-
| 'yellow'
|
|
113
|
-
| 'orange'
|
|
114
|
-
| 'red'
|
|
115
|
-
| 'carmine'
|
|
116
|
-
| 'violet'
|
|
117
|
-
| 'purple'
|
|
118
|
-
| 'indigo'
|
|
119
|
-
| 'grey';
|
|
120
|
-
|
|
121
|
-
export interface CardHeader {
|
|
122
|
-
title: TextCardTag;
|
|
123
|
-
template?: TemplateColor;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
export interface InteractiveMessage
|
|
127
|
-
extends Partial<Record<`${'' | 'i18n_'}elements`, CardTag[]>> {
|
|
128
|
-
config?: Partial<Record<'enable_forward' | 'update_multi', boolean>>;
|
|
129
|
-
header?: CardHeader;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
export type ChatMessageContent =
|
|
133
|
-
| TextMessage
|
|
134
|
-
| RichTextMessage
|
|
135
|
-
| UserCardMessage
|
|
136
|
-
| ChatCardMessage
|
|
137
|
-
| FileMessage
|
|
138
|
-
| StickerMessage
|
|
139
|
-
| AudioMessage
|
|
140
|
-
| VideoMessage
|
|
141
|
-
| InteractiveMessage;
|
|
1
|
+
import { I18nKey, TranslationMap } from '../../../type';
|
|
2
|
+
|
|
3
|
+
export interface TextMessage {
|
|
4
|
+
text: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface TextTag extends TextMessage {
|
|
8
|
+
tag: 'text';
|
|
9
|
+
un_escape?: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface LinkTag extends TextMessage {
|
|
13
|
+
tag: 'a';
|
|
14
|
+
href: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface AtTag {
|
|
18
|
+
tag: 'at';
|
|
19
|
+
user_id: string;
|
|
20
|
+
user_name?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface ImageTag {
|
|
24
|
+
tag: 'img';
|
|
25
|
+
image_key: string;
|
|
26
|
+
width?: number;
|
|
27
|
+
height?: number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type RichTextTag = TextTag | LinkTag | AtTag | ImageTag;
|
|
31
|
+
|
|
32
|
+
export type RichTextMessage = Record<
|
|
33
|
+
I18nKey,
|
|
34
|
+
{
|
|
35
|
+
title: string;
|
|
36
|
+
content: RichTextTag[][];
|
|
37
|
+
}
|
|
38
|
+
>;
|
|
39
|
+
|
|
40
|
+
export interface UserCardMessage {
|
|
41
|
+
type: 'share_user';
|
|
42
|
+
user_id: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface ChatCardMessage {
|
|
46
|
+
type: 'share_chat';
|
|
47
|
+
chat_id: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface FileMessage<T extends string = 'file'> {
|
|
51
|
+
type: T;
|
|
52
|
+
file_key: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export type StickerMessage = FileMessage<'sticker'>;
|
|
56
|
+
|
|
57
|
+
export type AudioMessage = FileMessage<'audio'>;
|
|
58
|
+
|
|
59
|
+
export type VideoMessage = FileMessage<'media'> & Pick<ImageTag, 'image_key'>;
|
|
60
|
+
|
|
61
|
+
export interface TextCardTag {
|
|
62
|
+
tag: 'plain_text' | 'lark_md';
|
|
63
|
+
content?: string;
|
|
64
|
+
i18n?: TranslationMap;
|
|
65
|
+
lines?: number;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface HrCardTag {
|
|
69
|
+
tag: 'hr';
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export type URLCardTag = Record<
|
|
73
|
+
`${'' | 'pc_' | 'android_' | 'ios_'}url`,
|
|
74
|
+
string
|
|
75
|
+
>;
|
|
76
|
+
|
|
77
|
+
export type ConfirmCardTag = Record<'title' | 'text', TextCardTag>;
|
|
78
|
+
|
|
79
|
+
export interface ButtonCardTag {
|
|
80
|
+
tag: 'button';
|
|
81
|
+
type?: 'default' | 'primary' | 'danger';
|
|
82
|
+
text: TextCardTag;
|
|
83
|
+
value?: Record<string, string>;
|
|
84
|
+
url?: string;
|
|
85
|
+
multi_url?: URLCardTag;
|
|
86
|
+
confirm?: ConfirmCardTag;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export interface DivCardTag {
|
|
90
|
+
tag: 'div';
|
|
91
|
+
text?: TextCardTag;
|
|
92
|
+
fields?: {
|
|
93
|
+
is_short: boolean;
|
|
94
|
+
text: TextCardTag;
|
|
95
|
+
}[];
|
|
96
|
+
extra?: ButtonCardTag;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface ActionCardTag {
|
|
100
|
+
tag: 'action';
|
|
101
|
+
layout: 'bisected';
|
|
102
|
+
actions: ButtonCardTag[];
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export type CardTag = HrCardTag | DivCardTag | ActionCardTag;
|
|
106
|
+
|
|
107
|
+
export type TemplateColor =
|
|
108
|
+
| 'blue'
|
|
109
|
+
| 'wathet'
|
|
110
|
+
| 'turquoise'
|
|
111
|
+
| 'green'
|
|
112
|
+
| 'yellow'
|
|
113
|
+
| 'orange'
|
|
114
|
+
| 'red'
|
|
115
|
+
| 'carmine'
|
|
116
|
+
| 'violet'
|
|
117
|
+
| 'purple'
|
|
118
|
+
| 'indigo'
|
|
119
|
+
| 'grey';
|
|
120
|
+
|
|
121
|
+
export interface CardHeader {
|
|
122
|
+
title: TextCardTag;
|
|
123
|
+
template?: TemplateColor;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export interface InteractiveMessage
|
|
127
|
+
extends Partial<Record<`${'' | 'i18n_'}elements`, CardTag[]>> {
|
|
128
|
+
config?: Partial<Record<'enable_forward' | 'update_multi', boolean>>;
|
|
129
|
+
header?: CardHeader;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export type ChatMessageContent =
|
|
133
|
+
| TextMessage
|
|
134
|
+
| RichTextMessage
|
|
135
|
+
| UserCardMessage
|
|
136
|
+
| ChatCardMessage
|
|
137
|
+
| FileMessage
|
|
138
|
+
| StickerMessage
|
|
139
|
+
| AudioMessage
|
|
140
|
+
| VideoMessage
|
|
141
|
+
| InteractiveMessage;
|
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
import { observable } from 'mobx';
|
|
2
|
-
import { DataObject, ListModel, NewData, toggle } from 'mobx-restful';
|
|
3
|
-
import { buildURLData, objectFrom } from 'web-utility';
|
|
4
|
-
|
|
5
|
-
import { LarkData } from '../../type';
|
|
6
|
-
import { SheetMeta, SpreadSheetMeta, SpreadSheetRange } from './type';
|
|
7
|
-
|
|
8
|
-
export * from './type';
|
|
9
|
-
|
|
10
|
-
export abstract class SpreadSheetModel<
|
|
11
|
-
D extends DataObject,
|
|
12
|
-
F extends NewData<D> = NewData<D>
|
|
13
|
-
> extends ListModel<D, F> {
|
|
14
|
-
baseURI = '';
|
|
15
|
-
|
|
16
|
-
offset: [number, number] = [0, 0];
|
|
17
|
-
|
|
18
|
-
abstract columnKeys: (keyof D)[];
|
|
19
|
-
|
|
20
|
-
@observable
|
|
21
|
-
accessor meta: SheetMeta | undefined;
|
|
22
|
-
|
|
23
|
-
constructor(
|
|
24
|
-
public id: string,
|
|
25
|
-
public sheetId: string
|
|
26
|
-
) {
|
|
27
|
-
super();
|
|
28
|
-
this.baseURI = `sheets/v2/spreadsheets/${id}`;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* @see {@link https://open.feishu.cn/document/ukTMukTMukTM/uETMzUjLxEzM14SMxMTN}
|
|
33
|
-
*/
|
|
34
|
-
@toggle('downloading')
|
|
35
|
-
async getMeta() {
|
|
36
|
-
if (this.meta) return this.meta;
|
|
37
|
-
|
|
38
|
-
const { body } = await this.client.get<LarkData<SpreadSheetMeta>>(
|
|
39
|
-
`${this.baseURI}/metainfo`
|
|
40
|
-
),
|
|
41
|
-
{ sheetId } = this;
|
|
42
|
-
|
|
43
|
-
const sheet = body!.data!.sheets.find(
|
|
44
|
-
({ sheetId: ID }) => ID === sheetId
|
|
45
|
-
);
|
|
46
|
-
console.assert(sheet, `Sheet "${sheetId}" is not found`);
|
|
47
|
-
|
|
48
|
-
return (this.meta = sheet!);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* @see {@link https://open.feishu.cn/document/ukTMukTMukTM/ugTMzUjL4EzM14COxMTN}
|
|
53
|
-
*/
|
|
54
|
-
async loadPage(pageIndex: number, pageSize: number, filter: NewData<D>) {
|
|
55
|
-
const { columnKeys } = this,
|
|
56
|
-
[rowOff, columnOff] = this.offset,
|
|
57
|
-
{ rowCount } = await this.getMeta();
|
|
58
|
-
|
|
59
|
-
const startRow = rowOff + 1,
|
|
60
|
-
startColumnNumber = 'A'.charCodeAt(0) + columnOff;
|
|
61
|
-
const endRow = Math.min(startRow - 1 + pageSize * pageIndex, rowCount),
|
|
62
|
-
endColumnNumber = startColumnNumber - 1 + columnKeys.length;
|
|
63
|
-
const startColumn = String.fromCharCode(startColumnNumber),
|
|
64
|
-
endColumn = String.fromCharCode(endColumnNumber);
|
|
65
|
-
|
|
66
|
-
const { body } = await this.client.get<LarkData<SpreadSheetRange>>(
|
|
67
|
-
`${this.baseURI}/values/${
|
|
68
|
-
this.sheetId
|
|
69
|
-
}!${startColumn}${startRow}:${endColumn}${endRow}?${buildURLData({
|
|
70
|
-
dateTimeRenderOption: 'FormattedString'
|
|
71
|
-
})}`
|
|
72
|
-
);
|
|
73
|
-
const pageData = body!.data!.valueRange.values.map(
|
|
74
|
-
row => objectFrom(row, columnKeys as string[]) as D
|
|
75
|
-
);
|
|
76
|
-
return { pageData, totalCount: rowCount - rowOff };
|
|
77
|
-
}
|
|
78
|
-
}
|
|
1
|
+
import { observable } from 'mobx';
|
|
2
|
+
import { DataObject, ListModel, NewData, toggle } from 'mobx-restful';
|
|
3
|
+
import { buildURLData, objectFrom } from 'web-utility';
|
|
4
|
+
|
|
5
|
+
import { LarkData } from '../../type';
|
|
6
|
+
import { SheetMeta, SpreadSheetMeta, SpreadSheetRange } from './type';
|
|
7
|
+
|
|
8
|
+
export * from './type';
|
|
9
|
+
|
|
10
|
+
export abstract class SpreadSheetModel<
|
|
11
|
+
D extends DataObject,
|
|
12
|
+
F extends NewData<D> = NewData<D>
|
|
13
|
+
> extends ListModel<D, F> {
|
|
14
|
+
baseURI = '';
|
|
15
|
+
|
|
16
|
+
offset: [number, number] = [0, 0];
|
|
17
|
+
|
|
18
|
+
abstract columnKeys: (keyof D)[];
|
|
19
|
+
|
|
20
|
+
@observable
|
|
21
|
+
accessor meta: SheetMeta | undefined;
|
|
22
|
+
|
|
23
|
+
constructor(
|
|
24
|
+
public id: string,
|
|
25
|
+
public sheetId: string
|
|
26
|
+
) {
|
|
27
|
+
super();
|
|
28
|
+
this.baseURI = `sheets/v2/spreadsheets/${id}`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @see {@link https://open.feishu.cn/document/ukTMukTMukTM/uETMzUjLxEzM14SMxMTN}
|
|
33
|
+
*/
|
|
34
|
+
@toggle('downloading')
|
|
35
|
+
async getMeta() {
|
|
36
|
+
if (this.meta) return this.meta;
|
|
37
|
+
|
|
38
|
+
const { body } = await this.client.get<LarkData<SpreadSheetMeta>>(
|
|
39
|
+
`${this.baseURI}/metainfo`
|
|
40
|
+
),
|
|
41
|
+
{ sheetId } = this;
|
|
42
|
+
|
|
43
|
+
const sheet = body!.data!.sheets.find(
|
|
44
|
+
({ sheetId: ID }) => ID === sheetId
|
|
45
|
+
);
|
|
46
|
+
console.assert(sheet, `Sheet "${sheetId}" is not found`);
|
|
47
|
+
|
|
48
|
+
return (this.meta = sheet!);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @see {@link https://open.feishu.cn/document/ukTMukTMukTM/ugTMzUjL4EzM14COxMTN}
|
|
53
|
+
*/
|
|
54
|
+
async loadPage(pageIndex: number, pageSize: number, filter: NewData<D>) {
|
|
55
|
+
const { columnKeys } = this,
|
|
56
|
+
[rowOff, columnOff] = this.offset,
|
|
57
|
+
{ rowCount } = await this.getMeta();
|
|
58
|
+
|
|
59
|
+
const startRow = rowOff + 1,
|
|
60
|
+
startColumnNumber = 'A'.charCodeAt(0) + columnOff;
|
|
61
|
+
const endRow = Math.min(startRow - 1 + pageSize * pageIndex, rowCount),
|
|
62
|
+
endColumnNumber = startColumnNumber - 1 + columnKeys.length;
|
|
63
|
+
const startColumn = String.fromCharCode(startColumnNumber),
|
|
64
|
+
endColumn = String.fromCharCode(endColumnNumber);
|
|
65
|
+
|
|
66
|
+
const { body } = await this.client.get<LarkData<SpreadSheetRange>>(
|
|
67
|
+
`${this.baseURI}/values/${
|
|
68
|
+
this.sheetId
|
|
69
|
+
}!${startColumn}${startRow}:${endColumn}${endRow}?${buildURLData({
|
|
70
|
+
dateTimeRenderOption: 'FormattedString'
|
|
71
|
+
})}`
|
|
72
|
+
);
|
|
73
|
+
const pageData = body!.data!.valueRange.values.map(
|
|
74
|
+
row => objectFrom(row, columnKeys as string[]) as D
|
|
75
|
+
);
|
|
76
|
+
return { pageData, totalCount: rowCount - rowOff };
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
export type SheetMeta = Record<'sheetId' | 'title', string> &
|
|
2
|
-
Record<
|
|
3
|
-
`${'row' | 'column'}Count` | `frozen${'Row' | 'Col'}Count` | 'index',
|
|
4
|
-
number
|
|
5
|
-
>;
|
|
6
|
-
|
|
7
|
-
export interface SpreadSheetMeta {
|
|
8
|
-
spreadsheetToken: string;
|
|
9
|
-
properties: {
|
|
10
|
-
title: string;
|
|
11
|
-
} & Record<'revision' | 'ownerUser' | 'sheetCount', number>;
|
|
12
|
-
sheets: SheetMeta[];
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface SheetCellMedia {
|
|
16
|
-
type: 'url';
|
|
17
|
-
cellPosition: null;
|
|
18
|
-
text: string;
|
|
19
|
-
link?: string;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export type SheetCellValue = string | number | SheetCellMedia[] | null;
|
|
23
|
-
|
|
24
|
-
export interface SpreadSheetRange {
|
|
25
|
-
revision: number;
|
|
26
|
-
spreadsheetToken: string;
|
|
27
|
-
valueRange: Record<'revision' | 'majorDimension', string> & {
|
|
28
|
-
range: `${string}!${string}:${string}`;
|
|
29
|
-
values: SheetCellValue[][];
|
|
30
|
-
};
|
|
31
|
-
}
|
|
1
|
+
export type SheetMeta = Record<'sheetId' | 'title', string> &
|
|
2
|
+
Record<
|
|
3
|
+
`${'row' | 'column'}Count` | `frozen${'Row' | 'Col'}Count` | 'index',
|
|
4
|
+
number
|
|
5
|
+
>;
|
|
6
|
+
|
|
7
|
+
export interface SpreadSheetMeta {
|
|
8
|
+
spreadsheetToken: string;
|
|
9
|
+
properties: {
|
|
10
|
+
title: string;
|
|
11
|
+
} & Record<'revision' | 'ownerUser' | 'sheetCount', number>;
|
|
12
|
+
sheets: SheetMeta[];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface SheetCellMedia {
|
|
16
|
+
type: 'url';
|
|
17
|
+
cellPosition: null;
|
|
18
|
+
text: string;
|
|
19
|
+
link?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type SheetCellValue = string | number | SheetCellMedia[] | null;
|
|
23
|
+
|
|
24
|
+
export interface SpreadSheetRange {
|
|
25
|
+
revision: number;
|
|
26
|
+
spreadsheetToken: string;
|
|
27
|
+
valueRange: Record<'revision' | 'majorDimension', string> & {
|
|
28
|
+
range: `${string}!${string}:${string}`;
|
|
29
|
+
values: SheetCellValue[][];
|
|
30
|
+
};
|
|
31
|
+
}
|