@opsrev/acculynx-cli 1.3.0 → 1.4.0
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 +2 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -127,7 +127,7 @@ async function readStdin(stream = process.stdin) {
|
|
|
127
127
|
// src/commands/jobs.ts
|
|
128
128
|
function registerJobsCommands(parentCmd, getClient2) {
|
|
129
129
|
const jobs = parentCmd.command("jobs").description("Job operations");
|
|
130
|
-
jobs.command("list").description("List jobs (paginated)").option("--start-date <date>", "Start date (YYYY-MM-DD)").option("--end-date <date>", "End date (YYYY-MM-DD)").option("--date-filter-type <type>", "Date field to filter on").option("--milestones <milestones>", "Filter by milestones").option("--sort-by <field>", "Sort by: CreatedDate, MilestoneDate, ModifiedDate").option("--sort-order <order>", "Ascending or Descending").option("--includes <fields>", "Include: contact, initialAppointment").option("--limit <n>", "Max total results (default: 25)").option("--all", "Fetch all results (no limit)").action(async (opts) => {
|
|
130
|
+
jobs.command("list").description("List jobs (paginated)").option("--start-date <date>", "Start date (YYYY-MM-DD)").option("--end-date <date>", "End date (YYYY-MM-DD)").option("--date-filter-type <type>", "Date field to filter on").option("--milestones <milestones>", "Filter by milestones").option("--sort-by <field>", "Sort by: CreatedDate, MilestoneDate, ModifiedDate").option("--sort-order <order>", "Ascending or Descending").option("--includes <fields>", "Include: contact, initialAppointment").option("--assignment <type>", "Filter by assignment: assigned, unassigned").option("--limit <n>", "Max total results (default: 25)").option("--all", "Fetch all results (no limit)").action(async (opts) => {
|
|
131
131
|
const params = {};
|
|
132
132
|
if (opts.startDate) params.startDate = opts.startDate;
|
|
133
133
|
if (opts.endDate) params.endDate = opts.endDate;
|
|
@@ -136,6 +136,7 @@ function registerJobsCommands(parentCmd, getClient2) {
|
|
|
136
136
|
if (opts.sortBy) params.sortBy = opts.sortBy;
|
|
137
137
|
if (opts.sortOrder) params.sortOrder = opts.sortOrder;
|
|
138
138
|
if (opts.includes) params.includes = opts.includes;
|
|
139
|
+
if (opts.assignment) params.assignment = opts.assignment;
|
|
139
140
|
const limit = opts.all ? Infinity : opts.limit ? parseInt(opts.limit, 10) : void 0;
|
|
140
141
|
const result = await paginate(getClient2(), "/jobs", params, limit);
|
|
141
142
|
console.log(JSON.stringify(result));
|