mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-26 21:19:43 -08:00
4cf8055224
* ⚡ Add Kitemaker node * ⚡ Require status ID for workItem:create * ✏️ Reword button text * ⚡ Add credentials file * ⚡ Implement pagination * ⚡ Improvements * ⚡ Remove not needed parameter Co-authored-by: ricardo <ricardoespinoza105@gmail.com> Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
200 lines
2.1 KiB
TypeScript
200 lines
2.1 KiB
TypeScript
// ----------------------------------
|
|
// queries
|
|
// ----------------------------------
|
|
|
|
export const getAllSpaces = `
|
|
query {
|
|
organization {
|
|
spaces {
|
|
id
|
|
name
|
|
labels {
|
|
id
|
|
name
|
|
color
|
|
}
|
|
statuses {
|
|
id
|
|
name
|
|
type
|
|
default
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const getAllUsers = `
|
|
query {
|
|
organization {
|
|
users {
|
|
id
|
|
username
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const getLabels = `
|
|
query {
|
|
organization {
|
|
spaces {
|
|
labels {
|
|
id
|
|
name
|
|
color
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const getOrganization = `
|
|
query {
|
|
organization {
|
|
id
|
|
name
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const getSpaces = `
|
|
query {
|
|
organization {
|
|
spaces {
|
|
id
|
|
name
|
|
labels {
|
|
id
|
|
name
|
|
color
|
|
}
|
|
statuses {
|
|
id
|
|
name
|
|
type
|
|
default
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const getStatuses = `
|
|
query {
|
|
organization {
|
|
spaces {
|
|
statuses {
|
|
id
|
|
name
|
|
type
|
|
default
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const getUsers = `
|
|
query {
|
|
organization {
|
|
users {
|
|
id
|
|
username
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const getWorkItems = `
|
|
query($spaceId: ID!) {
|
|
workItems(spaceId: $spaceId) {
|
|
workItems {
|
|
id
|
|
title
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const getWorkItem = `
|
|
query($workItemId: ID!) {
|
|
workItem(id: $workItemId) {
|
|
id
|
|
number
|
|
title
|
|
description
|
|
status {
|
|
id
|
|
name
|
|
}
|
|
sort
|
|
members {
|
|
id
|
|
username
|
|
}
|
|
watchers {
|
|
id
|
|
username
|
|
}
|
|
labels {
|
|
id
|
|
name
|
|
}
|
|
comments {
|
|
id
|
|
actor {
|
|
__typename
|
|
}
|
|
body
|
|
threadId
|
|
updatedAt
|
|
createdAt
|
|
}
|
|
effort
|
|
impact
|
|
updatedAt
|
|
createdAt
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const getAllWorkItems = `
|
|
query($spaceId: ID!, $cursor: String) {
|
|
workItems(spaceId: $spaceId, cursor: $cursor) {
|
|
hasMore,
|
|
cursor,
|
|
workItems {
|
|
id
|
|
title
|
|
description
|
|
labels {
|
|
id
|
|
}
|
|
comments {
|
|
id
|
|
body
|
|
actor {
|
|
... on User {
|
|
id
|
|
username
|
|
}
|
|
... on IntegrationUser {
|
|
id
|
|
externalName
|
|
}
|
|
... on Integration {
|
|
id
|
|
type
|
|
}
|
|
... on Application {
|
|
id
|
|
name
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`;
|