@databutton/firebase-types 1.59.4 → 1.59.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Timestamp } from "firebase/firestore";
|
|
2
|
+
import { JsonObject } from "type-fest";
|
|
2
3
|
/**
|
|
3
4
|
* Types here should reflect data format stored in firestore and
|
|
4
5
|
* either be backwards-compatible or migrated when needed
|
|
@@ -838,7 +839,7 @@ export interface ProjectContext extends ContextBase {
|
|
|
838
839
|
type: "project";
|
|
839
840
|
}
|
|
840
841
|
export type ThreadContext = ComponentContext | ProjectContext;
|
|
841
|
-
export interface
|
|
842
|
+
export interface DatabutlerMessage {
|
|
842
843
|
sentBy: PerformedBy;
|
|
843
844
|
displayName: string;
|
|
844
845
|
content: string;
|
|
@@ -846,6 +847,12 @@ export interface Message {
|
|
|
846
847
|
visibleToUser: boolean;
|
|
847
848
|
suggestedActions: SuggestedAction[];
|
|
848
849
|
}
|
|
850
|
+
export interface ContextMessage<T = JsonObject> {
|
|
851
|
+
type: "context";
|
|
852
|
+
createdBy: PerformedBy;
|
|
853
|
+
message: T;
|
|
854
|
+
}
|
|
855
|
+
export type Message<T> = DatabutlerMessage | ContextMessage<T>;
|
|
849
856
|
export type SuggestedAction = {
|
|
850
857
|
type: "install-package";
|
|
851
858
|
packages: string[];
|