UNPKG

@canonical/jujulib

Version:

Juju API client

145 lines (144 loc) 4.67 kB
/** Juju ApplicationOffers version 2. This facade is available on: Controller-machine-agent Machine-agent Unit-agent Controllers NOTE: This file was generated using the Juju schema from Juju 2.8.2 at the git SHA 516c1904ce. Do not manually edit this file. */ import { autoBind } from "../../utils.js"; /** OffersAPIV2 implements the cross model interface V2. */ class ApplicationOffersV2 { constructor(transport, info) { this.NAME = "ApplicationOffers"; this.VERSION = 2; this._transport = transport; this._info = info; // Automatically bind all methods to instances. autoBind(this); } /** ApplicationOffers gets details about remote applications that match given URLs. */ applicationOffers(params) { return new Promise((resolve, reject) => { const req = { type: "ApplicationOffers", request: "ApplicationOffers", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** DestroyOffers removes the offers specified by the given URLs, forcing if necessary. */ destroyOffers(params) { return new Promise((resolve, reject) => { const req = { type: "ApplicationOffers", request: "DestroyOffers", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** FindApplicationOffers gets details about remote applications that match given filter. */ findApplicationOffers(params) { return new Promise((resolve, reject) => { const req = { type: "ApplicationOffers", request: "FindApplicationOffers", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** GetConsumeDetails returns the details necessary to pass to another model to consume the specified offers represented by the urls. */ getConsumeDetails(params) { return new Promise((resolve, reject) => { const req = { type: "ApplicationOffers", request: "GetConsumeDetails", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** ListApplicationOffers gets deployed details about application offers that match given filter. The results contain details about the deployed applications such as connection count. */ listApplicationOffers(params) { return new Promise((resolve, reject) => { const req = { type: "ApplicationOffers", request: "ListApplicationOffers", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** ModifyOfferAccess changes the application offer access granted to users. */ modifyOfferAccess(params) { return new Promise((resolve, reject) => { const req = { type: "ApplicationOffers", request: "ModifyOfferAccess", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** Offer makes application endpoints available for consumption at a specified URL. */ offer(params) { return new Promise((resolve, reject) => { const req = { type: "ApplicationOffers", request: "Offer", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** RemoteApplicationInfo returns information about the requested remote application. This call currently has no client side API, only there for the GUI at this stage. */ remoteApplicationInfo(params) { return new Promise((resolve, reject) => { const req = { type: "ApplicationOffers", request: "RemoteApplicationInfo", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } } ApplicationOffersV2.NAME = "ApplicationOffers"; ApplicationOffersV2.VERSION = 2; export default ApplicationOffersV2; //# sourceMappingURL=ApplicationOffersV2.js.map