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 {
|
2023-01-10 10:04:30 +00:00
|
|
|
...AppManifest
|
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 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
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
2023-07-03 12:50:53 +00:00
|
|
|
|
|
|
|
export const appUpdatePermissions = gql`
|
|
|
|
mutation AppUpdatePermissions($id: ID!, $permissions: [PermissionEnum!]!) {
|
|
|
|
appUpdate(id: $id, input: { permissions: $permissions }) {
|
|
|
|
app {
|
|
|
|
permissions {
|
|
|
|
code
|
|
|
|
name
|
|
|
|
}
|
|
|
|
}
|
|
|
|
errors {
|
|
|
|
message
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|