@forge/util

2.0.12.0.1-experimental-7890858
packages/ari/chunk-ZBLMD4GN.mjs
+packages/ari/chunk-ZBLMD4GN.mjsNew file
+95
Index: package/packages/ari/chunk-ZBLMD4GN.mjs
===================================================================
--- package/packages/ari/chunk-ZBLMD4GN.mjs
+++ package/packages/ari/chunk-ZBLMD4GN.mjs
@@ -0,0 +1,95 @@
+import {
+  JiraBoardColumnAriResourceOwner,
+  JiraBoardColumnAriResourceType
+} from "./chunk-TD3LCQPF.mjs";
+import {
+  RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+  AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/jira/board-column/manifest.ts
+var jiraBoardColumnAriStaticOpts = {
+  qualifier: "ari",
+  platformQualifier: "cloud",
+  cloudId: new RegExp("^[a-zA-Z0-9_\\-.]{1,255}$"),
+  resourceOwner: JiraBoardColumnAriResourceOwner,
+  resourceType: JiraBoardColumnAriResourceType,
+  resourceIdSlug: "activation/{activationId}/{containerType}/{containerId}/view/{viewId}/{columnType}/{columnId}",
+  resourceIdSegmentFormats: {
+    activationId: /[a-zA-Z0-9\-]+/,
+    // eslint-disable-line no-useless-escape
+    containerType: /(board|project)/,
+    containerId: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/,
+    viewId: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/,
+    columnType: /(status|assignee|priority|category)/,
+    columnId: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/
+  }
+};
+
+// src/jira/board-column/index.ts
+var JiraBoardColumnAri = class _JiraBoardColumnAri extends RegisteredAri {
+  constructor(opts) {
+    super(opts), this._siteId = opts.cloudId || "", this._activationId = opts.resourceIdSegmentValues.activationId, this._containerType = opts.resourceIdSegmentValues.containerType, this._containerId = opts.resourceIdSegmentValues.containerId, this._viewId = opts.resourceIdSegmentValues.viewId, this._columnType = opts.resourceIdSegmentValues.columnType, this._columnId = opts.resourceIdSegmentValues.columnId;
+  }
+  get siteId() {
+    return this._siteId;
+  }
+  get activationId() {
+    return this._activationId;
+  }
+  get containerType() {
+    return this._containerType;
+  }
+  get containerId() {
+    return this._containerId;
+  }
+  get viewId() {
+    return this._viewId;
+  }
+  get columnType() {
+    return this._columnType;
+  }
+  get columnId() {
+    return this._columnId;
+  }
+  static create(opts) {
+    let derivedOpts = {
+      qualifier: jiraBoardColumnAriStaticOpts.qualifier,
+      platformQualifier: jiraBoardColumnAriStaticOpts.platformQualifier,
+      cloudId: opts.siteId,
+      resourceOwner: jiraBoardColumnAriStaticOpts.resourceOwner,
+      resourceType: jiraBoardColumnAriStaticOpts.resourceType,
+      resourceId: `activation/${opts.activationId}/${opts.containerType}/${opts.containerId}/view/${opts.viewId}/${opts.columnType}/${opts.columnId}`,
+      resourceIdSegmentValues: {
+        activationId: opts.activationId,
+        containerType: opts.containerType,
+        containerId: opts.containerId,
+        viewId: opts.viewId,
+        columnType: opts.columnType,
+        columnId: opts.columnId
+      }
+    }, ariOpts = AriParser.fromOpts(derivedOpts, jiraBoardColumnAriStaticOpts);
+    return new _JiraBoardColumnAri(ariOpts);
+  }
+  static parse(maybeAri) {
+    let opts = AriParser.fromString(maybeAri, jiraBoardColumnAriStaticOpts);
+    return new _JiraBoardColumnAri(opts);
+  }
+  getVariables() {
+    return {
+      siteId: this.siteId,
+      activationId: this.activationId,
+      containerType: this.containerType,
+      containerId: this.containerId,
+      viewId: this.viewId,
+      columnType: this.columnType,
+      columnId: this.columnId
+    };
+  }
+};
+
+export {
+  JiraBoardColumnAri
+};