feat: Convert all app files to JS
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
import listDrives from './list-drives/index.js';
|
||||
import listSpreadsheets from './list-spreadsheets/index.js';
|
||||
import listWorksheets from './list-worksheets/index.js';
|
||||
|
||||
export default [listDrives, listSpreadsheets, listWorksheets];
|
||||
@@ -1,5 +0,0 @@
|
||||
import listDrives from './list-drives';
|
||||
import listSpreadsheets from './list-spreadsheets';
|
||||
import listWorksheets from './list-worksheets';
|
||||
|
||||
export default [listDrives, listSpreadsheets, listWorksheets];
|
||||
@@ -1,19 +1,15 @@
|
||||
import { IGlobalVariable, IJSONObject } from '@automatisch/types';
|
||||
|
||||
export default {
|
||||
name: 'List drives',
|
||||
key: 'listDrives',
|
||||
|
||||
async run($: IGlobalVariable) {
|
||||
const drives: {
|
||||
data: IJSONObject[];
|
||||
} = {
|
||||
async run($) {
|
||||
const drives = {
|
||||
data: [{ value: null, name: 'My Google Drive' }],
|
||||
};
|
||||
|
||||
const params = {
|
||||
pageSize: 100,
|
||||
pageToken: undefined as unknown as string,
|
||||
pageToken: undefined,
|
||||
};
|
||||
|
||||
do {
|
||||
@@ -1,20 +1,16 @@
|
||||
import { IGlobalVariable, IJSONObject } from '@automatisch/types';
|
||||
|
||||
export default {
|
||||
name: 'List spreadsheets',
|
||||
key: 'listSpreadsheets',
|
||||
|
||||
async run($: IGlobalVariable) {
|
||||
const spreadsheets: {
|
||||
data: IJSONObject[];
|
||||
} = {
|
||||
async run($) {
|
||||
const spreadsheets = {
|
||||
data: [],
|
||||
};
|
||||
|
||||
const params: Record<string, unknown> = {
|
||||
const params = {
|
||||
q: `mimeType='application/vnd.google-apps.spreadsheet'`,
|
||||
pageSize: 100,
|
||||
pageToken: undefined as unknown as string,
|
||||
pageToken: undefined,
|
||||
orderBy: 'createdTime desc',
|
||||
driveId: $.step.parameters.driveId,
|
||||
supportsAllDrives: true,
|
||||
@@ -1,15 +1,11 @@
|
||||
import { IGlobalVariable, IJSONObject } from '@automatisch/types';
|
||||
|
||||
export default {
|
||||
name: 'List worksheets',
|
||||
key: 'listWorksheets',
|
||||
|
||||
async run($: IGlobalVariable) {
|
||||
const spreadsheetId = $.step.parameters.spreadsheetId as string;
|
||||
async run($) {
|
||||
const spreadsheetId = $.step.parameters.spreadsheetId;
|
||||
|
||||
const worksheets: {
|
||||
data: IJSONObject[];
|
||||
} = {
|
||||
const worksheets = {
|
||||
data: [],
|
||||
};
|
||||
|
||||
@@ -17,8 +13,8 @@ export default {
|
||||
return worksheets;
|
||||
}
|
||||
|
||||
const params: Record<string, unknown> = {
|
||||
pageToken: undefined as unknown as string,
|
||||
const params = {
|
||||
pageToken: undefined,
|
||||
};
|
||||
|
||||
do {
|
||||
Reference in New Issue
Block a user