External services · rule
package.wire_invalid
Field says how it is sent in a way it can't.
Area 11, External services; not declinable; the next step is usually the agent's.
A provider package's field says how it is sent with
wire:, one of the built-in encodings, or with its package's owndecode:andencode:functions, given together. Either is refused outside a provider package, both on one field, an encoding that doesn't hold the field's type orWire.minor_unitswithout the field's one currency, and a function that isn't the package's or doesn't take and give the right types.wire_parts:is refused on a type not made of parts, beside another way of sending the field, with a part left out, unknown or given twice, or a spelling that isn't text.
An encoding holds the types its provider sends that way:
/// A parcel and where it is.public type Parcel = Object { status: Text collected_on: Text { wire: Wire.unix_seconds }}
error: `Wire.unix_seconds` sends an `Instant`, and `collected_on` is a `Text` --> shared/providers/acme_couriers/v1/types/parcel.jadpo:5:15 |5 | wire: Wire.unix_seconds | ^^^^^^^^^^^^^^^^^ a `Text` field reason: `Wire.unix_seconds` is how a provider sends an `Instant`; a field of another type is sent as the contract writes it, in another encoding, or by the package's own `decode:` and `encode:` functions. next: Name the encoding the provider sends a `Text` in, or remove `wire:` (agent) rule: package.wire_invalid help: https://jadpo.dev/docs/errors/package.wire_invalidcheck failed: 1 error, 4 files
Markdown for agents: /docs/errors/package.wire_invalid.md.Built from Jadpo main at a707efb.