@forge/util
2.0.12.0.1-experimental-7890858
packages/ari/chunk-RUOPP3YK.mjs+
packages/ari/chunk-RUOPP3YK.mjsNew file+68
Index: package/packages/ari/chunk-RUOPP3YK.mjs
===================================================================
--- package/packages/ari/chunk-RUOPP3YK.mjs
+++ package/packages/ari/chunk-RUOPP3YK.mjs
@@ -0,0 +1,68 @@
+import {
+ RovoAgentAriResourceOwner,
+ RovoAgentAriResourceType
+} from "./chunk-AM7JQZBA.mjs";
+import {
+ RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+ AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/rovo/agent/manifest.ts
+var rovoAgentAriStaticOpts = {
+ qualifier: "ari",
+ platformQualifier: "cloud",
+ cloudId: new RegExp("^$"),
+ resourceOwner: RovoAgentAriResourceOwner,
+ resourceType: RovoAgentAriResourceType,
+ resourceIdSlug: "activation/{activationId}/{agentId}",
+ resourceIdSegmentFormats: {
+ activationId: /[a-zA-Z0-9\-]+/,
+ // eslint-disable-line no-useless-escape
+ agentId: /[a-zA-Z0-9\-]+/
+ // eslint-disable-line no-useless-escape
+ }
+};
+
+// src/rovo/agent/index.ts
+var RovoAgentAri = class _RovoAgentAri extends RegisteredAri {
+ constructor(opts) {
+ super(opts), this._activationId = opts.resourceIdSegmentValues.activationId, this._agentId = opts.resourceIdSegmentValues.agentId;
+ }
+ get activationId() {
+ return this._activationId;
+ }
+ get agentId() {
+ return this._agentId;
+ }
+ static create(opts) {
+ let derivedOpts = {
+ qualifier: rovoAgentAriStaticOpts.qualifier,
+ platformQualifier: rovoAgentAriStaticOpts.platformQualifier,
+ cloudId: void 0,
+ resourceOwner: rovoAgentAriStaticOpts.resourceOwner,
+ resourceType: rovoAgentAriStaticOpts.resourceType,
+ resourceId: `activation/${opts.activationId}/${opts.agentId}`,
+ resourceIdSegmentValues: {
+ activationId: opts.activationId,
+ agentId: opts.agentId
+ }
+ }, ariOpts = AriParser.fromOpts(derivedOpts, rovoAgentAriStaticOpts);
+ return new _RovoAgentAri(ariOpts);
+ }
+ static parse(maybeAri) {
+ let opts = AriParser.fromString(maybeAri, rovoAgentAriStaticOpts);
+ return new _RovoAgentAri(opts);
+ }
+ getVariables() {
+ return {
+ activationId: this.activationId,
+ agentId: this.agentId
+ };
+ }
+};
+
+export {
+ RovoAgentAri
+};