Skip to content
Meeko
Type to search the guides and the API reference. Open it from any page with / or Ctrl K; move with the arrow keys and open a result with Enter.
Get started

Contents

On this page

Not translated yet

This page has not been translated into English yet, so it is shown in Spanish.

UncertainMutation

interfaz Since 1.2.0

Una intención enviada sin respuesta: el servidor pudo aplicarla o no. La expone RetrySafeMutation.uncertain.

ts
import type { UncertainMutation } from "@meekojs/meeko/framework";

Source code src/app/runtime/mutations.ts:144

Declaración #

ts
interface UncertainMutation<Input> {
	readonly idempotencyKey: string
	readonly input: Input
	readonly startedAt: number
}

Type parameters #

Input

Entrada de la mutación.

Example #

ts
import type { UncertainMutation } from "@meekojs/meeko/framework";

function describe(intent: UncertainMutation<{ totalCents: number }>): string {
  const minutes = Math.round((Date.now() - intent.startedAt) / 60_000);
  return `Venta de ${intent.input.totalCents / 100} € sin confirmar desde hace ${minutes} min`;
}

Propiedades #

idempotencyKey #

propiedad sólo lectura

readonly idempotencyKey: string

UUID que viaja en la cabecera Idempotency-Key; es el mismo en cada reintento.

input #

propiedad sólo lectura

readonly input: Input

Entrada que se envió, tal como viaja en JSON.

startedAt #

propiedad sólo lectura

readonly startedAt: number

Momento del primer envío, en milisegundos desde la época Unix (Date.now()).

Was this page helpful?

Add a comment

It is sent when you choose “Yes” or “No”. Only the page, your answer and the comment are stored: no cookies and no personal data.

0 of 2000 characters

Edit on GitHub: packages/meeko/src/app/runtime/mutations.ts