> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.teamwork.core.ListCompanies

- Component: `appmixer.teamwork.core.ListCompanies`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.teamwork 1.1.0](https://connectors.appmixer.com/connector/appmixer.teamwork/1.1.0.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.teamwork/1.1.0/component/appmixer.teamwork.core.ListCompanies>

List companies in Teamwork.com

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Search Term (`searchTerm`) | text | - |
| Custom Fields (`customfields`) | expression | - |

## Output ports

### Port `companies`

| Field | Type | Description |
| --- | --- | --- |
| Companies (`companies`) | array | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.teamwork.core.ListCompanies",
  "auth": {
    "service": "appmixer:teamwork"
  },
  "author": "hugh.marron@teamwork.com",
  "description": "List companies in Teamwork.com",
  "private": false,
  "version": "1.0.0",
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "searchTerm": {
            "type": "string"
          },
          "customfields": {
            "type": "object"
          }
        }
      },
      "inspector": {
        "inputs": {
          "searchTerm": {
            "index": 0,
            "type": "text",
            "label": "Search Term"
          },
          "customfields": {
            "type": "expression",
            "label": "Custom Fields",
            "index": 2,
            "levels": [
              "AND"
            ],
            "fields": {
              "name": {
                "type": "select",
                "label": "Field",
                "index": 1,
                "source": {
                  "url": "/component/appmixer/teamwork/core/ListCustomFields?outPort=customfields",
                  "data": {
                    "messages": {
                      "in/entity": "company",
                      "in/onlyTextAndNumber": true
                    },
                    "transform": "./ListCustomFields#toInspector"
                  }
                }
              },
              "value": {
                "type": "text",
                "label": "Value",
                "index": 2
              }
            }
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "companies",
      "options": [
        {
          "label": "Companies",
          "value": "companies",
          "schema": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "title": "ID"
                },
                "name": {
                  "type": "string",
                  "title": "Name"
                },
                "addressOne": {
                  "type": "string",
                  "title": "Address 1"
                },
                "addressTwo": {
                  "type": "string",
                  "title": "Address 2"
                },
                "city": {
                  "type": "string",
                  "title": "City"
                },
                "state": {
                  "type": "string",
                  "title": "State"
                },
                "zip": {
                  "type": "string",
                  "title": "Zip"
                },
                "emailOne": {
                  "type": "string",
                  "title": "Email"
                },
                "website": {
                  "type": "string",
                  "title": "Website"
                },
                "phone": {
                  "type": "string",
                  "title": "Phone"
                }
              }
            }
          }
        }
      ]
    }
  ],
  "icon": "(data URI omitted)"
}
```
