@forge/util

2.0.12.0.1-experimental-7890858
packages/ari/chunk-H4UTR7O2.mjs
+packages/ari/chunk-H4UTR7O2.mjsNew file
+67
Index: package/packages/ari/chunk-H4UTR7O2.mjs
===================================================================
--- package/packages/ari/chunk-H4UTR7O2.mjs
+++ package/packages/ari/chunk-H4UTR7O2.mjs
@@ -0,0 +1,67 @@
+import {
+  JiraNotificationTypeSchemeAriResourceOwner,
+  JiraNotificationTypeSchemeAriResourceType
+} from "./chunk-45SACCRI.mjs";
+import {
+  RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+  AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/jira/notification-type-scheme/manifest.ts
+var jiraNotificationTypeSchemeAriStaticOpts = {
+  qualifier: "ari",
+  platformQualifier: "cloud",
+  cloudId: new RegExp("^$"),
+  resourceOwner: JiraNotificationTypeSchemeAriResourceOwner,
+  resourceType: JiraNotificationTypeSchemeAriResourceType,
+  resourceIdSlug: "activation/{activationId}/{notificationTypeSchemeId}",
+  resourceIdSegmentFormats: {
+    activationId: /[a-zA-Z0-9\-]+/,
+    // eslint-disable-line no-useless-escape
+    notificationTypeSchemeId: /[0-9]+/
+  }
+};
+
+// src/jira/notification-type-scheme/index.ts
+var JiraNotificationTypeSchemeAri = class _JiraNotificationTypeSchemeAri extends RegisteredAri {
+  constructor(opts) {
+    super(opts), this._activationId = opts.resourceIdSegmentValues.activationId, this._notificationTypeSchemeId = opts.resourceIdSegmentValues.notificationTypeSchemeId;
+  }
+  get activationId() {
+    return this._activationId;
+  }
+  get notificationTypeSchemeId() {
+    return this._notificationTypeSchemeId;
+  }
+  static create(opts) {
+    let derivedOpts = {
+      qualifier: jiraNotificationTypeSchemeAriStaticOpts.qualifier,
+      platformQualifier: jiraNotificationTypeSchemeAriStaticOpts.platformQualifier,
+      cloudId: void 0,
+      resourceOwner: jiraNotificationTypeSchemeAriStaticOpts.resourceOwner,
+      resourceType: jiraNotificationTypeSchemeAriStaticOpts.resourceType,
+      resourceId: `activation/${opts.activationId}/${opts.notificationTypeSchemeId}`,
+      resourceIdSegmentValues: {
+        activationId: opts.activationId,
+        notificationTypeSchemeId: opts.notificationTypeSchemeId
+      }
+    }, ariOpts = AriParser.fromOpts(derivedOpts, jiraNotificationTypeSchemeAriStaticOpts);
+    return new _JiraNotificationTypeSchemeAri(ariOpts);
+  }
+  static parse(maybeAri) {
+    let opts = AriParser.fromString(maybeAri, jiraNotificationTypeSchemeAriStaticOpts);
+    return new _JiraNotificationTypeSchemeAri(opts);
+  }
+  getVariables() {
+    return {
+      activationId: this.activationId,
+      notificationTypeSchemeId: this.notificationTypeSchemeId
+    };
+  }
+};
+
+export {
+  JiraNotificationTypeSchemeAri
+};