{
  "service": "repairshopr",
  "displayName": "RepairShopr",
  "categories": [
    "Productivity"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "API Token",
      "placeholder": "REPAIRSHOPR_API_TOKEN",
      "description": "RepairShopr API token used to authorize API requests. Create or view API tokens under More > Admin > API: https://repair.uservoice.com/knowledgebase/articles/376312-repairshopr-rest-api-build-custom-extensions-app.",
      "extraFields": [
        {
          "key": "subdomain",
          "label": "Subdomain",
          "inputType": "text",
          "required": true,
          "secret": false,
          "placeholder": "acme",
          "description": "Your RepairShopr account subdomain from https://{subdomain}.repairshopr.com. You can enter either the subdomain or the full account URL."
        }
      ]
    }
  ],
  "homepageUrl": "https://www.repairshopr.com",
  "actions": [
    {
      "id": "repairshopr.get_current_user",
      "service": "repairshopr",
      "name": "get_current_user",
      "description": "Retrieve the current RepairShopr API user and account details.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false,
        "description": "Input for retrieving the current RepairShopr user."
      },
      "outputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": true,
        "description": "Current RepairShopr user object returned by the API."
      }
    },
    {
      "id": "repairshopr.get_customer",
      "service": "repairshopr",
      "name": "get_customer",
      "description": "Retrieve a RepairShopr customer by ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "description": "RepairShopr numeric record identifier."
          }
        },
        "additionalProperties": false,
        "required": [
          "id"
        ],
        "description": "Input for retrieving a RepairShopr customer."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "customer": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "Raw RepairShopr object returned by the API."
          }
        },
        "additionalProperties": false,
        "required": [
          "customer"
        ],
        "description": "RepairShopr customer response."
      }
    },
    {
      "id": "repairshopr.get_ticket",
      "service": "repairshopr",
      "name": "get_ticket",
      "description": "Retrieve a RepairShopr ticket by ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "description": "RepairShopr numeric record identifier."
          }
        },
        "additionalProperties": false,
        "required": [
          "id"
        ],
        "description": "Input for retrieving a RepairShopr ticket."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "ticket": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "Raw RepairShopr object returned by the API."
          }
        },
        "additionalProperties": false,
        "required": [
          "ticket"
        ],
        "description": "RepairShopr ticket response."
      }
    },
    {
      "id": "repairshopr.list_customers",
      "service": "repairshopr",
      "name": "list_customers",
      "description": "Return a paginated list of RepairShopr customers.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "sort": {
            "type": "string",
            "minLength": 1,
            "description": "A customer field to order by, such as \"firstname ASC\" or \"city DESC\"."
          },
          "query": {
            "type": "string",
            "minLength": 1,
            "description": "Search query for matching customers."
          },
          "firstname": {
            "type": "string",
            "minLength": 1,
            "description": "Filter customers with a first name like this value."
          },
          "lastname": {
            "type": "string",
            "minLength": 1,
            "description": "Filter customers with a last name like this value."
          },
          "business_name": {
            "type": "string",
            "minLength": 1,
            "description": "Filter customers with a business name like this value."
          },
          "email": {
            "type": "string",
            "minLength": 1,
            "description": "Filter customers by email address."
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "description": "Returns the provided page of results; each page contains 25 results."
          }
        },
        "additionalProperties": false,
        "description": "Input filters for listing RepairShopr customers."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "customers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true,
              "description": "Raw RepairShopr object returned by the API."
            },
            "description": "Customers returned by RepairShopr."
          },
          "meta": {
            "type": "object",
            "properties": {
              "total_pages": {
                "type": "integer",
                "description": "Total number of pages available."
              },
              "total_entries": {
                "type": "integer",
                "description": "Total number of entries available."
              },
              "per_page": {
                "type": "integer",
                "description": "Number of entries returned per page."
              },
              "page": {
                "type": "integer",
                "description": "Current page number."
              }
            },
            "additionalProperties": true,
            "description": "RepairShopr pagination metadata returned by list endpoints."
          }
        },
        "additionalProperties": false,
        "required": [
          "customers"
        ],
        "description": "Paginated RepairShopr customers response."
      }
    },
    {
      "id": "repairshopr.list_tickets",
      "service": "repairshopr",
      "name": "list_tickets",
      "description": "Return a paginated list of RepairShopr tickets.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "customer_id": {
            "type": "integer",
            "minimum": 1,
            "description": "Filter tickets by customer ID."
          },
          "contact_id": {
            "type": "integer",
            "minimum": 1,
            "description": "Filter tickets by contact ID."
          },
          "number": {
            "type": "string",
            "minLength": 1,
            "description": "Filter tickets by ticket number."
          },
          "resolved_after": {
            "type": "string",
            "minLength": 1,
            "description": "Return tickets resolved after this date, such as \"2019-01-23\"."
          },
          "created_after": {
            "type": "string",
            "minLength": 1,
            "description": "Return tickets created after this date, such as \"2019-02-25\"."
          },
          "since_updated_at": {
            "type": "string",
            "minLength": 1,
            "description": "Return tickets updated after this date, such as \"2019-02-25\"."
          },
          "status": {
            "type": "string",
            "minLength": 1,
            "description": "Filter tickets by status, such as \"New\", \"In Progress\", \"Resolved\", or \"Not Closed\"."
          },
          "query": {
            "type": "string",
            "minLength": 1,
            "description": "Search query for matching tickets."
          },
          "user_id": {
            "type": "integer",
            "minimum": 1,
            "description": "Filter tickets assigned to a RepairShopr user ID."
          },
          "mine": {
            "type": "boolean",
            "description": "Filter tickets assigned to the current user."
          },
          "ticket_search_id": {
            "type": "integer",
            "minimum": 1,
            "description": "Return results from a saved RepairShopr ticket search."
          },
          "asset_name": {
            "type": "string",
            "minLength": 1,
            "description": "Filter tickets linked to assets whose name matches this value."
          },
          "asset_serial": {
            "type": "string",
            "minLength": 1,
            "description": "Filter tickets linked to assets whose serial number matches this value."
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "description": "Returns the provided page of results; each page contains 25 results."
          },
          "comment_format": {
            "type": "string",
            "enum": [
              "plaintext",
              "richtext",
              "original"
            ],
            "description": "Format to use for ticket comments in the response."
          },
          "all_comments": {
            "type": "boolean",
            "description": "Include all ticket comments when supported by RepairShopr."
          }
        },
        "additionalProperties": false,
        "description": "Input filters for listing RepairShopr tickets."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "tickets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true,
              "description": "Raw RepairShopr object returned by the API."
            },
            "description": "Tickets returned by RepairShopr."
          },
          "meta": {
            "type": "object",
            "properties": {
              "total_pages": {
                "type": "integer",
                "description": "Total number of pages available."
              },
              "total_entries": {
                "type": "integer",
                "description": "Total number of entries available."
              },
              "per_page": {
                "type": "integer",
                "description": "Number of entries returned per page."
              },
              "page": {
                "type": "integer",
                "description": "Current page number."
              }
            },
            "additionalProperties": true,
            "description": "RepairShopr pagination metadata returned by list endpoints."
          }
        },
        "additionalProperties": false,
        "required": [
          "tickets"
        ],
        "description": "Paginated RepairShopr tickets response."
      }
    }
  ]
}
