API Abstraction For CRUD Operation Using JS

Hi All,
I’m working on a project which uses ES5 JS AMD modules . Planning to write abstraction layer for the CRUD API calls. Any suggestion would of great help!
Below is the API written in AMD module to get, create, update customer. since table name field names are in string its error-prone and there is no strong typing, also have to send data in same sequence.
Any suggestion on how to write abstraction layer to this api to accept filed names and field values with strong types so this can be made as generic module.

define(["record", "search"], function(record, search) {
    function getCustomer(customerId){
        var query = search.create({
            type: "<<customer_table_name>>",
            filters: [["customerId", "is", customerId], "AND", ["isActive", "is", true]],
            columns: ["customerId", "customer_first_name", "customer_last_name"]
        });
        var customers = [];
        query.execute(function(customer){
            customers.push(customer);
        });
        return customers;
    }

    function createCustomer(customerAttributes)
        var customer = record.create({
        type: "<<customer_table_name>>"
        });
        customer.setValue("customer_first_name", customerAttributes[0]);
        customer.setValue("customer_last_name" , customerAttributes[1]);
        //other fileds of customers to create...
        customer.save();
    }

    function updateCustomer(customerAttributes) {
        var customer = record.load({
            type: "<<customer_table_name>>",
            id: customerAttributes[0] //customerId
        });
        customer.setValue("customer_first_name", customerAttributes[1]);
        customer.setValue("customer_last_name" , customerAttributes[2]);
        //other fileds of customers to update...
        customer.save();
    }

    return {
        get: getCustomer,
        create: createCustomer,
        update: updateCustomer
    }
});