@forge/util

2.0.12.0.1-experimental-7890858
packages/ari/chunk-AR2E6VUW.mjs
+packages/ari/chunk-AR2E6VUW.mjsNew file
+66
Index: package/packages/ari/chunk-AR2E6VUW.mjs
===================================================================
--- package/packages/ari/chunk-AR2E6VUW.mjs
+++ package/packages/ari/chunk-AR2E6VUW.mjs
@@ -0,0 +1,66 @@
+import {
+  MicrosoftChannelAriResourceOwner,
+  MicrosoftChannelAriResourceType
+} from "./chunk-2VMP2TVB.mjs";
+import {
+  RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+  AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/microsoft/channel/manifest.ts
+var microsoftChannelAriStaticOpts = {
+  qualifier: "ari",
+  platformQualifier: "third-party",
+  cloudId: new RegExp("^$"),
+  resourceOwner: MicrosoftChannelAriResourceOwner,
+  resourceType: MicrosoftChannelAriResourceType,
+  resourceIdSlug: "teamId/{teamId}/channelId/{channelId}",
+  resourceIdSegmentFormats: {
+    teamId: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/,
+    channelId: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/
+  }
+};
+
+// src/microsoft/channel/index.ts
+var MicrosoftChannelAri = class _MicrosoftChannelAri extends RegisteredAri {
+  constructor(opts) {
+    super(opts), this._teamId = opts.resourceIdSegmentValues.teamId, this._channelId = opts.resourceIdSegmentValues.channelId;
+  }
+  get teamId() {
+    return this._teamId;
+  }
+  get channelId() {
+    return this._channelId;
+  }
+  static create(opts) {
+    let derivedOpts = {
+      qualifier: microsoftChannelAriStaticOpts.qualifier,
+      platformQualifier: microsoftChannelAriStaticOpts.platformQualifier,
+      cloudId: void 0,
+      resourceOwner: microsoftChannelAriStaticOpts.resourceOwner,
+      resourceType: microsoftChannelAriStaticOpts.resourceType,
+      resourceId: `teamId/${opts.teamId}/channelId/${opts.channelId}`,
+      resourceIdSegmentValues: {
+        teamId: opts.teamId,
+        channelId: opts.channelId
+      }
+    }, ariOpts = AriParser.fromOpts(derivedOpts, microsoftChannelAriStaticOpts);
+    return new _MicrosoftChannelAri(ariOpts);
+  }
+  static parse(maybeAri) {
+    let opts = AriParser.fromString(maybeAri, microsoftChannelAriStaticOpts);
+    return new _MicrosoftChannelAri(opts);
+  }
+  getVariables() {
+    return {
+      teamId: this.teamId,
+      channelId: this.channelId
+    };
+  }
+};
+
+export {
+  MicrosoftChannelAri
+};