Skip to content

Latest commit

 

History

History
25 lines (20 loc) · 6.13 KB

requestbody.md

File metadata and controls

25 lines (20 loc) · 6.13 KB

RequestBody

Example Usage

import { RequestBody } from "@vercel/sdk/models/recordeventsop.js";

let value: RequestBody = {
  sessionId: "<id>",
  source: "REMOTE",
  event: "HIT",
  hash: "12HKQaOmR5t5Uy6vdcQsNIiZgHGB",
  duration: 400,
};

Fields

Field Type Required Description Example
sessionId string ✔️ A UUID (universally unique identifer) for the session that generated this event.
source models.Source ✔️ One of LOCAL or REMOTE. LOCAL specifies that the cache event was from the user's filesystem cache. REMOTE specifies that the cache event is from a remote cache.
event models.Event ✔️ One of HIT or MISS. HIT specifies that a cached artifact for hash was found in the cache. MISS specifies that a cached artifact with hash was not found.
hash string ✔️ The artifact hash 12HKQaOmR5t5Uy6vdcQsNIiZgHGB
duration number The time taken to generate the artifact. This should be sent as a body parameter on HIT events. 400