@skillrecordings/cli 0.8.0 → 0.9.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/dist/index.js +85 -26
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -93297,10 +93297,10 @@ async function searchConversations(query, options) {
|
|
|
93297
93297
|
}
|
|
93298
93298
|
}
|
|
93299
93299
|
function registerSearchCommand(frontCommand) {
|
|
93300
|
-
frontCommand.command("search").description(
|
|
93300
|
+
const searchCmd = frontCommand.command("search").description(
|
|
93301
93301
|
"Search conversations (text, subject, filters). See https://dev.frontapp.com/docs/search-1"
|
|
93302
93302
|
).argument(
|
|
93303
|
-
"
|
|
93303
|
+
"[query]",
|
|
93304
93304
|
'Search query (text, "exact phrase", or filter syntax)'
|
|
93305
93305
|
).option("--inbox <id>", "Filter by inbox ID (inb_xxx)").option("--tag <id>", "Filter by tag ID (tag_xxx)").option("--assignee <id>", "Filter by assignee (tea_xxx)").option(
|
|
93306
93306
|
"--status <status>",
|
|
@@ -93308,31 +93308,90 @@ function registerSearchCommand(frontCommand) {
|
|
|
93308
93308
|
).option("--from <email>", "Filter by sender email").option("--after <timestamp>", "Filter after Unix timestamp").option("--before <timestamp>", "Filter before Unix timestamp").option("--limit <n>", "Max results (default 25)", "25").option("--json", "Output as JSON").addHelpText(
|
|
93309
93309
|
"after",
|
|
93310
93310
|
`
|
|
93311
|
-
Front Search Query Syntax
|
|
93312
|
-
|
|
93313
|
-
|
|
93314
|
-
|
|
93315
|
-
|
|
93316
|
-
|
|
93317
|
-
|
|
93318
|
-
|
|
93319
|
-
|
|
93320
|
-
|
|
93321
|
-
|
|
93322
|
-
|
|
93323
|
-
|
|
93324
|
-
|
|
93325
|
-
|
|
93326
|
-
|
|
93327
|
-
|
|
93328
|
-
|
|
93329
|
-
|
|
93330
|
-
|
|
93331
|
-
|
|
93332
|
-
|
|
93333
|
-
|
|
93311
|
+
\u2501\u2501\u2501 Front Search Query Syntax \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
|
|
93312
|
+
|
|
93313
|
+
The <query> argument accepts free text and/or inline Front filters.
|
|
93314
|
+
CLI flags (--inbox, --status, etc.) are appended as filters automatically.
|
|
93315
|
+
You can mix both: skill front search "refund" --inbox inb_4bj7r --status open
|
|
93316
|
+
|
|
93317
|
+
TEXT SEARCH
|
|
93318
|
+
word1 word2 AND \u2014 both words must appear in subject or body
|
|
93319
|
+
"exact phrase" Phrase match (quote the phrase)
|
|
93320
|
+
|
|
93321
|
+
FILTERS (use inline in query OR via CLI flags)
|
|
93322
|
+
Filter CLI flag What it matches
|
|
93323
|
+
\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
93324
|
+
inbox:inb_xxx --inbox <id> Conversations in inbox
|
|
93325
|
+
tag:tag_xxx --tag <id> Conversations with tag
|
|
93326
|
+
from:email --from <email> Sender address
|
|
93327
|
+
to:email (inline only) Recipient address
|
|
93328
|
+
cc:email (inline only) CC'd address
|
|
93329
|
+
bcc:email (inline only) BCC'd address
|
|
93330
|
+
recipient:email (inline only) Any role (from/to/cc/bcc)
|
|
93331
|
+
contact:crd_xxx (inline only) Contact ID in any role
|
|
93332
|
+
assignee:tea_xxx --assignee <id> Assigned teammate
|
|
93333
|
+
author:tea_xxx (inline only) Message author (teammate)
|
|
93334
|
+
participant:tea_xxx (inline only) Any teammate involvement
|
|
93335
|
+
mention:tea_xxx (inline only) Mentioned teammate
|
|
93336
|
+
commenter:tea_xxx (inline only) Commenting teammate
|
|
93337
|
+
link:top_xxx (inline only) Linked topic
|
|
93338
|
+
is:<status> --status <status> Conversation status (see below)
|
|
93339
|
+
before:<unix_ts> --before <timestamp> Messages before timestamp
|
|
93340
|
+
after:<unix_ts> --after <timestamp> Messages after timestamp
|
|
93341
|
+
during:<unix_ts> (inline only) Messages on same day as timestamp
|
|
93342
|
+
custom_field:"K=V" (inline only) Custom field value
|
|
93343
|
+
|
|
93344
|
+
STATUS VALUES (is: filter / --status flag)
|
|
93345
|
+
open In the Open tab (not archived, not trashed, not snoozed)
|
|
93346
|
+
archived In the Archived tab
|
|
93347
|
+
assigned Has an assignee (can combine: is:open is:assigned)
|
|
93348
|
+
unassigned No assignee
|
|
93349
|
+
unreplied Last message was inbound (no teammate reply yet)
|
|
93350
|
+
snoozed Snoozed (will reopen later; API status shows "archived")
|
|
93351
|
+
trashed In Trash
|
|
93352
|
+
waiting Waiting for response
|
|
93353
|
+
|
|
93354
|
+
Status combos: is:open + is:unassigned = open & unassigned
|
|
93355
|
+
is:archived + is:assigned = archived & assigned
|
|
93356
|
+
Conflicts: open vs archived vs trashed vs snoozed are mutually exclusive
|
|
93357
|
+
assigned vs unassigned are mutually exclusive
|
|
93358
|
+
|
|
93359
|
+
FILTER LOGIC
|
|
93360
|
+
All filters combine with AND (results must match every filter).
|
|
93361
|
+
Exception: multiple from/to/cc/bcc use OR within the same filter type.
|
|
93362
|
+
from:a@x.com from:b@x.com \u2192 from A OR from B
|
|
93363
|
+
from:a@x.com to:b@x.com \u2192 from A AND to B
|
|
93364
|
+
Max 15 filters per query.
|
|
93365
|
+
|
|
93366
|
+
EXAMPLES
|
|
93367
|
+
# Find unresolved payment issues in AI Hero inbox
|
|
93368
|
+
skill front search "payment failed" --inbox inb_4bj7r --status unassigned
|
|
93369
|
+
|
|
93370
|
+
# Unreplied conversations from a specific sender
|
|
93371
|
+
skill front search "upgrade" --from user@example.com --status unreplied
|
|
93372
|
+
|
|
93373
|
+
# Complex inline query (filters in the query string itself)
|
|
93374
|
+
skill front search "from:dale@a.com from:laura@a.com tag:tag_14nmdp before:1650364200"
|
|
93375
|
+
|
|
93376
|
+
# All snoozed conversations assigned to a teammate
|
|
93377
|
+
skill front search "is:snoozed assignee:tea_2thf" --inbox inb_4bj7r
|
|
93378
|
+
|
|
93379
|
+
# Search by custom field
|
|
93380
|
+
skill front search 'custom_field:"External ID=12345"'
|
|
93381
|
+
|
|
93382
|
+
# Pipe JSON to jq for IDs only
|
|
93383
|
+
skill front search "is:unassigned" --inbox inb_4bj7r --json | jq '.data.conversations[].id'
|
|
93384
|
+
|
|
93385
|
+
Full docs: https://dev.frontapp.com/docs/search-1
|
|
93334
93386
|
`
|
|
93335
|
-
).action(
|
|
93387
|
+
).action((query, options) => {
|
|
93388
|
+
const hasFilters = options.inbox || options.tag || options.assignee || options.status || options.from || options.after || options.before;
|
|
93389
|
+
if (!query && !hasFilters) {
|
|
93390
|
+
searchCmd.help();
|
|
93391
|
+
return;
|
|
93392
|
+
}
|
|
93393
|
+
return searchConversations(query || "", options);
|
|
93394
|
+
});
|
|
93336
93395
|
}
|
|
93337
93396
|
|
|
93338
93397
|
// src/commands/front/tags.ts
|