npm package diff

Package: @forge/util

Versions: 1.4.10-next.0 - 1.4.10-next.0-experimental-effab31

File: package/packages/ari/chunk-VLM4JYJY.mjs

Index: package/packages/ari/chunk-VLM4JYJY.mjs
===================================================================
--- package/packages/ari/chunk-VLM4JYJY.mjs
+++ package/packages/ari/chunk-VLM4JYJY.mjs
@@ -0,0 +1,70 @@
+import {
+  OpsgenieTimelineAriResourceOwner,
+  OpsgenieTimelineAriResourceType
+} from "./chunk-T4JHTCBL.mjs";
+import {
+  RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+  AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/opsgenie/timeline/manifest.ts
+var opsgenieTimelineAriStaticOpts = {
+  qualifier: "ari",
+  platformQualifier: "cloud",
+  cloudId: new RegExp("^$"),
+  // eslint-disable-line no-useless-escape
+  resourceOwner: OpsgenieTimelineAriResourceOwner,
+  resourceType: OpsgenieTimelineAriResourceType,
+  resourceIdSlug: "{workspaceId}/{timelineEntryId}",
+  resourceIdSegmentFormats: {
+    workspaceId: /[a-zA-Z0-9\-]+/,
+    // eslint-disable-line no-useless-escape
+    timelineEntryId: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/
+    // eslint-disable-line no-useless-escape
+  }
+};
+
+// src/opsgenie/timeline/index.ts
+var OpsgenieTimelineAri = class _OpsgenieTimelineAri extends RegisteredAri {
+  constructor(opts) {
+    super(opts);
+    this._workspaceId = opts.resourceIdSegmentValues.workspaceId, this._timelineEntryId = opts.resourceIdSegmentValues.timelineEntryId;
+  }
+  get workspaceId() {
+    return this._workspaceId;
+  }
+  get timelineEntryId() {
+    return this._timelineEntryId;
+  }
+  static create(opts) {
+    let derivedOpts = {
+      qualifier: opsgenieTimelineAriStaticOpts.qualifier,
+      platformQualifier: opsgenieTimelineAriStaticOpts.platformQualifier,
+      cloudId: void 0,
+      resourceOwner: opsgenieTimelineAriStaticOpts.resourceOwner,
+      resourceType: opsgenieTimelineAriStaticOpts.resourceType,
+      resourceId: `${opts.workspaceId}/${opts.timelineEntryId}`,
+      resourceIdSegmentValues: {
+        workspaceId: opts.workspaceId,
+        timelineEntryId: opts.timelineEntryId
+      }
+    }, ariOpts = AriParser.fromOpts(derivedOpts, opsgenieTimelineAriStaticOpts);
+    return new _OpsgenieTimelineAri(ariOpts);
+  }
+  static parse(maybeAri) {
+    let opts = AriParser.fromString(maybeAri, opsgenieTimelineAriStaticOpts);
+    return new _OpsgenieTimelineAri(opts);
+  }
+  getVariables() {
+    return {
+      workspaceId: this.workspaceId,
+      timelineEntryId: this.timelineEntryId
+    };
+  }
+};
+
+export {
+  OpsgenieTimelineAri
+};