@omnia/fx-models
Version:
Provide Omnia Fx Models Stuffs.
102 lines (101 loc) • 2.95 kB
TypeScript
import { AppProvisioningHandler, LocalServingMessageType } from ".";
import { GuidValue } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
import { BladeMenuNavigationNode } from "./admin";
export interface OmniaHeaderMessage {
/**
* The element that will be rendered when selected
*/
elementToRender: string;
/**
* This influence the order of the nodes, be nice, use ordering with gap -100, 0, 100, 200
So other extensions etc can inject between
*/
weight: number;
}
export interface NavigationMenuNode {
/**
* The parent element to the navigation node
*/
parentNodeKey: string;
/**
* The blade menu node
*/
menuNode: BladeMenuNavigationNode;
}
export interface OmniaFooterMessage {
component: string;
order: number;
}
export interface PageEditModeMessage {
editMode: boolean;
contentEditing: boolean;
}
export interface AppTitleMessage {
title: string;
}
export interface AppProvisioningHandlerMessage {
/**
* appDefinition which this handler should be applied
*/
appDefinitionId: GuidValue;
/**
* appDefinition handler which should handle some events during app provisioning
*/
handler: AppProvisioningHandler;
/**
* This influence the order of the nodes, be nice, use ordering with gap -100, 0, 100, 200
So other extensions etc can inject between
*/
weight: number;
}
export interface TopicCreatedFunc<T> {
(created: IMessageBusTopicPublishSubscriber<T>): void;
}
export interface IMessageBusSubscriptionHandler {
/**
* Unsubscribe to the related subscription(s)
* and/or any subscriptions added using add method)
* */
unsubscribe(): any;
/**
* Adds another unsubscribe handler, all will be unsubscribed to if calling unsubscribe
* @param unSubscriptionHandler
*/
add(unSubscriptionHandler: IMessageBusSubscriptionHandler): any;
}
export interface IMessageBusTopicSubscription<T> {
subscribe: (fn: (obj: T) => void) => IMessageBusSubscriptionHandler;
}
export interface IMessageBusTopicPublication<T> {
publish: (msg: T) => void;
}
export interface IMessageBusTopicPublishSubscriber<T> extends IMessageBusTopicSubscription<T>, IMessageBusTopicPublication<T> {
}
export interface RichTextEditorExtensionMessage {
id: GuidValue;
title: string;
manifestId: GuidValue;
serviceId: GuidValue;
instance: any;
}
export interface MSTeamsChannelTabProviderMessage {
title: string;
featureId: GuidValue;
}
export interface LocalServingMessage {
type: LocalServingMessageType;
err?: {
[name: string]: any;
message: string;
stack: string;
id?: string;
frame?: string;
plugin?: string;
pluginCode?: string;
loc?: {
file?: string;
line: number;
column: number;
};
};
}