cleaning up old files breaking deployment
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
import { Timestamp } from "firebase/firestore";
|
||||
|
||||
export default class Announcement {
|
||||
id: string;
|
||||
teamId: string;
|
||||
audioDataUrl: string; // link to cloud storage file
|
||||
|
||||
state: AnnouncementState = AnnouncementState.active;
|
||||
|
||||
createdByUserId: string;
|
||||
createdDate: Timestamp;
|
||||
lastUpdatedDate: Timestamp;
|
||||
|
||||
constructor(_audioUrl: string, _teamId: string, _createdByUserId: string) {
|
||||
this.audioDataUrl = _audioUrl;
|
||||
this.createdByUserId = _createdByUserId;
|
||||
this.teamId = _teamId;
|
||||
}
|
||||
}
|
||||
|
||||
export enum AnnouncementState {
|
||||
active = "active",
|
||||
resolved = "resolved",
|
||||
deleted = "deleted",
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
export default class ConversationData { // want all of the contents of a
|
||||
conversation in one place for the frontend // need all of the content items in
|
||||
the conversation for the past week // can be audio clip or link for now // if
|
||||
user wants more data, click button to fetch further back // see if this convo is
|
||||
a priority one // all users in the conversation: userId's perhaps, but the
|
||||
actual user we can get from the relevantUsersCache map // want to create
|
||||
individual convo chunks...if I send three messages in a row, it should show my
|
||||
name and only one click to listen to all three in order
|
||||
|
||||
// B - conversations - last activity date - update cache item for when last time
|
||||
this conversation had something going on (new link, new room, new clip...) AND
|
||||
other users just subscribe to this published source - last audioClip url - last
|
||||
// -> users - A -> last interaction date // -> audioClips - c // -> links // ->
|
||||
live }
|
||||
|
||||
# Listeners
|
||||
|
||||
### A - listener for all - users within conversation documents
|
||||
|
||||
### B - listener for changes to overall top level convo details
|
||||
|
||||
### C - get once audio messages for a relevant conversation - maybe last 3 messages
|
||||
|
||||
### D - get once latest links for all relevant conversations
|
||||
|
||||
### F - live room listener - for all relevant convos, stay up to date on the live rooms associated
|
||||
|
||||
// one map: all relevant users, a map we build based on where the user visits
|
||||
|
||||
// one map: conversation id -> conversationData as above to get everything
|
||||
relevant // fetch only all convos in last 90 days // search for any other ones
|
||||
in the search bar
|
||||
|
||||
// filter selector to get live convos // filter selector to get all priority
|
||||
convos // filter selector to get all later convos // filter selector to get all
|
||||
done convos
|
||||
|
||||
// filter selector to get a map of default "inbox" conversations: // go through
|
||||
all conversations in the conversation map and place in right category /\*\*
|
||||
|
||||
- {
|
||||
- "Today": [if latest message was today],
|
||||
- "Last 7 Days": [if convo last message was > day - 7],
|
||||
- "earlier this month": [...not in above two, but still > day - 30],
|
||||
- "mm yyyy": [create these if convo is older than the last threshold]
|
||||
- } \*/
|
||||
|
||||
//
|
||||
@@ -1,7 +0,0 @@
|
||||
export default interface IFirestoreSerializable {
|
||||
id: string;
|
||||
|
||||
serialize: () => {};
|
||||
|
||||
// deserialize: (firestoreData: {}) => {};
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
import { Timestamp } from "firebase/firestore";
|
||||
|
||||
export default class Link {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
link: string; //url for file
|
||||
|
||||
state: LinkState = LinkState.active;
|
||||
type: LinkType;
|
||||
|
||||
teamId: string;
|
||||
// if it's not a teamAttachment, then have a list of members who it's for
|
||||
recipients: string[]; // userIds
|
||||
|
||||
createdByUserId: string;
|
||||
createdDate: Timestamp;
|
||||
|
||||
constructor(
|
||||
_name: string,
|
||||
_description: string,
|
||||
_link: string,
|
||||
_teamId: string,
|
||||
recipientsArr: string[],
|
||||
_createdByUserId: string
|
||||
) {
|
||||
this.name = _name;
|
||||
this.description = _description;
|
||||
this.link = _link;
|
||||
this.teamId = _teamId;
|
||||
this.recipients = recipientsArr;
|
||||
this.createdByUserId = _createdByUserId;
|
||||
|
||||
if (!recipientsArr || recipientsArr?.length == 0) {
|
||||
this.recipients = null;
|
||||
} else {
|
||||
this.recipients = recipientsArr;
|
||||
}
|
||||
|
||||
this.type = Link.getLinkType(_link);
|
||||
}
|
||||
|
||||
static getLinkType(url: string): LinkType {
|
||||
if (url.includes(LinkType.github)) {
|
||||
return LinkType.github;
|
||||
} else if (url.includes(LinkType.atlassian)) {
|
||||
return LinkType.atlassian;
|
||||
} else if (
|
||||
url.includes(LinkType.googleDrive) ||
|
||||
url.includes("docs.google")
|
||||
) {
|
||||
return LinkType.googleDrive;
|
||||
} else if (
|
||||
url.includes(".png") ||
|
||||
url.includes(".jpg") ||
|
||||
url.includes(".svg") ||
|
||||
url.includes(".gif") ||
|
||||
url.includes(LinkType.pastePics)
|
||||
) {
|
||||
return LinkType.image;
|
||||
} else if (url.includes(LinkType.pdf)) {
|
||||
return LinkType.pdf;
|
||||
} else if (url.includes(LinkType.codePile)) {
|
||||
return LinkType.codePile;
|
||||
} else {
|
||||
return LinkType.default;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export enum LinkState {
|
||||
active = "active",
|
||||
archived = "archived",
|
||||
deleted = "deleted",
|
||||
}
|
||||
|
||||
export enum LinkType {
|
||||
default = "default",
|
||||
github = "github",
|
||||
atlassian = "atlassian",
|
||||
googleDrive = "drive.google",
|
||||
onedrive = "onedrive",
|
||||
image = "image",
|
||||
pdf = "pdf",
|
||||
codePile = "codepile",
|
||||
pastePics = "paste.pics",
|
||||
googleMeet = "googleMeet",
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
import { Timestamp } from "firebase/firestore";
|
||||
|
||||
export class Message {
|
||||
id: string;
|
||||
audioDataUrl: string;
|
||||
|
||||
senderUserId: string;
|
||||
receiverUserId: string;
|
||||
|
||||
senderReceiver: string[]; // composite to make querying easier in the future
|
||||
|
||||
createdDate: Timestamp;
|
||||
|
||||
// firstListenDate: Timestamp;
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
import { Timestamp } from "firebase/firestore";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
|
||||
export default class OfficeRoom {
|
||||
id: string = uuidv4();
|
||||
|
||||
teamId: string;
|
||||
|
||||
name: string; // entrance, kitchen, etc.
|
||||
|
||||
createdDate: Timestamp;
|
||||
createdByUserId: string;
|
||||
|
||||
lastUpdatedDate: Timestamp;
|
||||
|
||||
members: string[] = []; // id's of users in the office room
|
||||
|
||||
state: OfficeRoomState;
|
||||
|
||||
constructor(
|
||||
_name: string,
|
||||
_teamId: string,
|
||||
_createdBy: string,
|
||||
_state: OfficeRoomState = OfficeRoomState.idle
|
||||
) {
|
||||
this.name = _name;
|
||||
this.teamId = _teamId;
|
||||
this.createdByUserId = _createdBy;
|
||||
this.state = _state;
|
||||
}
|
||||
}
|
||||
|
||||
export enum OfficeRoomState {
|
||||
active = "active",
|
||||
idle = "idle",
|
||||
archived = "archived",
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
import { Timestamp } from "firebase/firestore";
|
||||
|
||||
export default class Room {
|
||||
id: string;
|
||||
|
||||
name: string;
|
||||
description: string;
|
||||
|
||||
link: string; // google meet link for now
|
||||
|
||||
members: string[] = []; //userIds of "mandatory"/invited people including the person who created it
|
||||
|
||||
membersInRoom: string[] = [];
|
||||
|
||||
attachments: string[] = []; // the links themselves (NOT Ids)...there will be duplicate entries in the attachments table which will be created
|
||||
|
||||
type: RoomType;
|
||||
status: RoomStatus = RoomStatus.empty;
|
||||
|
||||
approximateDateTime: string; // vaguely say when the meeting should be...give user pointers
|
||||
scheduledDateTime: Timestamp;
|
||||
|
||||
// scheduledJsDateTime(): Date {
|
||||
// return this.scheduledDateTime.toDate();
|
||||
// }
|
||||
|
||||
createdDate: Timestamp;
|
||||
|
||||
// createdJsDate(): Date {
|
||||
// return this.createdDate.toDate();
|
||||
// }
|
||||
|
||||
createdByUserId: string;
|
||||
|
||||
teamId: string;
|
||||
|
||||
lastUpdatedDate: Timestamp;
|
||||
}
|
||||
|
||||
export enum RoomType {
|
||||
now = "now",
|
||||
scheduled = "scheduled", // one time sort of standard meeting
|
||||
recurring = "recurring", //daily standup
|
||||
}
|
||||
|
||||
export enum RoomStatus {
|
||||
live = "live",
|
||||
empty = "empty",
|
||||
archived = "archived", // user marks it over
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
import { Timestamp } from "firebase/firestore";
|
||||
|
||||
export class Team {
|
||||
id: string;
|
||||
name: string;
|
||||
|
||||
status: TeamStatus;
|
||||
|
||||
allowedUserCount: number = 2;
|
||||
// subscriptionPlan: TeamSubscriptionPlan = TeamSubscriptionPlan.basic
|
||||
|
||||
companySite: string;
|
||||
|
||||
createdByUserId: string;
|
||||
createdDate: Timestamp;
|
||||
|
||||
lastUpdatedDate: Timestamp;
|
||||
}
|
||||
|
||||
export enum TeamStatus {
|
||||
created = "created",
|
||||
deactivated = "deactivated",
|
||||
deleted = "deleted",
|
||||
}
|
||||
|
||||
export enum TeamSubscriptionPlan {
|
||||
free = "free",
|
||||
basic = "basic",
|
||||
pro = "pro",
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
import { Timestamp } from "firebase/firestore";
|
||||
|
||||
export class TeamMember {
|
||||
id: string;
|
||||
userId: string;
|
||||
teamId: string;
|
||||
|
||||
inviteEmailAddress: string;
|
||||
invitedByUserId: string;
|
||||
|
||||
role: TeamMemberRole
|
||||
status: TeamMemberStatus
|
||||
|
||||
createdDate: Timestamp
|
||||
lastUpdatedDate: Timestamp
|
||||
}
|
||||
|
||||
export enum TeamMemberRole {
|
||||
admin = "admin"
|
||||
}
|
||||
|
||||
export enum TeamMemberStatus {
|
||||
invited = "invited",
|
||||
activated = "activated",
|
||||
deleted = "deleted"
|
||||
}
|
||||
Reference in New Issue
Block a user