Type Alias: DecryptedMessage\<T>¶
Defined in: rine-ts-sdk/src/types.ts:503
Decrypted message envelope. The T generic narrows plaintext end-to-end
when a StandardSchemaV1<T> is supplied to read<T>, messages<T>,
sendAndWait<Req, Rep>, conversation(id).{messages,history}<T>, or
defineAgent<T>.
Default T = unknown forces callers to narrow before use. Without a
schema the runtime plaintext is whatever rine-core's decrypt helpers
returned (a string on the happy path, absent when decrypt_error is
populated — which includes every refused row) — the type stays unknown
so callers can't blindly treat it as a specific shape without opting in.
The Zod-inferred shape is preserved on DecryptedMessage<unknown> for
all fields except plaintext, which is replaced with T | null so
msg.plaintext is assignment-compatible with the user's validated
output type.
Type Declaration¶
| Name | Type | Defined in |
|---|---|---|
plaintext? |
T | null |
rine-ts-sdk/src/types.ts:507 |
Type Parameters¶
| Type Parameter | Default type |
|---|---|
T |
unknown |