From a30479532e9c32ce97cb52155b76e51db132c2f5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 24 Oct 2026 21:32:13 +0000 Subject: [PATCH] chore: update OpenAPI to d04a1ddd718b --- .changeset/update-openapi-d04a1ddd718b.md | 6 + packages/cli/generate.ts | 2 +- .../commands/_generated/_meta/commands.json | 170 ++++++++++++++++-- .../commands/_generated/_meta/schemas.json | 105 ++++++++++- .../articles/aggregate-severity.ts | 9 + .../kit/meetings/participants/create.ts | 1 + .../meetings/participants/tokens/refresh.ts | 2 + .../meetings/participants/tokens/revoke.ts | 14 ++ .../zero-trust/casb/asset-schemas/get.ts | 1 + .../zero-trust/casb/asset-schemas/list.ts | 1 + .../zero-trust/casb/content/export.ts | 1 + .../zero-trust/casb/exports/get.ts | 1 + .../zero-trust/casb/exports/list.ts | 1 + .../zero-trust/casb/finding-types/create.ts | 1 + .../zero-trust/casb/finding-types/delete.ts | 1 + .../zero-trust/casb/finding-types/get.ts | 1 + .../zero-trust/casb/finding-types/list.ts | 1 + .../finding-types/remediation-types/list.ts | 1 + .../zero-trust/casb/finding-types/update.ts | 1 + .../zero-trust/casb/finding-types/validate.ts | 1 + .../zero-trust/casb/findings/export.ts | 1 + .../zero-trust/casb/findings/get.ts | 1 + .../zero-trust/casb/findings/ignore.ts | 1 + .../casb/findings/instances/archive.ts | 1 + .../casb/findings/instances/export.ts | 1 + .../zero-trust/casb/findings/instances/get.ts | 1 + .../casb/findings/instances/list.ts | 1 + .../casb/findings/instances/unarchive.ts | 1 + .../zero-trust/casb/findings/list.ts | 1 + .../casb/findings/reset-severity.ts | 1 + .../zero-trust/casb/findings/tune-severity.ts | 1 + .../zero-trust/casb/findings/unignore.ts | 1 + .../zero-trust/casb/policies/create.ts | 1 + .../zero-trust/casb/policies/delete.ts | 1 + .../zero-trust/casb/policies/get.ts | 1 + .../zero-trust/casb/policies/list.ts | 1 + .../zero-trust/casb/policies/update.ts | 1 + .../casb/remediations/jobs/create.ts | 1 + .../casb/remediations/jobs/export.ts | 1 + .../zero-trust/casb/remediations/jobs/list.ts | 1 + .../zero-trust/casb/webhooks/create.ts | 1 + .../zero-trust/casb/webhooks/delete.ts | 1 + .../casb/webhooks/evaluate-existing.ts | 1 + .../zero-trust/casb/webhooks/evaluate.ts | 1 + .../zero-trust/casb/webhooks/get.ts | 1 + .../zero-trust/casb/webhooks/jobs/create.ts | 1 + .../zero-trust/casb/webhooks/list.ts | 1 + .../zero-trust/casb/webhooks/update.ts | 1 + .../articles/aggregate-severity.ts | 94 ++++++++++ .../threat-signals/articles/index.ts | 2 + packages/cli/src/commands/_generated/index.ts | 2 +- .../kit/meetings/participants/create.ts | 34 ++++ .../kit/meetings/participants/tokens/index.ts | 2 + .../meetings/participants/tokens/refresh.ts | 63 ++++++- .../meetings/participants/tokens/revoke.ts | 161 +++++++++++++++++ .../_generated/workers/versions/profile.ts | 2 +- .../zero-trust/casb/findings/export.ts | 10 +- 57 files changed, 700 insertions(+), 19 deletions(-) create mode 100644 .changeset/update-openapi-d04a1ddd718b.md create mode 100644 packages/cli/src/commands/_generated/_operations/cloudforce-one/threat-signals/articles/aggregate-severity.ts create mode 100644 packages/cli/src/commands/_generated/_operations/realtime/kit/meetings/participants/tokens/revoke.ts create mode 100644 packages/cli/src/commands/_generated/cloudforce-one/threat-signals/articles/aggregate-severity.ts create mode 100644 packages/cli/src/commands/_generated/realtime/kit/meetings/participants/tokens/revoke.ts diff --git a/.changeset/update-openapi-d04a1ddd718b.md b/.changeset/update-openapi-d04a1ddd718b.md new file mode 100644 index 0000000000..3051187d20 --- /dev/null +++ b/.changeset/update-openapi-d04a1ddd718b.md @@ -0,0 +1,6 @@ +--- +"cf": minor +--- + +Update the generated command surface for Forge OpenAPI release +`d04a1ddd718bb1c91f79d3220174e5a16ed1cacd`. diff --git a/packages/cli/generate.ts b/packages/cli/generate.ts index 9837e2f74c..bac7deb8b2 100644 --- a/packages/cli/generate.ts +++ b/packages/cli/generate.ts @@ -17,7 +17,7 @@ import type { ForgeOpenApiDocument } from "./generator/openapi.js"; const bundle = process.env.FORGE_OPENAPI_BUNDLE; // Bump this SHA to generate the commands from a new release. -const FORGE_OPENAPI_VERSION = "67c5887b849fdde3ac07438146fa92a0010e2f53"; +const FORGE_OPENAPI_VERSION = "d04a1ddd718bb1c91f79d3220174e5a16ed1cacd"; const FORGE_OPENAPI_RELEASE = `openapi@${FORGE_OPENAPI_VERSION}`; const FORGE_OPENAPI_ASSET = "openapi.forge.json"; const FORGE_OPENAPI_ASSET_URL = `https://github.com/cloudflare/forge/releases/download/${FORGE_OPENAPI_RELEASE}/${FORGE_OPENAPI_ASSET}`; diff --git a/packages/cli/src/commands/_generated/_meta/commands.json b/packages/cli/src/commands/_generated/_meta/commands.json index 89fd771341..5cd6a3fd1d 100644 --- a/packages/cli/src/commands/_generated/_meta/commands.json +++ b/packages/cli/src/commands/_generated/_meta/commands.json @@ -37302,6 +37302,54 @@ "operationId": "cloudforce-one.threat-signals.articles.aggregate-relevance", "hideCommand": false }, + { + "command": "cf cloudforce-one threat-signals articles aggregate-severity", + "name": "aggregate-severity", + "fullPath": [ + "cloudforce-one", + "threat-signals", + "articles", + "aggregate-severity" + ], + "description": "Beta. Counts the account's Threat Signals articles in each intrinsic severity band. An article's band is the severity level nearest its severity, from informational to critical. Articles without a severity are not counted. min_relevance counts only articles at or above a relevance band for any active Priority Intelligence Requirement. Like the article severity field, severity is reported only while the account has an active Priority Intelligence Requirement, including one the matcher paused; otherwise every count is zero. All counts are read together and are exact.", + "summary": "Count Threat Signals articles by severity band", + "usage": "cf cloudforce-one threat-signals articles aggregate-severity [options]", + "arguments": [], + "options": [ + { + "name": "published-after", + "type": "string", + "required": false, + "description": "Include articles published at or after this ISO 8601 date-time with Z or a numeric UTC offset; normalized to UTC." + }, + { + "name": "published-before", + "type": "string", + "required": false, + "description": "Include articles published at or before this ISO 8601 date-time with Z or a numeric UTC offset; normalized to UTC." + }, + { + "name": "min-relevance", + "type": "string", + "required": false, + "description": "Beta. Count only articles at or above this relevance band for any active Priority Intelligence Requirement, as the article list's min_relevance does without pir_id. Excludes articles that have not been scored against an active PIR.", + "enum": ["low", "medium", "high"] + }, + { + "name": "dry-run", + "type": "boolean", + "required": false, + "description": "Validate and show what would happen without executing", + "default": false + } + ], + "category": "action", + "hasRequestBody": false, + "httpMethod": "GET", + "apiPath": "/accounts/{account_id}/cloudforce-one/v2/threat-signals/articles/severity/aggregate", + "operationId": "cloudforce-one.threat-signals.articles.aggregate-severity", + "hideCommand": false + }, { "command": "cf cloudforce-one threat-signals articles bulk-mark-read", "name": "bulk-mark-read", @@ -54619,7 +54667,7 @@ "httpMethod": "POST", "apiPath": "/zones/{zone_id}/healthchecks", "operationId": "healthchecks.create", - "hideCommand": true + "hideCommand": false }, { "command": "cf healthchecks delete", @@ -54651,7 +54699,7 @@ "httpMethod": "DELETE", "apiPath": "/zones/{zone_id}/healthchecks/{healthcheck_id}", "operationId": "healthchecks.delete", - "hideCommand": true + "hideCommand": false }, { "command": "cf healthchecks edit", @@ -54817,7 +54865,7 @@ "httpMethod": "PATCH", "apiPath": "/zones/{zone_id}/healthchecks/{healthcheck_id}", "operationId": "healthchecks.edit", - "hideCommand": true + "hideCommand": false }, { "command": "cf healthchecks get", @@ -54849,7 +54897,7 @@ "httpMethod": "GET", "apiPath": "/zones/{zone_id}/healthchecks/{healthcheck_id}", "operationId": "healthchecks.get", - "hideCommand": true + "hideCommand": false }, { "command": "cf healthchecks list", @@ -54885,7 +54933,7 @@ "httpMethod": "GET", "apiPath": "/zones/{zone_id}/healthchecks", "operationId": "healthchecks.list", - "hideCommand": true + "hideCommand": false }, { "command": "cf healthchecks previews create", @@ -55050,7 +55098,7 @@ "httpMethod": "POST", "apiPath": "/zones/{zone_id}/healthchecks/preview", "operationId": "healthchecks.previews.create", - "hideCommand": true + "hideCommand": false }, { "command": "cf healthchecks previews delete", @@ -55082,7 +55130,7 @@ "httpMethod": "DELETE", "apiPath": "/zones/{zone_id}/healthchecks/preview/{healthcheck_id}", "operationId": "healthchecks.previews.delete", - "hideCommand": true + "hideCommand": false }, { "command": "cf healthchecks previews get", @@ -55114,7 +55162,7 @@ "httpMethod": "GET", "apiPath": "/zones/{zone_id}/healthchecks/preview/{healthcheck_id}", "operationId": "healthchecks.previews.get", - "hideCommand": true + "hideCommand": false }, { "command": "cf healthchecks update", @@ -55280,7 +55328,7 @@ "httpMethod": "PUT", "apiPath": "/zones/{zone_id}/healthchecks/{healthcheck_id}", "operationId": "healthchecks.update", - "hideCommand": true + "hideCommand": false }, { "command": "cf hyperdrive create", @@ -106385,6 +106433,18 @@ "description": "Name of the preset to apply to this participant.", "default": "group_call_host" }, + { + "name": "token-expires-on", + "type": "string", + "required": false, + "description": "RFC 3339 timestamp with a timezone at or after which the token cannot be used. Must be in the future. Defaults to not_before plus 100 days." + }, + { + "name": "token-not-before", + "type": "string", + "required": false, + "description": "RFC 3339 timestamp with a timezone before which the token cannot be used. Defaults to the current time. May be in the past." + }, { "name": "dry-run", "type": "boolean", @@ -106652,21 +106712,102 @@ "required": true, "description": "ID of the meeting. You can fetch the meeting ID using the create a meeting API." }, + { + "name": "expires-on", + "type": "string", + "required": false, + "description": "RFC 3339 timestamp with a timezone at or after which the token cannot be used. Must be in the future. Defaults to not_before plus 100 days." + }, + { + "name": "not-before", + "type": "string", + "required": false, + "description": "RFC 3339 timestamp with a timezone before which the token cannot be used. Defaults to the current time. May be in the past." + }, { "name": "dry-run", "type": "boolean", "required": false, "description": "Validate and show what would happen without executing", "default": false + }, + { + "name": "body", + "type": "string", + "required": false, + "description": "Raw JSON request body (bypasses individual flags)" } ], "category": "action", - "hasRequestBody": false, + "hasRequestBody": true, "httpMethod": "POST", "apiPath": "/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/participants/{participant_id}/token", "operationId": "realtime.kit.meetings.participants.tokens.refresh", "hideCommand": false }, + { + "command": "cf realtime kit meetings participants tokens revoke", + "name": "revoke", + "fullPath": [ + "realtime", + "kit", + "meetings", + "participants", + "tokens", + "revoke" + ], + "description": "Revokes a previously issued participant authentication token without deleting the participant. Other tokens issued to the participant remain valid.", + "summary": "Revoke participant's authentication token", + "usage": "cf realtime kit meetings participants tokens revoke [options]", + "arguments": [ + { + "name": "participant-id", + "position": 0, + "type": "string", + "required": true, + "description": "ID of the participant. You can fetch the participant ID using the add a participant API." + } + ], + "options": [ + { + "name": "app-id", + "type": "string", + "required": true, + "description": "The app identifier tag." + }, + { + "name": "meeting-id", + "type": "string", + "required": true, + "description": "ID of the meeting. You can fetch the meeting ID using the create a meeting API." + }, + { + "name": "token", + "type": "string", + "required": true, + "description": "The participant authentication token to revoke." + }, + { + "name": "dry-run", + "type": "boolean", + "required": false, + "description": "Validate and show what would happen without executing", + "default": false + }, + { + "name": "body", + "type": "string", + "required": false, + "description": "Raw JSON request body (bypasses individual flags)" + } + ], + "category": "action", + "hasRequestBody": true, + "httpMethod": "DELETE", + "apiPath": "/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/participants/{participant_id}/token", + "operationId": "realtime.kit.meetings.participants.tokens.revoke", + "hideCommand": false + }, { "command": "cf realtime kit meetings participants update", "name": "update", @@ -134868,7 +135009,7 @@ "name": "actor-id", "type": "string", "required": false, - "description": "Identifies the exact Durable Object actor to profile. Must be specified together with namespace_id. The actor must currently be active and running the requested Worker version." + "description": "Identifies the exact Durable Object actor to profile. Must be specified together with namespace_id. The actor must currently be active and running the requested version." }, { "name": "duration-ms", @@ -143960,6 +144101,13 @@ "required": false, "description": "Which fields to use when ordering the findings. Provide as a JSON array of objects or @path/to/file.json." }, + { + "name": "product", + "type": "string", + "required": false, + "description": "Filter by finding's category product.", + "enum": ["SaaS", "Cloud"] + }, { "name": "search", "type": "string", diff --git a/packages/cli/src/commands/_generated/_meta/schemas.json b/packages/cli/src/commands/_generated/_meta/schemas.json index 8ca4990219..b28d8274f6 100644 --- a/packages/cli/src/commands/_generated/_meta/schemas.json +++ b/packages/cli/src/commands/_generated/_meta/schemas.json @@ -26495,6 +26495,37 @@ "hasRequestBody": false, "requestBodyFields": [] }, + "cloudforce-one threat-signals articles aggregate-severity": { + "operationId": "cloudforce-one.threat-signals.articles.aggregate-severity", + "httpMethod": "GET", + "path": "/accounts/{account_id}/cloudforce-one/v2/threat-signals/articles/severity/aggregate", + "pathParams": [ + { + "name": "account_id", + "type": "string", + "required": true + } + ], + "queryParams": [ + { + "name": "published_after", + "type": "string", + "required": false + }, + { + "name": "published_before", + "type": "string", + "required": false + }, + { + "name": "min_relevance", + "type": "string", + "required": false + } + ], + "hasRequestBody": false, + "requestBodyFields": [] + }, "cloudforce-one threat-signals articles bulk-mark-read": { "operationId": "cloudforce-one.threat-signals.articles.bulk-mark-read", "httpMethod": "PATCH", @@ -74523,6 +74554,18 @@ "type": "string", "required": true, "description": "Name of the preset to apply to this participant." + }, + { + "name": "token-expires-on", + "type": "string", + "required": false, + "description": "RFC 3339 timestamp with a timezone at or after which the token cannot be used. Must be in the future. Defaults to not_before plus 100 days." + }, + { + "name": "token-not-before", + "type": "string", + "required": false, + "description": "RFC 3339 timestamp with a timezone before which the token cannot be used. Defaults to the current time. May be in the past." } ] }, @@ -74704,8 +74747,58 @@ } ], "queryParams": [], - "hasRequestBody": false, - "requestBodyFields": [] + "hasRequestBody": true, + "requestBodyFields": [ + { + "name": "expires-on", + "type": "string", + "required": false, + "description": "RFC 3339 timestamp with a timezone at or after which the token cannot be used. Must be in the future. Defaults to not_before plus 100 days." + }, + { + "name": "not-before", + "type": "string", + "required": false, + "description": "RFC 3339 timestamp with a timezone before which the token cannot be used. Defaults to the current time. May be in the past." + } + ] + }, + "realtime kit meetings participants tokens revoke": { + "operationId": "realtime.kit.meetings.participants.tokens.revoke", + "httpMethod": "DELETE", + "path": "/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/participants/{participant_id}/token", + "pathParams": [ + { + "name": "account_id", + "type": "string", + "required": true + }, + { + "name": "app_id", + "type": "string", + "required": true + }, + { + "name": "meeting_id", + "type": "string", + "required": true + }, + { + "name": "participant_id", + "type": "string", + "required": true + } + ], + "queryParams": [], + "hasRequestBody": true, + "requestBodyFields": [ + { + "name": "token", + "type": "string", + "required": true, + "description": "The participant authentication token to revoke." + } + ] }, "realtime kit meetings participants update": { "operationId": "realtime.kit.meetings.participants.update", @@ -93888,7 +93981,7 @@ "name": "actor-id", "type": "string", "required": false, - "description": "Identifies the exact Durable Object actor to profile. Must be specified together with namespace_id. The actor must currently be active and running the requested Worker version." + "description": "Identifies the exact Durable Object actor to profile. Must be specified together with namespace_id. The actor must currently be active and running the requested version." }, { "name": "duration-ms", @@ -100279,6 +100372,12 @@ "required": false, "description": "Which fields to use when ordering the findings. Provide as a JSON array of objects or @path/to/file.json." }, + { + "name": "product", + "type": "string", + "required": false, + "description": "Filter by finding's category product." + }, { "name": "search", "type": "string", diff --git a/packages/cli/src/commands/_generated/_operations/cloudforce-one/threat-signals/articles/aggregate-severity.ts b/packages/cli/src/commands/_generated/_operations/cloudforce-one/threat-signals/articles/aggregate-severity.ts new file mode 100644 index 0000000000..1aae3eb55a --- /dev/null +++ b/packages/cli/src/commands/_generated/_operations/cloudforce-one/threat-signals/articles/aggregate-severity.ts @@ -0,0 +1,9 @@ +/** @generated from cloudforce-one.threat-signals.articles.aggregate-severity */ +import { path } from "#api"; + +export default { + method: "GET", + path: (request: Record) => + path`/accounts/${request.account_id}/cloudforce-one/v2/threat-signals/articles/severity/aggregate`, + query: ["published_after", "published_before", "min_relevance"], +} as const; diff --git a/packages/cli/src/commands/_generated/_operations/realtime/kit/meetings/participants/create.ts b/packages/cli/src/commands/_generated/_operations/realtime/kit/meetings/participants/create.ts index 7e9a574280..e309946597 100644 --- a/packages/cli/src/commands/_generated/_operations/realtime/kit/meetings/participants/create.ts +++ b/packages/cli/src/commands/_generated/_operations/realtime/kit/meetings/participants/create.ts @@ -7,6 +7,7 @@ export default { path`/accounts/${request.account_id}/realtime/kit/${request.app_id}/meetings/${request.meeting_id}/participants`, body: "json", errors: { + 400: "BadRequestError", 500: "InternalServerError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/realtime/kit/meetings/participants/tokens/refresh.ts b/packages/cli/src/commands/_generated/_operations/realtime/kit/meetings/participants/tokens/refresh.ts index 1bf05c9a6d..9262ca4c64 100644 --- a/packages/cli/src/commands/_generated/_operations/realtime/kit/meetings/participants/tokens/refresh.ts +++ b/packages/cli/src/commands/_generated/_operations/realtime/kit/meetings/participants/tokens/refresh.ts @@ -5,7 +5,9 @@ export default { method: "POST", path: (request: Record) => path`/accounts/${request.account_id}/realtime/kit/${request.app_id}/meetings/${request.meeting_id}/participants/${request.participant_id}/token`, + body: "json", errors: { + 400: "BadRequestError", 500: "InternalServerError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/realtime/kit/meetings/participants/tokens/revoke.ts b/packages/cli/src/commands/_generated/_operations/realtime/kit/meetings/participants/tokens/revoke.ts new file mode 100644 index 0000000000..4108b22556 --- /dev/null +++ b/packages/cli/src/commands/_generated/_operations/realtime/kit/meetings/participants/tokens/revoke.ts @@ -0,0 +1,14 @@ +/** @generated from realtime.kit.meetings.participants.tokens.revoke */ +import { path } from "#api"; + +export default { + method: "DELETE", + path: (request: Record) => + path`/accounts/${request.account_id}/realtime/kit/${request.app_id}/meetings/${request.meeting_id}/participants/${request.participant_id}/token`, + body: "json", + errors: { + 400: "BadRequestError", + 403: "ForbiddenError", + 500: "InternalServerError", + }, +} as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/asset-schemas/get.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/asset-schemas/get.ts index 776e019fa1..201f4f4649 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/asset-schemas/get.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/asset-schemas/get.ts @@ -9,5 +9,6 @@ export default { 401: "UnauthorizedError", 403: "ForbiddenError", 404: "NotFoundError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/asset-schemas/list.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/asset-schemas/list.ts index c7d0aed2a1..53ecdd7da0 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/asset-schemas/list.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/asset-schemas/list.ts @@ -10,5 +10,6 @@ export default { 400: "BadRequestError", 401: "UnauthorizedError", 403: "ForbiddenError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/content/export.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/content/export.ts index cb05e3f5a4..7cc0cd3561 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/content/export.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/content/export.ts @@ -8,5 +8,6 @@ export default { body: "json", errors: { 400: "BadRequestError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/exports/get.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/exports/get.ts index 94b4e29369..7e966938dd 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/exports/get.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/exports/get.ts @@ -8,5 +8,6 @@ export default { errors: { 400: "BadRequestError", 404: "NotFoundError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/exports/list.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/exports/list.ts index 975a1ad798..6cdafe5f77 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/exports/list.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/exports/list.ts @@ -8,5 +8,6 @@ export default { query: ["page", "per_page", "status"], errors: { 400: "BadRequestError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/finding-types/create.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/finding-types/create.ts index 3003d33f37..b57b69aa1b 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/finding-types/create.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/finding-types/create.ts @@ -12,6 +12,7 @@ export default { 403: "ForbiddenError", 409: "ConflictError", 422: "UnprocessableEntityError", + 429: "TooManyRequestsError", 500: "InternalServerError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/finding-types/delete.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/finding-types/delete.ts index 1c9f33cdc6..3e1b5e84b8 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/finding-types/delete.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/finding-types/delete.ts @@ -11,6 +11,7 @@ export default { 401: "UnauthorizedError", 403: "ForbiddenError", 409: "ConflictError", + 429: "TooManyRequestsError", 500: "InternalServerError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/finding-types/get.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/finding-types/get.ts index 3298decd43..249d822140 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/finding-types/get.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/finding-types/get.ts @@ -8,5 +8,6 @@ export default { errors: { 400: "BadRequestError", 404: "NotFoundError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/finding-types/list.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/finding-types/list.ts index 48e261d805..1be4d7c6e4 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/finding-types/list.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/finding-types/list.ts @@ -23,5 +23,6 @@ export default { errors: { 400: "BadRequestError", 403: "ForbiddenError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/finding-types/remediation-types/list.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/finding-types/remediation-types/list.ts index 7aa6b8102c..17d2f02cc9 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/finding-types/remediation-types/list.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/finding-types/remediation-types/list.ts @@ -9,5 +9,6 @@ export default { errors: { 400: "BadRequestError", 404: "NotFoundError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/finding-types/update.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/finding-types/update.ts index a61687154e..f234256dcd 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/finding-types/update.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/finding-types/update.ts @@ -13,6 +13,7 @@ export default { 404: "NotFoundError", 409: "ConflictError", 422: "UnprocessableEntityError", + 429: "TooManyRequestsError", 500: "InternalServerError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/finding-types/validate.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/finding-types/validate.ts index 5d651356a6..e75799ee5d 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/finding-types/validate.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/finding-types/validate.ts @@ -10,6 +10,7 @@ export default { 400: "BadRequestError", 401: "UnauthorizedError", 403: "ForbiddenError", + 429: "TooManyRequestsError", 500: "InternalServerError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/export.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/export.ts index 72ff8f38f9..840f7ed220 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/export.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/export.ts @@ -8,5 +8,6 @@ export default { body: "json", errors: { 400: "BadRequestError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/get.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/get.ts index b6e3593b05..9dfd180de2 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/get.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/get.ts @@ -10,5 +10,6 @@ export default { 401: "UnauthorizedError", 403: "ForbiddenError", 404: "NotFoundError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/ignore.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/ignore.ts index ff917da033..ff3f3888b4 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/ignore.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/ignore.ts @@ -8,5 +8,6 @@ export default { body: "json", errors: { 400: "BadRequestError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/instances/archive.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/instances/archive.ts index d50e9a8557..4b1c88d8d0 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/instances/archive.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/instances/archive.ts @@ -9,5 +9,6 @@ export default { errors: { 400: "BadRequestError", 404: "NotFoundError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/instances/export.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/instances/export.ts index bdccaedc54..b2fcdbdb62 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/instances/export.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/instances/export.ts @@ -9,5 +9,6 @@ export default { errors: { 400: "BadRequestError", 404: "NotFoundError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/instances/get.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/instances/get.ts index a4e57b067e..92f941bd84 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/instances/get.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/instances/get.ts @@ -8,5 +8,6 @@ export default { errors: { 400: "BadRequestError", 404: "NotFoundError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/instances/list.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/instances/list.ts index 2252f03efe..823bd8063b 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/instances/list.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/instances/list.ts @@ -23,5 +23,6 @@ export default { errors: { 400: "BadRequestError", 404: "NotFoundError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/instances/unarchive.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/instances/unarchive.ts index 5ae80457e2..0621193435 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/instances/unarchive.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/instances/unarchive.ts @@ -9,5 +9,6 @@ export default { errors: { 400: "BadRequestError", 404: "NotFoundError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/list.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/list.ts index 04121e67e8..d98da64a0f 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/list.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/list.ts @@ -27,5 +27,6 @@ export default { 400: "BadRequestError", 401: "UnauthorizedError", 403: "ForbiddenError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/reset-severity.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/reset-severity.ts index a889d06ad2..1159524250 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/reset-severity.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/reset-severity.ts @@ -8,6 +8,7 @@ export default { errors: { 400: "BadRequestError", 404: "NotFoundError", + 429: "TooManyRequestsError", 500: "InternalServerError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/tune-severity.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/tune-severity.ts index e7758fe7db..646845f512 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/tune-severity.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/tune-severity.ts @@ -9,6 +9,7 @@ export default { errors: { 400: "BadRequestError", 404: "NotFoundError", + 429: "TooManyRequestsError", 500: "InternalServerError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/unignore.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/unignore.ts index db1a2a371a..f84575618f 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/unignore.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/findings/unignore.ts @@ -8,5 +8,6 @@ export default { body: "json", errors: { 400: "BadRequestError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/policies/create.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/policies/create.ts index 834ab47b04..89564e2cbf 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/policies/create.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/policies/create.ts @@ -11,5 +11,6 @@ export default { 401: "UnauthorizedError", 403: "ForbiddenError", 404: "NotFoundError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/policies/delete.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/policies/delete.ts index 2a78de2db7..5fe2fefcff 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/policies/delete.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/policies/delete.ts @@ -10,5 +10,6 @@ export default { 401: "UnauthorizedError", 403: "ForbiddenError", 404: "NotFoundError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/policies/get.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/policies/get.ts index fb19723981..99bcd3d05b 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/policies/get.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/policies/get.ts @@ -10,5 +10,6 @@ export default { 401: "UnauthorizedError", 403: "ForbiddenError", 404: "NotFoundError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/policies/list.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/policies/list.ts index cbba18a48d..f34d433e1d 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/policies/list.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/policies/list.ts @@ -10,5 +10,6 @@ export default { 400: "BadRequestError", 401: "UnauthorizedError", 403: "ForbiddenError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/policies/update.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/policies/update.ts index fc355b3a0c..21b100e126 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/policies/update.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/policies/update.ts @@ -11,5 +11,6 @@ export default { 401: "UnauthorizedError", 403: "ForbiddenError", 404: "NotFoundError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/remediations/jobs/create.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/remediations/jobs/create.ts index e38e40c24d..1ea4132531 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/remediations/jobs/create.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/remediations/jobs/create.ts @@ -9,5 +9,6 @@ export default { errors: { 400: "BadRequestError", 409: "ConflictError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/remediations/jobs/export.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/remediations/jobs/export.ts index deb2fbb2ac..ed36cf151d 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/remediations/jobs/export.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/remediations/jobs/export.ts @@ -8,5 +8,6 @@ export default { body: "json", errors: { 400: "BadRequestError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/remediations/jobs/list.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/remediations/jobs/list.ts index 3f3826d8e2..c8d577011d 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/remediations/jobs/list.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/remediations/jobs/list.ts @@ -21,5 +21,6 @@ export default { joined: ["triggered_by_actor"], errors: { 400: "BadRequestError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/create.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/create.ts index 9e3e3c7b00..539578ba6b 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/create.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/create.ts @@ -11,5 +11,6 @@ export default { 401: "UnauthorizedError", 403: "ForbiddenError", 422: "UnprocessableEntityError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/delete.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/delete.ts index 4250c313b6..a16420cea9 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/delete.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/delete.ts @@ -8,5 +8,6 @@ export default { errors: { 400: "BadRequestError", 409: "ConflictError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/evaluate-existing.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/evaluate-existing.ts index e578e65150..feb16fd153 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/evaluate-existing.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/evaluate-existing.ts @@ -10,5 +10,6 @@ export default { 401: "UnauthorizedError", 403: "ForbiddenError", 404: "NotFoundError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/evaluate.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/evaluate.ts index 2c6b400331..29745ab128 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/evaluate.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/evaluate.ts @@ -10,5 +10,6 @@ export default { 400: "BadRequestError", 401: "UnauthorizedError", 403: "ForbiddenError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/get.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/get.ts index 7e94e3cce6..e05f145275 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/get.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/get.ts @@ -10,5 +10,6 @@ export default { 401: "UnauthorizedError", 403: "ForbiddenError", 404: "NotFoundError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/jobs/create.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/jobs/create.ts index feb6848715..3c063e029b 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/jobs/create.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/jobs/create.ts @@ -11,5 +11,6 @@ export default { 401: "UnauthorizedError", 403: "ForbiddenError", 404: "NotFoundError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/list.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/list.ts index 875e756cee..736ca79d44 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/list.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/list.ts @@ -8,5 +8,6 @@ export default { errors: { 401: "UnauthorizedError", 403: "ForbiddenError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/update.ts b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/update.ts index 9d5e74e245..a8ed044b36 100644 --- a/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/update.ts +++ b/packages/cli/src/commands/_generated/_operations/zero-trust/casb/webhooks/update.ts @@ -11,5 +11,6 @@ export default { 401: "UnauthorizedError", 403: "ForbiddenError", 404: "NotFoundError", + 429: "TooManyRequestsError", }, } as const; diff --git a/packages/cli/src/commands/_generated/cloudforce-one/threat-signals/articles/aggregate-severity.ts b/packages/cli/src/commands/_generated/cloudforce-one/threat-signals/articles/aggregate-severity.ts new file mode 100644 index 0000000000..0d39c2a597 --- /dev/null +++ b/packages/cli/src/commands/_generated/cloudforce-one/threat-signals/articles/aggregate-severity.ts @@ -0,0 +1,94 @@ +import operation from "../../../_operations/cloudforce-one/threat-signals/articles/aggregate-severity.js"; +import type { CommonYargsOptions, InferArgs } from "#lib/cli-types.js"; +import type { ArgClassification } from "#lib/telemetry/index.js"; +/** + * aggregate-severity command + * @generated from apis/overlays/cloudforce-one.ts + */ +import type { Argv, CommandModule } from "yargs"; +import { + createCommandClient, + getAccountId, + resolveAccountIdSilent, +} from "#lib/auth.js"; +import { formatDryRun } from "#lib/dry-run.js"; +import { LOCAL_ACCOUNT_ID } from "#lib/local.js"; +import { formatOutput } from "#lib/output.js"; +import { withProgress } from "#lib/progress.js"; +import { runWithTelemetry } from "#lib/telemetry/index.js"; + +function builder(yargs: Argv) { + return yargs + .usage( + "$0 cloudforce-one threat-signals articles aggregate-severity\n\nBeta. Counts the account's Threat Signals articles in each intrinsic severity band. An article's band is the severity level nearest its severity, from informational to critical. Articles without a severity are not counted. min_relevance counts only articles at or above a relevance band for any active Priority Intelligence Requirement. Like the article severity field, severity is reported only while the account has an active Priority Intelligence Requirement, including one the matcher paused; otherwise every count is zero. All counts are read together and are exact." + ) + .option("published-after", { + type: "string", + description: + "Include articles published at or after this ISO 8601 date-time with Z or a numeric UTC offset; normalized to UTC.", + }) + .option("published-before", { + type: "string", + description: + "Include articles published at or before this ISO 8601 date-time with Z or a numeric UTC offset; normalized to UTC.", + }) + .option("min-relevance", { + type: "string", + description: + "Beta. Count only articles at or above this relevance band for any active Priority Intelligence Requirement, as the article list's min_relevance does without pir_id. Excludes articles that have not been scored against an active PIR.", + choices: ["low", "medium", "high"], + }) + .option("dry-run", { + type: "boolean", + description: "Validate and show what would happen without executing", + default: false, + }); +} + +type Args = InferArgs; + +const command: CommandModule = { + command: "aggregate-severity", + describe: "Count Threat Signals articles by severity band", + builder, + handler: async (argv): Promise => + runWithTelemetry( + { + command: "cloudforce-one threat-signals articles aggregate-severity", + classification: { + safeFlags: ["min-relevance", "dry-run"], + } satisfies ArgClassification, + }, + argv as Record, + async () => { + const queryParams: Record = { + published_after: argv["published-after"], + published_before: argv["published-before"], + min_relevance: argv["min-relevance"], + }; + if (argv.dryRun) { + const __cfDryRunAccountId = await resolveAccountIdSilent(); + formatDryRun({ + command: + "cf cloudforce-one threat-signals articles aggregate-severity", + method: "GET", + url: `https://api.cloudflare.com/client/v4/accounts/${__cfDryRunAccountId ?? ""}/cloudforce-one/v2/threat-signals/articles/severity/aggregate`, + pathParams: {}, + query: queryParams, + bodyKind: "none", + }); + return; + } + const client = await createCommandClient(argv); + const accountId = argv.local ? LOCAL_ACCOUNT_ID : await getAccountId(); + argv.accountId = accountId; + + const result = await withProgress(`Loading`, async () => + client.send(operation, { account_id: accountId, ...queryParams }) + ); + formatOutput(result, { successLabel: `Loaded` }); + } + ), +}; + +export default command; diff --git a/packages/cli/src/commands/_generated/cloudforce-one/threat-signals/articles/index.ts b/packages/cli/src/commands/_generated/cloudforce-one/threat-signals/articles/index.ts index 943def699e..d9431cd6e3 100644 --- a/packages/cli/src/commands/_generated/cloudforce-one/threat-signals/articles/index.ts +++ b/packages/cli/src/commands/_generated/cloudforce-one/threat-signals/articles/index.ts @@ -1,4 +1,5 @@ import $aggregaterelevance from "./aggregate-relevance.js"; +import $aggregateseverity from "./aggregate-severity.js"; import $bulkmarkread from "./bulk-mark-read.js"; import $getcontent from "./get-content.js"; import $get from "./get.js"; @@ -20,6 +21,7 @@ const command: CommandModule = { builder: (yargs) => { return yargs .command($aggregaterelevance) + .command($aggregateseverity) .command($bulkmarkread) .command($get) .command($getcontent) diff --git a/packages/cli/src/commands/_generated/index.ts b/packages/cli/src/commands/_generated/index.ts index d7c387e2ac..c9ad13d0d3 100644 --- a/packages/cli/src/commands/_generated/index.ts +++ b/packages/cli/src/commands/_generated/index.ts @@ -532,7 +532,7 @@ export const generatedCommands: GeneratedCommand[] = [ () => import("./healthchecks/index.js"), null ), - hideCommand: true, + hideCommand: false, }, { command: lazyCommand( diff --git a/packages/cli/src/commands/_generated/realtime/kit/meetings/participants/create.ts b/packages/cli/src/commands/_generated/realtime/kit/meetings/participants/create.ts index 46d365ed91..8f8c1a5e40 100644 --- a/packages/cli/src/commands/_generated/realtime/kit/meetings/participants/create.ts +++ b/packages/cli/src/commands/_generated/realtime/kit/meetings/participants/create.ts @@ -55,6 +55,16 @@ function builder(yargs: Argv) { description: "Name of the preset to apply to this participant.", default: "group_call_host", }) + .option("token-expires-on", { + type: "string", + description: + "RFC 3339 timestamp with a timezone at or after which the token cannot be used. Must be in the future. Defaults to not_before plus 100 days.", + }) + .option("token-not-before", { + type: "string", + description: + "RFC 3339 timestamp with a timezone before which the token cannot be used. Defaults to the current time. May be in the past.", + }) .option("dry-run", { type: "boolean", description: "Validate and show what would happen without executing", @@ -117,6 +127,18 @@ const command: CommandModule = { "preset-name", "text" ), + token: { + expires_on: resolveFileToken( + argv["token-expires-on"] as string | undefined, + "token-expires-on", + "text" + ), + not_before: resolveFileToken( + argv["token-not-before"] as string | undefined, + "token-not-before", + "text" + ), + }, }), }); return; @@ -173,6 +195,18 @@ const command: CommandModule = { "preset-name", "text" ), + token: { + expires_on: resolveFileToken( + argv["token-expires-on"] as string | undefined, + "token-expires-on", + "text" + ), + not_before: resolveFileToken( + argv["token-not-before"] as string | undefined, + "token-not-before", + "text" + ), + }, }); const result = await withProgress(`Creating`, async () => client.send(operation, { diff --git a/packages/cli/src/commands/_generated/realtime/kit/meetings/participants/tokens/index.ts b/packages/cli/src/commands/_generated/realtime/kit/meetings/participants/tokens/index.ts index b843d9e02a..9829b5a087 100644 --- a/packages/cli/src/commands/_generated/realtime/kit/meetings/participants/tokens/index.ts +++ b/packages/cli/src/commands/_generated/realtime/kit/meetings/participants/tokens/index.ts @@ -1,4 +1,5 @@ import $refresh from "./refresh.js"; +import $revoke from "./revoke.js"; import type { CommonYargsOptions } from "#lib/cli-types.js"; /** * tokens command group @@ -13,6 +14,7 @@ const command: CommandModule = { builder: (yargs) => { return yargs .command($refresh) + .command($revoke) .demandCommand(1, "Please specify a subcommand"); }, diff --git a/packages/cli/src/commands/_generated/realtime/kit/meetings/participants/tokens/refresh.ts b/packages/cli/src/commands/_generated/realtime/kit/meetings/participants/tokens/refresh.ts index 081d2f432f..fe751dcab7 100644 --- a/packages/cli/src/commands/_generated/realtime/kit/meetings/participants/tokens/refresh.ts +++ b/packages/cli/src/commands/_generated/realtime/kit/meetings/participants/tokens/refresh.ts @@ -11,7 +11,9 @@ import { getAccountId, resolveAccountIdSilent, } from "#lib/auth.js"; +import { compactBody, parseBody } from "#lib/body-parser.js"; import { formatDryRun } from "#lib/dry-run.js"; +import { resolveFileToken } from "#lib/input-validation.js"; import { LOCAL_ACCOUNT_ID } from "#lib/local.js"; import { formatOutput } from "#lib/output.js"; import { withProgress } from "#lib/progress.js"; @@ -39,10 +41,25 @@ function builder(yargs: Argv) { "ID of the meeting. You can fetch the meeting ID using the create a meeting API.", demandOption: true, }) + .option("expires-on", { + type: "string", + description: + "RFC 3339 timestamp with a timezone at or after which the token cannot be used. Must be in the future. Defaults to not_before plus 100 days.", + }) + .option("not-before", { + type: "string", + description: + "RFC 3339 timestamp with a timezone before which the token cannot be used. Defaults to the current time. May be in the past.", + }) .option("dry-run", { type: "boolean", description: "Validate and show what would happen without executing", default: false, + }) + .option("body", { + type: "string", + description: + "Validity window of the participant authentication token. The window is [not_before, expires_on) and cannot be longer than 100 days. Defaults to a token valid from now for 100 days.", }); } @@ -73,7 +90,22 @@ const command: CommandModule = { "meeting-id": String(argv["meeting-id"] ?? ""), "participant-id": String(argv["participant-id"] ?? ""), }, - bodyKind: "none", + bodyKind: "json", + body: + argv.body !== undefined + ? parseBody(argv.body) + : compactBody({ + expires_on: resolveFileToken( + argv["expires-on"] as string | undefined, + "expires-on", + "text" + ), + not_before: resolveFileToken( + argv["not-before"] as string | undefined, + "not-before", + "text" + ), + }), }); return; } @@ -81,8 +113,37 @@ const command: CommandModule = { const accountId = argv.local ? LOCAL_ACCOUNT_ID : await getAccountId(); argv.accountId = accountId; + if (argv.body) { + const bodyData = parseBody(argv.body); + const result = await withProgress(`Creating`, async () => + client.send(operation, { + body: bodyData, + account_id: accountId, + app_id: argv["app-id"], + meeting_id: argv["meeting-id"], + participant_id: argv["participant-id"], + }) + ); + formatOutput(result, { successLabel: `Created` }); + return; + } + + // Assemble request body from individual flags + const bodyData = compactBody({ + expires_on: resolveFileToken( + argv["expires-on"] as string | undefined, + "expires-on", + "text" + ), + not_before: resolveFileToken( + argv["not-before"] as string | undefined, + "not-before", + "text" + ), + }); const result = await withProgress(`Creating`, async () => client.send(operation, { + body: bodyData, account_id: accountId, app_id: argv["app-id"], meeting_id: argv["meeting-id"], diff --git a/packages/cli/src/commands/_generated/realtime/kit/meetings/participants/tokens/revoke.ts b/packages/cli/src/commands/_generated/realtime/kit/meetings/participants/tokens/revoke.ts new file mode 100644 index 0000000000..b4b34e5012 --- /dev/null +++ b/packages/cli/src/commands/_generated/realtime/kit/meetings/participants/tokens/revoke.ts @@ -0,0 +1,161 @@ +import operation from "../../../../../_operations/realtime/kit/meetings/participants/tokens/revoke.js"; +import type { CommonYargsOptions, InferArgs } from "#lib/cli-types.js"; +import type { ArgClassification } from "#lib/telemetry/index.js"; +/** + * revoke command + * @generated from apis/overlays/realtime.ts + */ +import type { Argv, CommandModule } from "yargs"; +import { + createCommandClient, + getAccountId, + resolveAccountIdSilent, +} from "#lib/auth.js"; +import { compactBody, parseBody } from "#lib/body-parser.js"; +import { formatDryRun } from "#lib/dry-run.js"; +import { resolveFileToken } from "#lib/input-validation.js"; +import { LOCAL_ACCOUNT_ID } from "#lib/local.js"; +import { formatOutput } from "#lib/output.js"; +import { withProgress } from "#lib/progress.js"; +import { confirmDelete, promptForRequiredField } from "#lib/prompt.js"; +import { runWithTelemetry } from "#lib/telemetry/index.js"; + +function builder(yargs: Argv) { + return yargs + .usage( + "$0 realtime kit meetings participants tokens revoke \n\nRevokes a previously issued participant authentication token without deleting the participant. Other tokens issued to the participant remain valid." + ) + .positional("participant-id", { + type: "string", + description: + "ID of the participant. You can fetch the participant ID using the add a participant API.", + demandOption: true, + }) + .option("app-id", { + type: "string", + description: "The app identifier tag.", + demandOption: true, + }) + .option("meeting-id", { + type: "string", + description: + "ID of the meeting. You can fetch the meeting ID using the create a meeting API.", + demandOption: true, + }) + .option("token", { + type: "string", + description: "The participant authentication token to revoke.", + }) + .option("dry-run", { + type: "boolean", + description: "Validate and show what would happen without executing", + default: false, + }) + .option("force", { + type: "boolean", + alias: "f", + description: "Skip confirmation (useful in scripts and CI)", + default: false, + }) + .option("body", { + type: "string", + description: "Raw JSON request body (bypasses individual flags)", + }); +} + +type Args = InferArgs; + +const command: CommandModule = { + command: "revoke ", + describe: "Revoke participant's authentication token", + builder, + handler: async (argv): Promise => + runWithTelemetry( + { + command: "realtime kit meetings participants tokens revoke", + classification: { + safeFlags: ["dry-run", "force"], + shortFlagAliases: { f: { canonical: "force", type: "boolean" } }, + } satisfies ArgClassification, + }, + argv as Record, + async () => { + if (argv.dryRun) { + const __cfDryRunAccountId = await resolveAccountIdSilent(); + formatDryRun({ + command: "cf realtime kit meetings participants tokens revoke", + method: "DELETE", + url: `https://api.cloudflare.com/client/v4/accounts/${__cfDryRunAccountId ?? ""}/realtime/kit/${argv["app-id"] == null ? "" : encodeURIComponent(String(argv["app-id"]))}/meetings/${argv["meeting-id"] == null ? "" : encodeURIComponent(String(argv["meeting-id"]))}/participants/${argv["participant-id"] == null ? "" : encodeURIComponent(String(argv["participant-id"]))}/token`, + pathParams: { + "app-id": String(argv["app-id"] ?? ""), + "meeting-id": String(argv["meeting-id"] ?? ""), + "participant-id": String(argv["participant-id"] ?? ""), + }, + bodyKind: "json", + body: + argv.body !== undefined + ? parseBody(argv.body) + : compactBody({ + token: resolveFileToken( + argv["token"] as string | undefined, + "token", + "text" + ), + }), + sensitiveBodyPaths: [["token"]], + }); + return; + } + const client = await createCommandClient(argv); + const accountId = argv.local ? LOCAL_ACCOUNT_ID : await getAccountId(); + argv.accountId = accountId; + + if (!(await confirmDelete({ force: Boolean(argv.force) }))) { + return; + } + + if (argv.body) { + const bodyData = parseBody(argv.body); + const result = await withProgress(`Deleting`, async () => + client.send(operation, { + body: bodyData, + account_id: accountId, + app_id: argv["app-id"], + meeting_id: argv["meeting-id"], + participant_id: argv["participant-id"], + }) + ); + formatOutput(result, { successLabel: `Deleted` }); + return; + } + if (argv["token"] === undefined) { + argv["token"] = await promptForRequiredField( + "token", + "The participant authentication token to revoke.", + { kind: "secret" } + ); + } + + // Assemble request body from individual flags + const bodyData = compactBody({ + token: resolveFileToken( + argv["token"] as string | undefined, + "token", + "text" + ), + }); + const result = await withProgress(`Deleting`, async () => + client.send(operation, { + body: bodyData, + account_id: accountId, + app_id: argv["app-id"], + meeting_id: argv["meeting-id"], + participant_id: argv["participant-id"], + }) + ); + formatOutput(result, { successLabel: `Deleted` }); + } + ), +}; + +export default command; diff --git a/packages/cli/src/commands/_generated/workers/versions/profile.ts b/packages/cli/src/commands/_generated/workers/versions/profile.ts index 50be6f9808..88d17e9987 100644 --- a/packages/cli/src/commands/_generated/workers/versions/profile.ts +++ b/packages/cli/src/commands/_generated/workers/versions/profile.ts @@ -38,7 +38,7 @@ function builder(yargs: Argv) { .option("actor-id", { type: "string", description: - "Identifies the exact Durable Object actor to profile. Must be specified together with namespace_id. The actor must currently be active and running the requested Worker version.", + "Identifies the exact Durable Object actor to profile. Must be specified together with namespace_id. The actor must currently be active and running the requested version.", }) .option("duration-ms", { type: "number", diff --git a/packages/cli/src/commands/_generated/zero-trust/casb/findings/export.ts b/packages/cli/src/commands/_generated/zero-trust/casb/findings/export.ts index 5f0f0a9609..156cd8c3b8 100644 --- a/packages/cli/src/commands/_generated/zero-trust/casb/findings/export.ts +++ b/packages/cli/src/commands/_generated/zero-trust/casb/findings/export.ts @@ -49,6 +49,12 @@ function builder(yargs: Argv) { description: "Which fields to use when ordering the findings. Provide as a JSON array of objects or @path/to/file.json.", }) + .option("product", { + type: "string", + description: "Filter by finding's category product.", + choices: ["SaaS", "Cloud"], + }) + .coerce("product", (value) => resolveFileToken(value, "product", "text")) .option("search", { type: "string", description: "A search term." }) .option("severities", { type: "string", @@ -82,7 +88,7 @@ const command: CommandModule = { { command: "zero-trust casb findings export", classification: { - safeFlags: ["ignored", "dry-run"], + safeFlags: ["ignored", "product", "dry-run"], } satisfies ArgClassification, }, argv as Record, @@ -112,6 +118,7 @@ const command: CommandModule = { "text" ), orders: parseObjectArray(argv["orders"], "orders"), + product: argv["product"], search: resolveFileToken( argv["search"] as string | undefined, "search", @@ -151,6 +158,7 @@ const command: CommandModule = { "text" ), orders: parseObjectArray(argv["orders"], "orders"), + product: argv["product"], search: resolveFileToken( argv["search"] as string | undefined, "search",