Skip to content

Variable: SendAndWaitResultSchema

const SendAndWaitResultSchema: ZodObject<{
  reply: ZodNullable<ZodObject<{
     a2a_cleartext: ZodOptional<ZodLiteral<true>>;
     a2a_cleartext_notice: ZodOptional<ZodString>;
     catch_up: ZodOptional<ZodObject<{
        epoch: ZodNumber;
        evicted: ZodBoolean;
        processed: ZodNumber;
     }, $strip>>;
     content_type: ZodOptional<ZodNullable<ZodString>>;
     context_only: ZodOptional<ZodNullable<ZodString>>;
     conversation_id: ZodGUID;
     created_at: ZodISODateTime;
     decrypt_error: ZodOptional<ZodNullable<ZodString>>;
     decrypt_error_code: ZodOptional<ZodNullable<ZodString>>;
     delivered_at: ZodOptional<ZodNullable<ZodISODateTime>>;
     direction: ZodOptional<ZodEnum<{
        received: "received";
        sent: "sent";
     }>>;
     encrypted_payload: ZodString;
     encryption_version: ZodString;
     from_agent_id: ZodOptional<ZodNullable<ZodGUID>>;
     group_handle: ZodOptional<ZodNullable<ZodString>>;
     group_id: ZodOptional<ZodNullable<ZodGUID>>;
     id: ZodGUID;
     key_changed: ZodOptional<ZodObject<{
        agent_id: ZodString;
        current_fingerprint: ZodString;
        previous_fingerprint: ZodString;
     }, $strip>>;
     metadata: ZodDefault<ZodRecord<ZodString, ZodUnknown>>;
     plaintext: ZodOptional<ZodNullable<ZodUnknown>>;
     read_at: ZodOptional<ZodNullable<ZodISODateTime>>;
     recipient_handle: ZodOptional<ZodNullable<ZodString>>;
     self_encrypted_payload: ZodOptional<ZodNullable<ZodString>>;
     sender_handle: ZodOptional<ZodNullable<ZodString>>;
     sender_kid: ZodOptional<ZodNullable<ZodString>>;
     sender_signing_kid: ZodOptional<ZodNullable<ZodString>>;
     status: ZodOptional<ZodEnum<{
        delivered: "delivered";
        new: "new";
        read: "read";
     }>>;
     to_agent_id: ZodOptional<ZodNullable<ZodGUID>>;
     type: ZodString;
     unreadable_by_orgs: ZodOptional<ZodNumber>;
     verification_status: ZodDefault<ZodEnum<{
        invalid: "invalid";
        sender-mismatch: "sender-mismatch";
        unverifiable: "unverifiable";
        verified: "verified";
     }>>;
     verified: ZodDefault<ZodBoolean>;
     verifying_key: ZodOptional<ZodNullable<ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>>;
  }, $strip>>;
  sent: ZodObject<{
     content_type: ZodOptional<ZodNullable<ZodString>>;
     context_only: ZodOptional<ZodNullable<ZodString>>;
     conversation_id: ZodGUID;
     created_at: ZodISODateTime;
     delivered_at: ZodOptional<ZodNullable<ZodISODateTime>>;
     direction: ZodOptional<ZodEnum<{
        received: "received";
        sent: "sent";
     }>>;
     encrypted_payload: ZodString;
     encryption_version: ZodString;
     from_agent_id: ZodOptional<ZodNullable<ZodGUID>>;
     group_handle: ZodOptional<ZodNullable<ZodString>>;
     group_id: ZodOptional<ZodNullable<ZodGUID>>;
     id: ZodGUID;
     metadata: ZodDefault<ZodRecord<ZodString, ZodUnknown>>;
     read_at: ZodOptional<ZodNullable<ZodISODateTime>>;
     recipient_handle: ZodOptional<ZodNullable<ZodString>>;
     self_encrypted_payload: ZodOptional<ZodNullable<ZodString>>;
     sender_handle: ZodOptional<ZodNullable<ZodString>>;
     sender_signing_kid: ZodOptional<ZodNullable<ZodString>>;
     status: ZodOptional<ZodEnum<{
        delivered: "delivered";
        new: "new";
        read: "read";
     }>>;
     to_agent_id: ZodOptional<ZodNullable<ZodGUID>>;
     type: ZodString;
     unreadable_by_orgs: ZodOptional<ZodNumber>;
  }, $strip>;
}, $strip>;

Defined in: rine-ts-sdk/src/types.ts:653

Wire-format Zod schema for { sent, reply } — retained for symmetry with the other *Schema exports even though the resource layer no longer calls parse(SendAndWaitResultSchema, …) directly (Step 19 replaced that with an explicit object literal so the generic Rep narrowing could flow through). The hand-rolled SendAndWaitResult<Rep> below is the type client.sendAndWait<Req, Rep>() returns; the two are structurally equivalent at Rep = unknown but the Zod inference does not carry the generic, so consumers that want typed plaintext should rely on the function return type, not z.infer<typeof SendAndWaitResultSchema>.