@forge/util

2.0.12.0.1-experimental-7890858
packages/ari/chunk-D6YKOPZ7.mjs
+packages/ari/chunk-D6YKOPZ7.mjsNew file
+67
Index: package/packages/ari/chunk-D6YKOPZ7.mjs
===================================================================
--- package/packages/ari/chunk-D6YKOPZ7.mjs
+++ package/packages/ari/chunk-D6YKOPZ7.mjs
@@ -0,0 +1,67 @@
+import {
+  GraphMcpServerAriResourceOwner,
+  GraphMcpServerAriResourceType
+} from "./chunk-LTYX45SU.mjs";
+import {
+  RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+  AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/graph/mcp-server/manifest.ts
+var graphMcpServerAriStaticOpts = {
+  qualifier: "ari",
+  platformQualifier: "cloud",
+  cloudId: new RegExp("^$"),
+  resourceOwner: GraphMcpServerAriResourceOwner,
+  resourceType: GraphMcpServerAriResourceType,
+  resourceIdSlug: "activation/{activationId}/{mcpServerId}",
+  resourceIdSegmentFormats: {
+    activationId: /[a-zA-Z0-9\-]+/,
+    // eslint-disable-line no-useless-escape
+    mcpServerId: /[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/mcp-server/index.ts
+var GraphMcpServerAri = class _GraphMcpServerAri extends RegisteredAri {
+  constructor(opts) {
+    super(opts), this._activationId = opts.resourceIdSegmentValues.activationId, this._mcpServerId = opts.resourceIdSegmentValues.mcpServerId;
+  }
+  get activationId() {
+    return this._activationId;
+  }
+  get mcpServerId() {
+    return this._mcpServerId;
+  }
+  static create(opts) {
+    let derivedOpts = {
+      qualifier: graphMcpServerAriStaticOpts.qualifier,
+      platformQualifier: graphMcpServerAriStaticOpts.platformQualifier,
+      cloudId: void 0,
+      resourceOwner: graphMcpServerAriStaticOpts.resourceOwner,
+      resourceType: graphMcpServerAriStaticOpts.resourceType,
+      resourceId: `activation/${opts.activationId}/${opts.mcpServerId}`,
+      resourceIdSegmentValues: {
+        activationId: opts.activationId,
+        mcpServerId: opts.mcpServerId
+      }
+    }, ariOpts = AriParser.fromOpts(derivedOpts, graphMcpServerAriStaticOpts);
+    return new _GraphMcpServerAri(ariOpts);
+  }
+  static parse(maybeAri) {
+    let opts = AriParser.fromString(maybeAri, graphMcpServerAriStaticOpts);
+    return new _GraphMcpServerAri(opts);
+  }
+  getVariables() {
+    return {
+      activationId: this.activationId,
+      mcpServerId: this.mcpServerId
+    };
+  }
+};
+
+export {
+  GraphMcpServerAri
+};