appcenter-cli
Version:
Command line tool for Visual Studio App Center
71 lines (65 loc) • 1.98 kB
text/typescript
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { Invitations } from "../operationsInterfaces";
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
import { AppCenterClient } from "../appCenterClient";
import {
InvitationsSentOptionalParams,
InvitationsSentResponse
} from "../models";
/** Class containing Invitations operations. */
export class InvitationsImpl implements Invitations {
private readonly client: AppCenterClient;
/**
* Initialize a new instance of the class Invitations class.
* @param client Reference to the service client
*/
constructor(client: AppCenterClient) {
this.client = client;
}
/**
* Returns all invitations sent by the caller
* @param options The options parameters.
*/
sent(
options?: InvitationsSentOptionalParams
): Promise<InvitationsSentResponse> {
return this.client.sendOperationRequest({ options }, sentOperationSpec);
}
}
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const sentOperationSpec: coreClient.OperationSpec = {
path: "/v0.1/invitations/sent",
httpMethod: "GET",
responses: {
200: {
bodyMapper: {
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className:
"Paths1O7H121V01InvitationsSentGetResponses200ContentApplicationJsonSchemaItems"
}
}
}
}
},
default: {
bodyMapper:
Mappers.Paths1CtdoowV01InvitationsSentGetResponsesDefaultContentApplicationJsonSchema
}
},
urlParameters: [Parameters.$host],
headerParameters: [Parameters.accept],
serializer
};