2020-09-07 08:56:14 -07:00
import {
INodeProperties ,
} from 'n8n-workflow' ;
2021-12-03 00:44:16 -08:00
export const issueOperations : INodeProperties [ ] = [
2020-09-07 08:56:14 -07:00
{
displayName : 'Operation' ,
name : 'operation' ,
type : 'options' ,
2022-05-20 14:47:24 -07:00
noDataExpression : true ,
2020-09-07 08:56:14 -07:00
displayOptions : {
show : {
resource : [
'issue' ,
] ,
} ,
} ,
options : [
{
name : 'Delete' ,
value : 'delete' ,
description : 'Delete an issue' ,
} ,
{
name : 'Get' ,
value : 'get' ,
description : 'Get issue by ID' ,
} ,
{
name : 'Get All' ,
value : 'getAll' ,
description : 'Get all issues' ,
} ,
{
name : 'Update' ,
value : 'update' ,
description : 'Update an issue' ,
} ,
] ,
default : 'get' ,
} ,
2021-12-03 00:44:16 -08:00
] ;
2020-09-07 08:56:14 -07:00
2021-12-03 00:44:16 -08:00
export const issueFields : INodeProperties [ ] = [
2020-09-07 08:56:14 -07:00
/* -------------------------------------------------------------------------- */
/* issue:get/delete */
/* -------------------------------------------------------------------------- */
{
displayName : 'Issue ID' ,
name : 'issueId' ,
type : 'string' ,
default : '' ,
placeholder : '1234' ,
displayOptions : {
show : {
resource : [
'issue' ,
] ,
operation : [
'get' ,
'delete' ,
] ,
} ,
} ,
required : true ,
2022-05-06 14:01:25 -07:00
description : 'ID of issue to get' ,
2020-09-07 08:56:14 -07:00
} ,
2021-04-23 15:38:15 -07:00
2020-09-07 08:56:14 -07:00
/* -------------------------------------------------------------------------- */
/* issue:getAll */
/* -------------------------------------------------------------------------- */
{
2022-06-03 10:23:49 -07:00
displayName : 'Organization Slug Name or ID' ,
2020-09-07 08:56:14 -07:00
name : 'organizationSlug' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getOrganizations' ,
} ,
default : '' ,
displayOptions : {
show : {
resource : [
'issue' ,
] ,
operation : [
'getAll' ,
] ,
} ,
} ,
required : true ,
2022-06-03 10:23:49 -07:00
description : 'The slug of the organization the issues belong to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.' ,
2020-09-07 08:56:14 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Project Slug Name or ID' ,
2020-09-07 08:56:14 -07:00
name : 'projectSlug' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getProjects' ,
loadOptionsDependsOn : [
'organizationSlug' ,
] ,
} ,
default : '' ,
displayOptions : {
show : {
resource : [
'issue' ,
] ,
operation : [
'getAll' ,
] ,
} ,
} ,
required : true ,
2022-06-03 10:23:49 -07:00
description : 'The slug of the project the issues belong to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.' ,
2020-09-07 08:56:14 -07:00
} ,
{
displayName : 'Return All' ,
name : 'returnAll' ,
type : 'boolean' ,
displayOptions : {
show : {
operation : [
'getAll' ,
] ,
resource : [
'issue' ,
] ,
} ,
} ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether to return all results or only up to a given limit' ,
2020-09-07 08:56:14 -07:00
} ,
{
displayName : 'Limit' ,
name : 'limit' ,
type : 'number' ,
displayOptions : {
show : {
operation : [
'getAll' ,
] ,
resource : [
'issue' ,
] ,
returnAll : [
false ,
] ,
} ,
} ,
typeOptions : {
minValue : 1 ,
maxValue : 500 ,
} ,
default : 100 ,
2022-05-06 14:01:25 -07:00
description : 'Max number of results to return' ,
2020-09-07 08:56:14 -07:00
} ,
{
displayName : 'Additional Fields' ,
name : 'additionalFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
resource : [
'issue' ,
] ,
operation : [
'getAll' ,
] ,
} ,
} ,
options : [
2021-03-21 04:19:15 -07:00
{
displayName : 'Query' ,
name : 'query' ,
type : 'string' ,
default : '' ,
2021-08-26 10:42:38 -07:00
description : 'An optional Sentry structured search query. If not provided, an implied "is:unresolved" is assumed. Info <a href="https://docs.sentry.io/product/sentry-basics/search/">here</a>.' ,
2021-03-21 04:19:15 -07:00
} ,
2020-09-07 08:56:14 -07:00
{
displayName : 'Stats Period' ,
name : 'statsPeriod' ,
type : 'options' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Time period of stats' ,
2020-09-07 08:56:14 -07:00
options : [
{
name : '14 Days' ,
2020-10-22 06:46:03 -07:00
value : '14d' ,
2020-09-07 08:56:14 -07:00
} ,
{
name : '24 Hours' ,
2020-10-22 06:46:03 -07:00
value : '24h' ,
2020-09-07 08:56:14 -07:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-09-07 08:56:14 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Short ID Lookup' ,
2020-09-07 08:56:14 -07:00
name : 'shortIdLookUp' ,
type : 'boolean' ,
default : true ,
2021-04-23 15:37:37 -07:00
description : 'If this is set to true then short IDs are looked up by this function as well. This can cause the return value of the function to return an event issue of a different project which is why this is an opt-in.' ,
2020-09-07 08:56:14 -07:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-09-07 08:56:14 -07:00
} ,
2021-04-23 15:38:15 -07:00
2020-09-07 08:56:14 -07:00
/* -------------------------------------------------------------------------- */
/* issue:update */
/* -------------------------------------------------------------------------- */
{
displayName : 'Issue ID' ,
name : 'issueId' ,
type : 'string' ,
default : '' ,
placeholder : '1234' ,
displayOptions : {
show : {
resource : [
'issue' ,
] ,
operation : [
'update' ,
] ,
} ,
} ,
required : true ,
2022-05-06 14:01:25 -07:00
description : 'ID of issue to get' ,
2020-09-07 08:56:14 -07:00
} ,
{
2021-04-23 15:37:37 -07:00
displayName : 'Update Fields' ,
2020-09-07 08:56:14 -07:00
name : 'additionalFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
resource : [
'issue' ,
] ,
operation : [
'update' ,
] ,
} ,
} ,
options : [
{
2022-06-03 10:23:49 -07:00
displayName : 'Assigned To' ,
2020-09-07 08:56:14 -07:00
name : 'assignedTo' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The actor ID (or username) of the user or team that should be assigned to this issue' ,
2020-09-07 08:56:14 -07:00
} ,
{
displayName : 'Has Seen' ,
name : 'hasSeen' ,
type : 'boolean' ,
default : true ,
2022-05-06 14:01:25 -07:00
description : 'In case this API call is invoked with a user context this allows changing of the flag that indicates if the user has seen the event' ,
2020-09-07 08:56:14 -07:00
} ,
{
displayName : 'Is Bookmarked' ,
name : 'isBookmarked' ,
type : 'boolean' ,
default : true ,
2022-05-06 14:01:25 -07:00
description : 'In case this API call is invoked with a user context this allows changing of the bookmark flag' ,
2020-09-07 08:56:14 -07:00
} ,
{
displayName : 'Is Public' ,
name : 'isPublic' ,
type : 'boolean' ,
default : true ,
2022-05-06 14:01:25 -07:00
description : 'Sets the issue to public or private' ,
2020-09-07 08:56:14 -07:00
} ,
{
displayName : 'Is Subscribed' ,
name : 'isSubscribed' ,
type : 'boolean' ,
default : true ,
} ,
{
displayName : 'Status' ,
name : 'status' ,
type : 'options' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The new status for the issue' ,
2020-09-07 08:56:14 -07:00
options : [
{
name : 'Ignored' ,
2020-10-22 06:46:03 -07:00
value : 'ignored' ,
2020-09-07 08:56:14 -07:00
} ,
{
name : 'Resolved' ,
2020-10-22 06:46:03 -07:00
value : 'resolved' ,
2020-09-07 08:56:14 -07:00
} ,
{
name : 'Resolved Next Release' ,
2020-10-22 06:46:03 -07:00
value : 'resolvedInNextRelease' ,
2020-09-07 08:56:14 -07:00
} ,
{
name : 'Unresolved' ,
2020-10-22 06:46:03 -07:00
value : 'unresolved' ,
2020-09-07 08:56:14 -07:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-09-07 08:56:14 -07:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-09-07 08:56:14 -07:00
} ,
2021-12-03 00:44:16 -08:00
] ;