appcenter-cli
Version:
Command line tool for Visual Studio App Center
136 lines (135 loc) • 5.2 kB
JavaScript
;
/*
* 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.AppleMappingImpl = void 0;
const coreClient = require("@azure/core-client");
const Mappers = require("../models/mappers");
const Parameters = require("../models/parameters");
/** Class containing AppleMapping operations. */
class AppleMappingImpl {
/**
* Initialize a new instance of the class AppleMapping class.
* @param client Reference to the service client
*/
constructor(client) {
this.client = client;
}
/**
* Fetch all apple test flight groups
* @param ownerName The name of the owner
* @param appName The name of the application
* @param options The options parameters.
*/
testFlightGroups(ownerName, appName, options) {
return this.client.sendOperationRequest({ ownerName, appName, options }, testFlightGroupsOperationSpec);
}
/**
* Get mapping of apple app to an existing app in apple store.
* @param ownerName The name of the owner
* @param appName The name of the application
* @param options The options parameters.
*/
get(ownerName, appName, options) {
return this.client.sendOperationRequest({ ownerName, appName, options }, getOperationSpec);
}
/**
* Delete mapping of apple app to an existing app in apple store.
* @param ownerName The name of the owner
* @param appName The name of the application
* @param options The options parameters.
*/
delete(ownerName, appName, options) {
return this.client.sendOperationRequest({ ownerName, appName, options }, deleteOperationSpec);
}
/**
* Create a mapping for an existing app in apple store for the specified application.
* @param ownerName The name of the owner
* @param appName The name of the application
* @param body The apple app mapping object
* @param options The options parameters.
*/
create(ownerName, appName, body, options) {
return this.client.sendOperationRequest({ ownerName, appName, body, options }, createOperationSpec);
}
}
exports.AppleMappingImpl = AppleMappingImpl;
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const testFlightGroupsOperationSpec = {
path: "/v0.1/apps/{owner_name}/{app_name}/apple_test_flight_groups",
httpMethod: "GET",
responses: {
200: {
bodyMapper: {
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "PathsZew5JgV01AppsOwnerNameAppNameAppleTestFlightGroupsGetResponses200ContentApplicationJsonSchemaItems"
}
}
}
}
},
default: {
bodyMapper: Mappers.Paths11QoktgV01AppsOwnerNameAppNameAppleTestFlightGroupsGetResponsesDefaultContentApplicationJsonSchema
}
},
urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName],
headerParameters: [Parameters.accept],
serializer
};
const getOperationSpec = {
path: "/v0.1/apps/{owner_name}/{app_name}/apple_mapping",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.PathsH96V4UV01AppsOwnerNameAppNameAppleMappingGetResponses200ContentApplicationJsonSchema
},
default: {
bodyMapper: Mappers.PathsU1IachV01AppsOwnerNameAppNameAppleMappingGetResponsesDefaultContentApplicationJsonSchema
}
},
urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName],
headerParameters: [Parameters.accept],
serializer
};
const deleteOperationSpec = {
path: "/v0.1/apps/{owner_name}/{app_name}/apple_mapping",
httpMethod: "DELETE",
responses: {
200: {},
default: {
bodyMapper: Mappers.Paths1F11J7YV01AppsOwnerNameAppNameAppleMappingDeleteResponsesDefaultContentApplicationJsonSchema
}
},
requestBody: Parameters.body8,
urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName],
headerParameters: [Parameters.contentType, Parameters.accept],
mediaType: "json",
serializer
};
const createOperationSpec = {
path: "/v0.1/apps/{owner_name}/{app_name}/apple_mapping",
httpMethod: "POST",
responses: {
201: {
bodyMapper: Mappers.Paths1J6Tdl2V01AppsOwnerNameAppNameAppleMappingPostResponses201ContentApplicationJsonSchema
},
default: {
bodyMapper: Mappers.PathsRxnoxxV01AppsOwnerNameAppNameAppleMappingPostResponsesDefaultContentApplicationJsonSchema
}
},
requestBody: Parameters.body12,
urlParameters: [Parameters.$host, Parameters.ownerName, Parameters.appName],
headerParameters: [Parameters.contentType, Parameters.accept],
mediaType: "json",
serializer
};