cloudflare
Version:
The official TypeScript library for the Cloudflare API
35 lines • 1.25 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.URLs = exports.BaseURLs = void 0;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
const resource_1 = require("../../core/resource.js");
const path_1 = require("../../internal/utils/path.js");
var BaseURLs = /* @__PURE__ */ (() => {
class BaseURLs extends resource_1.APIResource {
/**
* Retrieves the endpoint URL for an AI Gateway.
*
* @example
* ```ts
* const url = await client.aiGateway.urls.get('workers-ai', {
* account_id: '0d37909e38d3e99c29fa2cd343ac421a',
* gateway_id: 'my-gateway',
* });
* ```
*/
get(provider, params, options) {
const { account_id, gateway_id } = params;
return this._client.get((0, path_1.path) `/accounts/${account_id}/ai-gateway/gateways/${gateway_id}/url/${provider}`, options)._thenUnwrap((obj) => obj.result);
}
}
BaseURLs._key = Object.freeze([
'aiGateway',
'urls',
]);
return BaseURLs;
})();
exports.BaseURLs = BaseURLs;
class URLs extends BaseURLs {
}
exports.URLs = URLs;
//# sourceMappingURL=urls.js.map