diff --git a/package.json b/package.json index c5303a7..194bb36 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@subsquid/cli", "description": "squid cli tool", - "version": "3.0.0-beta.1", + "version": "3.0.0-beta.11", "license": "GPL-3.0-or-later", "repository": "git@github.com:subsquid/squid-cli.git", "publishConfig": { @@ -74,20 +74,21 @@ "testEnvironment": "node" }, "dependencies": { - "@oclif/core": "3.26.0", - "@oclif/plugin-autocomplete": "3.0.13", - "@oclif/plugin-warn-if-update-available": "^3.1.6", + "@oclif/core": "3.27.0", + "@oclif/plugin-autocomplete": "3.2.2", + "@oclif/plugin-warn-if-update-available": "^3.1.13", "@subsquid/commands": "^2.3.1", - "@subsquid/manifest": "^0.0.1-beta.17", + "@subsquid/manifest": "^2.0.0-beta.3", "@subsquid/manifest-expr": "^0.0.1", "@types/fast-levenshtein": "^0.0.4", - "@types/lodash": "^4.17.0", + "@types/lodash": "^4.17.7", "@types/targz": "^1.0.4", "async-retry": "^1.3.3", - "axios": "^1.6.8", - "axios-retry": "^4.1.0", + "axios": "^1.7.5", + "axios-retry": "^4.5.0", "blessed-contrib": "^4.11.0", "chalk": "^4.1.2", + "cli-diff": "^1.0.0", "cli-select": "^1.1.2", "cross-spawn": "^7.0.3", "date-fns": "^3.6.0", @@ -95,22 +96,22 @@ "fast-levenshtein": "^3.0.0", "figlet": "^1.7.0", "form-data": "^4.0.0", - "glob": "^10.3.12", - "ignore": "^5.3.1", + "glob": "^10.4.5", + "ignore": "^5.3.2", "inquirer": "^8.2.6", + "joi": "^17.13.3", "js-yaml": "^4.1.0", "lodash": "^4.17.21", "ms": "^2.1.3", "neo-blessed": "^0.2.0", "open": "^8.1.0", "pretty-bytes": "^5.6.0", - "qs": "^6.12.0", + "qs": "^6.13.0", "reblessed": "^0.2.1", - "simple-git": "^3.24.0", + "simple-git": "^3.25.0", "split2": "^4.2.0", "targz": "^1.0.1", - "tree-kill": "^1.2.2", - "unique-names-generator": "^4.7.1" + "tree-kill": "^1.2.2" }, "devDependencies": { "@oclif/dev-cli": "^1.26.10", @@ -123,12 +124,12 @@ "@types/jest": "^29.5.12", "@types/js-yaml": "^4.0.9", "@types/ms": "^0.7.34", - "@types/node": "^20.12.3", - "@types/qs": "^6.9.14", + "@types/node": "^20.16.2", + "@types/qs": "^6.9.15", "@types/split2": "^3.2.1", - "@typescript-eslint/eslint-plugin": "^7.5.0", + "@typescript-eslint/eslint-plugin": "^7.18.0", "@typescript-eslint/eslint-plugin-tslint": "^7.0.2", - "@typescript-eslint/parser": "^7.5.0", + "@typescript-eslint/parser": "^7.18.0", "eslint": "8.57.0", "eslint-config-prettier": "^9.1.0", "eslint-config-standard": "^17.1.0", @@ -140,11 +141,11 @@ "jest": "^29.7.0", "openapi-typescript": "^7.3.0", "pkg": "^5.8.1", - "prettier": "^3.2.5", - "ts-jest": "^29.1.2", + "prettier": "^3.3.3", + "ts-jest": "^29.2.5", "ts-node": "^10.9.2", - "type-fest": "^4.24.0", - "typescript": "~5.4.3" + "type-fest": "^4.26.0", + "typescript": "~5.5.4" }, "packageManager": "yarn@4.1.1" } diff --git a/src/api/api.ts b/src/api/api.ts index f38f34f..1493a04 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -3,8 +3,9 @@ import path from 'path'; import axios, { Method } from 'axios'; import axiosRetry, { IAxiosRetryConfig, isNetworkOrIdempotentRequestError } from 'axios-retry'; import chalk from 'chalk'; -import { pickBy } from 'lodash'; +import { isEmpty, pickBy } from 'lodash'; import ms from 'ms'; +import qs from 'qs'; import { getConfig } from '../config'; @@ -58,6 +59,7 @@ export function debugLog(...args: any[]) { } export async function api({ + version = 'v1', method, path, data, @@ -68,6 +70,7 @@ export async function api({ abortController, retry, }: { + version?: 'v1'; method: Method; path: string; query?: Record; @@ -82,7 +85,7 @@ export async function api({ const started = Date.now(); // add the API_URL to the path if it's not a full url - const url = !path.startsWith('https') ? `${config.apiUrl}${path}` : path; + const url = !path.startsWith('https') ? `${config.apiUrl}/${version}${path}` : path; const finalHeaders = { authorization: url.startsWith(config.apiUrl) ? `token ${config.credentials}` : null, @@ -111,7 +114,7 @@ export async function api({ console.log( chalk.dim(new Date().toISOString()), chalk.cyan`[${method.toUpperCase()}]`, - response.config.url, + `${response.config.url}${!isEmpty(query) ? `?${qs.stringify(query)}` : ``}`, chalk.cyan(response.status), ms(Date.now() - started), chalk.dim(JSON.stringify({ headers: response.headers })), diff --git a/src/api/deploy.ts b/src/api/deploy.ts index 795d3f5..e5ad03a 100644 --- a/src/api/deploy.ts +++ b/src/api/deploy.ts @@ -1,19 +1,19 @@ import { api } from './api'; -import { Deploy, DeployRequest, HttpResponse, OrganizationRequest } from './types'; +import { Deployment, DeployRequest, HttpResponse, OrganizationRequest } from './types'; -export async function getDeploy({ organization, deploy }: DeployRequest): Promise { - const { body } = await api>({ +export async function getDeploy({ organization, deploy }: DeployRequest): Promise { + const { body } = await api>({ method: 'get', - path: `/orgs/${organization.code}/deploys/${deploy.id}`, + path: `/orgs/${organization.code}/deployments/${deploy.id}`, }); return body.payload; } -export async function getDeploys({ organization }: OrganizationRequest): Promise { - const { body } = await api>({ +export async function getDeploys({ organization }: OrganizationRequest): Promise { + const { body } = await api>({ method: 'get', - path: `/orgs/${organization.code}/deploys`, + path: `/orgs/${organization.code}/deployments`, }); return body.payload; diff --git a/src/api/schema.d.ts b/src/api/schema.d.ts index 3a846e1..2890d75 100644 --- a/src/api/schema.d.ts +++ b/src/api/schema.d.ts @@ -4,151 +4,32 @@ */ export interface paths { - "/auth/signin": { + "/v1/orgs/{code}/metrics/ingress": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - get?: never; - put?: never; - /** Sign in */ - post: operations["signin"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/auth/signin": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Sign in */ - post: operations["signin"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/auth/signup": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Sign up */ - post: operations["signup"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/auth/signup": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Sign up */ - post: operations["signup"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/auth/restore": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Restore */ - post: operations["restore"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/auth/restore": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Restore */ - post: operations["restore"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/auth/restore/confirm": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Confirm restore */ - post: operations["restore-confirm"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/auth/restore/confirm": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; + /** Get all requests count */ + get: operations["SquidMetricsController_dailyRequests"]; put?: never; - /** Confirm restore */ - post: operations["restore-confirm"]; + post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; - "/auth/email/confirm": { + "/v1/orgs/{code}/metrics/ingress/{squid_id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - /** Confirm email */ - get: operations["confirm-email"]; + /** Get full squid ingress metrics */ + get: operations["SquidMetricsController_ingressStats"]; put?: never; post?: never; delete?: never; @@ -157,15 +38,15 @@ export interface paths { patch?: never; trace?: never; }; - "/v1/auth/email/confirm": { + "/v1/orgs/{code}/metrics/usage/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - /** Confirm email */ - get: operations["confirm-email"]; + /** Get squid usage metrics */ + get: operations["SquidMetricsController_usage"]; put?: never; post?: never; delete?: never; @@ -174,32 +55,32 @@ export interface paths { patch?: never; trace?: never; }; - "/oauth/github/url": { + "/v1/orgs/{code}/deployments/upload-url": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - /** Get Github OAuth URL */ - get: operations["github"]; + get?: never; put?: never; - post?: never; + /** Create an upload url */ + post: operations["DeploymentController_uploadUrl"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; - "/v1/oauth/github/url": { + "/v1/orgs/{code}/deployments": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - /** Get Github OAuth URL */ - get: operations["github"]; + /** Get deployments */ + get: operations["DeploymentController_getAll"]; put?: never; post?: never; delete?: never; @@ -208,24 +89,24 @@ export interface paths { patch?: never; trace?: never; }; - "/oauth/github/auth": { + "/v1/orgs/{code}/deployments/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - get?: never; + /** Retrieve a deployment */ + get: operations["DeploymentController_getOne"]; put?: never; - /** Github auth */ - post: operations["github-auth"]; + post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; - "/v1/oauth/github/auth": { + "/v1/orgs/{org}/squids/deploy": { parameters: { query?: never; header?: never; @@ -234,23 +115,23 @@ export interface paths { }; get?: never; put?: never; - /** Github auth */ - post: operations["github-auth"]; + /** Deploy a squid */ + post: operations["SquidController_deploySquid"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; - "/oauth/google/url": { + "/v1/orgs/{org}/squids": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - /** Get Google OAuth URL */ - get: operations["google"]; + /** List squids */ + get: operations["SquidController_listSquids"]; put?: never; post?: never; delete?: never; @@ -259,24 +140,25 @@ export interface paths { patch?: never; trace?: never; }; - "/v1/oauth/google/url": { + "/v1/orgs/{org}/squids/{reference}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - /** Get Google OAuth URL */ - get: operations["google"]; + /** Retrieve a squid */ + get: operations["SquidController_getSquid"]; put?: never; post?: never; - delete?: never; + /** Delete a squid */ + delete: operations["SquidController_deleteSquid"]; options?: never; head?: never; patch?: never; trace?: never; }; - "/oauth/google/auth": { + "/v1/orgs/{org}/squids/{reference}/restart": { parameters: { query?: never; header?: never; @@ -285,15 +167,15 @@ export interface paths { }; get?: never; put?: never; - /** Google auth */ - post: operations["google-auth"]; + /** Restart a squid */ + post: operations["SquidController_restartSquid"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; - "/v1/oauth/google/auth": { + "/v1/orgs/{org}/squids/{reference}/hibernate": { parameters: { query?: never; header?: never; @@ -302,15 +184,15 @@ export interface paths { }; get?: never; put?: never; - /** Google auth */ - post: operations["google-auth"]; + /** Hibernate a squid */ + post: operations["SquidController_hibernateSquid"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; - "/orgs/{code}/squids/deploy": { + "/v1/orgs/{org}/squids/{reference}/tags/{tag}": { parameters: { query?: never; header?: never; @@ -318,111 +200,61 @@ export interface paths { cookie?: never; }; get?: never; - put?: never; - /** Deploy a squid to organization */ - post: operations["deploy-squid"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/orgs/{code}/squids": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** List organization squids */ - get: operations["list-squids"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/orgs/{code}/squids/{squid}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get all squid versions */ - get: operations["get-squid"]; - put?: never; + /** Add tag to a squid */ + put: operations["SquidController_addTag"]; post?: never; - /** Delete all squid versions by name */ - delete: operations["delete-squid"]; + /** Remove tag from a squid */ + delete: operations["SquidController_removeTag"]; options?: never; head?: never; patch?: never; trace?: never; }; - "/orgs/{code}/squids/{squid}/version/{version}": { + "/v1/orgs/{code}/squids/{reference}/logs/history": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - get?: never; + /** Fetch squid logs */ + get: operations["SquidLogsController_fetchLogsHistory"]; put?: never; post?: never; - /** Delete a squid */ - delete: operations["destroy-squid-version"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/orgs/{code}/squids/{squid}/version/{version}/redeploy": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Restart a squid */ - put: operations["restart-squid-version"]; - post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; - "/orgs/{code}/squids/{squid}/version/{version}/hibernate": { + "/v1/orgs/{code}/squids/{reference}/logs/follow": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - get?: never; + /** Stream squid logs */ + get: operations["SquidLogsController_tailLogs"]; put?: never; - /** Hibernate a squid */ - post: operations["hibernate-squid"]; + post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; - "/orgs/{code}/squids/metrics/ingress": { + "/v1/user": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - /** Get all requests count */ - get: operations["daily-requests"]; - put?: never; + /** Get profile */ + get: operations["UserController_getProfile"]; + /** Update profile */ + put: operations["UserController_updateProfile"]; post?: never; delete?: never; options?: never; @@ -430,15 +262,15 @@ export interface paths { patch?: never; trace?: never; }; - "/v1/orgs/{code}/squids/metrics/ingress": { + "/v1/user/squids": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - /** Get all requests count */ - get: operations["daily-requests"]; + /** Get list of squids from all users organizations */ + get: operations["UserController_getSquidsV1"]; put?: never; post?: never; delete?: never; @@ -447,32 +279,33 @@ export interface paths { patch?: never; trace?: never; }; - "/orgs/{code}/squids/metrics/ingress/{id}": { + "/v1/orgs": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - /** Get full squid ingress metrics */ - get: operations["ingress-stats"]; + /** List all organizations */ + get: operations["OrganizationController_listOrganizations"]; put?: never; - post?: never; + /** Create new organization */ + post: operations["OrganizationController_create"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; - "/v1/orgs/{code}/squids/metrics/ingress/{id}": { + "/v1/orgs/{org}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - /** Get full squid ingress metrics */ - get: operations["ingress-stats"]; + /** Get an organization */ + get: operations["OrganizationController_getOrganization"]; put?: never; post?: never; delete?: never; @@ -481,49 +314,50 @@ export interface paths { patch?: never; trace?: never; }; - "/orgs/{code}/squids/metrics/usage/{id}": { + "/v1/orgs/{code}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - /** Get squid usage metrics */ - get: operations["usage"]; - put?: never; + get?: never; + /** Edit an organization */ + put: operations["OrganizationController_edit"]; post?: never; - delete?: never; + /** Delete an organization */ + delete: operations["OrganizationController_deleteOne"]; options?: never; head?: never; patch?: never; trace?: never; }; - "/v1/orgs/{code}/squids/metrics/usage/{id}": { + "/v1/orgs/{code}/send-verify-email": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - /** Get squid usage metrics */ - get: operations["usage"]; + get?: never; put?: never; - post?: never; + /** Send verification email */ + post: operations["OrganizationController_sendEmailVerification"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; - "/orgs/{code}/squids/{squidName}/versions/{versionName}/logs/history": { + "/v1/orgs/verify-email": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - /** Get squid logs history */ - get: operations["fetch-logs-history"]; + /** Verify organization email by token */ + get: operations["OrganizationController_verifyEmail"]; put?: never; post?: never; delete?: never; @@ -532,24 +366,25 @@ export interface paths { patch?: never; trace?: never; }; - "/orgs/{code}/squids/{squidName}/versions/{versionName}/logs/follow": { + "/v1/orgs/{code}/roles": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - /** Follow the squid logs */ - get: operations["tail-logs"]; + /** Get user roles */ + get: operations["OrganizationController_getOne"]; put?: never; - post?: never; + /** Add user role */ + post: operations["OrganizationController_addUser"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; - "/orgs/{code}/squids/{squid}/versions/{version}/prod": { + "/v1/orgs/{code}/roles/{id}": { parameters: { query?: never; header?: never; @@ -557,16 +392,17 @@ export interface paths { cookie?: never; }; get?: never; - /** Set alias to a squid */ - put: operations["squid"]; + /** Edit user role */ + put: operations["OrganizationController_editUser"]; post?: never; - delete?: never; + /** Remove user role */ + delete: operations["OrganizationController_deleteUser"]; options?: never; head?: never; patch?: never; trace?: never; }; - "/orgs/{code}/deploys/upload-url": { + "/v1/orgs/{code}/roles/{id}/accept": { parameters: { query?: never; header?: never; @@ -575,15 +411,15 @@ export interface paths { }; get?: never; put?: never; - /** Get an upload url */ - post: operations["upload-url"]; + /** Accept user role */ + post: operations["OrganizationController_acceptUserRole"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; - "/v1/orgs/{code}/deploys/upload-url": { + "/v1/orgs/{code}/roles/{id}/reject": { parameters: { query?: never; header?: never; @@ -592,41 +428,43 @@ export interface paths { }; get?: never; put?: never; - /** Get an upload url */ - post: operations["upload-url"]; + /** Reject user role */ + post: operations["OrganizationController_declineUserRole"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; - "/orgs/{code}/deploys": { + "/v1/orgs/{code}/integrations/neon": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - /** Get version deploys */ - get: operations["get-all"]; - put?: never; + get?: never; + /** Setup Neon API integration */ + put: operations["OrganizationController_setNeonApiToken"]; post?: never; - delete?: never; + /** Delete Neon integration */ + delete: operations["OrganizationController_deleteNeonApiToken"]; options?: never; head?: never; patch?: never; trace?: never; }; - "/orgs/{code}/deploys/{id}": { + "/v1/orgs/{code}/billing/settings": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - /** Retrieve a deploy */ - get: operations["get-one"]; - put?: never; + /** Get billing settings */ + get: operations["OrganizationBillingController_getSettings"]; + /** Update billing settings */ + put: operations["OrganizationBillingController_setupIntent"]; post?: never; delete?: never; options?: never; @@ -634,15 +472,15 @@ export interface paths { patch?: never; trace?: never; }; - "/v1/orgs/{code}/deploys": { + "/v1/orgs/{code}/billing/receipts/{year}/{month}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - /** Get version deploys */ - get: operations["get-all"]; + /** Get billing month usage total */ + get: operations["OrganizationBillingController_getMonthly"]; put?: never; post?: never; delete?: never; @@ -651,16 +489,17 @@ export interface paths { patch?: never; trace?: never; }; - "/v1/orgs/{code}/deploys/{id}": { + "/v1/orgs/{code}/secrets": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - /** Retrieve a deploy */ - get: operations["get-one"]; - put?: never; + /** List secrets */ + get: operations["SecretController_listSecrets"]; + /** Update secrets */ + put: operations["SecretController_put"]; post?: never; delete?: never; options?: never; @@ -668,49 +507,50 @@ export interface paths { patch?: never; trace?: never; }; - "/v1/orgs/{org}/squids/deploy": { + "/v1/orgs/{code}/rpc/chains": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - get?: never; + /** List chains */ + get: operations["RpcController_listChains"]; put?: never; - /** Deploy a squid to organization */ - post: operations["deploy-squid"]; + post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; - "/v1/orgs/{org}/squids": { + "/v1/orgs/{code}/rpc/token": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - /** List organization squids */ - get: operations["list-squids"]; + /** Get organization token */ + get: operations["RpcController_getToken"]; put?: never; - post?: never; + /** Refresh organization token */ + post: operations["RpcController_refreshToken"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; - "/v1/orgs/{org}/squids/{squid}": { + "/v1/orgs/{code}/quotas": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - /** List organization squids */ - get: operations["list-squids"]; + /** Get quotas */ + get: operations["QuotaController_get"]; put?: never; post?: never; delete?: never; @@ -719,6277 +559,544 @@ export interface paths { patch?: never; trace?: never; }; - "/v1/orgs/{org}/squids/{squid}/slots/{slot}": { + "/v1/orgs/{code}/monitoring/squids/{query}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - /** Get a squid deployment */ - get: operations["get-squid"]; + /** Get squids metric */ + get: operations["MonitoringController_squids"]; put?: never; post?: never; - /** Delete a squid deployment */ - delete: operations["delete-squid"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/orgs/{org}/squids/{squid}/slots/{slot}/restart": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Restart a squid */ - post: operations["restart-squid"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; - "/v1/orgs/{org}/squids/{squid}/slots/{slot}/hibernate": { + "/v1/orgs/{code}/monitoring/squids": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - get?: never; + /** Scrape metrics */ + get: operations["MonitoringController_squidsAllProm"]; put?: never; - /** Hibernate a squid deployment */ - post: operations["hibernate-squid"]; + post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; - "/v1/orgs/{org}/squids/{squid}/slots/{slot}/tag": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; +} +export type webhooks = Record; +export interface components { + schemas: { + UnauthorizedResponse: { + /** @example CREDENTIALS_INVALID */ + error: string; }; - get?: never; - put?: never; - /** Set tag to a squid deployment */ - post: operations["tag-squid"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/orgs/{code}/squids/{squid}/slots/{slot}/logs/history": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get squid logs history */ - get: operations["fetch-logs-history"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/orgs/{code}/squids/{squid}/slots/{slot}/logs/history": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; + IngressRequestsMetric: { + /** Format: date-time */ + time: string; + squidId: number; + /** @enum {string} */ + res: IngressRequestsMetricRes; }; - /** Get squid logs history */ - get: operations["fetch-logs-history"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/orgs/{code}/squids/{squid}/slots/{slot}/logs/follow": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; + IngressSquidLatency: { + p50: number; + p90: number; + p95: number; + p99: number; }; - /** Follow the squid logs */ - get: operations["tail-logs"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/orgs/{code}/squids/{squid}/slots/{slot}/logs/follow": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; + IngressSquidRequestsStat: { + count: string; + bytesSend: string; + latency: components["schemas"]["IngressSquidLatency"]; }; - /** Follow the squid logs */ - get: operations["tail-logs"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/user": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; + IngressSquidRequestsMetricValue: { + /** Format: date-time */ + ts: string; + success: components["schemas"]["IngressSquidRequestsStat"]; + error: components["schemas"]["IngressSquidRequestsStat"]; }; - /** Retrieve a user */ - get: operations["get-profile"]; - /** Update a user */ - put: operations["update-profile"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/user": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; + IngressSquidRequestsMetric: { + /** @enum {string} */ + timeGroup: IngressSquidRequestsMetricTimeGroup; + metrics: components["schemas"]["IngressSquidRequestsMetricValue"][]; }; - /** Retrieve a user */ - get: operations["get-profile"]; - /** Update a user */ - put: operations["update-profile"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/user/onboarding": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; + SquidUsageMetricValue: { + /** Format: date-time */ + ts: string; + apiCpuUsage: number; + apiCpuRequested: number; + apiMemUsageMb: number; + apiMemRequestedMb: number; + processorCpuUsage: number; + processorCpuRequested: number; + processorMemUsageMb: number; + processorMemRequestedMb: number; + dbCpuUsage: number; + dbCpuRequested: number; + dbDiskUsageMb: number; + dbDiskRequestedMb: number; }; - get?: never; - /** Apply user onboarding */ - put: operations["on-boarding-form"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/user/onboarding": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; + SquidUsageMetric: { + /** @enum {string} */ + timeGroup: SquidUsageMetricTimeGroup; + metrics: components["schemas"]["SquidUsageMetricValue"][]; }; - get?: never; - /** Apply user onboarding */ - put: operations["on-boarding-form"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/user/password/change": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; + UploadUrlResponse: { + uploadUrl: string; + uploadFields: Record; + fileUrl: string; + maxUploadBytes: number; }; - get?: never; - put?: never; - /** Change password */ - post: operations["change-password"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/user/password/change": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; + DeployLog: { + severity: string; + message: string; }; - get?: never; - put?: never; - /** Change password */ - post: operations["change-password"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/user/coinlist/email/confirm": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; + DeploymentOrganizationResponse: { + /** @example 550e8400-e29b-41d4-a716-446655440000 */ + id: string; + /** @example Subsquid GmbH */ + name: string; + /** @example subsquid-org */ + code: string; }; - get?: never; - put?: never; - /** Resend Coinlist email confirmation */ - post: operations["resend-coinlist-email-confirm"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/user/coinlist/email/confirm": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; + DeployUserResponse: { + /** @example 90046784-ef9a-42b4-9dcf-ca4e4ed2cf4a */ + id: string; + /** @example user@gmail.com */ + email: string; + /** @example John Doe */ + fullName: string; }; - get?: never; - put?: never; - /** Resend Coinlist email confirmation */ - post: operations["resend-coinlist-email-confirm"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/user/email/confirm/resend": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; + DeploymentSquidResponse: { + /** @example 1 */ + id: number; + /** @example my-squid */ + name: string; + /** @example abc12 */ + slot: string; + /** @example my-squid:abc12 */ + reference: string; }; - get?: never; - put?: never; - /** Resend email confirmation */ - post: operations["resend-email-confirm"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/user/email/confirm/resend": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; + DeploymentOptionsResponse: { + /** @example dev */ + tag: string; + /** @example false */ + hardReset: boolean; }; - get?: never; - put?: never; - /** Resend email confirmation */ - post: operations["resend-email-confirm"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/user/sqd-key": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; + DeploymentResponse: { + id: number; + /** @enum {string} */ + type: DeploymentResponseType; + /** @enum {string} */ + status: DeploymentResponseStatus; + /** @enum {string} */ + failed: DeploymentResponseFailed; + logs: components["schemas"]["DeployLog"][]; + organization: components["schemas"]["DeploymentOrganizationResponse"]; + user: components["schemas"]["DeployUserResponse"] | null; + squid: components["schemas"]["DeploymentSquidResponse"] | null; + options: components["schemas"]["DeploymentOptionsResponse"]; + /** + * @description Total elapsed time in milliseconds + * @example 50379 + */ + totalElapsedTimeMs: number; + /** Format: date-time */ + updatedAt: string; + /** Format: date-time */ + createdAt: string; }; - get?: never; - put?: never; - /** Refresh sqd access key */ - post: operations["key"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/user/sqd-key": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; + SquidTagResponse: { + /** @example prod */ + name: string; }; - get?: never; - put?: never; - /** Refresh sqd access key */ - post: operations["key"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/user/invites": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; + Manifest: Record; + SquidManifestResponse: { + /** @description The actual squid manifest */ + current: components["schemas"]["Manifest"]; + /** @description The unmodified squid manifest */ + raw: string; }; - /** Retrieve all invites */ - get: operations["get-invites"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/user/invites": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; + SquidUrlResponse: { + /** @example tag */ + type: string; + /** @example prod */ + name?: string; + /** @example https://squid.subsquid.io/mysquid/-/a1b2c3/ */ + url: string; }; - /** Retrieve all invites */ - get: operations["get-invites"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/user/squids": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; + SquidApiResponse: { + /** @enum {string} */ + status: SquidApiResponseStatus; + urls: components["schemas"]["SquidUrlResponse"][]; }; - /** Get list of squids from all users organizations */ - get: operations["get-squids-v-0"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/user/squids": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; + SquidSyncStatusResponse: { + /** @example 1 */ + totalBlocks: number; + /** @example 1 */ + currentBlock: number; }; - /** Get list of squids from all users organizations */ - get: operations["get-squids-v-1"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/user/tokens": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; + SquidProcessorResponse: { + /** @example processor */ + name: string; + /** @enum {string} */ + status: SquidProcessorResponseStatus; + syncState: components["schemas"]["SquidSyncStatusResponse"]; + metrics: string; }; - /** Get list of user tokens */ - get: operations["get-tokens"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/user/tokens": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; + SquidAddonsHasuraResponse: { + replicas: number; + profile: string; + /** @enum {string} */ + status: SquidAddonsHasuraResponseStatus; + urls: components["schemas"]["SquidUrlResponse"][]; }; - /** Get list of user tokens */ - get: operations["get-tokens"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/user/api-tokens": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; + PostgresConnectionParams: { + /** @example pg.sqd.dev */ + host: string; + /** @example owner */ + user: string; + /** @example dbname */ + database: string; + /** @example random_password */ + password: string; }; - /** Get tokens list */ - get: operations["get-tokens"]; - put?: never; - /** Create new token */ - post: operations["create-token"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/user/api-tokens": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; + PostgresConnection: { + /** @example postgresql://user:password@host/db?sslmode=require */ + uri: string; + params: components["schemas"]["PostgresConnectionParams"]; }; - /** Get tokens list */ - get: operations["get-tokens"]; - put?: never; - /** Create new token */ - post: operations["create-token"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/user/api-tokens/{id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; + SquidDiskResponse: { + /** @enum {string} */ + usageStatus: SquidDiskResponseUsageStatus; + usedBytes: number; + totalBytes: number; }; - get?: never; - put?: never; - post?: never; - /** Delete token */ - delete: operations["deactivate-token"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/user/api-tokens/{id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; + SquidAddonsPostgresResponse: { + connections: components["schemas"]["PostgresConnection"][]; + disk: components["schemas"]["SquidDiskResponse"]; }; - get?: never; - put?: never; - post?: never; - /** Delete token */ - delete: operations["deactivate-token"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/organizations": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; + SquidAddonsNeonResponse: { + connections: components["schemas"]["PostgresConnection"][]; }; - /** List all organizations */ - get: operations["list-organizations"]; - put?: never; - /** Create new organization */ - post: operations["create"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/orgs": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; + SquidAddonsResponse: { + hasura?: components["schemas"]["SquidAddonsHasuraResponse"]; + postgres?: components["schemas"]["SquidAddonsPostgresResponse"]; + neon?: components["schemas"]["SquidAddonsNeonResponse"]; }; - /** List all organizations */ - get: operations["list-organizations"]; - put?: never; - /** Create new organization */ - post: operations["create"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/organizations": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** List all organizations */ - get: operations["list-organizations"]; - put?: never; - /** Create new organization */ - post: operations["create"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/orgs": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** List all organizations */ - get: operations["list-organizations"]; - put?: never; - /** Create new organization */ - post: operations["create"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/organizations/{org}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get an organizations */ - get: operations["get-organization"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/orgs/{org}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get an organizations */ - get: operations["get-organization"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/organizations/{org}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get an organizations */ - get: operations["get-organization"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/orgs/{org}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get an organizations */ - get: operations["get-organization"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/organizations/{code}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Edit an organization */ - put: operations["edit"]; - post?: never; - /** Delete an organization */ - delete: operations["delete-one"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/orgs/{code}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Edit an organization */ - put: operations["edit"]; - post?: never; - /** Delete an organization */ - delete: operations["delete-one"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/organizations/{code}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Edit an organization */ - put: operations["edit"]; - post?: never; - /** Delete an organization */ - delete: operations["delete-one"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/orgs/{code}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Edit an organization */ - put: operations["edit"]; - post?: never; - /** Delete an organization */ - delete: operations["delete-one"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/organizations/{code}/send-verify-email": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Send verification email */ - post: operations["send-email-verification"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/orgs/{code}/send-verify-email": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Send verification email */ - post: operations["send-email-verification"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/organizations/{code}/send-verify-email": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Send verification email */ - post: operations["send-email-verification"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/orgs/{code}/send-verify-email": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Send verification email */ - post: operations["send-email-verification"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/organizations/verify-email": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Verify organization email by token */ - get: operations["verify-email"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/orgs/verify-email": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Verify organization email by token */ - get: operations["verify-email"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/organizations/verify-email": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Verify organization email by token */ - get: operations["verify-email"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/orgs/verify-email": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Verify organization email by token */ - get: operations["verify-email"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/organizations/{code}/roles": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get user roles */ - get: operations["get-one"]; - put?: never; - /** Add user role */ - post: operations["add-user"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/orgs/{code}/roles": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get user roles */ - get: operations["get-one"]; - put?: never; - /** Add user role */ - post: operations["add-user"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/organizations/{code}/roles": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get user roles */ - get: operations["get-one"]; - put?: never; - /** Add user role */ - post: operations["add-user"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/orgs/{code}/roles": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get user roles */ - get: operations["get-one"]; - put?: never; - /** Add user role */ - post: operations["add-user"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/organizations/{code}/roles/{id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Edit user role */ - put: operations["edit-user"]; - post?: never; - /** Remove user role */ - delete: operations["delete-user"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/orgs/{code}/roles/{id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Edit user role */ - put: operations["edit-user"]; - post?: never; - /** Remove user role */ - delete: operations["delete-user"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/organizations/{code}/roles/{id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Edit user role */ - put: operations["edit-user"]; - post?: never; - /** Remove user role */ - delete: operations["delete-user"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/orgs/{code}/roles/{id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Edit user role */ - put: operations["edit-user"]; - post?: never; - /** Remove user role */ - delete: operations["delete-user"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/organizations/{code}/roles/{id}/accept": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Accept user role */ - post: operations["accept-user-role"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/orgs/{code}/roles/{id}/accept": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Accept user role */ - post: operations["accept-user-role"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/organizations/{code}/roles/{id}/accept": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Accept user role */ - post: operations["accept-user-role"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/orgs/{code}/roles/{id}/accept": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Accept user role */ - post: operations["accept-user-role"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/organizations/{code}/roles/{id}/reject": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Reject user role */ - post: operations["decline-user-role"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/orgs/{code}/roles/{id}/reject": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Reject user role */ - post: operations["decline-user-role"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/organizations/{code}/roles/{id}/reject": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Reject user role */ - post: operations["decline-user-role"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/orgs/{code}/roles/{id}/reject": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Reject user role */ - post: operations["decline-user-role"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/orgs/{code}/billing/settings": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get billing settings */ - get: operations["get-settings"]; - /** Update billing settings */ - put: operations["setup-intent"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/orgs/{code}/billing/settings": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get billing settings */ - get: operations["get-settings"]; - /** Update billing settings */ - put: operations["setup-intent"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/orgs/{code}/billing/receipts/{year}/{month}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get billing month usage total */ - get: operations["get-monthly"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/orgs/{code}/billing/receipts/{year}/{month}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get billing month usage total */ - get: operations["get-monthly"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/orgs/{code}/secrets": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** List secrets */ - get: operations["list-secrets"]; - /** Update secrets */ - put: operations["put"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/orgs/{code}/secrets": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** List secrets */ - get: operations["list-secrets"]; - /** Update secrets */ - put: operations["put"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/rpc/{code}/chains": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** List chains */ - get: operations["list-chains"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/rpc/{code}/chains": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** List chains */ - get: operations["list-chains"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/rpc/{code}/token": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get organization token */ - get: operations["get-token"]; - put?: never; - /** Refresh organization token */ - post: operations["refresh-token"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/rpc/{code}/token": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get organization token */ - get: operations["get-token"]; - put?: never; - /** Refresh organization token */ - post: operations["refresh-token"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/quotas/{code}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get quotas */ - get: operations["get"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/quotas/{code}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get quotas */ - get: operations["get"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/orgs/{code}/monitoring/squids/{query}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get squids metric */ - get: operations["squids"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/orgs/{code}/monitoring/squids/{query}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get squids metric */ - get: operations["squids"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/orgs/{code}/monitoring/squids": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Scrape metrics */ - get: operations["squids-all-prom"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v1/orgs/{code}/monitoring/squids": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Scrape metrics */ - get: operations["squids-all-prom"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; -} -export type webhooks = Record; -export interface components { - schemas: { - AuthResponse: { - /** @example */ - token: string; - }; - ResetPasswordResponse: { - /** @example true */ - success: boolean; - }; - UnauthorizedResponse: { - /** @example CREDENTIALS_INVALID */ - error: string; - }; - DeployLog: { - severity: string; - message: string; - }; - DeployUserResponse: { - /** @example 90046784-ef9a-42b4-9dcf-ca4e4ed2cf4a */ - id: string; - /** @example user@gmail.com */ - email: string; - /** @example John Doe */ - fullName: string; - }; - DeployResponseV0: { - id: number; - /** @enum {string} */ - type: DeployResponseV0Type; - /** @enum {string} */ - status: DeployResponseV0Status; - /** @enum {string} */ - failed: DeployResponseV0Failed; - logs: components["schemas"]["DeployLog"][]; - squidName: string; - versionName: string; - orgCode: string; - deploymentUrl: string; - /** Format: date-time */ - updatedAt: string; - /** Format: date-time */ - createdAt: string; - user: components["schemas"]["DeployUserResponse"]; - }; - SquidOrganizationResponseV0: { - /** @example 550e8400-e29b-41d4-a716-446655440000 */ - id: string; - /** @example Subsquid GmbH */ - name: string; - /** @example subsquid-org */ - code: string; - }; - SquidApiResponseV0: { - /** @example https://squid.subsquid.io/mysquid/graphql */ - url: string; - /** @enum {string} */ - status: SquidApiResponseV0Status; - }; - SquidSyncStatusResponse: { - /** @example 1 */ - totalBlocks: number; - /** @example 1 */ - currentBlock: number; - }; - SquidProcessorResponseV0: { - /** @example processor */ - name: string; - /** @enum {string} */ - status: SquidProcessorResponseV0Status; - syncState: components["schemas"]["SquidSyncStatusResponse"]; - }; - SquidDBResponseV0: Record; - SquidAddonsHasuraResponseV0: { - replicas: number; - profile: string; - }; - SquidDiskResponseV0: { - /** @enum {string} */ - usageStatus: SquidDiskResponseV0UsageStatus; - usedBytes: number; - totalBytes: number; - }; - SquidAddonsPostgresResponseV0: { - connections: string[]; - disk: components["schemas"]["SquidDiskResponseV0"]; - }; - SquidAddonsNeonResponseV0: { - connections: string[]; - }; - SquidAddonsResponseV0: { - hasura?: components["schemas"]["SquidAddonsHasuraResponseV0"]; - postgres?: components["schemas"]["SquidAddonsPostgresResponseV0"]; - neon?: components["schemas"]["SquidAddonsNeonResponseV0"]; - }; - SquidLastDeployV0: { - /** @example 123 */ - id: number; - /** - * @example DEPLOY - * @enum {string} - */ - type: SquidLastDeployV0Type; - /** - * @example UNPACKING - * @enum {string} - */ - status: SquidLastDeployV0Status; - /** - * @example NO - * @enum {string} - */ - failed: SquidLastDeployV0Failed; - /** @example true */ - running: boolean; - }; - SquidRunningDeployV0: { - /** @example 123 */ - id: number; - /** - * @example DELETE - * @enum {string} - */ - type: SquidRunningDeployV0Type; - }; - VersionResponseV0: { - id: number; - name: string; - version: string; - description?: Record; - tags: string[]; - imageUrl?: string; - aliases: string[]; - urls: string[]; - /** @description The unmodified squid manifest */ - manifestYaml?: Record; - /** @description The package.json found in source code */ - packageJson: Record; - /** @example { - * "default for v1": "query { ... }", - * "another query label": "query { ... }" - * } */ - queries: Record; - artifactUrl: string; - api: components["schemas"]["SquidApiResponseV0"]; - processors: components["schemas"]["SquidProcessorResponseV0"][]; - db?: components["schemas"]["SquidDBResponseV0"]; - addons?: components["schemas"]["SquidAddonsResponseV0"]; - spec: string; - /** Format: date-time */ - createdAt: string; - lastDeploy?: components["schemas"]["SquidLastDeployV0"] | null; - /** @enum {string|null} */ - status?: VersionResponseV0Status; - /** - * @deprecated - * @description Use `lastDeploy` fields instead. - */ - runningDeploy?: components["schemas"]["SquidRunningDeployV0"] | null; - /** - * @deprecated - * @description Use `status` fields instead. - */ - deploy: Record; - deployCount: number; - deployedAt?: Record; - hibernatedAt?: Record; - /** @deprecated */ - manifest?: Record; - /** @deprecated */ - deploymentUrl?: string; - }; - SquidResponseV0: { - /** @example 1 */ - id: number; - /** @example my-squid */ - name: string; - organization: components["schemas"]["SquidOrganizationResponseV0"]; - versions: components["schemas"]["VersionResponseV0"][]; - }; - IngressRequestsMetric: { - /** Format: date-time */ - time: string; - squidId: number; - /** @enum {string} */ - res: IngressRequestsMetricRes; - }; - IngressSquidLatency: { - p50: number; - p90: number; - p95: number; - p99: number; - }; - IngressSquidRequestsStat: { - count: string; - bytesSend: string; - latency: components["schemas"]["IngressSquidLatency"]; - }; - IngressSquidRequestsMetricValue: { - /** Format: date-time */ - ts: string; - success: components["schemas"]["IngressSquidRequestsStat"]; - error: components["schemas"]["IngressSquidRequestsStat"]; - }; - IngressSquidRequestsMetric: { - /** @enum {string} */ - timeGroup: IngressSquidRequestsMetricTimeGroup; - metrics: components["schemas"]["IngressSquidRequestsMetricValue"][]; - }; - SquidUsageMetricValue: { - /** Format: date-time */ - ts: string; - apiCpuUsage: number; - apiCpuRequested: number; - apiMemUsageMb: number; - apiMemRequestedMb: number; - processorCpuUsage: number; - processorCpuRequested: number; - processorMemUsageMb: number; - processorMemRequestedMb: number; - dbCpuUsage: number; - dbCpuRequested: number; - dbDiskUsageMb: number; - dbDiskRequestedMb: number; - }; - SquidUsageMetric: { - /** @enum {string} */ - timeGroup: SquidUsageMetricTimeGroup; - metrics: components["schemas"]["SquidUsageMetricValue"][]; - }; - SquidHistoryLogsResponse: { - logs: string[]; - nextPage: Record; - }; - UploadUrlResponse: { - uploadUrl: string; - uploadFields: Record; - fileUrl: string; - maxUploadBytes: number; - }; - DeployOrganizationResponse: { - /** @example 550e8400-e29b-41d4-a716-446655440000 */ - id: string; - /** @example Subsquid GmbH */ - name: string; - /** @example subsquid-org */ - code: string; - }; - DeploySquidResponse: { - /** @example 1 */ - id: number; - /** @example my-squid */ - name: string; - /** @example abc12 */ - slot: string; - }; - DeployResponse: { - id: number; - /** @enum {string} */ - type: DeployResponseType; - /** @enum {string} */ - status: DeployResponseStatus; - /** @enum {string} */ - failed: DeployResponseFailed; - logs: components["schemas"]["DeployLog"][]; - organization: components["schemas"]["DeployOrganizationResponse"]; - deploymentUrl: string; - /** Format: date-time */ - updatedAt: string; - /** Format: date-time */ - createdAt: string; - user: components["schemas"]["DeployUserResponse"] | null; - squid: components["schemas"]["DeploySquidResponse"] | null; - }; - SquidTagResponse: { - name: string; - }; - SquidUrlResponse: { - /** @example api */ - component: string; - /** @example canonical */ - type: string; - /** @example https://squid.subsquid.io/mysquid/graphql */ - url: string; - }; - SquidApiResponse: { - /** @example https://squid.subsquid.io/mysquid/graphql */ - url: string; - /** @enum {string} */ - status: SquidApiResponseStatus; - }; - SquidProcessorResponse: { - /** @example processor */ - name: string; - /** @enum {string} */ - status: SquidProcessorResponseStatus; - syncState: components["schemas"]["SquidSyncStatusResponse"]; - }; - SquidAddonsHasuraResponse: { - replicas: number; - profile: string; - }; - PostgresConnectionParams: { - /** @example pg.sqd.dev */ - host: string; - /** @example owner */ - user: string; - /** @example dbname */ - database: string; - /** @example random_password */ - password: string; - }; - PostgresConnection: { - /** @example postgresql://user:password@host/db?sslmode=require */ - uri: string; - params: components["schemas"]["PostgresConnectionParams"]; - }; - SquidDiskResponse: { - /** @enum {string} */ - usageStatus: SquidDiskResponseUsageStatus; - usedBytes: number; - totalBytes: number; - }; - SquidAddonsPostgresResponse: { - connections: components["schemas"]["PostgresConnection"][]; - disk: components["schemas"]["SquidDiskResponse"]; - }; - SquidAddonsNeonResponse: { - connections: components["schemas"]["PostgresConnection"][]; - }; - SquidAddonsResponse: { - hasura?: components["schemas"]["SquidAddonsHasuraResponse"]; - postgres?: components["schemas"]["SquidAddonsPostgresResponse"]; - neon?: components["schemas"]["SquidAddonsNeonResponse"]; - }; - SquidLastDeploy: { - /** @example 123 */ - id: number; - /** - * @example DEPLOY - * @enum {string} - */ - type: SquidLastDeployType; - /** - * @example UNPACKING - * @enum {string} - */ - status: SquidLastDeployStatus; - /** - * @example NO - * @enum {string} - */ - failed: SquidLastDeployFailed; - /** @example true */ - running: boolean; - }; - SquidOrganizationResponse: { - /** @example 550e8400-e29b-41d4-a716-446655440000 */ - id: string; - /** @example Subsquid GmbH */ - name: string; - /** @example subsquid-org */ - code: string; - }; - SquidResponse: { - id: number; - name: string; - slot: string; - description?: Record; - imageUrl?: string; - tags: components["schemas"]["SquidTagResponse"][]; - urls: components["schemas"]["SquidUrlResponse"][]; - /** @description The unmodified squid manifest */ - manifestYaml?: Record; - /** @description The package.json found in source code */ - packageJson: Record; - artifactUrl: string; - api?: components["schemas"]["SquidApiResponse"]; - processors?: components["schemas"]["SquidProcessorResponse"][]; - addons?: components["schemas"]["SquidAddonsResponse"]; - spec: string; - /** Format: date-time */ - createdAt: string; - lastDeploy?: components["schemas"]["SquidLastDeploy"]; - /** @enum {string} */ - status?: SquidResponseStatus; - deployCount: number; - /** Format: date-time */ - deployedAt?: string; - /** Format: date-time */ - hibernatedAt?: string; - organization: components["schemas"]["SquidOrganizationResponse"]; - }; - EmailResponse: { - /** @example user@gmail.com */ - current: string; - /** @example user_new@gmail.com */ - pendingVerification: string; - }; - UserResponse: { - /** @example 90046784-ef9a-42b4-9dcf-ca4e4ed2cf4a */ - id: string; - /** @example user@gmail.com */ - email: string; - /** @example user@gmail.com */ - coinlistEmail: components["schemas"]["EmailResponse"]; - /** @example John Doe */ - fullName: string; - /** @example user */ - username: string; - /** @example https://gravatar.com/1.jpg */ - avatarUrl: string; - /** @example { - * "occupation": "Backend developer", - * "source": "Twitter", - * "customSource": "", - * "usage": "DeFi", - * "customUsage": "" - * } */ - onboardingForm: Record; - /** @example true */ - policyAccepted: boolean; - /** @example false */ - onboardingFormCompleted: boolean; - /** @example false */ - emailVerified: boolean; - organizations?: string[]; - /** @example false */ - wallet: Record; - /** @example false */ - social: Record; - }; - KeyResponse: { - key: string; - }; - UserInviteProjectResponse: { - /** @example new-project */ - code: string; - /** @example New project */ - name: string; - }; - UserInviteResponse: { - /** @example 90046784-ef9a-42b4-9dcf-ca4e4ed2cf4a */ - id: string; - /** @example admin@subsquid.io */ - invitedBy: string; - organization: components["schemas"]["UserInviteProjectResponse"]; - }; - UserTokenResponse: { - /** @example my-token */ - name: string; - }; - ApiTokenResponse: { - /** @example 50e8400-e29b-41d4-a716-446655440000 */ - id: string; - /** @example my-token */ - name: string; - /** - * Format: date-time - * @example 2024-01-01T11:00:00.000Z - */ - createdAt: string; - /** @example 2039-12-31T11:00:00.000Z */ - expiresAt: Record; - }; - NotificationEmailResponse: { - /** @example current@example.com */ - email: string; - /** @example new@example.com */ - pendingEmail: string; - }; - OrganizationLimitsResponse: { - /** @example 3 */ - squids: number; - /** @example false */ - playground: boolean; - }; - OrganizationBillingsDetails: { - /** @example John Doe */ - name: string; - /** @example Subsquid */ - company: string; - /** @example billing@subsquid.io */ - email: string; - /** @example Mythenquai 2 */ - addressLine1: string; - /** @example Zurich */ - city: string; - /** @example 10004 */ - zipCode: string; - }; - OrganizationResponse: { - /** @example org_DI4wZx0FAJa93tq3iNr1wc7H */ - id: string; - /** @example organization_unique_code */ - code: string; - /** @example My first organization */ - name: string; - email: components["schemas"]["NotificationEmailResponse"]; - /** @example admin */ - roleType: string; - /** - * @example ACTIVE - * @enum {string} - */ - status: OrganizationResponseStatus; - limits: components["schemas"]["OrganizationLimitsResponse"]; - billingDetails: components["schemas"]["OrganizationBillingsDetails"]; - }; - OrganizationRoleResponse: { - /** @example 88a02891-c461-4c1b-b705-13c8e6fdf7c0 */ - id: string; - /** @example test@gmail.com */ - email: string; - /** @example John Doe */ - fullName: string; - /** @example admin */ - type: string; - /** - * @example accepted - * @enum {string} - */ - status: OrganizationRoleResponseStatus; - }; - SecretsResponse: { - /** @example { - * "MY_SECRET": "VALUE" - * } */ - secrets: Record; - }; - ChainResponse: { - /** @example eth */ - id: string; - /** @example Ethereum */ - title: string; - /** @example https://cdn.subsquid.io/images/eth.svg */ - iconUrl: string; - /** @enum {string} */ - type: ChainResponseType; - /** @example 100000000 */ - requests: string; - /** @example false */ - testnet: boolean; - /** @example https://rpc.subsquid.io/eth/{{TOKEN}} */ - url: string; - }; - TokenResponse: { - /** @example sqd_prod_g9FsTC9NXkIPLsIJPZq0 */ - token: string; - }; - QuotaResponse: { - /** @enum {string} */ - id: QuotaResponseId; - /** @example 1.00 */ - usage: string; - /** @example 100.00 */ - capacity: string; - }; - MetricLabelResponse: { - container: string; - squid_id: string; - squid_name: string; - }; - MetricResponse: { - labels: components["schemas"]["MetricLabelResponse"]; - values: string[]; - }; - }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; -} -export type $defs = Record; -export interface operations { - signin: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - email: string; - password: string; - }; - }; - }; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["AuthResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - }; - }; - signin: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - email: string; - password: string; - }; - }; - }; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["AuthResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - }; - }; - signup: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - fullName: string; - email: string; - password: string; - subscribeToNewsletter?: boolean; - turnstileToken: string; - }; - }; - }; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["AuthResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - }; - }; - signup: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - fullName: string; - email: string; - password: string; - subscribeToNewsletter?: boolean; - turnstileToken: string; - }; - }; - }; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["AuthResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - }; - }; - restore: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - email: string; - }; - }; - }; - responses: { - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - }; - }; - restore: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - email: string; - }; - }; - }; - responses: { - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - }; - }; - "restore-confirm": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - token: string; - password: string; - }; - }; - }; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["ResetPasswordResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - }; - }; - "restore-confirm": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - token: string; - password: string; - }; - }; - }; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["ResetPasswordResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - }; - }; - "confirm-email": { - parameters: { - query: { - code: string; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - "confirm-email": { - parameters: { - query: { - code: string; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - github: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - github: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - "github-auth": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - code: string; - }; - }; - }; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["AuthResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - }; - }; - "github-auth": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - code: string; - }; - }; - }; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["AuthResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - }; - }; - google: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - google: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - "google-auth": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - code: string; - }; - }; - }; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["AuthResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - }; - }; - "google-auth": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - code: string; - }; - }; - }; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["AuthResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - }; - }; - "deploy-squid": { - parameters: { - query?: never; - header?: never; - path: { - code: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - hardReset?: boolean; - artifactUrl: string; - /** @default squid.yaml */ - manifestPath?: string; - updateSlot?: string; - tag?: string; - }; - }; - }; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["DeployResponseV0"][]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "list-squids": { - parameters: { - query?: { - search?: string; - organization?: string; - }; - header?: never; - path: { - code: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["SquidResponseV0"][]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "get-squid": { - parameters: { - query?: never; - header?: never; - path: { - code: string; - squid: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["SquidResponseV0"]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "delete-squid": { - parameters: { - query?: never; - header?: never; - path: { - code: string; - squid: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["SquidResponseV0"]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "destroy-squid-version": { - parameters: { - query?: never; - header?: never; - path: { - code: string; - squid: string; - version: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["SquidResponseV0"]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "restart-squid-version": { - parameters: { - query?: never; - header?: never; - path: { - code: string; - squid: string; - version: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["DeployResponseV0"]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "hibernate-squid": { - parameters: { - query?: never; - header?: never; - path: { - code: string; - squid: string; - version: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["DeployResponseV0"]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "daily-requests": { - parameters: { - query: { - organization?: string; - from: string; - to: string; - }; - header?: never; - path: { - code: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["IngressRequestsMetric"][]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "daily-requests": { - parameters: { - query: { - organization?: string; - from: string; - to: string; - }; - header?: never; - path: { - code: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["IngressRequestsMetric"][]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "ingress-stats": { - parameters: { - query: { - organization?: string; - from: string; - to: string; - }; - header?: never; - path: { - code: string; - id: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["IngressSquidRequestsMetric"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "ingress-stats": { - parameters: { - query: { - organization?: string; - from: string; - to: string; - }; - header?: never; - path: { - code: string; - id: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["IngressSquidRequestsMetric"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - usage: { - parameters: { - query: { - organization?: string; - from: string; - to: string; - }; - header?: never; - path: { - code: string; - id: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["SquidUsageMetric"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - usage: { - parameters: { - query: { - organization?: string; - from: string; - to: string; - }; - header?: never; - path: { - code: string; - id: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["SquidUsageMetric"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "fetch-logs-history": { - parameters: { - query: { - level?: PathsOrgsCodeSquidsSquidNameVersionsVersionNameLogsHistoryGetParametersQueryLevel[]; - container?: string[]; - search?: string; - nextPage?: string; - from: string; - limit?: number; - }; - header?: never; - path: { - code: string; - squidName: string; - versionName: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SquidHistoryLogsResponse"]; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "tail-logs": { - parameters: { - query?: { - level?: PathsOrgsCodeSquidsSquidNameVersionsVersionNameLogsFollowGetParametersQueryLevel[]; - container?: string[]; - search?: string; - }; - header?: never; - path: { - code: string; - squidName: string; - versionName: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - squid: { - parameters: { - query?: never; - header?: never; - path: { - code: string; - squid: string; - version: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - allowedOrigins?: string[]; - }; - }; - }; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["SquidResponseV0"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "upload-url": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["UploadUrlResponse"]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "upload-url": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["UploadUrlResponse"]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "get-all": { - parameters: { - query?: { - squidId?: number; - statusGroup?: PathsOrgsCodeDeploysGetParametersQueryStatusGroup; - }; - header?: never; - path: { - code: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["DeployResponseV0"][]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "get-one": { - parameters: { - query?: never; - header?: never; - path: { - code: string; - id: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["DeployResponseV0"]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "get-all": { - parameters: { - query?: { - squidId?: number; - statusGroup?: PathsV1OrgsCodeDeploysGetParametersQueryStatusGroup; - }; - header?: never; - path: { - code: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["DeployResponse"][]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "get-one": { - parameters: { - query?: never; - header?: never; - path: { - code: string; - id: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["DeployResponse"]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "deploy-squid": { - parameters: { - query?: never; - header?: never; - path: { - org: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - hardReset?: boolean; - artifactUrl: string; - /** @default squid.yaml */ - manifestPath?: string; - updateSlot?: string; - tag?: string; - }; - }; - }; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["DeployResponse"][]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "list-squids": { - parameters: { - query?: { - search?: string; - organization?: string; - }; - header?: never; - path: { - org: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["SquidResponse"][]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "list-squids": { - parameters: { - query?: { - search?: string; - organization?: string; - }; - header?: never; - path: { - org: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["SquidResponse"][]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "get-squid": { - parameters: { - query?: never; - header?: never; - path: { - org: string; - squid: string; - slot: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["SquidResponse"]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "delete-squid": { - parameters: { - query?: never; - header?: never; - path: { - org: string; - squid: string; - slot: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["DeployResponse"]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "restart-squid": { - parameters: { - query?: never; - header?: never; - path: { - org: string; - squid: string; - slot: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["DeployResponse"]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "hibernate-squid": { - parameters: { - query?: never; - header?: never; - path: { - org: string; - squid: string; - slot: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["DeployResponse"]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "tag-squid": { - parameters: { - query?: never; - header?: never; - path: { - org: string; - squid: string; - slot: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - tag: string; - }; - }; - }; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["DeployResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "fetch-logs-history": { - parameters: { - query: { - level?: PathsOrgsCodeSquidsSquidSlotsSlotLogsHistoryGetParametersQueryLevel[]; - container?: string[]; - search?: string; - nextPage?: string; - from: string; - limit?: number; - }; - header?: never; - path: { - code: string; - squid: string; - slot: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["SquidHistoryLogsResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "fetch-logs-history": { - parameters: { - query: { - level?: PathsV1OrgsCodeSquidsSquidSlotsSlotLogsHistoryGetParametersQueryLevel[]; - container?: string[]; - search?: string; - nextPage?: string; - from: string; - limit?: number; - }; - header?: never; - path: { - code: string; - squid: string; - slot: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["SquidHistoryLogsResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "tail-logs": { - parameters: { - query?: { - level?: PathsOrgsCodeSquidsSquidSlotsSlotLogsFollowGetParametersQueryLevel[]; - container?: string[]; - search?: string; - }; - header?: never; - path: { - code: string; - squid: string; - slot: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "tail-logs": { - parameters: { - query?: { - level?: PathsV1OrgsCodeSquidsSquidSlotsSlotLogsFollowGetParametersQueryLevel[]; - container?: string[]; - search?: string; - }; - header?: never; - path: { - code: string; - squid: string; - slot: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "get-profile": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["UserResponse"]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "update-profile": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - fullName: string; - }; - }; - }; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["UserResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "get-profile": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["UserResponse"]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "update-profile": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - fullName: string; - }; - }; - }; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["UserResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "on-boarding-form": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - policyAccepted?: boolean; - subscribeNewsletter?: boolean; - onboardingForm?: { - occupation: string; - source: string; - usage: string; - }; - }; - }; - }; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["UserResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "on-boarding-form": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - policyAccepted?: boolean; - subscribeNewsletter?: boolean; - onboardingForm?: { - occupation: string; - source: string; - usage: string; - }; - }; - }; - }; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["UserResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "change-password": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - oldPassword: string; - newPassword: string; - }; - }; - }; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["UserResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "change-password": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - oldPassword: string; - newPassword: string; - }; - }; - }; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["UserResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "resend-coinlist-email-confirm": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** Format: email */ - coinlistEmail: string; - }; - }; - }; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["UserResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "resend-coinlist-email-confirm": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - /** Format: email */ - coinlistEmail: string; - }; - }; - }; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["UserResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "resend-email-confirm": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["UserResponse"]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "resend-email-confirm": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["UserResponse"]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - key: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["KeyResponse"]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - key: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["KeyResponse"]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "get-invites": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["UserInviteResponse"][]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "get-invites": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["UserInviteResponse"][]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "get-squids-v-0": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["SquidResponseV0"][]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "get-squids-v-1": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["SquidResponse"][]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "get-tokens": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["UserTokenResponse"][]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "get-tokens": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["UserTokenResponse"][]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "get-tokens": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["ApiTokenResponse"][]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "create-token": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - name: string; - /** Format: date-time */ - expiresAt?: string | null; - }; - }; - }; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["ApiTokenResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "get-tokens": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["ApiTokenResponse"][]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "create-token": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - name: string; - /** Format: date-time */ - expiresAt?: string | null; - }; - }; - }; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["ApiTokenResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "deactivate-token": { - parameters: { - query?: never; - header?: never; - path: { - id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["ApiTokenResponse"]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "deactivate-token": { - parameters: { - query?: never; - header?: never; - path: { - id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["ApiTokenResponse"]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "list-organizations": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["OrganizationResponse"][]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - create: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - code: string; - name: string; - /** Format: email */ - email: string; - }; - }; - }; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["OrganizationResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "list-organizations": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["OrganizationResponse"][]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - create: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - code: string; - name: string; - /** Format: email */ - email: string; - }; - }; - }; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["OrganizationResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "list-organizations": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["OrganizationResponse"][]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - create: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - code: string; - name: string; - /** Format: email */ - email: string; - }; - }; - }; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["OrganizationResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "list-organizations": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["OrganizationResponse"][]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - create: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - code: string; - name: string; - /** Format: email */ - email: string; - }; - }; - }; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["OrganizationResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "get-organization": { - parameters: { - query?: never; - header?: never; - path: { - org: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["OrganizationResponse"]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "get-organization": { - parameters: { - query?: never; - header?: never; - path: { - org: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["OrganizationResponse"]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "get-organization": { - parameters: { - query?: never; - header?: never; - path: { - org: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["OrganizationResponse"]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "get-organization": { - parameters: { - query?: never; - header?: never; - path: { - org: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["OrganizationResponse"]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - edit: { - parameters: { - query?: never; - header?: never; - path: { - code: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - name: string; - /** Format: email */ - email: string; - }; - }; - }; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["OrganizationResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "delete-one": { - parameters: { - query?: never; - header?: never; - path: { - code: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["OrganizationResponse"]; - }; - }; - }; - }; - }; - edit: { - parameters: { - query?: never; - header?: never; - path: { - code: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - name: string; - /** Format: email */ - email: string; - }; - }; - }; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["OrganizationResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "delete-one": { - parameters: { - query?: never; - header?: never; - path: { - code: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["OrganizationResponse"]; - }; - }; - }; - }; - }; - edit: { - parameters: { - query?: never; - header?: never; - path: { - code: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - name: string; - /** Format: email */ - email: string; - }; - }; - }; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["OrganizationResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "delete-one": { - parameters: { - query?: never; - header?: never; - path: { - code: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["OrganizationResponse"]; - }; - }; - }; + SquidLastDeploy: { + /** @example 123 */ + id: number; + /** + * @example DEPLOY + * @enum {string} + */ + type: SquidLastDeployType; + /** + * @example UNPACKING + * @enum {string} + */ + status: SquidLastDeployStatus; + /** + * @example NO + * @enum {string} + */ + failed: SquidLastDeployFailed; + /** @example true */ + running: boolean; }; - }; - edit: { - parameters: { - query?: never; - header?: never; - path: { - code: string; - }; - cookie?: never; + SquidOrganizationResponse: { + /** @example 550e8400-e29b-41d4-a716-446655440000 */ + id: string; + /** @example Subsquid GmbH */ + name: string; + /** @example subsquid-org */ + code: string; }; - requestBody: { - content: { - "application/json": { - name: string; - /** Format: email */ - email: string; - }; - }; + SquidLinks: { + /** @description https://cloud.sqd.dev/squids/test/76zvzw */ + cloudUrl: string; + /** @description eu.gcr.io/bright-meridian-316511/test-13484-76zvzw:8ba4f6c0ad1eb097de435d5458c5365d447fe481 */ + dockerImageUrl: string; }; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["OrganizationResponse"]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; + SquidResponse: { + /** @example 123 */ + id: number; + /** @example my-squid */ + name: string; + /** @example my-squid:4fush9 */ + reference: string; + /** @example 4fush9 */ + slot: string; + description?: string | null; + tags: components["schemas"]["SquidTagResponse"][]; + manifest: components["schemas"]["SquidManifestResponse"]; + /** @description The package.json found in source code */ + packageJson: Record; + api?: components["schemas"]["SquidApiResponse"]; + processors?: components["schemas"]["SquidProcessorResponse"][]; + addons?: components["schemas"]["SquidAddonsResponse"]; + spec: number; + lastDeploy?: components["schemas"]["SquidLastDeploy"]; + /** @enum {string} */ + status?: SquidResponseStatus; + organization: components["schemas"]["SquidOrganizationResponse"]; + /** + * Format: date-time + * @example 2025-01-01T00:00:00.000Z + */ + hibernatedAt?: string; + /** + * Format: date-time + * @example 2025-01-01T00:00:00.000Z + */ + deployedAt?: string; + links: components["schemas"]["SquidLinks"]; + /** + * Format: date-time + * @example 2025-01-01T00:00:00.000Z + */ + createdAt: string; }; - }; - "delete-one": { - parameters: { - query?: never; - header?: never; - path: { - code: string; - }; - cookie?: never; + SquidLogResponse: { + id: string | null; + /** Format: date-time */ + timestamp: string | null; + container: string; + level: string; + payload: Record; }; - requestBody?: never; - responses: { - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["OrganizationResponse"]; - }; - }; - }; + SquidHistoryLogsResponse: { + logs: components["schemas"]["SquidLogResponse"][]; + nextPage: string | null; }; - }; - "send-email-verification": { - parameters: { - query?: never; - header?: never; - path: { - code: string; - }; - cookie?: never; + NotificationEmailResponse: { + /** @example current@example.com */ + email: string; + /** @example new@example.com */ + pendingEmail: string; }; - requestBody: { - content: { - "application/json": { - email: string; - }; - }; + OrganizationLimitsResponse: { + /** @example 3 */ + squids: number; + /** @example false */ + playground: boolean; }; - responses: { - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; + OrganizationBillingsDetails: { + /** @example John Doe */ + name: string; + /** @example Subsquid */ + company: string; + /** @example billing@subsquid.io */ + email: string; + /** @example Mythenquai 2 */ + addressLine1: string; + /** @example Zurich */ + city: string; + /** @example 10004 */ + zipCode: string; }; - }; - "send-email-verification": { - parameters: { - query?: never; - header?: never; - path: { - code: string; - }; - cookie?: never; + OrganizationIntegrationsNeon: { + apiTokenMasked: string; }; - requestBody: { - content: { - "application/json": { - email: string; - }; - }; + OrganizationIntegrations: { + neon: components["schemas"]["OrganizationIntegrationsNeon"]; }; - responses: { - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; + OrganizationResponse: { + /** @example org_DI4wZx0FAJa93tq3iNr1wc7H */ + id: string; + /** @example organization_unique_code */ + code: string; + /** @example My first organization */ + name: string; + email: components["schemas"]["NotificationEmailResponse"]; + /** @example admin */ + roleType: string; + /** + * @example ACTIVE + * @enum {string} + */ + status: OrganizationResponseStatus; + limits: components["schemas"]["OrganizationLimitsResponse"]; + billingDetails: components["schemas"]["OrganizationBillingsDetails"]; + integrations: components["schemas"]["OrganizationIntegrations"]; }; - }; - "send-email-verification": { - parameters: { - query?: never; - header?: never; - path: { - code: string; - }; - cookie?: never; + UserResponse: { + /** @example 90046784-ef9a-42b4-9dcf-ca4e4ed2cf4a */ + id: string; + /** @example user@gmail.com */ + email: string; + /** @example John Doe */ + fullName: string; + /** @example user */ + username: string; + /** @example https://gravatar.com/1.jpg */ + avatarUrl: string; + /** @example { + * "occupation": "Backend developer", + * "source": "Twitter", + * "customSource": "", + * "usage": "DeFi", + * "customUsage": "" + * } */ + onboardingForm: Record; + /** @example true */ + policyAccepted: boolean; + /** @example false */ + onboardingFormCompleted: boolean; + /** @example false */ + emailVerified: boolean; + organizations?: components["schemas"]["OrganizationResponse"][]; }; - requestBody: { - content: { - "application/json": { - email: string; - }; - }; + OrganizationRoleResponse: { + /** @example 88a02891-c461-4c1b-b705-13c8e6fdf7c0 */ + id: string; + /** @example test@gmail.com */ + email: string; + /** @example John Doe */ + fullName: string; + /** @example admin */ + type: string; + /** + * @example accepted + * @enum {string} + */ + status: OrganizationRoleResponseStatus; }; - responses: { - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; + SecretsResponse: { + /** @example { + * "MY_SECRET": "VALUE" + * } */ + secrets: Record; }; - }; - "send-email-verification": { - parameters: { - query?: never; - header?: never; - path: { - code: string; - }; - cookie?: never; + ChainResponse: { + /** @example eth */ + id: string; + /** @example Ethereum */ + title: string; + /** @example https://cdn.subsquid.io/images/eth.svg */ + iconUrl: string; + /** @enum {string} */ + type: ChainResponseType; + /** @example 100000000 */ + requests: string; + /** @example false */ + testnet: boolean; + /** @example https://rpc.subsquid.io/eth/{{TOKEN}} */ + url: string; }; - requestBody: { - content: { - "application/json": { - email: string; - }; - }; + TokenResponse: { + /** @example sqd_prod_g9FsTC9NXkIPLsIJPZq0 */ + token: string; }; - responses: { - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; - }; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; + QuotaResponse: { + /** @enum {string} */ + id: QuotaResponseId; + /** @example 1.00 */ + usage: string; + /** @example 100.00 */ + capacity: string; }; - }; - "verify-email": { - parameters: { - query: { - code: string; - }; - header?: never; - path?: never; - cookie?: never; + MetricLabelResponse: { + container: string; + squid_id: string; + squid_name: string; }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; + MetricResponse: { + labels: components["schemas"]["MetricLabelResponse"]; + values: string[]; }; }; - "verify-email": { + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; +} +export type $defs = Record; +export interface operations { + SquidMetricsController_dailyRequests: { parameters: { query: { - code: string; + organization?: string; + from: string; + to: string; }; header?: never; - path?: never; + path: { + code: string; + }; cookie?: never; }; requestBody?: never; responses: { + /** @description Successful response */ 200: { headers: { [name: string]: unknown; }; - content?: never; - }; - }; - }; - "verify-email": { - parameters: { - query: { - code: string; + content: { + "application/json": { + /** @example null */ + error?: string; + payload?: components["schemas"]["IngressRequestsMetric"][]; + }; + }; }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { + /** @description Bad user input */ + 400: { headers: { [name: string]: unknown; }; - content?: never; - }; - }; - }; - "verify-email": { - parameters: { - query: { - code: string; + content: { + "application/json": { + error: string; + invalidFields: { + message: string; + path: string[]; + type: string; + }[]; + }; + }; }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { + /** @description Unauthorized */ + 401: { headers: { [name: string]: unknown; }; - content?: never; + content: { + "application/json": components["schemas"]["UnauthorizedResponse"]; + }; }; }; }; - "get-one": { + SquidMetricsController_ingressStats: { parameters: { - query?: never; + query: { + organization?: string; + from: string; + to: string; + }; header?: never; path: { code: string; + squid_id: number; }; cookie?: never; }; requestBody?: never; responses: { + /** @description Successful response */ 200: { headers: { [name: string]: unknown; @@ -6998,71 +1105,54 @@ export interface operations { "application/json": { /** @example null */ error?: string; - payload?: components["schemas"]["OrganizationRoleResponse"][]; + payload?: components["schemas"]["IngressSquidRequestsMetric"]; }; }; }; - }; - }; - "add-user": { - parameters: { - query?: never; - header?: never; - path: { - code: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - email: string; - /** @enum {string} */ - roleType: PathsOrganizationsCodeRolesPostRequestBodyApplicationJsonRoleType; - }; - }; - }; - responses: { - 201: { + /** @description Bad user input */ + 400: { headers: { [name: string]: unknown; }; content: { "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["OrganizationRoleResponse"]; + error: string; + invalidFields: { + message: string; + path: string[]; + type: string; + }[]; }; }; }; - 400: { + /** @description Unauthorized */ + 401: { headers: { [name: string]: unknown; }; content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; + "application/json": components["schemas"]["UnauthorizedResponse"]; }; }; }; }; - "get-one": { + SquidMetricsController_usage: { parameters: { - query?: never; + query: { + organization?: string; + from: string; + to: string; + }; header?: never; path: { code: string; + id: number; }; cookie?: never; }; requestBody?: never; responses: { + /** @description Successful response */ 200: { headers: { [name: string]: unknown; @@ -7071,72 +1161,48 @@ export interface operations { "application/json": { /** @example null */ error?: string; - payload?: components["schemas"]["OrganizationRoleResponse"][]; + payload?: components["schemas"]["SquidUsageMetric"]; }; }; }; - }; - }; - "add-user": { - parameters: { - query?: never; - header?: never; - path: { - code: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - email: string; - /** @enum {string} */ - roleType: PathsOrgsCodeRolesPostRequestBodyApplicationJsonRoleType; - }; - }; - }; - responses: { - 201: { + /** @description Bad user input */ + 400: { headers: { [name: string]: unknown; }; content: { "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["OrganizationRoleResponse"]; + error: string; + invalidFields: { + message: string; + path: string[]; + type: string; + }[]; }; }; }; - 400: { + /** @description Unauthorized */ + 401: { headers: { [name: string]: unknown; }; content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; + "application/json": components["schemas"]["UnauthorizedResponse"]; }; }; }; }; - "get-one": { + DeploymentController_uploadUrl: { parameters: { query?: never; header?: never; - path: { - code: string; - }; + path?: never; cookie?: never; }; requestBody?: never; responses: { - 200: { + /** @description Successful response */ + 201: { headers: { [name: string]: unknown; }; @@ -7144,32 +1210,37 @@ export interface operations { "application/json": { /** @example null */ error?: string; - payload?: components["schemas"]["OrganizationRoleResponse"][]; + payload?: components["schemas"]["UploadUrlResponse"]; }; }; }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["UnauthorizedResponse"]; + }; + }; }; }; - "add-user": { + DeploymentController_getAll: { parameters: { - query?: never; + query?: { + squidId?: number; + statusGroup?: PathsV1OrgsCodeDeploymentsGetParametersQueryStatusGroup; + }; header?: never; path: { code: string; }; cookie?: never; }; - requestBody: { - content: { - "application/json": { - email: string; - /** @enum {string} */ - roleType: PathsV1OrganizationsCodeRolesPostRequestBodyApplicationJsonRoleType; - }; - }; - }; + requestBody?: never; responses: { - 201: { + /** @description Successful response */ + 200: { headers: { [name: string]: unknown; }; @@ -7177,72 +1248,51 @@ export interface operations { "application/json": { /** @example null */ error?: string; - payload?: components["schemas"]["OrganizationRoleResponse"]; + payload?: components["schemas"]["DeploymentResponse"][]; }; }; }; + /** @description Bad user input */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; + error: string; + invalidFields: { + message: string; + path: string[]; + type: string; }[]; }; }; }; - }; - }; - "get-one": { - parameters: { - query?: never; - header?: never; - path: { - code: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { + /** @description Unauthorized */ + 401: { headers: { [name: string]: unknown; }; content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["OrganizationRoleResponse"][]; - }; + "application/json": components["schemas"]["UnauthorizedResponse"]; }; }; }; }; - "add-user": { + DeploymentController_getOne: { parameters: { query?: never; header?: never; path: { code: string; + id: number; }; cookie?: never; }; - requestBody: { - content: { - "application/json": { - email: string; - /** @enum {string} */ - roleType: PathsV1OrgsCodeRolesPostRequestBodyApplicationJsonRoleType; - }; - }; - }; + requestBody?: never; responses: { - 201: { + /** @description Successful response */ + 200: { headers: { [name: string]: unknown; }; @@ -7250,47 +1300,49 @@ export interface operations { "application/json": { /** @example null */ error?: string; - payload?: components["schemas"]["OrganizationRoleResponse"]; + payload?: components["schemas"]["DeploymentResponse"]; }; }; }; - 400: { + /** @description Unauthorized */ + 401: { headers: { [name: string]: unknown; }; content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; + "application/json": components["schemas"]["UnauthorizedResponse"]; }; }; }; }; - "edit-user": { + SquidController_deploySquid: { parameters: { query?: never; header?: never; path: { - code: string; - id: string; + org: string; }; cookie?: never; }; requestBody: { content: { "application/json": { - /** @enum {string} */ - roleType: PathsOrganizationsCodeRolesIdPutRequestBodyApplicationJsonRoleType; + artifactUrl: string; + /** @default squid.yaml */ + manifestPath?: string; + /** @default {} */ + options?: { + overrideSlot?: string; + hardReset?: boolean; + overrideName?: string; + tag?: string; + }; }; }; }; responses: { - 200: { + /** @description Successful response */ + 201: { headers: { [name: string]: unknown; }; @@ -7298,72 +1350,104 @@ export interface operations { "application/json": { /** @example null */ error?: string; - payload?: components["schemas"]["OrganizationRoleResponse"]; + payload?: components["schemas"]["DeploymentResponse"]; }; }; }; + /** @description Bad user input */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; + error: string; + invalidFields: { + message: string; + path: string[]; + type: string; }[]; }; }; }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["UnauthorizedResponse"]; + }; + }; }; }; - "delete-user": { + SquidController_listSquids: { parameters: { - query?: never; + query?: { + search?: string; + name?: string; + }; header?: never; path: { - code: string; - id: string; + org: string; }; cookie?: never; }; requestBody?: never; responses: { - 201: { + /** @description Successful response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @example null */ + error?: string; + payload?: components["schemas"]["SquidResponse"][]; + }; + }; + }; + /** @description Bad user input */ + 400: { headers: { [name: string]: unknown; }; content: { "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["OrganizationRoleResponse"]; + error: string; + invalidFields: { + message: string; + path: string[]; + type: string; + }[]; }; }; }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["UnauthorizedResponse"]; + }; + }; }; }; - "edit-user": { + SquidController_getSquid: { parameters: { query?: never; header?: never; path: { - code: string; - id: string; + org: string; + reference: string; }; cookie?: never; }; - requestBody: { - content: { - "application/json": { - /** @enum {string} */ - roleType: PathsOrgsCodeRolesIdPutRequestBodyApplicationJsonRoleType; - }; - }; - }; + requestBody?: never; responses: { + /** @description Successful response */ 200: { headers: { [name: string]: unknown; @@ -7372,39 +1456,34 @@ export interface operations { "application/json": { /** @example null */ error?: string; - payload?: components["schemas"]["OrganizationRoleResponse"]; + payload?: components["schemas"]["SquidResponse"]; }; }; }; - 400: { + /** @description Unauthorized */ + 401: { headers: { [name: string]: unknown; }; content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; + "application/json": components["schemas"]["UnauthorizedResponse"]; }; }; }; }; - "delete-user": { + SquidController_deleteSquid: { parameters: { query?: never; header?: never; path: { - code: string; - id: string; + org: string; + reference: string; }; cookie?: never; }; requestBody?: never; responses: { + /** @description Successful response */ 201: { headers: { [name: string]: unknown; @@ -7413,32 +1492,35 @@ export interface operations { "application/json": { /** @example null */ error?: string; - payload?: components["schemas"]["OrganizationRoleResponse"]; + payload?: components["schemas"]["DeploymentResponse"]; }; }; }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["UnauthorizedResponse"]; + }; + }; }; }; - "edit-user": { + SquidController_restartSquid: { parameters: { query?: never; header?: never; path: { - code: string; - id: string; + org: string; + reference: string; }; cookie?: never; }; - requestBody: { - content: { - "application/json": { - /** @enum {string} */ - roleType: PathsV1OrganizationsCodeRolesIdPutRequestBodyApplicationJsonRoleType; - }; - }; - }; + requestBody?: never; responses: { - 200: { + /** @description Successful response */ + 201: { headers: { [name: string]: unknown; }; @@ -7446,39 +1528,34 @@ export interface operations { "application/json": { /** @example null */ error?: string; - payload?: components["schemas"]["OrganizationRoleResponse"]; + payload?: components["schemas"]["DeploymentResponse"]; }; }; }; - 400: { + /** @description Unauthorized */ + 401: { headers: { [name: string]: unknown; }; content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; - }; + "application/json": components["schemas"]["UnauthorizedResponse"]; }; }; }; }; - "delete-user": { + SquidController_hibernateSquid: { parameters: { query?: never; header?: never; path: { - code: string; - id: string; + org: string; + reference: string; }; cookie?: never; }; requestBody?: never; responses: { + /** @description Successful response */ 201: { headers: { [name: string]: unknown; @@ -7487,31 +1564,35 @@ export interface operations { "application/json": { /** @example null */ error?: string; - payload?: components["schemas"]["OrganizationRoleResponse"]; + payload?: components["schemas"]["DeploymentResponse"]; }; }; }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["UnauthorizedResponse"]; + }; + }; }; }; - "edit-user": { + SquidController_addTag: { parameters: { query?: never; header?: never; path: { - code: string; - id: string; + org: string; + reference: string; + tag: string; }; cookie?: never; }; - requestBody: { - content: { - "application/json": { - /** @enum {string} */ - roleType: PathsV1OrgsCodeRolesIdPutRequestBodyApplicationJsonRoleType; - }; - }; - }; + requestBody?: never; responses: { + /** @description Successful response */ 200: { headers: { [name: string]: unknown; @@ -7520,39 +1601,51 @@ export interface operations { "application/json": { /** @example null */ error?: string; - payload?: components["schemas"]["OrganizationRoleResponse"]; + payload?: components["schemas"]["DeploymentResponse"]; }; }; }; + /** @description Bad user input */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; + error: string; + invalidFields: { + message: string; + path: string[]; + type: string; }[]; }; }; }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["UnauthorizedResponse"]; + }; + }; }; }; - "delete-user": { + SquidController_removeTag: { parameters: { query?: never; header?: never; path: { - code: string; - id: string; + org: string; + reference: string; + tag: string; }; cookie?: never; }; requestBody?: never; responses: { + /** @description Successful response */ 201: { headers: { [name: string]: unknown; @@ -7561,51 +1654,58 @@ export interface operations { "application/json": { /** @example null */ error?: string; - payload?: components["schemas"]["OrganizationRoleResponse"]; + payload?: components["schemas"]["DeploymentResponse"]; }; }; }; - }; - }; - "accept-user-role": { - parameters: { - query?: never; - header?: never; - path: { - code: string; - id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 201: { + /** @description Bad user input */ + 400: { headers: { [name: string]: unknown; }; content: { "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["OrganizationResponse"]; + error: string; + invalidFields: { + message: string; + path: string[]; + type: string; + }[]; }; }; }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["UnauthorizedResponse"]; + }; + }; }; }; - "accept-user-role": { + SquidLogsController_fetchLogsHistory: { parameters: { - query?: never; + query: { + level?: PathsV1OrgsCodeSquidsReferenceLogsHistoryGetParametersQueryLevel[]; + container?: string[]; + search?: string; + nextPage?: string; + from: string; + limit?: number; + }; header?: never; path: { code: string; - id: string; + reference: string; }; cookie?: never; }; requestBody?: never; responses: { - 201: { + /** @description Successful response */ + 200: { headers: { [name: string]: unknown; }; @@ -7613,77 +1713,98 @@ export interface operations { "application/json": { /** @example null */ error?: string; - payload?: components["schemas"]["OrganizationResponse"]; + payload?: components["schemas"]["SquidHistoryLogsResponse"]; }; }; }; - }; - }; - "accept-user-role": { - parameters: { - query?: never; - header?: never; - path: { - code: string; - id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 201: { + /** @description Bad user input */ + 400: { headers: { [name: string]: unknown; }; content: { "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["OrganizationResponse"]; + error: string; + invalidFields: { + message: string; + path: string[]; + type: string; + }[]; }; }; }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["UnauthorizedResponse"]; + }; + }; }; }; - "accept-user-role": { + SquidLogsController_tailLogs: { parameters: { - query?: never; + query?: { + level?: PathsV1OrgsCodeSquidsReferenceLogsFollowGetParametersQueryLevel[]; + container?: string[]; + search?: string; + }; header?: never; path: { code: string; - id: string; + reference: string; }; cookie?: never; }; requestBody?: never; responses: { - 201: { + /** @description Successful response */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad user input */ + 400: { headers: { [name: string]: unknown; }; content: { "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["OrganizationResponse"]; + error: string; + invalidFields: { + message: string; + path: string[]; + type: string; + }[]; }; }; }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["UnauthorizedResponse"]; + }; + }; }; }; - "decline-user-role": { + UserController_getProfile: { parameters: { query?: never; header?: never; - path: { - code: string; - id: string; - }; + path?: never; cookie?: never; }; requestBody?: never; responses: { - 201: { + /** @description Successful response */ + 200: { headers: { [name: string]: unknown; }; @@ -7691,25 +1812,38 @@ export interface operations { "application/json": { /** @example null */ error?: string; - payload?: components["schemas"]["OrganizationResponse"]; + payload?: components["schemas"]["UserResponse"]; }; }; }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["UnauthorizedResponse"]; + }; + }; }; }; - "decline-user-role": { + UserController_updateProfile: { parameters: { query?: never; header?: never; - path: { - code: string; - id: string; - }; + path?: never; cookie?: never; }; - requestBody?: never; + requestBody: { + content: { + "application/json": { + fullName: string; + }; + }; + }; responses: { - 201: { + /** @description Successful response */ + 200: { headers: { [name: string]: unknown; }; @@ -7717,51 +1851,48 @@ export interface operations { "application/json": { /** @example null */ error?: string; - payload?: components["schemas"]["OrganizationResponse"]; + payload?: components["schemas"]["UserResponse"]; }; }; }; - }; - }; - "decline-user-role": { - parameters: { - query?: never; - header?: never; - path: { - code: string; - id: string; + /** @description Bad user input */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + error: string; + invalidFields: { + message: string; + path: string[]; + type: string; + }[]; + }; + }; }; - cookie?: never; - }; - requestBody?: never; - responses: { - 201: { + /** @description Unauthorized */ + 401: { headers: { [name: string]: unknown; }; content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["OrganizationResponse"]; - }; + "application/json": components["schemas"]["UnauthorizedResponse"]; }; }; }; }; - "decline-user-role": { + UserController_getSquidsV1: { parameters: { query?: never; header?: never; - path: { - code: string; - id: string; - }; + path?: never; cookie?: never; }; requestBody?: never; responses: { - 201: { + /** @description Successful response */ + 200: { headers: { [name: string]: unknown; }; @@ -7769,29 +1900,44 @@ export interface operations { "application/json": { /** @example null */ error?: string; - payload?: components["schemas"]["OrganizationResponse"]; + payload?: components["schemas"]["SquidResponse"][]; }; }; }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["UnauthorizedResponse"]; + }; + }; }; }; - "get-settings": { + OrganizationController_listOrganizations: { parameters: { query?: never; header?: never; - path: { - code: string; - }; + path?: never; cookie?: never; }; requestBody?: never; responses: { + /** @description Successful response */ 200: { headers: { [name: string]: unknown; }; - content?: never; + content: { + "application/json": { + /** @example null */ + error?: string; + payload?: components["schemas"]["OrganizationResponse"][]; + }; + }; }; + /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; @@ -7802,51 +1948,54 @@ export interface operations { }; }; }; - "setup-intent": { + OrganizationController_create: { parameters: { query?: never; header?: never; - path: { - code: string; - }; + path?: never; cookie?: never; }; requestBody: { content: { "application/json": { + code: string; name: string; /** Format: email */ email: string; - country: string; - addressLine1: string; - city: string; - postalCode: string; - vatId?: string; }; }; }; responses: { - 200: { + /** @description Successful response */ + 201: { headers: { [name: string]: unknown; }; - content?: never; + content: { + "application/json": { + /** @example null */ + error?: string; + payload?: components["schemas"]["OrganizationResponse"]; + }; + }; }; + /** @description Bad user input */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; + error: string; + invalidFields: { + message: string; + path: string[]; + type: string; }[]; }; }; }; + /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; @@ -7857,23 +2006,31 @@ export interface operations { }; }; }; - "get-settings": { + OrganizationController_getOrganization: { parameters: { query?: never; header?: never; path: { - code: string; + org: string; }; cookie?: never; }; requestBody?: never; responses: { + /** @description Successful response */ 200: { headers: { [name: string]: unknown; }; - content?: never; + content: { + "application/json": { + /** @example null */ + error?: string; + payload?: components["schemas"]["OrganizationResponse"]; + }; + }; }; + /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; @@ -7884,7 +2041,7 @@ export interface operations { }; }; }; - "setup-intent": { + OrganizationController_edit: { parameters: { query?: never; header?: never; @@ -7899,36 +2056,40 @@ export interface operations { name: string; /** Format: email */ email: string; - country: string; - addressLine1: string; - city: string; - postalCode: string; - vatId?: string; }; }; }; responses: { + /** @description Successful response */ 200: { headers: { [name: string]: unknown; }; - content?: never; + content: { + "application/json": { + /** @example null */ + error?: string; + payload?: components["schemas"]["OrganizationResponse"]; + }; + }; }; + /** @description Bad user input */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; + error: string; + invalidFields: { + message: string; + path: string[]; + type: string; }[]; }; }; }; + /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; @@ -7939,22 +2100,19 @@ export interface operations { }; }; }; - "get-monthly": { + OrganizationController_deleteOne: { parameters: { - query: { - bySquid: string; - }; + query?: never; header?: never; path: { code: string; - year: string; - month: string; }; cookie?: never; }; requestBody?: never; responses: { - 200: { + /** @description Successful response */ + 201: { headers: { [name: string]: unknown; }; @@ -7962,10 +2120,46 @@ export interface operations { "application/json": { /** @example null */ error?: string; - payload?: components["schemas"]["OrganizationResponse"][]; + payload?: components["schemas"]["OrganizationResponse"]; + }; + }; + }; + }; + }; + OrganizationController_sendEmailVerification: { + parameters: { + query?: never; + header?: never; + path: { + code: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + email: string; + }; + }; + }; + responses: { + /** @description Bad user input */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + error: string; + invalidFields: { + message: string; + path: string[]; + type: string; + }[]; }; }; }; + /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; @@ -7976,21 +2170,38 @@ export interface operations { }; }; }; - "get-monthly": { + OrganizationController_verifyEmail: { parameters: { query: { - bySquid: string; + code: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful response */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; }; + }; + }; + OrganizationController_getOne: { + parameters: { + query?: never; header?: never; path: { code: string; - year: string; - month: string; }; cookie?: never; }; requestBody?: never; responses: { + /** @description Successful response */ 200: { headers: { [name: string]: unknown; @@ -7999,21 +2210,13 @@ export interface operations { "application/json": { /** @example null */ error?: string; - payload?: components["schemas"]["OrganizationResponse"][]; + payload?: components["schemas"]["OrganizationRoleResponse"][]; }; }; }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; }; }; - "list-secrets": { + OrganizationController_addUser: { parameters: { query?: never; header?: never; @@ -8022,9 +2225,18 @@ export interface operations { }; cookie?: never; }; - requestBody?: never; + requestBody: { + content: { + "application/json": { + email: string; + /** @enum {string} */ + roleType: PathsV1OrgsCodeRolesPostRequestBodyApplicationJsonRoleType; + }; + }; + }; responses: { - 200: { + /** @description Successful response */ + 201: { headers: { [name: string]: unknown; }; @@ -8032,43 +2244,48 @@ export interface operations { "application/json": { /** @example null */ error?: string; - payload?: components["schemas"]["SecretsResponse"]; + payload?: components["schemas"]["OrganizationRoleResponse"]; }; }; }; - 401: { + /** @description Bad user input */ + 400: { headers: { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; + "application/json": { + error: string; + invalidFields: { + message: string; + path: string[]; + type: string; + }[]; + }; }; }; }; }; - put: { + OrganizationController_editUser: { parameters: { query?: never; header?: never; path: { code: string; + id: string; }; cookie?: never; }; requestBody: { content: { "application/json": { - organization?: string; - secrets: { - name: string; - /** @enum {string} */ - action: PathsOrgsCodeSecretsPutRequestBodyApplicationJsonSecretsAction; - value?: string & unknown; - }[]; + /** @enum {string} */ + roleType: PathsV1OrgsCodeRolesIdPutRequestBodyApplicationJsonRoleType; }; }; }; responses: { + /** @description Successful response */ 200: { headers: { [name: string]: unknown; @@ -8077,47 +2294,69 @@ export interface operations { "application/json": { /** @example null */ error?: string; - payload?: components["schemas"]["SecretsResponse"]; + payload?: components["schemas"]["OrganizationRoleResponse"]; }; }; }; + /** @description Bad user input */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; + error: string; + invalidFields: { + message: string; + path: string[]; + type: string; }[]; }; }; }; - 401: { + }; + }; + OrganizationController_deleteUser: { + parameters: { + query?: never; + header?: never; + path: { + code: string; + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful response */ + 201: { headers: { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; + "application/json": { + /** @example null */ + error?: string; + payload?: components["schemas"]["OrganizationRoleResponse"]; + }; }; }; }; }; - "list-secrets": { + OrganizationController_acceptUserRole: { parameters: { query?: never; header?: never; path: { code: string; + id: string; }; cookie?: never; }; requestBody?: never; responses: { - 200: { + /** @description Successful response */ + 201: { headers: { [name: string]: unknown; }; @@ -8125,21 +2364,40 @@ export interface operations { "application/json": { /** @example null */ error?: string; - payload?: components["schemas"]["SecretsResponse"]; + payload?: components["schemas"]["OrganizationResponse"]; }; }; }; - 401: { + }; + }; + OrganizationController_declineUserRole: { + parameters: { + query?: never; + header?: never; + path: { + code: string; + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful response */ + 201: { headers: { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; + "application/json": { + /** @example null */ + error?: string; + payload?: components["schemas"]["OrganizationResponse"]; + }; }; }; }; }; - put: { + OrganizationController_setNeonApiToken: { parameters: { query?: never; header?: never; @@ -8151,17 +2409,12 @@ export interface operations { requestBody: { content: { "application/json": { - organization?: string; - secrets: { - name: string; - /** @enum {string} */ - action: PathsV1OrgsCodeSecretsPutRequestBodyApplicationJsonSecretsAction; - value?: string & unknown; - }[]; + token: string; }; }; }; responses: { + /** @description Successful response */ 200: { headers: { [name: string]: unknown; @@ -8170,36 +2423,55 @@ export interface operations { "application/json": { /** @example null */ error?: string; - payload?: components["schemas"]["SecretsResponse"]; + payload?: components["schemas"]["OrganizationResponse"]; }; }; }; + /** @description Bad user input */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; + error: string; + invalidFields: { + message: string; + path: string[]; + type: string; }[]; }; }; }; - 401: { + }; + }; + OrganizationController_deleteNeonApiToken: { + parameters: { + query?: never; + header?: never; + path: { + code: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful response */ + 201: { headers: { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; + "application/json": { + /** @example null */ + error?: string; + payload?: components["schemas"]["OrganizationResponse"]; + }; }; }; }; }; - "list-chains": { + OrganizationBillingController_getSettings: { parameters: { query?: never; header?: never; @@ -8210,18 +2482,14 @@ export interface operations { }; requestBody?: never; responses: { + /** @description Successful response */ 200: { headers: { [name: string]: unknown; }; - content: { - "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["ChainResponse"][]; - }; - }; + content?: never; }; + /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; @@ -8232,7 +2500,7 @@ export interface operations { }; }; }; - "list-chains": { + OrganizationBillingController_setupIntent: { parameters: { query?: never; header?: never; @@ -8241,20 +2509,45 @@ export interface operations { }; cookie?: never; }; - requestBody?: never; + requestBody: { + content: { + "application/json": { + name: string; + /** Format: email */ + email: string; + country: string; + addressLine1: string; + city: string; + postalCode: string; + vatId?: string; + }; + }; + }; responses: { + /** @description Successful response */ 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad user input */ + 400: { headers: { [name: string]: unknown; }; content: { "application/json": { - /** @example null */ - error?: string; - payload?: components["schemas"]["ChainResponse"][]; + error: string; + invalidFields: { + message: string; + path: string[]; + type: string; + }[]; }; }; }; + /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; @@ -8265,17 +2558,22 @@ export interface operations { }; }; }; - "get-token": { + OrganizationBillingController_getMonthly: { parameters: { - query?: never; + query: { + bySquid: string; + }; header?: never; path: { code: string; + year: string; + month: string; }; cookie?: never; }; requestBody?: never; responses: { + /** @description Successful response */ 200: { headers: { [name: string]: unknown; @@ -8284,10 +2582,11 @@ export interface operations { "application/json": { /** @example null */ error?: string; - payload?: components["schemas"]["TokenResponse"]; + payload?: components["schemas"]["OrganizationResponse"][]; }; }; }; + /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; @@ -8298,7 +2597,7 @@ export interface operations { }; }; }; - "refresh-token": { + SecretController_listSecrets: { parameters: { query?: never; header?: never; @@ -8309,7 +2608,8 @@ export interface operations { }; requestBody?: never; responses: { - 201: { + /** @description Successful response */ + 200: { headers: { [name: string]: unknown; }; @@ -8317,10 +2617,11 @@ export interface operations { "application/json": { /** @example null */ error?: string; - payload?: components["schemas"]["TokenResponse"]; + payload?: components["schemas"]["SecretsResponse"]; }; }; }; + /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; @@ -8331,7 +2632,7 @@ export interface operations { }; }; }; - "get-token": { + SecretController_put: { parameters: { query?: never; header?: never; @@ -8340,8 +2641,20 @@ export interface operations { }; cookie?: never; }; - requestBody?: never; + requestBody: { + content: { + "application/json": { + secrets: { + name: string; + /** @enum {string} */ + action: PathsV1OrgsCodeSecretsPutRequestBodyApplicationJsonSecretsAction; + value?: string & unknown; + }[]; + }; + }; + }; responses: { + /** @description Successful response */ 200: { headers: { [name: string]: unknown; @@ -8350,10 +2663,27 @@ export interface operations { "application/json": { /** @example null */ error?: string; - payload?: components["schemas"]["TokenResponse"]; + payload?: components["schemas"]["SecretsResponse"]; + }; + }; + }; + /** @description Bad user input */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + error: string; + invalidFields: { + message: string; + path: string[]; + type: string; + }[]; }; }; }; + /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; @@ -8364,7 +2694,7 @@ export interface operations { }; }; }; - "refresh-token": { + RpcController_listChains: { parameters: { query?: never; header?: never; @@ -8375,7 +2705,8 @@ export interface operations { }; requestBody?: never; responses: { - 201: { + /** @description Successful response */ + 200: { headers: { [name: string]: unknown; }; @@ -8383,10 +2714,11 @@ export interface operations { "application/json": { /** @example null */ error?: string; - payload?: components["schemas"]["TokenResponse"]; + payload?: components["schemas"]["ChainResponse"][]; }; }; }; + /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; @@ -8397,7 +2729,7 @@ export interface operations { }; }; }; - get: { + RpcController_getToken: { parameters: { query?: never; header?: never; @@ -8408,6 +2740,7 @@ export interface operations { }; requestBody?: never; responses: { + /** @description Successful response */ 200: { headers: { [name: string]: unknown; @@ -8416,10 +2749,11 @@ export interface operations { "application/json": { /** @example null */ error?: string; - payload?: components["schemas"]["QuotaResponse"][]; + payload?: components["schemas"]["TokenResponse"]; }; }; }; + /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; @@ -8430,7 +2764,7 @@ export interface operations { }; }; }; - get: { + RpcController_refreshToken: { parameters: { query?: never; header?: never; @@ -8441,7 +2775,8 @@ export interface operations { }; requestBody?: never; responses: { - 200: { + /** @description Successful response */ + 201: { headers: { [name: string]: unknown; }; @@ -8449,10 +2784,11 @@ export interface operations { "application/json": { /** @example null */ error?: string; - payload?: components["schemas"]["QuotaResponse"][]; + payload?: components["schemas"]["TokenResponse"]; }; }; }; + /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; @@ -8463,21 +2799,18 @@ export interface operations { }; }; }; - squids: { + QuotaController_get: { parameters: { - query: { - from: string; - to: string; - }; + query?: never; header?: never; path: { code: string; - query: string; }; cookie?: never; }; requestBody?: never; responses: { + /** @description Successful response */ 200: { headers: { [name: string]: unknown; @@ -8486,25 +2819,11 @@ export interface operations { "application/json": { /** @example null */ error?: string; - payload?: components["schemas"]["MetricResponse"][]; - }; - }; - }; - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; - }[]; + payload?: components["schemas"]["QuotaResponse"][]; }; }; }; + /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; @@ -8515,11 +2834,12 @@ export interface operations { }; }; }; - squids: { + MonitoringController_squids: { parameters: { query: { from: string; to: string; + maxPoints?: number; }; header?: never; path: { @@ -8530,6 +2850,7 @@ export interface operations { }; requestBody?: never; responses: { + /** @description Successful response */ 200: { headers: { [name: string]: unknown; @@ -8542,21 +2863,23 @@ export interface operations { }; }; }; + /** @description Bad user input */ 400: { headers: { [name: string]: unknown; }; content: { "application/json": { - error?: string; - invalidFields?: { - message?: string; - path?: string[]; - type?: string; + error: string; + invalidFields: { + message: string; + path: string[]; + type: string; }[]; }; }; }; + /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; @@ -8567,34 +2890,7 @@ export interface operations { }; }; }; - "squids-all-prom": { - parameters: { - query?: never; - header?: never; - path: { - code: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["UnauthorizedResponse"]; - }; - }; - }; - }; - "squids-all-prom": { + MonitoringController_squidsAllProm: { parameters: { query?: never; header?: never; @@ -8605,12 +2901,14 @@ export interface operations { }; requestBody?: never; responses: { + /** @description Successful response */ 200: { headers: { [name: string]: unknown; }; content?: never; }; + /** @description Unauthorized */ 401: { headers: { [name: string]: unknown; @@ -8622,45 +2920,10 @@ export interface operations { }; }; } -export enum PathsOrgsCodeSquidsSquidNameVersionsVersionNameLogsHistoryGetParametersQueryLevel { - ERROR = "ERROR", - DEBUG = "DEBUG", - INFO = "INFO", - NOTICE = "NOTICE", - WARNING = "WARNING", - CRITICAL = "CRITICAL" -} -export enum PathsOrgsCodeSquidsSquidNameVersionsVersionNameLogsFollowGetParametersQueryLevel { - ERROR = "ERROR", - DEBUG = "DEBUG", - INFO = "INFO", - NOTICE = "NOTICE", - WARNING = "WARNING", - CRITICAL = "CRITICAL" -} -export enum PathsOrgsCodeDeploysGetParametersQueryStatusGroup { - IN_PROGRESS = "IN_PROGRESS" -} -export enum PathsV1OrgsCodeDeploysGetParametersQueryStatusGroup { +export enum PathsV1OrgsCodeDeploymentsGetParametersQueryStatusGroup { IN_PROGRESS = "IN_PROGRESS" } -export enum PathsOrgsCodeSquidsSquidSlotsSlotLogsHistoryGetParametersQueryLevel { - ERROR = "ERROR", - DEBUG = "DEBUG", - INFO = "INFO", - NOTICE = "NOTICE", - WARNING = "WARNING", - CRITICAL = "CRITICAL" -} -export enum PathsV1OrgsCodeSquidsSquidSlotsSlotLogsHistoryGetParametersQueryLevel { - ERROR = "ERROR", - DEBUG = "DEBUG", - INFO = "INFO", - NOTICE = "NOTICE", - WARNING = "WARNING", - CRITICAL = "CRITICAL" -} -export enum PathsOrgsCodeSquidsSquidSlotsSlotLogsFollowGetParametersQueryLevel { +export enum PathsV1OrgsCodeSquidsReferenceLogsHistoryGetParametersQueryLevel { ERROR = "ERROR", DEBUG = "DEBUG", INFO = "INFO", @@ -8668,7 +2931,7 @@ export enum PathsOrgsCodeSquidsSquidSlotsSlotLogsFollowGetParametersQueryLevel { WARNING = "WARNING", CRITICAL = "CRITICAL" } -export enum PathsV1OrgsCodeSquidsSquidSlotsSlotLogsFollowGetParametersQueryLevel { +export enum PathsV1OrgsCodeSquidsReferenceLogsFollowGetParametersQueryLevel { ERROR = "ERROR", DEBUG = "DEBUG", INFO = "INFO", @@ -8676,139 +2939,18 @@ export enum PathsV1OrgsCodeSquidsSquidSlotsSlotLogsFollowGetParametersQueryLevel WARNING = "WARNING", CRITICAL = "CRITICAL" } -export enum PathsOrganizationsCodeRolesPostRequestBodyApplicationJsonRoleType { - admin = "admin", - developer = "developer" -} -export enum PathsOrgsCodeRolesPostRequestBodyApplicationJsonRoleType { - admin = "admin", - developer = "developer" -} -export enum PathsV1OrganizationsCodeRolesPostRequestBodyApplicationJsonRoleType { - admin = "admin", - developer = "developer" -} export enum PathsV1OrgsCodeRolesPostRequestBodyApplicationJsonRoleType { admin = "admin", developer = "developer" } -export enum PathsOrganizationsCodeRolesIdPutRequestBodyApplicationJsonRoleType { - admin = "admin", - developer = "developer" -} -export enum PathsOrgsCodeRolesIdPutRequestBodyApplicationJsonRoleType { - admin = "admin", - developer = "developer" -} -export enum PathsV1OrganizationsCodeRolesIdPutRequestBodyApplicationJsonRoleType { - admin = "admin", - developer = "developer" -} export enum PathsV1OrgsCodeRolesIdPutRequestBodyApplicationJsonRoleType { admin = "admin", developer = "developer" } -export enum PathsOrgsCodeSecretsPutRequestBodyApplicationJsonSecretsAction { - UPDATE = "UPDATE", - DELETE = "DELETE" -} export enum PathsV1OrgsCodeSecretsPutRequestBodyApplicationJsonSecretsAction { UPDATE = "UPDATE", DELETE = "DELETE" } -export enum DeployResponseV0Type { - DEPLOY = "DEPLOY", - DEPLOY_HARD_RESET = "DEPLOY_HARD_RESET", - RESTART = "RESTART", - HIBERNATE = "HIBERNATE", - DELETE = "DELETE", - SCALE = "SCALE", - TAG = "TAG" -} -export enum DeployResponseV0Status { - UNPACKING = "UNPACKING", - IMAGE_BUILDING = "IMAGE_BUILDING", - RESETTING = "RESETTING", - TAGGING = "TAGGING", - SQUID_SYNCING = "SQUID_SYNCING", - SQUID_DELETING = "SQUID_DELETING", - ADDONS_SYNCING = "ADDONS_SYNCING", - ADDONS_DELETING = "ADDONS_DELETING", - OK = "OK", - DEPLOYING = "DEPLOYING" -} -export enum DeployResponseV0Failed { - NO = "NO", - UNEXPECTED = "UNEXPECTED", - PERMISSIONS = "PERMISSIONS", - REQUIREMENTS = "REQUIREMENTS", - REQUIRED_SOURCE_FILE_MISSED = "REQUIRED_SOURCE_FILE_MISSED", - REQUIRED_SOURCE_FILE_INVALID = "REQUIRED_SOURCE_FILE_INVALID", - SOURCE_FILES_BUILD_FAILED = "SOURCE_FILES_BUILD_FAILED" -} -export enum SquidApiResponseV0Status { - AVAILABLE = "AVAILABLE", - NOT_AVAILABLE = "NOT_AVAILABLE" -} -export enum SquidProcessorResponseV0Status { - SYNCING = "SYNCING", - UNKNOWN = "UNKNOWN", - STARTING = "STARTING", - SYNCED = "SYNCED", - STUCK = "STUCK" -} -export enum SquidDiskResponseV0UsageStatus { - LOW = "LOW", - NORMAL = "NORMAL", - WARNING = "WARNING", - CRITICAL = "CRITICAL", - UNKNOWN = "UNKNOWN" -} -export enum SquidLastDeployV0Type { - DEPLOY = "DEPLOY", - DEPLOY_HARD_RESET = "DEPLOY_HARD_RESET", - RESTART = "RESTART", - HIBERNATE = "HIBERNATE", - DELETE = "DELETE", - SCALE = "SCALE", - TAG = "TAG" -} -export enum SquidLastDeployV0Status { - UNPACKING = "UNPACKING", - IMAGE_BUILDING = "IMAGE_BUILDING", - RESETTING = "RESETTING", - TAGGING = "TAGGING", - SQUID_SYNCING = "SQUID_SYNCING", - SQUID_DELETING = "SQUID_DELETING", - ADDONS_SYNCING = "ADDONS_SYNCING", - ADDONS_DELETING = "ADDONS_DELETING", - OK = "OK", - DEPLOYING = "DEPLOYING" -} -export enum SquidLastDeployV0Failed { - NO = "NO", - UNEXPECTED = "UNEXPECTED", - PERMISSIONS = "PERMISSIONS", - REQUIREMENTS = "REQUIREMENTS", - REQUIRED_SOURCE_FILE_MISSED = "REQUIRED_SOURCE_FILE_MISSED", - REQUIRED_SOURCE_FILE_INVALID = "REQUIRED_SOURCE_FILE_INVALID", - SOURCE_FILES_BUILD_FAILED = "SOURCE_FILES_BUILD_FAILED" -} -export enum SquidRunningDeployV0Type { - DEPLOY = "DEPLOY", - DEPLOY_HARD_RESET = "DEPLOY_HARD_RESET", - RESTART = "RESTART", - HIBERNATE = "HIBERNATE", - DELETE = "DELETE", - SCALE = "SCALE", - TAG = "TAG" -} -export enum VersionResponseV0Status { - DEPLOYING = "DEPLOYING", - DEPLOY_ERROR = "DEPLOY_ERROR", - DEPLOYED = "DEPLOYED", - HIBERNATED = "HIBERNATED" -} export enum IngressRequestsMetricRes { error = "error", success = "success" @@ -8825,20 +2967,22 @@ export enum SquidUsageMetricTimeGroup { Day = "Day", Month = "Month" } -export enum DeployResponseType { +export enum DeploymentResponseType { DEPLOY = "DEPLOY", DEPLOY_HARD_RESET = "DEPLOY_HARD_RESET", RESTART = "RESTART", HIBERNATE = "HIBERNATE", DELETE = "DELETE", SCALE = "SCALE", - TAG = "TAG" + SET_TAG = "SET_TAG", + REMOVE_TAG = "REMOVE_TAG" } -export enum DeployResponseStatus { +export enum DeploymentResponseStatus { UNPACKING = "UNPACKING", IMAGE_BUILDING = "IMAGE_BUILDING", RESETTING = "RESETTING", - TAGGING = "TAGGING", + ADDING_INGRESS = "ADDING_INGRESS", + REMOVING_INGRESS = "REMOVING_INGRESS", SQUID_SYNCING = "SQUID_SYNCING", SQUID_DELETING = "SQUID_DELETING", ADDONS_SYNCING = "ADDONS_SYNCING", @@ -8846,7 +2990,7 @@ export enum DeployResponseStatus { OK = "OK", DEPLOYING = "DEPLOYING" } -export enum DeployResponseFailed { +export enum DeploymentResponseFailed { NO = "NO", UNEXPECTED = "UNEXPECTED", PERMISSIONS = "PERMISSIONS", @@ -8863,8 +3007,11 @@ export enum SquidProcessorResponseStatus { SYNCING = "SYNCING", UNKNOWN = "UNKNOWN", STARTING = "STARTING", - SYNCED = "SYNCED", - STUCK = "STUCK" + SYNCED = "SYNCED" +} +export enum SquidAddonsHasuraResponseStatus { + AVAILABLE = "AVAILABLE", + NOT_AVAILABLE = "NOT_AVAILABLE" } export enum SquidDiskResponseUsageStatus { LOW = "LOW", @@ -8880,13 +3027,14 @@ export enum SquidLastDeployType { HIBERNATE = "HIBERNATE", DELETE = "DELETE", SCALE = "SCALE", - TAG = "TAG" + SET_TAG = "SET_TAG", + REMOVE_TAG = "REMOVE_TAG" } export enum SquidLastDeployStatus { UNPACKING = "UNPACKING", IMAGE_BUILDING = "IMAGE_BUILDING", RESETTING = "RESETTING", - TAGGING = "TAGGING", + CONFIGURING_INGRESS = "CONFIGURING_INGRESS", SQUID_SYNCING = "SQUID_SYNCING", SQUID_DELETING = "SQUID_DELETING", ADDONS_SYNCING = "ADDONS_SYNCING", diff --git a/src/api/squids.ts b/src/api/squids.ts index ec1ad64..25f7d79 100644 --- a/src/api/squids.ts +++ b/src/api/squids.ts @@ -1,36 +1,34 @@ import split2 from 'split2'; import { pretty } from '../logs'; +import { formatSquidReference } from '../utils'; import { api, debugLog } from './api'; import { - Deploy, + Deployment, HttpResponse, LogEntry, LogsResponse, + OrganizationRequest, Squid, - UploadUrl, SquidRequest, - OrganizationRequest, + UploadUrl, } from './types'; export async function listSquids({ organization, name }: OrganizationRequest & { name?: string }): Promise { - // return getDemoSquid(orgCode, squidName, tagOrId); - const { body } = await api>({ method: 'get', - path: name ? `/orgs/${organization.code}/squids/${name}` : `/orgs/${organization.code}/squids`, + path: `/orgs/${organization.code}/squids`, + query: { name }, }); return body.payload.sort((a, b) => a.name.localeCompare(b.name)); } export async function getSquid({ organization, squid }: SquidRequest): Promise { - // return getDemoSquid(orgCode, squidName, tagOrId); - const { body } = await api>({ method: 'get', - path: `/orgs/${organization.code}/squids/${squid.name}/slots/${squid.slot}`, + path: `/orgs/${organization.code}/squids/${formatSquidReference(squid)}`, }); return body.payload; @@ -53,9 +51,9 @@ export async function squidHistoryLogs({ }; abortController?: AbortController; }): Promise { - const { body } = await api({ + const { body } = await api>({ method: 'get', - path: `/orgs/${organization.code}/squids/${squid.name}/slots/${squid.slot}/logs/history`, + path: `/orgs/${organization.code}/squids/${formatSquidReference(squid)}/logs/history`, query: { ...query, from: query.from.toISOString(), @@ -64,7 +62,9 @@ export async function squidHistoryLogs({ abortController, }); - return body || { logs: [], nextPage: null }; + const payload = body?.payload; + + return { logs: payload?.logs ?? [], nextPage: payload?.nextPage ?? null }; } export async function squidLogsFollow({ @@ -78,7 +78,7 @@ export async function squidLogsFollow({ }) { const { body } = await api({ method: 'get', - path: `/orgs/${organization.code}/squids/${squid.name}/slots/${squid.slot}/logs/follow`, + path: `/orgs/${organization.code}/squids/${formatSquidReference(squid)}/logs/follow`, query, responseType: 'stream', abortController: abortController, @@ -171,14 +171,17 @@ export async function deploySquid({ data, }: OrganizationRequest & { data: { - hardReset: boolean; artifactUrl: string; manifestPath: string; - updateSlot?: string; - tag?: string; + options: { + overrideSlot?: string; + overrideName?: string; + tag?: string; + hardReset?: boolean; + }; }; -}): Promise { - const { body } = await api>({ +}): Promise { + const { body } = await api>({ method: 'post', path: `/orgs/${organization.code}/squids/deploy`, data, @@ -190,39 +193,47 @@ export async function deploySquid({ export async function getUploadUrl({ organization }: OrganizationRequest): Promise { const { body } = await api>({ method: 'post', - path: `/orgs/${organization.code}/deploys/upload-url`, + path: `/orgs/${organization.code}/deployments/upload-url`, }); return body.payload; } -export async function restartSquid({ organization, squid }: SquidRequest): Promise { - const { body } = await api>({ +export async function restartSquid({ organization, squid }: SquidRequest): Promise { + const { body } = await api>({ method: 'post', - path: `/orgs/${organization.code}/squids/${squid.name}/slots/${squid.slot}/restart`, + path: `/orgs/${organization.code}/squids/${formatSquidReference(squid)}/restart`, }); return body.payload; } -export async function deleteSquid({ organization, squid }: SquidRequest): Promise { - const { body } = await api>({ +export async function deleteSquid({ organization, squid }: SquidRequest): Promise { + const { body } = await api>({ method: 'delete', - path: `/orgs/${organization.code}/squids/${squid.name}/slots/${squid.slot}`, + path: `/orgs/${organization.code}/squids/${formatSquidReference(squid)}`, + }); + + return body.payload; +} + +export async function addSquidTag({ organization, squid, tag }: SquidRequest & { tag: string }): Promise { + const { body } = await api>({ + method: 'PUT', + path: `/orgs/${organization.code}/squids/${formatSquidReference(squid)}/tags/${tag}`, }); return body.payload; } -export async function tagSquid({ +export async function removeSquidTag({ organization, squid, - data, -}: SquidRequest & { data: { tag: string } }): Promise { - const { body } = await api>({ - method: 'post', - path: `/orgs/${organization.code}/squids/${squid.name}/slots/${squid.slot}/tag`, - data, + tag, +}: SquidRequest & { tag: string }): Promise { + const { body } = await api>({ + method: 'DELETE', + path: `/orgs/${organization.code}/squids/${formatSquidReference(squid)}/tags/${tag}`, }); return body.payload; diff --git a/src/api/types.ts b/src/api/types.ts index 7e9f419..7d95206 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -6,11 +6,9 @@ export type HttpResponse = { payload: T; }; -export type { DeployResponseStatus as DeployStatus } from './schema'; - export type Organization = components['schemas']['OrganizationResponse']; -export type Deploy = components['schemas']['DeployResponse']; +export type Deployment = components['schemas']['DeploymentResponse']; export type UploadUrl = components['schemas']['UploadUrlResponse']; @@ -24,10 +22,6 @@ export type SquidAddonsPostgres = components['schemas']['SquidAddonsPostgresResp export type Squid = components['schemas']['SquidResponse']; -export type SquidNameIsAvailableResponse = { - available: boolean; -}; - export type SecretsListResponse = { secrets: Record; }; @@ -55,16 +49,10 @@ export type LogsResponse = { nextPage: string | null; }; -export type SquidVersionResponse = { - id: number; - name: string; - version: { - deploymentUrl: string; - }; -}; - export type OrganizationRequest = { organization: PickDeep }; -export type SquidRequest = OrganizationRequest & { squid: PickDeep }; +export type SquidRequest = OrganizationRequest & { + squid: ({ name: string } & { tag?: string; slot?: string }) | string; +}; -export type DeployRequest = OrganizationRequest & { deploy: PickDeep }; +export type DeployRequest = OrganizationRequest & { deploy: PickDeep }; diff --git a/src/command.ts b/src/command.ts index 1a2d047..740a748 100644 --- a/src/command.ts +++ b/src/command.ts @@ -1,25 +1,27 @@ -import { Args, Command } from '@oclif/core'; +import { Command, Flags } from '@oclif/core'; +import { FailedFlagValidationError } from '@oclif/core/lib/parser/errors'; import chalk from 'chalk'; import inquirer from 'inquirer'; import { isNil, uniqBy } from 'lodash'; -import { ApiError, getOrganization, listOrganizations, listSquids, listUserSquids, OrganizationRequest } from './api'; +import { ApiError, getOrganization, getSquid, listOrganizations, listUserSquids, SquidRequest } from './api'; import { getTTY } from './tty'; -import { formatSquidName } from './utils'; - -export const RELEASE_DEPRECATE = [ - chalk.yellow('*******************************************************'), - chalk.yellow('* *'), - chalk.yellow('* WARNING! This command has been deprecated *'), - chalk.yellow('* Please check the migration guide *'), - chalk.yellow('* https://docs.subsquid.io/deploy-squid/migration/ *'), - chalk.yellow('* *'), - chalk.yellow('*******************************************************'), -].join('\n'); +import { formatSquidReference, printSquid } from './utils'; + +export const SUCCESS_CHECK_MARK = chalk.green('✓'); export abstract class CliCommand extends Command { + static baseFlags = { + interactive: Flags.boolean({ + description: 'Disable interactive mode', + required: false, + default: true, + allowNo: true, + }), + }; + logSuccess(message: string) { - this.log(chalk.green(`✓ `) + message); + this.log(SUCCESS_CHECK_MARK + message); } logQuestion(message: string) { @@ -30,6 +32,23 @@ export abstract class CliCommand extends Command { this.log(chalk.dim(message)); } + // Haven't find a way to do it with native settings + validateSquidNameFlags(flags: { reference?: any; name?: any }) { + if (flags.reference || flags.name) return; + + throw new FailedFlagValidationError({ + failed: [ + { + name: 'squid name', + validationFn: 'validateSquidName', + reason: 'One of the following must be provided: --reference, --name', + status: 'failed', + }, + ], + parse: {}, + }); + } + async catch(error: any) { if (error instanceof ApiError) { const { request, body } = error; @@ -83,59 +102,53 @@ export abstract class CliCommand extends Command { throw error; } - async findSquid({ - organization, - name, - tag, - slot, - tagOrSlot, - }: OrganizationRequest & { name: string } & ( - | { tag: string; slot?: undefined; tagOrSlot?: undefined } - | { tag?: undefined; slot: string; tagOrSlot?: undefined } - | { tag?: undefined; slot?: undefined; tagOrSlot: string } - )) { - const squids = await listSquids({ organization, name }); - - if (slot) { - return squids.find((s) => s.slot === slot); - } - - if (tag) { - return squids.find((s) => s.tags.some((t) => t.name === tag)); - } + async findSquid(req: SquidRequest) { + try { + return await getSquid(req); + } catch (e) { + if (e instanceof ApiError && e.request.status === 404) { + return null; + } - if (tagOrSlot) { - return squids.find((s) => s.slot === tagOrSlot || s.tags.some((t) => t.name === tagOrSlot)); + throw e; } } - async findOrThrowSquid(opts: Parameters[0]) { - const squid = await this.findSquid(opts); - if (!squid) { + async findOrThrowSquid({ organization, squid }: SquidRequest) { + const res = await this.findSquid({ organization, squid }); + if (!res) { throw new Error( - `The squid ${formatSquidName(opts.tagOrSlot != null ? { name: opts.name, slot: opts.tagOrSlot } : opts)} is not found`, + `The squid ${formatSquidReference(typeof squid === 'string' ? squid : squid, { colored: true })} is not found`, ); } - return squid; + return res; } - async promptOrganization(code: string | null | undefined, using: string) { + async promptOrganization( + code: string | null | undefined, + { using, interactive }: { using?: string; interactive?: boolean } = {}, + ) { if (code) { return await getOrganization({ organization: { code } }); } const organizations = await listOrganizations(); - if (organizations.length === 0) { - return this.error(`You have no organizations. Please create organization first.`); - } else if (organizations.length === 1) { - return organizations[0]; - } - return await this.getOrganizationPromt(organizations, using); + return await this.getOrganizationPrompt(organizations, { using, interactive }); } - async promptSquidOrganization(code: string | null | undefined, name: string, using: string) { + async promptSquidOrganization( + code: string | null | undefined, + name: string, + { + using, + interactive, + }: { + using?: string; + interactive?: boolean; + } = {}, + ) { if (code) { return await getOrganization({ organization: { code } }); } @@ -146,25 +159,37 @@ export abstract class CliCommand extends Command { organizations = uniqBy(organizations, (o) => o.code); if (organizations.length === 0) { - return this.error(`Squid "${name}" was not found.`); - } else if (organizations.length === 1) { - return organizations[0]; + return this.error(`You have no organizations with squid "${name}".`); } - return await this.getOrganizationPromt(organizations, using); + return await this.getOrganizationPrompt(organizations, { using, interactive }); } - private async getOrganizationPromt( + private async getOrganizationPrompt( organizations: T[], - using: string, + { + using = 'using "--org" flag', + interactive, + }: { + using?: string; + interactive?: boolean; + }, ): Promise { + if (organizations.length === 0) { + return this.error(`You have no organizations. Please create organization first.`); + } else if (organizations.length === 1) { + return organizations[0]; + } + const { stdin, stdout } = getTTY(); - if (!stdin || !stdout) { - this.log(chalk.dim(`You have ${organizations.length} organizations:`)); - for (const organization of organizations) { - this.log(`${chalk.dim(' - ')}${chalk.dim(organization.code)}`); - } - return this.error(`Please specify one of them explicitly ${using}`); + if (!stdin || !stdout || !interactive) { + return this.error( + [ + `You have ${organizations.length} organizations:`, + ...organizations.map((o) => `${chalk.dim(' - ')}${chalk.dim(o.code)}`), + `Please specify one of them explicitly ${using}`, + ].join('\n'), + ); } const prompt = inquirer.createPromptModule({ input: stdin, output: stdout }); @@ -190,14 +215,4 @@ export abstract class CliCommand extends Command { } } -export const SquidNameArg = Args.string({ - description: ' or ', - required: true, - parse: async (input) => { - input = input.toLowerCase(); - if (!/^[a-z0-9\-]+[#@][a-z0-9\-]+$/.test(input)) { - throw new Error(`Expected a squid name but received: ${input}`); - } - return input; - }, -}); +export * as SqdFlags from './flags'; diff --git a/src/commands/deploy.ts b/src/commands/deploy.ts index cd1f0b7..afc6286 100644 --- a/src/commands/deploy.ts +++ b/src/commands/deploy.ts @@ -3,24 +3,26 @@ import path from 'node:path'; import { promisify } from 'util'; import { Args, Flags, ux as CliUx } from '@oclif/core'; -import { ManifestValue } from '@subsquid/manifest'; +import { Manifest } from '@subsquid/manifest'; import chalk from 'chalk'; +import diff from 'cli-diff'; import { globSync } from 'glob'; import ignore from 'ignore'; import inquirer from 'inquirer'; +import { defaults, get, isNil, keys, pick } from 'lodash'; import prettyBytes from 'pretty-bytes'; import targz from 'targz'; -import { deploySquid, listSquids, OrganizationRequest, Squid, uploadFile } from '../api'; -// import { buildTable, CREATE_COLOR, deployDemoSquid, listDemoSquids, UPDATE_COLOR } from '../api/demoStore'; +import { deploySquid, OrganizationRequest, Squid, uploadFile } from '../api'; +import { SqdFlags, SUCCESS_CHECK_MARK } from '../command'; import { DeployCommand } from '../deploy-command'; import { loadManifestFile } from '../manifest'; -import { formatSquidName } from '../utils'; +import { formatSquidReference, ParsedSquidReference, printSquid } from '../utils'; const compressAsync = promisify(targz.compress); -const SQUID_PATH_DESC = [ - `Squid source. Could be:`, +const SQUID_WORKDIR_DESC = [ + `Squid working directory. Could be:`, ` - a relative or absolute path to a local folder (e.g. ".")`, ` - a URL to a .tar.gz archive`, ` - a github URL to a git repo with a branch or commit tag`, @@ -33,7 +35,7 @@ export const DELETE_COLOR = 'red'; export function resolveManifest( localPath: string, manifestPath: string, -): { error: string } | { buildDir: string; squidDir: string; manifest: ManifestValue } { +): { error: string } | { buildDir: string; squidDir: string; manifest: Manifest } { try { const { squidDir, manifest } = loadManifestFile(localPath, manifestPath); @@ -50,94 +52,135 @@ export function resolveManifest( } } -const LIMIT = 10; +function example(command: string, description: string) { + // return [chalk.dim(`// ${description}`), command].join('\r\n'); + return `${command} ${chalk.dim(`// ${description}`)}`; +} export default class Deploy extends DeployCommand { static description = 'Deploy new or update an existing squid in the Cloud'; + static examples = [ + example('sqd deploy .', 'Create a new squid with name provided in the manifest file'), + example( + 'sqd deploy . -n my-squid-override', + 'Create a new squid deployment and override it\'s name to "my-squid-override"', + ), + example('sqd deploy . -n my-squid -s asmzf5', 'Update the "my-squid" squid with slot "asmzf5"'), + example( + 'sqd deploy ./path-to-the-squid -m squid.prod.yaml', + 'Use a manifest file located in ./path-to-the-squid/squid.prod.yaml', + ), + example( + 'sqd deploy /Users/dev/path-to-the-squid -m /Users/dev/path-to-the-squid/squid.prod.yaml', + 'Full paths are also fine', + ), + ]; + + static help = 'If squid flags are not specified, the they will be retrieved from the manifest or prompted.'; static args = { - source: Args.string({ - description: SQUID_PATH_DESC.join('\n'), + source: Args.directory({ + description: [ + `Squid source. Could be:`, + ` - a relative or absolute path to a local folder (e.g. ".")`, + ` - a URL to a .tar.gz archive`, + ` - a github URL to a git repo with a branch or commit tag`, + ].join('\n'), required: true, default: '.', }), }; static flags = { - manifest: Flags.string({ + org: SqdFlags.org({ + required: false, + }), + name: SqdFlags.name({ + required: false, + relationships: [], + }), + tag: SqdFlags.tag({ + required: false, + dependsOn: [], + }), + slot: SqdFlags.slot({ + required: false, + dependsOn: [], + }), + reference: SqdFlags.reference({ + required: false, + }), + manifest: Flags.file({ char: 'm', - description: 'Relative local path to a squid manifest file in squid source', + description: 'Specify the relative local path to a squid manifest file in the squid working directory', required: false, default: 'squid.yaml', helpValue: '', }), - update: Flags.string({ - char: 'u', - description: [ - 'Reference on a deployment to update in-place. Could be:', - '- "@{tag}" or "{tag}", i.e. the tag assigned to the squid deployment', - '- "#{id}" or "{id}", i.e. the corresponding deployment ID', - 'If it is not provided, a new squid will be created. ', - ].join('\n'), + 'hard-reset': Flags.boolean({ + description: + 'Perform a hard reset before deploying. This will drop and re-create all squid resources, including the database, causing a short API downtime', required: false, - helpValue: '', + default: false, }), - - tag: Flags.string({ - char: 't', - description: [ - 'Assign the tag to the squid deployment. ', - 'The previous deployment API URL assigned with the same tag will be transitioned to the new deployment', - 'Tag must contain only alphanumeric characters, dashes, and underscores', - ].join('\n'), + 'stream-logs': Flags.boolean({ + description: 'Attach and stream squid logs after the deployment', required: false, - exclusive: ['update'], - helpValue: '', + default: true, + allowNo: true, }), - - 'hard-reset': Flags.boolean({ - char: 'r', - description: - 'Do a hard reset before deploying. Drops and re-creates all the squid resources including the database. Will cause a short API downtime', + 'add-tag': Flags.string({ + description: 'Add a tag to the deployed squid', required: false, }), - 'no-stream-logs': Flags.boolean({ - description: 'Do not attach and stream squid logs after the deploy', + 'allow-update': Flags.boolean({ + description: 'Allow updating an existing squid', required: false, default: false, }), - org: Flags.string({ - char: 'o', - description: 'Organization', - helpValue: '', + 'allow-tag-reassign': Flags.boolean({ + description: 'Allow reassigning an existing tag', required: false, + default: false, + }), + 'allow-manifest-override': Flags.boolean({ + description: 'Allow overriding the manifest during deployment', + required: false, + default: false, }), }; async run(): Promise { const { args: { source }, - flags: { manifest: manifestPath, 'hard-reset': hardReset, update, 'no-stream-logs': disableStreamLogs, org, tag }, + flags: { + interactive, + manifest: manifestPath, + 'hard-reset': hardReset, + 'stream-logs': streamLogs, + 'add-tag': addTag, + reference, + ...flags + }, } = await this.parse(Deploy); const isUrl = source.startsWith('http://') || source.startsWith('https://'); if (isUrl) { - // this.log(`🦑 Releasing the squid from remote`); - // - // squid = await deployDemoSquid({ - // orgCode, - // name: manifest.name, - // tag, - // data: { - // hardReset, - // artifactUrl: source, - // manifestPath, - // }, - // }); + this.log(`🦑 Releasing the squid from remote`); return this.error('Not implemented yet'); } - const organization = await this.promptOrganization(org, 'using "-o" flag'); + if (interactive && hardReset) { + const { confirm } = await inquirer.prompt([ + { + name: 'confirm', + type: 'confirm', + message: `Are you sure?`, + prefix: `Your squid will be reset, which may potentially result in data loss.`, + }, + ]); + if (!confirm) return; + } this.log(`🦑 Releasing the squid from local folder`); @@ -146,83 +189,208 @@ export default class Deploy extends DeployCommand { const { buildDir, squidDir, manifest } = res; + const overrides = reference || (pick(flags, 'slot', 'name', 'tag', 'org') as Partial); + + // some hack to normalize slot name in case if version is used + { + manifest.slot = manifest.slotName(); + delete manifest['version']; + } + + if (!flags['allow-manifest-override']) { + const confirm = await this.promptOverrideConflict(manifest, overrides, { interactive }); + if (!confirm) return; + } + + // eslint-disable-next-line prefer-const + let { name, slot, org, tag } = defaults(overrides, manifest); + + const organization = await this.promptOrganization(org, { interactive }); + + name = await this.promptSquidName(name, { interactive }); + this.log(chalk.dim(`Squid directory: ${squidDir}`)); this.log(chalk.dim(`Build directory: ${buildDir}`)); this.log(chalk.dim(`Manifest: ${manifestPath}`)); - - let target: Squid | undefined; - if (update) { - const filter = update.startsWith('#') - ? { slot: update.slice(1) } - : update.startsWith('@') - ? { tag: update.slice(1) } - : { tagOrSlot: update }; - target = await this.findOrThrowSquid({ organization, name: manifest.name, ...filter }); + this.log(chalk.cyan(`-----------------------------`)); + this.log(chalk.cyan(`Organization: ${organization.code}`)); + this.log(chalk.cyan(`Squid name: ${name}`)); + if (slot) { + this.log(chalk.cyan(`Squid slot: ${slot}`)); + } else if (tag) { + this.log(chalk.cyan(`Squid tag: ${tag}`)); } - - if (tag) { - const normalizedTag = tag.startsWith('@') ? tag.slice(1) : tag; - const oldSquid = await this.findSquid({ organization, name: manifest.name, tag: normalizedTag }); - if (oldSquid) { - const { confirm } = await inquirer.prompt([ - { - name: 'confirm', - type: 'confirm', - message: `A squid tag @${normalizedTag} has already been assigned to the previous squid deployment ${formatSquidName(oldSquid)}. Are you sure?`, - }, - ]); - if (!confirm) return; - } + this.log(chalk.cyan(`-----------------------------`)); + + let target: Squid | null = null; + if (slot || tag) { + target = await this.findSquid({ + organization, + squid: { name, slot, tag: tag! }, + }); } + /** + * Squid exists we should check running deploys + */ if (target) { - /** - * Squid exists we should check running deploys - */ - const attached = await this.attachToParallelDeploy(target); + const attached = await this.promptAttachToDeploy(target, { interactive }); if (attached) return; } - const archiveName = `${manifest.name}.tar.gz`; + /** + * Squid exists we should ask for update + */ + if (target && !flags['allow-update']) { + const update = await this.promptUpdateSquid(target, { interactive }); + if (!update) return; + } + + /** + * Squid exists we should check if tag belongs to another squid + */ + const hasTag = !!target?.tags.find((t) => t.name === addTag) || tag === addTag; + if (addTag && !flags['allow-tag-reassign'] && !hasTag) { + const add = await this.promptAddTag({ organization, name, tag: addTag }, { interactive }); + if (!add) return; + } + const archiveName = `${formatSquidReference({ name, slot, tag })}.tar.gz`; const artifactPath = await this.pack({ buildDir, squidDir, archiveName }); const artifactUrl = await this.upload({ organization, artifactPath }); const deploy = await deploySquid({ organization, data: { - hardReset, artifactUrl, manifestPath, - updateSlot: target?.slot, - tag, + options: { + hardReset, + overrideName: name, + overrideSlot: target?.slot || slot, + tag: addTag, + }, }, }); - const squid = await this.pollDeploy({ organization, deploy }); - if (squid) { - if (update) { - this.log( - [ - '', - chalk[UPDATE_COLOR](`=================================================`), - `The squid ${squid.name}#${squid.slot} has been successfully updated`, - chalk[UPDATE_COLOR](`=================================================`), - ].join('\n'), - ); - } else { - this.log( - [ - '', - chalk[CREATE_COLOR](`+++++++++++++++++++++++++++++++++++++++++++++++++`), - `A squid deployment ${squid.name}#${squid.slot} was successfully created`, //${tag ? ` using tag ${chalk.bold(tag)} ` : ''} - chalk[CREATE_COLOR](`+++++++++++++++++++++++++++++++++++++++++++++++++`), - ].join('\n'), - ); - } + const deployment = await this.pollDeploy({ organization, deploy }); + if (!deployment || !deployment.squid) return; + + if (target) { + this.logDeployResult(UPDATE_COLOR, `The squid ${printSquid(target)} has been successfully updated`); + } else { + this.logDeployResult( + CREATE_COLOR, + `A new squid ${printSquid({ ...deployment.squid, organization: deployment.organization })} has been successfully created`, + ); } - // this.log([buildTable(newSquids, { changes, limit: LIMIT }), '']); + if (streamLogs) { + await this.streamLogs({ organization: deployment.organization, squid: deployment.squid }); + } + } + + private async promptUpdateSquid( + squid: Squid, + { + using = 'using "--allow-update" flag', + interactive, + }: { + using?: string; + interactive?: boolean; + } = {}, + ) { + const warning = [ + `The squid ${printSquid(squid)} already exists${squid.tags.length > 0 ? ` and has one or more tags assigned to it:` : ``}`, + ...squid.tags.map((t) => chalk.dim(` - ${t.name}`)), + ]; + + if (interactive) { + this.warn(warning.join('\n')); + } else { + this.error([...warning, `Please do it explicitly ${using}`].join('\n')); + } + + const { confirm } = await inquirer.prompt([ + { + name: 'confirm', + type: 'confirm', + message: 'Are you sure?', + prefix: `The squid ${printSquid(squid)} will be updated.`, + }, + ]); + + return !!confirm; + } + + private async promptOverrideConflict( + manifest: Manifest, + override: Record, + { using = 'using "--allow--manifest-override" flag', interactive }: { using?: string; interactive?: boolean } = {}, + ) { + const conflictKeys = keys(override).filter((k) => { + const m = get(manifest, k); + const o = get(override, k); + return !isNil(m) && m !== o; + }); + + if (!conflictKeys.length) return true; + + const warning = [ + 'Conflict detected!', + `A manifest values do not match with specified ones.`, + ``, + diff( + { content: conflictKeys.map((k) => `${k}: ${get(manifest, k)}`).join('\n') + '\n' }, + { content: conflictKeys.map((k) => `${k}: ${get(override, k)}`).join('\n') + '\n' }, + ), + ``, + ].join('\n'); + + if (interactive) { + this.warn(warning); + } else { + this.error([warning, `Please do it explicitly ${using}`].join('\n')); + } + + this.log( + `If it is intended and you'd like to override them, just skip this message and confirm, the manifest name will be overridden automatically in the Cloud during the deploy.`, + ); + + const { confirm } = await inquirer.prompt([ + { + name: 'confirm', + type: 'confirm', + message: chalk.reset(`Manifest values will be overridden. ${chalk.bold('Are you sure?')}`), + }, + ]); + + return !!confirm; + } + + private async promptSquidName( + name?: string | null | undefined, + { using = 'using "--name" flag', interactive }: { using?: string; interactive?: boolean } = {}, + ) { + if (name) return name; + + const warning = `The squid name is not defined either in the manifest or via CLI command.`; + + if (interactive) { + this.warn(warning); + } else { + this.error([warning, `Please specify it explicitly ${using}`].join('\n')); + } + + const { input } = await inquirer.prompt([ + { + name: 'input', + type: 'input', + message: `Please enter the name of the squid:`, + }, + ]); + + return input as string; } private async pack({ buildDir, squidDir, archiveName }: { buildDir: string; squidDir: string; archiveName: string }) { @@ -260,7 +428,7 @@ export default class Deploy extends DeployCommand { const squidArtifactStats = fs.statSync(squidArtifact); - CliUx.ux.action.stop(`${filesCount} files, ${prettyBytes(squidArtifactStats.size)} ✔️`); + CliUx.ux.action.stop(`${filesCount} files, ${prettyBytes(squidArtifactStats.size)} ${SUCCESS_CHECK_MARK}`); return squidArtifact; } @@ -275,7 +443,7 @@ export default class Deploy extends DeployCommand { return this.showError('The artifact URL is missing', 'UPLOAD_FAILED'); } - CliUx.ux.action.stop('✔️'); + CliUx.ux.action.stop(SUCCESS_CHECK_MARK); return artifactUrl; } diff --git a/src/commands/docs.ts b/src/commands/docs.ts index 1322b3e..e8fb714 100644 --- a/src/commands/docs.ts +++ b/src/commands/docs.ts @@ -7,6 +7,6 @@ export default class Docs extends Command { async run(): Promise { await this.parse(Docs); - void open('https://docs.subsquid.io'); + void open('https://docs.sqd.dev/'); } } diff --git a/src/commands/explorer.ts b/src/commands/explorer.ts index 68b3de2..9701be6 100644 --- a/src/commands/explorer.ts +++ b/src/commands/explorer.ts @@ -6,6 +6,8 @@ import { Loader } from '../ui/components/Loader'; import { VersionManager } from '../ui/components/VersionManager'; export default class Explorer extends CliCommand { + static hidden = true; + static description = 'Open a visual explorer for the Cloud deployments'; // static hidden = true; static flags = { @@ -18,10 +20,10 @@ export default class Explorer extends CliCommand { async run(): Promise { const { - flags: { org }, + flags: { org, interactive }, } = await this.parse(Explorer); - const organization = await this.promptOrganization(org, 'using "-o" flag'); + const organization = await this.promptOrganization(org, { interactive }); const screen = blessed.screen({ smartCSR: true, fastCSR: true, diff --git a/src/commands/gateways/ls.ts b/src/commands/gateways/list.ts similarity index 98% rename from src/commands/gateways/ls.ts rename to src/commands/gateways/list.ts index f1cd978..503797f 100644 --- a/src/commands/gateways/ls.ts +++ b/src/commands/gateways/list.ts @@ -7,6 +7,8 @@ import { Gateway, getEvmGateways, getSubstrateGateways } from '../../api/gateway import { CliCommand } from '../../command'; export default class Ls extends CliCommand { + static aliases = ['gateways ls']; + static description = 'List available gateways'; static flags = { diff --git a/src/commands/init.ts b/src/commands/init.ts index 5dff044..a719b9d 100644 --- a/src/commands/init.ts +++ b/src/commands/init.ts @@ -2,17 +2,16 @@ import { promises as asyncFs } from 'fs'; import path from 'path'; import { Args, Flags, ux as CliUx } from '@oclif/core'; +import { Manifest } from '@subsquid/manifest'; import chalk from 'chalk'; import inquirer from 'inquirer'; import { simpleGit } from 'simple-git'; -import { adjectives, animals, colors, uniqueNamesGenerator } from 'unique-names-generator'; -import { CliCommand } from '../command'; +import { CliCommand, SUCCESS_CHECK_MARK } from '../command'; import { readManifest, saveManifest } from '../manifest'; const SQUID_NAME_DESC = [ `The squid name. It must contain only alphanumeric or dash ("-") symbols and must not start with "-".`, - `Squid names are ${chalk.yellow('globally unique')}.`, ]; const TEMPLATE_ALIASES: Record = { @@ -143,18 +142,6 @@ export default class Init extends CliCommand { ? TEMPLATE_ALIASES[resolvedTemplate].url : resolvedTemplate; - try { - const uniqueNameSuggestion = uniqueNamesGenerator({ - dictionaries: [adjectives, colors, animals], - separator: '-', - length: 2, - }); - return this.error( - `There is already a squid with name "${name}" deployed to the Cloud. Squid names are globally unique. ` + - `Please pick a new memorable name, e.g. "${uniqueNameSuggestion}".`, - ); - } catch (e) {} - CliUx.ux.action.start(`◷ Downloading the template: ${githubRepository}... `); try { // TODO: support branches? @@ -162,7 +149,7 @@ export default class Init extends CliCommand { } catch (e: any) { return this.error(e); } - CliUx.ux.action.stop(`✔`); + CliUx.ux.action.stop(SUCCESS_CHECK_MARK); /** Clean up template **/ await asyncFs.rm(path.resolve(localDir, '.git'), { recursive: true }); @@ -174,10 +161,7 @@ export default class Init extends CliCommand { const manifestPath = path.resolve(localDir, 'squid.yaml'); try { - const manifest = readManifest(manifestPath); - - /** Override name in squid manifest **/ - manifest.name = name; + const manifest = Manifest.replace(readManifest(manifestPath), { name }); saveManifest(manifestPath, manifest); } catch (e: any) { diff --git a/src/commands/list.ts b/src/commands/list.ts new file mode 100644 index 0000000..fae721e --- /dev/null +++ b/src/commands/list.ts @@ -0,0 +1,83 @@ +import { ux as CliUx, Flags } from '@oclif/core'; + +import { listSquids } from '../api'; +import { CliCommand, SqdFlags } from '../command'; +import { printSquid } from '../utils'; + +export default class List extends CliCommand { + static aliases = ['ls']; + + static description = 'List squids deployed to the Cloud'; + + static flags = { + org: SqdFlags.org({ + required: false, + }), + name: SqdFlags.name({ + required: false, + relationships: [], + }), + tag: SqdFlags.tag({ + required: false, + dependsOn: [], + }), + slot: SqdFlags.slot({ + required: false, + dependsOn: [], + }), + reference: SqdFlags.reference({ + required: false, + }), + truncate: Flags.boolean({ + description: 'Truncate data in columns: false by default', + required: false, + default: false, + allowNo: true, + }), + }; + + async run(): Promise { + const { + flags: { truncate, reference, interactive, ...flags }, + } = await this.parse(List); + + const { org, name, slot, tag } = reference ? reference : (flags as any); + + const organization = name + ? await this.promptSquidOrganization(org, name, { interactive }) + : await this.promptOrganization(org, { interactive }); + + let squids = await listSquids({ organization, name }); + if (tag || slot) { + squids = squids.filter((s) => s.slot === slot || s.tags.some((t) => t.name === tag)); + } + if (squids.length) { + CliUx.ux.table( + squids, + { + name: { + header: 'Squid', + get: (s) => `${printSquid(s)}`, + }, + tags: { + header: 'Tags', + get: (s) => + s.tags + .map((t) => t.name) + .sort() + .join(', '), + }, + status: { + header: 'Status', + get: (s) => s.status?.toUpperCase(), + }, + deployedAt: { + header: 'Deployed', + get: (s) => (s.deployedAt ? new Date(s.deployedAt).toUTCString() : `-`), + }, + }, + { 'no-truncate': !truncate }, + ); + } + } +} diff --git a/src/commands/logs.ts b/src/commands/logs.ts index a49ac4b..dd36438 100644 --- a/src/commands/logs.ts +++ b/src/commands/logs.ts @@ -1,10 +1,11 @@ -import { Args, ux as CliUx, Flags } from '@oclif/core'; +import { Flags, ux as CliUx } from '@oclif/core'; +import { isNil, omitBy } from 'lodash'; import ms from 'ms'; -import { debugLog, SquidRequest, streamSquidLogs, squidHistoryLogs } from '../api'; -import { CliCommand, SquidNameArg } from '../command'; +import { debugLog, squidHistoryLogs, SquidRequest, streamSquidLogs } from '../api'; +import { CliCommand, SqdFlags } from '../command'; import { pretty } from '../logs'; -import { parseSquidName } from '../utils'; +import { formatSquidReference } from '../utils'; type LogResult = { hasLogs: boolean; @@ -21,14 +22,24 @@ function parseDate(str: string): Date { } export default class Logs extends CliCommand { - static aliases = ['squid:logs']; - static description = 'Fetch logs from a squid deployed to the Cloud'; - static args = { - squidName: SquidNameArg, - }; static flags = { + org: SqdFlags.org({ + required: false, + }), + name: SqdFlags.name({ + required: false, + }), + slot: SqdFlags.slot({ + required: false, + }), + tag: SqdFlags.tag({ + required: false, + }), + reference: SqdFlags.reference({ + required: false, + }), container: Flags.string({ char: 'c', summary: `Container name`, @@ -55,7 +66,6 @@ export default class Logs extends CliCommand { default: '1d', }), search: Flags.string({ - char: 's', summary: 'Filter by content', required: false, }), @@ -66,22 +76,19 @@ export default class Logs extends CliCommand { default: false, exclusive: ['fromDate', 'pageSize'], }), - org: Flags.string({ - char: 'o', - description: 'Organization', - required: false, - }), }; async run(): Promise { const { - args: { squidName }, - flags: { follow, pageSize, container, level, since, org, search }, + flags: { follow, pageSize, container, level, since, search, reference, interactive, ...flags }, } = await this.parse(Logs); - const filter = parseSquidName(squidName); - const organization = await this.promptSquidOrganization(org, filter.name, 'using "-o" flag'); - const squid = await this.findOrThrowSquid({ organization, ...filter }); + this.validateSquidNameFlags({ reference, ...flags }); + + const { org, name, tag, slot } = reference ? reference : (flags as any); + + const organization = await this.promptSquidOrganization(org, name, { interactive }); + const squid = await this.findOrThrowSquid({ organization, squid: { name, slot, tag } }); if (!squid) return; const fromDate = parseDate(since); @@ -155,6 +162,7 @@ export default class Logs extends CliCommand { }): Promise { // eslint-disable-next-line prefer-const let { logs, nextPage } = await squidHistoryLogs({ organization, squid, query }); + if (reverse) { logs = logs.reverse(); } diff --git a/src/commands/ls.ts b/src/commands/ls.ts deleted file mode 100644 index ee868dc..0000000 --- a/src/commands/ls.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { ux as CliUx, Flags } from '@oclif/core'; - -import { listSquids } from '../api'; -import { CliCommand } from '../command'; - -export default class Ls extends CliCommand { - static aliases = ['squid:ls']; - static description = 'List squids and squid versions deployed to the Cloud'; - - static flags = { - name: Flags.string({ - char: 'n', - description: 'squid name', - required: false, - }), - truncate: Flags.boolean({ - char: 't', - description: 'truncate data in columns: false by default', - required: false, - default: false, - }), - org: Flags.string({ - char: 'o', - description: 'Organization', - required: false, - }), - }; - - async run(): Promise { - const { - flags: { org, truncate, name }, - } = await this.parse(Ls); - const noTruncate = !truncate; - - const organization = name - ? await this.promptSquidOrganization(org, name, 'using "-o" flag') - : await this.promptOrganization(org, 'using "-o" flag'); - - const squids = await listSquids({ organization, name }); - if (squids) { - CliUx.ux.table( - squids, - { - name: { - header: 'Name', - }, - // description: {}, - slot: { - header: 'Deploy ID', - get: (s) => (s.slot ? `#${s.slot}` : `-`), - }, - tags: { - header: 'Tags', - get: (s) => - s.tags - .map((t) => `@${t.name}`) - .sort() - .join(', '), - }, - // urls: { - // header: 'API Urls', - // get: (s) => s.urls.map((u) => u.url).join('\n'), - // }, - status: { - header: 'Status', - get: (s) => s.status?.toUpperCase(), - }, - deployedAt: { - header: 'Deployed at', - get: (s) => (s.deployedAt ? new Date(s.deployedAt).toUTCString() : `-`), - }, - }, - { 'no-truncate': noTruncate }, - ); - } - } -} diff --git a/src/commands/prod.ts b/src/commands/prod.ts new file mode 100644 index 0000000..d11d1dc --- /dev/null +++ b/src/commands/prod.ts @@ -0,0 +1,25 @@ +import { Command } from '@oclif/core'; +import chalk from 'chalk'; + +export default class Prod extends Command { + static hidden = true; + + static description = 'Assign the canonical production API alias for a squid deployed to the Cloud'; + + async run(): Promise { + await this.parse(Prod); + + // TODO write description + this.log( + [ + chalk.yellow('*******************************************************'), + chalk.yellow('* *'), + chalk.yellow('* WARNING! This command has been deprecated *'), + chalk.yellow('* Please check the release notes *'), + chalk.yellow('* https://docs.sqd.dev/deployments-two-release-notes/ *'), + chalk.yellow('* *'), + chalk.yellow('*******************************************************'), + ].join('\n'), + ); + } +} diff --git a/src/commands/remove.ts b/src/commands/remove.ts new file mode 100644 index 0000000..4de9b14 --- /dev/null +++ b/src/commands/remove.ts @@ -0,0 +1,87 @@ +import { Flags } from '@oclif/core'; +import chalk from 'chalk'; +import inquirer from 'inquirer'; + +import { deleteSquid } from '../api'; +import { SqdFlags } from '../command'; +import { DeployCommand } from '../deploy-command'; +import { ParsedSquidReference, printSquid } from '../utils'; + +import { DELETE_COLOR } from './deploy'; + +export default class Remove extends DeployCommand { + static description = 'Remove a squid deployed to the Cloud'; + + static aliases = ['rm']; + + static flags = { + org: SqdFlags.org({ + required: false, + }), + name: SqdFlags.name({ + required: false, + }), + slot: SqdFlags.slot({ + required: false, + }), + tag: SqdFlags.tag({ + required: false, + }), + reference: SqdFlags.reference({ + required: false, + }), + force: Flags.boolean({ + char: 'f', + description: 'Does not prompt before removing a squid or its version', + required: false, + }), + }; + + async run(): Promise { + const { + flags: { interactive, force, reference, ...flags }, + } = await this.parse(Remove); + + this.validateSquidNameFlags({ reference, ...flags }); + + const { org, name, tag, slot } = reference || (flags as ParsedSquidReference); + + const organization = await this.promptSquidOrganization(org, name, { interactive }); + const squid = await this.findOrThrowSquid({ organization, squid: { name, slot, tag } }); + + const attached = await this.promptAttachToDeploy(squid, { interactive }); + if (attached) return; + + const hasOtherTags = !tag || !!squid.tags.some((t) => t.name !== tag); + if (hasOtherTags) { + const warning = [ + `The squid ${printSquid(squid)} has one or more tags assigned to it:`, + ...squid.tags.map((t) => chalk.dim(` - ${t.name}`)), + ]; + + if (!interactive && !force) { + this.error([...warning, 'Please do it explicitly using --force flag'].join('\n')); + } else { + this.warn(warning.join('\n')); + } + } + + if (!force && interactive) { + const { confirm } = await inquirer.prompt([ + { + name: 'confirm', + type: 'confirm', + message: `Are you sure?`, + prefix: `The squid ${printSquid(squid)} will be completely removed. This action can not be undone.`, + }, + ]); + if (!confirm) return; + } + + const deployment = await deleteSquid({ organization, squid }); + await this.pollDeploy({ organization, deploy: deployment }); + if (!deployment || !deployment.squid) return; + + this.logDeployResult(DELETE_COLOR, `The squid ${printSquid(squid)} was successfully deleted`); + } +} diff --git a/src/commands/restart.ts b/src/commands/restart.ts index 0c91250..da25567 100644 --- a/src/commands/restart.ts +++ b/src/commands/restart.ts @@ -1,69 +1,53 @@ -import { Args, Flags } from '@oclif/core'; -import chalk from 'chalk'; +import { Flags } from '@oclif/core'; +import { isNil, omitBy } from 'lodash'; import { restartSquid } from '../api'; -import { SquidNameArg } from '../command'; +import { SqdFlags } from '../command'; import { DeployCommand } from '../deploy-command'; -import { parseSquidName } from '../utils'; +import { formatSquidReference as formatSquidReference, printSquid } from '../utils'; import { UPDATE_COLOR } from './deploy'; export default class Restart extends DeployCommand { - static aliases = ['squid:redeploy', 'redeploy']; - static description = 'Restart a squid deployed to the Cloud'; - static args = { - squidName: SquidNameArg, - }; static flags = { - env: Flags.string({ - char: 'e', - description: 'environment variable', + org: SqdFlags.org({ + required: false, + }), + name: SqdFlags.name({ required: false, - deprecated: true, - multiple: true, - hidden: true, }), - envFile: Flags.string({ - description: 'file with environment variables', - deprecated: true, + slot: SqdFlags.slot({ required: false, - hidden: true, }), - 'no-stream-logs': Flags.boolean({ - description: 'Do not attach and stream squid logs after the deploy', + tag: SqdFlags.tag({ required: false, - default: false, }), - org: Flags.string({ - char: 'o', - description: 'Organization', + reference: SqdFlags.reference({ required: false, }), }; async run(): Promise { const { - flags: { 'no-stream-logs': disableStreamLogs, org }, - args: { squidName }, + flags: { reference, interactive, ...flags }, } = await this.parse(Restart); - const filter = parseSquidName(squidName); + this.validateSquidNameFlags({ reference, ...flags }); + + const { org, name, tag, slot } = reference ? reference : (flags as any); + + const organization = await this.promptSquidOrganization(org, name, { interactive }); + const squid = await this.findOrThrowSquid({ organization, squid: { name, tag, slot } }); - const organization = await this.promptSquidOrganization(org, filter.name, 'using "-o" flag'); - const squid = await this.findOrThrowSquid({ organization, ...filter }); + const attached = await this.promptAttachToDeploy(squid, { interactive }); + if (attached) return; - const deploy = await restartSquid({ organization, squid }); - await this.pollDeploy({ organization, deploy }); + const deployment = await restartSquid({ organization, squid }); + await this.pollDeploy({ organization, deploy: deployment }); + if (!deployment || !deployment.squid) return; - this.log( - [ - '', - chalk[UPDATE_COLOR](`=================================================`), - `The squid ${squid.name}#${squid.slot} has been successfully restarted`, - chalk[UPDATE_COLOR](`=================================================`), - ].join('\n'), - ); + this.logDeployResult(UPDATE_COLOR, `The squid ${printSquid(squid)} has been successfully restarted`); } } diff --git a/src/commands/rm.ts b/src/commands/rm.ts deleted file mode 100644 index 6cbfa15..0000000 --- a/src/commands/rm.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { Args, ux as CliUx, Flags } from '@oclif/core'; -import chalk from 'chalk'; -import inquirer from 'inquirer'; - -import { deleteSquid } from '../api'; -import { SquidNameArg } from '../command'; -import { DeployCommand } from '../deploy-command'; -import { formatSquidName, parseSquidName } from '../utils'; - -import { CREATE_COLOR, DELETE_COLOR } from './deploy'; - -export default class Rm extends DeployCommand { - static aliases = ['squid:kill', 'kill']; - - static description = 'Remove a squid or a squid version deployed to the Cloud'; - - static args = { - squidName: SquidNameArg, - }; - - static flags = { - force: Flags.boolean({ - char: 'f', - description: 'Does not prompt before removing a squid or its version', - required: false, - }), - org: Flags.string({ - char: 'o', - description: 'Organization', - required: false, - }), - }; - - async run(): Promise { - const { - args: { squidName }, - flags: { force, org }, - } = await this.parse(Rm); - - const filter = parseSquidName(squidName); - - const organization = await this.promptSquidOrganization(org, filter.name, 'using "-o" flag'); - const squid = await this.findOrThrowSquid({ organization, ...filter }); - - if (!force) { - const { confirm } = await inquirer.prompt([ - { - name: 'confirm', - type: 'confirm', - message: `Your squid ${formatSquidName(squid)} will be completely removed. This action can not be undone. Are you sure?`, - }, - ]); - if (!confirm) return; - } - - const deploy = await deleteSquid({ organization, squid }); - await this.pollDeploy({ organization, deploy }); - - this.log( - [ - '', - chalk[DELETE_COLOR](`-------------------------------------------------`), - `A squid deployment ${squid.name}#${squid.slot} was successfully deleted`, - chalk[DELETE_COLOR](`-------------------------------------------------`), - ].join('\n'), - ); - } -} diff --git a/src/commands/secrets/ls.ts b/src/commands/secrets/list.ts similarity index 86% rename from src/commands/secrets/ls.ts rename to src/commands/secrets/list.ts index 2109774..4d8c7c3 100644 --- a/src/commands/secrets/ls.ts +++ b/src/commands/secrets/list.ts @@ -4,6 +4,8 @@ import { listSecrets } from '../../api'; import { CliCommand } from '../../command'; export default class Ls extends CliCommand { + static aliases = ['secrets ls']; + static description = 'List organization secrets in the Cloud'; static flags = { @@ -16,11 +18,11 @@ export default class Ls extends CliCommand { async run(): Promise { const { - flags: { org }, + flags: { org, interactive }, args: {}, } = await this.parse(Ls); - const organization = await this.promptOrganization(org, 'using "-o" flag'); + const organization = await this.promptOrganization(org, { interactive }); const response = await listSecrets({ organization }); if (!Object.keys(response.secrets).length) { diff --git a/src/commands/secrets/rm.ts b/src/commands/secrets/remove.ts similarity index 82% rename from src/commands/secrets/rm.ts rename to src/commands/secrets/remove.ts index c182600..fab4764 100644 --- a/src/commands/secrets/rm.ts +++ b/src/commands/secrets/remove.ts @@ -4,6 +4,8 @@ import { removeSecret } from '../../api'; import { CliCommand } from '../../command'; export default class Rm extends CliCommand { + static aliases = ['secrets rm']; + static description = 'Delete an organization secret in the Cloud'; static args = { name: Args.string({ @@ -22,11 +24,11 @@ export default class Rm extends CliCommand { async run(): Promise { const { - flags: { org }, + flags: { org, interactive }, args: { name }, } = await this.parse(Rm); - const organization = await this.promptOrganization(org, 'using "-o" flag'); + const organization = await this.promptOrganization(org, { interactive }); await removeSecret({ organization, name }); this.log(`Secret '${name}' removed`); diff --git a/src/commands/secrets/set.ts b/src/commands/secrets/set.ts index 629a887..704c3b1 100644 --- a/src/commands/secrets/set.ts +++ b/src/commands/secrets/set.ts @@ -33,11 +33,11 @@ export default class Set extends CliCommand { async run(): Promise { const { - flags: { org }, + flags: { org, interactive }, args: { name, value }, } = await this.parse(Set); - const organization = await this.promptOrganization(org, 'using "-o" flag'); + const organization = await this.promptOrganization(org, { interactive }); let secretValue = value; if (!secretValue) { diff --git a/src/commands/tag.ts b/src/commands/tag.ts deleted file mode 100644 index 2bb62c0..0000000 --- a/src/commands/tag.ts +++ /dev/null @@ -1,74 +0,0 @@ -// import { buildTable, updateDemoTag } from '../api/demoStore'; -import { Args, Flags } from '@oclif/core'; -import chalk from 'chalk'; -import inquirer from 'inquirer'; - -import { tagSquid } from '../api'; -import { SquidNameArg } from '../command'; -import { DeployCommand } from '../deploy-command'; -import { formatSquidName, parseSquidName } from '../utils'; - -import { UPDATE_COLOR } from './deploy'; - -export default class Tag extends DeployCommand { - static description = 'Set a tag for squid'; - - static args = { - squid: SquidNameArg, - tag: Args.string({ - description: `New tag to assign`, - required: true, - }), - }; - - static flags = { - org: Flags.string({ - char: 'o', - description: 'Organization', - required: false, - }), - }; - - async run(): Promise { - const { - args: { squid: squidName, tag }, - flags: { org }, - } = await this.parse(Tag); - - const filter = parseSquidName(squidName); - - const organization = await this.promptSquidOrganization(org, filter.name, 'using "-o" flag'); - const squid = await this.findOrThrowSquid({ organization, ...filter }); - - const normalizedTag = tag.startsWith('@') ? tag.slice(1) : tag; - const oldSquid = await this.findSquid({ organization, name: filter.name, tag: normalizedTag }); - if (oldSquid) { - const { confirm } = await inquirer.prompt([ - { - name: 'confirm', - type: 'confirm', - message: `A squid tag @${normalizedTag} has already been assigned to the previous squid deployment ${formatSquidName(oldSquid)}. Are you sure?`, - }, - ]); - if (!confirm) return; - } - - const deploy = await tagSquid({ - organization, - squid, - data: { - tag, - }, - }); - await this.pollDeploy({ organization, deploy }); - - this.log( - [ - '', - chalk[UPDATE_COLOR](`=================================================`), - `The squid ${squid.name}#${squid.slot} has been successfully updated`, - chalk[UPDATE_COLOR](`=================================================`), - ].join('\n'), - ); - } -} diff --git a/src/commands/tags/add.ts b/src/commands/tags/add.ts new file mode 100644 index 0000000..a1136e7 --- /dev/null +++ b/src/commands/tags/add.ts @@ -0,0 +1,86 @@ +import { Args, Flags } from '@oclif/core'; +import chalk from 'chalk'; +import inquirer from 'inquirer'; + +import { addSquidTag } from '../../api'; +import { SqdFlags } from '../../command'; +import { DeployCommand } from '../../deploy-command'; +import { formatSquidReference, printSquid } from '../../utils'; +import { UPDATE_COLOR } from '../deploy'; + +export default class Add extends DeployCommand { + static description = 'Add a tag to a squid'; + + static args = { + tag: Args.string({ + description: `New tag to assign`, + required: true, + }), + }; + + static flags = { + org: SqdFlags.org({ + required: false, + }), + name: SqdFlags.name({ + required: false, + }), + slot: SqdFlags.slot({ + required: false, + }), + tag: SqdFlags.tag({ + required: false, + }), + reference: SqdFlags.reference({ + required: false, + }), + 'allow-tag-reassign': Flags.boolean({ + description: 'Allow reassigning an existing tag', + required: false, + default: false, + }), + }; + + async run(): Promise { + const { + args: { tag: tagName }, + flags: { reference, interactive, ...flags }, + } = await this.parse(Add); + + this.validateSquidNameFlags({ reference, ...flags }); + + const { org, name, tag, slot } = reference ? reference : (flags as any); + + const organization = await this.promptSquidOrganization(org, name, { interactive }); + const squid = await this.findOrThrowSquid({ organization, squid: { name, slot, tag } }); + + if (squid.tags.find((t) => t.name === tagName)) { + return this.log(`Tag "${tagName}" is already assigned to the squid ${printSquid(squid)}`); + } + + if (!flags['allow-tag-reassign']) { + const confirm = await this.promptAddTag( + { + organization, + name, + tag: tagName, + }, + { interactive }, + ); + if (!confirm) return; + } + + const attached = await this.promptAttachToDeploy(squid, { interactive }); + if (attached) return; + + const deployment = await addSquidTag({ + organization, + squid, + tag: tagName, + }); + await this.pollDeploy({ organization, deploy: deployment }); + if (!deployment || !deployment.squid) return; + + this.logDeployResult(UPDATE_COLOR, `The squid ${printSquid(squid)} has been successfully updated`); + } +} diff --git a/src/commands/tags/remove.ts b/src/commands/tags/remove.ts new file mode 100644 index 0000000..16f5dac --- /dev/null +++ b/src/commands/tags/remove.ts @@ -0,0 +1,67 @@ +import { Args } from '@oclif/core'; + +import { removeSquidTag } from '../../api'; +import { SqdFlags } from '../../command'; +import { DeployCommand } from '../../deploy-command'; +import { formatSquidReference, printSquid } from '../../utils'; +import { UPDATE_COLOR } from '../deploy'; + +export default class Remove extends DeployCommand { + static description = 'Remove a tag from a squid'; + + static args = { + tag: Args.string({ + description: `New tag to assign`, + required: true, + }), + }; + + static flags = { + org: SqdFlags.org({ + required: false, + }), + name: SqdFlags.name({ + required: false, + }), + slot: SqdFlags.slot({ + required: false, + }), + tag: SqdFlags.tag({ + required: false, + }), + reference: SqdFlags.reference({ + required: false, + }), + }; + + async run(): Promise { + const { + args: { tag: tagName }, + flags: { reference, interactive, ...flags }, + } = await this.parse(Remove); + + this.validateSquidNameFlags({ reference, ...flags }); + + const { org, name, tag, slot } = reference ? reference : (flags as any); + + const organization = await this.promptSquidOrganization(org, name, { interactive }); + const squid = await this.findOrThrowSquid({ organization, squid: { name, tag, slot } }); + + if (!squid.tags.some((t) => t.name === tagName)) { + return this.log(`Tag "${tagName}" is not assigned to the squid ${printSquid(squid)}`); + } + + const attached = await this.promptAttachToDeploy(squid, { interactive }); + if (attached) return; + + const deployment = await removeSquidTag({ + organization, + squid, + tag: tagName, + }); + await this.pollDeploy({ organization, deploy: deployment }); + if (!deployment || !deployment.squid) return; + + this.logDeployResult(UPDATE_COLOR, `The squid ${printSquid(squid)} has been successfully updated`); + } +} diff --git a/src/deploy-command.ts b/src/deploy-command.ts index 83ec241..ca53413 100644 --- a/src/deploy-command.ts +++ b/src/deploy-command.ts @@ -1,30 +1,28 @@ import { ux as CliUx } from '@oclif/core'; -import chalk from 'chalk'; +import chalk, { ForegroundColor } from 'chalk'; import inquirer from 'inquirer'; -import { - ApiError, - Deploy, - DeployRequest, - DeployStatus, - getDeploy, - getSquid, - listSquids, - OrganizationRequest, - Squid, - streamSquidLogs, -} from './api'; -import { CliCommand } from './command'; -import { doUntil } from './utils'; +import { Deployment, DeployRequest, getDeploy, Organization, Squid, SquidRequest, streamSquidLogs } from './api'; +import { CliCommand, SUCCESS_CHECK_MARK } from './command'; +import { doUntil, formatSquidReference, printSquid } from './utils'; export abstract class DeployCommand extends CliCommand { - deploy: Deploy | undefined; + deploy: Deployment | undefined; logsPrinted = 0; - async attachToParallelDeploy(squid: Squid) { + async promptAttachToDeploy(squid: Squid, { interactive }: { interactive?: boolean } = {}) { if (!squid.lastDeploy) return false; if (squid.status !== 'DEPLOYING') return false; + const warning = `Squid ${printSquid(squid)} is being deploying. +You can not run deploys on the same squid in parallel`; + + if (!interactive) { + this.error(warning); + } + + this.warn(warning); + switch (squid.lastDeploy.type) { // we should react only for running deploy case 'DEPLOY': @@ -32,9 +30,7 @@ export abstract class DeployCommand extends CliCommand { { name: 'confirm', type: 'confirm', - message: `Squid "${squid.name}#${squid.slot}" is being deploying. -You can not run deploys on the same squid in parallel. -Do you want to attach to the running deploy process?`, + message: `Do you want to attach to the running deploy process?`, }, ]); if (!confirm) return false; @@ -43,6 +39,7 @@ Do you want to attach to the running deploy process?`, await this.pollDeploy({ organization: squid.organization, deploy: squid.lastDeploy, + streamLogs: true, }); } @@ -50,7 +47,40 @@ Do you want to attach to the running deploy process?`, } } - async pollDeploy({ deploy, organization }: DeployRequest): Promise { + async promptAddTag( + { organization, name, tag }: { organization: Pick; name: string; tag: string }, + { using = 'using "--allow-tag-reassign" flag', interactive }: { using?: string; interactive?: boolean } = {}, + ) { + const oldSquid = await this.findSquid({ + organization, + squid: { name, tag }, + }); + if (!oldSquid) return true; + + const warning = `The tag "${tag}" has already been assigned to ${printSquid(oldSquid)}.`; + + if (!interactive) { + this.error([warning, `Please do it explicitly ${using}`].join('\n')); + } + + this.warn(warning); + + const { confirm } = await inquirer.prompt([ + { + name: 'confirm', + type: 'confirm', + message: 'Are you sure?', + prefix: `The tag will be reassigned.`, + }, + ]); + + return !!confirm; + } + + async pollDeploy({ + deploy, + organization, + }: DeployRequest & { streamLogs?: boolean }): Promise { let lastStatus: string; let validatedPrinted = false; @@ -65,7 +95,7 @@ Do you want to attach to the running deploy process?`, if (this.isFailed()) return this.showError(`An error occurred while deploying the squid`); if (this.deploy.status === lastStatus) return false; lastStatus = this.deploy.status; - CliUx.ux.action.stop('✔️'); + CliUx.ux.action.stop(SUCCESS_CHECK_MARK); switch (this.deploy.status) { case 'UNPACKING': @@ -98,19 +128,20 @@ Do you want to attach to the running deploy process?`, return false; case 'DEPLOYING': case 'SQUID_SYNCING': - CliUx.ux.action.start('◷ Deploying the squid'); + CliUx.ux.action.start('◷ Syncing the squid'); return false; case 'ADDONS_SYNCING': CliUx.ux.action.start('◷ Syncing the squid addons'); return false; - case 'TAGGING': - CliUx.ux.action.start('◷ Tagging the squid'); + case 'ADDING_INGRESS': + case 'REMOVING_INGRESS': + CliUx.ux.action.start('◷ Configuring ingress'); return false; case 'OK': - this.log(`Done! ✔️`); + this.log(`Done! ${SUCCESS_CHECK_MARK}`); return true; default: @@ -123,16 +154,20 @@ Do you want to attach to the running deploy process?`, }, { pause: 3000 }, ); - if (!this.deploy?.squid) return; - const squid = await getSquid({ + return this.deploy; + } + + async streamLogs({ organization, squid }: SquidRequest) { + CliUx.ux.action.start(`Streaming logs from the squid`); + + await streamSquidLogs({ organization, - squid: this.deploy.squid, + squid, + onLog: (l) => this.log(l), }); - if (!squid) return; - - return squid; } + printDebug = () => { if (!this.deploy) return; @@ -173,7 +208,7 @@ Do you want to attach to the running deploy process?`, ); if (this.deploy?.squid) { - errors.push(`${chalk.dim('Squid:')} ${this.deploy.squid.name}#${this.deploy.squid.slot}`); + errors.push(`${chalk.dim('Squid:')} ${formatSquidReference(this.deploy.squid)}`); } } @@ -186,4 +221,16 @@ Do you want to attach to the running deploy process?`, return this.deploy.failed !== 'NO'; } + + logDeployResult(color: typeof ForegroundColor, message: string) { + this.log( + [ + '', + chalk[color](`=================================================`), + message, + chalk[color](`=================================================`), + '', + ].join('\n'), + ); + } } diff --git a/src/flags/fullname.ts b/src/flags/fullname.ts new file mode 100644 index 0000000..442d35b --- /dev/null +++ b/src/flags/fullname.ts @@ -0,0 +1,19 @@ +import { Flags } from '@oclif/core'; +import Joi from 'joi'; + +import { JoiSquidReference, ParsedSquidReference, parseSquidReference, SQUID_FULLNAME_REGEXP } from '../utils'; + +export const reference = Flags.custom({ + char: 'r', + helpGroup: 'SQUID', + name: 'reference', + aliases: ['ref'], + description: `Fully qualified reference of the squid. It can include the organization, name, slot, or tag`, + helpValue: '[/](@|:)', + required: false, + exclusive: ['org', 'name', 'slot', 'tag'], + parse: async (input) => { + const res = parseSquidReference(input); + return await JoiSquidReference.validateAsync(res); + }, +}); diff --git a/src/flags/index.ts b/src/flags/index.ts new file mode 100644 index 0000000..962407a --- /dev/null +++ b/src/flags/index.ts @@ -0,0 +1,5 @@ +export { reference } from './fullname'; +export { name } from './name'; +export { org } from './org'; +export { slot } from './slot'; +export { tag } from './tag'; diff --git a/src/flags/name.ts b/src/flags/name.ts new file mode 100644 index 0000000..1af810a --- /dev/null +++ b/src/flags/name.ts @@ -0,0 +1,23 @@ +import { Flags } from '@oclif/core'; +import { JoiSquidName } from '@subsquid/manifest'; + +export const name = Flags.custom({ + helpGroup: 'SQUID', + char: 'n', + name: 'name', + description: 'Name of the squid', + helpValue: '', + required: false, + parse: async (input) => { + return await JoiSquidName.validateAsync(input); + }, + relationships: [ + { + type: 'some', + flags: [ + { name: 'slot', when: async (flags) => !flags['tag'] }, + { name: 'tag', when: async (flags) => !flags['slot'] }, + ], + }, + ], +}); diff --git a/src/flags/org.ts b/src/flags/org.ts new file mode 100644 index 0000000..2b22fae --- /dev/null +++ b/src/flags/org.ts @@ -0,0 +1,13 @@ +import { Flags } from '@oclif/core'; + +export const org = Flags.custom({ + helpGroup: 'ORG', + char: 'o', + name: 'org', + description: 'Code of the organization', + helpValue: '', + required: false, + parse: async (input) => { + return input.toLowerCase(); + }, +}); diff --git a/src/flags/slot.ts b/src/flags/slot.ts new file mode 100644 index 0000000..34da42c --- /dev/null +++ b/src/flags/slot.ts @@ -0,0 +1,16 @@ +import { Flags } from '@oclif/core'; +import { JoiSquidSlot } from '@subsquid/manifest'; + +export const slot = Flags.custom({ + helpGroup: 'SQUID', + char: 's', + name: 'slot', + description: 'Slot of the squid', + helpValue: '', + parse: async (input) => { + return await JoiSquidSlot.validateAsync(input); + }, + required: false, + dependsOn: ['name'], + exclusive: ['tag'], +}); diff --git a/src/flags/tag.ts b/src/flags/tag.ts new file mode 100644 index 0000000..8e4fe77 --- /dev/null +++ b/src/flags/tag.ts @@ -0,0 +1,16 @@ +import { Flags } from '@oclif/core'; +import { JoiSquidTag } from '@subsquid/manifest'; + +export const tag = Flags.custom({ + helpGroup: 'SQUID', + char: 't', + name: 'tag', + description: 'Tag of the squid', + helpValue: '', + required: false, + parse: async (input) => { + return await JoiSquidTag.validateAsync(input); + }, + dependsOn: ['name'], + exclusive: ['slot'], +}); diff --git a/src/help.ts b/src/help.ts index e3bbbd4..042b504 100644 --- a/src/help.ts +++ b/src/help.ts @@ -90,7 +90,7 @@ export default class Help extends OclifHelp { const [description] = (c.summary || c.description || '').split('\n'); return { - name: c.id, + name: c.id.replace(':', ' '), aliases: c.aliases, description: description, }; diff --git a/src/hooks/command_not_found.ts b/src/hooks/command_not_found.ts index f3110f1..8138d1a 100644 --- a/src/hooks/command_not_found.ts +++ b/src/hooks/command_not_found.ts @@ -1,16 +1,17 @@ import { Hook, toConfiguredId } from '@oclif/core'; -import { getSquidCommands } from '../utils'; import { run as squidCommandRun } from '@subsquid/commands/lib/run'; import chalk from 'chalk'; -import { minBy } from 'lodash'; import Levenshtein from 'fast-levenshtein'; +import { minBy } from 'lodash'; + import Help from '../help'; +import { getSquidCommands } from '../utils'; function closestCommand(cmd: string, commands: string[]) { return minBy(commands, (c) => Levenshtein.get(cmd, c))!; } -const hook: Hook<'command_not_found'> = async function ({ id, argv, config}) { +const hook: Hook<'command_not_found'> = async function ({ id, argv, config }) { const squidCmdConfig = await getSquidCommands(); if (squidCmdConfig?.commands?.[id]) { process.exit(await squidCommandRun(squidCmdConfig, id, (argv || []).slice(1))); diff --git a/src/manifest/manifest.ts b/src/manifest/manifest.ts index 63bf2ff..fd2ca37 100644 --- a/src/manifest/manifest.ts +++ b/src/manifest/manifest.ts @@ -1,25 +1,16 @@ import fs from 'fs'; import path from 'path'; -import { Manifest, ManifestValue } from '@subsquid/manifest'; +import { Manifest } from '@subsquid/manifest'; import { Expression, Parser } from '@subsquid/manifest-expr'; -import yaml from 'js-yaml'; import { mapValues } from 'lodash'; export function readManifest(path: string) { - return yaml.load(fs.readFileSync(path).toString()) as Partial; + return fs.readFileSync(path).toString(); } -export function saveManifest(path: string, manifest: Partial) { - fs.writeFileSync(path, formatManifest(manifest)); -} - -export function formatManifest(manifest: Partial): string { - return yaml.dump(manifest, { - styles: { - 'tag:yaml.org,2002:null': 'empty', - }, - }); +export function saveManifest(path: string, manifest: string) { + fs.writeFileSync(path, manifest); } export function evalManifestEnv(env: Record, context: Record) { @@ -34,16 +25,13 @@ export function parseManifestEnv(env: Record) { return mapValues(env, (value) => (typeof value === 'string' ? parser.parse(value) : value)); } -export function loadManifestFile( - localPath: string, - manifestPath: string, -): { squidDir: string; manifest: ManifestValue } { +export function loadManifestFile(localPath: string, manifestPath: string): { squidDir: string; manifest: Manifest } { const squidDir = path.resolve(localPath); if (!fs.statSync(squidDir).isDirectory()) { throw new Error( [ - `The squid directory is not a directory`, + `The provided path is not a directory`, ``, `Squid directory ${squidDir}`, ``, @@ -98,19 +86,18 @@ export function loadManifestFile( let manifest; try { const raw = fs.readFileSync(manifestFullPath).toString(); - manifest = Manifest.parse(raw, { validation: { allowUnknown: true } }); + const { value, error } = Manifest.parse(raw, { validation: { allowUnknown: true } }); + if (error) { + throw error; + } + manifest = value as Manifest; } catch (e: any) { throw new Error( `The manifest file on ${manifestFullPath} can not be parsed: ${e instanceof Error ? e.message : e}`, ); } - - if (manifest.hasError()) { - throw new Error(manifest.getErrors().join('\n')); - } - return { squidDir, - manifest: manifest.values() as ManifestValue, + manifest: manifest, }; } diff --git a/src/manifest/manifest.unit.spec.ts b/src/manifest/manifest.unit.spec.ts deleted file mode 100644 index 8e986c6..0000000 --- a/src/manifest/manifest.unit.spec.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { formatManifest } from './manifest'; - -describe('Manifest', () => { - describe('formatManifest', () => { - it('should replace null as empty string', () => { - const formatted = formatManifest({ - name: 'test', - version: 1, - build: null as any, - }); - - expect(formatted).toEqual(['name: test', 'version: 1', 'build: ', ''].join('\n')); - }); - }); -}); diff --git a/src/ui/components/VersionLogsTab.ts b/src/ui/components/VersionLogsTab.ts index 1cb9d21..627710d 100644 --- a/src/ui/components/VersionLogsTab.ts +++ b/src/ui/components/VersionLogsTab.ts @@ -1,7 +1,7 @@ import { addMinutes } from 'date-fns'; -import blessed, { Element, List, Log } from 'reblessed'; +import blessed, { Element } from 'reblessed'; -import { streamSquidLogs, squidHistoryLogs } from '../../api'; +import { squidHistoryLogs, streamSquidLogs } from '../../api'; import { pretty } from '../../logs'; import { mainColor, scrollBarTheme } from '../theme'; @@ -39,13 +39,14 @@ export class VersionLogTab implements VersionTab { try { const { logs } = await squidHistoryLogs({ organization: squid.organization, - squid: squid, + squid, query: { limit: 100, from: addMinutes(new Date(), -30), }, abortController, }); + pretty(logs.reverse()).forEach((line) => { logsBox.add(line); }); diff --git a/src/ui/components/VersionSummaryTab.ts b/src/ui/components/VersionSummaryTab.ts index 26231d7..62e8445 100644 --- a/src/ui/components/VersionSummaryTab.ts +++ b/src/ui/components/VersionSummaryTab.ts @@ -27,7 +27,10 @@ export class VersionSummaryTab implements VersionTab { } lines.push(`${chalkMainColor(`API`)} ${chalkMainColor(squid.api?.status)}`); - lines.push(`${squid.api?.url}`); + for (const url of squid.api?.urls || []) { + lines.push(`${url.url}`); + } + lines.push(''); const table = new Table({ diff --git a/src/ui/components/types.ts b/src/ui/components/types.ts index 1616e1c..b5e529c 100644 --- a/src/ui/components/types.ts +++ b/src/ui/components/types.ts @@ -1,5 +1,5 @@ import { Squid as ApiSquid } from '../../api'; -import { formatSquidName } from '../../utils'; +import { formatSquidReference } from '../../utils'; export interface Squid extends ApiSquid {} export class Squid { @@ -8,7 +8,7 @@ export class Squid { constructor(squid: ApiSquid) { Object.assign(this, squid); - this.displayName = formatSquidName(this); + this.displayName = formatSquidReference({ name: this.name, slot: this.slot }); if (this.tags.length) { this.displayName += ` (${this.tags.map((a) => a.name).join(', ')})`; diff --git a/src/utils.ts b/src/utils.ts index 783989d..b4e47db 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,5 +1,18 @@ -import { Command } from '@oclif/core'; import { ConfigNotFound, getConfig } from '@subsquid/commands'; +import { + JoiSquidName, + JoiSquidSlot, + JoiSquidTag, + SQUID_NAME_PATTERN, + SQUID_SLOT_PATTERN, + SQUID_TAG_PATTERN, +} from '@subsquid/manifest'; +import chalk from 'chalk'; +import Joi from 'joi'; +import { PickDeep } from 'type-fest'; + +import { Squid } from './api'; +import { org } from './flags'; export async function getSquidCommands() { try { @@ -23,19 +36,47 @@ export async function doUntil(fn: () => Promise, { pause }: { pause: nu } } -export function parseSquidName(squidName: string) { - if (squidName.includes('#')) { - const [name, slot] = squidName.split('#'); - return { name, slot }; - } else if (squidName.includes('#')) { - const [name, tag] = squidName.split('@'); - return { name, tag }; - } else { - throw new Error(`Invalid squid name: "${squidName}"`); +export type ParsedSquidReference = { org?: string; name: string } & ( + | { slot: string; tag?: never } + | { slot?: never; tag: string } +); + +export function formatSquidReference( + reference: { org?: string; name: string; slot?: string; tag?: string } | string, + { colored }: { colored?: boolean } = {}, +) { + const { org, name, slot, tag } = typeof reference === 'string' ? parseSquidReference(reference) : reference; + if (!tag && !slot) { + throw new Error('At least one of slot or tag has to be defined'); } + + const prefix = org ? `${org}/` : ``; + const suffix = slot ? `@${slot}` : `:${tag}`; + + return colored ? chalk`{bold {green ${prefix}}{green ${name}}{blue ${suffix}}}` : `${prefix}${name}${suffix}`; } -export function formatSquidName( - opts: { name: string; tag: string; slot?: undefined } | { name: string; slot: string; tag?: undefined }, -) { - return 'tag' in opts ? `${opts.name}@${opts.tag}` : `${opts.name}#${opts.slot}`; + +export const SQUID_FULLNAME_REGEXP = /^((.+)\/)?(.+)([@:])(.+)$/; + +export const JoiSquidReference = Joi.object({ + org: JoiSquidName, + name: JoiSquidName.required(), + slot: JoiSquidSlot, + tag: JoiSquidTag, +}).xor('slot', 'tag'); + +export function parseSquidReference(reference: string): ParsedSquidReference { + const parsed = SQUID_FULLNAME_REGEXP.exec(reference); + if (!parsed) { + throw new Error(`The squid reference "${reference}" is invalid.`); + } + + const [, , org, name, type, tagOrSlot] = parsed; + + // the last case should never happen, used only for flag validation + return { org, name, ...(type === ':' ? { tag: tagOrSlot } : type === '@' ? { slot: tagOrSlot } : ({} as any)) }; +} + +export function printSquid(squid: PickDeep) { + return formatSquidReference({ org: squid.organization.code, name: squid.name, slot: squid.slot }, { colored: true }); } diff --git a/yarn.lock b/yarn.lock index e3ea71e..55da827 100644 --- a/yarn.lock +++ b/yarn.lock @@ -516,7 +516,14 @@ __metadata: languageName: node linkType: hard -"@eslint-community/regexpp@npm:^4.5.1, @eslint-community/regexpp@npm:^4.6.1": +"@eslint-community/regexpp@npm:^4.10.0": + version: 4.11.0 + resolution: "@eslint-community/regexpp@npm:4.11.0" + checksum: 10c0/0f6328869b2741e2794da4ad80beac55cba7de2d3b44f796a60955b0586212ec75e6b0253291fd4aad2100ad471d1480d8895f2b54f1605439ba4c875e05e523 + languageName: node + linkType: hard + +"@eslint-community/regexpp@npm:^4.6.1": version: 4.10.0 resolution: "@eslint-community/regexpp@npm:4.10.0" checksum: 10c0/c5f60ef1f1ea7649fa7af0e80a5a79f64b55a8a8fa5086de4727eb4c86c652aedee407a9c143b8995d2c0b2d75c1222bec9ba5d73dbfc1f314550554f0979ef4 @@ -1068,9 +1075,9 @@ __metadata: languageName: node linkType: hard -"@oclif/core@npm:3.26.0, @oclif/core@npm:^3.23.0": - version: 3.26.0 - resolution: "@oclif/core@npm:3.26.0" +"@oclif/core@npm:3.27.0": + version: 3.27.0 + resolution: "@oclif/core@npm:3.27.0" dependencies: "@types/cli-progress": "npm:^3.11.5" ansi-escapes: "npm:^4.3.2" @@ -1080,15 +1087,15 @@ __metadata: clean-stack: "npm:^3.0.1" cli-progress: "npm:^3.12.0" color: "npm:^4.2.3" - debug: "npm:^4.3.4" - ejs: "npm:^3.1.9" + debug: "npm:^4.3.5" + ejs: "npm:^3.1.10" get-package-type: "npm:^0.1.0" globby: "npm:^11.1.0" hyperlinker: "npm:^1.0.0" indent-string: "npm:^4.0.0" is-wsl: "npm:^2.2.0" js-yaml: "npm:^3.14.1" - minimatch: "npm:^9.0.3" + minimatch: "npm:^9.0.4" natural-orderby: "npm:^2.0.3" object-treeify: "npm:^1.1.33" password-prompt: "npm:^1.1.3" @@ -1100,7 +1107,7 @@ __metadata: widest-line: "npm:^3.1.0" wordwrap: "npm:^1.0.0" wrap-ansi: "npm:^7.0.0" - checksum: 10c0/e2a066b85b7cd6996e0bc261f53399f06dcbb888caf0b31ba935068abaa69e9e6497d759e25a105f83a2bee3c23ba10fee51b0575417324a8e174827d95714e3 + checksum: 10c0/4f663ccb3bed74fa5b73a82f3bf722c9be5564f0543cc29bd70e1a76b953bd2fe6ca1d6684561a3bd7bd1fe70eab1855b98f5563b2109d11161c06283c312b93 languageName: node linkType: hard @@ -1243,15 +1250,15 @@ __metadata: languageName: node linkType: hard -"@oclif/plugin-autocomplete@npm:3.0.13": - version: 3.0.13 - resolution: "@oclif/plugin-autocomplete@npm:3.0.13" +"@oclif/plugin-autocomplete@npm:3.2.2": + version: 3.2.2 + resolution: "@oclif/plugin-autocomplete@npm:3.2.2" dependencies: - "@oclif/core": "npm:^3.23.0" - chalk: "npm:^5.3.0" - debug: "npm:^4.3.4" - ejs: "npm:^3.1.9" - checksum: 10c0/121104795e3336ac477ab9eb93769f1e70573836191b05a5ecbc5cdf7b7949c319bb5702f3b362d5ae561d87f6615ed6243b32472d60da39d043a0623094186f + "@oclif/core": "npm:^4" + ansis: "npm:^3.3.1" + debug: "npm:^4.3.6" + ejs: "npm:^3.1.10" + checksum: 10c0/cdd81336791080a12f1fcd41d443335b62912f70190989335fd15b7ec4cb89bea55396b75d9a6e73dc010990ff3e74fb7eb2ad43097fa06ec8746189b207c851 languageName: node linkType: hard @@ -1274,16 +1281,16 @@ __metadata: languageName: node linkType: hard -"@oclif/plugin-warn-if-update-available@npm:^3.1.6": - version: 3.1.6 - resolution: "@oclif/plugin-warn-if-update-available@npm:3.1.6" +"@oclif/plugin-warn-if-update-available@npm:^3.1.13": + version: 3.1.13 + resolution: "@oclif/plugin-warn-if-update-available@npm:3.1.13" dependencies: "@oclif/core": "npm:^4" - ansis: "npm:^3.2.0" + ansis: "npm:^3.3.1" debug: "npm:^4.3.5" http-call: "npm:^5.2.2" lodash: "npm:^4.17.21" - checksum: 10c0/7a7bffc26f94c8860a9955a9f1de08f61d6763943bc4d8d6a4079778ae7e8a1b1480058e8cb415e39658cc0fa2e95f8d9427a54493d8437bf947cfbe3e459498 + checksum: 10c0/4e6bfc6b278f8b6e0f3aa0bd6993b001bd78eb1000bf7ca6a0d9467f8e0cde505b1e7df53747b6357246bf5dc85fb36861cea288ef91f28f91bbd884f2fb7fe5 languageName: node linkType: hard @@ -1398,13 +1405,13 @@ __metadata: version: 0.0.0-use.local resolution: "@subsquid/cli@workspace:." dependencies: - "@oclif/core": "npm:3.26.0" + "@oclif/core": "npm:3.27.0" "@oclif/dev-cli": "npm:^1.26.10" "@oclif/help": "npm:^1.0.15" - "@oclif/plugin-autocomplete": "npm:3.0.13" - "@oclif/plugin-warn-if-update-available": "npm:^3.1.6" + "@oclif/plugin-autocomplete": "npm:3.2.2" + "@oclif/plugin-warn-if-update-available": "npm:^3.1.13" "@subsquid/commands": "npm:^2.3.1" - "@subsquid/manifest": "npm:^0.0.1-beta.17" + "@subsquid/manifest": "npm:^2.0.0-beta.3" "@subsquid/manifest-expr": "npm:^0.0.1" "@types/async-retry": "npm:^1.4.8" "@types/blessed": "npm:^0.1.25" @@ -1414,20 +1421,21 @@ __metadata: "@types/inquirer": "npm:^8.2.10" "@types/jest": "npm:^29.5.12" "@types/js-yaml": "npm:^4.0.9" - "@types/lodash": "npm:^4.17.0" + "@types/lodash": "npm:^4.17.7" "@types/ms": "npm:^0.7.34" - "@types/node": "npm:^20.12.3" - "@types/qs": "npm:^6.9.14" + "@types/node": "npm:^20.16.2" + "@types/qs": "npm:^6.9.15" "@types/split2": "npm:^3.2.1" "@types/targz": "npm:^1.0.4" - "@typescript-eslint/eslint-plugin": "npm:^7.5.0" + "@typescript-eslint/eslint-plugin": "npm:^7.18.0" "@typescript-eslint/eslint-plugin-tslint": "npm:^7.0.2" - "@typescript-eslint/parser": "npm:^7.5.0" + "@typescript-eslint/parser": "npm:^7.18.0" async-retry: "npm:^1.3.3" - axios: "npm:^1.6.8" - axios-retry: "npm:^4.1.0" + axios: "npm:^1.7.5" + axios-retry: "npm:^4.5.0" blessed-contrib: "npm:^4.11.0" chalk: "npm:^4.1.2" + cli-diff: "npm:^1.0.0" cli-select: "npm:^1.1.2" cross-spawn: "npm:^7.0.3" date-fns: "npm:^3.6.0" @@ -1443,10 +1451,11 @@ __metadata: fast-levenshtein: "npm:^3.0.0" figlet: "npm:^1.7.0" form-data: "npm:^4.0.0" - glob: "npm:^10.3.12" - ignore: "npm:^5.3.1" + glob: "npm:^10.4.5" + ignore: "npm:^5.3.2" inquirer: "npm:^8.2.6" jest: "npm:^29.7.0" + joi: "npm:^17.13.3" js-yaml: "npm:^4.1.0" lodash: "npm:^4.17.21" ms: "npm:^2.1.3" @@ -1454,19 +1463,18 @@ __metadata: open: "npm:^8.1.0" openapi-typescript: "npm:^7.3.0" pkg: "npm:^5.8.1" - prettier: "npm:^3.2.5" + prettier: "npm:^3.3.3" pretty-bytes: "npm:^5.6.0" - qs: "npm:^6.12.0" + qs: "npm:^6.13.0" reblessed: "npm:^0.2.1" - simple-git: "npm:^3.24.0" + simple-git: "npm:^3.25.0" split2: "npm:^4.2.0" targz: "npm:^1.0.1" tree-kill: "npm:^1.2.2" - ts-jest: "npm:^29.1.2" + ts-jest: "npm:^29.2.5" ts-node: "npm:^10.9.2" - type-fest: "npm:^4.24.0" - typescript: "npm:~5.4.3" - unique-names-generator: "npm:^4.7.1" + type-fest: "npm:^4.26.0" + typescript: "npm:~5.5.4" bin: sqd: ./bin/run.js languageName: unknown @@ -1505,14 +1513,15 @@ __metadata: languageName: node linkType: hard -"@subsquid/manifest@npm:^0.0.1-beta.17": - version: 0.0.1-beta.17 - resolution: "@subsquid/manifest@npm:0.0.1-beta.17" +"@subsquid/manifest@npm:^2.0.0-beta.3": + version: 2.0.0-beta.3 + resolution: "@subsquid/manifest@npm:2.0.0-beta.3" dependencies: - joi: "npm:^17.12.0" + "@subsquid/manifest-expr": "npm:^0.0.1" + joi: "npm:17.13.3" js-yaml: "npm:^4.1.0" lodash: "npm:^4.17.21" - checksum: 10c0/5ef504f4c2e12c3f4648f46dae7042d8a8c75c90aa35f2aad1ec873eda040ebba9356820f9b2a93908689804ec87b6b50ef9c8933798ad9c2d17b028fb00b8ab + checksum: 10c0/7265c405631db86b2ac553f2c95070dd1f0e612ac71211b6cf70fed7d4150bc7bc979c6605662fd66364c25a40905a60f29477f415add31fee4cc4fa16220112 languageName: node linkType: hard @@ -1637,11 +1646,11 @@ __metadata: linkType: hard "@types/cli-progress@npm:^3.11.5": - version: 3.11.5 - resolution: "@types/cli-progress@npm:3.11.5" + version: 3.11.6 + resolution: "@types/cli-progress@npm:3.11.6" dependencies: "@types/node": "npm:*" - checksum: 10c0/bf00f543ee677f61b12e390876df59354943d6c13d96640171528e9b7827f4edb7701cdd4675d6256d13ef9ee542731bd5cae585e1b43502553f69fc210dcb92 + checksum: 10c0/d9a2d60b8fc6ccef73368fa20a23d5b16506808a81ec65f7e8eedf58d236ebaf2ab46578936c000c8e39dde825cb48a3cf9195c8b410177efd5388bcf9d07370 languageName: node linkType: hard @@ -1753,10 +1762,10 @@ __metadata: languageName: node linkType: hard -"@types/lodash@npm:^4.17.0": - version: 4.17.0 - resolution: "@types/lodash@npm:4.17.0" - checksum: 10c0/4c5b41c9a6c41e2c05d08499e96f7940bcf194dcfa84356235b630da920c2a5e05f193618cea76006719bec61c76617dff02defa9d29934f9f6a76a49291bd8f +"@types/lodash@npm:^4.17.7": + version: 4.17.7 + resolution: "@types/lodash@npm:4.17.7" + checksum: 10c0/40c965b5ffdcf7ff5c9105307ee08b782da228c01b5c0529122c554c64f6b7168fc8f11dc79aa7bae4e67e17efafaba685dc3a47e294dbf52a65ed2b67100561 languageName: node linkType: hard @@ -1781,19 +1790,19 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^20.12.3": - version: 20.12.3 - resolution: "@types/node@npm:20.12.3" +"@types/node@npm:^20.16.2": + version: 20.16.2 + resolution: "@types/node@npm:20.16.2" dependencies: - undici-types: "npm:~5.26.4" - checksum: 10c0/45c8485a0e55276b42c26ba1df6c480e4e1a3a3abbf4ea0ff6b4e2823c4f77e32b7e166d4263d464f207cfea5bd4de8879b8df2c7132a727b0346a30191d6bea + undici-types: "npm:~6.19.2" + checksum: 10c0/74fac185dbd2c6b301cde75747c1cd6c9ca1ad7266147ea107a798837f40b8a05991177ebd7925fc7450d51334096259d186afad6e0d22864b7c97f8afef6ba7 languageName: node linkType: hard -"@types/qs@npm:^6.9.14": - version: 6.9.14 - resolution: "@types/qs@npm:6.9.14" - checksum: 10c0/11ad1eb7f6d7c216002789959d88acc7c43f72854fa4335f01de0df41b4c4024668dace8a37ba12270314345ede0ec6b07f93053a45e7bd4cd7318a3dcf0b6b8 +"@types/qs@npm:^6.9.15": + version: 6.9.15 + resolution: "@types/qs@npm:6.9.15" + checksum: 10c0/49c5ff75ca3adb18a1939310042d273c9fc55920861bd8e5100c8a923b3cda90d759e1a95e18334092da1c8f7b820084687770c83a1ccef04fb2c6908117c823 languageName: node linkType: hard @@ -1893,46 +1902,44 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:^7.5.0": - version: 7.5.0 - resolution: "@typescript-eslint/eslint-plugin@npm:7.5.0" +"@typescript-eslint/eslint-plugin@npm:^7.18.0": + version: 7.18.0 + resolution: "@typescript-eslint/eslint-plugin@npm:7.18.0" dependencies: - "@eslint-community/regexpp": "npm:^4.5.1" - "@typescript-eslint/scope-manager": "npm:7.5.0" - "@typescript-eslint/type-utils": "npm:7.5.0" - "@typescript-eslint/utils": "npm:7.5.0" - "@typescript-eslint/visitor-keys": "npm:7.5.0" - debug: "npm:^4.3.4" + "@eslint-community/regexpp": "npm:^4.10.0" + "@typescript-eslint/scope-manager": "npm:7.18.0" + "@typescript-eslint/type-utils": "npm:7.18.0" + "@typescript-eslint/utils": "npm:7.18.0" + "@typescript-eslint/visitor-keys": "npm:7.18.0" graphemer: "npm:^1.4.0" - ignore: "npm:^5.2.4" + ignore: "npm:^5.3.1" natural-compare: "npm:^1.4.0" - semver: "npm:^7.5.4" - ts-api-utils: "npm:^1.0.1" + ts-api-utils: "npm:^1.3.0" peerDependencies: "@typescript-eslint/parser": ^7.0.0 eslint: ^8.56.0 peerDependenciesMeta: typescript: optional: true - checksum: 10c0/932a7b5a09c0138ef5a0bf00f8e6039fa209d4047092ffc187de048543c21f7ce24dc14f25f4c87b6f3bbb62335fc952e259e271fde88baf793217bde6460cfa + checksum: 10c0/2b37948fa1b0dab77138909dabef242a4d49ab93e4019d4ef930626f0a7d96b03e696cd027fa0087881c20e73be7be77c942606b4a76fa599e6b37f6985304c3 languageName: node linkType: hard -"@typescript-eslint/parser@npm:^7.5.0": - version: 7.5.0 - resolution: "@typescript-eslint/parser@npm:7.5.0" +"@typescript-eslint/parser@npm:^7.18.0": + version: 7.18.0 + resolution: "@typescript-eslint/parser@npm:7.18.0" dependencies: - "@typescript-eslint/scope-manager": "npm:7.5.0" - "@typescript-eslint/types": "npm:7.5.0" - "@typescript-eslint/typescript-estree": "npm:7.5.0" - "@typescript-eslint/visitor-keys": "npm:7.5.0" + "@typescript-eslint/scope-manager": "npm:7.18.0" + "@typescript-eslint/types": "npm:7.18.0" + "@typescript-eslint/typescript-estree": "npm:7.18.0" + "@typescript-eslint/visitor-keys": "npm:7.18.0" debug: "npm:^4.3.4" peerDependencies: eslint: ^8.56.0 peerDependenciesMeta: typescript: optional: true - checksum: 10c0/65521202ff024e79594272fbb7e4731ecf9d2fdd2f58fc81450bfd2bca94ce9c17b0eadd7338c01701f5cf16d38b6c025ed3fc322380b1e4b5424b7484098cda + checksum: 10c0/370e73fca4278091bc1b657f85e7d74cd52b24257ea20c927a8e17546107ce04fbf313fec99aed0cc2a145ddbae1d3b12e9cc2c1320117636dc1281bcfd08059 languageName: node linkType: hard @@ -1946,30 +1953,30 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:7.5.0": - version: 7.5.0 - resolution: "@typescript-eslint/scope-manager@npm:7.5.0" +"@typescript-eslint/scope-manager@npm:7.18.0": + version: 7.18.0 + resolution: "@typescript-eslint/scope-manager@npm:7.18.0" dependencies: - "@typescript-eslint/types": "npm:7.5.0" - "@typescript-eslint/visitor-keys": "npm:7.5.0" - checksum: 10c0/a017b151a6b39ef591f8e2e65598e005e1b4b2d5494e4b91bddb5856b3a4d57dd8a58d2bc7a140e627eb574f93a2c8fe55f1307aa264c928ffd31d9e190bc5dd + "@typescript-eslint/types": "npm:7.18.0" + "@typescript-eslint/visitor-keys": "npm:7.18.0" + checksum: 10c0/038cd58c2271de146b3a594afe2c99290034033326d57ff1f902976022c8b0138ffd3cb893ae439ae41003b5e4bcc00cabf6b244ce40e8668f9412cc96d97b8e languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:7.5.0": - version: 7.5.0 - resolution: "@typescript-eslint/type-utils@npm:7.5.0" +"@typescript-eslint/type-utils@npm:7.18.0": + version: 7.18.0 + resolution: "@typescript-eslint/type-utils@npm:7.18.0" dependencies: - "@typescript-eslint/typescript-estree": "npm:7.5.0" - "@typescript-eslint/utils": "npm:7.5.0" + "@typescript-eslint/typescript-estree": "npm:7.18.0" + "@typescript-eslint/utils": "npm:7.18.0" debug: "npm:^4.3.4" - ts-api-utils: "npm:^1.0.1" + ts-api-utils: "npm:^1.3.0" peerDependencies: eslint: ^8.56.0 peerDependenciesMeta: typescript: optional: true - checksum: 10c0/12915d4d1872638f5281e222a0d191676c478f250699c84864862e95a59e708222acefbf7ffdafc0872a007261219a3a2b1e667ff45eeafea7c4bcc5b955262c + checksum: 10c0/ad92a38007be620f3f7036f10e234abdc2fdc518787b5a7227e55fd12896dacf56e8b34578723fbf9bea8128df2510ba8eb6739439a3879eda9519476d5783fd languageName: node linkType: hard @@ -1980,10 +1987,10 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/types@npm:7.5.0": - version: 7.5.0 - resolution: "@typescript-eslint/types@npm:7.5.0" - checksum: 10c0/f3394f71f422dbd89f63b230f20e9769c12e47a287ff30ca03a80714e57ea21279b6f12a8ab14bafb00b59926f20a88894b2d1e72679f7ff298bae112679d4b3 +"@typescript-eslint/types@npm:7.18.0": + version: 7.18.0 + resolution: "@typescript-eslint/types@npm:7.18.0" + checksum: 10c0/eb7371ac55ca77db8e59ba0310b41a74523f17e06f485a0ef819491bc3dd8909bb930120ff7d30aaf54e888167e0005aa1337011f3663dc90fb19203ce478054 languageName: node linkType: hard @@ -2006,22 +2013,22 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:7.5.0": - version: 7.5.0 - resolution: "@typescript-eslint/typescript-estree@npm:7.5.0" +"@typescript-eslint/typescript-estree@npm:7.18.0": + version: 7.18.0 + resolution: "@typescript-eslint/typescript-estree@npm:7.18.0" dependencies: - "@typescript-eslint/types": "npm:7.5.0" - "@typescript-eslint/visitor-keys": "npm:7.5.0" + "@typescript-eslint/types": "npm:7.18.0" + "@typescript-eslint/visitor-keys": "npm:7.18.0" debug: "npm:^4.3.4" globby: "npm:^11.1.0" is-glob: "npm:^4.0.3" - minimatch: "npm:9.0.3" - semver: "npm:^7.5.4" - ts-api-utils: "npm:^1.0.1" + minimatch: "npm:^9.0.4" + semver: "npm:^7.6.0" + ts-api-utils: "npm:^1.3.0" peerDependenciesMeta: typescript: optional: true - checksum: 10c0/ea3a270c725d6be273188b86110e0393052cd64d1c54a56eb5ea405e6d3fbbe84fb3b1ce1b8496a4078ac1eefd37aedcf12be91876764f6de31d5aa5131c7bcd + checksum: 10c0/0c7f109a2e460ec8a1524339479cf78ff17814d23c83aa5112c77fb345e87b3642616291908dcddea1e671da63686403dfb712e4a4435104f92abdfddf9aba81 languageName: node linkType: hard @@ -2042,20 +2049,17 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/utils@npm:7.5.0": - version: 7.5.0 - resolution: "@typescript-eslint/utils@npm:7.5.0" +"@typescript-eslint/utils@npm:7.18.0": + version: 7.18.0 + resolution: "@typescript-eslint/utils@npm:7.18.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.4.0" - "@types/json-schema": "npm:^7.0.12" - "@types/semver": "npm:^7.5.0" - "@typescript-eslint/scope-manager": "npm:7.5.0" - "@typescript-eslint/types": "npm:7.5.0" - "@typescript-eslint/typescript-estree": "npm:7.5.0" - semver: "npm:^7.5.4" + "@typescript-eslint/scope-manager": "npm:7.18.0" + "@typescript-eslint/types": "npm:7.18.0" + "@typescript-eslint/typescript-estree": "npm:7.18.0" peerDependencies: eslint: ^8.56.0 - checksum: 10c0/c815ed6909769648953d6963c069038f7cac0c979051b25718feb30e0d3337b9647b75b8de00ac03fe960f0cc8dc4e8a81d4aac4719090a99785e0068712bd24 + checksum: 10c0/a25a6d50eb45c514469a01ff01f215115a4725fb18401055a847ddf20d1b681409c4027f349033a95c4ff7138d28c3b0a70253dfe8262eb732df4b87c547bd1e languageName: node linkType: hard @@ -2069,13 +2073,13 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:7.5.0": - version: 7.5.0 - resolution: "@typescript-eslint/visitor-keys@npm:7.5.0" +"@typescript-eslint/visitor-keys@npm:7.18.0": + version: 7.18.0 + resolution: "@typescript-eslint/visitor-keys@npm:7.18.0" dependencies: - "@typescript-eslint/types": "npm:7.5.0" - eslint-visitor-keys: "npm:^3.4.1" - checksum: 10c0/eecf02b8dd54e83738a143aca87b902af4b357028a90fd34ed7a2f40a3ae2f6a188b9ba53903f23c80e868f1fffbb039e9ddb63525438d659707cc7bfb269317 + "@typescript-eslint/types": "npm:7.18.0" + eslint-visitor-keys: "npm:^3.4.3" + checksum: 10c0/538b645f8ff1d9debf264865c69a317074eaff0255e63d7407046176b0f6a6beba34a6c51d511f12444bae12a98c69891eb6f403c9f54c6c2e2849d1c1cb73c0 languageName: node linkType: hard @@ -2273,13 +2277,20 @@ __metadata: languageName: node linkType: hard -"ansis@npm:^3.1.1, ansis@npm:^3.2.0": +"ansis@npm:^3.1.1": version: 3.2.0 resolution: "ansis@npm:3.2.0" checksum: 10c0/b61c16554e707f30685ab153ffafc02b59bb9e86567a04b2e2ad521ade771c9ae3cd67f3e486a1cd2e3c89ad898653266bc38d76ea7af4ac67762baa3c87befa languageName: node linkType: hard +"ansis@npm:^3.3.1": + version: 3.3.2 + resolution: "ansis@npm:3.3.2" + checksum: 10c0/7b5bd3d28e5fa12dbd2268e984b292540f863bb113fbaa78be93e512417df014e547279ecec264b39948364e13f245424a0bc911802d68def185545d2290d11c + languageName: node + linkType: hard + "anymatch@npm:^3.0.3": version: 3.1.2 resolution: "anymatch@npm:3.1.2" @@ -2460,25 +2471,25 @@ __metadata: languageName: node linkType: hard -"axios-retry@npm:^4.1.0": - version: 4.1.0 - resolution: "axios-retry@npm:4.1.0" +"axios-retry@npm:^4.5.0": + version: 4.5.0 + resolution: "axios-retry@npm:4.5.0" dependencies: is-retry-allowed: "npm:^2.2.0" peerDependencies: axios: 0.x || 1.x - checksum: 10c0/381ae8b03f2edf444e426a4be3c94e31b0b66c45bac30ce0dcf3aff48d9f2ed9607c826fa32d4a8cf0d40ae0cb9369449bb69837abe478d8821ce3375f34d73a + checksum: 10c0/574e7b1bf24aad99b560042d232a932d51bfaa29b5a6d4612d748ed799a6f11a5afb2582792492c55d95842200cbdfbe3454027a8c1b9a2d3e895d13c3d03c10 languageName: node linkType: hard -"axios@npm:^1.6.8": - version: 1.6.8 - resolution: "axios@npm:1.6.8" +"axios@npm:^1.7.5": + version: 1.7.5 + resolution: "axios@npm:1.7.5" dependencies: follow-redirects: "npm:^1.15.6" form-data: "npm:^4.0.0" proxy-from-env: "npm:^1.1.0" - checksum: 10c0/0f22da6f490335479a89878bc7d5a1419484fbb437b564a80c34888fc36759ae4f56ea28d55a191695e5ed327f0bad56e7ff60fb6770c14d1be6501505d47ab9 + checksum: 10c0/1d5daeb28b3d1bb2a7b9f0743433c4bfbeaddc15461e50ebde487eec6c009af2515749d5261096dd430c90cd891bd310bcba5ec3967bae2033c4a307f58a6ad3 languageName: node linkType: hard @@ -2664,7 +2675,7 @@ __metadata: languageName: node linkType: hard -"bs-logger@npm:0.x": +"bs-logger@npm:^0.2.6": version: 0.2.6 resolution: "bs-logger@npm:0.2.6" dependencies: @@ -2866,13 +2877,6 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^5.3.0": - version: 5.3.0 - resolution: "chalk@npm:5.3.0" - checksum: 10c0/8297d436b2c0f95801103ff2ef67268d362021b8210daf8ddbe349695333eb3610a71122172ff3b0272f1ef2cf7cc2c41fdaa4715f52e49ffe04c56340feed09 - languageName: node - linkType: hard - "char-regex@npm:^1.0.2": version: 1.0.2 resolution: "char-regex@npm:1.0.2" @@ -2947,6 +2951,16 @@ __metadata: languageName: node linkType: hard +"cli-diff@npm:^1.0.0": + version: 1.0.0 + resolution: "cli-diff@npm:1.0.0" + dependencies: + chalk: "npm:^2.4.1" + diff: "npm:^3.5.0" + checksum: 10c0/8dcb8c10d11f3c7479cb39b014e0a5080d7b4b5cd9befe3359b305d4c2dfadf14d46cbc458e21fddf2fb68a1cc19a9e86b01ba8f9ac498476c6391872f98b13c + languageName: node + linkType: hard + "cli-progress@npm:^3.12.0": version: 3.12.0 resolution: "cli-progress@npm:3.12.0" @@ -3267,6 +3281,18 @@ __metadata: languageName: node linkType: hard +"debug@npm:^4.3.6": + version: 4.3.6 + resolution: "debug@npm:4.3.6" + dependencies: + ms: "npm:2.1.2" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10c0/3293416bff072389c101697d4611c402a6bacd1900ac20c0492f61a9cdd6b3b29750fc7f5e299f8058469ef60ff8fb79b86395a30374fbd2490113c1c7112285 + languageName: node + linkType: hard + "decompress-response@npm:^6.0.0": version: 6.0.0 resolution: "decompress-response@npm:6.0.0" @@ -3404,6 +3430,13 @@ __metadata: languageName: node linkType: hard +"diff@npm:^3.5.0": + version: 3.5.0 + resolution: "diff@npm:3.5.0" + checksum: 10c0/fc62d5ba9f6d1b8b5833380969037007913d4886997838c247c54ec6934f09ae5a07e17ae28b1f016018149d81df8ad89306f52eac1afa899e0bed49015a64d1 + languageName: node + linkType: hard + "diff@npm:^4.0.1": version: 4.0.2 resolution: "diff@npm:4.0.2" @@ -3483,17 +3516,6 @@ __metadata: languageName: node linkType: hard -"ejs@npm:^3.1.9": - version: 3.1.9 - resolution: "ejs@npm:3.1.9" - dependencies: - jake: "npm:^10.8.5" - bin: - ejs: bin/cli.js - checksum: 10c0/f0e249c79128810f5f6d5cbf347fc906d86bb9384263db0b2a9004aea649f2bc2d112736de5716c509c80afb4721c47281bd5b57c757d3b63f1bf5ac5f885893 - languageName: node - linkType: hard - "electron-to-chromium@npm:^1.4.202": version: 1.4.242 resolution: "electron-to-chromium@npm:1.4.242" @@ -4568,7 +4590,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^10.2.2, glob@npm:^10.3.12": +"glob@npm:^10.2.2": version: 10.3.12 resolution: "glob@npm:10.3.12" dependencies: @@ -4598,6 +4620,22 @@ __metadata: languageName: node linkType: hard +"glob@npm:^10.4.5": + version: 10.4.5 + resolution: "glob@npm:10.4.5" + dependencies: + foreground-child: "npm:^3.1.0" + jackspeak: "npm:^3.1.2" + minimatch: "npm:^9.0.4" + minipass: "npm:^7.1.2" + package-json-from-dist: "npm:^1.0.0" + path-scurry: "npm:^1.11.1" + bin: + glob: dist/esm/bin.mjs + checksum: 10c0/19a9759ea77b8e3ca0a43c2f07ecddc2ad46216b786bb8f993c445aee80d345925a21e5280c7b7c6c59e860a0154b84e4b2b60321fea92cd3c56b4a7489f160e + languageName: node + linkType: hard + "glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4": version: 7.2.3 resolution: "glob@npm:7.2.3" @@ -4934,13 +4972,20 @@ __metadata: languageName: node linkType: hard -"ignore@npm:^5.2.4, ignore@npm:^5.3.1": +"ignore@npm:^5.3.1": version: 5.3.1 resolution: "ignore@npm:5.3.1" checksum: 10c0/703f7f45ffb2a27fb2c5a8db0c32e7dee66b33a225d28e8db4e1be6474795f606686a6e3bcc50e1aa12f2042db4c9d4a7d60af3250511de74620fbed052ea4cd languageName: node linkType: hard +"ignore@npm:^5.3.2": + version: 5.3.2 + resolution: "ignore@npm:5.3.2" + checksum: 10c0/f9f652c957983634ded1e7f02da3b559a0d4cc210fca3792cb67f1b153623c9c42efdc1c4121af171e295444459fc4a9201101fb041b1104a3c000bccb188337 + languageName: node + linkType: hard + "import-fresh@npm:^3.2.1": version: 3.3.0 resolution: "import-fresh@npm:3.3.0" @@ -5488,6 +5533,19 @@ __metadata: languageName: node linkType: hard +"jackspeak@npm:^3.1.2": + version: 3.4.3 + resolution: "jackspeak@npm:3.4.3" + dependencies: + "@isaacs/cliui": "npm:^8.0.2" + "@pkgjs/parseargs": "npm:^0.11.0" + dependenciesMeta: + "@pkgjs/parseargs": + optional: true + checksum: 10c0/6acc10d139eaefdbe04d2f679e6191b3abf073f111edf10b1de5302c97ec93fffeb2fdd8681ed17f16268aa9dd4f8c588ed9d1d3bffbbfa6e8bf897cbb3149b9 + languageName: node + linkType: hard + "jake@npm:^10.8.5": version: 10.8.5 resolution: "jake@npm:10.8.5" @@ -5941,16 +5999,16 @@ __metadata: languageName: node linkType: hard -"joi@npm:^17.12.0": - version: 17.12.1 - resolution: "joi@npm:17.12.1" +"joi@npm:17.13.3, joi@npm:^17.13.3": + version: 17.13.3 + resolution: "joi@npm:17.13.3" dependencies: "@hapi/hoek": "npm:^9.3.0" "@hapi/topo": "npm:^5.1.0" "@sideway/address": "npm:^4.1.5" "@sideway/formula": "npm:^3.0.1" "@sideway/pinpoint": "npm:^2.0.0" - checksum: 10c0/552ec235a4fb068290f85c8248e0afc6a8fa91a33d7fd7552fa1f1d8682b5d2d0f0c29901b6843d7936f1e15e8bf0a537126ccb01fa72cf0eb626ff1a0a77a73 + checksum: 10c0/9262aef1da3f1bec5b03caf50c46368899fe03b8ff26cbe3d53af4584dd1049079fc97230bbf1500b6149db7cc765b9ee45f0deb24bb6fc3fa06229d7148c17f languageName: node linkType: hard @@ -6178,7 +6236,7 @@ __metadata: languageName: node linkType: hard -"lodash.memoize@npm:4.x": +"lodash.memoize@npm:^4.1.2": version: 4.1.2 resolution: "lodash.memoize@npm:4.1.2" checksum: 10c0/c8713e51eccc650422716a14cece1809cfe34bc5ab5e242b7f8b4e2241c2483697b971a604252807689b9dd69bfe3a98852e19a5b89d506b000b4187a1285df8 @@ -6234,7 +6292,7 @@ __metadata: languageName: node linkType: hard -"make-error@npm:1.x, make-error@npm:^1.1.1": +"make-error@npm:^1.1.1, make-error@npm:^1.3.6": version: 1.3.6 resolution: "make-error@npm:1.3.6" checksum: 10c0/171e458d86854c6b3fc46610cfacf0b45149ba043782558c6875d9f42f222124384ad0b468c92e996d815a8a2003817a710c0a160e49c1c394626f76fa45396f @@ -6401,7 +6459,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^9.0.3, minimatch@npm:^9.0.4": +"minimatch@npm:^9.0.4": version: 9.0.4 resolution: "minimatch@npm:9.0.4" dependencies: @@ -6491,6 +6549,13 @@ __metadata: languageName: node linkType: hard +"minipass@npm:^7.1.2": + version: 7.1.2 + resolution: "minipass@npm:7.1.2" + checksum: 10c0/b0fd20bb9fb56e5fa9a8bfac539e8915ae07430a619e4b86ff71f5fc757ef3924b23b2c4230393af1eda647ed3d75739e4e0acb250a6b1eb277cf7f8fe449557 + languageName: node + linkType: hard + "minizlib@npm:^2.1.1, minizlib@npm:^2.1.2": version: 2.1.2 resolution: "minizlib@npm:2.1.2" @@ -6985,6 +7050,13 @@ __metadata: languageName: node linkType: hard +"package-json-from-dist@npm:^1.0.0": + version: 1.0.0 + resolution: "package-json-from-dist@npm:1.0.0" + checksum: 10c0/e3ffaf6ac1040ab6082a658230c041ad14e72fabe99076a2081bb1d5d41210f11872403fc09082daf4387fc0baa6577f96c9c0e94c90c394fd57794b66aa4033 + languageName: node + linkType: hard + "parent-module@npm:^1.0.0": version: 1.0.1 resolution: "parent-module@npm:1.0.1" @@ -7102,6 +7174,16 @@ __metadata: languageName: node linkType: hard +"path-scurry@npm:^1.11.1": + version: 1.11.1 + resolution: "path-scurry@npm:1.11.1" + dependencies: + lru-cache: "npm:^10.2.0" + minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" + checksum: 10c0/32a13711a2a505616ae1cc1b5076801e453e7aae6ac40ab55b388bb91b9d0547a52f5aaceff710ea400205f18691120d4431e520afbe4266b836fadede15872d + languageName: node + linkType: hard + "path-type@npm:^4.0.0": version: 4.0.0 resolution: "path-type@npm:4.0.0" @@ -7254,12 +7336,12 @@ __metadata: languageName: node linkType: hard -"prettier@npm:^3.2.5": - version: 3.2.5 - resolution: "prettier@npm:3.2.5" +"prettier@npm:^3.3.3": + version: 3.3.3 + resolution: "prettier@npm:3.3.3" bin: prettier: bin/prettier.cjs - checksum: 10c0/ea327f37a7d46f2324a34ad35292af2ad4c4c3c3355da07313339d7e554320f66f65f91e856add8530157a733c6c4a897dc41b577056be5c24c40f739f5ee8c6 + checksum: 10c0/b85828b08e7505716324e4245549b9205c0cacb25342a030ba8885aba2039a115dbcf75a0b7ca3b37bc9d101ee61fab8113fc69ca3359f2a226f1ecc07ad2e26 languageName: node linkType: hard @@ -7384,12 +7466,12 @@ __metadata: languageName: node linkType: hard -"qs@npm:^6.12.0": - version: 6.12.0 - resolution: "qs@npm:6.12.0" +"qs@npm:^6.13.0": + version: 6.13.0 + resolution: "qs@npm:6.13.0" dependencies: side-channel: "npm:^1.0.6" - checksum: 10c0/e165a77ac5f3ca60c15c5f3d51b321ddec7aa438804436b29d160117bc6fb7bf7dab94abd0c7d7c0785890d3a75ae41e1d6346e158aaf1540c6fe53a31f11675 + checksum: 10c0/62372cdeec24dc83a9fb240b7533c0fdcf0c5f7e0b83343edd7310f0ab4c8205a5e7c56406531f2e47e1b4878a3821d652be4192c841de5b032ca83619d8f860 languageName: node linkType: hard @@ -7800,6 +7882,15 @@ __metadata: languageName: node linkType: hard +"semver@npm:^7.6.0, semver@npm:^7.6.3": + version: 7.6.3 + resolution: "semver@npm:7.6.3" + bin: + semver: bin/semver.js + checksum: 10c0/88f33e148b210c153873cb08cfe1e281d518aaa9a666d4d148add6560db5cd3c582f3a08ccb91f38d5f379ead256da9931234ed122057f40bb5766e65e58adaf + languageName: node + linkType: hard + "set-function-length@npm:^1.2.0": version: 1.2.1 resolution: "set-function-length@npm:1.2.1" @@ -7926,14 +8017,14 @@ __metadata: languageName: node linkType: hard -"simple-git@npm:^3.24.0": - version: 3.24.0 - resolution: "simple-git@npm:3.24.0" +"simple-git@npm:^3.25.0": + version: 3.25.0 + resolution: "simple-git@npm:3.25.0" dependencies: "@kwsites/file-exists": "npm:^1.1.1" "@kwsites/promise-deferred": "npm:^1.1.1" - debug: "npm:^4.3.4" - checksum: 10c0/4329e5be1a7af1ebb476354ed6edf6d2828dc221e15d22ce3e5e8028f537d5e9ac059d813911516f78e22dfa2ee4db4c8cf30bf912bd284e530b733bd6b5c3a0 + debug: "npm:^4.3.5" + checksum: 10c0/2087dddac041eac6330cbb7fafea21f3e45786ea54e50ae07a49ba6a7134298e12727e5e4b6580310b679c7cb4f2a83804c04e7eab247eeabcd48d33b7885e16 languageName: node linkType: hard @@ -8548,20 +8639,31 @@ __metadata: languageName: node linkType: hard -"ts-jest@npm:^29.1.2": - version: 29.1.2 - resolution: "ts-jest@npm:29.1.2" +"ts-api-utils@npm:^1.3.0": + version: 1.3.0 + resolution: "ts-api-utils@npm:1.3.0" + peerDependencies: + typescript: ">=4.2.0" + checksum: 10c0/f54a0ba9ed56ce66baea90a3fa087a484002e807f28a8ccb2d070c75e76bde64bd0f6dce98b3802834156306050871b67eec325cb4e918015a360a3f0868c77c + languageName: node + linkType: hard + +"ts-jest@npm:^29.2.5": + version: 29.2.5 + resolution: "ts-jest@npm:29.2.5" dependencies: - bs-logger: "npm:0.x" - fast-json-stable-stringify: "npm:2.x" + bs-logger: "npm:^0.2.6" + ejs: "npm:^3.1.10" + fast-json-stable-stringify: "npm:^2.1.0" jest-util: "npm:^29.0.0" json5: "npm:^2.2.3" - lodash.memoize: "npm:4.x" - make-error: "npm:1.x" - semver: "npm:^7.5.3" - yargs-parser: "npm:^21.0.1" + lodash.memoize: "npm:^4.1.2" + make-error: "npm:^1.3.6" + semver: "npm:^7.6.3" + yargs-parser: "npm:^21.1.1" peerDependencies: "@babel/core": ">=7.0.0-beta.0 <8" + "@jest/transform": ^29.0.0 "@jest/types": ^29.0.0 babel-jest: ^29.0.0 jest: ^29.0.0 @@ -8569,6 +8671,8 @@ __metadata: peerDependenciesMeta: "@babel/core": optional: true + "@jest/transform": + optional: true "@jest/types": optional: true babel-jest: @@ -8577,7 +8681,7 @@ __metadata: optional: true bin: ts-jest: cli.js - checksum: 10c0/c2f51f0241f89d127d41392decbcb83b5dfd5e57ab9d50220aa7b7e2f9b3f3b07ccdbba33311284df1c41941879e4ddfad44b15a9d0da4b74bd1b98702b729df + checksum: 10c0/acb62d168faec073e64b20873b583974ba8acecdb94681164eb346cef82ade8fb481c5b979363e01a97ce4dd1e793baf64d9efd90720bc941ad7fc1c3d6f3f68 languageName: node linkType: hard @@ -8705,10 +8809,10 @@ __metadata: languageName: node linkType: hard -"type-fest@npm:^4.24.0": - version: 4.24.0 - resolution: "type-fest@npm:4.24.0" - checksum: 10c0/9770471a397733b17b5a9ce48ee5a4d6c042c84a4858ff4e15abd126f351c61b5fea8b7b5e55bfa34840098a920b915d5ff878db1b3c007a2512a6a9c7f21579 +"type-fest@npm:^4.26.0": + version: 4.26.0 + resolution: "type-fest@npm:4.26.0" + checksum: 10c0/3819b65fedd4655ed90703dad9e14248fb61f0a232dce8385e59771bdeaeca08195fe0683d892d62fcd84c0f3bb18bd4b0c3c2ba29023187d267868e75c53076 languageName: node linkType: hard @@ -8775,23 +8879,23 @@ __metadata: languageName: node linkType: hard -"typescript@npm:~5.4.3": - version: 5.4.3 - resolution: "typescript@npm:5.4.3" +"typescript@npm:~5.5.4": + version: 5.5.4 + resolution: "typescript@npm:5.5.4" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/22443a8760c3668e256c0b34b6b45c359ef6cecc10c42558806177a7d500ab1a7d7aac1f976d712e26989ddf6731d2fbdd3212b7c73290a45127c1c43ba2005a + checksum: 10c0/422be60f89e661eab29ac488c974b6cc0a660fb2228003b297c3d10c32c90f3bcffc1009b43876a082515a3c376b1eefcce823d6e78982e6878408b9a923199c languageName: node linkType: hard -"typescript@patch:typescript@npm%3A~5.4.3#optional!builtin": - version: 5.4.3 - resolution: "typescript@patch:typescript@npm%3A5.4.3#optional!builtin::version=5.4.3&hash=5adc0c" +"typescript@patch:typescript@npm%3A~5.5.4#optional!builtin": + version: 5.5.4 + resolution: "typescript@patch:typescript@npm%3A5.5.4#optional!builtin::version=5.5.4&hash=5adc0c" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/6e51f8b7e6ec55b897b9e56b67e864fe8f44e30f4a14357aad5dc0f7432db2f01efc0522df0b6c36d361c51f2dc3dcac5c832efd96a404cfabf884e915d38828 + checksum: 10c0/10dd9881baba22763de859e8050d6cb6e2db854197495c6f1929b08d1eb2b2b00d0b5d9b0bcee8472f1c3f4a7ef6a5d7ebe0cfd703f853aa5ae465b8404bc1ba languageName: node linkType: hard @@ -8807,10 +8911,10 @@ __metadata: languageName: node linkType: hard -"undici-types@npm:~5.26.4": - version: 5.26.5 - resolution: "undici-types@npm:5.26.5" - checksum: 10c0/bb673d7876c2d411b6eb6c560e0c571eef4a01c1c19925175d16e3a30c4c428181fb8d7ae802a261f283e4166a0ac435e2f505743aa9e45d893f9a3df017b501 +"undici-types@npm:~6.19.2": + version: 6.19.8 + resolution: "undici-types@npm:6.19.8" + checksum: 10c0/078afa5990fba110f6824823ace86073b4638f1d5112ee26e790155f481f2a868cc3e0615505b6f4282bdf74a3d8caad715fd809e870c2bb0704e3ea6082f344 languageName: node linkType: hard @@ -8823,13 +8927,6 @@ __metadata: languageName: node linkType: hard -"unique-names-generator@npm:^4.7.1": - version: 4.7.1 - resolution: "unique-names-generator@npm:4.7.1" - checksum: 10c0/db07b9a0fee6eac4a21cf567c9744ee97895aa744d51ec913557205173a65c1a7a4d12470295796acb7247e6646e7975c340bb634c7adf41e5d950fa5cf94375 - languageName: node - linkType: hard - "unique-slug@npm:^4.0.0": version: 4.0.0 resolution: "unique-slug@npm:4.0.0" @@ -9163,7 +9260,7 @@ __metadata: languageName: node linkType: hard -"yargs-parser@npm:^21.0.0, yargs-parser@npm:^21.0.1, yargs-parser@npm:^21.1.1": +"yargs-parser@npm:^21.0.0, yargs-parser@npm:^21.1.1": version: 21.1.1 resolution: "yargs-parser@npm:21.1.1" checksum: 10c0/f84b5e48169479d2f402239c59f084cfd1c3acc197a05c59b98bab067452e6b3ea46d4dd8ba2985ba7b3d32a343d77df0debd6b343e5dae3da2aab2cdf5886b2