@forge/util

2.0.12.0.1-experimental-7890858
packages/ari/chunk-DKA5C4FM.mjs
+packages/ari/chunk-DKA5C4FM.mjsNew file
+68
Index: package/packages/ari/chunk-DKA5C4FM.mjs
===================================================================
--- package/packages/ari/chunk-DKA5C4FM.mjs
+++ package/packages/ari/chunk-DKA5C4FM.mjs
@@ -0,0 +1,68 @@
+import {
+  RovoCustomActionAriResourceOwner,
+  RovoCustomActionAriResourceType
+} from "./chunk-WNV5UZLB.mjs";
+import {
+  RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+  AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/rovo/custom-action/manifest.ts
+var rovoCustomActionAriStaticOpts = {
+  qualifier: "ari",
+  platformQualifier: "cloud",
+  cloudId: new RegExp("^$"),
+  resourceOwner: RovoCustomActionAriResourceOwner,
+  resourceType: RovoCustomActionAriResourceType,
+  resourceIdSlug: "activation/{activationId}/{customActionId}",
+  resourceIdSegmentFormats: {
+    activationId: /[a-zA-Z0-9\-]+/,
+    // eslint-disable-line no-useless-escape
+    customActionId: /[a-zA-Z0-9\-]+/
+    // eslint-disable-line no-useless-escape
+  }
+};
+
+// src/rovo/custom-action/index.ts
+var RovoCustomActionAri = class _RovoCustomActionAri extends RegisteredAri {
+  constructor(opts) {
+    super(opts), this._activationId = opts.resourceIdSegmentValues.activationId, this._customActionId = opts.resourceIdSegmentValues.customActionId;
+  }
+  get activationId() {
+    return this._activationId;
+  }
+  get customActionId() {
+    return this._customActionId;
+  }
+  static create(opts) {
+    let derivedOpts = {
+      qualifier: rovoCustomActionAriStaticOpts.qualifier,
+      platformQualifier: rovoCustomActionAriStaticOpts.platformQualifier,
+      cloudId: void 0,
+      resourceOwner: rovoCustomActionAriStaticOpts.resourceOwner,
+      resourceType: rovoCustomActionAriStaticOpts.resourceType,
+      resourceId: `activation/${opts.activationId}/${opts.customActionId}`,
+      resourceIdSegmentValues: {
+        activationId: opts.activationId,
+        customActionId: opts.customActionId
+      }
+    }, ariOpts = AriParser.fromOpts(derivedOpts, rovoCustomActionAriStaticOpts);
+    return new _RovoCustomActionAri(ariOpts);
+  }
+  static parse(maybeAri) {
+    let opts = AriParser.fromString(maybeAri, rovoCustomActionAriStaticOpts);
+    return new _RovoCustomActionAri(opts);
+  }
+  getVariables() {
+    return {
+      activationId: this.activationId,
+      customActionId: this.customActionId
+    };
+  }
+};
+
+export {
+  RovoCustomActionAri
+};