@opsrev/acculynx-cli 1.9.1 → 1.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +8 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -278,11 +278,15 @@ function registerContactsCommands(parentCmd, getClient2) {
278
278
  const result = await getClient2().post("/contacts", body);
279
279
  console.log(JSON.stringify(result));
280
280
  });
281
- contacts.command("search").description("Search contacts").requiredOption("--query <text>", "Search term (required)").option("--sort-by <field>", "Sort by field (default: LastName)", "LastName").option("--sort-order <order>", "Ascending or Descending (default: Ascending)", "Ascending").action(async (opts) => {
281
+ contacts.command("search").description("Search contacts").requiredOption("--query <text>", "Search term (required)").requiredOption("--start-date <date>", "Start date (YYYY-MM-DD, required)").requiredOption("--end-date <date>", "End date (YYYY-MM-DD, required)").option("--sort-by <field>", "Sort by: CreatedDate, firstName, lastName", "lastName").option("--sort-order <order>", "Ascending or Descending", "Ascending").action(async (opts) => {
282
282
  const result = await getClient2().post("/contacts/search", {
283
- SearchTerm: opts.query,
284
- SortBy: opts.sortBy,
285
- SortOrder: opts.sortOrder
283
+ searchTerm: opts.query,
284
+ startDate: opts.startDate,
285
+ endDate: opts.endDate,
286
+ sort: {
287
+ sortColumn: opts.sortBy,
288
+ sortDirection: opts.sortOrder
289
+ }
286
290
  });
287
291
  console.log(JSON.stringify(result));
288
292
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opsrev/acculynx-cli",
3
- "version": "1.9.1",
3
+ "version": "1.9.2",
4
4
  "description": "CLI for the AccuLynx roofing CRM API",
5
5
  "type": "module",
6
6
  "bin": {