@forge/util
2.0.12.0.1-experimental-7890858
packages/ari/chunk-TBDG5QTZ.mjs+
packages/ari/chunk-TBDG5QTZ.mjsNew file+70
Index: package/packages/ari/chunk-TBDG5QTZ.mjs
===================================================================
--- package/packages/ari/chunk-TBDG5QTZ.mjs
+++ package/packages/ari/chunk-TBDG5QTZ.mjs
@@ -0,0 +1,70 @@
+import {
+ JiraIssueCommentAriResourceOwner,
+ JiraIssueCommentAriResourceType
+} from "./chunk-C7LAHHR5.mjs";
+import {
+ RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+ AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/jira/issue-comment/manifest.ts
+var jiraIssueCommentAriStaticOpts = {
+ qualifier: "ari",
+ platformQualifier: "cloud",
+ cloudId: new RegExp("^[a-zA-Z0-9_\\-.]{1,255}$"),
+ resourceOwner: JiraIssueCommentAriResourceOwner,
+ resourceType: JiraIssueCommentAriResourceType,
+ resourceIdSlug: "{issueId}/{commentId}",
+ resourceIdSegmentFormats: {
+ issueId: /[0-9]+/,
+ commentId: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/
+ }
+};
+
+// src/jira/issue-comment/index.ts
+var JiraIssueCommentAri = class _JiraIssueCommentAri extends RegisteredAri {
+ constructor(opts) {
+ super(opts), this._siteId = opts.cloudId || "", this._issueId = opts.resourceIdSegmentValues.issueId, this._commentId = opts.resourceIdSegmentValues.commentId;
+ }
+ get siteId() {
+ return this._siteId;
+ }
+ get issueId() {
+ return this._issueId;
+ }
+ get commentId() {
+ return this._commentId;
+ }
+ static create(opts) {
+ let derivedOpts = {
+ qualifier: jiraIssueCommentAriStaticOpts.qualifier,
+ platformQualifier: jiraIssueCommentAriStaticOpts.platformQualifier,
+ cloudId: opts.siteId,
+ resourceOwner: jiraIssueCommentAriStaticOpts.resourceOwner,
+ resourceType: jiraIssueCommentAriStaticOpts.resourceType,
+ resourceId: `${opts.issueId}/${opts.commentId}`,
+ resourceIdSegmentValues: {
+ issueId: opts.issueId,
+ commentId: opts.commentId
+ }
+ }, ariOpts = AriParser.fromOpts(derivedOpts, jiraIssueCommentAriStaticOpts);
+ return new _JiraIssueCommentAri(ariOpts);
+ }
+ static parse(maybeAri) {
+ let opts = AriParser.fromString(maybeAri, jiraIssueCommentAriStaticOpts);
+ return new _JiraIssueCommentAri(opts);
+ }
+ getVariables() {
+ return {
+ siteId: this.siteId,
+ issueId: this.issueId,
+ commentId: this.commentId
+ };
+ }
+};
+
+export {
+ JiraIssueCommentAri
+};