npm package diff

Package: @forge/util

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

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

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