SecretConfig examples for API/Resource/Record

Is there an 8.3 example for using a password in a SettingsRecord and SettingsResource through the API? I want the user to be able to configure a token (password) for my module. My SettingsRecord uses an EncodedStringField type. Currently my SettingsResource treats the token as a String (which is probably wrong).

Using chrome debug I was able to figure out to call the /data/api/v1/encryption/encrypt endpoint to encrypt the token. I then send via a PUT to update my record over the API and I get a 422. I’m pretty sure I need to change my SettingsResource to pass the JSON through to the record… but I am struggling. Any examples of custom records –> API –> react app would be hugely useful.

EncodedStringField/XResource are all legacy and are only relevant for migration in 8.3.
The thing to use now is SecretConfig.

SDK guide:

Example:

Got it and thank you! Does this mean the old Records are gone? Said another way, using the resource alone the properties are persisted in the modules data/config/resources/core/your_namespace/your_settings_bucket/config.json file?

That looks to be the case. Thanks again. One last question, is there a JavaScript helper you have to handle the SecretConfig form & API call?

I have no idea how anything front end is documented or supposed to be discoverable, but I think there's a PasswordInput react component in the public web UI stuff that is meant to be used with SecretConfig on the backend.

Hmm, not listed here...