From 3307aafffd0501b95bb71f7e2de6ee17b96c0f29 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 11 Jun 2024 16:58:01 +0200 Subject: [PATCH] fix(openapi): sync with openapi definition (#184) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- openapi.json | 131 +++++++++++++++++++++++++++++++++++++++++++++++++ types/api.d.ts | 128 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 259 insertions(+) diff --git a/openapi.json b/openapi.json index 38b9477..f248b39 100644 --- a/openapi.json +++ b/openapi.json @@ -8073,6 +8073,137 @@ "x-readme": {} } }, + "/orgs/{org_slug}/audit-log": { + "get": { + "tags": [ + "Audit Log" + ], + "summary": "Get Audit Log Events", + "operationId": "getAuditLogEvents", + "parameters": [ + { + "name": "org_slug", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "basicAuth": [ + "audit-log:list" + ] + } + ], + "description": "Paginated list of audit log events.\n\nThe `type` queryParam must be omitted or one of:\n\n- BookDemo\n- CancelInvitation\n- ChangeMemberRole\n- ChangePlanSubscriptionSeats\n- ContactForm\n- CreateApiToken\n- CreateUser\n- GithubAppInstallation\n- JoinOrganizationByVcs\n- LinkAccount\n- RemoveMember\n- ResetInvitationLink\n- ResetOrganizationSettingToDefault\n- RotateApiToken\n- SendInvitation\n- SignIn\n- SignOut\n- Subscribe\n- SyncOrganization\n- TransferOwnership\n- UpdateAlertTriage\n- UpdateApiTokenName\n- UpdateApiTokenScopes\n- UpdateApiTokenVisibility\n- UpdateOrganizationSetting\n- UpgradeOrganizationPlan\n- VerifiedEmail\n\nThis endpoint consumes 0 units of your quota.", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "properties": { + "results": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "event_id": { + "type": "string", + "default": "" + }, + "created_at": { + "type": "string", + "default": "" + }, + "updated_at": { + "type": "string", + "default": "" + }, + "country_code": { + "type": "string", + "default": "" + }, + "organization_id": { + "type": "string", + "default": "" + }, + "ip_address": { + "type": "string", + "default": "" + }, + "payload": { + "type": "object", + "default": null + }, + "status_code": { + "type": "integer", + "default": 0 + }, + "type": { + "type": "string", + "default": "" + }, + "user_agent": { + "type": "string", + "default": "" + }, + "user_id": { + "type": "string", + "default": "" + }, + "user_email": { + "type": "string", + "default": "" + }, + "user_image": { + "type": "string", + "default": "" + }, + "organization_name": { + "type": "string", + "default": "" + } + } + } + }, + "nextPage": { + "type": "integer", + "default": 0 + } + }, + "required": [ + "nextPage", + "results" + ] + } + } + }, + "description": "The paginated list of events in an organizations audit log and the next page querystring token." + }, + "400": { + "$ref": "#/components/responses/SocketBadRequest" + }, + "401": { + "$ref": "#/components/responses/SocketUnauthorized" + }, + "403": { + "$ref": "#/components/responses/SocketForbidden" + }, + "404": { + "$ref": "#/components/responses/SocketNotFoundResponse" + }, + "429": { + "$ref": "#/components/responses/SocketTooManyRequestsResponse" + } + }, + "x-readme": {} + } + }, "/analytics/org/{filter}": { "get": { "tags": [ diff --git a/types/api.d.ts b/types/api.d.ts index 9b229cf..0b74ce4 100644 --- a/types/api.d.ts +++ b/types/api.d.ts @@ -260,6 +260,45 @@ export interface paths { */ get: operations["getOrgFullScanMetadata"]; }; + "/orgs/{org_slug}/audit-log": { + /** + * Get Audit Log Events + * @description Paginated list of audit log events. + * + * The `type` queryParam must be omitted or one of: + * + * - BookDemo + * - CancelInvitation + * - ChangeMemberRole + * - ChangePlanSubscriptionSeats + * - ContactForm + * - CreateApiToken + * - CreateUser + * - GithubAppInstallation + * - JoinOrganizationByVcs + * - LinkAccount + * - RemoveMember + * - ResetInvitationLink + * - ResetOrganizationSettingToDefault + * - RotateApiToken + * - SendInvitation + * - SignIn + * - SignOut + * - Subscribe + * - SyncOrganization + * - TransferOwnership + * - UpdateAlertTriage + * - UpdateApiTokenName + * - UpdateApiTokenScopes + * - UpdateApiTokenVisibility + * - UpdateOrganizationSetting + * - UpgradeOrganizationPlan + * - VerifiedEmail + * + * This endpoint consumes 0 units of your quota. + */ + get: operations["getAuditLogEvents"]; + }; "/analytics/org/{filter}": { /** * Get organization analytics (unstable) @@ -2883,6 +2922,95 @@ export interface operations { 429: components["responses"]["SocketTooManyRequestsResponse"]; }; }; + /** + * Get Audit Log Events + * @description Paginated list of audit log events. + * + * The `type` queryParam must be omitted or one of: + * + * - BookDemo + * - CancelInvitation + * - ChangeMemberRole + * - ChangePlanSubscriptionSeats + * - ContactForm + * - CreateApiToken + * - CreateUser + * - GithubAppInstallation + * - JoinOrganizationByVcs + * - LinkAccount + * - RemoveMember + * - ResetInvitationLink + * - ResetOrganizationSettingToDefault + * - RotateApiToken + * - SendInvitation + * - SignIn + * - SignOut + * - Subscribe + * - SyncOrganization + * - TransferOwnership + * - UpdateAlertTriage + * - UpdateApiTokenName + * - UpdateApiTokenScopes + * - UpdateApiTokenVisibility + * - UpdateOrganizationSetting + * - UpgradeOrganizationPlan + * - VerifiedEmail + * + * This endpoint consumes 0 units of your quota. + */ + getAuditLogEvents: { + parameters: { + path: { + org_slug: string; + }; + }; + responses: { + /** @description The paginated list of events in an organizations audit log and the next page querystring token. */ + 200: { + content: { + "application/json": { + results: { + /** @default */ + event_id?: string; + /** @default */ + created_at?: string; + /** @default */ + updated_at?: string; + /** @default */ + country_code?: string; + /** @default */ + organization_id?: string; + /** @default */ + ip_address?: string; + /** @default null */ + payload?: Record; + /** @default 0 */ + status_code?: number; + /** @default */ + type?: string; + /** @default */ + user_agent?: string; + /** @default */ + user_id?: string; + /** @default */ + user_email?: string; + /** @default */ + user_image?: string; + /** @default */ + organization_name?: string; + }[]; + /** @default 0 */ + nextPage: number; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** * Get organization analytics (unstable) * @description Get analytics data regarding the number of alerts found across all active repositories.