{
  "openapi": "3.0.1",
  "info": {
    "title": "npm & PyPI Dependency Risk Report",
    "description": "Audit npm and PyPI packages with official registry and OSV evidence. Deliver upgrade-risk rows, vulnerability alerts, portfolio reports, and exports.",
    "version": "0.1",
    "x-build-id": "WoxEpSIcNv2vikM5S"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/taroyamada~package-portfolio-upgrade-risk-report/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-taroyamada-package-portfolio-upgrade-risk-report",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/taroyamada~package-portfolio-upgrade-risk-report/runs": {
      "post": {
        "operationId": "runs-sync-taroyamada-package-portfolio-upgrade-risk-report",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/taroyamada~package-portfolio-upgrade-risk-report/run-sync": {
      "post": {
        "operationId": "run-sync-taroyamada-package-portfolio-upgrade-risk-report",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "watchlists": {
            "title": "Portfolio watchlists",
            "type": "array",
            "description": "Optional named package portfolios. Each item may contain a name and packages array; top-level packages remains supported.",
            "default": []
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Stable key that isolates the saved comparison baseline.",
            "default": ""
          },
          "initialRunMode": {
            "title": "Initial run mode",
            "enum": [
              "baseline_only",
              "emit_backfill"
            ],
            "type": "string",
            "description": "baseline_only saves the first snapshot with zero rows and zero charge; emit_backfill emits a report on the first run.",
            "default": "baseline_only"
          },
          "packages": {
            "title": "Package portfolio",
            "minItems": 0,
            "maxItems": 100,
            "type": "array",
            "description": "Public package names and installed versions to assess.",
            "default": []
          },
          "includeGitHub": {
            "title": "Include GitHub enrichment",
            "type": "boolean",
            "description": "Optional. GitHub is skipped when no token is supplied; npm/PyPI/OSV analysis remains complete.",
            "default": false
          },
          "githubToken": {
            "title": "GitHub token",
            "type": "string",
            "description": "Optional token for public GitHub repository metadata. Never included in output."
          },
          "baselineOnly": {
            "title": "Baseline only",
            "type": "boolean",
            "description": "Save the current official-source snapshot and emit zero rows and zero charges.",
            "default": false
          },
          "generateReport": {
            "title": "Generate portfolio report",
            "type": "boolean",
            "description": "Generate one report row before package rows when changes are found.",
            "default": true
          },
          "emitRawRows": {
            "title": "Emit package risk rows",
            "type": "boolean",
            "description": "Emit per-package rows in addition to alerts and the portfolio report.",
            "default": false
          },
          "emitUnchanged": {
            "title": "Emit unchanged rows",
            "type": "boolean",
            "description": "Reserved for compatibility. Unchanged monitoring runs always produce zero rows and zero charge.",
            "default": false
          },
          "emitExport": {
            "title": "Generate export row",
            "type": "boolean",
            "description": "Generate one dataset JSON handoff row when changes are found.",
            "default": false
          },
          "dryRun": {
            "title": "Dry run",
            "type": "boolean",
            "description": "Return a report-first sample without network calls, state writes, or charges.",
            "default": true
          },
          "maxChargeUsd": {
            "title": "Maximum charge USD",
            "minimum": 0,
            "maximum": 5000,
            "type": "number",
            "description": "The complete planned event total must fit this cap before any event is pushed.",
            "default": 50
          },
          "requestTimeoutSeconds": {
            "title": "Request timeout seconds",
            "minimum": 2,
            "maximum": 120,
            "type": "integer",
            "description": "Request timeout seconds for this run.",
            "default": 30
          },
          "rateLimitMs": {
            "title": "Minimum request interval ms",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Minimum request interval ms for this run.",
            "default": 250
          },
          "maxRetries": {
            "title": "Maximum retries",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "Maximum retries for this run.",
            "default": 2
          },
          "backoffBaseMs": {
            "title": "Backoff base ms",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Backoff base ms for this run.",
            "default": 250
          },
          "maxBackoffMs": {
            "title": "Maximum backoff ms",
            "minimum": 0,
            "maximum": 15000,
            "type": "integer",
            "description": "Maximum backoff ms for this run.",
            "default": 4000
          },
          "delivery": {
            "title": "Delivery mode",
            "enum": [
              "dataset",
              "webhook"
            ],
            "type": "string",
            "description": "Delivery mode for this run.",
            "default": "dataset"
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Optional HTTPS handoff after dataset event delivery."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}