Cred.refresh.fields: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/usage/cred.bend as Cred Lines 127-130 of cswap-bend-cli@0.1.0.0/usage/cred.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/usage/cred.bend&start_line=127&end_line=130 import Base import cswap-bend-cli@0.1.0.0/json.bend as Json # The credential's oauth object after a grant: accessToken, expiresAt (ms), # then refreshToken and scopes when the response carries them. def refresh.fields(+o: Json.Json, +at: String, +ex: U32, +rt: Maybe<&2, String>, +sc: Maybe<&2, String>, +now: U32) -> Json.Json: set.sc(sc, set.rt(rt, Json.set("expiresAt", Json.JNum{U32.show((now + ex : U32)) ++ "000"}, Json.set("accessToken", Json.JStr{at}, o)))) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.show https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json.bend&name=Json https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json.bend&name=set https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/usage/cred.bend&name=set.rt https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/usage/cred.bend&name=set.sc