@microsoft/teams.cards
Version:
<p> <a href="https://www.npmjs.com/package/@microsoft/teams.cards" target="_blank"> <img src="https://img.shields.io/npm/v/@microsoft/teams.cards/latest" /> </a> <a href="https://www.npmjs.com/package/@microsoft/teams.cards?activeTab=c
42 lines (39 loc) • 937 B
JavaScript
;
var core = require('../../core');
class InvokeAction extends core.SubmitAction {
/**
* Initial data that input fields will be combined with. These are essentially ‘hidden’ properties.
*/
data;
constructor(value, options = {}) {
super(options);
Object.assign(this, options);
this.data = { msteams: new InvokeData(value) };
}
static from(options) {
return new InvokeAction(options.data.msteams.value, options);
}
withData(value) {
super.withData({ msteams: value });
return this;
}
withValue(value) {
this.data.msteams.value = value;
return this;
}
}
class InvokeData {
type;
/**
* Set the value to send with the invoke
*/
value;
constructor(value) {
this.type = "invoke";
this.value = value;
}
}
exports.InvokeAction = InvokeAction;
exports.InvokeData = InvokeData;
//# sourceMappingURL=invoke.js.map
//# sourceMappingURL=invoke.js.map