@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.
- package/dist/index.js +8 -4
- 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
|
|
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
|
-
|
|
284
|
-
|
|
285
|
-
|
|
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
|
});
|