@forge/util

2.0.12.0.1-experimental-7890858
packages/ari/chunk-CAUOAIJR.mjs
+packages/ari/chunk-CAUOAIJR.mjsNew file
+67
Index: package/packages/ari/chunk-CAUOAIJR.mjs
===================================================================
--- package/packages/ari/chunk-CAUOAIJR.mjs
+++ package/packages/ari/chunk-CAUOAIJR.mjs
@@ -0,0 +1,67 @@
+import {
+  HelpChannelAriResourceOwner,
+  HelpChannelAriResourceType
+} from "./chunk-H2XK65KU.mjs";
+import {
+  RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+  AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/help/channel/manifest.ts
+var helpChannelAriStaticOpts = {
+  qualifier: "ari",
+  platformQualifier: "cloud",
+  cloudId: new RegExp("^$"),
+  resourceOwner: HelpChannelAriResourceOwner,
+  resourceType: HelpChannelAriResourceType,
+  resourceIdSlug: "{activationId}/{helpObjectId}",
+  resourceIdSegmentFormats: {
+    activationId: /[a-zA-Z0-9\-]+/,
+    // eslint-disable-line no-useless-escape
+    helpObjectId: /[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}/
+  }
+};
+
+// src/help/channel/index.ts
+var HelpChannelAri = class _HelpChannelAri extends RegisteredAri {
+  constructor(opts) {
+    super(opts), this._activationId = opts.resourceIdSegmentValues.activationId, this._helpObjectId = opts.resourceIdSegmentValues.helpObjectId;
+  }
+  get activationId() {
+    return this._activationId;
+  }
+  get helpObjectId() {
+    return this._helpObjectId;
+  }
+  static create(opts) {
+    let derivedOpts = {
+      qualifier: helpChannelAriStaticOpts.qualifier,
+      platformQualifier: helpChannelAriStaticOpts.platformQualifier,
+      cloudId: void 0,
+      resourceOwner: helpChannelAriStaticOpts.resourceOwner,
+      resourceType: helpChannelAriStaticOpts.resourceType,
+      resourceId: `${opts.activationId}/${opts.helpObjectId}`,
+      resourceIdSegmentValues: {
+        activationId: opts.activationId,
+        helpObjectId: opts.helpObjectId
+      }
+    }, ariOpts = AriParser.fromOpts(derivedOpts, helpChannelAriStaticOpts);
+    return new _HelpChannelAri(ariOpts);
+  }
+  static parse(maybeAri) {
+    let opts = AriParser.fromString(maybeAri, helpChannelAriStaticOpts);
+    return new _HelpChannelAri(opts);
+  }
+  getVariables() {
+    return {
+      activationId: this.activationId,
+      helpObjectId: this.helpObjectId
+    };
+  }
+};
+
+export {
+  HelpChannelAri
+};