@forge/util
2.0.12.0.1-experimental-7890858
packages/ari/chunk-5AX533FE.mjs+
packages/ari/chunk-5AX533FE.mjsNew file+66
Index: package/packages/ari/chunk-5AX533FE.mjs
===================================================================
--- package/packages/ari/chunk-5AX533FE.mjs
+++ package/packages/ari/chunk-5AX533FE.mjs
@@ -0,0 +1,66 @@
+import {
+ MicrosoftChatAriResourceOwner,
+ MicrosoftChatAriResourceType
+} from "./chunk-TEIQ5OS2.mjs";
+import {
+ RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+ AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/microsoft/chat/manifest.ts
+var microsoftChatAriStaticOpts = {
+ qualifier: "ari",
+ platformQualifier: "third-party",
+ cloudId: new RegExp("^$"),
+ resourceOwner: MicrosoftChatAriResourceOwner,
+ resourceType: MicrosoftChatAriResourceType,
+ resourceIdSlug: "chatId/{chatId}/messageId/{messageId}",
+ resourceIdSegmentFormats: {
+ chatId: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/,
+ messageId: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/
+ }
+};
+
+// src/microsoft/chat/index.ts
+var MicrosoftChatAri = class _MicrosoftChatAri extends RegisteredAri {
+ constructor(opts) {
+ super(opts), this._chatId = opts.resourceIdSegmentValues.chatId, this._messageId = opts.resourceIdSegmentValues.messageId;
+ }
+ get chatId() {
+ return this._chatId;
+ }
+ get messageId() {
+ return this._messageId;
+ }
+ static create(opts) {
+ let derivedOpts = {
+ qualifier: microsoftChatAriStaticOpts.qualifier,
+ platformQualifier: microsoftChatAriStaticOpts.platformQualifier,
+ cloudId: void 0,
+ resourceOwner: microsoftChatAriStaticOpts.resourceOwner,
+ resourceType: microsoftChatAriStaticOpts.resourceType,
+ resourceId: `chatId/${opts.chatId}/messageId/${opts.messageId}`,
+ resourceIdSegmentValues: {
+ chatId: opts.chatId,
+ messageId: opts.messageId
+ }
+ }, ariOpts = AriParser.fromOpts(derivedOpts, microsoftChatAriStaticOpts);
+ return new _MicrosoftChatAri(ariOpts);
+ }
+ static parse(maybeAri) {
+ let opts = AriParser.fromString(maybeAri, microsoftChatAriStaticOpts);
+ return new _MicrosoftChatAri(opts);
+ }
+ getVariables() {
+ return {
+ chatId: this.chatId,
+ messageId: this.messageId
+ };
+ }
+};
+
+export {
+ MicrosoftChatAri
+};