oc · docs
documentation

@orangecheck/me-client


@orangecheck/me-client / FireEventResult

Type Alias: FireEventResult

type FireEventResult = 
  | {
  earned: true;
  escrow_mode: "simulation" | "live";
  event: BillableEvent;
  idempotent_replay?: boolean;
  ok: true;
  simulation_mode_note?: string;
  webhooks_fired: number;
}
  | {
  detail: string;
  earned: false;
  next_pay_period: PayPeriod | null;
  ok: true;
  reason: "not_paying";
};

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

What oc.event.fire answers.

Union Members

Type Literal

{
  earned: true;
  escrow_mode: "simulation" | "live";
  event: BillableEvent;
  idempotent_replay?: boolean;
  ok: true;
  simulation_mode_note?: string;
  webhooks_fired: number;
}
NameTypeDescriptionDefined in
earnedtrueThe event earned the user their share and charged the project.me-client/src/event.ts:118
escrow_mode"simulation" | "live"-me-client/src/event.ts:121
eventBillableEvent-me-client/src/event.ts:119
idempotent_replay?booleanSet when the same Idempotency-Key already landed: event is the prior one.me-client/src/event.ts:123
oktrue-me-client/src/event.ts:116
simulation_mode_note?string-me-client/src/event.ts:124
webhooks_firednumber-me-client/src/event.ts:120

Type Literal

{
  detail: string;
  earned: false;
  next_pay_period: PayPeriod | null;
  ok: true;
  reason: "not_paying";
}
NameTypeDescriptionDefined in
detailstring-me-client/src/event.ts:131
earnedfalseThe project isn't paying its users now. Nothing recorded or charged.me-client/src/event.ts:129
next_pay_periodPayPeriod | nullThe next pay period, or null when none is scheduled.me-client/src/event.ts:133
oktrue-me-client/src/event.ts:127
reason"not_paying"-me-client/src/event.ts:130