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,241 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const attachmentOperations: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['attachment'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Upload',
|
||||
value: 'upload',
|
||||
description: 'Upload an attachment to a specific table record',
|
||||
action: 'Upload an attachment',
|
||||
},
|
||||
{
|
||||
name: 'Delete',
|
||||
value: 'delete',
|
||||
description: 'Delete an attachment',
|
||||
action: 'Delete an attachment',
|
||||
},
|
||||
{
|
||||
name: 'Get',
|
||||
value: 'get',
|
||||
description: 'Get an attachment',
|
||||
action: 'Get an attachment',
|
||||
},
|
||||
{
|
||||
name: 'Get Many',
|
||||
value: 'getAll',
|
||||
description: 'Get many attachments on a table',
|
||||
action: 'Get many attachments',
|
||||
},
|
||||
],
|
||||
default: 'upload',
|
||||
},
|
||||
];
|
||||
|
||||
export const attachmentFields: INodeProperties[] = [
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* attachment common fields */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
{
|
||||
displayName: 'Table Name or ID',
|
||||
name: 'tableName',
|
||||
type: 'options',
|
||||
description:
|
||||
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getTables',
|
||||
},
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['attachment'],
|
||||
operation: ['upload', 'getAll'],
|
||||
},
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* attachment:upload */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Table Record ID',
|
||||
name: 'id',
|
||||
type: 'string',
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['attachment'],
|
||||
operation: ['upload'],
|
||||
},
|
||||
},
|
||||
required: true,
|
||||
description:
|
||||
'Sys_id of the record in the table specified in Table Name that you want to attach the file to',
|
||||
},
|
||||
{
|
||||
displayName: 'Input Data Field Name',
|
||||
name: 'inputDataFieldName',
|
||||
type: 'string',
|
||||
default: 'data',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['attachment'],
|
||||
operation: ['upload'],
|
||||
},
|
||||
},
|
||||
description: 'Name of the binary property that contains the data to upload',
|
||||
},
|
||||
{
|
||||
displayName: 'Options',
|
||||
name: 'options',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Field',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['attachment'],
|
||||
operation: ['upload'],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'File Name for the Attachment',
|
||||
name: 'file_name',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Name to give the attachment',
|
||||
},
|
||||
],
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* attachment:delete */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Attachment ID',
|
||||
name: 'attachmentId',
|
||||
type: 'string',
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['attachment'],
|
||||
operation: ['delete'],
|
||||
},
|
||||
},
|
||||
required: true,
|
||||
description: 'Sys_id value of the attachment to delete',
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* attachment:get */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Attachment ID',
|
||||
name: 'attachmentId',
|
||||
type: 'string',
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['attachment'],
|
||||
operation: ['get'],
|
||||
},
|
||||
},
|
||||
required: true,
|
||||
description: 'Sys_id value of the attachment to delete',
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* attachment:getAll */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Return All',
|
||||
name: 'returnAll',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['attachment'],
|
||||
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: ['attachment'],
|
||||
operation: ['getAll'],
|
||||
returnAll: [false],
|
||||
},
|
||||
},
|
||||
typeOptions: {
|
||||
minValue: 1,
|
||||
maxValue: 500,
|
||||
},
|
||||
default: 50,
|
||||
description: 'Max number of results to return',
|
||||
},
|
||||
{
|
||||
displayName: 'Download Attachments',
|
||||
name: 'download',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['attachment'],
|
||||
operation: ['get', 'getAll'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Output Field',
|
||||
name: 'outputField',
|
||||
type: 'string',
|
||||
default: 'data',
|
||||
description: 'Field name where downloaded data will be placed',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['attachment'],
|
||||
operation: ['get', 'getAll'],
|
||||
download: [true],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Options',
|
||||
name: 'options',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Field',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['attachment'],
|
||||
operation: ['get', 'getAll'],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Filter',
|
||||
name: 'queryFilter',
|
||||
type: 'string',
|
||||
placeholder: '<col_name><operator><value>',
|
||||
default: '',
|
||||
description: 'An encoded query string used to filter the results',
|
||||
hint: 'All parameters are case-sensitive. Queries can contain more than one entry. <a href="https://developer.servicenow.com/dev.do#!/learn/learning-plans/quebec/servicenow_application_developer/app_store_learnv2_rest_quebec_more_about_query_parameters">More information</a>.',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,124 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const businessServiceOperations: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['businessService'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Get Many',
|
||||
value: 'getAll',
|
||||
action: 'Get many business services',
|
||||
},
|
||||
],
|
||||
default: 'getAll',
|
||||
},
|
||||
];
|
||||
|
||||
export const businessServiceFields: INodeProperties[] = [
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* businessService:getAll */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Return All',
|
||||
name: 'returnAll',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['getAll'],
|
||||
resource: ['businessService'],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
description: 'Whether to return all results or only up to a given limit',
|
||||
},
|
||||
{
|
||||
displayName: 'Limit',
|
||||
name: 'limit',
|
||||
type: 'number',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['getAll'],
|
||||
resource: ['businessService'],
|
||||
returnAll: [false],
|
||||
},
|
||||
},
|
||||
typeOptions: {
|
||||
minValue: 1,
|
||||
maxValue: 500,
|
||||
},
|
||||
default: 50,
|
||||
description: 'Max number of results to return',
|
||||
},
|
||||
{
|
||||
displayName: 'Options',
|
||||
name: 'options',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Field',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['businessService'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Exclude Reference Link',
|
||||
name: 'sysparm_exclude_reference_link',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to exclude Table API links for reference fields',
|
||||
},
|
||||
{
|
||||
displayName: 'Field Names or IDs',
|
||||
name: 'sysparm_fields',
|
||||
type: 'multiOptions',
|
||||
typeOptions: {
|
||||
// nodelinter-ignore-next-line
|
||||
loadOptionsMethod: 'getColumns',
|
||||
},
|
||||
default: [],
|
||||
description:
|
||||
'A list of fields to return. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
hint: 'String of comma separated values or an array of strings can be set in an expression',
|
||||
},
|
||||
{
|
||||
displayName: 'Filter',
|
||||
name: 'sysparm_query',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description:
|
||||
'An encoded query string used to filter the results. <a href="https://developer.servicenow.com/dev.do#!/learn/learning-plans/quebec/servicenow_application_developer/app_store_learnv2_rest_quebec_more_about_query_parameters">More info</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Return Values',
|
||||
name: 'sysparm_display_value',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Actual Values',
|
||||
value: 'false',
|
||||
},
|
||||
{
|
||||
name: 'Both',
|
||||
value: 'all',
|
||||
},
|
||||
{
|
||||
name: 'Display Values',
|
||||
value: 'true',
|
||||
},
|
||||
],
|
||||
default: 'false',
|
||||
description: 'Choose which values to return',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,124 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const configurationItemsOperations: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['configurationItems'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Get Many',
|
||||
value: 'getAll',
|
||||
action: 'Get many configuration items',
|
||||
},
|
||||
],
|
||||
default: 'getAll',
|
||||
},
|
||||
];
|
||||
|
||||
export const configurationItemsFields: INodeProperties[] = [
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* configurationItems:getAll */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Return All',
|
||||
name: 'returnAll',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['getAll'],
|
||||
resource: ['configurationItems'],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
description: 'Whether to return all results or only up to a given limit',
|
||||
},
|
||||
{
|
||||
displayName: 'Limit',
|
||||
name: 'limit',
|
||||
type: 'number',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['getAll'],
|
||||
resource: ['configurationItems'],
|
||||
returnAll: [false],
|
||||
},
|
||||
},
|
||||
typeOptions: {
|
||||
minValue: 1,
|
||||
maxValue: 500,
|
||||
},
|
||||
default: 50,
|
||||
description: 'Max number of results to return',
|
||||
},
|
||||
{
|
||||
displayName: 'Options',
|
||||
name: 'options',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Field',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['configurationItems'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Exclude Reference Link',
|
||||
name: 'sysparm_exclude_reference_link',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to exclude Table API links for reference fields',
|
||||
},
|
||||
{
|
||||
displayName: 'Field Names or IDs',
|
||||
name: 'sysparm_fields',
|
||||
type: 'multiOptions',
|
||||
typeOptions: {
|
||||
// nodelinter-ignore-next-line
|
||||
loadOptionsMethod: 'getColumns',
|
||||
},
|
||||
default: [],
|
||||
description:
|
||||
'A list of fields to return. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
hint: 'String of comma separated values or an array of strings can be set in an expression',
|
||||
},
|
||||
{
|
||||
displayName: 'Filter',
|
||||
name: 'sysparm_query',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description:
|
||||
'An encoded query string used to filter the results. <a href="https://developer.servicenow.com/dev.do#!/learn/learning-plans/quebec/servicenow_application_developer/app_store_learnv2_rest_quebec_more_about_query_parameters">More info</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Return Values',
|
||||
name: 'sysparm_display_value',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Actual Values',
|
||||
value: 'false',
|
||||
},
|
||||
{
|
||||
name: 'Both',
|
||||
value: 'all',
|
||||
},
|
||||
{
|
||||
name: 'Display Values',
|
||||
value: 'true',
|
||||
},
|
||||
],
|
||||
default: 'false',
|
||||
description: 'Choose which values to return',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,124 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const departmentOperations: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['department'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Get Many',
|
||||
value: 'getAll',
|
||||
action: 'Get many departments',
|
||||
},
|
||||
],
|
||||
default: 'getAll',
|
||||
},
|
||||
];
|
||||
|
||||
export const departmentFields: INodeProperties[] = [
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* department:getAll */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Return All',
|
||||
name: 'returnAll',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['getAll'],
|
||||
resource: ['department'],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
description: 'Whether to return all results or only up to a given limit',
|
||||
},
|
||||
{
|
||||
displayName: 'Limit',
|
||||
name: 'limit',
|
||||
type: 'number',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['getAll'],
|
||||
resource: ['department'],
|
||||
returnAll: [false],
|
||||
},
|
||||
},
|
||||
typeOptions: {
|
||||
minValue: 1,
|
||||
maxValue: 500,
|
||||
},
|
||||
default: 50,
|
||||
description: 'Max number of results to return',
|
||||
},
|
||||
{
|
||||
displayName: 'Options',
|
||||
name: 'options',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Field',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['department'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Exclude Reference Link',
|
||||
name: 'sysparm_exclude_reference_link',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to exclude Table API links for reference fields',
|
||||
},
|
||||
{
|
||||
displayName: 'Field Names or IDs',
|
||||
name: 'sysparm_fields',
|
||||
type: 'multiOptions',
|
||||
typeOptions: {
|
||||
// nodelinter-ignore-next-line
|
||||
loadOptionsMethod: 'getColumns',
|
||||
},
|
||||
default: [],
|
||||
description:
|
||||
'A list of fields to return. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
hint: 'String of comma separated values or an array of strings can be set in an expression',
|
||||
},
|
||||
{
|
||||
displayName: 'Filter',
|
||||
name: 'sysparm_query',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description:
|
||||
'An encoded query string used to filter the results. <a href="https://developer.servicenow.com/dev.do#!/learn/learning-plans/quebec/servicenow_application_developer/app_store_learnv2_rest_quebec_more_about_query_parameters">More info</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Return Values',
|
||||
name: 'sysparm_display_value',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Actual Values',
|
||||
value: 'false',
|
||||
},
|
||||
{
|
||||
name: 'Both',
|
||||
value: 'all',
|
||||
},
|
||||
{
|
||||
name: 'Display Values',
|
||||
value: 'true',
|
||||
},
|
||||
],
|
||||
default: 'false',
|
||||
description: 'Choose which values to return',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,124 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const dictionaryOperations: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['dictionary'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Get Many',
|
||||
value: 'getAll',
|
||||
action: 'Get many dictionaries',
|
||||
},
|
||||
],
|
||||
default: 'getAll',
|
||||
},
|
||||
];
|
||||
|
||||
export const dictionaryFields: INodeProperties[] = [
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* dictionary:getAll */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Return All',
|
||||
name: 'returnAll',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['getAll'],
|
||||
resource: ['dictionary'],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
description: 'Whether to return all results or only up to a given limit',
|
||||
},
|
||||
{
|
||||
displayName: 'Limit',
|
||||
name: 'limit',
|
||||
type: 'number',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['getAll'],
|
||||
resource: ['dictionary'],
|
||||
returnAll: [false],
|
||||
},
|
||||
},
|
||||
typeOptions: {
|
||||
minValue: 1,
|
||||
maxValue: 500,
|
||||
},
|
||||
default: 50,
|
||||
description: 'Max number of results to return',
|
||||
},
|
||||
{
|
||||
displayName: 'Options',
|
||||
name: 'options',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Field',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['dictionary'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Exclude Reference Link',
|
||||
name: 'sysparm_exclude_reference_link',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to exclude Table API links for reference fields',
|
||||
},
|
||||
{
|
||||
displayName: 'Field Names or IDs',
|
||||
name: 'sysparm_fields',
|
||||
type: 'multiOptions',
|
||||
typeOptions: {
|
||||
// nodelinter-ignore-next-line
|
||||
loadOptionsMethod: 'getColumns',
|
||||
},
|
||||
default: [],
|
||||
description:
|
||||
'A list of fields to return. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
hint: 'String of comma separated values or an array of strings can be set in an expression',
|
||||
},
|
||||
{
|
||||
displayName: 'Filter',
|
||||
name: 'sysparm_query',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description:
|
||||
'An encoded query string used to filter the results. <a href="https://developer.servicenow.com/dev.do#!/learn/learning-plans/quebec/servicenow_application_developer/app_store_learnv2_rest_quebec_more_about_query_parameters">More info</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Return Values',
|
||||
name: 'sysparm_display_value',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Actual Values',
|
||||
value: 'false',
|
||||
},
|
||||
{
|
||||
name: 'Both',
|
||||
value: 'all',
|
||||
},
|
||||
{
|
||||
name: 'Display Values',
|
||||
value: 'true',
|
||||
},
|
||||
],
|
||||
default: 'false',
|
||||
description: 'Choose which values to return',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,145 @@
|
||||
import type {
|
||||
IExecuteFunctions,
|
||||
ILoadOptionsFunctions,
|
||||
IDataObject,
|
||||
INodePropertyOptions,
|
||||
JsonObject,
|
||||
IHttpRequestMethods,
|
||||
IRequestOptions,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
export async function serviceNowApiRequest(
|
||||
this: IExecuteFunctions | ILoadOptionsFunctions,
|
||||
method: IHttpRequestMethods,
|
||||
resource: string,
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
option: IDataObject = {},
|
||||
): Promise<any> {
|
||||
const headers = {} as IDataObject;
|
||||
const authenticationMethod = this.getNodeParameter('authentication', 0, 'oAuth2') as string;
|
||||
|
||||
let credentials;
|
||||
|
||||
if (authenticationMethod === 'basicAuth') {
|
||||
credentials = await this.getCredentials('serviceNowBasicApi');
|
||||
} else {
|
||||
credentials = await this.getCredentials('serviceNowOAuth2Api');
|
||||
}
|
||||
|
||||
const options = {
|
||||
headers,
|
||||
method,
|
||||
qs,
|
||||
body,
|
||||
uri: uri || `https://${credentials.subdomain}.service-now.com/api${resource}`,
|
||||
json: true,
|
||||
} satisfies IRequestOptions;
|
||||
if (!Object.keys(body as IDataObject).length) {
|
||||
delete options.body;
|
||||
}
|
||||
|
||||
if (Object.keys(option).length !== 0) {
|
||||
Object.assign(options, option);
|
||||
}
|
||||
|
||||
if (options.qs.limit) {
|
||||
delete options.qs.limit;
|
||||
}
|
||||
|
||||
try {
|
||||
const credentialType =
|
||||
authenticationMethod === 'oAuth2' ? 'serviceNowOAuth2Api' : 'serviceNowBasicApi';
|
||||
return await this.helpers.requestWithAuthentication.call(this, credentialType, options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
}
|
||||
|
||||
export async function serviceNowRequestAllItems(
|
||||
this: IExecuteFunctions | ILoadOptionsFunctions,
|
||||
method: IHttpRequestMethods,
|
||||
resource: string,
|
||||
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
let responseData;
|
||||
|
||||
const page = 100;
|
||||
|
||||
query.sysparm_limit = page;
|
||||
|
||||
responseData = await serviceNowApiRequest.call(this, method, resource, body, query, undefined, {
|
||||
resolveWithFullResponse: true,
|
||||
});
|
||||
returnData.push.apply(returnData, responseData.body.result as IDataObject[]);
|
||||
|
||||
const quantity = responseData.headers['x-total-count'];
|
||||
const iterations = Math.round(quantity / page) + (quantity % page ? 1 : 0);
|
||||
|
||||
for (let iteration = 1; iteration < iterations; iteration++) {
|
||||
query.sysparm_limit = page;
|
||||
query.sysparm_offset = iteration * page;
|
||||
responseData = await serviceNowApiRequest.call(this, method, resource, body, query, undefined, {
|
||||
resolveWithFullResponse: true,
|
||||
});
|
||||
|
||||
returnData.push.apply(returnData, responseData.body.result as IDataObject[]);
|
||||
}
|
||||
|
||||
return returnData;
|
||||
}
|
||||
|
||||
export async function serviceNowDownloadAttachment(
|
||||
this: IExecuteFunctions,
|
||||
endpoint: string,
|
||||
fileName: string,
|
||||
contentType: string,
|
||||
) {
|
||||
const fileData = await serviceNowApiRequest.call(this, 'GET', `${endpoint}/file`, {}, {}, '', {
|
||||
json: false,
|
||||
encoding: null,
|
||||
resolveWithFullResponse: true,
|
||||
});
|
||||
const binaryData = await this.helpers.prepareBinaryData(
|
||||
Buffer.from(fileData.body as string),
|
||||
fileName,
|
||||
contentType,
|
||||
);
|
||||
|
||||
return binaryData;
|
||||
}
|
||||
|
||||
export const mapEndpoint = (resource: string, _operation: string) => {
|
||||
const resourceEndpoint = new Map([
|
||||
['attachment', 'sys_dictionary'],
|
||||
['tableRecord', 'sys_dictionary'],
|
||||
['businessService', 'cmdb_ci_service'],
|
||||
['configurationItems', 'cmdb_ci'],
|
||||
['department', 'cmn_department'],
|
||||
['dictionary', 'sys_dictionary'],
|
||||
['incident', 'incident'],
|
||||
['user', 'sys_user'],
|
||||
['userGroup', 'sys_user_group'],
|
||||
['userRole', 'sys_user_role'],
|
||||
]);
|
||||
return resourceEndpoint.get(resource);
|
||||
};
|
||||
|
||||
export const sortData = (returnData: INodePropertyOptions[]): INodePropertyOptions[] => {
|
||||
returnData.sort((a, b) => {
|
||||
if (a.name < b.name) {
|
||||
return -1;
|
||||
}
|
||||
if (a.name > b.name) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
return returnData;
|
||||
};
|
||||
@@ -0,0 +1,675 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const incidentOperations: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['incident'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Create',
|
||||
value: 'create',
|
||||
action: 'Create an incident',
|
||||
},
|
||||
{
|
||||
name: 'Delete',
|
||||
value: 'delete',
|
||||
action: 'Delete an incident',
|
||||
},
|
||||
{
|
||||
name: 'Get',
|
||||
value: 'get',
|
||||
action: 'Get an incident',
|
||||
},
|
||||
{
|
||||
name: 'Get Many',
|
||||
value: 'getAll',
|
||||
action: 'Get many incidents',
|
||||
},
|
||||
{
|
||||
name: 'Update',
|
||||
value: 'update',
|
||||
action: 'Update an incident',
|
||||
},
|
||||
],
|
||||
default: 'get',
|
||||
},
|
||||
];
|
||||
|
||||
export const incidentFields: INodeProperties[] = [
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* incident:create */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
{
|
||||
displayName: 'Short Description',
|
||||
name: 'short_description',
|
||||
type: 'string',
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['incident'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
required: true,
|
||||
description: 'Short description of the incident',
|
||||
},
|
||||
{
|
||||
displayName: 'Additional Fields',
|
||||
name: 'additionalFields',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Field',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['incident'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Assignee Name or ID',
|
||||
name: 'assigned_to',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
// nodelinter-ignore-next-line
|
||||
loadOptionsMethod: 'getUsers',
|
||||
loadOptionsDependsOn: ['additionalFields.assignment_group'],
|
||||
},
|
||||
default: '',
|
||||
description:
|
||||
'Which user is the incident assigned to. Requires the selection of an assignment group. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Assignment Group Name or ID',
|
||||
name: 'assignment_group',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
// nodelinter-ignore-next-line
|
||||
loadOptionsMethod: 'getAssignmentGroups',
|
||||
},
|
||||
default: '',
|
||||
description:
|
||||
'The assignment group of the incident. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Business Service Name or ID',
|
||||
name: 'business_service',
|
||||
type: 'options',
|
||||
description:
|
||||
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
||||
typeOptions: {
|
||||
// nodelinter-ignore-next-line
|
||||
loadOptionsMethod: 'getBusinessServices',
|
||||
},
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Caller ID',
|
||||
name: 'caller_id',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'The unique identifier of the caller of the incident',
|
||||
},
|
||||
{
|
||||
displayName: 'Category Name or ID',
|
||||
name: 'category',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
// nodelinter-ignore-next-line
|
||||
loadOptionsMethod: 'getIncidentCategories',
|
||||
},
|
||||
default: '',
|
||||
description:
|
||||
'The category of the incident. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Close Notes',
|
||||
name: 'close_notes',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'The close notes for the incident',
|
||||
},
|
||||
{
|
||||
displayName: 'Configuration Item Names or IDs',
|
||||
name: 'cmdb_ci',
|
||||
type: 'multiOptions',
|
||||
typeOptions: {
|
||||
// nodelinter-ignore-next-line
|
||||
loadOptionsMethod: 'getConfigurationItems',
|
||||
},
|
||||
default: [],
|
||||
description:
|
||||
'Configuration Items, \'cmdb_ci\' in metadata. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Contact Type',
|
||||
name: 'contact_type',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Email',
|
||||
value: 'email',
|
||||
},
|
||||
{
|
||||
name: 'Phone',
|
||||
value: 'phone',
|
||||
},
|
||||
{
|
||||
name: 'Self Service',
|
||||
value: 'self-service',
|
||||
},
|
||||
{
|
||||
name: 'Walk In',
|
||||
value: 'walk-in',
|
||||
},
|
||||
],
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Description',
|
||||
name: 'description',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'The description of the incident',
|
||||
},
|
||||
{
|
||||
displayName: 'Impact',
|
||||
name: 'impact',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Low',
|
||||
value: 3,
|
||||
},
|
||||
{
|
||||
name: 'Medium',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
name: 'High',
|
||||
value: 1,
|
||||
},
|
||||
],
|
||||
default: 1,
|
||||
description: 'The impact of the incident',
|
||||
},
|
||||
{
|
||||
displayName: 'Resolution Code Name or ID',
|
||||
name: 'close_code',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
// nodelinter-ignore-next-line
|
||||
loadOptionsMethod: 'getIncidentResolutionCodes',
|
||||
},
|
||||
default: '',
|
||||
description:
|
||||
'The resolution code of the incident, \'close_code\' in metadata. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'State Name or ID',
|
||||
name: 'state',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
// nodelinter-ignore-next-line
|
||||
loadOptionsMethod: 'getIncidentStates',
|
||||
},
|
||||
default: '',
|
||||
description:
|
||||
'The state of the incident. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Subcategory Name or ID',
|
||||
name: 'subcategory',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
// nodelinter-ignore-next-line
|
||||
loadOptionsMethod: 'getIncidentSubcategories',
|
||||
loadOptionsDependsOn: ['additionalFields.category'],
|
||||
},
|
||||
default: '',
|
||||
description:
|
||||
'The subcategory of the incident. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Urgency',
|
||||
name: 'urgency',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Low',
|
||||
value: 3,
|
||||
},
|
||||
{
|
||||
name: 'Medium',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
name: 'High',
|
||||
value: 1,
|
||||
},
|
||||
],
|
||||
default: 1,
|
||||
description: 'The urgency of the incident',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* incident:getAll */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Return All',
|
||||
name: 'returnAll',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['getAll'],
|
||||
resource: ['incident'],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
description: 'Whether to return all results or only up to a given limit',
|
||||
},
|
||||
{
|
||||
displayName: 'Limit',
|
||||
name: 'limit',
|
||||
type: 'number',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['getAll'],
|
||||
resource: ['incident'],
|
||||
returnAll: [false],
|
||||
},
|
||||
},
|
||||
typeOptions: {
|
||||
minValue: 1,
|
||||
maxValue: 500,
|
||||
},
|
||||
default: 50,
|
||||
description: 'Max number of results to return',
|
||||
},
|
||||
{
|
||||
displayName: 'Options',
|
||||
name: 'options',
|
||||
type: 'collection',
|
||||
placeholder: 'Add option',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['incident'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Exclude Reference Link',
|
||||
name: 'sysparm_exclude_reference_link',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to exclude Table API links for reference fields',
|
||||
},
|
||||
{
|
||||
displayName: 'Field Names or IDs',
|
||||
name: 'sysparm_fields',
|
||||
type: 'multiOptions',
|
||||
typeOptions: {
|
||||
// nodelinter-ignore-next-line
|
||||
loadOptionsMethod: 'getColumns',
|
||||
},
|
||||
default: [],
|
||||
description:
|
||||
'A list of fields to return. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
hint: 'String of comma separated values or an array of strings can be set in an expression',
|
||||
},
|
||||
{
|
||||
displayName: 'Filter',
|
||||
name: 'sysparm_query',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description:
|
||||
'An encoded query string used to filter the results. <a href="https://developer.servicenow.com/dev.do#!/learn/learning-plans/quebec/servicenow_application_developer/app_store_learnv2_rest_quebec_more_about_query_parameters">More info</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Return Values',
|
||||
name: 'sysparm_display_value',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Actual Values',
|
||||
value: 'false',
|
||||
},
|
||||
{
|
||||
name: 'Both',
|
||||
value: 'all',
|
||||
},
|
||||
{
|
||||
name: 'Display Values',
|
||||
value: 'true',
|
||||
},
|
||||
],
|
||||
default: 'false',
|
||||
description: 'Choose which values to return',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* incident:get/delete */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Incident ID',
|
||||
name: 'id',
|
||||
type: 'string',
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['incident'],
|
||||
operation: ['delete', 'get'],
|
||||
},
|
||||
},
|
||||
required: true,
|
||||
description: 'Unique identifier of the incident',
|
||||
},
|
||||
{
|
||||
displayName: 'Options',
|
||||
name: 'options',
|
||||
type: 'collection',
|
||||
placeholder: 'Add option',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['incident'],
|
||||
operation: ['get'],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Exclude Reference Link',
|
||||
name: 'sysparm_exclude_reference_link',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to exclude Table API links for reference fields',
|
||||
},
|
||||
{
|
||||
displayName: 'Field Names or IDs',
|
||||
name: 'sysparm_fields',
|
||||
type: 'multiOptions',
|
||||
typeOptions: {
|
||||
// nodelinter-ignore-next-line
|
||||
loadOptionsMethod: 'getColumns',
|
||||
},
|
||||
default: [],
|
||||
description:
|
||||
'A list of fields to return. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
hint: 'String of comma separated values or an array of strings can be set in an expression',
|
||||
},
|
||||
{
|
||||
displayName: 'Return Values',
|
||||
name: 'sysparm_display_value',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Actual Values',
|
||||
value: 'false',
|
||||
},
|
||||
{
|
||||
name: 'Both',
|
||||
value: 'all',
|
||||
},
|
||||
{
|
||||
name: 'Display Values',
|
||||
value: 'true',
|
||||
},
|
||||
],
|
||||
default: 'false',
|
||||
description: 'Choose which values to return',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* incident:update */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Incident ID',
|
||||
name: 'id',
|
||||
type: 'string',
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['incident'],
|
||||
operation: ['update'],
|
||||
},
|
||||
},
|
||||
required: true,
|
||||
description: 'Unique identifier of the incident',
|
||||
},
|
||||
{
|
||||
displayName: 'Update Fields',
|
||||
name: 'updateFields',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Field',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['incident'],
|
||||
operation: ['update'],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Assigned To Name or ID',
|
||||
name: 'assigned_to',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
// nodelinter-ignore-next-line
|
||||
loadOptionsMethod: 'getUsers',
|
||||
loadOptionsDependsOn: ['additionalFields.assignment_group'],
|
||||
},
|
||||
default: '',
|
||||
description:
|
||||
'Which user is the incident assigned to. Requires the selection of an assignment group. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Assignment Group Name or ID',
|
||||
name: 'assignment_group',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
// nodelinter-ignore-next-line
|
||||
loadOptionsMethod: 'getAssignmentGroups',
|
||||
},
|
||||
default: '',
|
||||
description:
|
||||
'The assignment group of the incident. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Business Service Name or ID',
|
||||
name: 'business_service',
|
||||
type: 'options',
|
||||
description:
|
||||
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
||||
typeOptions: {
|
||||
// nodelinter-ignore-next-line
|
||||
loadOptionsMethod: 'getBusinessServices',
|
||||
},
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Caller ID',
|
||||
name: 'caller_id',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'The unique identifier of the caller of the incident',
|
||||
},
|
||||
{
|
||||
displayName: 'Category Name or ID',
|
||||
name: 'category',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
// nodelinter-ignore-next-line
|
||||
loadOptionsMethod: 'getIncidentCategories',
|
||||
},
|
||||
default: '',
|
||||
description:
|
||||
'The category of the incident. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Close Notes',
|
||||
name: 'close_notes',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'The close notes for the incident',
|
||||
},
|
||||
{
|
||||
displayName: 'Configuration Item Names or IDs',
|
||||
name: 'cmdb_ci',
|
||||
type: 'multiOptions',
|
||||
typeOptions: {
|
||||
// nodelinter-ignore-next-line
|
||||
loadOptionsMethod: 'getConfigurationItems',
|
||||
},
|
||||
default: [],
|
||||
description:
|
||||
'Configuration Items, \'cmdb_ci\' in metadata. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Contact Type',
|
||||
name: 'contact_type',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Email',
|
||||
value: 'email',
|
||||
},
|
||||
{
|
||||
name: 'Phone',
|
||||
value: 'phone',
|
||||
},
|
||||
{
|
||||
name: 'Self Service',
|
||||
value: 'self-service',
|
||||
},
|
||||
{
|
||||
name: 'Walk In',
|
||||
value: 'walk-in',
|
||||
},
|
||||
],
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Description',
|
||||
name: 'description',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'The description of the incident',
|
||||
},
|
||||
{
|
||||
displayName: 'Impact',
|
||||
name: 'impact',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Low',
|
||||
value: 3,
|
||||
},
|
||||
{
|
||||
name: 'Medium',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
name: 'High',
|
||||
value: 1,
|
||||
},
|
||||
],
|
||||
default: 1,
|
||||
description: 'The impact of the incident',
|
||||
},
|
||||
{
|
||||
displayName: 'Resolution Code Name or ID',
|
||||
name: 'close_code',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
// nodelinter-ignore-next-line
|
||||
loadOptionsMethod: 'getIncidentResolutionCodes',
|
||||
},
|
||||
default: '',
|
||||
// nodelinter-ignore-next-line
|
||||
description:
|
||||
'The resolution code of the incident. \'close_code\' in metadata. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'On Hold Reason Name or ID',
|
||||
name: 'hold_reason',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
// nodelinter-ignore-next-line
|
||||
loadOptionsMethod: 'getIncidentHoldReasons',
|
||||
},
|
||||
default: '',
|
||||
description:
|
||||
'The on hold reason for the incident. It applies if the state is <code>On Hold</code>. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'State Name or ID',
|
||||
name: 'state',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
// nodelinter-ignore-next-line
|
||||
loadOptionsMethod: 'getIncidentStates',
|
||||
},
|
||||
default: '',
|
||||
description:
|
||||
'The state of the incident. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Subcategory Name or ID',
|
||||
name: 'subcategory',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
// nodelinter-ignore-next-line
|
||||
loadOptionsMethod: 'getIncidentSubcategories',
|
||||
loadOptionsDependsOn: ['additionalFields.category'],
|
||||
},
|
||||
default: '',
|
||||
description:
|
||||
'The subcategory of the incident. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Urgency',
|
||||
name: 'urgency',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Low',
|
||||
value: 3,
|
||||
},
|
||||
{
|
||||
name: 'Medium',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
name: 'High',
|
||||
value: 1,
|
||||
},
|
||||
],
|
||||
default: 1,
|
||||
description: 'The urgency of the incident',
|
||||
},
|
||||
{
|
||||
displayName: 'Work Notes',
|
||||
name: 'work_notes',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Work notes for the incident',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"node": "n8n-nodes-base.serviceNow",
|
||||
"nodeVersion": "1.0",
|
||||
"codexVersion": "1.0",
|
||||
"categories": ["Productivity", "Communication"],
|
||||
"resources": {
|
||||
"credentialDocumentation": [
|
||||
{
|
||||
"url": "https://docs.n8n.io/integrations/builtin/credentials/servicenow/"
|
||||
}
|
||||
],
|
||||
"primaryDocumentation": [
|
||||
{
|
||||
"url": "https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.servicenow/"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,486 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const tableRecordOperations: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['tableRecord'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Create',
|
||||
value: 'create',
|
||||
action: 'Create a table record',
|
||||
},
|
||||
{
|
||||
name: 'Delete',
|
||||
value: 'delete',
|
||||
action: 'Delete a table record',
|
||||
},
|
||||
{
|
||||
name: 'Get',
|
||||
value: 'get',
|
||||
action: 'Get a table record',
|
||||
},
|
||||
{
|
||||
name: 'Get Many',
|
||||
value: 'getAll',
|
||||
action: 'Get many table records',
|
||||
},
|
||||
{
|
||||
name: 'Update',
|
||||
value: 'update',
|
||||
action: 'Update a table record',
|
||||
},
|
||||
],
|
||||
default: 'get',
|
||||
},
|
||||
];
|
||||
|
||||
export const tableRecordFields: INodeProperties[] = [
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* tableRecord:create */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Table Name or ID',
|
||||
name: 'tableName',
|
||||
type: 'options',
|
||||
description:
|
||||
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getTables',
|
||||
},
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['tableRecord'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
displayName: 'Data to Send',
|
||||
name: 'dataToSend',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Auto-Map Input Data to Columns',
|
||||
value: 'mapInput',
|
||||
description: 'Use when node input names match destination field names',
|
||||
},
|
||||
{
|
||||
name: 'Define Below for Each Column',
|
||||
value: 'columns',
|
||||
description: 'Set the value for each destination column',
|
||||
},
|
||||
{
|
||||
name: 'Nothing',
|
||||
value: 'nothing',
|
||||
description: "Don't send any column data",
|
||||
},
|
||||
],
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['tableRecord'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
default: 'columns',
|
||||
},
|
||||
{
|
||||
displayName: 'Inputs to Ignore',
|
||||
name: 'inputsToIgnore',
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['tableRecord'],
|
||||
operation: ['create'],
|
||||
dataToSend: ['mapInput'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description:
|
||||
'List of input properties to avoid sending, separated by commas. Leave empty to send all inputs.',
|
||||
},
|
||||
{
|
||||
displayName: 'Fields to Send',
|
||||
name: 'fieldsToSend',
|
||||
type: 'fixedCollection',
|
||||
placeholder: 'Add field to send',
|
||||
typeOptions: {
|
||||
multipleValues: true,
|
||||
},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['tableRecord'],
|
||||
operation: ['create'],
|
||||
dataToSend: ['columns'],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Field',
|
||||
name: 'field',
|
||||
values: [
|
||||
{
|
||||
displayName: 'Field Name or ID',
|
||||
name: 'column',
|
||||
type: 'options',
|
||||
description:
|
||||
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getColumns',
|
||||
loadOptionsDependsOn: ['tableName'],
|
||||
},
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Field Value',
|
||||
name: 'value',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* tableRecord:getAll */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Table Name or ID',
|
||||
name: 'tableName',
|
||||
type: 'options',
|
||||
description:
|
||||
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getTables',
|
||||
},
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['tableRecord'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
displayName: 'Return All',
|
||||
name: 'returnAll',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['getAll'],
|
||||
resource: ['tableRecord'],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
description: 'Whether to return all results or only up to a given limit',
|
||||
},
|
||||
{
|
||||
displayName: 'Limit',
|
||||
name: 'limit',
|
||||
type: 'number',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['getAll'],
|
||||
resource: ['tableRecord'],
|
||||
returnAll: [false],
|
||||
},
|
||||
},
|
||||
typeOptions: {
|
||||
minValue: 1,
|
||||
maxValue: 500,
|
||||
},
|
||||
default: 50,
|
||||
description: 'Max number of results to return',
|
||||
},
|
||||
{
|
||||
displayName: 'Options',
|
||||
name: 'options',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Field',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['tableRecord'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Exclude Reference Link',
|
||||
name: 'sysparm_exclude_reference_link',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to exclude Table API links for reference fields',
|
||||
},
|
||||
{
|
||||
displayName: 'Field Names or IDs',
|
||||
name: 'sysparm_fields',
|
||||
type: 'multiOptions',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getColumns',
|
||||
loadOptionsDependsOn: ['tableName'],
|
||||
},
|
||||
default: [],
|
||||
description:
|
||||
'A list of fields to return. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
hint: 'String of comma separated values or an array of strings can be set in an expression',
|
||||
},
|
||||
{
|
||||
displayName: 'Filter',
|
||||
name: 'sysparm_query',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description:
|
||||
'An encoded query string used to filter the results. <a href="https://developer.servicenow.com/dev.do#!/learn/learning-plans/quebec/servicenow_application_developer/app_store_learnv2_rest_quebec_more_about_query_parameters">More info</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Return Values',
|
||||
name: 'sysparm_display_value',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Actual Values',
|
||||
value: 'false',
|
||||
},
|
||||
{
|
||||
name: 'Both',
|
||||
value: 'all',
|
||||
},
|
||||
{
|
||||
name: 'Display Values',
|
||||
value: 'true',
|
||||
},
|
||||
],
|
||||
default: 'false',
|
||||
description: 'Choose which values to return',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* tableRecord:get/delete */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Table Name or ID',
|
||||
name: 'tableName',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getTables',
|
||||
},
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['tableRecord'],
|
||||
operation: ['delete', 'get'],
|
||||
},
|
||||
},
|
||||
required: true,
|
||||
description:
|
||||
'Name of the table in which the record exists. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Table Record ID',
|
||||
name: 'id',
|
||||
type: 'string',
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['tableRecord'],
|
||||
operation: ['delete', 'get'],
|
||||
},
|
||||
},
|
||||
required: true,
|
||||
description: 'Unique identifier of the record',
|
||||
},
|
||||
{
|
||||
displayName: 'Options',
|
||||
name: 'options',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Field',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['tableRecord'],
|
||||
operation: ['get'],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Exclude Reference Link',
|
||||
name: 'sysparm_exclude_reference_link',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to exclude Table API links for reference fields',
|
||||
},
|
||||
{
|
||||
displayName: 'Field Names or IDs',
|
||||
name: 'sysparm_fields',
|
||||
type: 'multiOptions',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getColumns',
|
||||
loadOptionsDependsOn: ['tableName'],
|
||||
},
|
||||
default: [],
|
||||
description:
|
||||
'A list of fields to return. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
hint: 'String of comma separated values or an array of strings can be set in an expression',
|
||||
},
|
||||
{
|
||||
displayName: 'Return Values',
|
||||
name: 'sysparm_display_value',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Actual Values',
|
||||
value: 'false',
|
||||
},
|
||||
{
|
||||
name: 'Both',
|
||||
value: 'all',
|
||||
},
|
||||
{
|
||||
name: 'Display Values',
|
||||
value: 'true',
|
||||
},
|
||||
],
|
||||
default: 'false',
|
||||
description: 'Choose which values to return',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* tableRecord:update */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Table Name or ID',
|
||||
name: 'tableName',
|
||||
type: 'options',
|
||||
description:
|
||||
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getTables',
|
||||
},
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['tableRecord'],
|
||||
operation: ['update'],
|
||||
},
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
displayName: 'Table Record ID',
|
||||
name: 'id',
|
||||
type: 'string',
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['tableRecord'],
|
||||
operation: ['update'],
|
||||
},
|
||||
},
|
||||
required: true,
|
||||
description: 'Unique identifier of the record',
|
||||
},
|
||||
{
|
||||
displayName: 'Data to Send',
|
||||
name: 'dataToSend',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Auto-Map Input Data to Columns',
|
||||
value: 'mapInput',
|
||||
description: 'Use when node input names match destination field names',
|
||||
},
|
||||
{
|
||||
name: 'Define Below for Each Column',
|
||||
value: 'columns',
|
||||
description: 'Set the value for each destination column',
|
||||
},
|
||||
{
|
||||
name: 'Nothing',
|
||||
value: 'nothing',
|
||||
description: "Don't send any column data",
|
||||
},
|
||||
],
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['tableRecord'],
|
||||
operation: ['update'],
|
||||
},
|
||||
},
|
||||
default: 'columns',
|
||||
},
|
||||
{
|
||||
displayName: 'Inputs to Ignore',
|
||||
name: 'inputsToIgnore',
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['tableRecord'],
|
||||
operation: ['update'],
|
||||
dataToSend: ['mapInput'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description:
|
||||
'List of input properties to avoid sending, separated by commas. Leave empty to send all inputs.',
|
||||
},
|
||||
{
|
||||
displayName: 'Fields to Send',
|
||||
name: 'fieldsToSend',
|
||||
type: 'fixedCollection',
|
||||
placeholder: 'Add field to send',
|
||||
typeOptions: {
|
||||
multipleValues: true,
|
||||
},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['tableRecord'],
|
||||
operation: ['update'],
|
||||
dataToSend: ['columns'],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Field',
|
||||
name: 'field',
|
||||
values: [
|
||||
{
|
||||
displayName: 'Field Name or ID',
|
||||
name: 'column',
|
||||
type: 'options',
|
||||
description:
|
||||
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getColumns',
|
||||
loadOptionsDependsOn: ['tableName'],
|
||||
},
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Field Value',
|
||||
name: 'value',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,687 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const userOperations: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['user'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Create',
|
||||
value: 'create',
|
||||
action: 'Create a user',
|
||||
},
|
||||
{
|
||||
name: 'Delete',
|
||||
value: 'delete',
|
||||
action: 'Delete a user',
|
||||
},
|
||||
{
|
||||
name: 'Get',
|
||||
value: 'get',
|
||||
action: 'Get a user',
|
||||
},
|
||||
{
|
||||
name: 'Get Many',
|
||||
value: 'getAll',
|
||||
action: 'Get many users',
|
||||
},
|
||||
{
|
||||
name: 'Update',
|
||||
value: 'update',
|
||||
action: 'Update a user',
|
||||
},
|
||||
],
|
||||
default: 'get',
|
||||
},
|
||||
];
|
||||
|
||||
export const userFields: INodeProperties[] = [
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* user:create */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
{
|
||||
displayName: 'Short Description',
|
||||
name: 'short_description',
|
||||
type: 'string',
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['user'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
required: true,
|
||||
description: 'Short description of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Additional Fields',
|
||||
name: 'additionalFields',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Field',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['user'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Active',
|
||||
name: 'active',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to activate the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Building',
|
||||
name: 'building',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'The Building address',
|
||||
},
|
||||
{
|
||||
displayName: 'City',
|
||||
name: 'city',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'City of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Company',
|
||||
name: 'company',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'The name of the company for the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Country',
|
||||
name: 'country',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Country of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Department',
|
||||
name: 'department',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Department of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Email',
|
||||
name: 'email',
|
||||
type: 'string',
|
||||
placeholder: 'name@email.com',
|
||||
default: '',
|
||||
description: 'The email address associated with the user',
|
||||
},
|
||||
{
|
||||
displayName: 'First Name',
|
||||
name: 'first_name',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'The first name of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Gender',
|
||||
name: 'gender',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'The gender of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Home Phone',
|
||||
name: 'home_phone',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Home phone of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Last Name',
|
||||
name: 'last_name',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'The last name of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Location',
|
||||
name: 'location',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Location of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Manager',
|
||||
name: 'manager',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Manager of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Middle Name',
|
||||
name: 'middle_name',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'The middle name of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Mobile Phone',
|
||||
name: 'mobile_phone',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Mobile phone number of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Password',
|
||||
name: 'user_password',
|
||||
type: 'string',
|
||||
typeOptions: { password: true },
|
||||
default: '',
|
||||
description: "The user's password",
|
||||
},
|
||||
{
|
||||
displayName: 'Password Needs Reset',
|
||||
name: 'password_needs_reset',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to require a password reset when the user logs in',
|
||||
},
|
||||
{
|
||||
displayName: 'Phone',
|
||||
name: 'phone',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'The main phone number of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Role Names or IDs',
|
||||
name: 'roles',
|
||||
type: 'multiOptions',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getUserRoles',
|
||||
},
|
||||
default: [],
|
||||
description:
|
||||
'Roles of the user. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Source',
|
||||
name: 'source',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'State',
|
||||
name: 'state',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'State for the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Street',
|
||||
name: 'street',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Street information for the user separated by comma',
|
||||
},
|
||||
{
|
||||
displayName: 'Username',
|
||||
name: 'user_name',
|
||||
type: 'string',
|
||||
default: '',
|
||||
// nodelinter-ignore-next-line
|
||||
description: 'A username associated with the user (e.g. user_name.123)',
|
||||
},
|
||||
{
|
||||
displayName: 'Zip Code',
|
||||
name: 'zip',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Zip code for the user',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* user:getAll */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Return All',
|
||||
name: 'returnAll',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['getAll'],
|
||||
resource: ['user'],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
description: 'Whether to return all results or only up to a given limit',
|
||||
},
|
||||
{
|
||||
displayName: 'Limit',
|
||||
name: 'limit',
|
||||
type: 'number',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['getAll'],
|
||||
resource: ['user'],
|
||||
returnAll: [false],
|
||||
},
|
||||
},
|
||||
typeOptions: {
|
||||
minValue: 1,
|
||||
maxValue: 500,
|
||||
},
|
||||
default: 50,
|
||||
description: 'Max number of results to return',
|
||||
},
|
||||
{
|
||||
displayName: 'Options',
|
||||
name: 'options',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Field',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['user'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Exclude Reference Link',
|
||||
name: 'sysparm_exclude_reference_link',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to exclude Table API links for reference fields',
|
||||
},
|
||||
{
|
||||
displayName: 'Field Names or IDs',
|
||||
name: 'sysparm_fields',
|
||||
type: 'multiOptions',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getColumns',
|
||||
loadOptionsDependsOn: ['operation'],
|
||||
},
|
||||
default: [],
|
||||
description:
|
||||
'A list of fields to return. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
hint: 'String of comma separated values or an array of strings can be set in an expression',
|
||||
},
|
||||
{
|
||||
displayName: 'Filter',
|
||||
name: 'sysparm_query',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description:
|
||||
'An encoded query string used to filter the results. <a href="https://developer.servicenow.com/dev.do#!/learn/learning-plans/quebec/servicenow_application_developer/app_store_learnv2_rest_quebec_more_about_query_parameters">More info</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Return Values',
|
||||
name: 'sysparm_display_value',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Actual Values',
|
||||
value: 'false',
|
||||
},
|
||||
{
|
||||
name: 'Both',
|
||||
value: 'all',
|
||||
},
|
||||
{
|
||||
name: 'Display Values',
|
||||
value: 'true',
|
||||
},
|
||||
],
|
||||
default: 'false',
|
||||
description: 'Choose which values to return',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* user:get/delete */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Retrieve Identifier',
|
||||
name: 'getOption',
|
||||
type: 'options',
|
||||
default: 'id',
|
||||
options: [
|
||||
{
|
||||
name: 'ID',
|
||||
value: 'id',
|
||||
},
|
||||
{
|
||||
name: 'Username',
|
||||
value: 'user_name',
|
||||
},
|
||||
],
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['user'],
|
||||
operation: ['get'],
|
||||
},
|
||||
},
|
||||
required: true,
|
||||
description: 'Unique identifier of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Username',
|
||||
name: 'user_name',
|
||||
type: 'string',
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['user'],
|
||||
operation: ['get'],
|
||||
getOption: ['user_name'],
|
||||
},
|
||||
},
|
||||
required: true,
|
||||
description: 'Unique identifier of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'User ID',
|
||||
name: 'id',
|
||||
type: 'string',
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['user'],
|
||||
operation: ['get'],
|
||||
getOption: ['id'],
|
||||
},
|
||||
},
|
||||
required: true,
|
||||
description: 'Unique identifier of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'User ID',
|
||||
name: 'id',
|
||||
type: 'string',
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['user'],
|
||||
operation: ['delete'],
|
||||
},
|
||||
},
|
||||
required: true,
|
||||
description: 'Unique identifier of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Options',
|
||||
name: 'options',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Field',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['user'],
|
||||
operation: ['get'],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Exclude Reference Link',
|
||||
name: 'sysparm_exclude_reference_link',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to exclude Table API links for reference fields',
|
||||
},
|
||||
{
|
||||
displayName: 'Field Names or IDs',
|
||||
name: 'sysparm_fields',
|
||||
type: 'multiOptions',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getColumns',
|
||||
loadOptionsDependsOn: ['operation'],
|
||||
},
|
||||
default: [],
|
||||
description:
|
||||
'A list of fields to return. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
hint: 'String of comma separated values or an array of strings can be set in an expression',
|
||||
},
|
||||
{
|
||||
displayName: 'Return Values',
|
||||
name: 'sysparm_display_value',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Actual Values',
|
||||
value: 'false',
|
||||
},
|
||||
{
|
||||
name: 'Both',
|
||||
value: 'all',
|
||||
},
|
||||
{
|
||||
name: 'Display Values',
|
||||
value: 'true',
|
||||
},
|
||||
],
|
||||
default: 'false',
|
||||
description: 'Choose which values to return',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* user:update */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'User ID',
|
||||
name: 'id',
|
||||
type: 'string',
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['user'],
|
||||
operation: ['update'],
|
||||
},
|
||||
},
|
||||
required: true,
|
||||
description: 'Unique identifier of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Update Fields',
|
||||
name: 'updateFields',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Field',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['user'],
|
||||
operation: ['update'],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Active',
|
||||
name: 'active',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to activate the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Building',
|
||||
name: 'building',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'The Building address',
|
||||
},
|
||||
{
|
||||
displayName: 'City',
|
||||
name: 'city',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'City of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Company',
|
||||
name: 'company',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'The name of the company for the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Country',
|
||||
name: 'country',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Country of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Department',
|
||||
name: 'department',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Department of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Email',
|
||||
name: 'email',
|
||||
type: 'string',
|
||||
placeholder: 'name@email.com',
|
||||
default: '',
|
||||
description: 'The email address associated with the user',
|
||||
},
|
||||
{
|
||||
displayName: 'First Name',
|
||||
name: 'first_name',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'The first name of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Gender',
|
||||
name: 'gender',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'The gender of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Home Phone',
|
||||
name: 'home_phone',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Home phone of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Last Name',
|
||||
name: 'last_name',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'The last name of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Location',
|
||||
name: 'location',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Location of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Manager',
|
||||
name: 'manager',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Manager of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Middle Name',
|
||||
name: 'middle_name',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'The middle name of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Mobile Phone',
|
||||
name: 'mobile_phone',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Mobile phone number of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Password',
|
||||
name: 'user_password',
|
||||
type: 'string',
|
||||
typeOptions: { password: true },
|
||||
default: '',
|
||||
description: "The user's password",
|
||||
},
|
||||
{
|
||||
displayName: 'Password Needs Reset',
|
||||
name: 'password_needs_reset',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to require a password reset when the user logs in',
|
||||
},
|
||||
{
|
||||
displayName: 'Phone',
|
||||
name: 'phone',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'The main phone number of the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Role Names or IDs',
|
||||
name: 'roles',
|
||||
type: 'multiOptions',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getUserRoles',
|
||||
},
|
||||
default: [],
|
||||
description:
|
||||
'Roles of the user. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Source',
|
||||
name: 'source',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'State',
|
||||
name: 'state',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'State for the user',
|
||||
},
|
||||
{
|
||||
displayName: 'Street',
|
||||
name: 'street',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Street information for the user separated by comma',
|
||||
},
|
||||
{
|
||||
displayName: 'Username',
|
||||
name: 'user_name',
|
||||
type: 'string',
|
||||
default: '',
|
||||
// nodelinter-ignore-next-line
|
||||
description: 'A username associated with the user (e.g. user_name.123)',
|
||||
},
|
||||
{
|
||||
displayName: 'Zip Code',
|
||||
name: 'zip',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Zip code for the user',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,123 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const userGroupOperations: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['userGroup'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Get Many',
|
||||
value: 'getAll',
|
||||
action: 'Get many user groups',
|
||||
},
|
||||
],
|
||||
default: 'getAll',
|
||||
},
|
||||
];
|
||||
|
||||
export const userGroupFields: INodeProperties[] = [
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* userGroup:getAll */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Return All',
|
||||
name: 'returnAll',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['getAll'],
|
||||
resource: ['userGroup'],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
description: 'Whether to return all results or only up to a given limit',
|
||||
},
|
||||
{
|
||||
displayName: 'Limit',
|
||||
name: 'limit',
|
||||
type: 'number',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['getAll'],
|
||||
resource: ['userGroup'],
|
||||
returnAll: [false],
|
||||
},
|
||||
},
|
||||
typeOptions: {
|
||||
minValue: 1,
|
||||
maxValue: 500,
|
||||
},
|
||||
default: 50,
|
||||
description: 'Max number of results to return',
|
||||
},
|
||||
{
|
||||
displayName: 'Options',
|
||||
name: 'options',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Field',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['userGroup'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Exclude Reference Link',
|
||||
name: 'sysparm_exclude_reference_link',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to exclude Table API links for reference fields',
|
||||
},
|
||||
{
|
||||
displayName: 'Field Names or IDs',
|
||||
name: 'sysparm_fields',
|
||||
type: 'multiOptions',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getColumns',
|
||||
},
|
||||
default: [],
|
||||
description:
|
||||
'A list of fields to return. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
hint: 'String of comma separated values or an array of strings can be set in an expression',
|
||||
},
|
||||
{
|
||||
displayName: 'Filter',
|
||||
name: 'sysparm_query',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description:
|
||||
'An encoded query string used to filter the results. <a href="https://developer.servicenow.com/dev.do#!/learn/learning-plans/quebec/servicenow_application_developer/app_store_learnv2_rest_quebec_more_about_query_parameters">More info</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Return Values',
|
||||
name: 'sysparm_display_value',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Actual Values',
|
||||
value: 'false',
|
||||
},
|
||||
{
|
||||
name: 'Both',
|
||||
value: 'all',
|
||||
},
|
||||
{
|
||||
name: 'Display Values',
|
||||
value: 'true',
|
||||
},
|
||||
],
|
||||
default: 'false',
|
||||
description: 'Choose which values to return',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,123 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const userRoleOperations: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['userRole'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Get Many',
|
||||
value: 'getAll',
|
||||
action: 'Get many user roles',
|
||||
},
|
||||
],
|
||||
default: 'getAll',
|
||||
},
|
||||
];
|
||||
|
||||
export const userRoleFields: INodeProperties[] = [
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* userRole:getAll */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Return All',
|
||||
name: 'returnAll',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['getAll'],
|
||||
resource: ['userRole'],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
description: 'Whether to return all results or only up to a given limit',
|
||||
},
|
||||
{
|
||||
displayName: 'Limit',
|
||||
name: 'limit',
|
||||
type: 'number',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['getAll'],
|
||||
resource: ['userRole'],
|
||||
returnAll: [false],
|
||||
},
|
||||
},
|
||||
typeOptions: {
|
||||
minValue: 1,
|
||||
maxValue: 500,
|
||||
},
|
||||
default: 50,
|
||||
description: 'Max number of results to return',
|
||||
},
|
||||
{
|
||||
displayName: 'Options',
|
||||
name: 'options',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Field',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['userRole'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Exclude Reference Link',
|
||||
name: 'sysparm_exclude_reference_link',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to exclude Table API links for reference fields',
|
||||
},
|
||||
{
|
||||
displayName: 'Field Names or IDs',
|
||||
name: 'sysparm_fields',
|
||||
type: 'multiOptions',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getColumns',
|
||||
},
|
||||
default: [],
|
||||
description:
|
||||
'A list of fields to return. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
hint: 'String of comma separated values or an array of strings can be set in an expression',
|
||||
},
|
||||
{
|
||||
displayName: 'Filter',
|
||||
name: 'sysparm_query',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description:
|
||||
'An encoded query string used to filter the results. <a href="https://developer.servicenow.com/dev.do#!/learn/learning-plans/quebec/servicenow_application_developer/app_store_learnv2_rest_quebec_more_about_query_parameters">More info</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Return Values',
|
||||
name: 'sysparm_display_value',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Actual Values',
|
||||
value: 'false',
|
||||
},
|
||||
{
|
||||
name: 'Both',
|
||||
value: 'all',
|
||||
},
|
||||
{
|
||||
name: 'Display Values',
|
||||
value: 'true',
|
||||
},
|
||||
],
|
||||
default: 'false',
|
||||
description: 'Choose which values to return',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,336 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action_status": {
|
||||
"type": "string"
|
||||
},
|
||||
"actions_taken": {
|
||||
"type": "string"
|
||||
},
|
||||
"active": {
|
||||
"type": "string"
|
||||
},
|
||||
"activity_due": {
|
||||
"type": "string"
|
||||
},
|
||||
"additional_assignee_list": {
|
||||
"type": "string"
|
||||
},
|
||||
"approval": {
|
||||
"type": "string"
|
||||
},
|
||||
"approval_history": {
|
||||
"type": "string"
|
||||
},
|
||||
"approval_set": {
|
||||
"type": "string"
|
||||
},
|
||||
"business_duration": {
|
||||
"type": "string"
|
||||
},
|
||||
"business_impact": {
|
||||
"type": "string"
|
||||
},
|
||||
"business_service": {
|
||||
"type": "string"
|
||||
},
|
||||
"business_stc": {
|
||||
"type": "string"
|
||||
},
|
||||
"calendar_duration": {
|
||||
"type": "string"
|
||||
},
|
||||
"calendar_stc": {
|
||||
"type": "string"
|
||||
},
|
||||
"category": {
|
||||
"type": "string"
|
||||
},
|
||||
"cause": {
|
||||
"type": "string"
|
||||
},
|
||||
"caused_by": {
|
||||
"type": "string"
|
||||
},
|
||||
"child_incidents": {
|
||||
"type": "string"
|
||||
},
|
||||
"close_code": {
|
||||
"type": "string"
|
||||
},
|
||||
"close_notes": {
|
||||
"type": "string"
|
||||
},
|
||||
"closed_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"closed_by": {
|
||||
"type": "string"
|
||||
},
|
||||
"cmdb_ci": {
|
||||
"type": "string"
|
||||
},
|
||||
"comments": {
|
||||
"type": "string"
|
||||
},
|
||||
"comments_and_work_notes": {
|
||||
"type": "string"
|
||||
},
|
||||
"contact_type": {
|
||||
"type": "string"
|
||||
},
|
||||
"contract": {
|
||||
"type": "string"
|
||||
},
|
||||
"correlation_display": {
|
||||
"type": "string"
|
||||
},
|
||||
"correlation_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"delivery_plan": {
|
||||
"type": "string"
|
||||
},
|
||||
"delivery_task": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"due_date": {
|
||||
"type": "string"
|
||||
},
|
||||
"escalation": {
|
||||
"type": "string"
|
||||
},
|
||||
"expected_start": {
|
||||
"type": "string"
|
||||
},
|
||||
"follow_up": {
|
||||
"type": "string"
|
||||
},
|
||||
"group_list": {
|
||||
"type": "string"
|
||||
},
|
||||
"hold_reason": {
|
||||
"type": "string"
|
||||
},
|
||||
"impact": {
|
||||
"type": "string"
|
||||
},
|
||||
"incident_state": {
|
||||
"type": "string"
|
||||
},
|
||||
"knowledge": {
|
||||
"type": "string"
|
||||
},
|
||||
"lessons_learned": {
|
||||
"type": "string"
|
||||
},
|
||||
"location": {
|
||||
"type": "string"
|
||||
},
|
||||
"made_sla": {
|
||||
"type": "string"
|
||||
},
|
||||
"major_incident_state": {
|
||||
"type": "string"
|
||||
},
|
||||
"needs_attention": {
|
||||
"type": "string"
|
||||
},
|
||||
"notify": {
|
||||
"type": "string"
|
||||
},
|
||||
"number": {
|
||||
"type": "string"
|
||||
},
|
||||
"opened_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"opened_by": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"link": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"order": {
|
||||
"type": "string"
|
||||
},
|
||||
"origin_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"origin_table": {
|
||||
"type": "string"
|
||||
},
|
||||
"overview": {
|
||||
"type": "string"
|
||||
},
|
||||
"parent": {
|
||||
"type": "string"
|
||||
},
|
||||
"parent_incident": {
|
||||
"type": "string"
|
||||
},
|
||||
"priority": {
|
||||
"type": "string"
|
||||
},
|
||||
"problem_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"promoted_by": {
|
||||
"type": "string"
|
||||
},
|
||||
"promoted_on": {
|
||||
"type": "string"
|
||||
},
|
||||
"proposed_by": {
|
||||
"type": "string"
|
||||
},
|
||||
"proposed_on": {
|
||||
"type": "string"
|
||||
},
|
||||
"reassignment_count": {
|
||||
"type": "string"
|
||||
},
|
||||
"reopen_count": {
|
||||
"type": "string"
|
||||
},
|
||||
"reopened_by": {
|
||||
"type": "string"
|
||||
},
|
||||
"reopened_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"resolved_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"rfc": {
|
||||
"type": "string"
|
||||
},
|
||||
"route_reason": {
|
||||
"type": "string"
|
||||
},
|
||||
"service_offering": {
|
||||
"type": "string"
|
||||
},
|
||||
"severity": {
|
||||
"type": "string"
|
||||
},
|
||||
"short_description": {
|
||||
"type": "string"
|
||||
},
|
||||
"skills": {
|
||||
"type": "string"
|
||||
},
|
||||
"sla_due": {
|
||||
"type": "string"
|
||||
},
|
||||
"state": {
|
||||
"type": "string"
|
||||
},
|
||||
"subcategory": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_class_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_created_by": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_created_on": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_domain": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"link": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"sys_domain_path": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_mod_count": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_tags": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_updated_by": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_updated_on": {
|
||||
"type": "string"
|
||||
},
|
||||
"task_effective_number": {
|
||||
"type": "string"
|
||||
},
|
||||
"task_for": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"link": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"time_worked": {
|
||||
"type": "string"
|
||||
},
|
||||
"timeline": {
|
||||
"type": "string"
|
||||
},
|
||||
"trigger_rule": {
|
||||
"type": "string"
|
||||
},
|
||||
"universal_request": {
|
||||
"type": "string"
|
||||
},
|
||||
"upon_approval": {
|
||||
"type": "string"
|
||||
},
|
||||
"upon_reject": {
|
||||
"type": "string"
|
||||
},
|
||||
"urgency": {
|
||||
"type": "string"
|
||||
},
|
||||
"user_input": {
|
||||
"type": "string"
|
||||
},
|
||||
"watch_list": {
|
||||
"type": "string"
|
||||
},
|
||||
"work_end": {
|
||||
"type": "string"
|
||||
},
|
||||
"work_notes": {
|
||||
"type": "string"
|
||||
},
|
||||
"work_notes_list": {
|
||||
"type": "string"
|
||||
},
|
||||
"work_start": {
|
||||
"type": "string"
|
||||
},
|
||||
"x_caci_sg_meraki_device_alert": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,230 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active": {
|
||||
"type": "string"
|
||||
},
|
||||
"activity_due": {
|
||||
"type": "string"
|
||||
},
|
||||
"additional_assignee_list": {
|
||||
"type": "string"
|
||||
},
|
||||
"approval": {
|
||||
"type": "string"
|
||||
},
|
||||
"approval_history": {
|
||||
"type": "string"
|
||||
},
|
||||
"approval_set": {
|
||||
"type": "string"
|
||||
},
|
||||
"business_duration": {
|
||||
"type": "string"
|
||||
},
|
||||
"business_impact": {
|
||||
"type": "string"
|
||||
},
|
||||
"business_stc": {
|
||||
"type": "string"
|
||||
},
|
||||
"calendar_duration": {
|
||||
"type": "string"
|
||||
},
|
||||
"calendar_stc": {
|
||||
"type": "string"
|
||||
},
|
||||
"caller_id": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"link": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"cause": {
|
||||
"type": "string"
|
||||
},
|
||||
"caused_by": {
|
||||
"type": "string"
|
||||
},
|
||||
"close_notes": {
|
||||
"type": "string"
|
||||
},
|
||||
"closed_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"comments": {
|
||||
"type": "string"
|
||||
},
|
||||
"comments_and_work_notes": {
|
||||
"type": "string"
|
||||
},
|
||||
"correlation_display": {
|
||||
"type": "string"
|
||||
},
|
||||
"correlation_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"due_date": {
|
||||
"type": "string"
|
||||
},
|
||||
"escalation": {
|
||||
"type": "string"
|
||||
},
|
||||
"expected_start": {
|
||||
"type": "string"
|
||||
},
|
||||
"follow_up": {
|
||||
"type": "string"
|
||||
},
|
||||
"group_list": {
|
||||
"type": "string"
|
||||
},
|
||||
"hold_reason": {
|
||||
"type": "string"
|
||||
},
|
||||
"impact": {
|
||||
"type": "string"
|
||||
},
|
||||
"knowledge": {
|
||||
"type": "string"
|
||||
},
|
||||
"made_sla": {
|
||||
"type": "string"
|
||||
},
|
||||
"notify": {
|
||||
"type": "string"
|
||||
},
|
||||
"opened_by": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"link": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"order": {
|
||||
"type": "string"
|
||||
},
|
||||
"origin_table": {
|
||||
"type": "string"
|
||||
},
|
||||
"parent": {
|
||||
"type": "string"
|
||||
},
|
||||
"reassignment_count": {
|
||||
"type": "string"
|
||||
},
|
||||
"reopen_count": {
|
||||
"type": "string"
|
||||
},
|
||||
"reopened_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"resolved_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"resolved_by": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"link": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"route_reason": {
|
||||
"type": "string"
|
||||
},
|
||||
"severity": {
|
||||
"type": "string"
|
||||
},
|
||||
"sla_due": {
|
||||
"type": "string"
|
||||
},
|
||||
"state": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_class_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_created_by": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_created_on": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_domain": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"link": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"sys_domain_path": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_mod_count": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_tags": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_updated_by": {
|
||||
"type": "string"
|
||||
},
|
||||
"task_effective_number": {
|
||||
"type": "string"
|
||||
},
|
||||
"time_worked": {
|
||||
"type": "string"
|
||||
},
|
||||
"universal_request": {
|
||||
"type": "string"
|
||||
},
|
||||
"upon_approval": {
|
||||
"type": "string"
|
||||
},
|
||||
"upon_reject": {
|
||||
"type": "string"
|
||||
},
|
||||
"urgency": {
|
||||
"type": "string"
|
||||
},
|
||||
"user_input": {
|
||||
"type": "string"
|
||||
},
|
||||
"watch_list": {
|
||||
"type": "string"
|
||||
},
|
||||
"work_end": {
|
||||
"type": "string"
|
||||
},
|
||||
"work_notes": {
|
||||
"type": "string"
|
||||
},
|
||||
"work_notes_list": {
|
||||
"type": "string"
|
||||
},
|
||||
"work_start": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"version": 2
|
||||
}
|
||||
+211
@@ -0,0 +1,211 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active": {
|
||||
"type": "string"
|
||||
},
|
||||
"activity_due": {
|
||||
"type": "string"
|
||||
},
|
||||
"additional_assignee_list": {
|
||||
"type": "string"
|
||||
},
|
||||
"approval": {
|
||||
"type": "string"
|
||||
},
|
||||
"approval_history": {
|
||||
"type": "string"
|
||||
},
|
||||
"approval_set": {
|
||||
"type": "string"
|
||||
},
|
||||
"assigned_to": {
|
||||
"type": "string"
|
||||
},
|
||||
"business_duration": {
|
||||
"type": "string"
|
||||
},
|
||||
"business_service": {
|
||||
"type": "string"
|
||||
},
|
||||
"calendar_duration": {
|
||||
"type": "string"
|
||||
},
|
||||
"close_notes": {
|
||||
"type": "string"
|
||||
},
|
||||
"closed_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"closed_by": {
|
||||
"type": "string"
|
||||
},
|
||||
"cmdb_ci": {
|
||||
"type": "string"
|
||||
},
|
||||
"comments": {
|
||||
"type": "string"
|
||||
},
|
||||
"comments_and_work_notes": {
|
||||
"type": "string"
|
||||
},
|
||||
"contact_type": {
|
||||
"type": "string"
|
||||
},
|
||||
"contract": {
|
||||
"type": "string"
|
||||
},
|
||||
"correlation_display": {
|
||||
"type": "string"
|
||||
},
|
||||
"correlation_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"due_date": {
|
||||
"type": "string"
|
||||
},
|
||||
"escalation": {
|
||||
"type": "string"
|
||||
},
|
||||
"expected_start": {
|
||||
"type": "string"
|
||||
},
|
||||
"follow_up": {
|
||||
"type": "string"
|
||||
},
|
||||
"group_list": {
|
||||
"type": "string"
|
||||
},
|
||||
"impact": {
|
||||
"type": "string"
|
||||
},
|
||||
"knowledge": {
|
||||
"type": "string"
|
||||
},
|
||||
"location": {
|
||||
"type": "string"
|
||||
},
|
||||
"made_sla": {
|
||||
"type": "string"
|
||||
},
|
||||
"number": {
|
||||
"type": "string"
|
||||
},
|
||||
"opened_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"opened_by": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"link": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"order": {
|
||||
"type": "string"
|
||||
},
|
||||
"parent": {
|
||||
"type": "string"
|
||||
},
|
||||
"priority": {
|
||||
"type": "string"
|
||||
},
|
||||
"reassignment_count": {
|
||||
"type": "string"
|
||||
},
|
||||
"route_reason": {
|
||||
"type": "string"
|
||||
},
|
||||
"service_offering": {
|
||||
"type": "string"
|
||||
},
|
||||
"short_description": {
|
||||
"type": "string"
|
||||
},
|
||||
"sla_due": {
|
||||
"type": "string"
|
||||
},
|
||||
"state": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_class_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_created_by": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_created_on": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_domain": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"link": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"sys_domain_path": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_mod_count": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_tags": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_updated_by": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_updated_on": {
|
||||
"type": "string"
|
||||
},
|
||||
"task_effective_number": {
|
||||
"type": "string"
|
||||
},
|
||||
"universal_request": {
|
||||
"type": "string"
|
||||
},
|
||||
"upon_approval": {
|
||||
"type": "string"
|
||||
},
|
||||
"upon_reject": {
|
||||
"type": "string"
|
||||
},
|
||||
"urgency": {
|
||||
"type": "string"
|
||||
},
|
||||
"user_input": {
|
||||
"type": "string"
|
||||
},
|
||||
"watch_list": {
|
||||
"type": "string"
|
||||
},
|
||||
"work_end": {
|
||||
"type": "string"
|
||||
},
|
||||
"work_notes": {
|
||||
"type": "string"
|
||||
},
|
||||
"work_notes_list": {
|
||||
"type": "string"
|
||||
},
|
||||
"work_start": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"state": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_class_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_created_by": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_created_on": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_mod_count": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_tags": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_updated_by": {
|
||||
"type": "string"
|
||||
},
|
||||
"sys_updated_on": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"version": 4
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"sys_domain": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"link": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#fff" fill-rule="evenodd" stroke="#000" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 66 59"><use xlink:href="#a" x=".5" y=".5"/><symbol id="a" overflow="visible"><path fill="#81b5a1" stroke="none" d="M32.196 0A32.27 32.27 0 0 0 2.312 20.275 32.27 32.27 0 0 0 9.95 55.571a6.346 6.346 0 0 0 8.264.43 23.03 23.03 0 0 1 27.445 0 6.364 6.364 0 0 0 8.389-.43A32.27 32.27 0 0 0 32.196 0m-.18 48.275a15.63 15.63 0 0 1-16.133-16.026 16.043 16.043 0 1 1 32.069 0c.115 4.284-1.537 8.428-4.568 11.458s-7.174 4.682-11.458 4.568"/></symbol></svg>
|
||||
|
After Width: | Height: | Size: 636 B |
Reference in New Issue
Block a user