npm package diff
Package: @forge/util
Versions: 1.4.10-next.0 - 1.4.10-next.0-experimental-effab31
File: package/packages/ari/chunk-73OSZPI2.mjs
Index: package/packages/ari/chunk-73OSZPI2.mjs
===================================================================
--- package/packages/ari/chunk-73OSZPI2.mjs
+++ package/packages/ari/chunk-73OSZPI2.mjs
@@ -0,0 +1,74 @@
+import {
+ JiraWorkflowAriResourceOwner,
+ JiraWorkflowAriResourceType
+} from "./chunk-EYJJDCXK.mjs";
+import {
+ RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+ AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/jira/workflow/manifest.ts
+var jiraWorkflowAriStaticOpts = {
+ qualifier: "ari",
+ platformQualifier: "cloud",
+ cloudId: new RegExp("^[a-zA-Z0-9_\\-.]{1,255}$"),
+ // eslint-disable-line no-useless-escape
+ resourceOwner: JiraWorkflowAriResourceOwner,
+ resourceType: JiraWorkflowAriResourceType,
+ resourceIdSlug: "activation/{activationId}/{workflowId}",
+ resourceIdSegmentFormats: {
+ activationId: /[a-zA-Z0-9\-]+/,
+ // eslint-disable-line no-useless-escape
+ workflowId: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/
+ // eslint-disable-line no-useless-escape
+ }
+};
+
+// src/jira/workflow/index.ts
+var JiraWorkflowAri = class _JiraWorkflowAri extends RegisteredAri {
+ constructor(opts) {
+ super(opts);
+ this._siteId = opts.cloudId || "", this._activationId = opts.resourceIdSegmentValues.activationId, this._workflowId = opts.resourceIdSegmentValues.workflowId;
+ }
+ get siteId() {
+ return this._siteId;
+ }
+ get activationId() {
+ return this._activationId;
+ }
+ get workflowId() {
+ return this._workflowId;
+ }
+ static create(opts) {
+ let derivedOpts = {
+ qualifier: jiraWorkflowAriStaticOpts.qualifier,
+ platformQualifier: jiraWorkflowAriStaticOpts.platformQualifier,
+ cloudId: opts.siteId,
+ resourceOwner: jiraWorkflowAriStaticOpts.resourceOwner,
+ resourceType: jiraWorkflowAriStaticOpts.resourceType,
+ resourceId: `activation/${opts.activationId}/${opts.workflowId}`,
+ resourceIdSegmentValues: {
+ activationId: opts.activationId,
+ workflowId: opts.workflowId
+ }
+ }, ariOpts = AriParser.fromOpts(derivedOpts, jiraWorkflowAriStaticOpts);
+ return new _JiraWorkflowAri(ariOpts);
+ }
+ static parse(maybeAri) {
+ let opts = AriParser.fromString(maybeAri, jiraWorkflowAriStaticOpts);
+ return new _JiraWorkflowAri(opts);
+ }
+ getVariables() {
+ return {
+ siteId: this.siteId,
+ activationId: this.activationId,
+ workflowId: this.workflowId
+ };
+ }
+};
+
+export {
+ JiraWorkflowAri
+};