newo
Version:
NEWO CLI: Professional command-line tool with modular architecture for NEWO AI Agent development. Features account migration, integration management, webhook automation, AKB knowledge base, project attributes, sandbox testing, IDN-based file management, r
23 lines ⢠1.33 kB
JavaScript
/**
* Pull attributes command handler
* Pulls both customer and project attributes
*/
import { makeClient } from '../../api.js';
import { saveCustomerAttributes } from '../../sync.js';
import { pullAllProjectAttributes } from '../../sync/attributes.js';
import { getValidAccessToken } from '../../auth.js';
import { requireSingleCustomer } from '../customer-selection.js';
export async function handlePullAttributesCommand(customerConfig, args, verbose) {
const selectedCustomer = requireSingleCustomer(customerConfig, args.customer);
const accessToken = await getValidAccessToken(selectedCustomer);
const client = await makeClient(verbose, accessToken);
// Pull customer attributes
console.log(`š Fetching customer attributes for ${selectedCustomer.idn}...`);
await saveCustomerAttributes(client, selectedCustomer, verbose);
console.log(`ā
Customer attributes saved to newo_customers/${selectedCustomer.idn}/attributes.yaml`);
// Pull project attributes
console.log(`\nš Fetching project attributes for ${selectedCustomer.idn}...`);
await pullAllProjectAttributes(client, selectedCustomer, verbose);
console.log(`ā
Project attributes saved to newo_customers/${selectedCustomer.idn}/projects/{project_idn}/attributes.yaml`);
}
//# sourceMappingURL=pull-attributes.js.map