oc · docs
documentation

@orangecheck/me-client


@orangecheck/me-client / BatchEventResult

Type Alias: BatchEventResult

type BatchEventResult = 
  | {
  event: BillableEvent;
  index: number;
  status: "recorded";
}
  | {
  event: BillableEvent;
  index: number;
  status: "duplicate";
}
  | {
  index: number;
  reason: string;
  status: "rejected";
}
  | {
  index: number;
  status: "not_paying";
};

Defined in: me-client/src/event.ts:255

Per-event result inside the batch response. Status codes:

  • recorded · the event landed; event is the canonical billable payload exactly as a per-event POST would return.
  • duplicate · idempotency-key matched a prior event; event is the prior payload.
  • rejected · validation or site-cap failure; reason is human- readable. The other events in the batch are unaffected.
  • not_paying · the project isn't paying its users now; nothing was recorded or charged.