/*! * Copyright Adaptavist 2022 (c) All rights reserved */ import { IssueAsResponse } from "../definitions/IssueAsResponse"; import { BasicErrorAsResponse } from "../definitions/BasicErrorAsResponse"; import { ErrorStrategyOption } from "../errorStrategy"; import { HeadersOption } from "@managed-api/commons-core"; import { ValidationErrorAsResponse } from "../definitions/ValidationErrorAsResponse"; export interface GetIssuesForAuthenticatedUserRequest extends HeadersOption, ErrorStrategyOption { /** * Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ filter?: "assigned" | "created" | "mentioned" | "subscribed" | "repos" | "all"; /** * Indicates the state of the issues to return. */ state?: "open" | "closed" | "all"; /** * A list of comma separated label names. Example: `bug,ui,@high` */ labels?: string; /** * What to sort results by. */ sort?: "created" | "updated" | "comments"; /** * The direction to sort the results by. */ direction?: "asc" | "desc"; /** * Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ since?: string; /** * The number of results per page (max 100). */ per_page?: number; /** * Page number of the results to fetch. */ page?: number; } declare type GetIssuesForAuthenticatedUserResponseOKType = Array; export interface GetIssuesForAuthenticatedUserResponseOK extends GetIssuesForAuthenticatedUserResponseOKType { } declare type GetIssuesForAuthenticatedUserResponseErrorType = BasicErrorAsResponse; export interface GetIssuesForAuthenticatedUserResponseError extends GetIssuesForAuthenticatedUserResponseErrorType { } export interface GetOrganizationIssuesForAuthenticatedUserRequest extends HeadersOption, ErrorStrategyOption { /** * The organization name. The name is not case sensitive. */ org: string; /** * Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ filter?: "assigned" | "created" | "mentioned" | "subscribed" | "repos" | "all"; /** * Indicates the state of the issues to return. */ state?: "open" | "closed" | "all"; /** * A list of comma separated label names. Example: `bug,ui,@high` */ labels?: string; /** * What to sort results by. */ sort?: "created" | "updated" | "comments"; /** * The direction to sort the results by. */ direction?: "asc" | "desc"; /** * Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ since?: string; /** * The number of results per page (max 100). */ per_page?: number; /** * Page number of the results to fetch. */ page?: number; } declare type GetOrganizationIssuesForAuthenticatedUserResponseOKType = Array; export interface GetOrganizationIssuesForAuthenticatedUserResponseOK extends GetOrganizationIssuesForAuthenticatedUserResponseOKType { } declare type GetOrganizationIssuesForAuthenticatedUserResponseErrorType = BasicErrorAsResponse; export interface GetOrganizationIssuesForAuthenticatedUserResponseError extends GetOrganizationIssuesForAuthenticatedUserResponseErrorType { } export interface GetRepositoryIssuesRequest extends HeadersOption, ErrorStrategyOption { /** * The account owner of the repository. The name is not case sensitive. */ owner: string; /** * The name of the repository. The name is not case sensitive. */ repo: string; /** * If an `integer` is passed, it should refer to a milestone by its `number` field. If the string `*` is passed, issues with any milestone are accepted. If the string `none` is passed, issues without milestones are returned. */ milestone?: string; /** * Indicates the state of the issues to return. */ state?: "open" | "closed" | "all"; /** * Can be the name of a user. Pass in `none` for issues with no assigned user, and `*` for issues assigned to any user. */ assignee?: string; /** * The user that created the issue. */ creator?: string; /** * A user that's mentioned in the issue. */ mentioned?: string; /** * A list of comma separated label names. Example: `bug,ui,@high` */ labels?: string; /** * What to sort results by. */ sort?: "created" | "updated" | "comments"; /** * The direction to sort the results by. */ direction?: "asc" | "desc"; /** * Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ since?: string; /** * The number of results per page (max 100). */ per_page?: number; /** * Page number of the results to fetch. */ page?: number; } declare type GetRepositoryIssuesResponseOKType = Array; export interface GetRepositoryIssuesResponseOK extends GetRepositoryIssuesResponseOKType { } declare type GetRepositoryIssuesResponseErrorType = BasicErrorAsResponse & BasicErrorAsResponse & ValidationErrorAsResponse; export interface GetRepositoryIssuesResponseError extends GetRepositoryIssuesResponseErrorType { } export interface CreateIssueRequest extends HeadersOption, ErrorStrategyOption { /** * The account owner of the repository. The name is not case sensitive. */ owner: string; /** * The name of the repository. The name is not case sensitive. */ repo: string; body: { /** * The title of the issue. */ title: string | number; /** * The contents of the issue. */ body?: string; /** * Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_ */ assignee?: string | null; milestone?: string | number; /** * Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ */ labels?: Array; /** * Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ assignees?: Array; }; } declare type CreateIssueResponseOKType = IssueAsResponse; export interface CreateIssueResponseOK extends CreateIssueResponseOKType { } declare type CreateIssueResponseErrorType = BasicErrorAsResponse & BasicErrorAsResponse & BasicErrorAsResponse & ValidationErrorAsResponse & { code?: string; message?: string; documentation_url?: string; }; export interface CreateIssueResponseError extends CreateIssueResponseErrorType { } export interface GetIssueRequest extends HeadersOption, ErrorStrategyOption { /** * The account owner of the repository. The name is not case sensitive. */ owner: string; /** * The name of the repository. The name is not case sensitive. */ repo: string; /** * The number that identifies the issue. */ issue_number: number; } declare type GetIssueResponseOKType = IssueAsResponse; export interface GetIssueResponseOK extends GetIssueResponseOKType { } declare type GetIssueResponseErrorType = BasicErrorAsResponse & BasicErrorAsResponse & BasicErrorAsResponse; export interface GetIssueResponseError extends GetIssueResponseErrorType { } export interface UpdateIssueRequest extends HeadersOption, ErrorStrategyOption { /** * The account owner of the repository. The name is not case sensitive. */ owner: string; /** * The name of the repository. The name is not case sensitive. */ repo: string; /** * The number that identifies the issue. */ issue_number: number; body: { /** * The title of the issue. */ title?: string | number; /** * The contents of the issue. */ body?: string | null; /** * Username to assign to this issue. **This field is deprecated.** */ assignee?: string | null; /** * The open or closed state of the issue. */ state?: "open" | "closed"; /** * The reason for the state change. Ignored unless `state` is changed. */ state_reason?: string | null; milestone?: string | number; /** * Labels to associate with this issue. Pass one or more labels to _replace_ the set of labels on this issue. Send an empty array (`[]`) to clear all labels from the issue. Only users with push access can set labels for issues. Without push access to the repository, label changes are silently dropped. */ labels?: Array; /** * Usernames to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this issue. Send an empty array (`[]`) to clear all assignees from the issue. Only users with push access can set assignees for new issues. Without push access to the repository, assignee changes are silently dropped. */ assignees?: Array; }; } declare type UpdateIssueResponseOKType = IssueAsResponse; export interface UpdateIssueResponseOK extends UpdateIssueResponseOKType { } declare type UpdateIssueResponseErrorType = BasicErrorAsResponse & BasicErrorAsResponse & BasicErrorAsResponse & BasicErrorAsResponse & ValidationErrorAsResponse & { code?: string; message?: string; documentation_url?: string; }; export interface UpdateIssueResponseError extends UpdateIssueResponseErrorType { } export interface LockIssueRequest extends HeadersOption, ErrorStrategyOption { /** * The account owner of the repository. The name is not case sensitive. */ owner: string; /** * The name of the repository. The name is not case sensitive. */ repo: string; /** * The number that identifies the issue. */ issue_number: number; body: { /** * The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: * `off-topic` * `too heated` * `resolved` * `spam` */ lock_reason?: "off-topic" | "too heated" | "resolved" | "spam"; } | null; } export declare type LockIssueResponseOK = undefined; declare type LockIssueResponseErrorType = BasicErrorAsResponse & BasicErrorAsResponse & BasicErrorAsResponse & ValidationErrorAsResponse; export interface LockIssueResponseError extends LockIssueResponseErrorType { } export interface UnlockIssueRequest extends HeadersOption, ErrorStrategyOption { /** * The account owner of the repository. The name is not case sensitive. */ owner: string; /** * The name of the repository. The name is not case sensitive. */ repo: string; /** * The number that identifies the issue. */ issue_number: number; } export declare type UnlockIssueResponseOK = undefined; declare type UnlockIssueResponseErrorType = BasicErrorAsResponse & BasicErrorAsResponse; export interface UnlockIssueResponseError extends UnlockIssueResponseErrorType { } export {}; //# sourceMappingURL=issue.d.ts.map