2022-02-21 13:32:38 +00:00
|
|
|
import { gql } from "@apollo/client";
|
2020-07-22 10:54:15 +00:00
|
|
|
|
|
|
|
export const appCreateMutation = gql`
|
|
|
|
mutation AppCreate($input: AppInput!) {
|
|
|
|
appCreate(input: $input) {
|
|
|
|
authToken
|
|
|
|
app {
|
2022-03-09 08:56:55 +00:00
|
|
|
...App
|
2020-07-22 10:54:15 +00:00
|
|
|
}
|
2021-04-26 07:49:55 +00:00
|
|
|
errors {
|
2022-03-09 08:56:55 +00:00
|
|
|
...AppError
|
2020-07-22 10:54:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const appDeleteMutation = gql`
|
|
|
|
mutation AppDelete($id: ID!) {
|
|
|
|
appDelete(id: $id) {
|
|
|
|
app {
|
2022-03-09 08:56:55 +00:00
|
|
|
...App
|
2020-07-22 10:54:15 +00:00
|
|
|
}
|
2021-04-26 07:49:55 +00:00
|
|
|
errors {
|
2022-03-09 08:56:55 +00:00
|
|
|
...AppError
|
2020-07-22 10:54:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const appDeleteFailedInstallationMutation = gql`
|
|
|
|
mutation AppDeleteFailedInstallation($id: ID!) {
|
|
|
|
appDeleteFailedInstallation(id: $id) {
|
|
|
|
appInstallation {
|
|
|
|
id
|
|
|
|
status
|
|
|
|
appName
|
|
|
|
message
|
|
|
|
}
|
2021-04-26 07:49:55 +00:00
|
|
|
errors {
|
2022-03-09 08:56:55 +00:00
|
|
|
...AppError
|
2020-07-22 10:54:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const appFetchMutation = gql`
|
|
|
|
mutation AppFetch($manifestUrl: String!) {
|
|
|
|
appFetchManifest(manifestUrl: $manifestUrl) {
|
|
|
|
manifest {
|
|
|
|
identifier
|
|
|
|
version
|
|
|
|
about
|
|
|
|
name
|
|
|
|
appUrl
|
|
|
|
configurationUrl
|
|
|
|
tokenTargetUrl
|
|
|
|
dataPrivacy
|
|
|
|
dataPrivacyUrl
|
|
|
|
homepageUrl
|
|
|
|
supportUrl
|
|
|
|
permissions {
|
|
|
|
code
|
|
|
|
name
|
|
|
|
}
|
|
|
|
}
|
2021-04-26 07:49:55 +00:00
|
|
|
errors {
|
2022-03-09 08:56:55 +00:00
|
|
|
...AppError
|
2020-07-22 10:54:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const appInstallMutation = gql`
|
|
|
|
mutation AppInstall($input: AppInstallInput!) {
|
|
|
|
appInstall(input: $input) {
|
|
|
|
appInstallation {
|
|
|
|
id
|
|
|
|
status
|
|
|
|
appName
|
|
|
|
manifestUrl
|
|
|
|
}
|
2021-04-26 07:49:55 +00:00
|
|
|
errors {
|
2022-03-09 08:56:55 +00:00
|
|
|
...AppError
|
2020-07-22 10:54:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const appRetryInstallMutation = gql`
|
|
|
|
mutation AppRetryInstall($id: ID!) {
|
|
|
|
appRetryInstall(id: $id) {
|
|
|
|
appInstallation {
|
|
|
|
id
|
|
|
|
status
|
|
|
|
appName
|
|
|
|
manifestUrl
|
|
|
|
}
|
2021-04-26 07:49:55 +00:00
|
|
|
errors {
|
2022-03-09 08:56:55 +00:00
|
|
|
...AppError
|
2020-07-22 10:54:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const appUpdateMutation = gql`
|
|
|
|
mutation AppUpdate($id: ID!, $input: AppInput!) {
|
|
|
|
appUpdate(id: $id, input: $input) {
|
|
|
|
app {
|
2022-03-09 08:56:55 +00:00
|
|
|
...App
|
2020-07-22 10:54:15 +00:00
|
|
|
permissions {
|
|
|
|
code
|
|
|
|
name
|
|
|
|
}
|
|
|
|
}
|
2021-04-26 07:49:55 +00:00
|
|
|
errors {
|
2022-03-09 08:56:55 +00:00
|
|
|
...AppError
|
2020-07-22 10:54:15 +00:00
|
|
|
message
|
|
|
|
permissions
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const appTokenCreateMutation = gql`
|
|
|
|
mutation AppTokenCreate($input: AppTokenInput!) {
|
|
|
|
appTokenCreate(input: $input) {
|
|
|
|
appToken {
|
|
|
|
name
|
|
|
|
authToken
|
|
|
|
id
|
|
|
|
}
|
|
|
|
authToken
|
2021-04-26 07:49:55 +00:00
|
|
|
errors {
|
2022-03-09 08:56:55 +00:00
|
|
|
...AppError
|
2020-07-22 10:54:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const appTokenDeleteMutation = gql`
|
|
|
|
mutation AppTokenDelete($id: ID!) {
|
|
|
|
appTokenDelete(id: $id) {
|
|
|
|
appToken {
|
|
|
|
name
|
|
|
|
authToken
|
|
|
|
id
|
|
|
|
}
|
2021-04-26 07:49:55 +00:00
|
|
|
errors {
|
2022-03-09 08:56:55 +00:00
|
|
|
...AppError
|
2021-04-26 07:49:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const appActivateMutation = gql`
|
|
|
|
mutation AppActivate($id: ID!) {
|
|
|
|
appActivate(id: $id) {
|
|
|
|
errors {
|
2022-03-09 08:56:55 +00:00
|
|
|
...AppError
|
2021-04-26 07:49:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const appDeactivateMutation = gql`
|
|
|
|
mutation AppDeactivate($id: ID!) {
|
|
|
|
appDeactivate(id: $id) {
|
|
|
|
errors {
|
2022-03-09 08:56:55 +00:00
|
|
|
...AppError
|
2020-07-22 10:54:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|