API doc for update User AppMetadata

I am reading this page, but it’s not useful at all for me, how do I use this api? I need to update app_metadata from post password change action

are the examples? OI want to apply updates from within a post password change action

I already went over this: Update User Metadata from Within a Post Change Password Action
thanks

trying this works but the doc is not clear on this, can we date the docs up to date on how to use updateAppMetadata please?

var params = { id: userRecord.user_id };
    var metadata = {
      accountStatus: "ACTIVE",
    };
    management.updateAppMetadata(params, metadata, function (err, user) {
      if (err) {
        console.error(err);
      }
      if (user) {
        console.log(JSON.stringify(user));
      }
    });