reply-cli 0.19.1 → 0.21.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 +104 -4
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/operations/account-call.d.ts +20 -0
- package/dist/operations/account-call.js +197 -0
- package/dist/operations/account-call.js.map +1 -0
- package/dist/operations/account-links.d.ts +14 -0
- package/dist/operations/account-links.js +209 -0
- package/dist/operations/account-links.js.map +1 -0
- package/dist/operations/account-manage.d.ts +20 -0
- package/dist/operations/account-manage.js +187 -0
- package/dist/operations/account-manage.js.map +1 -0
- package/dist/operations/accounts.d.ts +7 -1
- package/dist/operations/accounts.js +12 -1
- package/dist/operations/accounts.js.map +1 -1
- package/dist/operations/call.d.ts +2 -1
- package/dist/operations/call.js +1 -1
- package/dist/operations/call.js.map +1 -1
- package/dist/operations/commands.d.ts +2 -1
- package/dist/operations/commands.js +307 -3
- package/dist/operations/commands.js.map +1 -1
- package/dist/operations/contact-list.d.ts +12 -1
- package/dist/operations/contact-list.js +92 -4
- package/dist/operations/contact-list.js.map +1 -1
- package/dist/operations/live-data-preview.d.ts +10 -0
- package/dist/operations/live-data-preview.js +142 -0
- package/dist/operations/live-data-preview.js.map +1 -0
- package/dist/operations/live-data.d.ts +30 -0
- package/dist/operations/live-data.js +179 -0
- package/dist/operations/live-data.js.map +1 -0
- package/dist/operations/options.d.ts +1 -0
- package/dist/operations/options.js +1 -1
- package/dist/operations/options.js.map +1 -1
- package/dist/operations/sequence-by-name.js +2 -13
- package/dist/operations/sequence-by-name.js.map +1 -1
- package/dist/operations/shared-page.d.ts +12 -0
- package/dist/operations/shared-page.js +55 -0
- package/dist/operations/shared-page.js.map +1 -0
- package/dist/operations/stdin-input.d.ts +2 -1
- package/dist/operations/stdin-input.js +14 -1
- package/dist/operations/stdin-input.js.map +1 -1
- package/dist/utils/client.d.ts +2 -1
- package/dist/utils/client.js +2 -1
- package/dist/utils/client.js.map +1 -1
- package/package.json +1 -1
- package/skills/reply-adapter/reply-cli/SKILL.md +16 -5
- package/skills/reply-adapter/reply-operations-mapping/SKILL.md +22 -11
package/README.md
CHANGED
|
@@ -196,6 +196,14 @@ prints JSON (indented; compact with `--json`) and says what happened in a stable
|
|
|
196
196
|
| `reply sequence pause <id>` | → `paused` |
|
|
197
197
|
| `reply sequence start <id> [--expect-contacts N]` | → `started` / `already_active` |
|
|
198
198
|
| `reply contact-list add-contact <list-id> <contact> [--refuse-opted-out]` | → `added` |
|
|
199
|
+
| `reply contact-list create --name - [--shared]` | make an empty list of a name → `created` |
|
|
200
|
+
| `reply contact-list get <list-id>` · `reply contact-list delete <list-id>` | the list as Reply holds it · → `deleted` |
|
|
201
|
+
| `reply contact-list contacts <list-id> [--live-data-only] [--limit] [--offset]` | one page of the people on a list, oldest first |
|
|
202
|
+
| `reply live-data preview (--filters … [--max-per-company N] \| --job-id …) [--wait-seconds N]` | how many people and companies the filters match, and up to ten of them → `done` / `pending` |
|
|
203
|
+
| `reply live-data start --filters … --count N [--list-id N]… [--max-per-company N] [--with-phones]` | a search that adds the people it finds and puts them on the lists → `started` |
|
|
204
|
+
| `reply live-data get <id>` · `reply live-data list` | a search's status and counts · the team's searches, newest first |
|
|
205
|
+
| `reply live-data pause <id>` · `resume <id>` · `delete <id>` | → `paused` · `resumed` / `finished` · `deleted` |
|
|
206
|
+
| `reply live-data filter-values <kind> [--search …]` | values Reply suggests for industries, departments, seniorities, locations or job titles |
|
|
199
207
|
| `reply contact find --contact -` | the id of the contact under an email or a LinkedIn URL, or null; never creates one |
|
|
200
208
|
| `reply contact get <id>` | the contact as Reply holds it |
|
|
201
209
|
| `reply contact update (<id> \| <contact>) --fields -` | change some fields and custom fields; null clears one → `updated` |
|
|
@@ -218,6 +226,13 @@ prints JSON (indented; compact with `--json`) and says what happened in a stable
|
|
|
218
226
|
| `reply inbox mark-read <thread-id>` · `reply inbox mark-unread <thread-id>` | → `read` / `unread` |
|
|
219
227
|
| `reply account list [--channel email\|linkedin]` | the email and LinkedIn accounts a send can go from, whose each is, and the state of each |
|
|
220
228
|
| `reply schedule list` | the sending schedules the account can use, each with its time zone and its windows by weekday |
|
|
229
|
+
| `reply account connect --channel email --provider gmail\|office365 [--name N]` · `--channel linkedin --name N` | a link that connects one new account, for the person who signs in to open → `link`, `expires_at`, `pending_id` |
|
|
230
|
+
| `reply account reconnect <id> --channel email\|linkedin` | a link that reconnects an account that lost its connection → `link` |
|
|
231
|
+
| `reply account pending [--channel email\|linkedin]` | the connection links made and not used yet, without the links |
|
|
232
|
+
| `reply account limits <id> --channel email\|linkedin [--daily N] [--set …]` | read an account's sending limits, or change some of them |
|
|
233
|
+
| `reply account pause <id> --channel linkedin` · `resume <id> --channel linkedin` | → `inactive` / `active`, toggled only when it is not already so |
|
|
234
|
+
| `reply account unblock <id>` | let a mailbox its provider stopped from sending pick its sequences back up → `unblocked` |
|
|
235
|
+
| `reply account delete <id> --channel email\|linkedin --yes [--force]` | → `deleted`; without `--yes` nothing is sent |
|
|
221
236
|
|
|
222
237
|
`<contact>` is exactly one of `--contact <json>|@file|-`, `--email <address>` (with `--first-name`,
|
|
223
238
|
`--last-name`, `--company`, `--title`), or `--contact-id <id>`. The JSON takes the same fields
|
|
@@ -447,9 +462,51 @@ reply schedule list --json
|
|
|
447
462
|
# "reply_status":"isDefaultForCurrentUser"}]}
|
|
448
463
|
```
|
|
449
464
|
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
465
|
+
Live Data finds people Reply does not hold yet. `reply live-data preview` sizes an audience before
|
|
466
|
+
anything is spent: how many people and companies the filters match, and up to ten of them. Nothing is
|
|
467
|
+
saved or charged. Reply works a preview out as a background job, which the command reads every two
|
|
468
|
+
seconds for up to `--wait-seconds` (default 120). Reading it needs the key's `other:read` scope. When
|
|
469
|
+
the wait runs out first the answer is `pending` with the `job_id`, and `--job-id` goes on waiting.
|
|
470
|
+
The filters are Reply's own object, as the API documents it, passed on untouched; the
|
|
471
|
+
`filter-values` lists are suggestions, not a vocabulary Reply checks.
|
|
472
|
+
|
|
473
|
+
A search adds the people it finds as contacts and puts them on the lists named, so make a list first
|
|
474
|
+
and read the people off it:
|
|
475
|
+
|
|
476
|
+
```sh
|
|
477
|
+
echo '{"name":"Audience 12"}' | reply contact-list create --name - --json
|
|
478
|
+
# {"status":"created","list_id":77,"name":"Audience 12","is_shared":false}
|
|
479
|
+
echo '{"jobTitles":[{"value":"CTO","type":"include"}]}' | reply live-data start --filters - --count 25 --list-id 77 --json
|
|
480
|
+
# {"status":"started","search_id":901}
|
|
481
|
+
reply live-data get 901 --json # status, contactsFound, usedCredits, lists
|
|
482
|
+
reply contact-list contacts 77 --limit 1000 --offset 0 --json # the people found so far, oldest first
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
`contact-list contacts` reads oldest first by the date a contact was added, equal dates by contact id,
|
|
486
|
+
highest first, an order that holds from page to page. A search adds each batch at the end of it, so for a
|
|
487
|
+
list one search fills, the number of people already read is a cursor that only moves forward: pass it
|
|
488
|
+
as `--offset`. A person Reply already holds is skipped by the search, not put on the list.
|
|
489
|
+
|
|
490
|
+
Reply refuses a start (`live_data.search_in_progress`) while an unfinished search of the same team has
|
|
491
|
+
the same filters, running or paused; the lists, the count, people per company and phones don't count,
|
|
492
|
+
and searches with different filters run side by side. That refusal holds only while the first search
|
|
493
|
+
is unfinished: one that already finished or was deleted no longer blocks, so after exit 3 a second
|
|
494
|
+
`live-data start` may start, and charge for, a second search. Look in `live-data list` first, where a
|
|
495
|
+
search shows its lists. A `--list-id` the account does not have or cannot reach is `contact-list.not_found`,
|
|
496
|
+
and nothing starts. `pause` applies to a running
|
|
497
|
+
search, `resume` to a paused one (`live_data.invalid_status` otherwise, Reply's detail naming the
|
|
498
|
+
status), and a resume without the credits for one contact is `live_data.insufficient_credits`. A
|
|
499
|
+
search paused by the plan's contact limit stays paused while its owner has no room for another
|
|
500
|
+
contact: that resume is `live_data.contact_limit_reached`. A resume answers `finished`, with Reply's `search_status`,
|
|
501
|
+
when the search already had everything it was asked for.
|
|
502
|
+
`live_data.service_failed` is Reply's search service failing: nothing changed, and the call can be
|
|
503
|
+
made again. Read a search's final counts before `live-data delete`: a deleted search answers
|
|
504
|
+
`live_data.not_found`. The contacts it added stay.
|
|
505
|
+
|
|
506
|
+
`inbox reply`, `sequence create`, `live-data start` and the five direct sends are the work commands that
|
|
507
|
+
are not safe to re-run. On exit 3 (outcome unknown) a reply or a send may already have gone, and running
|
|
508
|
+
it again may send it twice, unless the hint says nothing was sent; a search may already have started
|
|
509
|
+
(above). A direct send's exit 3 comes from a lost
|
|
453
510
|
answer, a 5xx, or a 400 to the send whose JSON carries neither a `code` nor `errors[]`, which is
|
|
454
511
|
Reply failing while it made the send. On a LinkedIn send, a 400 `directLinkedIn.unknown` is the
|
|
455
512
|
same: Reply failed while making the send or could not map the provider's answer, and its code is
|
|
@@ -462,6 +519,49 @@ For `inbox reply`, read the thread with `reply inbox get` before trying again. F
|
|
|
462
519
|
`sequence list --name -` first. Every other work command can simply be run again; a `contact delete`
|
|
463
520
|
repeated after its first one took effect answers `contact.not_found`.
|
|
464
521
|
|
|
522
|
+
**Connecting accounts.** `account connect` and `account reconnect` print a link for the person who
|
|
523
|
+
signs in to the account: they open it in a browser and sign in on Google's, Microsoft's or LinkedIn's
|
|
524
|
+
own page, so no password passes through the CLI. The link is a credential for whoever holds it. It is
|
|
525
|
+
printed once, in the stdout field `link`, and never on stderr, in a `--verbose` trace (where it reads
|
|
526
|
+
`<link redacted>`), in an error or in a log. A connection link connects one account, works once and
|
|
527
|
+
expires, and the attempt is listed by `account pending` until the person finishes; then the account
|
|
528
|
+
is in `account list`. An email link needs `--provider`; a reconnect takes the provider from the
|
|
529
|
+
mailbox, and the person must sign in with the same address. A LinkedIn connect needs `--name`, which
|
|
530
|
+
Reply lists the pending account under.
|
|
531
|
+
|
|
532
|
+
A Reply without one-mailbox email links answers that route with a 404 and no code. The email
|
|
533
|
+
commands then refuse with `email_link.not_available` (exit 1) and print nothing, unless
|
|
534
|
+
`--allow-shared-page` is given: then they print the account user's hosted mailbox page, the
|
|
535
|
+
provider's connect on it with `--provider` and its index without, with `"link_kind":"shared_page"`,
|
|
536
|
+
`"expires_at":null` and a `warning`. That address does not expire and lets its holder manage all of
|
|
537
|
+
this user's mailboxes, deletion included, so ask for it only when that is acceptable. For
|
|
538
|
+
`account reconnect` the provider's connect is marked as a reconnect, so a user with no free mailbox
|
|
539
|
+
slot reconnects the mailbox rather than being refused a new one; on the index, the person opens the
|
|
540
|
+
mailbox and reconnects it from there.
|
|
541
|
+
`shared_page.not_enabled` means the plan does not include hosted pages. `account pending` then lists
|
|
542
|
+
no email entries and answers `"supported":false` with `"unsupported_channels":["email"]`.
|
|
543
|
+
|
|
544
|
+
```sh
|
|
545
|
+
reply account connect --channel email --provider gmail --name "Sales mailbox"
|
|
546
|
+
reply account connect --channel linkedin --name "Dana Example"
|
|
547
|
+
reply account reconnect 34 --channel linkedin
|
|
548
|
+
reply account pending
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
`account limits` prints the limits in Reply's names: an email account's `safety` section, which
|
|
552
|
+
`--daily` and `--set '{"minSendingDelaySeconds":90}'` change, and a LinkedIn account's `limits`,
|
|
553
|
+
which `--set` changes as Reply's limits update does. `account pause` and `account resume` act on a
|
|
554
|
+
LinkedIn account; Reply's only call flips the state, so it is read first and left alone when it is
|
|
555
|
+
already the one asked for. The flip turns an enabled account off and any other on, so `pause` flips
|
|
556
|
+
only an enabled account and `resume` only a disabled one. An account at its daily limit is active:
|
|
557
|
+
`resume` leaves it alone, and `pause` refuses it with `account.pause_unavailable` before any write. A
|
|
558
|
+
state the CLI does not know is refused with `account.status_unknown`, also before any write. Reply
|
|
559
|
+
has no way to pause a mailbox through its API. `account delete`
|
|
560
|
+
needs `--yes`, and `--force` deletes a LinkedIn account sequences still use. Reply's refusals come
|
|
561
|
+
under the CLI's codes, as every work command's do (`linkedin.account_in_use`, `email_account.not_found`,
|
|
562
|
+
`linkedin.invalid_cookie`), with Reply's own code in `reply_code`. After exit 3 from `account connect` or `account reconnect`, read
|
|
563
|
+
`account pending` before running it again: a link may already have been made.
|
|
564
|
+
|
|
465
565
|
**Errors.** With `--json`, a failure is one line on stderr:
|
|
466
566
|
`{"error":{"code":"contact.opted_out","title":…,"status":…,"reply_code":…,"ids":{…}}}`. `ids` is
|
|
467
567
|
whatever the command learned before failing, for example the id of a contact it created before
|
|
@@ -470,7 +570,7 @@ Reply refused the add. `reply.invalid_request` means Reply didn't accept a field
|
|
|
470
570
|
|
|
471
571
|
**Exit codes.** `0` done · `1` failed, and the main effect did not happen · `2` usage error, nothing
|
|
472
572
|
sent · `3` **outcome unknown**: a write may have happened and no answer came back. Re-running the
|
|
473
|
-
same command is safe, except `inbox reply`, `sequence create` and the direct sends (above): each of
|
|
573
|
+
same command is safe, except `inbox reply`, `sequence create`, `live-data start` and the direct sends (above): each of
|
|
474
574
|
the others checks or relies on Reply's own state rather than repeating an effect blindly.
|
|
475
575
|
|
|
476
576
|
**Retries.** Reads are retried on errors. A write is retried only when it can't have reached Reply:
|
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ const build_program = () => {
|
|
|
36
36
|
.option('--user-email <email>', 'Act as this user email — organization API keys only (needs a team id)')
|
|
37
37
|
.option('--json', 'Output compact JSON to stdout')
|
|
38
38
|
.option('--pretty', 'Output indented JSON to stdout')
|
|
39
|
-
.option('--verbose', 'Print the full request/response to stderr, credentials redacted (api)')
|
|
39
|
+
.option('--verbose', 'Print the full request/response to stderr, credentials and links redacted (api, account)')
|
|
40
40
|
.option('-q, --quiet', 'Suppress progress messages on stderr (warnings and errors still shown)')
|
|
41
41
|
.showHelpAfterError();
|
|
42
42
|
// Apply --quiet before any command action runs, so progress output is
|
|
@@ -45,7 +45,8 @@ const build_program = () => {
|
|
|
45
45
|
const WORK = 'Work with your Reply account:';
|
|
46
46
|
const SETUP = 'Setup:';
|
|
47
47
|
for (const c of [
|
|
48
|
-
commands_1.sequence_command, commands_1.contact_list_command, commands_1.contact_command, commands_1.inbox_command, commands_1.account_command, commands_1.schedule_command,
|
|
48
|
+
commands_1.sequence_command, commands_1.contact_list_command, commands_1.live_data_command, commands_1.contact_command, commands_1.inbox_command, commands_1.account_command, commands_1.schedule_command,
|
|
49
|
+
commands_1.direct_send_command, api_1.api_command,
|
|
49
50
|
]) {
|
|
50
51
|
program.addCommand(c.helpGroup(WORK));
|
|
51
52
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AACA,yCAAkD;AAClD,qCAAmD;AACnD,0CAA6C;AAC7C,gDAAmD;AACnD,0CAA6C;AAC7C,wCAA2C;AAC3C,8CAAiD;AACjD,gDAAmD;AACnD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AACA,yCAAkD;AAClD,qCAAmD;AACnD,0CAA6C;AAC7C,gDAAmD;AACnD,0CAA6C;AAC7C,wCAA2C;AAC3C,8CAAiD;AACjD,gDAAmD;AACnD,oDAG+B;AAC/B,gDAAkD;AAClD,2CAAqD;AACrD,2CAA+C;AAE/C,8EAA8E;AAC9E,sEAAsE;AACtE,MAAM,iBAAiB,GAAG,CAAC,GAAY,EAAO,EAAE;IAC5C,GAAG,CAAC,YAAY,EAAE,CAAC;IACnB,KAAK,MAAM,GAAG,IAAI,GAAG,CAAC,QAAQ,EAC9B,CAAC;QACG,iBAAiB,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,aAAa,GAAG,GAAW,EAAE;IAC/B,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;IAC9B,MAAM,MAAM,GAAG,qBAAY,CAAC,WAAW,EAAE,CAAC;IAC1C,OAAO;SACF,IAAI,CAAC,qBAAY,CAAC;SAClB,WAAW,CAAC,sCAA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ACd,CAAC;gBACG,OAAO,CAAC,KAAK,CAAC,IAAA,oBAAW,EAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;YAC3C,CAAC;QACL,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAClC,CAAC;IACD,OAAO,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACtE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Operation_error } from '../utils/errors';
|
|
2
|
+
import { type Answer, type Op_session } from './call';
|
|
3
|
+
import type { Call_kind } from '../utils/client';
|
|
4
|
+
import type { Op_globals } from './options';
|
|
5
|
+
declare const LINK_REDACTED = "<link redacted>";
|
|
6
|
+
declare const add_link: (link: string, found: Set<string>) => void;
|
|
7
|
+
declare const links_in: (data: unknown, found?: Set<string>) => Set<string>;
|
|
8
|
+
declare const redact_links: (text: string, secrets: Iterable<string>) => string;
|
|
9
|
+
declare const account_call: (s: Op_session, g: Op_globals, method: string, path: string, kind: Call_kind, body?: unknown, opts?: {
|
|
10
|
+
secret_body?: boolean;
|
|
11
|
+
}) => Promise<Answer>;
|
|
12
|
+
declare const without_secrets: (a: Answer) => Answer;
|
|
13
|
+
declare const ACCOUNT_REFUSALS: Record<string, {
|
|
14
|
+
status: number;
|
|
15
|
+
code: string;
|
|
16
|
+
title: string;
|
|
17
|
+
}>;
|
|
18
|
+
declare const account_refusal: (a: Answer, kind: Call_kind) => Operation_error;
|
|
19
|
+
declare const route_missing: (a: Answer) => boolean;
|
|
20
|
+
export { LINK_REDACTED, ACCOUNT_REFUSALS, account_call, account_refusal, route_missing, links_in, redact_links, add_link, without_secrets };
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.without_secrets = exports.add_link = exports.redact_links = exports.links_in = exports.route_missing = exports.account_refusal = exports.account_call = exports.ACCOUNT_REFUSALS = exports.LINK_REDACTED = void 0;
|
|
4
|
+
const output_1 = require("../utils/output");
|
|
5
|
+
const errors_1 = require("../utils/errors");
|
|
6
|
+
const call_1 = require("./call");
|
|
7
|
+
// The calls of the account commands, and what they write to stderr under --verbose. A connection link,
|
|
8
|
+
// the shared page's address and any token in them are handed over once, in the stdout field `link`: in a
|
|
9
|
+
// trace each is replaced by LINK_REDACTED, wherever it appears.
|
|
10
|
+
const LINK_REDACTED = '<link redacted>';
|
|
11
|
+
exports.LINK_REDACTED = LINK_REDACTED;
|
|
12
|
+
// The fields Reply hands a link in: v3's connectionLink and the v1 shared page's url.
|
|
13
|
+
const LINK_FIELDS = ['connectionlink', 'url'];
|
|
14
|
+
// Too short to be a token, and short enough to be an ordinary word of a URL.
|
|
15
|
+
const SHORTEST_TOKEN = 8;
|
|
16
|
+
const SHORTEST_INNER_TOKEN = 16;
|
|
17
|
+
const URL_IN_TEXT = /https?:\/\/[^\s"'<>]+/gi;
|
|
18
|
+
const safe_decode = (part) => {
|
|
19
|
+
try {
|
|
20
|
+
return decodeURIComponent(part);
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
return part;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
// A link, and every token it carries: its last path segment, every query value, and any inner path
|
|
27
|
+
// segment that looks generated (long, with a digit in it), each as written and decoded.
|
|
28
|
+
const add_link = (link, found) => {
|
|
29
|
+
found.add(link);
|
|
30
|
+
let url;
|
|
31
|
+
try {
|
|
32
|
+
url = new URL(link);
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const segments = url.pathname.split('/').filter(Boolean);
|
|
38
|
+
const parts = [
|
|
39
|
+
...segments.slice(0, -1).filter(p => p.length >= SHORTEST_INNER_TOKEN && /[0-9]/.test(p)),
|
|
40
|
+
...segments.slice(-1),
|
|
41
|
+
...[...url.searchParams.values()],
|
|
42
|
+
];
|
|
43
|
+
for (const part of parts) {
|
|
44
|
+
for (const form of [part, safe_decode(part), encodeURIComponent(safe_decode(part))]) {
|
|
45
|
+
if (form.length >= SHORTEST_TOKEN) {
|
|
46
|
+
found.add(form);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
exports.add_link = add_link;
|
|
52
|
+
const is_address = (text) => /^https?:\/\//i.test(text.trim());
|
|
53
|
+
// Every link in an answer's body, with its tokens: in a link field at any depth, or the body itself when
|
|
54
|
+
// it is nothing but an address.
|
|
55
|
+
const links_in = (data, found = new Set()) => {
|
|
56
|
+
if (typeof data === 'string' && is_address(data)) {
|
|
57
|
+
add_link(data.trim(), found);
|
|
58
|
+
}
|
|
59
|
+
else if (Array.isArray(data)) {
|
|
60
|
+
data.forEach(d => links_in(d, found));
|
|
61
|
+
}
|
|
62
|
+
else if ((0, call_1.is_object)(data)) {
|
|
63
|
+
for (const [k, v] of Object.entries(data)) {
|
|
64
|
+
if (typeof v === 'string' && LINK_FIELDS.includes(k.toLowerCase())) {
|
|
65
|
+
add_link(v, found);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
links_in(v, found);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return found;
|
|
73
|
+
};
|
|
74
|
+
exports.links_in = links_in;
|
|
75
|
+
// Every string of a body at any depth, the body itself when it is one.
|
|
76
|
+
const strings_of = (data, found = []) => {
|
|
77
|
+
if (typeof data === 'string') {
|
|
78
|
+
found.push(data);
|
|
79
|
+
}
|
|
80
|
+
else if (Array.isArray(data)) {
|
|
81
|
+
data.forEach(d => strings_of(d, found));
|
|
82
|
+
}
|
|
83
|
+
else if ((0, call_1.is_object)(data)) {
|
|
84
|
+
Object.values(data).forEach(v => strings_of(v, found));
|
|
85
|
+
}
|
|
86
|
+
return found;
|
|
87
|
+
};
|
|
88
|
+
// The secrets of a body that is secret whatever its shape: every address inside any of its strings,
|
|
89
|
+
// with its tokens, and every string that is wholly one value, such as a bare token.
|
|
90
|
+
const body_secrets = (data) => {
|
|
91
|
+
const found = links_in(data);
|
|
92
|
+
for (const text of strings_of(data)) {
|
|
93
|
+
for (const url of text.match(URL_IN_TEXT) ?? []) {
|
|
94
|
+
add_link(url, found);
|
|
95
|
+
}
|
|
96
|
+
if (!/\s/.test(text.trim()) && text.trim().length >= SHORTEST_TOKEN) {
|
|
97
|
+
add_link(text.trim(), found);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return found;
|
|
101
|
+
};
|
|
102
|
+
const redact_links = (text, secrets) => [...secrets].sort((a, b) => b.length - a.length).reduce((t, s) => t.split(s).join(LINK_REDACTED), text);
|
|
103
|
+
exports.redact_links = redact_links;
|
|
104
|
+
// curl -v style, as `reply api --verbose` writes it, with the answer's body after its headers. A secret
|
|
105
|
+
// body is never shown, only that there was one.
|
|
106
|
+
const trace_lines = (a, secret_body) => {
|
|
107
|
+
const lines = [];
|
|
108
|
+
if (a.request) {
|
|
109
|
+
lines.push(`> ${a.request.method} ${a.request.url}`);
|
|
110
|
+
for (const [k, v] of Object.entries(a.request.headers)) {
|
|
111
|
+
lines.push(`> ${k}: ${v}`);
|
|
112
|
+
}
|
|
113
|
+
if (a.request.body) {
|
|
114
|
+
lines.push('>', `> ${a.request.body}`);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
lines.push(`< ${a.status}`);
|
|
118
|
+
for (const [k, v] of Object.entries(a.headers)) {
|
|
119
|
+
lines.push(`< ${k}: ${/cookie/i.test(k) ? output_1.REDACTED : v}`);
|
|
120
|
+
}
|
|
121
|
+
if (a.data !== null && a.data !== '') {
|
|
122
|
+
const shown = secret_body ? LINK_REDACTED : typeof a.data === 'string' ? a.data : JSON.stringify(a.data);
|
|
123
|
+
lines.push('<', `< ${shown}`);
|
|
124
|
+
}
|
|
125
|
+
return lines;
|
|
126
|
+
};
|
|
127
|
+
const secrets_of = (a, secret_body) => (secret_body ? body_secrets(a.data) : links_in(a.data));
|
|
128
|
+
// One call of an account command. The links in its answer never reach the trace. With `secret_body`
|
|
129
|
+
// (the shared page, whose answer is the address in whatever shape Reply gives it) the trace shows none
|
|
130
|
+
// of the body, and nothing of it appears anywhere else in the trace either.
|
|
131
|
+
const account_call = async (s, g, method, path, kind, body, opts = {}) => {
|
|
132
|
+
const a = await (0, call_1.call_reply)(s, method, path, kind, body);
|
|
133
|
+
if (g.verbose) {
|
|
134
|
+
const secret_body = opts.secret_body === true;
|
|
135
|
+
console.error(redact_links(trace_lines(a, secret_body).join('\n'), secrets_of(a, secret_body)));
|
|
136
|
+
}
|
|
137
|
+
return a;
|
|
138
|
+
};
|
|
139
|
+
exports.account_call = account_call;
|
|
140
|
+
// The same answer with every secret of its body replaced, for an error built from a secret body.
|
|
141
|
+
const without_secrets = (a) => {
|
|
142
|
+
const secrets = body_secrets(a.data);
|
|
143
|
+
const clean = (v) => {
|
|
144
|
+
if (typeof v === 'string') {
|
|
145
|
+
return redact_links(v, secrets);
|
|
146
|
+
}
|
|
147
|
+
if (Array.isArray(v)) {
|
|
148
|
+
return v.map(clean);
|
|
149
|
+
}
|
|
150
|
+
return (0, call_1.is_object)(v) ? Object.fromEntries(Object.entries(v).map(([k, x]) => [k, clean(x)])) : v;
|
|
151
|
+
};
|
|
152
|
+
return { ...a, data: clean(a.data) };
|
|
153
|
+
};
|
|
154
|
+
exports.without_secrets = without_secrets;
|
|
155
|
+
// Reply's refusals of the account routes, each at the status Reply answers it with, under the CLI's
|
|
156
|
+
// code. Reply's own code always travels in reply_code; any other answer reads as every operation reads it.
|
|
157
|
+
const ACCOUNT_REFUSALS = {
|
|
158
|
+
'emailAccount.notFound': {
|
|
159
|
+
status: 404, code: 'email_account.not_found', title: 'Reply has no email account by that id that this user can act on.',
|
|
160
|
+
},
|
|
161
|
+
'emailAccount.limitReached': {
|
|
162
|
+
status: 409, code: 'email_account.limit_reached', title: 'The plan\'s email account limit is reached, so no link was made.',
|
|
163
|
+
},
|
|
164
|
+
'emailAccount.noFreeMailboxSlots': {
|
|
165
|
+
status: 409, code: 'email_account.no_free_mailbox_slots', title: 'One more email account would need a paid seat, so no link was made.',
|
|
166
|
+
},
|
|
167
|
+
'emailAccount.reconnectNotSupported': {
|
|
168
|
+
status: 400, code: 'email_account.reconnect_not_supported',
|
|
169
|
+
title: 'Only a Gmail or Office 365 single-click mailbox can be reconnected by link, so no link was made.',
|
|
170
|
+
},
|
|
171
|
+
'linkedInAccount.notFound': {
|
|
172
|
+
status: 404, code: 'linkedin.account_not_found', title: 'Reply has no LinkedIn account by that id that this user can act on.',
|
|
173
|
+
},
|
|
174
|
+
'linkedInAccount.limitReached': {
|
|
175
|
+
status: 409, code: 'linkedin.account_limit_reached', title: 'The plan has no room for another LinkedIn account, so no link was made.',
|
|
176
|
+
},
|
|
177
|
+
'linkedInAccount.accountInUse': {
|
|
178
|
+
status: 409, code: 'linkedin.account_in_use', title: 'Sequences use the LinkedIn account, so it was not deleted; --force deletes it anyway.',
|
|
179
|
+
},
|
|
180
|
+
'linkedInAccount.cookieInvalid': {
|
|
181
|
+
status: 400, code: 'linkedin.invalid_cookie', title: 'The LinkedIn account\'s session is no longer valid; reconnect the account.',
|
|
182
|
+
},
|
|
183
|
+
};
|
|
184
|
+
exports.ACCOUNT_REFUSALS = ACCOUNT_REFUSALS;
|
|
185
|
+
const account_refusal = (a, kind) => {
|
|
186
|
+
const reply_code = (0, call_1.reply_code_of)(a);
|
|
187
|
+
const known = reply_code === undefined ? undefined : ACCOUNT_REFUSALS[reply_code];
|
|
188
|
+
if (known === undefined || known.status !== a.status) {
|
|
189
|
+
return (0, call_1.refusal)(a, kind);
|
|
190
|
+
}
|
|
191
|
+
return new errors_1.Operation_error(known.code, known.title, { status: a.status, reply_code, detail: (0, call_1.detail_of)(a) });
|
|
192
|
+
};
|
|
193
|
+
exports.account_refusal = account_refusal;
|
|
194
|
+
// A route this Reply does not have answers 404 with no code of Reply's; one it has answers its own.
|
|
195
|
+
const route_missing = (a) => a.status === 404 && (0, call_1.reply_code_of)(a) === undefined;
|
|
196
|
+
exports.route_missing = route_missing;
|
|
197
|
+
//# sourceMappingURL=account-call.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-call.js","sourceRoot":"","sources":["../../src/operations/account-call.ts"],"names":[],"mappings":";;;AAAA,4CAAyC;AACzC,4CAAgD;AAChD,iCAA8G;AAI9G,uGAAuG;AACvG,yGAAyG;AACzG,gEAAgE;AAEhE,MAAM,aAAa,GAAG,iBAAiB,CAAC;AA6NhC,sCAAa;AA3NrB,sFAAsF;AACtF,MAAM,WAAW,GAAG,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;AAE9C,6EAA6E;AAC7E,MAAM,cAAc,GAAG,CAAC,CAAC;AACzB,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEhC,MAAM,WAAW,GAAG,yBAAyB,CAAC;AAE9C,MAAM,WAAW,GAAG,CAAC,IAAY,EAAS,EAAE;IACxC,IAAI,CAAC;QACD,OAAO,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,IAAI,CAAC;IAChB,CAAC;AACL,CAAC,CAAC;AAEF,mGAAmG;AACnG,wFAAwF;AACxF,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,KAAkB,EAAO,EAAE;IACvD,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAChB,IAAI,GAAQ,CAAC;IACb,IAAI,CAAC;QACD,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IAAC,MAAM,CAAC;QACL,OAAO;IACX,CAAC;IACD,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAA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ACJ,CAAC;AAeqB,4CAAgB;AAbvC,MAAM,eAAe,GAAG,CAAC,CAAS,EAAE,IAAe,EAAkB,EAAE;IACnE,MAAM,UAAU,GAAG,IAAA,oBAAa,EAAC,CAAC,CAAC,CAAC;IACpC,MAAM,KAAK,GAAG,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAClF,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,EACpD,CAAC;QACG,OAAO,IAAA,cAAO,EAAC,CAAC,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC;IACD,OAAO,IAAI,wBAAe,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,EAAC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,IAAA,gBAAS,EAAC,CAAC,CAAC,EAAC,CAAC,CAAC;AAC9G,CAAC,CAAC;AAKqD,0CAAe;AAHtE,oGAAoG;AACpG,MAAM,aAAa,GAAG,CAAC,CAAS,EAAU,EAAE,CAAA,CAAC,CAAC,MAAM,KAAK,GAAG,IAAI,IAAA,oBAAa,EAAC,CAAC,CAAC,KAAK,SAAS,CAAC;AAEvB,sCAAa"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type Op_globals } from './options';
|
|
2
|
+
import type { Cli_context } from '../context';
|
|
3
|
+
type Link_opts = {
|
|
4
|
+
channel?: string;
|
|
5
|
+
provider?: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
allowSharedPage?: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare const handle_account_connect: (opts: Link_opts, ctx: Cli_context, g: Op_globals) => Promise<void>;
|
|
10
|
+
declare const handle_account_reconnect: (id_arg: string, opts: Link_opts, ctx: Cli_context, g: Op_globals) => Promise<void>;
|
|
11
|
+
declare const handle_account_pending: (opts: {
|
|
12
|
+
channel?: string;
|
|
13
|
+
}, ctx: Cli_context, g: Op_globals) => Promise<void>;
|
|
14
|
+
export { handle_account_connect, handle_account_reconnect, handle_account_pending };
|