n8n-nodes-base
Version:
Base nodes of n8n
111 lines (106 loc) • 3.07 kB
text/typescript
/**
* Harvest Node - Version 1
* Discriminator: resource=invoice, operation=getAll
*/
interface Credentials {
harvestApi: CredentialReference;
harvestOAuth2Api: CredentialReference;
}
/** Get data of many clients */
export type HarvestV1InvoiceGetAllParams = {
resource: 'invoice';
operation: 'getAll';
authentication?: 'accessToken' | 'oAuth2' | Expression<string>;
/**
* Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>
*/
accountId?: string | Expression<string>;
/**
* Whether to return all results or only up to a given limit
* @default false
*/
returnAll?: boolean | Expression<boolean>;
/**
* Max number of results to return
* @displayOptions.show { returnAll: [false] }
* @default 100
*/
limit?: number | Expression<number>;
/**
* Filters
* @default {}
*/
filters?: {
/** Only return time entries belonging to the client with the given ID
*/
client_id?: string | Expression<string> | PlaceholderValue;
/** Only return time entries with a spent_date on or after the given date
*/
from?: string | Expression<string>;
/** The page number to use in pagination. For instance, if you make a list request and receive 100 records, your subsequent call can include page=2 to retrieve the next page of the list. (Default: 1)
* @default 1
*/
page?: number | Expression<number>;
/** Only return time entries belonging to the client with the given ID
*/
project_id?: string | Expression<string> | PlaceholderValue;
/** Only return invoices with a state matching the value provided. Options: draft, open, paid, or closed.
* @default []
*/
state?: Array<'draft' | 'open' | 'paid' | 'closed'>;
/** Only return time entries with a spent_date on or before the given date
*/
to?: string | Expression<string>;
/** Only return time entries that have been updated since the given date and time
*/
updated_since?: string | Expression<string>;
};
};
export type HarvestV1InvoiceGetAllOutput = {
client?: {
id?: number;
name?: string;
};
client_key?: string;
closed_at?: null;
created_at?: string;
creator?: {
id?: number;
name?: string;
};
currency?: string;
discount_amount?: number;
due_date?: string;
estimate?: null;
id?: number;
issue_date?: string;
line_items?: Array<{
description?: string;
id?: number;
kind?: string;
project?: {
id?: number;
name?: string;
};
taxed?: boolean;
taxed2?: boolean;
}>;
notes?: string;
number?: string;
payment_options?: Array<string>;
payment_term?: string;
purchase_order?: string;
retainer?: null;
state?: string;
subject?: string;
tax2?: null;
tax2_amount?: number;
updated_at?: string;
};
export type HarvestV1InvoiceGetAllNode = {
type: 'n8n-nodes-base.harvest';
version: 1;
credentials?: Credentials;
config: NodeConfig<HarvestV1InvoiceGetAllParams>;
output?: Items<HarvestV1InvoiceGetAllOutput>;
};