UNPKG

@datadog/datadog-api-client

Version:

OpenAPI client for Datadog APIs

598 lines (597 loc) 23 kB
import { BaseAPIRequestFactory } from "../../datadog-api-client-common/baseapi"; import { Configuration } from "../../datadog-api-client-common/configuration"; import { RequestContext, ResponseContext } from "../../datadog-api-client-common/http/http"; import { AddMemberTeamRequest } from "../models/AddMemberTeamRequest"; import { GetTeamMembershipsSort } from "../models/GetTeamMembershipsSort"; import { ListTeamsInclude } from "../models/ListTeamsInclude"; import { ListTeamsSort } from "../models/ListTeamsSort"; import { Team } from "../models/Team"; import { TeamCreateRequest } from "../models/TeamCreateRequest"; import { TeamLinkCreateRequest } from "../models/TeamLinkCreateRequest"; import { TeamLinkResponse } from "../models/TeamLinkResponse"; import { TeamLinksResponse } from "../models/TeamLinksResponse"; import { TeamPermissionSettingResponse } from "../models/TeamPermissionSettingResponse"; import { TeamPermissionSettingsResponse } from "../models/TeamPermissionSettingsResponse"; import { TeamPermissionSettingUpdateRequest } from "../models/TeamPermissionSettingUpdateRequest"; import { TeamResponse } from "../models/TeamResponse"; import { TeamsField } from "../models/TeamsField"; import { TeamsResponse } from "../models/TeamsResponse"; import { TeamUpdateRequest } from "../models/TeamUpdateRequest"; import { UserTeam } from "../models/UserTeam"; import { UserTeamRequest } from "../models/UserTeamRequest"; import { UserTeamResponse } from "../models/UserTeamResponse"; import { UserTeamsResponse } from "../models/UserTeamsResponse"; import { UserTeamUpdateRequest } from "../models/UserTeamUpdateRequest"; export declare class TeamsApiRequestFactory extends BaseAPIRequestFactory { addMemberTeam(superTeamId: string, body: AddMemberTeamRequest, _options?: Configuration): Promise<RequestContext>; createTeam(body: TeamCreateRequest, _options?: Configuration): Promise<RequestContext>; createTeamLink(teamId: string, body: TeamLinkCreateRequest, _options?: Configuration): Promise<RequestContext>; createTeamMembership(teamId: string, body: UserTeamRequest, _options?: Configuration): Promise<RequestContext>; deleteTeam(teamId: string, _options?: Configuration): Promise<RequestContext>; deleteTeamLink(teamId: string, linkId: string, _options?: Configuration): Promise<RequestContext>; deleteTeamMembership(teamId: string, userId: string, _options?: Configuration): Promise<RequestContext>; getTeam(teamId: string, _options?: Configuration): Promise<RequestContext>; getTeamLink(teamId: string, linkId: string, _options?: Configuration): Promise<RequestContext>; getTeamLinks(teamId: string, _options?: Configuration): Promise<RequestContext>; getTeamMemberships(teamId: string, pageSize?: number, pageNumber?: number, sort?: GetTeamMembershipsSort, filterKeyword?: string, _options?: Configuration): Promise<RequestContext>; getTeamPermissionSettings(teamId: string, _options?: Configuration): Promise<RequestContext>; getUserMemberships(userUuid: string, _options?: Configuration): Promise<RequestContext>; listMemberTeams(superTeamId: string, pageSize?: number, pageNumber?: number, fieldsTeam?: Array<TeamsField>, _options?: Configuration): Promise<RequestContext>; listTeams(pageNumber?: number, pageSize?: number, sort?: ListTeamsSort, include?: Array<ListTeamsInclude>, filterKeyword?: string, filterMe?: boolean, fieldsTeam?: Array<TeamsField>, _options?: Configuration): Promise<RequestContext>; removeMemberTeam(superTeamId: string, memberTeamId: string, _options?: Configuration): Promise<RequestContext>; updateTeam(teamId: string, body: TeamUpdateRequest, _options?: Configuration): Promise<RequestContext>; updateTeamLink(teamId: string, linkId: string, body: TeamLinkCreateRequest, _options?: Configuration): Promise<RequestContext>; updateTeamMembership(teamId: string, userId: string, body: UserTeamUpdateRequest, _options?: Configuration): Promise<RequestContext>; updateTeamPermissionSetting(teamId: string, action: string, body: TeamPermissionSettingUpdateRequest, _options?: Configuration): Promise<RequestContext>; } export declare class TeamsApiResponseProcessor { /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to addMemberTeam * @throws ApiException if the response code was not in [200, 299] */ addMemberTeam(response: ResponseContext): Promise<void>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to createTeam * @throws ApiException if the response code was not in [200, 299] */ createTeam(response: ResponseContext): Promise<TeamResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to createTeamLink * @throws ApiException if the response code was not in [200, 299] */ createTeamLink(response: ResponseContext): Promise<TeamLinkResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to createTeamMembership * @throws ApiException if the response code was not in [200, 299] */ createTeamMembership(response: ResponseContext): Promise<UserTeamResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to deleteTeam * @throws ApiException if the response code was not in [200, 299] */ deleteTeam(response: ResponseContext): Promise<void>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to deleteTeamLink * @throws ApiException if the response code was not in [200, 299] */ deleteTeamLink(response: ResponseContext): Promise<void>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to deleteTeamMembership * @throws ApiException if the response code was not in [200, 299] */ deleteTeamMembership(response: ResponseContext): Promise<void>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getTeam * @throws ApiException if the response code was not in [200, 299] */ getTeam(response: ResponseContext): Promise<TeamResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getTeamLink * @throws ApiException if the response code was not in [200, 299] */ getTeamLink(response: ResponseContext): Promise<TeamLinkResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getTeamLinks * @throws ApiException if the response code was not in [200, 299] */ getTeamLinks(response: ResponseContext): Promise<TeamLinksResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getTeamMemberships * @throws ApiException if the response code was not in [200, 299] */ getTeamMemberships(response: ResponseContext): Promise<UserTeamsResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getTeamPermissionSettings * @throws ApiException if the response code was not in [200, 299] */ getTeamPermissionSettings(response: ResponseContext): Promise<TeamPermissionSettingsResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getUserMemberships * @throws ApiException if the response code was not in [200, 299] */ getUserMemberships(response: ResponseContext): Promise<UserTeamsResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to listMemberTeams * @throws ApiException if the response code was not in [200, 299] */ listMemberTeams(response: ResponseContext): Promise<TeamsResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to listTeams * @throws ApiException if the response code was not in [200, 299] */ listTeams(response: ResponseContext): Promise<TeamsResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to removeMemberTeam * @throws ApiException if the response code was not in [200, 299] */ removeMemberTeam(response: ResponseContext): Promise<void>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to updateTeam * @throws ApiException if the response code was not in [200, 299] */ updateTeam(response: ResponseContext): Promise<TeamResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to updateTeamLink * @throws ApiException if the response code was not in [200, 299] */ updateTeamLink(response: ResponseContext): Promise<TeamLinkResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to updateTeamMembership * @throws ApiException if the response code was not in [200, 299] */ updateTeamMembership(response: ResponseContext): Promise<UserTeamResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to updateTeamPermissionSetting * @throws ApiException if the response code was not in [200, 299] */ updateTeamPermissionSetting(response: ResponseContext): Promise<TeamPermissionSettingResponse>; } export interface TeamsApiAddMemberTeamRequest { /** * None * @type string */ superTeamId: string; /** * @type AddMemberTeamRequest */ body: AddMemberTeamRequest; } export interface TeamsApiCreateTeamRequest { /** * @type TeamCreateRequest */ body: TeamCreateRequest; } export interface TeamsApiCreateTeamLinkRequest { /** * None * @type string */ teamId: string; /** * @type TeamLinkCreateRequest */ body: TeamLinkCreateRequest; } export interface TeamsApiCreateTeamMembershipRequest { /** * None * @type string */ teamId: string; /** * @type UserTeamRequest */ body: UserTeamRequest; } export interface TeamsApiDeleteTeamRequest { /** * None * @type string */ teamId: string; } export interface TeamsApiDeleteTeamLinkRequest { /** * None * @type string */ teamId: string; /** * None * @type string */ linkId: string; } export interface TeamsApiDeleteTeamMembershipRequest { /** * None * @type string */ teamId: string; /** * None * @type string */ userId: string; } export interface TeamsApiGetTeamRequest { /** * None * @type string */ teamId: string; } export interface TeamsApiGetTeamLinkRequest { /** * None * @type string */ teamId: string; /** * None * @type string */ linkId: string; } export interface TeamsApiGetTeamLinksRequest { /** * None * @type string */ teamId: string; } export interface TeamsApiGetTeamMembershipsRequest { /** * None * @type string */ teamId: string; /** * Size for a given page. The maximum allowed value is 100. * @type number */ pageSize?: number; /** * Specific page number to return. * @type number */ pageNumber?: number; /** * Specifies the order of returned team memberships * @type GetTeamMembershipsSort */ sort?: GetTeamMembershipsSort; /** * Search query, can be user email or name * @type string */ filterKeyword?: string; } export interface TeamsApiGetTeamPermissionSettingsRequest { /** * None * @type string */ teamId: string; } export interface TeamsApiGetUserMembershipsRequest { /** * None * @type string */ userUuid: string; } export interface TeamsApiListMemberTeamsRequest { /** * None * @type string */ superTeamId: string; /** * Size for a given page. The maximum allowed value is 100. * @type number */ pageSize?: number; /** * Specific page number to return. * @type number */ pageNumber?: number; /** * List of fields that need to be fetched. * @type Array<TeamsField> */ fieldsTeam?: Array<TeamsField>; } export interface TeamsApiListTeamsRequest { /** * Specific page number to return. * @type number */ pageNumber?: number; /** * Size for a given page. The maximum allowed value is 100. * @type number */ pageSize?: number; /** * Specifies the order of the returned teams * @type ListTeamsSort */ sort?: ListTeamsSort; /** * Included related resources optionally requested. Allowed enum values: `team_links, user_team_permissions` * @type Array<ListTeamsInclude> */ include?: Array<ListTeamsInclude>; /** * Search query. Can be team name, team handle, or email of team member * @type string */ filterKeyword?: string; /** * When true, only returns teams the current user belongs to * @type boolean */ filterMe?: boolean; /** * List of fields that need to be fetched. * @type Array<TeamsField> */ fieldsTeam?: Array<TeamsField>; } export interface TeamsApiRemoveMemberTeamRequest { /** * None * @type string */ superTeamId: string; /** * None * @type string */ memberTeamId: string; } export interface TeamsApiUpdateTeamRequest { /** * None * @type string */ teamId: string; /** * @type TeamUpdateRequest */ body: TeamUpdateRequest; } export interface TeamsApiUpdateTeamLinkRequest { /** * None * @type string */ teamId: string; /** * None * @type string */ linkId: string; /** * @type TeamLinkCreateRequest */ body: TeamLinkCreateRequest; } export interface TeamsApiUpdateTeamMembershipRequest { /** * None * @type string */ teamId: string; /** * None * @type string */ userId: string; /** * @type UserTeamUpdateRequest */ body: UserTeamUpdateRequest; } export interface TeamsApiUpdateTeamPermissionSettingRequest { /** * None * @type string */ teamId: string; /** * None * @type string */ action: string; /** * @type TeamPermissionSettingUpdateRequest */ body: TeamPermissionSettingUpdateRequest; } export declare class TeamsApi { private requestFactory; private responseProcessor; private configuration; constructor(configuration: Configuration, requestFactory?: TeamsApiRequestFactory, responseProcessor?: TeamsApiResponseProcessor); /** * Add a member team. * Adds the team given by the `id` in the body as a member team of the super team. * @param param The request object */ addMemberTeam(param: TeamsApiAddMemberTeamRequest, options?: Configuration): Promise<void>; /** * Create a new team. * User IDs passed through the `users` relationship field are added to the team. * @param param The request object */ createTeam(param: TeamsApiCreateTeamRequest, options?: Configuration): Promise<TeamResponse>; /** * Add a new link to a team. * @param param The request object */ createTeamLink(param: TeamsApiCreateTeamLinkRequest, options?: Configuration): Promise<TeamLinkResponse>; /** * Add a user to a team. * @param param The request object */ createTeamMembership(param: TeamsApiCreateTeamMembershipRequest, options?: Configuration): Promise<UserTeamResponse>; /** * Remove a team using the team's `id`. * @param param The request object */ deleteTeam(param: TeamsApiDeleteTeamRequest, options?: Configuration): Promise<void>; /** * Remove a link from a team. * @param param The request object */ deleteTeamLink(param: TeamsApiDeleteTeamLinkRequest, options?: Configuration): Promise<void>; /** * Remove a user from a team. * @param param The request object */ deleteTeamMembership(param: TeamsApiDeleteTeamMembershipRequest, options?: Configuration): Promise<void>; /** * Get a single team using the team's `id`. * @param param The request object */ getTeam(param: TeamsApiGetTeamRequest, options?: Configuration): Promise<TeamResponse>; /** * Get a single link for a team. * @param param The request object */ getTeamLink(param: TeamsApiGetTeamLinkRequest, options?: Configuration): Promise<TeamLinkResponse>; /** * Get all links for a given team. * @param param The request object */ getTeamLinks(param: TeamsApiGetTeamLinksRequest, options?: Configuration): Promise<TeamLinksResponse>; /** * Get a paginated list of members for a team * @param param The request object */ getTeamMemberships(param: TeamsApiGetTeamMembershipsRequest, options?: Configuration): Promise<UserTeamsResponse>; /** * Provide a paginated version of getTeamMemberships returning a generator with all the items. */ getTeamMembershipsWithPagination(param: TeamsApiGetTeamMembershipsRequest, options?: Configuration): AsyncGenerator<UserTeam>; /** * Get all permission settings for a given team. * @param param The request object */ getTeamPermissionSettings(param: TeamsApiGetTeamPermissionSettingsRequest, options?: Configuration): Promise<TeamPermissionSettingsResponse>; /** * Get a list of memberships for a user * @param param The request object */ getUserMemberships(param: TeamsApiGetUserMembershipsRequest, options?: Configuration): Promise<UserTeamsResponse>; /** * Get all member teams. * @param param The request object */ listMemberTeams(param: TeamsApiListMemberTeamsRequest, options?: Configuration): Promise<TeamsResponse>; /** * Provide a paginated version of listMemberTeams returning a generator with all the items. */ listMemberTeamsWithPagination(param: TeamsApiListMemberTeamsRequest, options?: Configuration): AsyncGenerator<Team>; /** * Get all teams. * Can be used to search for teams using the `filter[keyword]` and `filter[me]` query parameters. * @param param The request object */ listTeams(param?: TeamsApiListTeamsRequest, options?: Configuration): Promise<TeamsResponse>; /** * Provide a paginated version of listTeams returning a generator with all the items. */ listTeamsWithPagination(param?: TeamsApiListTeamsRequest, options?: Configuration): AsyncGenerator<Team>; /** * Remove a super team's member team identified by `member_team_id`. * @param param The request object */ removeMemberTeam(param: TeamsApiRemoveMemberTeamRequest, options?: Configuration): Promise<void>; /** * Update a team using the team's `id`. * If the `team_links` relationship is present, the associated links are updated to be in the order they appear in the array, and any existing team links not present are removed. * @param param The request object */ updateTeam(param: TeamsApiUpdateTeamRequest, options?: Configuration): Promise<TeamResponse>; /** * Update a team link. * @param param The request object */ updateTeamLink(param: TeamsApiUpdateTeamLinkRequest, options?: Configuration): Promise<TeamLinkResponse>; /** * Update a user's membership attributes on a team. * @param param The request object */ updateTeamMembership(param: TeamsApiUpdateTeamMembershipRequest, options?: Configuration): Promise<UserTeamResponse>; /** * Update a team permission setting for a given team. * @param param The request object */ updateTeamPermissionSetting(param: TeamsApiUpdateTeamPermissionSettingRequest, options?: Configuration): Promise<TeamPermissionSettingResponse>; }