@forge/util

2.0.1-experimental-78908582.0.1-experimental-04cc2b9
packages/ari/chunk-PM2OSIKL.mjs
+packages/ari/chunk-PM2OSIKL.mjsNew file
+70
Index: package/packages/ari/chunk-PM2OSIKL.mjs
===================================================================
--- package/packages/ari/chunk-PM2OSIKL.mjs
+++ package/packages/ari/chunk-PM2OSIKL.mjs
@@ -0,0 +1,70 @@
+import {
+  BeaconDetectionAriResourceOwner,
+  BeaconDetectionAriResourceType
+} from "./chunk-L27OOBSM.mjs";
+import {
+  RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+  AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/beacon/detection/manifest.ts
+var beaconDetectionAriStaticOpts = {
+  qualifier: "ari",
+  platformQualifier: "cloud",
+  cloudId: new RegExp("^$"),
+  // eslint-disable-line no-useless-escape
+  resourceOwner: BeaconDetectionAriResourceOwner,
+  resourceType: BeaconDetectionAriResourceType,
+  resourceIdSlug: "{workspaceId}/{detectionId}",
+  resourceIdSegmentFormats: {
+    workspaceId: /[a-zA-Z0-9\-]+/,
+    // eslint-disable-line no-useless-escape
+    detectionId: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/
+    // eslint-disable-line no-useless-escape
+  }
+};
+
+// src/beacon/detection/index.ts
+var BeaconDetectionAri = class _BeaconDetectionAri extends RegisteredAri {
+  constructor(opts) {
+    super(opts);
+    this._workspaceId = opts.resourceIdSegmentValues.workspaceId, this._detectionId = opts.resourceIdSegmentValues.detectionId;
+  }
+  get workspaceId() {
+    return this._workspaceId;
+  }
+  get detectionId() {
+    return this._detectionId;
+  }
+  static create(opts) {
+    let derivedOpts = {
+      qualifier: beaconDetectionAriStaticOpts.qualifier,
+      platformQualifier: beaconDetectionAriStaticOpts.platformQualifier,
+      cloudId: void 0,
+      resourceOwner: beaconDetectionAriStaticOpts.resourceOwner,
+      resourceType: beaconDetectionAriStaticOpts.resourceType,
+      resourceId: `${opts.workspaceId}/${opts.detectionId}`,
+      resourceIdSegmentValues: {
+        workspaceId: opts.workspaceId,
+        detectionId: opts.detectionId
+      }
+    }, ariOpts = AriParser.fromOpts(derivedOpts, beaconDetectionAriStaticOpts);
+    return new _BeaconDetectionAri(ariOpts);
+  }
+  static parse(maybeAri) {
+    let opts = AriParser.fromString(maybeAri, beaconDetectionAriStaticOpts);
+    return new _BeaconDetectionAri(opts);
+  }
+  getVariables() {
+    return {
+      workspaceId: this.workspaceId,
+      detectionId: this.detectionId
+    };
+  }
+};
+
+export {
+  BeaconDetectionAri
+};