@forge/util

2.0.12.0.1-experimental-7890858
packages/ari/chunk-AUNDPYRC.mjs
+packages/ari/chunk-AUNDPYRC.mjsNew file
+77
Index: package/packages/ari/chunk-AUNDPYRC.mjs
===================================================================
--- package/packages/ari/chunk-AUNDPYRC.mjs
+++ package/packages/ari/chunk-AUNDPYRC.mjs
@@ -0,0 +1,77 @@
+import {
+  PassionfruitAskCommentAriResourceOwner,
+  PassionfruitAskCommentAriResourceType
+} from "./chunk-6XWAUVHZ.mjs";
+import {
+  RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+  AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/passionfruit/ask-comment/manifest.ts
+var passionfruitAskCommentAriStaticOpts = {
+  qualifier: "ari",
+  platformQualifier: "cloud",
+  cloudId: new RegExp("^[a-zA-Z0-9_\\-.]{1,255}$"),
+  resourceOwner: PassionfruitAskCommentAriResourceOwner,
+  resourceType: PassionfruitAskCommentAriResourceType,
+  resourceIdSlug: "workspace/{activationId}/{askId}/{commentId}",
+  resourceIdSegmentFormats: {
+    activationId: /[a-zA-Z0-9\-]+/,
+    // eslint-disable-line no-useless-escape
+    askId: /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/,
+    commentId: /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
+  }
+};
+
+// src/passionfruit/ask-comment/index.ts
+var PassionfruitAskCommentAri = class _PassionfruitAskCommentAri extends RegisteredAri {
+  constructor(opts) {
+    super(opts), this._siteId = opts.cloudId || "", this._activationId = opts.resourceIdSegmentValues.activationId, this._askId = opts.resourceIdSegmentValues.askId, this._commentId = opts.resourceIdSegmentValues.commentId;
+  }
+  get siteId() {
+    return this._siteId;
+  }
+  get activationId() {
+    return this._activationId;
+  }
+  get askId() {
+    return this._askId;
+  }
+  get commentId() {
+    return this._commentId;
+  }
+  static create(opts) {
+    let derivedOpts = {
+      qualifier: passionfruitAskCommentAriStaticOpts.qualifier,
+      platformQualifier: passionfruitAskCommentAriStaticOpts.platformQualifier,
+      cloudId: opts.siteId,
+      resourceOwner: passionfruitAskCommentAriStaticOpts.resourceOwner,
+      resourceType: passionfruitAskCommentAriStaticOpts.resourceType,
+      resourceId: `workspace/${opts.activationId}/${opts.askId}/${opts.commentId}`,
+      resourceIdSegmentValues: {
+        activationId: opts.activationId,
+        askId: opts.askId,
+        commentId: opts.commentId
+      }
+    }, ariOpts = AriParser.fromOpts(derivedOpts, passionfruitAskCommentAriStaticOpts);
+    return new _PassionfruitAskCommentAri(ariOpts);
+  }
+  static parse(maybeAri) {
+    let opts = AriParser.fromString(maybeAri, passionfruitAskCommentAriStaticOpts);
+    return new _PassionfruitAskCommentAri(opts);
+  }
+  getVariables() {
+    return {
+      siteId: this.siteId,
+      activationId: this.activationId,
+      askId: this.askId,
+      commentId: this.commentId
+    };
+  }
+};
+
+export {
+  PassionfruitAskCommentAri
+};