reply-cli 0.11.0 → 0.13.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.
- package/README.md +53 -7
- package/dist/operations/commands.js +143 -17
- package/dist/operations/commands.js.map +1 -1
- package/dist/operations/contact-input.d.ts +7 -3
- package/dist/operations/contact-input.js +51 -12
- package/dist/operations/contact-input.js.map +1 -1
- package/dist/operations/contact-record.d.ts +11 -0
- package/dist/operations/contact-record.js +176 -0
- package/dist/operations/contact-record.js.map +1 -0
- package/dist/operations/contact.js +8 -4
- package/dist/operations/contact.js.map +1 -1
- package/dist/operations/contacts.d.ts +7 -3
- package/dist/operations/contacts.js +94 -29
- package/dist/operations/contacts.js.map +1 -1
- package/dist/operations/inbox-reply.d.ts +11 -0
- package/dist/operations/inbox-reply.js +160 -0
- package/dist/operations/inbox-reply.js.map +1 -0
- package/dist/operations/inbox.d.ts +19 -1
- package/dist/operations/inbox.js +105 -1
- package/dist/operations/inbox.js.map +1 -1
- package/dist/operations/sequence-by-name.d.ts +9 -0
- package/dist/operations/sequence-by-name.js +96 -0
- package/dist/operations/sequence-by-name.js.map +1 -0
- package/dist/operations/stdin-input.d.ts +10 -0
- package/dist/operations/stdin-input.js +34 -0
- package/dist/operations/stdin-input.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -183,6 +183,8 @@ prints JSON (indented; compact with `--json`) and says what happened in a stable
|
|
|
183
183
|
|
|
184
184
|
| Command | Does |
|
|
185
185
|
|---|---|
|
|
186
|
+
| `reply sequence list --name -` | every sequence of a name, ignoring case, archived ones included |
|
|
187
|
+
| `reply sequence create --name -` | make a draft of a name, holding nobody, with one task step → its id |
|
|
186
188
|
| `reply sequence get <id>` | the sequence as Reply holds it |
|
|
187
189
|
| `reply sequence contacts <id> [--limit] [--offset]` | one page of its contacts, plus the total |
|
|
188
190
|
| `reply sequence stats <id> (--preset … \| --from … --to …)` | its email and LinkedIn counts over a window |
|
|
@@ -191,22 +193,66 @@ prints JSON (indented; compact with `--json`) and says what happened in a stable
|
|
|
191
193
|
| `reply sequence pause <id>` | → `paused` |
|
|
192
194
|
| `reply sequence start <id> [--expect-contacts N]` | → `started` / `already_active` |
|
|
193
195
|
| `reply contact-list add-contact <list-id> <contact> [--refuse-opted-out]` | → `added` |
|
|
196
|
+
| `reply contact find --contact -` | the id of the contact under an email or a LinkedIn URL, or null; never creates one |
|
|
197
|
+
| `reply contact get <id>` | the contact as Reply holds it |
|
|
198
|
+
| `reply contact update <id> --fields -` | change some fields and custom fields; null clears one → `updated` |
|
|
199
|
+
| `reply contact delete <id>` | → `deleted` |
|
|
194
200
|
| `reply contact opt-out <contact>` | → `opted_out` |
|
|
195
|
-
| `reply inbox list (--contact-id \| --sequence-id) [--source] [--since]` | one page of threads |
|
|
201
|
+
| `reply inbox list (--contact-id \| --sequence-id) [--source] [--channel] [--category-id] [--since]` | one page of threads |
|
|
196
202
|
| `reply inbox get <thread-id>` | a thread with its subject, and one page of its messages |
|
|
203
|
+
| `reply inbox reply <thread-id> --message -` | reply in the thread, on its own channel → `sent` |
|
|
204
|
+
| `reply inbox categories` | the categories a thread can be filed under |
|
|
205
|
+
| `reply inbox categorize <thread-id> (--category-id N \| --clear)` | → `categorized` / `cleared` |
|
|
206
|
+
| `reply inbox mark-read <thread-id>` · `reply inbox mark-unread <thread-id>` | → `read` / `unread` |
|
|
197
207
|
|
|
198
208
|
`<contact>` is exactly one of `--contact <json>|@file|-`, `--email <address>` (with `--first-name`,
|
|
199
209
|
`--last-name`, `--company`, `--title`), or `--contact-id <id>`. The JSON takes the same fields
|
|
200
|
-
(`email`, `first_name`, …)
|
|
201
|
-
argument list:
|
|
210
|
+
(`email`, `first_name`, …) plus `linkedin_url`, with an email, a LinkedIn URL or both, and `-` reads
|
|
211
|
+
it from stdin, which keeps personal data out of the argument list:
|
|
202
212
|
|
|
203
213
|
```sh
|
|
204
214
|
echo '{"email":"ann@example.com","first_name":"Ann"}' | reply sequence add-contact 123 --contact -
|
|
215
|
+
echo '{"linkedin_url":"https://www.linkedin.com/in/ann-example","first_name":"Ann"}' | reply contact opt-out --contact -
|
|
205
216
|
```
|
|
206
217
|
|
|
207
218
|
The two `add-contact` commands always import a contact given by email, and Reply refuses an import
|
|
208
|
-
without a first name, even for a contact it already holds
|
|
209
|
-
Reply
|
|
219
|
+
without a first name, even for a contact it already holds; a contact given only by LinkedIn URL is
|
|
220
|
+
looked up first and imported only when Reply holds nobody under it. `contact opt-out` imports only
|
|
221
|
+
someone Reply doesn't hold yet; `sequence remove-contact` never imports. A contact is looked up, and
|
|
222
|
+
an import matched, by its email; one with only a LinkedIn URL, by that. The lookup is Reply's exact
|
|
223
|
+
one: an email matches ignoring case, and a LinkedIn URL is matched by its lowercased slug — on
|
|
224
|
+
linkedin.com the path's case does not count, nor the scheme's or host's, a default port, one trailing
|
|
225
|
+
slash or a fragment, while `www` and the query do. Reply is asked for a LinkedIn URL in that form
|
|
226
|
+
first, then as given, and the CLI stores a LinkedIn URL by its lowercased slug when it imports a
|
|
227
|
+
contact or runs `contact update`.
|
|
228
|
+
|
|
229
|
+
The commands that carry a person's or a sequence's text in a field of their own read it from stdin
|
|
230
|
+
only, and refuse it on the argument list: `contact find --contact -` (`{email}` or
|
|
231
|
+
`{linkedin_url}`), `contact update --fields -` (`{first_name, last_name, company, title,
|
|
232
|
+
linkedin_url, custom_fields: [{name, value}]}`, where a field left out stays as it is and `null`
|
|
233
|
+
clears one), and `sequence list|create --name -` (`{name}`):
|
|
234
|
+
|
|
235
|
+
```sh
|
|
236
|
+
echo '{"title":"CTO","custom_fields":[{"name":"leadSource","value":"Event"}]}' | reply contact update 456 --fields -
|
|
237
|
+
echo '{"name":"Q4 outreach"}' | reply sequence list --name -
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
`contact update` refuses a custom field the account has none of, `contact.field_not_found`, before
|
|
241
|
+
it changes anything.
|
|
242
|
+
|
|
243
|
+
`inbox reply` takes its message, `{body, reply_to_message_id}`, from stdin only, and refuses it on
|
|
244
|
+
the argument list. The reply goes to the thread's contact from the account that owns the thread;
|
|
245
|
+
`reply_to_message_id` (email threads only) names the message it answers:
|
|
246
|
+
|
|
247
|
+
```sh
|
|
248
|
+
echo '{"body":"Thanks, Tuesday works."}' | reply inbox reply 9876 --message -
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
It is one of two work commands that are not safe to re-run: on exit 3 (outcome unknown) the reply
|
|
252
|
+
may already have been sent, so read the thread with `reply inbox get` before trying again. The other
|
|
253
|
+
is `sequence create`: Reply allows two sequences of one name, so after exit 3 look the name up with
|
|
254
|
+
`sequence list --name -` first. Every other work command can simply be run again; a `contact delete`
|
|
255
|
+
repeated after its first one took effect answers `contact.not_found`.
|
|
210
256
|
|
|
211
257
|
**Errors.** With `--json`, a failure is one line on stderr:
|
|
212
258
|
`{"error":{"code":"contact.opted_out","title":…,"status":…,"reply_code":…,"ids":{…}}}`. `ids` is
|
|
@@ -216,8 +262,8 @@ Reply refused the add. `reply.invalid_request` means Reply didn't accept a field
|
|
|
216
262
|
|
|
217
263
|
**Exit codes.** `0` done · `1` failed, and the main effect did not happen · `2` usage error, nothing
|
|
218
264
|
sent · `3` **outcome unknown**: a write may have happened and no answer came back. Re-running the
|
|
219
|
-
same command is safe
|
|
220
|
-
blindly.
|
|
265
|
+
same command is safe, except `inbox reply` and `sequence create` (above): each one checks or relies
|
|
266
|
+
on Reply's own state rather than repeating an effect blindly.
|
|
221
267
|
|
|
222
268
|
**Retries.** Reads are retried on errors. A write is retried only when it can't have reached Reply:
|
|
223
269
|
the connection was never made, or a `429` asked to wait 3 seconds or less. A longer `429` comes back
|
|
@@ -7,24 +7,29 @@ const context_1 = require("../context");
|
|
|
7
7
|
const options_1 = require("./options");
|
|
8
8
|
const contact_input_1 = require("./contact-input");
|
|
9
9
|
const sequence_read_1 = require("./sequence-read");
|
|
10
|
+
const sequence_by_name_1 = require("./sequence-by-name");
|
|
10
11
|
const sequence_membership_1 = require("./sequence-membership");
|
|
11
12
|
const sequence_state_1 = require("./sequence-state");
|
|
12
13
|
const inbox_1 = require("./inbox");
|
|
14
|
+
const inbox_reply_1 = require("./inbox-reply");
|
|
13
15
|
const contact_list_1 = require("./contact-list");
|
|
14
16
|
const contact_1 = require("./contact");
|
|
17
|
+
const contact_record_1 = require("./contact-record");
|
|
15
18
|
const P = config_1.PROGRAM_NAME;
|
|
16
19
|
const COMMON_ERRORS = [
|
|
17
20
|
'access.denied', 'access.feature_unavailable', 'rate_limited', 'reply.unavailable', 'reply.refused', 'reply.invalid_request',
|
|
18
21
|
];
|
|
19
|
-
const
|
|
22
|
+
const SAFE_TO_REPEAT = 'a write may have happened; re-running is safe';
|
|
23
|
+
const errors_help = (codes, write, unknown_outcome) => '\nErrors (with --json, one line on stderr: {"error":{"code":…,"ids":…}}):\n'
|
|
20
24
|
+ [...codes, ...COMMON_ERRORS, ...(write ? ['outcome.unknown'] : [])].map(c => ` ${c}`).join('\n')
|
|
21
25
|
+ '\nExit codes: 0 done · 1 failed, main effect not done (partial effects are in "ids") · 2 usage, nothing sent'
|
|
22
|
-
+
|
|
23
|
-
const help = (examples, codes, write, extra = '') => `\nExamples:\n${examples.map(e => ` ${e}`).join('\n')}\n${extra ? `\n${extra}` : ''}${errors_help(codes, write)}`;
|
|
26
|
+
+ ` · 3 outcome unknown (${unknown_outcome})`;
|
|
27
|
+
const help = (examples, codes, write, extra = '', unknown_outcome = SAFE_TO_REPEAT) => `\nExamples:\n${examples.map(e => ` ${e}`).join('\n')}\n${extra ? `\n${extra}` : ''}${errors_help(codes, write, unknown_outcome)}`;
|
|
24
28
|
const ex = (command) => `${P} ${command}`;
|
|
25
29
|
// The contact on stdin: the form that keeps personal data off the argument list, so it leads.
|
|
26
30
|
const piped = (command, contact = '{"email":"ann@example.com","first_name":"Ann"}') => `echo '${contact}' | ${P} ${command} --contact -`;
|
|
27
|
-
const ALWAYS_IMPORTED = 'A contact given by email is always imported, so Reply needs a first name, even for one it already holds.\n'
|
|
31
|
+
const ALWAYS_IMPORTED = 'A contact given by email is always imported, so Reply needs a first name, even for one it already holds.\n'
|
|
32
|
+
+ 'One given only by LinkedIn URL is looked up first and imported only when Reply holds nobody under it.\n';
|
|
28
33
|
const run = (fn) => async function () {
|
|
29
34
|
await fn(this);
|
|
30
35
|
};
|
|
@@ -32,8 +37,31 @@ const ctx_of = (cmd) => {
|
|
|
32
37
|
const g = (0, options_1.read_op_globals)(cmd);
|
|
33
38
|
return { g, ctx: (0, context_1.build_context)({ profile: g.profile }) };
|
|
34
39
|
};
|
|
35
|
-
const sequence_command = new commander_1.Command('sequence')
|
|
40
|
+
const sequence_command = new commander_1.Command('sequence')
|
|
41
|
+
.description('Find or create a sequence by name, read it, put contacts in or take them out, pause or start it');
|
|
36
42
|
exports.sequence_command = sequence_command;
|
|
43
|
+
sequence_command.command('list')
|
|
44
|
+
.option('--name <stdin>', 'Only -: {name} as JSON on stdin')
|
|
45
|
+
.description('Every sequence whose name is this one, ignoring case, archived ones included')
|
|
46
|
+
.addHelpText('after', help([`echo '{"name":"Q4 outreach"}' | ${P} sequence list --name -`], ['sequence.list_incomplete'], false, 'Result: {"items":[{"id","name","status","is_archived","created_at"}]}, oldest first: Reply\'s status (new, active,\n'
|
|
47
|
+
+ 'paused), archive flag and creation time, each null when Reply gives none. The name is read from stdin only, so it\n'
|
|
48
|
+
+ 'never sits in the argument list. The list is read to its end; sequence.list_incomplete means it did not end within\n'
|
|
49
|
+
+ '20000 sequences whose names contain this one.\n'))
|
|
50
|
+
.action(run(async (cmd) => {
|
|
51
|
+
const { g, ctx } = ctx_of(cmd);
|
|
52
|
+
await (0, sequence_by_name_1.handle_sequence_list)(cmd.opts(), ctx, g);
|
|
53
|
+
}));
|
|
54
|
+
sequence_command.command('create')
|
|
55
|
+
.option('--name <stdin>', 'Only -: {name} as JSON on stdin')
|
|
56
|
+
.description('Make a draft sequence of this name, holding nobody, with one task step to replace before it is started')
|
|
57
|
+
.addHelpText('after', help([`echo '{"name":"Q4 outreach"}' | ${P} sequence create --name -`], [], true, 'Result: {"sequence_id","steps_added","status","is_archived"}: status and is_archived are Reply\'s for the new sequence.\n'
|
|
58
|
+
+ 'The name is read from stdin only, so it never sits in the argument list. Reply allows two sequences of one name and\n'
|
|
59
|
+
+ 'this command does not look first: run `sequence list --name -` before it. The one step is a task for the owner, which\n'
|
|
60
|
+
+ 'reaches nobody; Reply gives the draft the account\'s default schedule and mailbox. The draft is never started here.\n', 'the sequence may have been made; running the command again may make a second one, so look it up by name first'))
|
|
61
|
+
.action(run(async (cmd) => {
|
|
62
|
+
const { g, ctx } = ctx_of(cmd);
|
|
63
|
+
await (0, sequence_by_name_1.handle_sequence_create)(cmd.opts(), ctx, g);
|
|
64
|
+
}));
|
|
37
65
|
sequence_command.command('get')
|
|
38
66
|
.argument('<sequence-id>', 'Sequence id')
|
|
39
67
|
.description('The sequence as Reply holds it: settings, steps, state')
|
|
@@ -67,10 +95,11 @@ sequence_command.command('stats')
|
|
|
67
95
|
.argument('<sequence-id>', 'Sequence id'))
|
|
68
96
|
.option('--start-step <n>', 'Start at this step of the sequence (1 = first; the steps must form one chain)')
|
|
69
97
|
.option('--ignore-step-delay', 'Skip the delay of the step the contact starts at (Reply still sends within the sequence\'s schedule)')
|
|
70
|
-
.description('Put a contact into the sequence, creating the contact if Reply has nobody under the
|
|
98
|
+
.description('Put a contact into the sequence, creating the contact if Reply has nobody under the address')
|
|
71
99
|
.addHelpText('after', help([piped('sequence add-contact 123'), ex('sequence add-contact 123 --email ann@example.com --first-name Ann'),
|
|
72
100
|
ex('sequence add-contact 123 --contact-id 456 --start-step 2')], ['sequence.not_found', 'sequence.archived', 'sequence.has_no_steps', 'sequence.step_not_found', 'contact.not_found',
|
|
73
|
-
'contact.
|
|
101
|
+
'contact.not_unique', 'contact.opted_out', 'contact.invalid_email', 'contact.invalid_linkedin_url',
|
|
102
|
+
'account.contact_limit_reached'], true, 'Result: {"status":"added"|"already_in_sequence","sequence_id","contact_id","contact_created","sequence_active"}\n'
|
|
74
103
|
+ contact_input_1.CONTACT_HELP + ALWAYS_IMPORTED))
|
|
75
104
|
.action(run(async (cmd) => {
|
|
76
105
|
const { g, ctx } = ctx_of(cmd);
|
|
@@ -79,8 +108,8 @@ sequence_command.command('stats')
|
|
|
79
108
|
(0, contact_input_1.add_contact_options)(sequence_command.command('remove-contact')
|
|
80
109
|
.argument('<sequence-id>', 'Sequence id'))
|
|
81
110
|
.description('Take a contact out of the sequence; their history stays. Never creates a contact')
|
|
82
|
-
.addHelpText('after', help([piped('sequence remove-contact 123', '{"email":"ann@example.com"}'), ex('sequence remove-contact 123 --contact-id 456')], ['sequence.not_found', 'contact.not_unique'
|
|
83
|
-
+ contact_input_1.CONTACT_HELP + 'A contact given by email is only looked up, never imported, so no first name is needed.\n'))
|
|
111
|
+
.addHelpText('after', help([piped('sequence remove-contact 123', '{"email":"ann@example.com"}'), ex('sequence remove-contact 123 --contact-id 456')], ['sequence.not_found', 'contact.not_unique'], true, 'Result: {"status":"removed"|"not_in_sequence","sequence_id","contact_id"}\n'
|
|
112
|
+
+ contact_input_1.CONTACT_HELP + 'A contact given by email or LinkedIn URL is only looked up, never imported, so no first name is needed.\n'))
|
|
84
113
|
.action(run(async (cmd) => {
|
|
85
114
|
const { g, ctx } = ctx_of(cmd);
|
|
86
115
|
await (0, sequence_membership_1.handle_sequence_remove_contact)(cmd.args[0], cmd.opts(), ctx, g);
|
|
@@ -108,33 +137,82 @@ exports.contact_list_command = contact_list_command;
|
|
|
108
137
|
(0, contact_input_1.add_contact_options)(contact_list_command.command('add-contact')
|
|
109
138
|
.argument('<list-id>', 'Contact list id'))
|
|
110
139
|
.option('--refuse-opted-out', 'Refuse a contact Reply holds as opted out (a list may otherwise hold them)')
|
|
111
|
-
.description('Put a contact on the list, creating the contact if Reply has nobody under the
|
|
112
|
-
.addHelpText('after', help([piped('contact-list add-contact 77'), ex('contact-list add-contact 77 --contact-id 456 --refuse-opted-out')], ['contact-list.not_found', 'contact.not_found', 'contact.
|
|
140
|
+
.description('Put a contact on the list, creating the contact if Reply has nobody under the address')
|
|
141
|
+
.addHelpText('after', help([piped('contact-list add-contact 77'), ex('contact-list add-contact 77 --contact-id 456 --refuse-opted-out')], ['contact-list.not_found', 'contact.not_found', 'contact.not_unique', 'contact.opted_out', 'contact.invalid_email',
|
|
142
|
+
'contact.invalid_linkedin_url', 'account.contact_limit_reached'], true, 'Result: {"status":"added","list_id","contact_id","contact_created"}\n' + contact_input_1.CONTACT_HELP + ALWAYS_IMPORTED))
|
|
113
143
|
.action(run(async (cmd) => {
|
|
114
144
|
const { g, ctx } = ctx_of(cmd);
|
|
115
145
|
await (0, contact_list_1.handle_contact_list_add_contact)(cmd.args[0], cmd.opts(), ctx, g);
|
|
116
146
|
}));
|
|
117
|
-
const contact_command = new commander_1.Command('contact').description('
|
|
147
|
+
const contact_command = new commander_1.Command('contact').description('Find a contact, read it, change or delete it, or opt it out');
|
|
118
148
|
exports.contact_command = contact_command;
|
|
149
|
+
contact_command.command('find')
|
|
150
|
+
.option('--contact <stdin>', 'Only -: {email} or {linkedin_url} as JSON on stdin')
|
|
151
|
+
.description('The id of the contact Reply holds under an email or a LinkedIn URL. Never creates a contact')
|
|
152
|
+
.addHelpText('after', help([`echo '{"email":"ann@example.com"}' | ${P} contact find --contact -`,
|
|
153
|
+
`echo '{"linkedin_url":"https://www.linkedin.com/in/ann-example"}' | ${P} contact find --contact -`], ['contact.not_unique'], false, 'Result: {"contact_id"}: null when Reply holds nobody under the address.\n'
|
|
154
|
+
+ 'The address is read from stdin only, so it never sits in the argument list. An email matches ignoring case. A\n'
|
|
155
|
+
+ 'LinkedIn URL is matched by its lowercased slug: on linkedin.com the path\'s case does not count, nor the scheme\'s or\n'
|
|
156
|
+
+ 'host\'s, a default port, one trailing slash or a fragment, while www and the query do; Reply is asked for it in that\n'
|
|
157
|
+
+ 'form first, then as given. contact.not_unique means Reply holds more than one contact under the address.\n'))
|
|
158
|
+
.action(run(async (cmd) => {
|
|
159
|
+
const { g, ctx } = ctx_of(cmd);
|
|
160
|
+
await (0, contact_record_1.handle_contact_find)(cmd.opts(), ctx, g);
|
|
161
|
+
}));
|
|
162
|
+
contact_command.command('get')
|
|
163
|
+
.argument('<contact-id>', 'Contact id')
|
|
164
|
+
.description('The contact as Reply holds it: fields, owner, opt-out, custom fields')
|
|
165
|
+
.addHelpText('after', help([ex('contact get 456')], ['contact.not_found'], false))
|
|
166
|
+
.action(run(async (cmd) => {
|
|
167
|
+
const { g, ctx } = ctx_of(cmd);
|
|
168
|
+
await (0, contact_record_1.handle_contact_get)(cmd.args[0], ctx, g);
|
|
169
|
+
}));
|
|
170
|
+
contact_command.command('update')
|
|
171
|
+
.argument('<contact-id>', 'Contact id')
|
|
172
|
+
.option('--fields <stdin>', 'Only -: the fields to change as JSON on stdin')
|
|
173
|
+
.description('Change some of a contact\'s fields and custom fields; the rest stay as they are')
|
|
174
|
+
.addHelpText('after', help([`echo '{"title":"CTO","company":"Acme"}' | ${P} contact update 456 --fields -`,
|
|
175
|
+
`echo '{"last_name":null,"custom_fields":[{"name":"leadSource","value":"Event"}]}' | ${P} contact update 456 --fields -`], ['contact.not_found', 'contact.field_not_found'], true, 'Result: {"status":"updated","contact_id"}\n'
|
|
176
|
+
+ 'Fields: {first_name, last_name, company, title, linkedin_url, custom_fields: [{name, value}]}; a field left out stays as\n'
|
|
177
|
+
+ 'it is, and null clears one. They are read from stdin only, so no value ever sits in the argument list. The CLI stores\n'
|
|
178
|
+
+ 'a LinkedIn URL by its lowercased slug, the form contacts are looked up by. A custom field is named as the account\n'
|
|
179
|
+
+ 'names it (ignoring case); a name the account has none of is contact.field_not_found, and then nothing is changed.\n'))
|
|
180
|
+
.action(run(async (cmd) => {
|
|
181
|
+
const { g, ctx } = ctx_of(cmd);
|
|
182
|
+
await (0, contact_record_1.handle_contact_update)(cmd.args[0], cmd.opts(), ctx, g);
|
|
183
|
+
}));
|
|
184
|
+
contact_command.command('delete')
|
|
185
|
+
.argument('<contact-id>', 'Contact id')
|
|
186
|
+
.description('Delete a contact from the account, with its history at Reply')
|
|
187
|
+
.addHelpText('after', help([ex('contact delete 456')], ['contact.not_found'], true, 'Result: {"status":"deleted","contact_id"}\n'
|
|
188
|
+
+ 'After exit 3 the contact may already be gone: running the command again is safe, and then answers contact.not_found.\n'))
|
|
189
|
+
.action(run(async (cmd) => {
|
|
190
|
+
const { g, ctx } = ctx_of(cmd);
|
|
191
|
+
await (0, contact_record_1.handle_contact_delete)(cmd.args[0], ctx, g);
|
|
192
|
+
}));
|
|
119
193
|
(0, contact_input_1.add_contact_options)(contact_command.command('opt-out'))
|
|
120
|
-
.description('Mark the contact as opted out at Reply, creating them only if Reply has nobody under the
|
|
121
|
-
.addHelpText('after', help([piped('contact opt-out'), ex('contact opt-out --contact-id 456')], ['contact.not_found', 'contact.not_unique', 'contact.
|
|
122
|
-
+ 'A contact given by email is imported only when Reply holds nobody under the address; only then does
|
|
194
|
+
.description('Mark the contact as opted out at Reply, creating them only if Reply has nobody under the address')
|
|
195
|
+
.addHelpText('after', help([piped('contact opt-out'), ex('contact opt-out --contact-id 456')], ['contact.not_found', 'contact.not_unique', 'contact.invalid_email', 'contact.invalid_linkedin_url', 'account.contact_limit_reached'], true, 'Result: {"status":"opted_out","contact_id","contact_created"}\n' + contact_input_1.CONTACT_HELP
|
|
196
|
+
+ 'A contact given by email or LinkedIn URL is imported only when Reply holds nobody under the address; only then does\n'
|
|
197
|
+
+ 'Reply need a first name.\n'))
|
|
123
198
|
.action(run(async (cmd) => {
|
|
124
199
|
const { g, ctx } = ctx_of(cmd);
|
|
125
200
|
await (0, contact_1.handle_contact_opt_out)(cmd.opts(), ctx, g);
|
|
126
201
|
}));
|
|
127
|
-
const inbox_command = new commander_1.Command('inbox').description('Read inbox threads');
|
|
202
|
+
const inbox_command = new commander_1.Command('inbox').description('Read inbox threads, reply in them, file them under a category, mark them read or unread');
|
|
128
203
|
exports.inbox_command = inbox_command;
|
|
129
204
|
inbox_command.command('list')
|
|
130
205
|
.option('--contact-id <id>', 'Threads with this contact')
|
|
131
206
|
.option('--sequence-id <id>', 'Threads of this sequence')
|
|
132
207
|
.option('--source <source>', 'inbox | sent | unread | ai-draft (Reply\'s default: inbox)')
|
|
208
|
+
.option('--channel <channel>', 'email | linkedin: only threads on this channel')
|
|
209
|
+
.option('--category-id <id>', 'Only threads filed under this inbox category (see `inbox categories`)')
|
|
133
210
|
.option('--since <iso>', 'Only threads that moved at or after this moment')
|
|
134
211
|
.option('--limit <n>', 'Threads per page, 1-100 (default 20)')
|
|
135
212
|
.option('--offset <n>', 'Threads to skip (default 0)')
|
|
136
213
|
.description('One page of inbox threads, by contact or by sequence')
|
|
137
|
-
.addHelpText('after', help([ex('inbox list --contact-id 456'), ex('inbox list --sequence-id 123 --source unread --since 2026-10-01T00:00:00Z')
|
|
214
|
+
.addHelpText('after', help([ex('inbox list --contact-id 456'), ex('inbox list --sequence-id 123 --source unread --since 2026-10-01T00:00:00Z'),
|
|
215
|
+
ex('inbox list --sequence-id 123 --channel linkedin --category-id 7')], [], false))
|
|
138
216
|
.action(run(async (cmd) => {
|
|
139
217
|
const { g, ctx } = ctx_of(cmd);
|
|
140
218
|
await (0, inbox_1.handle_inbox_list)(cmd.opts(), ctx, g);
|
|
@@ -150,4 +228,52 @@ inbox_command.command('get')
|
|
|
150
228
|
const { g, ctx } = ctx_of(cmd);
|
|
151
229
|
await (0, inbox_1.handle_inbox_get)(cmd.args[0], cmd.opts(), ctx, g);
|
|
152
230
|
}));
|
|
231
|
+
inbox_command.command('reply')
|
|
232
|
+
.argument('<thread-id>', 'Inbox thread id')
|
|
233
|
+
.option('--message <stdin>', 'Only -: the message {body, reply_to_message_id} as JSON on stdin')
|
|
234
|
+
.description('Reply to the contact in an existing thread, on the thread\'s own channel')
|
|
235
|
+
.addHelpText('after', help([`echo '{"body":"Thanks, Tuesday works."}' | ${P} inbox reply 9876 --message -`,
|
|
236
|
+
`echo '{"body":"Thanks!","reply_to_message_id":"<abc@example.com>"}' | ${P} inbox reply 9876 --message -`], ['inbox.thread_not_found', 'inbox.channel_mismatch', 'contact.opted_out', 'inbox.send_failed'], true, 'Result: {"status":"sent","thread_id","channel":"email"|"linkedin","message_id","sent_at"}: Reply\'s messageId and date,\n'
|
|
237
|
+
+ 'each null when Reply gives none.\n'
|
|
238
|
+
+ 'The message is read from stdin only, so its text never sits in the argument list. The reply goes to the thread\'s\n'
|
|
239
|
+
+ 'contact from the account that owns the thread; no other recipient can be named. reply_to_message_id (email only)\n'
|
|
240
|
+
+ 'answers one message of the thread; without it Reply answers the latest. inbox.send_failed means Reply could not\n'
|
|
241
|
+
+ 'deliver it: "details.status_code" is Reply\'s reason (e.g. linkedInSendingLimitExceeded), null when it gave none.\n', 'the reply may have been sent; running the command again may send it twice, so read the thread first'))
|
|
242
|
+
.action(run(async (cmd) => {
|
|
243
|
+
const { g, ctx } = ctx_of(cmd);
|
|
244
|
+
await (0, inbox_reply_1.handle_inbox_reply)(cmd.args[0], cmd.opts(), ctx, g);
|
|
245
|
+
}));
|
|
246
|
+
inbox_command.command('categories')
|
|
247
|
+
.description('The inbox categories a thread can be filed under, Reply\'s reserved ones included')
|
|
248
|
+
.addHelpText('after', help([ex('inbox categories')], [], false, 'Result: {"items"}: Reply\'s categories as it gives them (id, name, color, isReserved, unreadThreadsCount).\n'))
|
|
249
|
+
.action(run(async (cmd) => {
|
|
250
|
+
const { g, ctx } = ctx_of(cmd);
|
|
251
|
+
await (0, inbox_1.handle_inbox_categories)(ctx, g);
|
|
252
|
+
}));
|
|
253
|
+
inbox_command.command('categorize')
|
|
254
|
+
.argument('<thread-id>', 'Inbox thread id')
|
|
255
|
+
.option('--category-id <id>', 'File the thread under this category (see `inbox categories`)')
|
|
256
|
+
.option('--clear', 'Take the thread out of its category')
|
|
257
|
+
.description('File a thread under one inbox category, or clear its category (a thread is in at most one)')
|
|
258
|
+
.addHelpText('after', help([ex('inbox categorize 9876 --category-id 7'), ex('inbox categorize 9876 --clear')], ['inbox.thread_not_found', 'inbox.category_not_found'], true, 'Result: {"status":"categorized"|"cleared","thread_id","category_id"}; category_id is null after --clear.\n'))
|
|
259
|
+
.action(run(async (cmd) => {
|
|
260
|
+
const { g, ctx } = ctx_of(cmd);
|
|
261
|
+
await (0, inbox_1.handle_inbox_categorize)(cmd.args[0], cmd.opts(), ctx, g);
|
|
262
|
+
}));
|
|
263
|
+
inbox_command.command('mark-read')
|
|
264
|
+
.argument('<thread-id>', 'Inbox thread id')
|
|
265
|
+
.description('Mark a thread as read (one that is already read stays read)')
|
|
266
|
+
.addHelpText('after', help([ex('inbox mark-read 9876')], ['inbox.thread_not_found'], true, 'Result: {"status":"read","thread_id"}\n'))
|
|
267
|
+
.action(run(async (cmd) => {
|
|
268
|
+
const { g, ctx } = ctx_of(cmd);
|
|
269
|
+
await (0, inbox_1.handle_inbox_mark_read)(cmd.args[0], ctx, g);
|
|
270
|
+
}));
|
|
271
|
+
inbox_command.command('mark-unread')
|
|
272
|
+
.argument('<thread-id>', 'Inbox thread id')
|
|
273
|
+
.description('Mark a thread as unread, so it needs attention again')
|
|
274
|
+
.addHelpText('after', help([ex('inbox mark-unread 9876')], ['inbox.thread_not_found'], true, 'Result: {"status":"unread","thread_id"}\n'))
|
|
275
|
+
.action(run(async (cmd) => {
|
|
276
|
+
const { g, ctx } = ctx_of(cmd);
|
|
277
|
+
await (0, inbox_1.handle_inbox_mark_unread)(cmd.args[0], ctx, g);
|
|
278
|
+
}));
|
|
153
279
|
//# sourceMappingURL=commands.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../src/operations/commands.ts"],"names":[],"mappings":";;;AAAA,yCAAkC;AAClC,sCAAuC;AACvC,wCAAyC;AACzC,uCAA0C;AAC1C,mDAAkE;AAClE,mDAAqG;AACrG,+DAAkG;AAClG,qDAA8E;AAC9E,mCAA4D;AAC5D,iDAA+D;AAC/D,uCAAiD;AAEjD,MAAM,CAAC,GAAG,qBA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AAC;KAC/B,QAAQ,CAAC,aAAa,EAAE,iBAAiB,CAAC;KAC1C,WAAW,CAAC,sDAAsD,CAAC;KACnE,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,wBAAwB,CAAC,CAAC,EAAE,CAAC,wBAAwB,CAAC,EAAE,IAAI,EAAE,2CAA2C,CAAC,CAAC;KACzI,MAAM,CAAC,GAAG,CAAC,KAAK,EAAC,GAAG,EAAC,EAAE;IACpB,MAAM,EAAC,CAAC,EAAE,GAAG,EAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IAC7B,MAAM,IAAA,gCAAwB,EAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;AACxD,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Command } from 'commander';
|
|
2
2
|
type Person = {
|
|
3
|
-
email
|
|
3
|
+
email?: string;
|
|
4
|
+
linkedin_url?: string;
|
|
4
5
|
first_name?: string;
|
|
5
6
|
last_name?: string;
|
|
6
7
|
company?: string;
|
|
@@ -23,7 +24,10 @@ type Contact_flags = {
|
|
|
23
24
|
contact?: string;
|
|
24
25
|
};
|
|
25
26
|
declare const add_contact_options: (cmd: Command) => Command;
|
|
26
|
-
declare const CONTACT_HELP = "\nA contact is given exactly one way:\n --contact <json>|@file|- {email, first_name, last_name, company, title}; '-' reads
|
|
27
|
+
declare const CONTACT_HELP = "\nA contact is given exactly one way:\n --contact <json>|@file|- {email, linkedin_url, first_name, last_name, company, title},\n with an email, a LinkedIn URL or both; '-' reads stdin, which\n keeps personal data out of the argument list\n --email <address> [--first-name <name>] [--last-name <name>] [--company <name>] [--title <title>]\n --contact-id <id> a contact Reply already holds\nReply is asked about a contact by its email; one with only a LinkedIn URL, by that. A LinkedIn URL is\nmatched by its lowercased slug, and the CLI stores it by that slug when it imports the contact.\n\n";
|
|
28
|
+
declare const is_email: (text: string) => boolean;
|
|
29
|
+
declare const linkedin_key: (text: string) => string | null;
|
|
30
|
+
declare const person_of: (raw: Record<string, unknown>) => Person;
|
|
27
31
|
declare const read_contact_input: (f: Contact_flags, read_stdin?: () => string) => Contact_ref;
|
|
28
|
-
export { read_contact_input, add_contact_options, CONTACT_HELP };
|
|
32
|
+
export { read_contact_input, add_contact_options, person_of, CONTACT_HELP, linkedin_key, is_email };
|
|
29
33
|
export type { Person, Contact_ref, Contact_flags };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CONTACT_HELP = exports.add_contact_options = exports.read_contact_input = void 0;
|
|
3
|
+
exports.is_email = exports.linkedin_key = exports.CONTACT_HELP = exports.person_of = exports.add_contact_options = exports.read_contact_input = void 0;
|
|
4
4
|
const errors_1 = require("../utils/errors");
|
|
5
5
|
const json_arg_1 = require("../utils/json-arg");
|
|
6
6
|
const options_1 = require("./options");
|
|
7
|
-
const PERSON_FIELDS = ['email', 'first_name', 'last_name', 'company', 'title'];
|
|
7
|
+
const PERSON_FIELDS = ['email', 'linkedin_url', 'first_name', 'last_name', 'company', 'title'];
|
|
8
8
|
const CODE = 'usage.contact';
|
|
9
|
-
const ONE_WAY_HINT = 'Use exactly one of --contact-id, --email (with its name flags), or --contact.';
|
|
9
|
+
const ONE_WAY_HINT = 'Use exactly one of --contact-id, --email (with its name flags), or --contact (which also takes linkedin_url).';
|
|
10
10
|
const add_contact_options = (cmd) => cmd
|
|
11
11
|
.option('--contact-id <id>', 'The contact by its Reply id')
|
|
12
12
|
.option('--email <address>', 'The contact by email; with --first-name, --last-name, --company, --title')
|
|
@@ -14,14 +14,17 @@ const add_contact_options = (cmd) => cmd
|
|
|
14
14
|
.option('--last-name <name>', 'Last name (with --email)')
|
|
15
15
|
.option('--company <name>', 'Company (with --email)')
|
|
16
16
|
.option('--title <title>', 'Job title (with --email)')
|
|
17
|
-
.option('--contact <json>', 'The contact as JSON {email, first_name, last_name, company, title}: inline, @file, or - for stdin');
|
|
17
|
+
.option('--contact <json>', 'The contact as JSON {email, linkedin_url, first_name, last_name, company, title}: inline, @file, or - for stdin');
|
|
18
18
|
exports.add_contact_options = add_contact_options;
|
|
19
19
|
const CONTACT_HELP = `
|
|
20
20
|
A contact is given exactly one way:
|
|
21
|
-
--contact <json>|@file|- {email, first_name, last_name, company, title}
|
|
22
|
-
|
|
21
|
+
--contact <json>|@file|- {email, linkedin_url, first_name, last_name, company, title},
|
|
22
|
+
with an email, a LinkedIn URL or both; '-' reads stdin, which
|
|
23
|
+
keeps personal data out of the argument list
|
|
23
24
|
--email <address> [--first-name <name>] [--last-name <name>] [--company <name>] [--title <title>]
|
|
24
25
|
--contact-id <id> a contact Reply already holds
|
|
26
|
+
Reply is asked about a contact by its email; one with only a LinkedIn URL, by that. A LinkedIn URL is
|
|
27
|
+
matched by its lowercased slug, and the CLI stores it by that slug when it imports the contact.
|
|
25
28
|
|
|
26
29
|
`;
|
|
27
30
|
exports.CONTACT_HELP = CONTACT_HELP;
|
|
@@ -29,17 +32,52 @@ const clean = (v) => {
|
|
|
29
32
|
const text = typeof v === 'string' ? v.trim() : '';
|
|
30
33
|
return text ? text : undefined;
|
|
31
34
|
};
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
const is_email = (text) => /^[^\s@]+@[^\s@]+$/.test(text);
|
|
36
|
+
exports.is_email = is_email;
|
|
37
|
+
const is_linkedin_host = (host) => host === 'linkedin.com' || host.endsWith('.linkedin.com');
|
|
38
|
+
// The form a profile URL is compared and written in, or null when the text is not an absolute
|
|
39
|
+
// http(s) URL. On linkedin.com and its subdomains a URL names a person by its slug whatever its case,
|
|
40
|
+
// so the path is lowercased there; on any other host it keeps its case. The case of the scheme and
|
|
41
|
+
// the host, a default port, one trailing slash and a fragment never count; www and the query do. The
|
|
42
|
+
// CLI stores and matches a LinkedIn URL by this form, so what it writes is what it later finds.
|
|
43
|
+
const linkedin_key = (text) => {
|
|
44
|
+
let url;
|
|
45
|
+
try {
|
|
46
|
+
url = new URL(text.trim());
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
if ((url.protocol !== 'http:' && url.protocol !== 'https:') || url.hostname === '') {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
const trimmed = url.pathname.endsWith('/') ? url.pathname.slice(0, -1) : url.pathname;
|
|
55
|
+
const path = is_linkedin_host(url.hostname) ? trimmed.toLowerCase() : trimmed;
|
|
56
|
+
return `${url.protocol}//${url.host}${path}${url.search}`;
|
|
57
|
+
};
|
|
58
|
+
exports.linkedin_key = linkedin_key;
|
|
59
|
+
// The person as Reply will be asked about them: trimmed, empty fields dropped, an email or a
|
|
60
|
+
// LinkedIn URL required. Messages never echo either: a caller may log stderr where personal data
|
|
61
|
+
// must not go.
|
|
34
62
|
const person_of = (raw) => {
|
|
35
63
|
const email = clean(raw.email);
|
|
36
|
-
|
|
37
|
-
|
|
64
|
+
const linkedin_url = clean(raw.linkedin_url);
|
|
65
|
+
if (email === undefined && linkedin_url === undefined) {
|
|
66
|
+
throw new errors_1.UsageError('The contact needs an email or a LinkedIn URL.', { code: CODE, hint: ONE_WAY_HINT });
|
|
38
67
|
}
|
|
39
|
-
if (
|
|
68
|
+
if (email !== undefined && !is_email(email)) {
|
|
40
69
|
throw new errors_1.UsageError('The contact\'s email is not an email address.', { code: CODE });
|
|
41
70
|
}
|
|
42
|
-
|
|
71
|
+
if (linkedin_url !== undefined && linkedin_key(linkedin_url) === null) {
|
|
72
|
+
throw new errors_1.UsageError('The contact\'s linkedin_url is not an absolute http or https URL.', { code: CODE });
|
|
73
|
+
}
|
|
74
|
+
const person = {};
|
|
75
|
+
if (email !== undefined) {
|
|
76
|
+
person.email = email;
|
|
77
|
+
}
|
|
78
|
+
if (linkedin_url !== undefined) {
|
|
79
|
+
person.linkedin_url = linkedin_url;
|
|
80
|
+
}
|
|
43
81
|
for (const field of ['first_name', 'last_name', 'company', 'title']) {
|
|
44
82
|
const value = clean(raw[field]);
|
|
45
83
|
if (value !== undefined) {
|
|
@@ -48,6 +86,7 @@ const person_of = (raw) => {
|
|
|
48
86
|
}
|
|
49
87
|
return person;
|
|
50
88
|
};
|
|
89
|
+
exports.person_of = person_of;
|
|
51
90
|
const person_from_json = (value) => {
|
|
52
91
|
if (typeof value !== 'object' || value === null || Array.isArray(value)) {
|
|
53
92
|
throw new errors_1.UsageError('--contact must be a JSON object.', { code: CODE, hint: `Fields: ${PERSON_FIELDS.join(', ')}.` });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact-input.js","sourceRoot":"","sources":["../../src/operations/contact-input.ts"],"names":[],"mappings":";;;AACA,4CAA2C;AAC3C,gDAAgD;AAChD,uCAAmC;
|
|
1
|
+
{"version":3,"file":"contact-input.js","sourceRoot":"","sources":["../../src/operations/contact-input.ts"],"names":[],"mappings":";;;AACA,4CAA2C;AAC3C,gDAAgD;AAChD,uCAAmC;AAenC,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,CAAU,CAAC;AACxG,MAAM,IAAI,GAAG,eAAe,CAAC;AAC7B,MAAM,YAAY,GAAG,+GAA+G,CAAC;AAErI,MAAM,mBAAmB,GAAG,CAAC,GAAY,EAAU,EAAE,CAAA,GAAG;KACnD,MAAM,CAAC,mBAAmB,EAAE,6BAA6B,CAAC;KAC1D,MAAM,CAAC,mBAAmB,EAAE,0EAA0E,CAAC;KACvG,MAAM,CAAC,qBAAqB,EAAE,0EAA0E,CAAC;KACzG,MAAM,CAAC,oBAAoB,EAAE,0BAA0B,CAAC;KACxD,MAAM,CAAC,kBAAkB,EAAE,wBAAwB,CAAC;KACpD,MAAM,CAAC,iBAAiB,EAAE,0BAA0B,CAAC;KACrD,MAAM,CAAC,kBAAkB,EAAE,iHAAiH,CAAC,CAAC;AA2HvH,kDAA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3B,CAAC;QACG,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,gBAAgB,CAAC,IAAA,wBAAa,EAAC,CAAC,CAAC,OAAO,EAAE,EAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAC,CAAC,CAAC,EAAC,CAAC;IAC9I,CAAC;IACD,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC;YACtC,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK;SACrG,CAAC,EAAC,CAAC;AACR,CAAC,CAAC;AAEM,gDAAkB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type Op_globals } from './options';
|
|
2
|
+
import type { Cli_context } from '../context';
|
|
3
|
+
declare const handle_contact_find: (opts: {
|
|
4
|
+
contact?: string;
|
|
5
|
+
}, ctx: Cli_context, g: Op_globals, read_stdin?: () => string) => Promise<void>;
|
|
6
|
+
declare const handle_contact_get: (id_arg: string, ctx: Cli_context, g: Op_globals) => Promise<void>;
|
|
7
|
+
declare const handle_contact_update: (id_arg: string, opts: {
|
|
8
|
+
fields?: string;
|
|
9
|
+
}, ctx: Cli_context, g: Op_globals, read_stdin?: () => string) => Promise<void>;
|
|
10
|
+
declare const handle_contact_delete: (id_arg: string, ctx: Cli_context, g: Op_globals) => Promise<void>;
|
|
11
|
+
export { handle_contact_find, handle_contact_get, handle_contact_update, handle_contact_delete };
|