UNPKG

@canonical/jujulib

Version:
145 lines (144 loc) 4.71 kB
/** Juju ApplicationOffers version 3. This facade is available on: Controller-machine-agent Machine-agent Unit-agent Controllers NOTE: This file was generated using the Juju schema from Juju 3.0-beta1 at the git SHA 61c87ab7e1. Do not manually edit this file. */ import { autoBind } from "../../utils.js"; /** OffersAPIV3 implements the cross model interface V3. */ class ApplicationOffersV3 { constructor(transport, info) { this.NAME = "ApplicationOffers"; this.VERSION = 3; 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: 3, 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: 3, 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: 3, params: params, }; this._transport.write(req, resolve, reject); }); } /** GetConsumeDetails returns the details necessary to pass to another model to allow the specified args user to consume the offers represented by the args URLs. */ getConsumeDetails(params) { return new Promise((resolve, reject) => { const req = { type: "ApplicationOffers", request: "GetConsumeDetails", version: 3, 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: 3, 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: 3, 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: 3, 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 Dashboard at this stage. */ remoteApplicationInfo(params) { return new Promise((resolve, reject) => { const req = { type: "ApplicationOffers", request: "RemoteApplicationInfo", version: 3, params: params, }; this._transport.write(req, resolve, reject); }); } } ApplicationOffersV3.NAME = "ApplicationOffers"; ApplicationOffersV3.VERSION = 3; export default ApplicationOffersV3; //# sourceMappingURL=ApplicationOffersV3.js.map