/** * @fileoverview Strict type definitions for Socket SDK v3. * AUTO-GENERATED from OpenAPI definitions using AST parsing - DO NOT EDIT MANUALLY. * These types provide better TypeScript DX by marking guaranteed fields as required * and only keeping truly optional fields as optional. * * Generated by: scripts/generate-strict-types.mjs */ /** * Options for create full scan. */ export type CreateFullScanOptions = { branch?: string | undefined; commit_hash?: string | undefined; commit_message?: string | undefined; committers?: string | undefined; integration_org_slug?: string | undefined; integration_type?: 'api' | 'github' | 'gitlab' | 'bitbucket' | 'azure' | 'web' | undefined; make_default_branch?: boolean | undefined; pathsRelativeTo?: string | undefined; pull_request?: number | undefined; repo: string; scan_type?: string | undefined; set_as_pending_head?: boolean | undefined; tmp?: boolean | undefined; workspace?: string | undefined; }; /** * Strict type for full scan item. */ export type FullScanItem = { api_url: string | null; branch?: string | null | undefined; commit_hash?: string | null | undefined; commit_message?: string | null | undefined; committers?: string[] | undefined; created_at: string; html_report_url: string; html_url?: string | null | undefined; id: string; integration_branch_url?: string | null | undefined; integration_commit_url?: string | null | undefined; integration_pull_request_url?: string | null | undefined; integration_repo_url: string; integration_type: string | null; organization_id: string; organization_slug: string; pull_request?: number | null | undefined; repo: string; repository_id: string; repository_slug: string; scan_state?: 'pending' | 'precrawl' | 'resolve' | 'scan' | null | undefined; scan_type?: string | null | undefined; updated_at: string; workspace?: string | undefined; }; /** * Strict type for full scan list data. */ export type FullScanListData = { nextPage?: number | null | undefined; nextPageCursor?: string | null | undefined; results: FullScanItem[]; }; /** * Options for get repository. */ export type GetRepositoryOptions = { workspace?: string | undefined; }; /** * Options for list full scans. */ export type ListFullScansOptions = { branch?: string | undefined; commit_hash?: string | undefined; direction?: 'asc' | 'desc' | undefined; from?: string | undefined; page?: number | undefined; per_page?: number | undefined; pull_request?: string | undefined; repo?: string | undefined; scan_type?: string | undefined; sort?: 'name' | 'created_at' | undefined; startAfterCursor?: string | undefined; use_cursor?: boolean | undefined; workspace?: string | undefined; }; /** * Options for list repositories. */ export type ListRepositoriesOptions = { direction?: string | undefined; include_archived?: boolean | undefined; page?: number | undefined; per_page?: number | undefined; sort?: string | undefined; workspace?: string | undefined; }; /** * Strict type for organization item. */ export type OrganizationItem = { id: string; image?: string | null | undefined; name?: string | null | undefined; plan: string; slug: string; }; /** * Strict type for repositories list data. */ export type RepositoriesListData = { nextPage?: number | null | undefined; results: RepositoryListItem[]; }; /** * Strict type for repository list item. */ export type RepositoryListItem = { archived: boolean; created_at: string; default_branch: string | null; description: string | null; head_full_scan_id: string | null; homepage: string | null; id: string; integration_meta?: { /** @enum {string} */ type?: 'github'; value?: { /** * @description The GitHub installation_id of the active associated Socket GitHub App * @default */ installation_id: string; /** * @description The GitHub login name that the active Socket GitHub App installation is installed to * @default */ installation_login: string; /** * @description The name of the associated GitHub repo. * @default */ repo_name: string | null; /** * @description The id of the associated GitHub repo. * @default */ repo_id: string | null; }; } | null | undefined; name: string; slug: string; updated_at: string; visibility: 'public' | 'private'; workspace: string; }; /** * Strict type for repository item. */ export type RepositoryItem = { archived: boolean; created_at: string; default_branch: string | null; description: string | null; head_full_scan_id: string | null; homepage: string | null; id: string; integration_meta: { /** @enum {string} */ type?: 'github'; value?: { /** * @description The GitHub installation_id of the active associated Socket GitHub App * @default */ installation_id: string; /** * @description The GitHub login name that the active Socket GitHub App installation is installed to * @default */ installation_login: string; /** * @description The name of the associated GitHub repo. * @default */ repo_name: string | null; /** * @description The id of the associated GitHub repo. * @default */ repo_id: string | null; }; } | null; name: string; slig: string; slug: string; updated_at: string; visibility: 'public' | 'private'; workspace: string; }; /** * Strict type for repository label item. */ export type RepositoryLabelItem = { has_license_policy?: boolean | undefined; has_security_policy?: boolean | undefined; id: string; name: string; repository_ids?: string[] | undefined; }; /** * Strict type for repository labels list data. */ export type RepositoryLabelsListData = { nextPage?: number | null | undefined; results: RepositoryLabelItem[]; }; /** * Error result type for all SDK operations. */ export type StrictErrorResult = { cause?: string | undefined; data?: undefined | undefined; error: string; status: number; success: false; }; /** * Generic strict result type combining success and error. */ export type StrictResult = { cause?: undefined | undefined; data: T; error?: undefined | undefined; status: number; success: true; } | StrictErrorResult; /** * Strict type for full scan list result. */ export type FullScanListResult = { cause?: undefined | undefined; data: FullScanListData; error?: undefined | undefined; status: number; success: true; }; /** * Strict type for single full scan result. */ export type FullScanResult = { cause?: undefined | undefined; data: FullScanItem; error?: undefined | undefined; status: number; success: true; }; /** * Options for streaming a full scan. */ export type StreamFullScanOptions = { output?: boolean | string | undefined; }; /** * Strict type for organizations list result. */ export type OrganizationsResult = { cause?: undefined | undefined; data: { organizations: OrganizationItem[]; }; error?: undefined | undefined; status: number; success: true; }; /** * Strict type for repositories list result. */ export type RepositoriesListResult = { cause?: undefined | undefined; data: RepositoriesListData; error?: undefined | undefined; status: number; success: true; }; /** * Strict type for delete operation result. */ export type DeleteResult = { cause?: undefined | undefined; data: { success: boolean; }; error?: undefined | undefined; status: number; success: true; }; /** * Strict type for single repository result. */ export type RepositoryResult = { cause?: undefined | undefined; data: RepositoryItem; error?: undefined | undefined; status: number; success: true; }; /** * Strict type for repository labels list result. */ export type RepositoryLabelsListResult = { cause?: undefined | undefined; data: RepositoryLabelsListData; error?: undefined | undefined; status: number; success: true; }; /** * Strict type for single repository label result. */ export type RepositoryLabelResult = { cause?: undefined | undefined; data: RepositoryLabelItem; error?: undefined | undefined; status: number; success: true; }; /** * Strict type for delete repository label result. */ export type DeleteRepositoryLabelResult = { cause?: undefined | undefined; data: { status: string; }; error?: undefined | undefined; status: number; success: true; };