/*! * Copyright Adaptavist 2022 (c) All rights reserved */ import { CodeSearchResultItemAsResponse } from "../definitions/CodeSearchResultItemAsResponse"; import { BasicErrorAsResponse } from "../definitions/BasicErrorAsResponse"; import { ValidationErrorAsResponse } from "../definitions/ValidationErrorAsResponse"; import { ErrorStrategyOption } from "../errorStrategy"; import { HeadersOption } from "@managed-api/commons-core"; import { CommitSearchResultItemAsResponse } from "../definitions/CommitSearchResultItemAsResponse"; import { IssueSearchResultItemAsResponse } from "../definitions/IssueSearchResultItemAsResponse"; import { LabelSearchResultItemAsResponse } from "../definitions/LabelSearchResultItemAsResponse"; import { RepoSearchResultItemAsResponse } from "../definitions/RepoSearchResultItemAsResponse"; import { TopicSearchResultItemAsResponse } from "../definitions/TopicSearchResultItemAsResponse"; import { UserSearchResultItemAsResponse } from "../definitions/UserSearchResultItemAsResponse"; export interface SearchCodeRequest extends HeadersOption, ErrorStrategyOption { /** * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching code](https://docs.github.com/search-github/searching-on-github/searching-code)" for a detailed list of qualifiers. */ q: string; /** * The number of results per page (max 100). */ per_page?: number; /** * Page number of the results to fetch. */ page?: number; } declare type SearchCodeResponseOKType = { total_count: number; incomplete_results: boolean; items: Array; }; export interface SearchCodeResponseOK extends SearchCodeResponseOKType { } declare type SearchCodeResponseErrorType = BasicErrorAsResponse & ValidationErrorAsResponse & { code?: string; message?: string; documentation_url?: string; }; export interface SearchCodeResponseError extends SearchCodeResponseErrorType { } export interface SearchCommitsRequest extends HeadersOption, ErrorStrategyOption { /** * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching commits](https://docs.github.com/search-github/searching-on-github/searching-commits)" for a detailed list of qualifiers. */ q: string; /** * Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ sort?: "author-date" | "committer-date"; /** * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ order?: "desc" | "asc"; /** * The number of results per page (max 100). */ per_page?: number; /** * Page number of the results to fetch. */ page?: number; } declare type SearchCommitsResponseOKType = { total_count: number; incomplete_results: boolean; items: Array; }; export interface SearchCommitsResponseOK extends SearchCommitsResponseOKType { } export declare type SearchCommitsResponseError = undefined; export interface SearchIssuesAndPullRequestsRequest extends HeadersOption, ErrorStrategyOption { /** * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching issues and pull requests](https://docs.github.com/search-github/searching-on-github/searching-issues-and-pull-requests)" for a detailed list of qualifiers. */ q: string; /** * Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ sort?: "comments" | "reactions" | "reactions-+1" | "reactions--1" | "reactions-smile" | "reactions-thinking_face" | "reactions-heart" | "reactions-tada" | "interactions" | "created" | "updated"; /** * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ order?: "desc" | "asc"; /** * The number of results per page (max 100). */ per_page?: number; /** * Page number of the results to fetch. */ page?: number; } declare type SearchIssuesAndPullRequestsResponseOKType = { total_count: number; incomplete_results: boolean; items: Array; }; export interface SearchIssuesAndPullRequestsResponseOK extends SearchIssuesAndPullRequestsResponseOKType { } declare type SearchIssuesAndPullRequestsResponseErrorType = BasicErrorAsResponse & ValidationErrorAsResponse & { code?: string; message?: string; documentation_url?: string; }; export interface SearchIssuesAndPullRequestsResponseError extends SearchIssuesAndPullRequestsResponseErrorType { } export interface SearchLabelsRequest extends HeadersOption, ErrorStrategyOption { /** * The id of the repository. */ repository_id: number; /** * The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). */ q: string; /** * Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ sort?: "created" | "updated"; /** * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ order?: "desc" | "asc"; /** * The number of results per page (max 100). */ per_page?: number; /** * Page number of the results to fetch. */ page?: number; } declare type SearchLabelsResponseOKType = { total_count: number; incomplete_results: boolean; items: Array; }; export interface SearchLabelsResponseOK extends SearchLabelsResponseOKType { } declare type SearchLabelsResponseErrorType = BasicErrorAsResponse & BasicErrorAsResponse & ValidationErrorAsResponse; export interface SearchLabelsResponseError extends SearchLabelsResponseErrorType { } export interface SearchRepositoriesRequest extends HeadersOption, ErrorStrategyOption { /** * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching for repositories](https://docs.github.com/articles/searching-for-repositories/)" for a detailed list of qualifiers. */ q: string; /** * Sorts the results of your query by number of `stars`, `forks`, or `help-wanted-issues` or how recently the items were `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ sort?: "stars" | "forks" | "help-wanted-issues" | "updated"; /** * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ order?: "desc" | "asc"; /** * The number of results per page (max 100). */ per_page?: number; /** * Page number of the results to fetch. */ page?: number; } declare type SearchRepositoriesResponseOKType = { total_count: number; incomplete_results: boolean; items: Array; }; export interface SearchRepositoriesResponseOK extends SearchRepositoriesResponseOKType { } declare type SearchRepositoriesResponseErrorType = ValidationErrorAsResponse & { code?: string; message?: string; documentation_url?: string; }; export interface SearchRepositoriesResponseError extends SearchRepositoriesResponseErrorType { } export interface SearchTopicsRequest extends HeadersOption, ErrorStrategyOption { /** * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). */ q: string; /** * The number of results per page (max 100). */ per_page?: number; /** * Page number of the results to fetch. */ page?: number; } declare type SearchTopicsResponseOKType = { total_count: number; incomplete_results: boolean; items: Array; }; export interface SearchTopicsResponseOK extends SearchTopicsResponseOKType { } export declare type SearchTopicsResponseError = undefined; export interface SearchUsersRequest extends HeadersOption, ErrorStrategyOption { /** * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching users](https://docs.github.com/search-github/searching-on-github/searching-users)" for a detailed list of qualifiers. */ q: string; /** * Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ sort?: "followers" | "repositories" | "joined"; /** * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ order?: "desc" | "asc"; /** * The number of results per page (max 100). */ per_page?: number; /** * Page number of the results to fetch. */ page?: number; } declare type SearchUsersResponseOKType = { total_count: number; incomplete_results: boolean; items: Array; }; export interface SearchUsersResponseOK extends SearchUsersResponseOKType { } declare type SearchUsersResponseErrorType = ValidationErrorAsResponse & { code?: string; message?: string; documentation_url?: string; }; export interface SearchUsersResponseError extends SearchUsersResponseErrorType { } export {}; //# sourceMappingURL=search.d.ts.map