@opsrev/acculynx-cli 1.5.1 → 1.6.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.
Files changed (2) hide show
  1. package/dist/index.js +8 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -218,6 +218,14 @@ function registerJobsCommands(parentCmd, getClient2) {
218
218
  );
219
219
  console.log(JSON.stringify(result));
220
220
  });
221
+ jobs.command("add-expense").argument("<jobId>", "Job ID").description("Record an additional expense on a job (pipe JSON body to stdin)").action(async (jobId) => {
222
+ const body = await readStdin();
223
+ const result = await getClient2().post(
224
+ `/jobs/${jobId}/payments/expense`,
225
+ body
226
+ );
227
+ console.log(JSON.stringify(result));
228
+ });
221
229
  jobs.command("upload-document").argument("<jobId>", "Job ID").argument("<filePath>", "Path to the file to upload").requiredOption("--folder-id <id>", "Document folder ID (required)").option("--description <text>", "Brief description of the file").option("--external-id <id>", "External reference identifier").option("--external-source <source>", "External reference source").description("Upload a document to a job").action(async (jobId, filePath, opts) => {
222
230
  const ext = extname(filePath).toLowerCase();
223
231
  if (DISALLOWED_EXTENSIONS.has(ext)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opsrev/acculynx-cli",
3
- "version": "1.5.1",
3
+ "version": "1.6.0",
4
4
  "description": "CLI for the AccuLynx roofing CRM API",
5
5
  "type": "module",
6
6
  "bin": {