digital-tools 2.0.2 → 2.1.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/CHANGELOG.md +17 -0
- package/package.json +3 -4
- package/src/define.js +267 -0
- package/src/entities/advertising.js +999 -0
- package/src/entities/ai.js +756 -0
- package/src/entities/analytics.js +1588 -0
- package/src/entities/automation.js +601 -0
- package/src/entities/communication.js +1150 -0
- package/src/entities/crm.js +1386 -0
- package/src/entities/design.js +546 -0
- package/src/entities/development.js +2212 -0
- package/src/entities/document.js +874 -0
- package/src/entities/ecommerce.js +1429 -0
- package/src/entities/experiment.js +1039 -0
- package/src/entities/finance.js +3478 -0
- package/src/entities/forms.js +1892 -0
- package/src/entities/hr.js +661 -0
- package/src/entities/identity.js +997 -0
- package/src/entities/index.js +282 -0
- package/src/entities/infrastructure.js +1153 -0
- package/src/entities/knowledge.js +1438 -0
- package/src/entities/marketing.js +1610 -0
- package/src/entities/media.js +1634 -0
- package/src/entities/notification.js +1199 -0
- package/src/entities/presentation.js +1274 -0
- package/src/entities/productivity.js +1317 -0
- package/src/entities/project-management.js +1136 -0
- package/src/entities/recruiting.js +736 -0
- package/src/entities/shipping.js +509 -0
- package/src/entities/signature.js +1102 -0
- package/src/entities/site.js +222 -0
- package/src/entities/spreadsheet.js +1341 -0
- package/src/entities/storage.js +1198 -0
- package/src/entities/support.js +1166 -0
- package/src/entities/video-conferencing.js +1750 -0
- package/src/entities/video.js +950 -0
- package/src/entities.js +1663 -0
- package/src/index.js +74 -0
- package/src/providers/analytics/index.js +17 -0
- package/src/providers/analytics/mixpanel.js +255 -0
- package/src/providers/calendar/cal-com.js +303 -0
- package/src/providers/calendar/google-calendar.js +335 -0
- package/src/providers/calendar/index.js +20 -0
- package/src/providers/crm/hubspot.js +566 -0
- package/src/providers/crm/index.js +17 -0
- package/src/providers/development/github.js +472 -0
- package/src/providers/development/index.js +17 -0
- package/src/providers/ecommerce/index.js +17 -0
- package/src/providers/ecommerce/shopify.js +378 -0
- package/src/providers/email/index.js +20 -0
- package/src/providers/email/resend.js +258 -0
- package/src/providers/email/sendgrid.js +161 -0
- package/src/providers/finance/index.js +17 -0
- package/src/providers/finance/stripe.js +549 -0
- package/src/providers/forms/index.js +17 -0
- package/src/providers/forms/typeform.js +500 -0
- package/src/providers/index.js +123 -0
- package/src/providers/knowledge/index.js +17 -0
- package/src/providers/knowledge/notion.js +389 -0
- package/src/providers/marketing/index.js +17 -0
- package/src/providers/marketing/mailchimp.js +443 -0
- package/src/providers/media/cloudinary.js +318 -0
- package/src/providers/media/index.js +17 -0
- package/src/providers/messaging/index.js +20 -0
- package/src/providers/messaging/slack.js +393 -0
- package/src/providers/messaging/twilio-sms.js +249 -0
- package/src/providers/project-management/index.js +17 -0
- package/src/providers/project-management/linear.js +575 -0
- package/src/providers/registry.js +86 -0
- package/src/providers/spreadsheet/google-sheets.js +375 -0
- package/src/providers/spreadsheet/index.js +20 -0
- package/src/providers/spreadsheet/xlsx.js +423 -0
- package/src/providers/storage/index.js +24 -0
- package/src/providers/storage/s3.js +419 -0
- package/src/providers/support/index.js +17 -0
- package/src/providers/support/zendesk.js +373 -0
- package/src/providers/tasks/index.js +17 -0
- package/src/providers/tasks/todoist.js +286 -0
- package/src/providers/types.js +9 -0
- package/src/providers/video-conferencing/google-meet.js +286 -0
- package/src/providers/video-conferencing/index.js +31 -0
- package/src/providers/video-conferencing/jitsi.js +254 -0
- package/src/providers/video-conferencing/teams.js +270 -0
- package/src/providers/video-conferencing/zoom.js +332 -0
- package/src/registry.js +128 -0
- package/src/tools/communication.js +184 -0
- package/src/tools/data.js +205 -0
- package/src/tools/index.js +11 -0
- package/src/tools/web.js +137 -0
- package/src/types.js +10 -0
- package/test/define.test.js +306 -0
- package/test/registry.test.js +357 -0
- package/test/tools.test.js +363 -0
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Sheets Provider
|
|
3
|
+
*
|
|
4
|
+
* Concrete implementation of SpreadsheetProvider using Google Sheets API.
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
8
|
+
import { defineProvider } from '../registry.js';
|
|
9
|
+
const SHEETS_API_URL = 'https://sheets.googleapis.com/v4/spreadsheets';
|
|
10
|
+
const DRIVE_API_URL = 'https://www.googleapis.com/drive/v3/files';
|
|
11
|
+
/**
|
|
12
|
+
* Google Sheets provider info
|
|
13
|
+
*/
|
|
14
|
+
export const googleSheetsInfo = {
|
|
15
|
+
id: 'spreadsheet.google-sheets',
|
|
16
|
+
name: 'Google Sheets',
|
|
17
|
+
description: 'Google Sheets cloud spreadsheet service',
|
|
18
|
+
category: 'spreadsheet',
|
|
19
|
+
website: 'https://sheets.google.com',
|
|
20
|
+
docsUrl: 'https://developers.google.com/sheets/api',
|
|
21
|
+
requiredConfig: ['accessToken'],
|
|
22
|
+
optionalConfig: ['refreshToken', 'clientId', 'clientSecret'],
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Create Google Sheets provider
|
|
26
|
+
*/
|
|
27
|
+
export function createGoogleSheetsProvider(config) {
|
|
28
|
+
let accessToken;
|
|
29
|
+
async function sheetsApi(path, method = 'GET', body, baseUrl = SHEETS_API_URL) {
|
|
30
|
+
const url = path.startsWith('http') ? path : `${baseUrl}${path}`;
|
|
31
|
+
const response = await fetch(url, {
|
|
32
|
+
method,
|
|
33
|
+
headers: {
|
|
34
|
+
'Content-Type': 'application/json',
|
|
35
|
+
Authorization: `Bearer ${accessToken}`,
|
|
36
|
+
},
|
|
37
|
+
body: body ? JSON.stringify(body) : undefined,
|
|
38
|
+
});
|
|
39
|
+
if (!response.ok) {
|
|
40
|
+
const error = await response.json().catch(() => ({}));
|
|
41
|
+
throw new Error(error?.error?.message || `HTTP ${response.status}`);
|
|
42
|
+
}
|
|
43
|
+
return response.json();
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
info: googleSheetsInfo,
|
|
47
|
+
async initialize(cfg) {
|
|
48
|
+
accessToken = cfg.accessToken;
|
|
49
|
+
if (!accessToken) {
|
|
50
|
+
throw new Error('Google Sheets access token is required');
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
async healthCheck() {
|
|
54
|
+
const start = Date.now();
|
|
55
|
+
try {
|
|
56
|
+
// Test with a minimal API call
|
|
57
|
+
await sheetsApi('', 'GET', undefined, 'https://www.googleapis.com/oauth2/v1/tokeninfo');
|
|
58
|
+
return {
|
|
59
|
+
healthy: true,
|
|
60
|
+
latencyMs: Date.now() - start,
|
|
61
|
+
message: 'Connected',
|
|
62
|
+
checkedAt: new Date(),
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
return {
|
|
67
|
+
healthy: false,
|
|
68
|
+
latencyMs: Date.now() - start,
|
|
69
|
+
message: error instanceof Error ? error.message : 'Unknown error',
|
|
70
|
+
checkedAt: new Date(),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
async dispose() {
|
|
75
|
+
// No cleanup needed
|
|
76
|
+
},
|
|
77
|
+
async create(name, options) {
|
|
78
|
+
const sheets = options?.sheets || [{ name: 'Sheet1' }];
|
|
79
|
+
const body = {
|
|
80
|
+
properties: {
|
|
81
|
+
title: name,
|
|
82
|
+
locale: options?.locale,
|
|
83
|
+
timeZone: options?.timeZone,
|
|
84
|
+
},
|
|
85
|
+
sheets: sheets.map((s, index) => ({
|
|
86
|
+
properties: {
|
|
87
|
+
title: s.name,
|
|
88
|
+
index,
|
|
89
|
+
},
|
|
90
|
+
})),
|
|
91
|
+
};
|
|
92
|
+
const data = await sheetsApi('', 'POST', body);
|
|
93
|
+
return mapSpreadsheet(data);
|
|
94
|
+
},
|
|
95
|
+
async get(spreadsheetId) {
|
|
96
|
+
try {
|
|
97
|
+
const data = await sheetsApi(`/${spreadsheetId}?includeGridData=false`);
|
|
98
|
+
return mapSpreadsheet(data);
|
|
99
|
+
}
|
|
100
|
+
catch {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
async list(options) {
|
|
105
|
+
const params = new URLSearchParams({
|
|
106
|
+
q: `mimeType='application/vnd.google-apps.spreadsheet'${options?.query ? ` and name contains '${options.query}'` : ''}`,
|
|
107
|
+
pageSize: (options?.limit || 100).toString(),
|
|
108
|
+
fields: 'files(id,name,createdTime,modifiedTime),nextPageToken',
|
|
109
|
+
});
|
|
110
|
+
if (options?.cursor) {
|
|
111
|
+
params.append('pageToken', options.cursor);
|
|
112
|
+
}
|
|
113
|
+
const data = await sheetsApi(`?${params.toString()}`, 'GET', undefined, DRIVE_API_URL);
|
|
114
|
+
return {
|
|
115
|
+
items: data.files?.map((f) => ({
|
|
116
|
+
id: f.id,
|
|
117
|
+
name: f.name,
|
|
118
|
+
sheets: [], // Would need separate API call to get sheets
|
|
119
|
+
createdAt: f.createdTime ? new Date(f.createdTime) : undefined,
|
|
120
|
+
modifiedAt: f.modifiedTime ? new Date(f.modifiedTime) : undefined,
|
|
121
|
+
url: `https://docs.google.com/spreadsheets/d/${f.id}`,
|
|
122
|
+
})) || [],
|
|
123
|
+
hasMore: !!data.nextPageToken,
|
|
124
|
+
nextCursor: data.nextPageToken,
|
|
125
|
+
};
|
|
126
|
+
},
|
|
127
|
+
async delete(spreadsheetId) {
|
|
128
|
+
try {
|
|
129
|
+
await sheetsApi(`/${spreadsheetId}`, 'DELETE', undefined, DRIVE_API_URL);
|
|
130
|
+
return true;
|
|
131
|
+
}
|
|
132
|
+
catch {
|
|
133
|
+
return false;
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
async getSheet(spreadsheetId, sheetId) {
|
|
137
|
+
try {
|
|
138
|
+
const spreadsheet = await sheetsApi(`/${spreadsheetId}?includeGridData=true`);
|
|
139
|
+
const sheet = typeof sheetId === 'number'
|
|
140
|
+
? spreadsheet.sheets.find((s) => s.properties.sheetId === sheetId)
|
|
141
|
+
: spreadsheet.sheets.find((s) => s.properties.title === sheetId);
|
|
142
|
+
if (!sheet)
|
|
143
|
+
return null;
|
|
144
|
+
// Extract data from grid
|
|
145
|
+
const gridData = sheet.data?.[0];
|
|
146
|
+
const data = [];
|
|
147
|
+
if (gridData?.rowData) {
|
|
148
|
+
for (const row of gridData.rowData) {
|
|
149
|
+
const rowValues = [];
|
|
150
|
+
if (row.values) {
|
|
151
|
+
for (const cell of row.values) {
|
|
152
|
+
rowValues.push(extractCellValue(cell));
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
data.push(rowValues);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return {
|
|
159
|
+
id: sheet.properties.sheetId.toString(),
|
|
160
|
+
name: sheet.properties.title,
|
|
161
|
+
index: sheet.properties.index,
|
|
162
|
+
rowCount: sheet.properties.gridProperties?.rowCount || 0,
|
|
163
|
+
columnCount: sheet.properties.gridProperties?.columnCount || 0,
|
|
164
|
+
data,
|
|
165
|
+
frozenRows: sheet.properties.gridProperties?.frozenRowCount,
|
|
166
|
+
frozenColumns: sheet.properties.gridProperties?.frozenColumnCount,
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
catch {
|
|
170
|
+
return null;
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
async addSheet(spreadsheetId, name, options) {
|
|
174
|
+
const body = {
|
|
175
|
+
requests: [
|
|
176
|
+
{
|
|
177
|
+
addSheet: {
|
|
178
|
+
properties: {
|
|
179
|
+
title: name,
|
|
180
|
+
index: options?.index,
|
|
181
|
+
gridProperties: {
|
|
182
|
+
rowCount: options?.rowCount || 1000,
|
|
183
|
+
columnCount: options?.columnCount || 26,
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
],
|
|
189
|
+
};
|
|
190
|
+
const data = await sheetsApi(`/${spreadsheetId}:batchUpdate`, 'POST', body);
|
|
191
|
+
const reply = data.replies[0].addSheet;
|
|
192
|
+
return {
|
|
193
|
+
id: reply.properties.sheetId.toString(),
|
|
194
|
+
name: reply.properties.title,
|
|
195
|
+
index: reply.properties.index,
|
|
196
|
+
rowCount: reply.properties.gridProperties?.rowCount || 0,
|
|
197
|
+
columnCount: reply.properties.gridProperties?.columnCount || 0,
|
|
198
|
+
};
|
|
199
|
+
},
|
|
200
|
+
async deleteSheet(spreadsheetId, sheetId) {
|
|
201
|
+
try {
|
|
202
|
+
// If sheetId is a string (name), we need to look up the actual sheet ID
|
|
203
|
+
let actualSheetId = typeof sheetId === 'number' ? sheetId : parseInt(sheetId, 10);
|
|
204
|
+
if (isNaN(actualSheetId)) {
|
|
205
|
+
// Look up by name
|
|
206
|
+
const spreadsheet = await sheetsApi(`/${spreadsheetId}`);
|
|
207
|
+
const sheet = spreadsheet.sheets.find((s) => s.properties.title === sheetId);
|
|
208
|
+
if (!sheet)
|
|
209
|
+
return false;
|
|
210
|
+
actualSheetId = sheet.properties.sheetId;
|
|
211
|
+
}
|
|
212
|
+
const body = {
|
|
213
|
+
requests: [
|
|
214
|
+
{
|
|
215
|
+
deleteSheet: {
|
|
216
|
+
sheetId: actualSheetId,
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
],
|
|
220
|
+
};
|
|
221
|
+
await sheetsApi(`/${spreadsheetId}:batchUpdate`, 'POST', body);
|
|
222
|
+
return true;
|
|
223
|
+
}
|
|
224
|
+
catch {
|
|
225
|
+
return false;
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
async renameSheet(spreadsheetId, sheetId, name) {
|
|
229
|
+
try {
|
|
230
|
+
let actualSheetId = typeof sheetId === 'number' ? sheetId : parseInt(sheetId, 10);
|
|
231
|
+
if (isNaN(actualSheetId)) {
|
|
232
|
+
const spreadsheet = await sheetsApi(`/${spreadsheetId}`);
|
|
233
|
+
const sheet = spreadsheet.sheets.find((s) => s.properties.title === sheetId);
|
|
234
|
+
if (!sheet)
|
|
235
|
+
return false;
|
|
236
|
+
actualSheetId = sheet.properties.sheetId;
|
|
237
|
+
}
|
|
238
|
+
const body = {
|
|
239
|
+
requests: [
|
|
240
|
+
{
|
|
241
|
+
updateSheetProperties: {
|
|
242
|
+
properties: {
|
|
243
|
+
sheetId: actualSheetId,
|
|
244
|
+
title: name,
|
|
245
|
+
},
|
|
246
|
+
fields: 'title',
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
],
|
|
250
|
+
};
|
|
251
|
+
await sheetsApi(`/${spreadsheetId}:batchUpdate`, 'POST', body);
|
|
252
|
+
return true;
|
|
253
|
+
}
|
|
254
|
+
catch {
|
|
255
|
+
return false;
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
async readRange(spreadsheetId, range) {
|
|
259
|
+
const data = await sheetsApi(`/${spreadsheetId}/values/${encodeURIComponent(range)}?valueRenderOption=UNFORMATTED_VALUE`);
|
|
260
|
+
return data.values || [];
|
|
261
|
+
},
|
|
262
|
+
async writeRange(spreadsheetId, range, values) {
|
|
263
|
+
const body = {
|
|
264
|
+
values,
|
|
265
|
+
};
|
|
266
|
+
const data = await sheetsApi(`/${spreadsheetId}/values/${encodeURIComponent(range)}?valueInputOption=USER_ENTERED`, 'PUT', body);
|
|
267
|
+
return {
|
|
268
|
+
updatedRange: data.updatedRange,
|
|
269
|
+
updatedRows: data.updatedRows || 0,
|
|
270
|
+
updatedColumns: data.updatedColumns || 0,
|
|
271
|
+
updatedCells: data.updatedCells || 0,
|
|
272
|
+
};
|
|
273
|
+
},
|
|
274
|
+
async appendRows(spreadsheetId, range, values) {
|
|
275
|
+
const body = {
|
|
276
|
+
values,
|
|
277
|
+
};
|
|
278
|
+
const data = await sheetsApi(`/${spreadsheetId}/values/${encodeURIComponent(range)}:append?valueInputOption=USER_ENTERED&insertDataOption=INSERT_ROWS`, 'POST', body);
|
|
279
|
+
return {
|
|
280
|
+
spreadsheetId: data.spreadsheetId,
|
|
281
|
+
updatedRange: data.updates?.updatedRange || range,
|
|
282
|
+
updatedRows: data.updates?.updatedRows || values.length,
|
|
283
|
+
};
|
|
284
|
+
},
|
|
285
|
+
async clearRange(spreadsheetId, range) {
|
|
286
|
+
try {
|
|
287
|
+
await sheetsApi(`/${spreadsheetId}/values/${encodeURIComponent(range)}:clear`, 'POST', {});
|
|
288
|
+
return true;
|
|
289
|
+
}
|
|
290
|
+
catch {
|
|
291
|
+
return false;
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
async batchRead(spreadsheetId, ranges) {
|
|
295
|
+
const params = ranges.map((r) => `ranges=${encodeURIComponent(r)}`).join('&');
|
|
296
|
+
const data = await sheetsApi(`/${spreadsheetId}/values:batchGet?${params}&valueRenderOption=UNFORMATTED_VALUE`);
|
|
297
|
+
const result = new Map();
|
|
298
|
+
data.valueRanges?.forEach((vr) => {
|
|
299
|
+
result.set(vr.range, vr.values || []);
|
|
300
|
+
});
|
|
301
|
+
return result;
|
|
302
|
+
},
|
|
303
|
+
async batchWrite(spreadsheetId, data) {
|
|
304
|
+
const body = {
|
|
305
|
+
valueInputOption: 'USER_ENTERED',
|
|
306
|
+
data: data.map((d) => ({
|
|
307
|
+
range: d.range,
|
|
308
|
+
values: d.values,
|
|
309
|
+
})),
|
|
310
|
+
};
|
|
311
|
+
const response = await sheetsApi(`/${spreadsheetId}/values:batchUpdate`, 'POST', body);
|
|
312
|
+
return {
|
|
313
|
+
updatedRange: 'batch',
|
|
314
|
+
updatedRows: response.totalUpdatedRows || 0,
|
|
315
|
+
updatedColumns: response.totalUpdatedColumns || 0,
|
|
316
|
+
updatedCells: response.totalUpdatedCells || 0,
|
|
317
|
+
};
|
|
318
|
+
},
|
|
319
|
+
async export(spreadsheetId, format) {
|
|
320
|
+
const mimeTypes = {
|
|
321
|
+
xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
322
|
+
csv: 'text/csv',
|
|
323
|
+
pdf: 'application/pdf',
|
|
324
|
+
};
|
|
325
|
+
const response = await fetch(`${DRIVE_API_URL}/${spreadsheetId}/export?mimeType=${encodeURIComponent(mimeTypes[format])}`, {
|
|
326
|
+
headers: {
|
|
327
|
+
Authorization: `Bearer ${accessToken}`,
|
|
328
|
+
},
|
|
329
|
+
});
|
|
330
|
+
if (!response.ok) {
|
|
331
|
+
throw new Error(`Export failed: HTTP ${response.status}`);
|
|
332
|
+
}
|
|
333
|
+
const arrayBuffer = await response.arrayBuffer();
|
|
334
|
+
return Buffer.from(arrayBuffer);
|
|
335
|
+
},
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
function mapSpreadsheet(data) {
|
|
339
|
+
return {
|
|
340
|
+
id: data.spreadsheetId,
|
|
341
|
+
name: data.properties.title,
|
|
342
|
+
sheets: data.sheets?.map((s) => ({
|
|
343
|
+
id: s.properties.sheetId.toString(),
|
|
344
|
+
name: s.properties.title,
|
|
345
|
+
index: s.properties.index,
|
|
346
|
+
rowCount: s.properties.gridProperties?.rowCount,
|
|
347
|
+
columnCount: s.properties.gridProperties?.columnCount,
|
|
348
|
+
})) || [],
|
|
349
|
+
createdAt: undefined, // Not available from Sheets API
|
|
350
|
+
modifiedAt: undefined,
|
|
351
|
+
url: data.spreadsheetUrl,
|
|
352
|
+
};
|
|
353
|
+
}
|
|
354
|
+
function extractCellValue(cell) {
|
|
355
|
+
if (!cell)
|
|
356
|
+
return null;
|
|
357
|
+
const ev = cell.effectiveValue;
|
|
358
|
+
if (!ev)
|
|
359
|
+
return null;
|
|
360
|
+
if ('numberValue' in ev)
|
|
361
|
+
return ev.numberValue;
|
|
362
|
+
if ('stringValue' in ev)
|
|
363
|
+
return ev.stringValue;
|
|
364
|
+
if ('boolValue' in ev)
|
|
365
|
+
return ev.boolValue;
|
|
366
|
+
if ('formulaValue' in ev)
|
|
367
|
+
return ev.formulaValue;
|
|
368
|
+
if ('errorValue' in ev)
|
|
369
|
+
return `#ERROR: ${ev.errorValue.message}`;
|
|
370
|
+
return null;
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Google Sheets provider definition
|
|
374
|
+
*/
|
|
375
|
+
export const googleSheetsProvider = defineProvider(googleSheetsInfo, async (config) => createGoogleSheetsProvider(config));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spreadsheet Providers
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
export { xlsxInfo, xlsxProvider, createXlsxProvider } from './xlsx.js';
|
|
7
|
+
export { googleSheetsInfo, googleSheetsProvider, createGoogleSheetsProvider } from './google-sheets.js';
|
|
8
|
+
import { xlsxProvider } from './xlsx.js';
|
|
9
|
+
import { googleSheetsProvider } from './google-sheets.js';
|
|
10
|
+
/**
|
|
11
|
+
* Register all spreadsheet providers
|
|
12
|
+
*/
|
|
13
|
+
export function registerSpreadsheetProviders() {
|
|
14
|
+
xlsxProvider.register();
|
|
15
|
+
googleSheetsProvider.register();
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* All spreadsheet providers
|
|
19
|
+
*/
|
|
20
|
+
export const spreadsheetProviders = [xlsxProvider, googleSheetsProvider];
|