@forge/util
2.0.12.0.1-experimental-7890858
packages/ari/microsoft.teams/index.js~
packages/ari/microsoft.teams/index.jsModified+56−15
Index: package/packages/ari/microsoft.teams/index.js
===================================================================
--- package/packages/ari/microsoft.teams/index.js
+++ package/packages/ari/microsoft.teams/index.js
@@ -18,9 +18,10 @@
var microsoft_exports = {};
__export(microsoft_exports, {
MicrosoftTeamsConversationAri: () => MicrosoftTeamsConversationAri,
MicrosoftTeamsMessageAri: () => MicrosoftTeamsMessageAri,
- MicrosoftTeamsRemoteLinkAri: () => MicrosoftTeamsRemoteLinkAri
+ MicrosoftTeamsRemoteLinkAri: () => MicrosoftTeamsRemoteLinkAri,
+ MicrosoftTeamsVideoAri: () => MicrosoftTeamsVideoAri
});
module.exports = __toCommonJS(microsoft_exports);
// src/errors.ts
@@ -284,23 +285,20 @@
var microsoftTeamsConversationAriStaticOpts = {
qualifier: "ari",
platformQualifier: "third-party",
cloudId: new RegExp("^$"),
- // eslint-disable-line no-useless-escape
resourceOwner: MicrosoftTeamsConversationAriResourceOwner,
resourceType: MicrosoftTeamsConversationAriResourceType,
resourceIdSlug: "{compositeConversation}",
resourceIdSegmentFormats: {
compositeConversation: /(teamId\/[a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}\/channelId\/19:[a-zA-Z0-9_-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+|19:[a-zA-Z0-9_]+(?:-[a-zA-Z0-9_]+)*@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)/
- // eslint-disable-line no-useless-escape
}
};
// src/microsoft.teams/conversation/index.ts
var MicrosoftTeamsConversationAri = class _MicrosoftTeamsConversationAri extends RegisteredAri {
constructor(opts) {
- super(opts);
- this._compositeConversation = opts.resourceIdSegmentValues.compositeConversation;
+ super(opts), this._compositeConversation = opts.resourceIdSegmentValues.compositeConversation;
}
get compositeConversation() {
return this._compositeConversation;
}
@@ -336,23 +334,20 @@
var microsoftTeamsMessageAriStaticOpts = {
qualifier: "ari",
platformQualifier: "third-party",
cloudId: new RegExp("^$"),
- // eslint-disable-line no-useless-escape
resourceOwner: MicrosoftTeamsMessageAriResourceOwner,
resourceType: MicrosoftTeamsMessageAriResourceType,
resourceIdSlug: "{compositeMessage}",
resourceIdSegmentFormats: {
compositeMessage: /(teamId\/[a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}\/channelId\/19:[a-zA-Z0-9_-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+\/messageId\/[0-9_-]+|chatId\/19:[a-zA-Z0-9_]+(?:-[a-zA-Z0-9_]+)*@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+\/messageId\/[0-9_-]+)/
- // eslint-disable-line no-useless-escape
}
};
// src/microsoft.teams/message/index.ts
var MicrosoftTeamsMessageAri = class _MicrosoftTeamsMessageAri extends RegisteredAri {
constructor(opts) {
- super(opts);
- this._compositeMessage = opts.resourceIdSegmentValues.compositeMessage;
+ super(opts), this._compositeMessage = opts.resourceIdSegmentValues.compositeMessage;
}
get compositeMessage() {
return this._compositeMessage;
}
@@ -388,25 +383,21 @@
var microsoftTeamsRemoteLinkAriStaticOpts = {
qualifier: "ari",
platformQualifier: "third-party",
cloudId: new RegExp("^$"),
- // eslint-disable-line no-useless-escape
resourceOwner: MicrosoftTeamsRemoteLinkAriResourceOwner,
resourceType: MicrosoftTeamsRemoteLinkAriResourceType,
resourceIdSlug: "teamId/{teamId}/channelId/{channelId}",
resourceIdSegmentFormats: {
teamId: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/,
- // eslint-disable-line no-useless-escape
channelId: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/
- // eslint-disable-line no-useless-escape
}
};
// src/microsoft.teams/remote-link/index.ts
var MicrosoftTeamsRemoteLinkAri = class _MicrosoftTeamsRemoteLinkAri extends RegisteredAri {
constructor(opts) {
- super(opts);
- this._teamId = opts.resourceIdSegmentValues.teamId, this._channelId = opts.resourceIdSegmentValues.channelId;
+ super(opts), this._teamId = opts.resourceIdSegmentValues.teamId, this._channelId = opts.resourceIdSegmentValues.channelId;
}
get teamId() {
return this._teamId;
}
@@ -438,10 +429,60 @@
channelId: this.channelId
};
}
};
+
+// src/microsoft.teams/video/types.ts
+var MicrosoftTeamsVideoAriResourceOwner = "microsoft.teams", MicrosoftTeamsVideoAriResourceType = "video";
+
+// src/microsoft.teams/video/manifest.ts
+var microsoftTeamsVideoAriStaticOpts = {
+ qualifier: "ari",
+ platformQualifier: "third-party",
+ cloudId: new RegExp("^$"),
+ resourceOwner: MicrosoftTeamsVideoAriResourceOwner,
+ resourceType: MicrosoftTeamsVideoAriResourceType,
+ resourceIdSlug: "{transcriptId}",
+ resourceIdSegmentFormats: {
+ transcriptId: /[a-zA-Z0-9+=_-]+/
+ }
+};
+
+// src/microsoft.teams/video/index.ts
+var MicrosoftTeamsVideoAri = class _MicrosoftTeamsVideoAri extends RegisteredAri {
+ constructor(opts) {
+ super(opts), this._transcriptId = opts.resourceIdSegmentValues.transcriptId;
+ }
+ get transcriptId() {
+ return this._transcriptId;
+ }
+ static create(opts) {
+ let derivedOpts = {
+ qualifier: microsoftTeamsVideoAriStaticOpts.qualifier,
+ platformQualifier: microsoftTeamsVideoAriStaticOpts.platformQualifier,
+ cloudId: void 0,
+ resourceOwner: microsoftTeamsVideoAriStaticOpts.resourceOwner,
+ resourceType: microsoftTeamsVideoAriStaticOpts.resourceType,
+ resourceId: `${opts.transcriptId}`,
+ resourceIdSegmentValues: {
+ transcriptId: opts.transcriptId
+ }
+ }, ariOpts = AriParser.fromOpts(derivedOpts, microsoftTeamsVideoAriStaticOpts);
+ return new _MicrosoftTeamsVideoAri(ariOpts);
+ }
+ static parse(maybeAri) {
+ let opts = AriParser.fromString(maybeAri, microsoftTeamsVideoAriStaticOpts);
+ return new _MicrosoftTeamsVideoAri(opts);
+ }
+ getVariables() {
+ return {
+ transcriptId: this.transcriptId
+ };
+ }
+};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
MicrosoftTeamsConversationAri,
MicrosoftTeamsMessageAri,
- MicrosoftTeamsRemoteLinkAri
+ MicrosoftTeamsRemoteLinkAri,
+ MicrosoftTeamsVideoAri
});