bend-kit-migrate Releases (3): 0.3.0.0 0xc0d27ed88527f11fd9706ba756b69e38 indexed https://jend.leeeet.dev/files.txt?path=bend-kit-migrate@0.3.0.0 0.2.0.0 0x64bbf235e9a99d31fff160a5d739d76f unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-migrate@0.2.0.0 0.1.0.0 0x5ec377f85ba0d099c65e72579a481a8e unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-migrate@0.1.0.0 Definitions (104, 1 to 100 shown): Migrate.Period (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Period) type Period is Data: Monthly{} Yearly{} Migrate.Status (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Status) type Status is Data: Active{} Paused{} Cancelled{} Migrate.V1 (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=V1) # v1: a monthly price and an on/off flag. type V1 is Type: V1{id: U32, plan: Bytes.Bytes, monthly_cents: U32, active: Bool} Migrate.V2 (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=V2) # v2: a price per billing period, a three-state status, and an optional support note. type V2 is Type: V2{id: U32, plan: Bytes.Bytes, cents: U32, period: Period, status: Status, note: Maybe<&1, Bytes.Bytes>} Migrate.V3 (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=V3) # v3: v2 without the support note. type V3 is Type: V3{id: U32, plan: Bytes.Bytes, cents: U32, period: Period, status: Status} Migrate.Record (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Record) # A decoded record and the version it was written in. type Record is Type: R1{r: V1} R2{r: V2} R3{r: V3} Migrate.Terms (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Terms) # What a subscription means to billing: who, which plan, the price per period, and the status. type Terms is Type: Terms{id: U32, plan: Bytes.Bytes, cents: U32, period: Period, status: Status} Migrate.Dropped (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Dropped) # What v2 to v3 discards. type Dropped is Type: Dropped{note: Maybe<&1, Bytes.Bytes>} Migrate.Key (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Key) # The JSON field names of every version. type Key is Data: KVersion{} KId{} KPlan{} KMonthlyCents{} KActive{} KCents{} KPeriod{} KStatus{} KNote{} Migrate.Error (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Error) type Error is Type: Malformed{} Unsupported{version: U32} Unknown{key: Bytes.Bytes} Unexpected{key: Key} Duplicate{key: Key} Missing{key: Key} BadField{key: Key} Invalid{key: Key} NotInV1{key: Key} Migrate.Status.of_active (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Status.of_active) # v1 had no pause: an inactive v1 subscription is cancelled. def Status.of_active(a: Bool) -> Status: Migrate.V1.terms (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=V1.terms) def V1.terms(r: V1) -> Terms: Migrate.V2.terms (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=V2.terms) def V2.terms(r: V2) -> Terms: Migrate.V3.terms (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=V3.terms) def V3.terms(r: V3) -> Terms: Migrate.Record.terms (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Record.terms) def Record.terms(r: Record) -> Terms: Migrate.Terms.problem (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Terms.problem) # The first business rule broken by a plan of len bytes and a price of c: an empty plan or a zero price. def Terms.problem(+len: U32, +c: U32) -> Maybe<&2, Key>: Migrate.none (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=none) def none(m: Maybe<&2, Key>) -> Bool: Migrate.Terms.valid (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Terms.valid) def Terms.valid(t: Terms) -> Bool: Migrate.Record.problem (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Record.problem) # The record back, and the first business rule it breaks. def Record.problem(r: Record) -> Record & Maybe<&2, Key>: Migrate.Record.valid.of (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Record.valid.of) def Record.valid.of(p: Record & Maybe<&2, Key>) -> Bool: Migrate.Record.valid (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Record.valid) def Record.valid(r: Record) -> Bool: Migrate.V1.up (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=V1.up) # v1 to v2. Total; V2.down undoes it. def V1.up(r: V1) -> V2: Migrate.V2.down.note (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=V2.down.note) def V2.down.note(n: Maybe<&1, Bytes.Bytes>, i: U32, p: Bytes.Bytes, c: U32, a: Bool) -> Result<&1, &1, Error, V1>: Migrate.V2.down.status (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=V2.down.status) def V2.down.status(s: Status, i: U32, p: Bytes.Bytes, c: U32, n: Maybe<&1, Bytes.Bytes>) -> Result<&1, &1, Error, V1>: Migrate.V2.down.period (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=V2.down.period) def V2.down.period(pe: Period, i: U32, p: Bytes.Bytes, c: U32, s: Status, n: Maybe<&1, Bytes.Bytes>) -> Result<&1, &1, Error, V1>: Migrate.V2.down (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=V2.down) # v2 to v1, for a monthly record that is not paused and has no note. def V2.down(r: V2) -> Result<&1, &1, Error, V1>: Migrate.V2.up (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=V2.up) # v2 to v3. Lossy: it drops the note and returns it. def V2.up(r: V2) -> V3 & Dropped: Migrate.V3.restore (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=V3.restore) # The v2 record that V2.up turned into r and d. def V3.restore(r: V3, d: Dropped) -> V2: Migrate.V3.down (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=V3.down) # v3 to v2, with no note. def V3.down(r: V3) -> V2: Migrate.Record.upgrade (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Record.upgrade) # Any version to v3, with what the chain dropped. def Record.upgrade(r: Record) -> V3 & Dropped: Migrate.Tag (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Tag) # A name of at most 16 bytes: its length and its first four little-endian words, zero past the end. type Tag is Data: Tag{len: U32, w0: U32, w1: U32, w2: U32, w3: U32} Migrate.Tag.eq (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Tag.eq) def Tag.eq(a: Tag, b: Tag) -> Bool: Migrate.Tag.word (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Tag.word) def Tag.word(ok: Bool, a: Array, +i: U32) -> Array & U32: Migrate.Tag.of.w3 (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Tag.of.w3) def Tag.of.w3(+len: U32, +w0: U32, +w1: U32, +w2: U32, r: Array & U32) -> Bytes.Bytes & Tag: Migrate.Tag.of.w2 (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Tag.of.w2) def Tag.of.w2(+len: U32, +n: U32, +w0: U32, +w1: U32, r: Array & U32) -> Bytes.Bytes & Tag: Migrate.Tag.of.w1 (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Tag.of.w1) def Tag.of.w1(+len: U32, +n: U32, +w0: U32, r: Array & U32) -> Bytes.Bytes & Tag: Migrate.Tag.of.w0 (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Tag.of.w0) def Tag.of.w0(+len: U32, +n: U32, r: Array & U32) -> Bytes.Bytes & Tag: Migrate.Tag.of (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Tag.of) # The bytes back, and their tag. Bytes past 16 are not read, but the length still differs. def Tag.of(b: Bytes.Bytes) -> Bytes.Bytes & Tag: Migrate.Tag.set (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Tag.set) def Tag.set(ok: Bool, a: Array, +i: U32, +w: U32) -> Array: Migrate.Tag.bytes (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Tag.bytes) def Tag.bytes(t: Tag) -> Bytes.Bytes: Migrate.Key.tag (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Key.tag) def Key.tag(k: Key) -> Tag: Migrate.Key.bytes (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Key.bytes) # The key as UTF-8 JSON text. def Key.bytes(k: Key) -> Bytes.Bytes: Migrate.Key.is (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Key.is) def Key.is(k: Key, +t: Tag, rest: Maybe<&2, Key>) -> Maybe<&2, Key>: Migrate.Key.find (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Key.find) def Key.find(+t: Tag) -> Maybe<&2, Key>: Migrate.Period.tag (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Period.tag) def Period.tag(p: Period) -> Tag: Migrate.Status.tag (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Status.tag) def Status.tag(s: Status) -> Tag: Migrate.Period.find (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Period.find) def Period.find(+t: Tag) -> Maybe<&2, Period>: Migrate.Status.find (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Status.find) def Status.find(+t: Tag) -> Maybe<&2, Status>: Migrate.u32.over (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=u32.over) def u32.over(+acc: U32, +d: U32) -> Bool: Migrate.u32.end (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=u32.end) def u32.end(ok: Bool, +acc: U32) -> Maybe<&2, U32>: Migrate.u32.go (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=u32.go) def u32.go(n: Nat, r: Array & U32, +i: U32, +acc: U32, ok: Bool) -> Maybe<&2, U32>: Migrate.u32.first (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=u32.first) def u32.first(+len: U32, r: Array & U32) -> Maybe<&2, U32>: Migrate.u32.read (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=u32.read) # Decimal digits with no sign, fraction, exponent, or leading zero, below 2^32. def u32.read(b: Bytes.Bytes) -> Maybe<&2, U32>: Migrate.u32.width (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=u32.width) def u32.width(+n: U32) -> U32: Migrate.u32.fill (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=u32.fill) def u32.fill(f: Nat, a: Array, +i: U32, +n: U32) -> Array: Migrate.u32.text (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=u32.text) # n in decimal digits. def u32.text(+n: U32) -> Bytes.Bytes: Migrate.Scalar (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Scalar) # A JSON field value, reduced to what records use. A number keeps its digits until the record is built. type Scalar is Type: SNum{s: Bytes.Bytes} SStr{s: Bytes.Bytes} SFlag{b: Bool} SOther{} Migrate.scalar (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=scalar) def scalar(v: Json.Val) -> Scalar: Migrate.Slots (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Slots) # Every field of a record object, by key, before the version picks which ones it allows. type Slots is Type: Slots{version: Maybe<&1, Scalar>, id: Maybe<&1, Scalar>, plan: Maybe<&1, Scalar>, monthly_cents: Maybe<&1, Scalar>, active: Maybe<&1, Scalar>, cents: Maybe<&1, Scalar>, period: Maybe<&1, Scalar>, status: Maybe<&1, Scalar>, note: Maybe<&1, Scalar>} Migrate.Slots.empty (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Slots.empty) def Slots.empty() -> Slots: Migrate.slot.fill (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=slot.fill) def slot.fill(m: Maybe<&1, Scalar>, x: Scalar, k: Key) -> Result<&1, &1, Error, Maybe<&1, Scalar>>: Migrate.Slots.set (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Slots.set) def Slots.set(k: Key, x: Scalar, s: Slots) -> Result<&1, &1, Error, Slots>: Migrate.Slots.put (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Slots.put) def Slots.put(m: Maybe<&2, Key>, k: Bytes.Bytes, x: Scalar, s: Slots) -> Result<&1, &1, Error, Slots>: Migrate.Slots.key (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Slots.key) def Slots.key(p: Bytes.Bytes & Tag, x: Scalar, s: Slots) -> Result<&1, &1, Error, Slots>: Migrate.collect.put (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=collect.put) def collect.put(acc: Result<&1, &1, Error, Slots>, k: Bytes.Bytes, v: Json.Val) -> Result<&1, &1, Error, Slots>: Migrate.collect (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=collect) # Files each field under its key. An unknown or repeated key stops the walk. def collect(kvs: List<&1, Bytes.Bytes & Json.Val>, acc: Result<&1, &1, Error, Slots>) -> Result<&1, &1, Error, Slots>: Migrate.need.num (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=need.num) def need.num(m: Maybe<&1, Scalar>, k: Key) -> Result<&1, &1, Error, Bytes.Bytes>: Migrate.need.flag (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=need.flag) def need.flag(m: Maybe<&1, Scalar>, k: Key) -> Result<&1, &1, Error, Bool>: Migrate.need.str (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=need.str) def need.str(m: Maybe<&1, Scalar>, k: Key) -> Result<&1, &1, Error, Bytes.Bytes>: Migrate.opt.str (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=opt.str) def opt.str(m: Maybe<&1, Scalar>, k: Key) -> Result<&1, &1, Error, Maybe<&1, Bytes.Bytes>>: Migrate.unexpected (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=unexpected) # A field that this version does not define. def unexpected(m: Maybe<&1, Scalar>, k: Key) -> Result<&1, &1, Error, Unit>: Migrate.found (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=found) def found(-A: Data, m: Maybe<&2, A>, k: Key) -> Result<&1, &1, Error, A>: Migrate.name.period (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=name.period) def name.period(p: Bytes.Bytes & Tag) -> Result<&1, &1, Error, Period>: Migrate.name.status (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=name.status) def name.status(p: Bytes.Bytes & Tag) -> Result<&1, &1, Error, Status>: Migrate.need.period (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=need.period) def need.period(m: Maybe<&1, Scalar>) -> Result<&1, &1, Error, Period>: Migrate.opt.period (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=opt.period) # An absent v2 period is monthly. def opt.period(m: Maybe<&1, Scalar>) -> Result<&1, &1, Error, Period>: Migrate.need.status (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=need.status) def need.status(m: Maybe<&1, Scalar>) -> Result<&1, &1, Error, Status>: Migrate.V1.finish (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=V1.finish) def V1.finish(mi: Maybe<&2, U32>, p: Bytes.Bytes, mc: Maybe<&2, U32>, a: Bool) -> Result<&1, &1, Error, Record>: Migrate.build.v1 (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=build.v1) def build.v1(s: Slots) -> Result<&1, &1, Error, Record>: Migrate.V2.finish (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=V2.finish) def V2.finish(mi: Maybe<&2, U32>, p: Bytes.Bytes, mc: Maybe<&2, U32>, pe: Period, s: Status, n: Maybe<&1, Bytes.Bytes>) -> Result<&1, &1, Error, Record>: Migrate.build.v2 (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=build.v2) def build.v2(s: Slots) -> Result<&1, &1, Error, Record>: Migrate.V3.finish (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=V3.finish) def V3.finish(mi: Maybe<&2, U32>, p: Bytes.Bytes, mc: Maybe<&2, U32>, pe: Period, s: Status) -> Result<&1, &1, Error, Record>: Migrate.build.v3 (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=build.v3) def build.v3(s: Slots) -> Result<&1, &1, Error, Record>: Migrate.build.at (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=build.at) def build.at(+v: U32, s: Slots) -> Result<&1, &1, Error, Record>: Migrate.build.ver (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=build.ver) def build.ver(m: Maybe<&2, U32>, s: Slots) -> Result<&1, &1, Error, Record>: Migrate.build.raw (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=build.raw) def build.raw(r: Result<&1, &1, Error, Bytes.Bytes>, s: Slots) -> Result<&1, &1, Error, Record>: Migrate.build (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=build) def build(s: Slots) -> Result<&1, &1, Error, Record>: Migrate.decode.shape (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=decode.shape) # The record an object describes, before the business rules. def decode.shape(v: Json.Val) -> Result<&1, &1, Error, Record>: Migrate.Record.check.if (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Record.check.if) def Record.check.if(m: Maybe<&2, Key>, r: Record) -> Result<&1, &1, Error, Record>: Migrate.Record.check.of (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Record.check.of) def Record.check.of(p: Record & Maybe<&2, Key>) -> Result<&1, &1, Error, Record>: Migrate.Record.check (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Record.check) # r when it keeps the business rules. def Record.check(r: Record) -> Result<&1, &1, Error, Record>: Migrate.decode.val (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=decode.val) # One record from a parsed JSON value. Only a valid record decodes. def decode.val(v: Json.Val) -> Result<&1, &1, Error, Record>: Migrate.decode.parsed (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=decode.parsed) def decode.parsed(m: Maybe<&1, Json.Val>) -> Result<&1, &1, Error, Record>: Migrate.decode (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=decode) # One record from UTF-8 JSON: an object nested no deeper than one level. def decode(b: Bytes.Bytes) -> Result<&1, &1, Error, Record>: Migrate.kv (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=kv) def kv(k: Key, v: Json.Val) -> Bytes.Bytes & Json.Val: Migrate.num (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=num) def num(+n: U32) -> Json.Val: Migrate.Period.json (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Period.json) def Period.json(p: Period) -> Json.Val: Migrate.Status.json (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=Status.json) def Status.json(s: Status) -> Json.Val: Migrate.V1.json (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=V1.json) def V1.json(r: V1) -> Json.Val: Migrate.V2.note (https://jend.leeeet.dev/definition.txt?path=bend-kit-migrate@0.3.0.0/migrate.bend&name=V2.note) def V2.note(n: Maybe<&1, Bytes.Bytes>) -> List<&1, Bytes.Bytes & Json.Val>: More: https://jend.leeeet.dev/packages/bend-kit-migrate.txt?definitions_offset=100