@opsrev/acculynx-cli 1.5.1 → 1.6.1

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 +12 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/index.ts
4
+ import { createRequire } from "module";
4
5
  import { Command } from "commander";
5
6
 
6
7
  // src/config.ts
@@ -218,6 +219,14 @@ function registerJobsCommands(parentCmd, getClient2) {
218
219
  );
219
220
  console.log(JSON.stringify(result));
220
221
  });
222
+ jobs.command("add-expense").argument("<jobId>", "Job ID").description("Record an additional expense on a job (pipe JSON body to stdin)").action(async (jobId) => {
223
+ const body = await readStdin();
224
+ const result = await getClient2().post(
225
+ `/jobs/${jobId}/payments/expense`,
226
+ body
227
+ );
228
+ console.log(JSON.stringify(result));
229
+ });
221
230
  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
231
  const ext = extname(filePath).toLowerCase();
223
232
  if (DISALLOWED_EXTENSIONS.has(ext)) {
@@ -1020,8 +1029,10 @@ function registerUnofficialCommands(parentCmd) {
1020
1029
  }
1021
1030
 
1022
1031
  // src/index.ts
1032
+ var require2 = createRequire(import.meta.url);
1033
+ var { version } = require2("../package.json");
1023
1034
  var program = new Command();
1024
- program.name("acculynx").description("AccuLynx CRM CLI for AI agents").version("0.1.0").exitOverride().configureOutput({
1035
+ program.name("acculynx").description("AccuLynx CRM CLI for AI agents").version(version).exitOverride().configureOutput({
1025
1036
  writeOut: (str) => process.stdout.write(str),
1026
1037
  writeErr: (str) => {
1027
1038
  const trimmed = str.trim();
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.1",
4
4
  "description": "CLI for the AccuLynx roofing CRM API",
5
5
  "type": "module",
6
6
  "bin": {