import { DateTime, Option, u32, Utc, Vec } from "./_commons"; import { PageVisitEvent } from "./PageVisitEvent"; /** * PageVisitPart describes an entire page visit for a user * Collect will send this to Metroplex at the end of each page load capturing errors, user * input and HTTP activity that happened. When Metroplex receives this it will augment the data with * some additional information and then send it to pubsub to be processed by other analytics * such as Jolt and Skids * * Note that the fields that have validation rules are applicable to Collect as it is running on * user's browsers or outside networks and is trusted less. Other fields that are used internally * are not validated. */ export interface PageVisitPart { /** * PartCounter is the counter for each part that is uploaded. The first part * from collect should be 0, then 1, then 2, etc. PartCounter is captured by * Metroplex and sent via pubsub to Silverbolt. Silverbolt doesn't keep this field, instead it * makes an array of numbers stored in a field called "Parts" * Renamed to part_counter in metroplex */ pc: u32; /** * The time that the web page visit ended. This is browser time. * Sent and generated by collect * Renamed to ended_at in metroplex */ end_at: DateTime; /** * ExpectedVideoFragSeq is the expected number of video frags available in a PageVisit. * This is a counter maintained by collect and incremented every time an rrweb is inserted * into the video frag buffer in collect * This value can be compared against PageVisitVideo.Seq to determine if there is a delta * Renamed to vid_frag_expected in metroplex */ exp_vf_seq?: Option; /** * Part counter sequence expected is the expected number of part counters available in a PageVisit. * This is a counter maintained by collect and incremented every time a page visit part is created. * Renamed to pc_seq_expected in metroplex */ exp_pc_seq?: Option; /** * Events is the list of PageVisitEvents that occurred on the page * Sent by Collect * Renamed to events in metroplex */ events: Vec; /** * Sequence number of the websocket message, this is unique across video frags, pagevisit parts and meta data parts * Renamed to message_sequence_num in metroplex */ seq_num: u32; }