shipmail-cli 0.1.7 → 0.1.8

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/cli.js +22 -3
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  } from "shipmail";
13
13
 
14
14
  // src/version.ts
15
- var VERSION = "0.1.7";
15
+ var VERSION = "0.1.8";
16
16
 
17
17
  // src/cli.ts
18
18
  var DEFAULT_BASE_URL = "https://shipmail.to/api/v1";
@@ -359,7 +359,7 @@ Usage:
359
359
  shipmail audiences subscribers resubscribe <audience-id> <subscriber-id> --consent-source "Signup form"
360
360
  shipmail audiences subscribers remove <audience-id> <subscriber-id>
361
361
  shipmail calendar events list --mailbox hello@example.com --from 2026-08-01T00:00:00Z --to 2026-08-08T00:00:00Z [--expand true] [--limit 100]
362
- shipmail calendar events create --mailbox hello@example.com --title "Sync" --start 2026-08-01T14:00:00 [--timezone Europe/Paris] [--duration PT30M] [--all-day true] [--location "HQ"] [--video-url https://...] [--reminders JSON|@file]
362
+ shipmail calendar events create --mailbox hello@example.com --title "Sync" --start 2026-08-01T14:00:00 [--timezone Europe/Paris] [--duration PT30M] [--attendees JSON|@file] [--reminders JSON|@file]
363
363
  shipmail calendar events get <event-id> --mailbox hello@example.com
364
364
  shipmail calendar events update <event-id> --mailbox hello@example.com [--title "..."] [--start ...]
365
365
  shipmail calendar events delete <event-id> --mailbox hello@example.com
@@ -704,6 +704,7 @@ async function runSuppressions(client, parsed, out) {
704
704
  }
705
705
  var SUBSCRIBER_STATUS_VALUES = [
706
706
  "subscribed",
707
+ "pending",
707
708
  "unsubscribed",
708
709
  "bounced",
709
710
  "complained",
@@ -1033,6 +1034,22 @@ async function readRemindersInput(value) {
1033
1034
  }
1034
1035
  return parsed;
1035
1036
  }
1037
+ function isAttendeeArray(value) {
1038
+ return Array.isArray(value) && value.every((item) => {
1039
+ if (typeof item !== "object" || item === null || Array.isArray(item)) return false;
1040
+ const email = Reflect.get(item, "email");
1041
+ const name = Reflect.get(item, "name");
1042
+ return typeof email === "string" && (name === void 0 || typeof name === "string");
1043
+ });
1044
+ }
1045
+ async function readAttendeesInput(value) {
1046
+ const parsed = await readJsonInput(value);
1047
+ if (parsed === void 0) return void 0;
1048
+ if (!isAttendeeArray(parsed)) {
1049
+ throw new CliUsageError("--attendees must be a JSON array of { email, name? } objects.");
1050
+ }
1051
+ return parsed;
1052
+ }
1036
1053
  async function calendarEventFields(options) {
1037
1054
  const description = getString(options, "description");
1038
1055
  const timezone = getString(options, "timezone");
@@ -1045,6 +1062,7 @@ async function calendarEventFields(options) {
1045
1062
  const freeBusyStatus = getEnum(options, "free-busy-status", CALENDAR_FREE_BUSY_STATUSES);
1046
1063
  const privacy = getEnum(options, "privacy", CALENDAR_PRIVACIES);
1047
1064
  const reminders = await readRemindersInput(getString(options, "reminders"));
1065
+ const attendees = await readAttendeesInput(getString(options, "attendees"));
1048
1066
  return {
1049
1067
  ...description !== void 0 ? { description } : {},
1050
1068
  ...timezone !== void 0 ? { timezone } : {},
@@ -1056,7 +1074,8 @@ async function calendarEventFields(options) {
1056
1074
  ...status !== void 0 ? { status } : {},
1057
1075
  ...freeBusyStatus !== void 0 ? { free_busy_status: freeBusyStatus } : {},
1058
1076
  ...privacy !== void 0 ? { privacy } : {},
1059
- ...reminders !== void 0 ? { reminders } : {}
1077
+ ...reminders !== void 0 ? { reminders } : {},
1078
+ ...attendees !== void 0 ? { attendees } : {}
1060
1079
  };
1061
1080
  }
1062
1081
  async function runCalendarEvents(client, parsed, out) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shipmail-cli",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Official CLI for the ShipMail API",
5
5
  "type": "module",
6
6
  "bin": {
@@ -41,7 +41,7 @@
41
41
  "access": "public"
42
42
  },
43
43
  "dependencies": {
44
- "shipmail": "0.1.30"
44
+ "shipmail": "0.1.31"
45
45
  },
46
46
  "devDependencies": {
47
47
  "tsup": "^8.4.0",