npm package diff

Package: @forge/util

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

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

Index: package/packages/ari/chunk-TZDFTH22.mjs
===================================================================
--- package/packages/ari/chunk-TZDFTH22.mjs
+++ package/packages/ari/chunk-TZDFTH22.mjs
@@ -0,0 +1,77 @@
+import {
+  GraphBranchHistoryAriResourceOwner,
+  GraphBranchHistoryAriResourceType
+} from "./chunk-RL6RLD25.mjs";
+import {
+  RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+  AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/graph/branch-history/manifest.ts
+var graphBranchHistoryAriStaticOpts = {
+  qualifier: "ari",
+  platformQualifier: "cloud",
+  cloudId: new RegExp("^$"),
+  // eslint-disable-line no-useless-escape
+  resourceOwner: GraphBranchHistoryAriResourceOwner,
+  resourceType: GraphBranchHistoryAriResourceType,
+  resourceIdSlug: "activation/{activationId}/{branchId}/{updateSequenceNumber}",
+  resourceIdSegmentFormats: {
+    activationId: /[a-zA-Z0-9\-]+/,
+    // eslint-disable-line no-useless-escape
+    branchId: /[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}/,
+    // eslint-disable-line no-useless-escape
+    updateSequenceNumber: /\d+/
+    // eslint-disable-line no-useless-escape
+  }
+};
+
+// src/graph/branch-history/index.ts
+var GraphBranchHistoryAri = class _GraphBranchHistoryAri extends RegisteredAri {
+  constructor(opts) {
+    super(opts);
+    this._activationId = opts.resourceIdSegmentValues.activationId, this._branchId = opts.resourceIdSegmentValues.branchId, this._updateSequenceNumber = opts.resourceIdSegmentValues.updateSequenceNumber;
+  }
+  get activationId() {
+    return this._activationId;
+  }
+  get branchId() {
+    return this._branchId;
+  }
+  get updateSequenceNumber() {
+    return this._updateSequenceNumber;
+  }
+  static create(opts) {
+    let derivedOpts = {
+      qualifier: graphBranchHistoryAriStaticOpts.qualifier,
+      platformQualifier: graphBranchHistoryAriStaticOpts.platformQualifier,
+      cloudId: void 0,
+      resourceOwner: graphBranchHistoryAriStaticOpts.resourceOwner,
+      resourceType: graphBranchHistoryAriStaticOpts.resourceType,
+      resourceId: `activation/${opts.activationId}/${opts.branchId}/${opts.updateSequenceNumber}`,
+      resourceIdSegmentValues: {
+        activationId: opts.activationId,
+        branchId: opts.branchId,
+        updateSequenceNumber: opts.updateSequenceNumber
+      }
+    }, ariOpts = AriParser.fromOpts(derivedOpts, graphBranchHistoryAriStaticOpts);
+    return new _GraphBranchHistoryAri(ariOpts);
+  }
+  static parse(maybeAri) {
+    let opts = AriParser.fromString(maybeAri, graphBranchHistoryAriStaticOpts);
+    return new _GraphBranchHistoryAri(opts);
+  }
+  getVariables() {
+    return {
+      activationId: this.activationId,
+      branchId: this.branchId,
+      updateSequenceNumber: this.updateSequenceNumber
+    };
+  }
+};
+
+export {
+  GraphBranchHistoryAri
+};