appcenter-cli
Version:
Command line tool for Visual Studio App Center
245 lines (244 loc) • 9.37 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.StoreReleasesImpl = void 0;
const coreClient = require("@azure/core-client");
const Mappers = require("../models/mappers");
const Parameters = require("../models/parameters");
/** Class containing StoreReleases operations. */
class StoreReleasesImpl {
/**
* Initialize a new instance of the class StoreReleases class.
* @param client Reference to the service client
*/
constructor(client) {
this.client = client;
}
/**
* Return the Real time Status publishing of release from store.
* @param storeName The name of the store
* @param releaseId The id of the release
* @param ownerName The name of the owner
* @param appName The name of the application
* @param options The options parameters.
*/
getRealTimeStatusByReleaseId(storeName, releaseId, ownerName, appName, options) {
return this.client.sendOperationRequest({ storeName, releaseId, ownerName, appName, options }, getRealTimeStatusByReleaseIdOperationSpec);
}
/**
* Return the Error Details of release which failed in publishing.
* @param storeName The name of the store
* @param releaseId The id of the release
* @param ownerName The name of the owner
* @param appName The name of the application
* @param options The options parameters.
*/
getPublishError(storeName, releaseId, ownerName, appName, options) {
return this.client.sendOperationRequest({ storeName, releaseId, ownerName, appName, options }, getPublishErrorOperationSpec);
}
/**
* Return releases published in a store for releaseId and storeId
* @param storeName The name of the store
* @param releaseId The name of the store
* @param ownerName The name of the owner
* @param appName The name of the application
* @param options The options parameters.
*/
get(storeName, releaseId, ownerName, appName, options) {
return this.client.sendOperationRequest({ storeName, releaseId, ownerName, appName, options }, getOperationSpec);
}
/**
* delete the release with release Id
* @param storeName The name of the store
* @param releaseId The id of the release
* @param ownerName The name of the owner
* @param appName The name of the application
* @param options The options parameters.
*/
delete(storeName, releaseId, ownerName, appName, options) {
return this.client.sendOperationRequest({ storeName, releaseId, ownerName, appName, options }, deleteOperationSpec);
}
/**
* Return all releases published in a store
* @param storeName The name of the store
* @param ownerName The name of the owner
* @param appName The name of the application
* @param options The options parameters.
*/
list(storeName, ownerName, appName, options) {
return this.client.sendOperationRequest({ storeName, ownerName, appName, options }, listOperationSpec);
}
/**
* Returns the latest release published in a store.
* @param storeName The name of the store
* @param ownerName The name of the owner
* @param appName The name of the application
* @param options The options parameters.
*/
getLatest(storeName, ownerName, appName, options) {
return this.client.sendOperationRequest({ storeName, ownerName, appName, options }, getLatestOperationSpec);
}
}
exports.StoreReleasesImpl = StoreReleasesImpl;
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const getRealTimeStatusByReleaseIdOperationSpec = {
path: "/v0.1/apps/{owner_name}/{app_name}/distribution_stores/{store_name}/releases/{release_id}/realtimestatus",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.PathsHaqcuV01AppsOwnerNameAppNameDistributionStoresStoreNameReleasesReleaseIdRealtimestatusGetResponses200ContentApplicationJsonSchema
},
default: {
bodyMapper: Mappers.PathsVb34MV01AppsOwnerNameAppNameDistributionStoresStoreNameReleasesReleaseIdRealtimestatusGetResponsesDefaultContentApplicationJsonSchema
}
},
urlParameters: [
Parameters.$host,
Parameters.ownerName,
Parameters.appName,
Parameters.storeName,
Parameters.releaseId3
],
headerParameters: [Parameters.accept],
serializer
};
const getPublishErrorOperationSpec = {
path: "/v0.1/apps/{owner_name}/{app_name}/distribution_stores/{store_name}/releases/{release_id}/publish_error_details",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.PathsAk7Qf9V01AppsOwnerNameAppNameDistributionStoresStoreNameReleasesReleaseIdPublishErrorDetailsGetResponses200ContentApplicationJsonSchema
},
default: {
bodyMapper: Mappers.Paths1S5Ty9V01AppsOwnerNameAppNameDistributionStoresStoreNameReleasesReleaseIdPublishErrorDetailsGetResponsesDefaultContentApplicationJsonSchema
}
},
urlParameters: [
Parameters.$host,
Parameters.ownerName,
Parameters.appName,
Parameters.storeName,
Parameters.releaseId3
],
headerParameters: [Parameters.accept],
serializer
};
const getOperationSpec = {
path: "/v0.1/apps/{owner_name}/{app_name}/distribution_stores/{store_name}/releases/{release_id}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: {
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "Paths16Kcv4PV01AppsOwnerNameAppNameDistributionStoresStoreNameReleasesReleaseIdGetResponses200ContentApplicationJsonSchemaItems"
}
}
}
}
},
default: {
bodyMapper: Mappers.PathsMk8Dv4V01AppsOwnerNameAppNameDistributionStoresStoreNameReleasesReleaseIdGetResponsesDefaultContentApplicationJsonSchema
}
},
urlParameters: [
Parameters.$host,
Parameters.releaseId,
Parameters.ownerName,
Parameters.appName,
Parameters.storeName
],
headerParameters: [Parameters.accept],
serializer
};
const deleteOperationSpec = {
path: "/v0.1/apps/{owner_name}/{app_name}/distribution_stores/{store_name}/releases/{release_id}",
httpMethod: "DELETE",
responses: {
204: {},
default: {
bodyMapper: Mappers.PathsFj6ZdaV01AppsOwnerNameAppNameDistributionStoresStoreNameReleasesReleaseIdDeleteResponsesDefaultContentApplicationJsonSchema
}
},
requestBody: Parameters.body8,
urlParameters: [
Parameters.$host,
Parameters.releaseId,
Parameters.ownerName,
Parameters.appName,
Parameters.storeName
],
headerParameters: [Parameters.contentType, Parameters.accept],
mediaType: "json",
serializer
};
const listOperationSpec = {
path: "/v0.1/apps/{owner_name}/{app_name}/distribution_stores/{store_name}/releases",
httpMethod: "GET",
responses: {
200: {
bodyMapper: {
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "PathsWia9WV01AppsOwnerNameAppNameDistributionStoresStoreNameReleasesGetResponses200ContentApplicationJsonSchemaItems"
}
}
}
}
},
default: {
bodyMapper: Mappers.PathsWnkcq1V01AppsOwnerNameAppNameDistributionStoresStoreNameReleasesGetResponsesDefaultContentApplicationJsonSchema
}
},
urlParameters: [
Parameters.$host,
Parameters.ownerName,
Parameters.appName,
Parameters.storeName
],
headerParameters: [Parameters.accept],
serializer
};
const getLatestOperationSpec = {
path: "/v0.1/apps/{owner_name}/{app_name}/distribution_stores/{store_name}/latest_release",
httpMethod: "GET",
responses: {
200: {
bodyMapper: {
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "PathsT560UdV01AppsOwnerNameAppNameDistributionStoresStoreNameLatestReleaseGetResponses200ContentApplicationJsonSchemaItems"
}
}
}
}
},
default: {
bodyMapper: Mappers.Paths8Yjtv1V01AppsOwnerNameAppNameDistributionStoresStoreNameLatestReleaseGetResponsesDefaultContentApplicationJsonSchema
}
},
urlParameters: [
Parameters.$host,
Parameters.ownerName,
Parameters.appName,
Parameters.storeName
],
headerParameters: [Parameters.accept],
serializer
};