Skip to content

chore(loo-4762): events command#17

Merged
notnmeyer merged 3 commits intomainfrom
chore/loo-4762/events
Mar 20, 2026
Merged

chore(loo-4762): events command#17
notnmeyer merged 3 commits intomainfrom
chore/loo-4762/events

Conversation

@notnmeyer
Copy link
Copy Markdown
Member

@notnmeyer notnmeyer commented Mar 20, 2026

events send is fairly complex,

➜ loops events send -h
Send an event

Usage:
  loops events send [flags]

Flags:
      --contact-props string     Path to a JSON file of contact properties
      --email string             Contact email address
      --event string             Event name
  -h, --help                     Help for send
      --idempotency-key string   Idempotency key to prevent duplicate sends
      --list stringArray         Mailing list subscription as id=true|false (repeatable)
      --props string             Path to a JSON file of event properties
      --user-id string           Contact user ID

Global Flags:
  -o, --output format   Output format (text, json) (default text)

event properties (--props) and contact properties (--contact-props) are only supported via json files. both support typed values, so its a lot to try and handle that directly.

➜ loops events send \
  --event testevent1 \
  --email [email protected] \
  --props example-data/event-props.json \
  --contact-props example-data/contact-props.json
Sent.

the event props json can be with the eventProperties key,

{
  "eventProperties": {
    "prop1": "propvalue1",
    "prop2": "propvalue2"
  }
}

or without it,

{
  "prop1": "propvalue1",
  "prop2": "propvalue2"
}

contact properties are just a flat map,

{ "blah": "buttz" }

manage list subscriptions is via a repeatable --list flag,

➜ loops events send \
  --event testevent1 \
  --email [email protected] \
  --list cm9j0iv8g00000iym9dcwa6qm=true \
  --list cmmz0d86p00000iy1bsrf14r4=false
Sent.

the rest of the args are pretty self-explanatory

@linear
Copy link
Copy Markdown

linear bot commented Mar 20, 2026

LOO-4762

@notnmeyer notnmeyer self-assigned this Mar 20, 2026
@notnmeyer notnmeyer force-pushed the chore/loo-4762/events branch from 5175dab to 4c1409d Compare March 20, 2026 16:41
@notnmeyer notnmeyer marked this pull request as ready for review March 20, 2026 16:58
@notnmeyer notnmeyer requested a review from nalanj March 20, 2026 17:38
@notnmeyer notnmeyer merged commit 435d3e4 into main Mar 20, 2026
2 checks passed
@notnmeyer notnmeyer deleted the chore/loo-4762/events branch March 30, 2026 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant