@forge/util

2.0.12.0.1-experimental-7890858
packages/ari/chunk-M36JJPJU.mjs
+packages/ari/chunk-M36JJPJU.mjsNew file
+67
Index: package/packages/ari/chunk-M36JJPJU.mjs
===================================================================
--- package/packages/ari/chunk-M36JJPJU.mjs
+++ package/packages/ari/chunk-M36JJPJU.mjs
@@ -0,0 +1,67 @@
+import {
+  GraphDeploymentAriResourceOwner,
+  GraphDeploymentAriResourceType
+} from "./chunk-OON2ZRPC.mjs";
+import {
+  RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+  AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/graph/deployment/manifest.ts
+var graphDeploymentAriStaticOpts = {
+  qualifier: "ari",
+  platformQualifier: "cloud",
+  cloudId: new RegExp("^$"),
+  resourceOwner: GraphDeploymentAriResourceOwner,
+  resourceType: GraphDeploymentAriResourceType,
+  resourceIdSlug: "activation/{activationId}/{deploymentId}",
+  resourceIdSegmentFormats: {
+    activationId: /[a-zA-Z0-9\-]+/,
+    // eslint-disable-line no-useless-escape
+    deploymentId: /[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}/
+  }
+};
+
+// src/graph/deployment/index.ts
+var GraphDeploymentAri = class _GraphDeploymentAri extends RegisteredAri {
+  constructor(opts) {
+    super(opts), this._activationId = opts.resourceIdSegmentValues.activationId, this._deploymentId = opts.resourceIdSegmentValues.deploymentId;
+  }
+  get activationId() {
+    return this._activationId;
+  }
+  get deploymentId() {
+    return this._deploymentId;
+  }
+  static create(opts) {
+    let derivedOpts = {
+      qualifier: graphDeploymentAriStaticOpts.qualifier,
+      platformQualifier: graphDeploymentAriStaticOpts.platformQualifier,
+      cloudId: void 0,
+      resourceOwner: graphDeploymentAriStaticOpts.resourceOwner,
+      resourceType: graphDeploymentAriStaticOpts.resourceType,
+      resourceId: `activation/${opts.activationId}/${opts.deploymentId}`,
+      resourceIdSegmentValues: {
+        activationId: opts.activationId,
+        deploymentId: opts.deploymentId
+      }
+    }, ariOpts = AriParser.fromOpts(derivedOpts, graphDeploymentAriStaticOpts);
+    return new _GraphDeploymentAri(ariOpts);
+  }
+  static parse(maybeAri) {
+    let opts = AriParser.fromString(maybeAri, graphDeploymentAriStaticOpts);
+    return new _GraphDeploymentAri(opts);
+  }
+  getVariables() {
+    return {
+      activationId: this.activationId,
+      deploymentId: this.deploymentId
+    };
+  }
+};
+
+export {
+  GraphDeploymentAri
+};