> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pinkfish.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# npm

> npm Registry

**Server path:** `/npm` | **Type:** Application | **PCID required:** Yes

## Tools

| Tool                                                  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`npm_create_token`](#npm_create_token)               | Token create endpoint                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| [`npm_delete_token`](#npm_delete_token)               | Token delete endpoint                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| [`npm_get_package`](#npm_get_package)                 | This endpoint responds with the package metadata document, sometimes informally called a "packument" or "doc.json".                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| [`npm_get_package_version`](#npm_get_package_version) | This endpoint responds with the package metadata document for a specific version.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| [`npm_get_user_profile`](#npm_get_user_profile)       | User detail endpoint                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| [`npm_list_tokens`](#npm_list_tokens)                 | User's token list endpoint                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [`npm_search_packages`](#npm_search_packages)         | This endpoint responds with the search result. Special search qualifiers can be provided in the full-text query: - author:bcoe: Show/filter results in which bcoe is the author - maintainer:bcoe: Show/filter results in which bcoe is qualifier as a maintainer - keywords:batman: Show/filter results that have batman in the keywords    - separating multiple keywords with      - , acts like a logical OR      - + acts like a logical AND      - ,- can be used to exclude keywords  - not:unstable: Exclude packages whose version is \< 1.0.0 - not:insecure: Exclude packages that are insecure or have vulnerable dependencies (based on the nsp registry) - is:unstable: Show/filter packages whose version is \< 1.0.0 - is:insecure: Show/filter packages that are insecure or have vulnerable dependencies (based on the nsp registry) - boost-exact:false: Do not boost exact matches, defaults to true Note: the values of quality, popularity, and maintenance are normalized into a unit-vector provide values between 0 - 1 for each to modify weightings, e.g., to return results based solely on quality, set quality=1.0, maintenance=0.0, popularity=0.0. |
| [`npm_update_user_profile`](#npm_update_user_profile) | Update user profile endpoint                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |

***

## npm\_create\_token

Token create endpoint

**Parameters:**

| Parameter        | Type      | Required | Default | Description        |
| ---------------- | --------- | -------- | ------- | ------------------ |
| `npm-otp`        | string    | No       | —       | One time password  |
| `cidr_whitelist` | string\[] | No       | —       | Cidr Whitelist     |
| `password`       | string    | Yes      | —       | NPM User password  |
| `readonly`       | boolean   | No       | —       | The readonly value |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "npm-otp": {
        "type": "string",
        "description": "One time password"
      },
      "cidr_whitelist": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Cidr Whitelist"
      },
      "password": {
        "type": "string",
        "description": "NPM User password"
      },
      "readonly": {
        "type": "boolean",
        "description": "The readonly value"
      }
    },
    "required": [
      "PCID",
      "password"
    ]
  }
  ```
</Expandable>

***

## npm\_delete\_token

Token delete endpoint

**Parameters:**

| Parameter | Type   | Required | Default | Description                       |
| --------- | ------ | -------- | ------- | --------------------------------- |
| `uuid`    | string | Yes      | —       | Key (UUID) of the Token to delete |
| `npm-otp` | string | No       | —       | One time password                 |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "uuid": {
        "type": "string",
        "description": "Key (UUID) of the Token to delete"
      },
      "npm-otp": {
        "type": "string",
        "description": "One time password"
      }
    },
    "required": [
      "PCID",
      "uuid"
    ]
  }
  ```
</Expandable>

***

## npm\_get\_package

This endpoint responds with the package metadata document, sometimes informally called a "packument" or "doc.json".

**Parameters:**

| Parameter     | Type   | Required | Default | Description             |
| ------------- | ------ | -------- | ------- | ----------------------- |
| `packageName` | string | Yes      | —       | The name of the package |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "packageName": {
        "type": "string",
        "description": "The name of the package"
      }
    },
    "required": [
      "PCID",
      "packageName"
    ]
  }
  ```
</Expandable>

***

## npm\_get\_package\_version

This endpoint responds with the package metadata document for a specific version.

**Parameters:**

| Parameter        | Type   | Required | Default | Description                  |
| ---------------- | ------ | -------- | ------- | ---------------------------- |
| `packageName`    | string | Yes      | —       | The name of the package      |
| `packageVersion` | string | Yes      | —       | a version number or "latest" |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "packageName": {
        "type": "string",
        "description": "The name of the package"
      },
      "packageVersion": {
        "type": "string",
        "description": "a version number or \"latest\""
      }
    },
    "required": [
      "PCID",
      "packageName",
      "packageVersion"
    ]
  }
  ```
</Expandable>

***

## npm\_get\_user\_profile

User detail endpoint

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## npm\_list\_tokens

User's token list endpoint

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## npm\_search\_packages

This endpoint responds with the search result. Special search qualifiers can be provided in the full-text query: - author:bcoe: Show/filter results in which bcoe is the author - maintainer:bcoe: Show/filter results in which bcoe is qualifier as a maintainer - keywords:batman: Show/filter results that have batman in the keywords    - separating multiple keywords with      - , acts like a logical OR      - + acts like a logical AND      - ,- can be used to exclude keywords  - not:unstable: Exclude packages whose version is \< 1.0.0 - not:insecure: Exclude packages that are insecure or have vulnerable dependencies (based on the nsp registry) - is:unstable: Show/filter packages whose version is \< 1.0.0 - is:insecure: Show/filter packages that are insecure or have vulnerable dependencies (based on the nsp registry) - boost-exact:false: Do not boost exact matches, defaults to true Note: the values of quality, popularity, and maintenance are normalized into a unit-vector provide values between 0 - 1 for each to modify weightings, e.g., to return results based solely on quality, set quality=1.0, maintenance=0.0, popularity=0.0.

**Parameters:**

| Parameter     | Type    | Required | Default | Description                                                     |
| ------------- | ------- | -------- | ------- | --------------------------------------------------------------- |
| `text`        | string  | No       | —       | Full-text search to apply                                       |
| `size`        | integer | No       | —       | How many results should be returned (default 20, max 250)       |
| `from`        | integer | No       | —       | Offset to return results from                                   |
| `quality`     | number  | No       | —       | How much of an effect should quality have on search results     |
| `popularity`  | number  | No       | —       | How much of an effect should popularity have on search results  |
| `maintenance` | number  | No       | —       | How much of an effect should maintenance have on search results |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "text": {
        "type": "string",
        "description": "Full-text search to apply"
      },
      "size": {
        "type": "integer",
        "description": "How many results should be returned (default 20, max 250)"
      },
      "from": {
        "type": "integer",
        "description": "Offset to return results from"
      },
      "quality": {
        "type": "number",
        "description": "How much of an effect should quality have on search results"
      },
      "popularity": {
        "type": "number",
        "description": "How much of an effect should popularity have on search results"
      },
      "maintenance": {
        "type": "number",
        "description": "How much of an effect should maintenance have on search results"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## npm\_update\_user\_profile

Update user profile endpoint

**Parameters:**

| Parameter  | Type   | Required | Default | Description                             |
| ---------- | ------ | -------- | ------- | --------------------------------------- |
| `npm-otp`  | string | No       | —       | One time password                       |
| `email`    | string | No       | —       | User email                              |
| `freenode` | string | No       | —       | The freenode value                      |
| `fullname` | string | No       | —       | User full name                          |
| `github`   | string | No       | —       | GitHub username                         |
| `homepage` | string | No       | —       | User homepage url                       |
| `password` | object | No       | —       | The password value                      |
| `tfa`      | object | No       | —       | User Two-Factor authentication settings |
| `twitter`  | string | No       | —       | Twitter username                        |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "npm-otp": {
        "type": "string",
        "description": "One time password"
      },
      "email": {
        "type": "string",
        "description": "User email"
      },
      "freenode": {
        "type": "string",
        "description": "The freenode value"
      },
      "fullname": {
        "type": "string",
        "description": "User full name"
      },
      "github": {
        "type": "string",
        "description": "GitHub username"
      },
      "homepage": {
        "type": "string",
        "description": "User homepage url"
      },
      "password": {
        "type": "object",
        "description": "The password value",
        "properties": {
          "old": {
            "type": "string",
            "description": "The old value"
          },
          "new": {
            "type": "string",
            "description": "The new value"
          }
        },
        "required": [
          "old",
          "new"
        ]
      },
      "tfa": {
        "description": "User Two-Factor authentication settings"
      },
      "twitter": {
        "type": "string",
        "description": "Twitter username"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>
