first commit
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"node": "n8n-nodes-base.coda",
|
||||
"nodeVersion": "1.0",
|
||||
"codexVersion": "1.0",
|
||||
"categories": ["Productivity"],
|
||||
"resources": {
|
||||
"credentialDocumentation": [
|
||||
{
|
||||
"url": "https://docs.n8n.io/integrations/builtin/credentials/coda/"
|
||||
}
|
||||
],
|
||||
"primaryDocumentation": [
|
||||
{
|
||||
"url": "https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.coda/"
|
||||
}
|
||||
],
|
||||
"generic": [
|
||||
{
|
||||
"label": "How Goomer automated their operations with over 200 n8n workflows",
|
||||
"icon": "🛵",
|
||||
"url": "https://n8n.io/blog/how-goomer-automated-their-operations-with-over-200-n8n-workflows/"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,946 @@
|
||||
import type {
|
||||
IExecuteFunctions,
|
||||
IDataObject,
|
||||
ILoadOptionsFunctions,
|
||||
INodeExecutionData,
|
||||
INodePropertyOptions,
|
||||
INodeType,
|
||||
INodeTypeDescription,
|
||||
JsonObject,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeConnectionTypes, NodeApiError } from 'n8n-workflow';
|
||||
|
||||
import { controlFields, controlOperations } from './ControlDescription';
|
||||
import { formulaFields, formulaOperations } from './FormulaDescription';
|
||||
import { codaApiRequest, codaApiRequestAllItems } from './GenericFunctions';
|
||||
import { tableFields, tableOperations } from './TableDescription';
|
||||
import { viewFields, viewOperations } from './ViewDescription';
|
||||
|
||||
export class Coda implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
displayName: 'Coda',
|
||||
name: 'coda',
|
||||
icon: 'file:coda.svg',
|
||||
group: ['output'],
|
||||
version: [1, 1.1],
|
||||
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
||||
description: 'Consume Coda API',
|
||||
defaults: {
|
||||
name: 'Coda',
|
||||
},
|
||||
usableAsTool: true,
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
credentials: [
|
||||
{
|
||||
name: 'codaApi',
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
properties: [
|
||||
{
|
||||
displayName: 'Resource',
|
||||
name: 'resource',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
options: [
|
||||
{
|
||||
name: 'Control',
|
||||
value: 'control',
|
||||
description:
|
||||
'Controls provide a user-friendly way to input a value that can affect other parts of the doc',
|
||||
},
|
||||
{
|
||||
name: 'Formula',
|
||||
value: 'formula',
|
||||
description: 'Formulas can be great for performing one-off computations',
|
||||
},
|
||||
{
|
||||
name: 'Table',
|
||||
value: 'table',
|
||||
description: 'Access data of tables in documents',
|
||||
},
|
||||
{
|
||||
name: 'View',
|
||||
value: 'view',
|
||||
description: 'Access data of views in documents',
|
||||
},
|
||||
],
|
||||
default: 'table',
|
||||
},
|
||||
...tableOperations,
|
||||
...tableFields,
|
||||
...formulaOperations,
|
||||
...formulaFields,
|
||||
...controlOperations,
|
||||
...controlFields,
|
||||
...viewOperations,
|
||||
...viewFields,
|
||||
],
|
||||
};
|
||||
|
||||
methods = {
|
||||
loadOptions: {
|
||||
// Get all the available docs to display them to user so that they can
|
||||
// select them easily
|
||||
async getDocs(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
const returnData: INodePropertyOptions[] = [];
|
||||
const qs = {};
|
||||
const docs = await codaApiRequestAllItems.call(this, 'items', 'GET', '/docs', {}, qs);
|
||||
for (const doc of docs) {
|
||||
const docName = doc.name;
|
||||
const docId = doc.id;
|
||||
returnData.push({
|
||||
name: docName,
|
||||
value: docId,
|
||||
});
|
||||
}
|
||||
return returnData;
|
||||
},
|
||||
// Get all the available tables to display them to user so that they can
|
||||
// select them easily
|
||||
async getTables(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
const returnData: INodePropertyOptions[] = [];
|
||||
|
||||
const docId = this.getCurrentNodeParameter('docId');
|
||||
|
||||
const tables = await codaApiRequestAllItems.call(
|
||||
this,
|
||||
'items',
|
||||
'GET',
|
||||
`/docs/${docId}/tables`,
|
||||
{},
|
||||
);
|
||||
for (const table of tables) {
|
||||
const tableName = table.name;
|
||||
const tableId = table.id;
|
||||
returnData.push({
|
||||
name: tableName,
|
||||
value: tableId,
|
||||
});
|
||||
}
|
||||
return returnData;
|
||||
},
|
||||
// Get all the available columns to display them to user so that they can
|
||||
// select them easily
|
||||
async getColumns(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
const returnData: INodePropertyOptions[] = [];
|
||||
|
||||
const docId = this.getCurrentNodeParameter('docId');
|
||||
const tableId = this.getCurrentNodeParameter('tableId');
|
||||
|
||||
const columns = await codaApiRequestAllItems.call(
|
||||
this,
|
||||
'items',
|
||||
'GET',
|
||||
`/docs/${docId}/tables/${tableId}/columns`,
|
||||
{},
|
||||
);
|
||||
for (const column of columns) {
|
||||
const columnName = column.name;
|
||||
const columnId = column.id;
|
||||
returnData.push({
|
||||
name: columnName,
|
||||
value: columnId,
|
||||
});
|
||||
}
|
||||
return returnData;
|
||||
},
|
||||
// Get all the available views to display them to user so that they can
|
||||
// select them easily
|
||||
async getViews(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
const returnData: INodePropertyOptions[] = [];
|
||||
const docId = this.getCurrentNodeParameter('docId');
|
||||
const views = await codaApiRequestAllItems.call(
|
||||
this,
|
||||
'items',
|
||||
'GET',
|
||||
`/docs/${docId}/tables?tableTypes=view`,
|
||||
{},
|
||||
);
|
||||
for (const view of views) {
|
||||
const viewName = view.name;
|
||||
const viewId = view.id;
|
||||
returnData.push({
|
||||
name: viewName,
|
||||
value: viewId,
|
||||
});
|
||||
}
|
||||
return returnData;
|
||||
},
|
||||
// Get all the available formulas to display them to user so that they can
|
||||
// select them easily
|
||||
async getFormulas(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
const returnData: INodePropertyOptions[] = [];
|
||||
const docId = this.getCurrentNodeParameter('docId');
|
||||
const formulas = await codaApiRequestAllItems.call(
|
||||
this,
|
||||
'items',
|
||||
'GET',
|
||||
`/docs/${docId}/formulas`,
|
||||
{},
|
||||
);
|
||||
for (const formula of formulas) {
|
||||
const formulaName = formula.name;
|
||||
const formulaId = formula.id;
|
||||
returnData.push({
|
||||
name: formulaName,
|
||||
value: formulaId,
|
||||
});
|
||||
}
|
||||
return returnData;
|
||||
},
|
||||
// Get all the available view rows to display them to user so that they can
|
||||
// select them easily
|
||||
async getViewRows(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
const returnData: INodePropertyOptions[] = [];
|
||||
const docId = this.getCurrentNodeParameter('docId');
|
||||
const viewId = this.getCurrentNodeParameter('viewId');
|
||||
const viewRows = await codaApiRequestAllItems.call(
|
||||
this,
|
||||
'items',
|
||||
'GET',
|
||||
`/docs/${docId}/tables/${viewId}/rows`,
|
||||
{},
|
||||
);
|
||||
for (const viewRow of viewRows) {
|
||||
const viewRowName = viewRow.name;
|
||||
const viewRowId = viewRow.id;
|
||||
returnData.push({
|
||||
name: viewRowName,
|
||||
value: viewRowId,
|
||||
});
|
||||
}
|
||||
return returnData;
|
||||
},
|
||||
// Get all the available view columns to display them to user so that they can
|
||||
// select them easily
|
||||
async getViewColumns(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
const returnData: INodePropertyOptions[] = [];
|
||||
|
||||
const docId = this.getCurrentNodeParameter('docId');
|
||||
const viewId = this.getCurrentNodeParameter('viewId');
|
||||
|
||||
const viewColumns = await codaApiRequestAllItems.call(
|
||||
this,
|
||||
'items',
|
||||
'GET',
|
||||
`/docs/${docId}/tables/${viewId}/columns`,
|
||||
{},
|
||||
);
|
||||
for (const viewColumn of viewColumns) {
|
||||
const viewColumnName = viewColumn.name;
|
||||
const viewColumnId = viewColumn.id;
|
||||
returnData.push({
|
||||
name: viewColumnName,
|
||||
value: viewColumnId,
|
||||
});
|
||||
}
|
||||
return returnData;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
const nodeVersion = this.getNode().typeVersion;
|
||||
const returnData: INodeExecutionData[] = [];
|
||||
const items = this.getInputData();
|
||||
let responseData;
|
||||
const resource = this.getNodeParameter('resource', 0);
|
||||
let qs: IDataObject = {};
|
||||
const operation = this.getNodeParameter('operation', 0);
|
||||
|
||||
if (resource === 'table') {
|
||||
// https://coda.io/developers/apis/v1beta1#operation/upsertRows
|
||||
if (operation === 'createRow') {
|
||||
try {
|
||||
const sendData = {} as IDataObject;
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
qs = {};
|
||||
const docId = this.getNodeParameter('docId', i) as string;
|
||||
const tableId = this.getNodeParameter('tableId', i) as string;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
const endpoint = `/docs/${docId}/tables/${tableId}/rows`;
|
||||
|
||||
if (options.disableParsing) {
|
||||
qs.disableParsing = options.disableParsing as boolean;
|
||||
}
|
||||
|
||||
const cells = [];
|
||||
cells.length = 0;
|
||||
for (const key of Object.keys(items[i].json)) {
|
||||
cells.push({
|
||||
column: key,
|
||||
value: items[i].json[key],
|
||||
});
|
||||
}
|
||||
|
||||
// Collect all the data for the different docs/tables
|
||||
if (sendData[endpoint] === undefined) {
|
||||
sendData[endpoint] = {
|
||||
rows: [],
|
||||
// TODO: This is not perfect as it ignores if qs changes between
|
||||
// different items but should be OK for now
|
||||
qs,
|
||||
};
|
||||
}
|
||||
((sendData[endpoint]! as IDataObject).rows! as IDataObject[]).push({ cells });
|
||||
|
||||
if (options.keyColumns) {
|
||||
// @ts-ignore
|
||||
(sendData[endpoint]! as IDataObject).keyColumns = options.keyColumns.split(
|
||||
',',
|
||||
) as string[];
|
||||
}
|
||||
}
|
||||
|
||||
// Now that all data got collected make all the requests
|
||||
for (const endpoint of Object.keys(sendData)) {
|
||||
await codaApiRequest.call(
|
||||
this,
|
||||
'POST',
|
||||
endpoint,
|
||||
sendData[endpoint],
|
||||
(sendData[endpoint]! as IDataObject).qs! as IDataObject,
|
||||
);
|
||||
}
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
return [this.helpers.returnJsonArray({ error: error.message })];
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
// Return the incoming data
|
||||
return [items];
|
||||
}
|
||||
// https://coda.io/developers/apis/v1beta1#operation/getRow
|
||||
if (operation === 'getRow') {
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
try {
|
||||
const docId = this.getNodeParameter('docId', i) as string;
|
||||
const tableId = this.getNodeParameter('tableId', i) as string;
|
||||
const rowId = this.getNodeParameter('rowId', i) as string;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
const endpoint = `/docs/${docId}/tables/${tableId}/rows/${rowId}`;
|
||||
if (options.useColumnNames === false) {
|
||||
qs.useColumnNames = options.useColumnNames as boolean;
|
||||
} else {
|
||||
qs.useColumnNames = true;
|
||||
}
|
||||
if (options.valueFormat) {
|
||||
qs.valueFormat = options.valueFormat as string;
|
||||
}
|
||||
|
||||
responseData = await codaApiRequest.call(this, 'GET', endpoint, {}, qs);
|
||||
if (options.rawData === true) {
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray(responseData as IDataObject[]),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionData);
|
||||
} else {
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray({
|
||||
id: responseData.id as string,
|
||||
...(responseData.values as IDataObject),
|
||||
}),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionData);
|
||||
}
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
const executionErrorData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray({ error: error.messsage }),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionErrorData);
|
||||
continue;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
return [returnData];
|
||||
}
|
||||
// https://coda.io/developers/apis/v1beta1#operation/listRows
|
||||
if (operation === 'getAllRows') {
|
||||
let itemsLength = items.length ? 1 : 0;
|
||||
|
||||
if (nodeVersion >= 1.1) {
|
||||
itemsLength = items.length;
|
||||
}
|
||||
|
||||
for (let i = 0; i < itemsLength; i++) {
|
||||
const docId = this.getNodeParameter('docId', i) as string;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const tableId = this.getNodeParameter('tableId', i) as string;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
const endpoint = `/docs/${docId}/tables/${tableId}/rows`;
|
||||
if (options.useColumnNames === false) {
|
||||
qs.useColumnNames = options.useColumnNames as boolean;
|
||||
} else {
|
||||
qs.useColumnNames = true;
|
||||
}
|
||||
if (options.valueFormat) {
|
||||
qs.valueFormat = options.valueFormat as string;
|
||||
}
|
||||
if (options.sortBy) {
|
||||
qs.sortBy = options.sortBy as string;
|
||||
}
|
||||
if (options.visibleOnly) {
|
||||
qs.visibleOnly = options.visibleOnly as boolean;
|
||||
}
|
||||
if (options.query) {
|
||||
qs.query = options.query as string;
|
||||
}
|
||||
try {
|
||||
if (returnAll) {
|
||||
responseData = await codaApiRequestAllItems.call(
|
||||
this,
|
||||
'items',
|
||||
'GET',
|
||||
endpoint,
|
||||
{},
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await codaApiRequest.call(this, 'GET', endpoint, {}, qs);
|
||||
responseData = responseData.items;
|
||||
}
|
||||
|
||||
if (options.rawData === true) {
|
||||
for (const item of responseData) {
|
||||
returnData.push({
|
||||
json: item,
|
||||
pairedItem: [{ item: i }],
|
||||
});
|
||||
}
|
||||
} else {
|
||||
for (const item of responseData) {
|
||||
returnData.push({
|
||||
json: {
|
||||
id: item.id,
|
||||
...item.values,
|
||||
},
|
||||
pairedItem: [{ item: i }],
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
returnData.push({
|
||||
json: { error: error.message },
|
||||
pairedItem: [{ item: i }],
|
||||
});
|
||||
continue;
|
||||
}
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
}
|
||||
|
||||
return [returnData];
|
||||
}
|
||||
// https://coda.io/developers/apis/v1beta1#operation/deleteRows
|
||||
if (operation === 'deleteRow') {
|
||||
try {
|
||||
const sendData = {} as IDataObject;
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
const docId = this.getNodeParameter('docId', i) as string;
|
||||
const tableId = this.getNodeParameter('tableId', i) as string;
|
||||
const rowId = this.getNodeParameter('rowId', i) as string;
|
||||
const endpoint = `/docs/${docId}/tables/${tableId}/rows`;
|
||||
|
||||
// Collect all the data for the different docs/tables
|
||||
if (sendData[endpoint] === undefined) {
|
||||
sendData[endpoint] = [];
|
||||
}
|
||||
|
||||
(sendData[endpoint] as string[]).push(rowId);
|
||||
}
|
||||
|
||||
// Now that all data got collected make all the requests
|
||||
for (const endpoint of Object.keys(sendData)) {
|
||||
await codaApiRequest.call(this, 'DELETE', endpoint, { rowIds: sendData[endpoint] }, qs);
|
||||
}
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
return [this.helpers.returnJsonArray({ error: error.message })];
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
// Return the incoming data
|
||||
return [items];
|
||||
}
|
||||
// https://coda.io/developers/apis/v1beta1#operation/pushButton
|
||||
if (operation === 'pushButton') {
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
try {
|
||||
const docId = this.getNodeParameter('docId', i) as string;
|
||||
const tableId = this.getNodeParameter('tableId', i) as string;
|
||||
const rowId = this.getNodeParameter('rowId', i) as string;
|
||||
const columnId = this.getNodeParameter('columnId', i) as string;
|
||||
const endpoint = `/docs/${docId}/tables/${tableId}/rows/${rowId}/buttons/${columnId}`;
|
||||
responseData = await codaApiRequest.call(this, 'POST', endpoint, {});
|
||||
returnData.push(responseData as INodeExecutionData);
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
const executionErrorData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray({ error: error.messsage }),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionErrorData);
|
||||
continue;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return [this.helpers.returnJsonArray(returnData)];
|
||||
}
|
||||
//https://coda.io/developers/apis/v1beta1#operation/getColumn
|
||||
if (operation === 'getColumn') {
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
try {
|
||||
const docId = this.getNodeParameter('docId', i) as string;
|
||||
const tableId = this.getNodeParameter('tableId', i) as string;
|
||||
const columnId = this.getNodeParameter('columnId', i) as string;
|
||||
const endpoint = `/docs/${docId}/tables/${tableId}/columns/${columnId}`;
|
||||
responseData = await codaApiRequest.call(this, 'GET', endpoint, {});
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray(responseData as IDataObject[]),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionData);
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
const executionErrorData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray({ error: error.messsage }),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionErrorData);
|
||||
continue;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return [this.helpers.returnJsonArray(returnData)];
|
||||
}
|
||||
//https://coda.io/developers/apis/v1beta1#operation/listColumns
|
||||
if (operation === 'getAllColumns') {
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
try {
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
const docId = this.getNodeParameter('docId', i) as string;
|
||||
const tableId = this.getNodeParameter('tableId', i) as string;
|
||||
const endpoint = `/docs/${docId}/tables/${tableId}/columns`;
|
||||
if (returnAll) {
|
||||
responseData = await codaApiRequestAllItems.call(this, 'items', 'GET', endpoint, {});
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', 0);
|
||||
responseData = await codaApiRequest.call(this, 'GET', endpoint, {}, qs);
|
||||
responseData = responseData.items;
|
||||
}
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray(responseData as IDataObject[]),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionData);
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
const executionErrorData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray({ error: error.messsage }),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionErrorData);
|
||||
continue;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
if (resource === 'formula') {
|
||||
//https://coda.io/developers/apis/v1beta1#operation/getFormula
|
||||
if (operation === 'get') {
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
try {
|
||||
const docId = this.getNodeParameter('docId', i) as string;
|
||||
const formulaId = this.getNodeParameter('formulaId', i) as string;
|
||||
const endpoint = `/docs/${docId}/formulas/${formulaId}`;
|
||||
responseData = await codaApiRequest.call(this, 'GET', endpoint, {});
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray(responseData as IDataObject[]),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionData);
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
const executionErrorData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray({ error: error.messsage }),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionErrorData);
|
||||
continue;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return [returnData];
|
||||
}
|
||||
//https://coda.io/developers/apis/v1beta1#operation/listFormulas
|
||||
if (operation === 'getAll') {
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
try {
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
const docId = this.getNodeParameter('docId', i) as string;
|
||||
const endpoint = `/docs/${docId}/formulas`;
|
||||
if (returnAll) {
|
||||
responseData = await codaApiRequestAllItems.call(this, 'items', 'GET', endpoint, {});
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', 0);
|
||||
responseData = await codaApiRequest.call(this, 'GET', endpoint, {}, qs);
|
||||
responseData = responseData.items;
|
||||
}
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray(responseData as IDataObject[]),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionData);
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
const executionErrorData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray({ error: error.messsage }),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionErrorData);
|
||||
continue;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
if (resource === 'control') {
|
||||
//https://coda.io/developers/apis/v1beta1#operation/getControl
|
||||
if (operation === 'get') {
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
try {
|
||||
const docId = this.getNodeParameter('docId', i) as string;
|
||||
const controlId = this.getNodeParameter('controlId', i) as string;
|
||||
const endpoint = `/docs/${docId}/controls/${controlId}`;
|
||||
responseData = await codaApiRequest.call(this, 'GET', endpoint, {});
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray(responseData as IDataObject[]),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionData);
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
const executionErrorData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray({ error: error.messsage }),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionErrorData);
|
||||
continue;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return [returnData];
|
||||
}
|
||||
//https://coda.io/developers/apis/v1beta1#operation/listControls
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
qs.limit = this.getNodeParameter('limit', 0);
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
try {
|
||||
const docId = this.getNodeParameter('docId', i) as string;
|
||||
const endpoint = `/docs/${docId}/controls`;
|
||||
if (returnAll) {
|
||||
responseData = await codaApiRequestAllItems.call(this, 'items', 'GET', endpoint, {});
|
||||
} else {
|
||||
responseData = await codaApiRequest.call(this, 'GET', endpoint, {}, qs);
|
||||
responseData = responseData.items;
|
||||
}
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray(responseData as IDataObject[]),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionData);
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
const executionErrorData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray({ error: error.messsage }),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionErrorData);
|
||||
continue;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
if (resource === 'view') {
|
||||
//https://coda.io/developers/apis/v1beta1#operation/getView
|
||||
if (operation === 'get') {
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
const docId = this.getNodeParameter('docId', i) as string;
|
||||
const viewId = this.getNodeParameter('viewId', i) as string;
|
||||
const endpoint = `/docs/${docId}/tables/${viewId}`;
|
||||
responseData = await codaApiRequest.call(this, 'GET', endpoint, {});
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray(responseData as IDataObject[]),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionData);
|
||||
}
|
||||
return [returnData];
|
||||
}
|
||||
//https://coda.io/developers/apis/v1beta1#operation/listViews
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
qs.limit = this.getNodeParameter('limit', 0);
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
try {
|
||||
const docId = this.getNodeParameter('docId', i) as string;
|
||||
const endpoint = `/docs/${docId}/tables?tableTypes=view`;
|
||||
if (returnAll) {
|
||||
responseData = await codaApiRequestAllItems.call(this, 'items', 'GET', endpoint, {});
|
||||
} else {
|
||||
responseData = await codaApiRequest.call(this, 'GET', endpoint, {}, qs);
|
||||
responseData = responseData.items;
|
||||
}
|
||||
responseData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray(responseData as IDataObject[]),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...responseData);
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
const executionErrorData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray({ error: error.messsage }),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionErrorData);
|
||||
continue;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return [returnData];
|
||||
}
|
||||
if (operation === 'getAllViewRows') {
|
||||
let itemsLength = items.length ? 1 : 0;
|
||||
|
||||
if (nodeVersion >= 1.1) {
|
||||
itemsLength = items.length;
|
||||
}
|
||||
|
||||
for (let i = 0; i < itemsLength; i++) {
|
||||
const docId = this.getNodeParameter('docId', i) as string;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const viewId = this.getNodeParameter('viewId', i) as string;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
const endpoint = `/docs/${docId}/tables/${viewId}/rows`;
|
||||
if (options.useColumnNames === false) {
|
||||
qs.useColumnNames = options.useColumnNames as boolean;
|
||||
} else {
|
||||
qs.useColumnNames = true;
|
||||
}
|
||||
if (options.valueFormat) {
|
||||
qs.valueFormat = options.valueFormat as string;
|
||||
}
|
||||
if (options.sortBy) {
|
||||
qs.sortBy = options.sortBy as string;
|
||||
}
|
||||
if (options.query) {
|
||||
qs.query = options.query as string;
|
||||
}
|
||||
try {
|
||||
if (returnAll) {
|
||||
responseData = await codaApiRequestAllItems.call(
|
||||
this,
|
||||
'items',
|
||||
'GET',
|
||||
endpoint,
|
||||
{},
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', i);
|
||||
responseData = await codaApiRequest.call(this, 'GET', endpoint, {}, qs);
|
||||
responseData = responseData.items;
|
||||
}
|
||||
|
||||
if (options.rawData === true) {
|
||||
for (const item of responseData) {
|
||||
returnData.push({
|
||||
json: item,
|
||||
pairedItem: [{ item: i }],
|
||||
});
|
||||
}
|
||||
} else {
|
||||
for (const item of responseData) {
|
||||
returnData.push({
|
||||
json: {
|
||||
id: item.id,
|
||||
...item.values,
|
||||
},
|
||||
pairedItem: [{ item: i }],
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
returnData.push({
|
||||
json: { error: error.message },
|
||||
pairedItem: [{ item: i }],
|
||||
});
|
||||
continue;
|
||||
}
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
}
|
||||
|
||||
return [returnData];
|
||||
}
|
||||
//https://coda.io/developers/apis/v1beta1#operation/deleteViewRow
|
||||
if (operation === 'deleteViewRow') {
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
try {
|
||||
const docId = this.getNodeParameter('docId', i) as string;
|
||||
const viewId = this.getNodeParameter('viewId', i) as string;
|
||||
const rowId = this.getNodeParameter('rowId', i) as string;
|
||||
const endpoint = `/docs/${docId}/tables/${viewId}/rows/${rowId}`;
|
||||
responseData = await codaApiRequest.call(this, 'DELETE', endpoint);
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray(responseData as IDataObject[]),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionData);
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
const executionErrorData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray({ error: error.messsage }),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionErrorData);
|
||||
continue;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return [returnData];
|
||||
}
|
||||
//https://coda.io/developers/apis/v1beta1#operation/pushViewButton
|
||||
if (operation === 'pushViewButton') {
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
try {
|
||||
const docId = this.getNodeParameter('docId', i) as string;
|
||||
const viewId = this.getNodeParameter('viewId', i) as string;
|
||||
const rowId = this.getNodeParameter('rowId', i) as string;
|
||||
const columnId = this.getNodeParameter('columnId', i) as string;
|
||||
const endpoint = `/docs/${docId}/tables/${viewId}/rows/${rowId}/buttons/${columnId}`;
|
||||
responseData = await codaApiRequest.call(this, 'POST', endpoint);
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray(responseData as IDataObject),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionData);
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
const executionErrorData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray({ error: error.messsage }),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionErrorData);
|
||||
continue;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return [returnData];
|
||||
}
|
||||
if (operation === 'getAllViewColumns') {
|
||||
const returnAll = this.getNodeParameter('returnAll', 0);
|
||||
qs.limit = this.getNodeParameter('limit', 0);
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
try {
|
||||
const docId = this.getNodeParameter('docId', i) as string;
|
||||
const viewId = this.getNodeParameter('viewId', i) as string;
|
||||
const endpoint = `/docs/${docId}/tables/${viewId}/columns`;
|
||||
if (returnAll) {
|
||||
responseData = await codaApiRequestAllItems.call(this, 'items', 'GET', endpoint, {});
|
||||
} else {
|
||||
responseData = await codaApiRequest.call(this, 'GET', endpoint, {}, qs);
|
||||
responseData = responseData.items;
|
||||
}
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray(responseData as IDataObject),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionData);
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
const executionErrorData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray({ error: error.messsage }),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionErrorData);
|
||||
continue;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return [returnData];
|
||||
}
|
||||
//https://coda.io/developers/apis/v1beta1#operation/updateViewRow
|
||||
if (operation === 'updateViewRow') {
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
try {
|
||||
qs = {};
|
||||
const docId = this.getNodeParameter('docId', i) as string;
|
||||
const viewId = this.getNodeParameter('viewId', i) as string;
|
||||
const rowId = this.getNodeParameter('rowId', i) as string;
|
||||
const keyName = this.getNodeParameter('keyName', i) as string;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
const body: IDataObject = {};
|
||||
const endpoint = `/docs/${docId}/tables/${viewId}/rows/${rowId}`;
|
||||
if (options.disableParsing) {
|
||||
qs.disableParsing = options.disableParsing as boolean;
|
||||
}
|
||||
const cells = [];
|
||||
cells.length = 0;
|
||||
|
||||
//@ts-ignore
|
||||
for (const key of Object.keys(items[i].json[keyName])) {
|
||||
cells.push({
|
||||
column: key,
|
||||
//@ts-ignore
|
||||
value: items[i].json[keyName][key],
|
||||
});
|
||||
}
|
||||
body.row = {
|
||||
cells,
|
||||
};
|
||||
await codaApiRequest.call(this, 'PUT', endpoint, body, qs);
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
items[i].json = { error: error.message };
|
||||
continue;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return [items];
|
||||
}
|
||||
}
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const controlOperations: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['control'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Get',
|
||||
value: 'get',
|
||||
description: 'Get a control',
|
||||
action: 'Get a control',
|
||||
},
|
||||
{
|
||||
name: 'Get Many',
|
||||
value: 'getAll',
|
||||
description: 'Get many controls',
|
||||
action: 'Get many controls',
|
||||
},
|
||||
],
|
||||
default: 'get',
|
||||
},
|
||||
];
|
||||
|
||||
export const controlFields: INodeProperties[] = [
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* control:get */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Doc Name or ID',
|
||||
name: 'docId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getDocs',
|
||||
},
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['control'],
|
||||
operation: ['get'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Control ID',
|
||||
name: 'controlId',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['control'],
|
||||
operation: ['get'],
|
||||
},
|
||||
},
|
||||
description: 'The control to get the row from',
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* control:getAll */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Doc Name or ID',
|
||||
name: 'docId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getDocs',
|
||||
},
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['control'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Return All',
|
||||
name: 'returnAll',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['control'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
description: 'Whether to return all results or only up to a given limit',
|
||||
},
|
||||
{
|
||||
displayName: 'Limit',
|
||||
name: 'limit',
|
||||
type: 'number',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['control'],
|
||||
operation: ['getAll'],
|
||||
returnAll: [false],
|
||||
},
|
||||
},
|
||||
typeOptions: {
|
||||
minValue: 1,
|
||||
maxValue: 100,
|
||||
},
|
||||
default: 50,
|
||||
description: 'Max number of results to return',
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,120 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const formulaOperations: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['formula'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Get',
|
||||
value: 'get',
|
||||
description: 'Get a formula',
|
||||
action: 'Get a formula',
|
||||
},
|
||||
{
|
||||
name: 'Get Many',
|
||||
value: 'getAll',
|
||||
description: 'Get many formulas',
|
||||
action: 'Get many formulas',
|
||||
},
|
||||
],
|
||||
default: 'get',
|
||||
},
|
||||
];
|
||||
|
||||
export const formulaFields: INodeProperties[] = [
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* formula:get */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Doc Name or ID',
|
||||
name: 'docId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getDocs',
|
||||
},
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['formula'],
|
||||
operation: ['get'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Formula ID',
|
||||
name: 'formulaId',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['formula'],
|
||||
operation: ['get'],
|
||||
},
|
||||
},
|
||||
description: 'The formula to get the row from',
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* formula:getAll */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Doc Name or ID',
|
||||
name: 'docId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getDocs',
|
||||
},
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['formula'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Return All',
|
||||
name: 'returnAll',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['formula'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
description: 'Whether to return all results or only up to a given limit',
|
||||
},
|
||||
{
|
||||
displayName: 'Limit',
|
||||
name: 'limit',
|
||||
type: 'number',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['formula'],
|
||||
operation: ['getAll'],
|
||||
returnAll: [false],
|
||||
},
|
||||
},
|
||||
typeOptions: {
|
||||
minValue: 1,
|
||||
maxValue: 100,
|
||||
},
|
||||
default: 50,
|
||||
description: 'Max number of results to return',
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,74 @@
|
||||
import type {
|
||||
IDataObject,
|
||||
IExecuteFunctions,
|
||||
IHttpRequestMethods,
|
||||
ILoadOptionsFunctions,
|
||||
IRequestOptions,
|
||||
JsonObject,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
export async function codaApiRequest(
|
||||
this: IExecuteFunctions | ILoadOptionsFunctions,
|
||||
method: IHttpRequestMethods,
|
||||
resource: string,
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
option: IDataObject = {},
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('codaApi');
|
||||
|
||||
let options: IRequestOptions = {
|
||||
headers: {
|
||||
Authorization: `Bearer ${credentials.accessToken}`,
|
||||
'User-Agent': 'n8n',
|
||||
},
|
||||
method,
|
||||
qs,
|
||||
body,
|
||||
uri: uri || `https://coda.io/apis/v1${resource}`,
|
||||
json: true,
|
||||
};
|
||||
options = Object.assign({}, options, option);
|
||||
if (Object.keys(options.body as IDataObject).length === 0) {
|
||||
delete options.body;
|
||||
}
|
||||
|
||||
try {
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Make an API request to paginated coda endpoint
|
||||
* and return all results
|
||||
*/
|
||||
export async function codaApiRequestAllItems(
|
||||
this: IExecuteFunctions | ILoadOptionsFunctions,
|
||||
propertyName: string,
|
||||
method: IHttpRequestMethods,
|
||||
resource: string,
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
let responseData;
|
||||
|
||||
query.limit = 100;
|
||||
|
||||
let uri: string | undefined;
|
||||
|
||||
do {
|
||||
responseData = await codaApiRequest.call(this, method, resource, body, query, uri);
|
||||
uri = responseData.nextPageLink;
|
||||
returnData.push.apply(returnData, responseData[propertyName] as IDataObject[]);
|
||||
} while (responseData.nextPageLink !== undefined && responseData.nextPageLink !== '');
|
||||
|
||||
return returnData;
|
||||
}
|
||||
@@ -0,0 +1,647 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const tableOperations: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['table'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Create Row',
|
||||
value: 'createRow',
|
||||
description: 'Create/Insert a row',
|
||||
action: 'Create a row',
|
||||
},
|
||||
{
|
||||
name: 'Delete Row',
|
||||
value: 'deleteRow',
|
||||
description: 'Delete one or multiple rows',
|
||||
action: 'Delete a row',
|
||||
},
|
||||
{
|
||||
name: 'Get All Columns',
|
||||
value: 'getAllColumns',
|
||||
description: 'Get all columns in a table',
|
||||
action: 'Get all columns',
|
||||
},
|
||||
{
|
||||
name: 'Get All Rows',
|
||||
value: 'getAllRows',
|
||||
description: 'Get all rows in a table',
|
||||
action: 'Get all rows',
|
||||
},
|
||||
{
|
||||
name: 'Get Column',
|
||||
value: 'getColumn',
|
||||
description: 'Get a column',
|
||||
action: 'Get a column',
|
||||
},
|
||||
{
|
||||
name: 'Get Row',
|
||||
value: 'getRow',
|
||||
description: 'Get a row',
|
||||
action: 'Get a row',
|
||||
},
|
||||
{
|
||||
name: 'Push Button',
|
||||
value: 'pushButton',
|
||||
description: 'Pushes a button',
|
||||
action: 'Push a button',
|
||||
},
|
||||
],
|
||||
default: 'createRow',
|
||||
},
|
||||
];
|
||||
|
||||
export const tableFields: INodeProperties[] = [
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* table:createRow */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Doc Name or ID',
|
||||
name: 'docId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getDocs',
|
||||
},
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['table'],
|
||||
operation: ['createRow'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Table Name or ID',
|
||||
name: 'tableId',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
loadOptionsDependsOn: ['docId'],
|
||||
loadOptionsMethod: 'getTables',
|
||||
},
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['table'],
|
||||
operation: ['createRow'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'The table to create the row in. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Options',
|
||||
name: 'options',
|
||||
type: 'collection',
|
||||
placeholder: 'Add option',
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['table'],
|
||||
operation: ['createRow'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Disable Parsing',
|
||||
name: 'disableParsing',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether the API will not attempt to parse the data in any way',
|
||||
},
|
||||
{
|
||||
displayName: 'Key Columns',
|
||||
name: 'keyColumns',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description:
|
||||
'Optional column IDs, URLs, or names (fragile and discouraged), specifying columns to be used as upsert keys. If more than one separate by a comma (,).',
|
||||
},
|
||||
],
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* table:get */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Doc Name or ID',
|
||||
name: 'docId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getDocs',
|
||||
},
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['table'],
|
||||
operation: ['getRow'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Table Name or ID',
|
||||
name: 'tableId',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
loadOptionsDependsOn: ['docId'],
|
||||
loadOptionsMethod: 'getTables',
|
||||
},
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['table'],
|
||||
operation: ['getRow'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'The table to get the row from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Row ID',
|
||||
name: 'rowId',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['table'],
|
||||
operation: ['getRow'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
"ID or name of the row. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. If there are multiple rows with the same value in the identifying column, an arbitrary one will be selected",
|
||||
},
|
||||
{
|
||||
displayName: 'Options',
|
||||
name: 'options',
|
||||
type: 'collection',
|
||||
placeholder: 'Add option',
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['table'],
|
||||
operation: ['getRow'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
displayName: 'RAW Data',
|
||||
name: 'rawData',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to return the data exactly in the way it got received from the API',
|
||||
},
|
||||
{
|
||||
displayName: 'Use Column Names',
|
||||
name: 'useColumnNames',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description:
|
||||
'Whether to use column names instead of column IDs in the returned output. This is generally discouraged as it is fragile. If columns are renamed, code using original names may throw errors.',
|
||||
},
|
||||
{
|
||||
displayName: 'ValueFormat',
|
||||
name: 'valueFormat',
|
||||
type: 'options',
|
||||
default: '',
|
||||
options: [
|
||||
{
|
||||
name: 'Simple',
|
||||
value: 'simple',
|
||||
},
|
||||
{
|
||||
name: 'Simple With Arrays',
|
||||
value: 'simpleWithArrays',
|
||||
},
|
||||
{
|
||||
name: 'Rich',
|
||||
value: 'rich',
|
||||
},
|
||||
],
|
||||
description: 'The format that cell values are returned as',
|
||||
},
|
||||
],
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* table:getAll */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Doc Name or ID',
|
||||
name: 'docId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getDocs',
|
||||
},
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['table'],
|
||||
operation: ['getAllRows'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Table Name or ID',
|
||||
name: 'tableId',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
loadOptionsDependsOn: ['docId'],
|
||||
loadOptionsMethod: 'getTables',
|
||||
},
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['table'],
|
||||
operation: ['getAllRows'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'The table to get the rows from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Return All',
|
||||
name: 'returnAll',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['table'],
|
||||
operation: ['getAllRows'],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
description: 'Whether to return all results or only up to a given limit',
|
||||
},
|
||||
{
|
||||
displayName: 'Limit',
|
||||
name: 'limit',
|
||||
type: 'number',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['table'],
|
||||
operation: ['getAllRows'],
|
||||
returnAll: [false],
|
||||
},
|
||||
},
|
||||
typeOptions: {
|
||||
minValue: 1,
|
||||
maxValue: 100,
|
||||
},
|
||||
default: 50,
|
||||
description: 'Max number of results to return',
|
||||
},
|
||||
{
|
||||
displayName: 'Options',
|
||||
name: 'options',
|
||||
type: 'collection',
|
||||
placeholder: 'Add option',
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['table'],
|
||||
operation: ['getAllRows'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Query',
|
||||
name: 'query',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description:
|
||||
'Query used to filter returned rows, specified as <column_id_or_name>:<value>. If you\'d like to use a column name instead of an ID, you must quote it (e.g., "My Column":123). Also note that value is a JSON value; if you\'d like to use a string, you must surround it in quotes (e.g., "groceries").',
|
||||
},
|
||||
{
|
||||
displayName: 'RAW Data',
|
||||
name: 'rawData',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to return the data exactly in the way it got received from the API',
|
||||
},
|
||||
{
|
||||
displayName: 'Sort By',
|
||||
name: 'sortBy',
|
||||
type: 'options',
|
||||
default: '',
|
||||
options: [
|
||||
{
|
||||
name: 'Created At',
|
||||
value: 'createdAt',
|
||||
},
|
||||
{
|
||||
name: 'Natural',
|
||||
value: 'natural',
|
||||
},
|
||||
],
|
||||
description:
|
||||
'Specifies the sort order of the rows returned. If left unspecified, rows are returned by creation time ascending.',
|
||||
},
|
||||
{
|
||||
displayName: 'Use Column Names',
|
||||
name: 'useColumnNames',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description:
|
||||
'Whether to use column names instead of column IDs in the returned output. This is generally discouraged as it is fragile. If columns are renamed, code using original names may throw errors.',
|
||||
},
|
||||
{
|
||||
displayName: 'ValueFormat',
|
||||
name: 'valueFormat',
|
||||
type: 'options',
|
||||
default: '',
|
||||
options: [
|
||||
{
|
||||
name: 'Simple',
|
||||
value: 'simple',
|
||||
},
|
||||
{
|
||||
name: 'Simple With Arrays',
|
||||
value: 'simpleWithArrays',
|
||||
},
|
||||
{
|
||||
name: 'Rich',
|
||||
value: 'rich',
|
||||
},
|
||||
],
|
||||
description: 'The format that cell values are returned as',
|
||||
},
|
||||
{
|
||||
displayName: 'Visible Only',
|
||||
name: 'visibleOnly',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to return only visible rows and columns for the table',
|
||||
},
|
||||
],
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* row:delete */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Doc Name or ID',
|
||||
name: 'docId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getDocs',
|
||||
},
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['table'],
|
||||
operation: ['deleteRow'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Table Name or ID',
|
||||
name: 'tableId',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
loadOptionsDependsOn: ['docId'],
|
||||
loadOptionsMethod: 'getTables',
|
||||
},
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['table'],
|
||||
operation: ['deleteRow'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'The table to delete the row in. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Row ID',
|
||||
name: 'rowId',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['table'],
|
||||
operation: ['deleteRow'],
|
||||
},
|
||||
},
|
||||
description: 'Row IDs to delete',
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* table:pushButton */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Doc Name or ID',
|
||||
name: 'docId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getDocs',
|
||||
},
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['table'],
|
||||
operation: ['pushButton'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Table Name or ID',
|
||||
name: 'tableId',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
loadOptionsDependsOn: ['docId'],
|
||||
loadOptionsMethod: 'getTables',
|
||||
},
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['table'],
|
||||
operation: ['pushButton'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'The table to get the row from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Row ID',
|
||||
name: 'rowId',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['table'],
|
||||
operation: ['pushButton'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
"ID or name of the row. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. If there are multiple rows with the same value in the identifying column, an arbitrary one will be selected",
|
||||
},
|
||||
{
|
||||
displayName: 'Column Name or ID',
|
||||
name: 'columnId',
|
||||
type: 'options',
|
||||
description:
|
||||
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
||||
required: true,
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getColumns',
|
||||
loadOptionsDependsOn: ['docId', 'tableId'],
|
||||
},
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['table'],
|
||||
operation: ['pushButton'],
|
||||
},
|
||||
},
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* table:getColumn */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Doc Name or ID',
|
||||
name: 'docId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getDocs',
|
||||
},
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['table'],
|
||||
operation: ['getColumn'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Table Name or ID',
|
||||
name: 'tableId',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
loadOptionsDependsOn: ['docId'],
|
||||
loadOptionsMethod: 'getTables',
|
||||
},
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['table'],
|
||||
operation: ['getColumn'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'The table to get the row from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Column ID',
|
||||
name: 'columnId',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['table'],
|
||||
operation: ['getColumn'],
|
||||
},
|
||||
},
|
||||
description: 'The table to get the row from',
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* table:getAllColumns */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Doc Name or ID',
|
||||
name: 'docId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getDocs',
|
||||
},
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['table'],
|
||||
operation: ['getAllColumns'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Table Name or ID',
|
||||
name: 'tableId',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
loadOptionsDependsOn: ['docId'],
|
||||
loadOptionsMethod: 'getTables',
|
||||
},
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['table'],
|
||||
operation: ['getAllColumns'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'The table to get the row from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Return All',
|
||||
name: 'returnAll',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['table'],
|
||||
operation: ['getAllColumns'],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
description: 'Whether to return all results or only up to a given limit',
|
||||
},
|
||||
{
|
||||
displayName: 'Limit',
|
||||
name: 'limit',
|
||||
type: 'number',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['table'],
|
||||
operation: ['getAllColumns'],
|
||||
returnAll: [false],
|
||||
},
|
||||
},
|
||||
typeOptions: {
|
||||
minValue: 1,
|
||||
maxValue: 100,
|
||||
},
|
||||
default: 50,
|
||||
description: 'Max number of results to return',
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,600 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const viewOperations: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['view'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Delete Row',
|
||||
value: 'deleteViewRow',
|
||||
description: 'Delete view row',
|
||||
action: 'Delete a view row',
|
||||
},
|
||||
{
|
||||
name: 'Get',
|
||||
value: 'get',
|
||||
description: 'Get a view',
|
||||
action: 'Get a view',
|
||||
},
|
||||
{
|
||||
name: 'Get Columns',
|
||||
value: 'getAllViewColumns',
|
||||
description: 'Get all views columns',
|
||||
action: 'Get all view columns',
|
||||
},
|
||||
{
|
||||
name: 'Get Many',
|
||||
value: 'getAll',
|
||||
description: 'Get many views',
|
||||
action: 'Get many views',
|
||||
},
|
||||
{
|
||||
name: 'Get Rows',
|
||||
value: 'getAllViewRows',
|
||||
description: 'Get all views rows',
|
||||
action: 'Get a view row',
|
||||
},
|
||||
{
|
||||
name: 'Push Button',
|
||||
value: 'pushViewButton',
|
||||
description: 'Push view button',
|
||||
action: 'Push a view button',
|
||||
},
|
||||
{
|
||||
name: 'Update Row',
|
||||
value: 'updateViewRow',
|
||||
action: 'Update a view row',
|
||||
},
|
||||
],
|
||||
default: 'get',
|
||||
},
|
||||
];
|
||||
|
||||
export const viewFields: INodeProperties[] = [
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* view:get */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Doc Name or ID',
|
||||
name: 'docId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getDocs',
|
||||
},
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['view'],
|
||||
operation: ['get'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'View ID',
|
||||
name: 'viewId',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['view'],
|
||||
operation: ['get'],
|
||||
},
|
||||
},
|
||||
description: 'The view to get the row from',
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* view:getAll */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Doc Name or ID',
|
||||
name: 'docId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getDocs',
|
||||
},
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['view'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Return All',
|
||||
name: 'returnAll',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['view'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
description: 'Whether to return all results or only up to a given limit',
|
||||
},
|
||||
{
|
||||
displayName: 'Limit',
|
||||
name: 'limit',
|
||||
type: 'number',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['view'],
|
||||
operation: ['getAll'],
|
||||
returnAll: [false],
|
||||
},
|
||||
},
|
||||
typeOptions: {
|
||||
minValue: 1,
|
||||
maxValue: 100,
|
||||
},
|
||||
default: 50,
|
||||
description: 'Max number of results to return',
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* view:getAllViewRows */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Doc Name or ID',
|
||||
name: 'docId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getDocs',
|
||||
},
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['view'],
|
||||
operation: ['getAllViewRows'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'View Name or ID',
|
||||
name: 'viewId',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
loadOptionsDependsOn: ['docId'],
|
||||
loadOptionsMethod: 'getViews',
|
||||
},
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['view'],
|
||||
operation: ['getAllViewRows'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'The table to get the rows from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Return All',
|
||||
name: 'returnAll',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['view'],
|
||||
operation: ['getAllViewRows'],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
description: 'Whether to return all results or only up to a given limit',
|
||||
},
|
||||
{
|
||||
displayName: 'Limit',
|
||||
name: 'limit',
|
||||
type: 'number',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['view'],
|
||||
operation: ['getAllViewRows'],
|
||||
returnAll: [false],
|
||||
},
|
||||
},
|
||||
typeOptions: {
|
||||
minValue: 1,
|
||||
maxValue: 100,
|
||||
},
|
||||
default: 50,
|
||||
description: 'Max number of results to return',
|
||||
},
|
||||
{
|
||||
displayName: 'Options',
|
||||
name: 'options',
|
||||
type: 'collection',
|
||||
placeholder: 'Add option',
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['view'],
|
||||
operation: ['getAllViewRows'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Query',
|
||||
name: 'query',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description:
|
||||
'Query used to filter returned rows, specified as <column_id_or_name>:<value>. If you\'d like to use a column name instead of an ID, you must quote it (e.g., "My Column":123). Also note that value is a JSON value; if you\'d like to use a string, you must surround it in quotes (e.g., "groceries").',
|
||||
},
|
||||
{
|
||||
displayName: 'Use Column Names',
|
||||
name: 'useColumnNames',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description:
|
||||
'Whether to use column names instead of column IDs in the returned output. This is generally discouraged as it is fragile. If columns are renamed, code using original names may throw errors.',
|
||||
},
|
||||
{
|
||||
displayName: 'ValueFormat',
|
||||
name: 'valueFormat',
|
||||
type: 'options',
|
||||
default: '',
|
||||
options: [
|
||||
{
|
||||
name: 'Simple',
|
||||
value: 'simple',
|
||||
},
|
||||
{
|
||||
name: 'Simple With Arrays',
|
||||
value: 'simpleWithArrays',
|
||||
},
|
||||
{
|
||||
name: 'Rich',
|
||||
value: 'rich',
|
||||
},
|
||||
],
|
||||
description: 'The format that cell values are returned as',
|
||||
},
|
||||
{
|
||||
displayName: 'RAW Data',
|
||||
name: 'rawData',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to return the data exactly in the way it got received from the API',
|
||||
},
|
||||
{
|
||||
displayName: 'Sort By',
|
||||
name: 'sortBy',
|
||||
type: 'options',
|
||||
default: '',
|
||||
options: [
|
||||
{
|
||||
name: 'Created At',
|
||||
value: 'createdAt',
|
||||
},
|
||||
{
|
||||
name: 'Natural',
|
||||
value: 'natural',
|
||||
},
|
||||
],
|
||||
description:
|
||||
'Specifies the sort order of the rows returned. If left unspecified, rows are returned by creation time ascending.',
|
||||
},
|
||||
],
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* view:getAllViewColumns */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Doc Name or ID',
|
||||
name: 'docId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getDocs',
|
||||
},
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['view'],
|
||||
operation: ['getAllViewColumns'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'View Name or ID',
|
||||
name: 'viewId',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
loadOptionsDependsOn: ['docId'],
|
||||
loadOptionsMethod: 'getViews',
|
||||
},
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['view'],
|
||||
operation: ['getAllViewColumns'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'The table to get the rows from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Return All',
|
||||
name: 'returnAll',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['view'],
|
||||
operation: ['getAllViewColumns'],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
description: 'Whether to return all results or only up to a given limit',
|
||||
},
|
||||
{
|
||||
displayName: 'Limit',
|
||||
name: 'limit',
|
||||
type: 'number',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['view'],
|
||||
operation: ['getAllViewColumns'],
|
||||
returnAll: [false],
|
||||
},
|
||||
},
|
||||
typeOptions: {
|
||||
minValue: 1,
|
||||
maxValue: 100,
|
||||
},
|
||||
default: 50,
|
||||
description: 'Max number of results to return',
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* view:deleteViewRow */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Doc Name or ID',
|
||||
name: 'docId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getDocs',
|
||||
},
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['view'],
|
||||
operation: ['deleteViewRow'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'View Name or ID',
|
||||
name: 'viewId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
default: '',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getViews',
|
||||
loadOptionsDependsOn: ['docId'],
|
||||
},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['view'],
|
||||
operation: ['deleteViewRow'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'The view to get the row from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Row Name or ID',
|
||||
name: 'rowId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
default: '',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getViewRows',
|
||||
loadOptionsDependsOn: ['viewId'],
|
||||
},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['view'],
|
||||
operation: ['deleteViewRow'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'The view to get the row from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* view:pushViewButton */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Doc Name or ID',
|
||||
name: 'docId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getDocs',
|
||||
},
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['view'],
|
||||
operation: ['pushViewButton'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'View Name or ID',
|
||||
name: 'viewId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
default: '',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getViews',
|
||||
loadOptionsDependsOn: ['docId'],
|
||||
},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['view'],
|
||||
operation: ['pushViewButton'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'The view to get the row from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Row Name or ID',
|
||||
name: 'rowId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
default: '',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getViewRows',
|
||||
loadOptionsDependsOn: ['viewId'],
|
||||
},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['view'],
|
||||
operation: ['pushViewButton'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'The view to get the row from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Column Name or ID',
|
||||
name: 'columnId',
|
||||
type: 'options',
|
||||
description:
|
||||
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
||||
required: true,
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getViewColumns',
|
||||
loadOptionsDependsOn: ['docId', 'viewId'],
|
||||
},
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['view'],
|
||||
operation: ['pushViewButton'],
|
||||
},
|
||||
},
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* view:updateViewRow */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Doc Name or ID',
|
||||
name: 'docId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getDocs',
|
||||
},
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['view'],
|
||||
operation: ['updateViewRow'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'View Name or ID',
|
||||
name: 'viewId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
default: '',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getViews',
|
||||
loadOptionsDependsOn: ['docId'],
|
||||
},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['view'],
|
||||
operation: ['updateViewRow'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'The view to get the row from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Row Name or ID',
|
||||
name: 'rowId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
default: '',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getViewRows',
|
||||
loadOptionsDependsOn: ['viewId'],
|
||||
},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['view'],
|
||||
operation: ['updateViewRow'],
|
||||
},
|
||||
},
|
||||
description:
|
||||
'The view to get the row from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Key Name',
|
||||
name: 'keyName',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: 'columns',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['view'],
|
||||
operation: ['updateViewRow'],
|
||||
},
|
||||
},
|
||||
description: 'The view to get the row from',
|
||||
},
|
||||
{
|
||||
displayName: 'Options',
|
||||
name: 'options',
|
||||
type: 'collection',
|
||||
placeholder: 'Add option',
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['view'],
|
||||
operation: ['updateViewRow'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Disable Parsing',
|
||||
name: 'disableParsing',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether the API will not attempt to parse the data in any way',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"display": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"format": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"isArray": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"href": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"version": 3
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"columnId": {
|
||||
"type": "string"
|
||||
},
|
||||
"requestId": {
|
||||
"type": "string"
|
||||
},
|
||||
"rowId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"href": {
|
||||
"type": "string"
|
||||
},
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"browserLink": {
|
||||
"type": "string"
|
||||
},
|
||||
"href": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"parent": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"browserLink": {
|
||||
"type": "string"
|
||||
},
|
||||
"href": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tableType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"browserLink": {
|
||||
"type": "string"
|
||||
},
|
||||
"href": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"parent": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"browserLink": {
|
||||
"type": "string"
|
||||
},
|
||||
"href": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tableType": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Contract ID": {
|
||||
"type": "string"
|
||||
},
|
||||
"Contract Link": {
|
||||
"type": "string"
|
||||
},
|
||||
"Contract Notes": {
|
||||
"type": "string"
|
||||
},
|
||||
"Contract Signature Date": {
|
||||
"type": "string"
|
||||
},
|
||||
"contractTextOutput": {
|
||||
"type": "string"
|
||||
},
|
||||
"Created on": {
|
||||
"type": "string"
|
||||
},
|
||||
"Do not use name/logo?": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"extractText": {
|
||||
"type": "string"
|
||||
},
|
||||
"fileSize": {
|
||||
"type": "string"
|
||||
},
|
||||
"Full Deletion Required?": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"IT Addendum?": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"lastUpdated": {
|
||||
"type": "string"
|
||||
},
|
||||
"over4MB?": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"Processing Organization": {
|
||||
"type": "string"
|
||||
},
|
||||
"rowID": {
|
||||
"type": "integer"
|
||||
},
|
||||
"Status Date": {
|
||||
"type": "string"
|
||||
},
|
||||
"Summarize": {
|
||||
"type": "string"
|
||||
},
|
||||
"Summary": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 60 60"><path d="M45.2 16.2c3.3 0 6.5 1.3 8.8 3.3 1.5 1.3 3.8.2 3.8-1.8v-13c0-2.5-2.1-4.7-4.7-4.7H6.3C3.7 0 1.6 2.1 1.6 4.7v50.7c0 2.5 2.1 4.6 4.7 4.6h46.8c2.5 0 4.7-2.1 4.7-4.7v-13c0-2-2.3-3.1-3.8-1.8-2.4 2.1-5.4 3.3-8.8 3.3-7.6 0-13.7-6.2-13.7-13.8.1-7.6 6.2-13.8 13.7-13.8" style="fill:#ee5a29"/></svg>
|
||||
|
After Width: | Height: | Size: 378 B |
Reference in New Issue
Block a user