n8n-nodes-base
Version:
Base nodes of n8n
96 lines (92 loc) • 3.3 kB
text/typescript
/**
* Harvest Node - Version 1
* Discriminator: resource=user, operation=create
*/
interface Credentials {
harvestApi: CredentialReference;
harvestOAuth2Api: CredentialReference;
}
/** Create a client */
export type HarvestV1UserCreateParams = {
resource: 'user';
operation: 'create';
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>;
/**
* The first name of the user
*/
firstName?: string | Expression<string> | PlaceholderValue;
/**
* The last name of the user
*/
lastName?: string | Expression<string> | PlaceholderValue;
/**
* The email of the user
*/
email?: string | Expression<string> | PlaceholderValue;
/**
* Additional Fields
* @default {}
*/
additionalFields?: {
/** Whether the user can create invoices. Only applicable to Project Managers.
* @default false
*/
can_create_invoices?: boolean | Expression<boolean>;
/** Whether the user can create projects. Only applicable to Project Managers.
* @default false
*/
can_create_projects?: boolean | Expression<boolean>;
/** Whether the user can see billable rates on projects. Only applicable to Project Managers.
* @default false
*/
can_see_rates?: boolean | Expression<boolean>;
/** The cost rate to use for this user when calculating a project’s costs vs billable amount
* @default 0
*/
cost_rate?: number | Expression<number>;
/** The billable rate to use for this user when they are added to a project
* @default 0
*/
default_hourly_rate?: string | Expression<string> | PlaceholderValue;
/** Whether the user should be automatically added to future projects
* @default false
*/
has_access_to_all_future_projects?: boolean | Expression<boolean>;
/** Whether the user is active or archived
* @default true
*/
is_active?: boolean | Expression<boolean>;
/** Whether the user has Admin permissions
* @default false
*/
is_admin?: boolean | Expression<boolean>;
/** Whether the user is a contractor or an employee
* @default false
*/
is_contractor?: boolean | Expression<boolean>;
/** Whether the user has Project Manager permissions
* @default false
*/
is_project_manager?: boolean | Expression<boolean>;
/** The role names assigned to this person
*/
roles?: string | Expression<string> | PlaceholderValue;
/** The user’s timezone. Defaults to the company’s timezone. See a list of <a href="/api-v2/introduction/overview/supported-timezones/">supported time zones</a>.
*/
timezone?: string | Expression<string> | PlaceholderValue;
/** The number of hours per week this person is available to work in seconds. Defaults to <code class="language-plaintext highlighter-rouge">126000</code> seconds (35 hours).
* @default 126000
*/
weekly_capacity?: number | Expression<number>;
};
};
export type HarvestV1UserCreateNode = {
type: 'n8n-nodes-base.harvest';
version: 1;
credentials?: Credentials;
config: NodeConfig<HarvestV1UserCreateParams>;
};