@opsrev/acculynx-cli 1.9.2 → 1.10.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 +11 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -298,6 +298,17 @@ function registerContactsCommands(parentCmd, getClient2) {
298
298
  const result = await getClient2().get(`/contacts/${contactId}/phone-numbers`);
299
299
  console.log(JSON.stringify(result));
300
300
  });
301
+ contacts.command("phone-add").argument("<contactId>", "Contact ID").description("Add a phone number to a contact (omit --sms-opt-out to opt in to SMS)").requiredOption("--type <type>", "Phone type: Mobile, Home, Work").requiredOption("--number <number>", "Phone number").option("--sms-opt-out", "Opt this number out of SMS").action(async (contactId, opts) => {
302
+ const result = await getClient2().post(
303
+ `/contacts/${contactId}/phone-numbers`,
304
+ {
305
+ type: opts.type,
306
+ number: opts.number,
307
+ smsOptOut: Boolean(opts.smsOptOut)
308
+ }
309
+ );
310
+ console.log(JSON.stringify(result));
311
+ });
301
312
  }
302
313
 
303
314
  // src/commands/estimates.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opsrev/acculynx-cli",
3
- "version": "1.9.2",
3
+ "version": "1.10.0",
4
4
  "description": "CLI for the AccuLynx roofing CRM API",
5
5
  "type": "module",
6
6
  "bin": {