chatbase 0.1.1 → 0.2.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.
Files changed (3) hide show
  1. package/README.md +43 -43
  2. package/oclif.manifest.json +461 -461
  3. package/package.json +1 -1
@@ -1816,13 +1816,19 @@
1816
1816
  "teams.js"
1817
1817
  ]
1818
1818
  },
1819
- "tickets:create": {
1819
+ "messages:feedback": {
1820
1820
  "aliases": [],
1821
- "args": {},
1822
- "description": "Create a helpdesk ticket",
1821
+ "args": {
1822
+ "messageId": {
1823
+ "description": "Message ID (alternative to --message)",
1824
+ "name": "messageId",
1825
+ "required": false
1826
+ }
1827
+ },
1828
+ "description": "Set or clear user feedback on an assistant message",
1823
1829
  "examples": [
1824
- "<%= config.bin %> tickets create --subject \"Export failing\" -f description=\"Customer cannot export.\" --customer-email jane@example.com -a agt_123",
1825
- "<%= config.bin %> tickets create --subject \"Export failing\" --data '{\"description\":\"Customer cannot export.\",\"customer\":{\"email\":\"jane@example.com\"}}' -a agt_123"
1830
+ "<%= config.bin %> messages feedback msg_1 --conversation conv_123 --rating positive -a agt_123",
1831
+ "<%= config.bin %> messages feedback --conversation conv_123 --message msg_1 --rating clear -a agt_123"
1826
1832
  ],
1827
1833
  "flags": {
1828
1834
  "json": {
@@ -1882,49 +1888,38 @@
1882
1888
  "multiple": false,
1883
1889
  "type": "option"
1884
1890
  },
1885
- "field": {
1886
- "char": "f",
1887
- "description": "Set a body field: -f key=value (repeatable)",
1888
- "name": "field",
1889
- "hasDynamicHelp": false,
1890
- "multiple": true,
1891
- "type": "option"
1892
- },
1893
- "subject": {
1894
- "description": "Ticket subject",
1895
- "name": "subject",
1896
- "hasDynamicHelp": false,
1897
- "multiple": false,
1898
- "type": "option"
1899
- },
1900
- "customer-email": {
1901
- "description": "Customer email — builds the required customer object (alternative to customer in --data)",
1902
- "name": "customer-email",
1891
+ "conversation": {
1892
+ "description": "Conversation ID",
1893
+ "name": "conversation",
1894
+ "required": true,
1903
1895
  "hasDynamicHelp": false,
1904
1896
  "multiple": false,
1905
1897
  "type": "option"
1906
1898
  },
1907
- "customer-name": {
1908
- "dependsOn": [
1909
- "customer-email"
1910
- ],
1911
- "description": "Customer display name, used only when the email creates a new customer record",
1912
- "name": "customer-name",
1899
+ "message": {
1900
+ "description": "Message ID",
1901
+ "name": "message",
1913
1902
  "hasDynamicHelp": false,
1914
1903
  "multiple": false,
1915
1904
  "type": "option"
1916
1905
  },
1917
- "data": {
1918
- "description": "JSON body (@file, @-, or inline). Fields: subject, description, customer, statusId, statusCategory, assigneeId, assigneeEmail, teamId",
1919
- "name": "data",
1906
+ "rating": {
1907
+ "description": "Feedback value (\"clear\" removes existing feedback)",
1908
+ "name": "rating",
1909
+ "required": true,
1920
1910
  "hasDynamicHelp": false,
1921
1911
  "multiple": false,
1912
+ "options": [
1913
+ "positive",
1914
+ "negative",
1915
+ "clear"
1916
+ ],
1922
1917
  "type": "option"
1923
1918
  }
1924
1919
  },
1925
1920
  "hasDynamicHelp": false,
1926
1921
  "hiddenAliases": [],
1927
- "id": "tickets:create",
1922
+ "id": "messages:feedback",
1928
1923
  "pluginAlias": "chatbase",
1929
1924
  "pluginName": "chatbase",
1930
1925
  "pluginType": "core",
@@ -1934,22 +1929,17 @@
1934
1929
  "relativePath": [
1935
1930
  "dist",
1936
1931
  "commands",
1937
- "tickets",
1938
- "create.js"
1932
+ "messages",
1933
+ "feedback.js"
1939
1934
  ]
1940
1935
  },
1941
- "tickets:get": {
1936
+ "messages:list": {
1942
1937
  "aliases": [],
1943
- "args": {
1944
- "ticketNumber": {
1945
- "description": "Ticket number",
1946
- "name": "ticketNumber",
1947
- "required": true
1948
- }
1949
- },
1950
- "description": "Show one helpdesk ticket",
1938
+ "args": {},
1939
+ "description": "List messages in a conversation",
1951
1940
  "examples": [
1952
- "<%= config.bin %> tickets get 42 -a agt_123"
1941
+ "<%= config.bin %> messages list --conversation conv_123 -a agt_123",
1942
+ "<%= config.bin %> messages list --conversation conv_123 -a agt_123 --all --json"
1953
1943
  ],
1954
1944
  "flags": {
1955
1945
  "json": {
@@ -2008,11 +1998,39 @@
2008
1998
  "hasDynamicHelp": false,
2009
1999
  "multiple": false,
2010
2000
  "type": "option"
2001
+ },
2002
+ "limit": {
2003
+ "description": "Maximum items per page",
2004
+ "name": "limit",
2005
+ "hasDynamicHelp": false,
2006
+ "multiple": false,
2007
+ "type": "option"
2008
+ },
2009
+ "cursor": {
2010
+ "description": "Pagination cursor from a previous page",
2011
+ "name": "cursor",
2012
+ "hasDynamicHelp": false,
2013
+ "multiple": false,
2014
+ "type": "option"
2015
+ },
2016
+ "all": {
2017
+ "description": "Fetch every page",
2018
+ "name": "all",
2019
+ "allowNo": false,
2020
+ "type": "boolean"
2021
+ },
2022
+ "conversation": {
2023
+ "description": "Conversation ID",
2024
+ "name": "conversation",
2025
+ "required": true,
2026
+ "hasDynamicHelp": false,
2027
+ "multiple": false,
2028
+ "type": "option"
2011
2029
  }
2012
2030
  },
2013
2031
  "hasDynamicHelp": false,
2014
2032
  "hiddenAliases": [],
2015
- "id": "tickets:get",
2033
+ "id": "messages:list",
2016
2034
  "pluginAlias": "chatbase",
2017
2035
  "pluginName": "chatbase",
2018
2036
  "pluginType": "core",
@@ -2022,18 +2040,17 @@
2022
2040
  "relativePath": [
2023
2041
  "dist",
2024
2042
  "commands",
2025
- "tickets",
2026
- "get.js"
2043
+ "messages",
2044
+ "list.js"
2027
2045
  ]
2028
2046
  },
2029
- "tickets:list": {
2047
+ "conversations:export": {
2030
2048
  "aliases": [],
2031
2049
  "args": {},
2032
- "description": "List helpdesk tickets for an agent",
2050
+ "description": "Export conversations with full message history, newest first.\n\nThis is the only endpoint that returns conversations from every source — the chat bubble and external integrations (Slack, WhatsApp, Instagram, Messenger, and the like) as well as API-created ones. Prefer it over `conversations list` whenever you need real traffic rather than just programmatically created conversations. Each item embeds its own `messages` array, so no follow-up `conversations get` or `messages list` call is needed (and neither works for bubble/integration conversations).",
2033
2051
  "examples": [
2034
- "<%= config.bin %> tickets list -a agt_123",
2035
- "<%= config.bin %> tickets list -a agt_123 --status new,on_you",
2036
- "<%= config.bin %> tickets list -a agt_123 --all --json"
2052
+ "<%= config.bin %> conversations export -a agt_123",
2053
+ "<%= config.bin %> conversations export -a agt_123 --all -o export.json"
2037
2054
  ],
2038
2055
  "flags": {
2039
2056
  "json": {
@@ -2093,16 +2110,16 @@
2093
2110
  "multiple": false,
2094
2111
  "type": "option"
2095
2112
  },
2096
- "limit": {
2097
- "description": "Maximum items per page",
2098
- "name": "limit",
2113
+ "cursor": {
2114
+ "description": "Opaque cursor from a previous response",
2115
+ "name": "cursor",
2099
2116
  "hasDynamicHelp": false,
2100
2117
  "multiple": false,
2101
2118
  "type": "option"
2102
2119
  },
2103
- "cursor": {
2104
- "description": "Pagination cursor from a previous page",
2105
- "name": "cursor",
2120
+ "limit": {
2121
+ "description": "Items per page (1-20, default 20)",
2122
+ "name": "limit",
2106
2123
  "hasDynamicHelp": false,
2107
2124
  "multiple": false,
2108
2125
  "type": "option"
@@ -2113,81 +2130,115 @@
2113
2130
  "allowNo": false,
2114
2131
  "type": "boolean"
2115
2132
  },
2116
- "status": {
2117
- "description": "Filter by status (comma-separated): new, on_you, on_customer, on_hold, closed, cancelled",
2118
- "name": "status",
2133
+ "output": {
2134
+ "char": "o",
2135
+ "description": "Write export JSON to a file instead of stdout",
2136
+ "name": "output",
2119
2137
  "hasDynamicHelp": false,
2120
2138
  "multiple": false,
2121
2139
  "type": "option"
2140
+ }
2141
+ },
2142
+ "hasDynamicHelp": false,
2143
+ "hiddenAliases": [],
2144
+ "id": "conversations:export",
2145
+ "pluginAlias": "chatbase",
2146
+ "pluginName": "chatbase",
2147
+ "pluginType": "core",
2148
+ "strict": true,
2149
+ "summary": "Export conversations from every source, with full message history",
2150
+ "enableJsonFlag": false,
2151
+ "isESM": true,
2152
+ "relativePath": [
2153
+ "dist",
2154
+ "commands",
2155
+ "conversations",
2156
+ "export.js"
2157
+ ]
2158
+ },
2159
+ "conversations:get": {
2160
+ "aliases": [],
2161
+ "args": {
2162
+ "conversationId": {
2163
+ "description": "Conversation ID (alternative to --conversation)",
2164
+ "name": "conversationId",
2165
+ "required": false
2166
+ }
2167
+ },
2168
+ "description": "Show one conversation",
2169
+ "examples": [
2170
+ "<%= config.bin %> conversations get conv_123 -a agt_123",
2171
+ "<%= config.bin %> conversations get --conversation conv_123 -a agt_123"
2172
+ ],
2173
+ "flags": {
2174
+ "json": {
2175
+ "description": "Output raw API JSON",
2176
+ "helpGroup": "OUTPUT",
2177
+ "name": "json",
2178
+ "allowNo": false,
2179
+ "type": "boolean"
2122
2180
  },
2123
- "channel": {
2124
- "description": "Filter by channel (comma-separated, e.g. email,api)",
2125
- "name": "channel",
2126
- "hasDynamicHelp": false,
2127
- "multiple": false,
2128
- "type": "option"
2181
+ "plain": {
2182
+ "description": "Tab-separated output for scripts",
2183
+ "helpGroup": "OUTPUT",
2184
+ "name": "plain",
2185
+ "allowNo": false,
2186
+ "type": "boolean"
2129
2187
  },
2130
- "assignee-id": {
2131
- "description": "Filter by assignee UUID, or \"none\" for unassigned",
2132
- "name": "assignee-id",
2133
- "hasDynamicHelp": false,
2134
- "multiple": false,
2135
- "type": "option"
2188
+ "quiet": {
2189
+ "char": "q",
2190
+ "description": "Suppress non-essential output",
2191
+ "name": "quiet",
2192
+ "allowNo": false,
2193
+ "type": "boolean"
2136
2194
  },
2137
- "team-id": {
2138
- "description": "Filter by team UUID, or \"none\" for no team",
2139
- "name": "team-id",
2140
- "hasDynamicHelp": false,
2141
- "multiple": false,
2142
- "type": "option"
2195
+ "verbose": {
2196
+ "description": "Verbose diagnostics",
2197
+ "name": "verbose",
2198
+ "allowNo": false,
2199
+ "type": "boolean"
2143
2200
  },
2144
- "created-after": {
2145
- "description": "Only tickets created after this ISO 8601 date",
2146
- "name": "created-after",
2147
- "hasDynamicHelp": false,
2148
- "multiple": false,
2149
- "type": "option"
2201
+ "no-input": {
2202
+ "description": "Never prompt; fail instead",
2203
+ "name": "no-input",
2204
+ "allowNo": false,
2205
+ "type": "boolean"
2150
2206
  },
2151
- "created-before": {
2152
- "description": "Only tickets created before this ISO 8601 date",
2153
- "name": "created-before",
2207
+ "no-color": {
2208
+ "description": "Disable colored output",
2209
+ "name": "no-color",
2210
+ "allowNo": false,
2211
+ "type": "boolean"
2212
+ },
2213
+ "agent": {
2214
+ "char": "a",
2215
+ "description": "Agent ID (or set CHATBASE_AGENT_ID)",
2216
+ "name": "agent",
2154
2217
  "hasDynamicHelp": false,
2155
2218
  "multiple": false,
2156
2219
  "type": "option"
2157
2220
  },
2158
- "sort-by": {
2159
- "description": "Sort field",
2160
- "name": "sort-by",
2221
+ "agent-name": {
2222
+ "description": "Agent display name (looked up to an ID)",
2223
+ "exclusive": [
2224
+ "agent"
2225
+ ],
2226
+ "name": "agent-name",
2161
2227
  "hasDynamicHelp": false,
2162
2228
  "multiple": false,
2163
- "options": [
2164
- "createdAt",
2165
- "updatedAt",
2166
- "lastMessageAt"
2167
- ],
2168
2229
  "type": "option"
2169
2230
  },
2170
- "order": {
2171
- "description": "Sort direction",
2172
- "name": "order",
2231
+ "conversation": {
2232
+ "description": "Conversation ID",
2233
+ "name": "conversation",
2173
2234
  "hasDynamicHelp": false,
2174
2235
  "multiple": false,
2175
- "options": [
2176
- "asc",
2177
- "desc"
2178
- ],
2179
2236
  "type": "option"
2180
- },
2181
- "include-total": {
2182
- "description": "Include pagination.total in the response",
2183
- "name": "include-total",
2184
- "allowNo": false,
2185
- "type": "boolean"
2186
2237
  }
2187
2238
  },
2188
2239
  "hasDynamicHelp": false,
2189
2240
  "hiddenAliases": [],
2190
- "id": "tickets:list",
2241
+ "id": "conversations:get",
2191
2242
  "pluginAlias": "chatbase",
2192
2243
  "pluginName": "chatbase",
2193
2244
  "pluginType": "core",
@@ -2197,23 +2248,18 @@
2197
2248
  "relativePath": [
2198
2249
  "dist",
2199
2250
  "commands",
2200
- "tickets",
2201
- "list.js"
2251
+ "conversations",
2252
+ "get.js"
2202
2253
  ]
2203
2254
  },
2204
- "tickets:messages": {
2255
+ "conversations:list": {
2205
2256
  "aliases": [],
2206
- "args": {
2207
- "ticketNumber": {
2208
- "description": "Ticket number (alternative to --ticket)",
2209
- "name": "ticketNumber",
2210
- "required": false
2211
- }
2212
- },
2213
- "description": "List a ticket's message thread",
2257
+ "args": {},
2258
+ "description": "List conversations for an agent, newest first.\n\nScope: the API v2 list endpoint returns only conversations created programmatically through the API. Conversations from the chat bubble and external integrations (Slack, WhatsApp, Instagram, Messenger, and the like) are not accessible here and are not counted in `total`. Use `chatbase conversations export` to read conversations from every source — it also embeds full message history, which `conversations get` and `messages list` cannot retrieve for those conversations.",
2214
2259
  "examples": [
2215
- "<%= config.bin %> tickets messages 42 -a agt_123",
2216
- "<%= config.bin %> tickets messages 42 -a agt_123 --all --json"
2260
+ "<%= config.bin %> conversations list -a agt_123",
2261
+ "<%= config.bin %> conversations list -a agt_123 --user usr_456",
2262
+ "<%= config.bin %> conversations list -a agt_123 --all --json"
2217
2263
  ],
2218
2264
  "flags": {
2219
2265
  "json": {
@@ -2293,60 +2339,45 @@
2293
2339
  "allowNo": false,
2294
2340
  "type": "boolean"
2295
2341
  },
2296
- "ticket": {
2297
- "description": "Ticket number",
2298
- "name": "ticket",
2299
- "hasDynamicHelp": false,
2300
- "multiple": false,
2301
- "type": "option"
2302
- },
2303
- "types": {
2304
- "description": "Message types to include (comma-separated): reply, note, event (default: reply,note)",
2305
- "name": "types",
2306
- "hasDynamicHelp": false,
2307
- "multiple": false,
2308
- "type": "option"
2309
- },
2310
- "order": {
2311
- "description": "Sort direction",
2312
- "name": "order",
2342
+ "user": {
2343
+ "description": "List conversations for a specific user (uses GET /users/{userId}/conversations)",
2344
+ "name": "user",
2313
2345
  "hasDynamicHelp": false,
2314
2346
  "multiple": false,
2315
- "options": [
2316
- "asc",
2317
- "desc"
2318
- ],
2319
2347
  "type": "option"
2320
2348
  }
2321
2349
  },
2322
2350
  "hasDynamicHelp": false,
2323
2351
  "hiddenAliases": [],
2324
- "id": "tickets:messages",
2352
+ "id": "conversations:list",
2325
2353
  "pluginAlias": "chatbase",
2326
2354
  "pluginName": "chatbase",
2327
2355
  "pluginType": "core",
2328
2356
  "strict": true,
2357
+ "summary": "List an agent’s API-created conversations",
2329
2358
  "enableJsonFlag": false,
2330
2359
  "isESM": true,
2331
2360
  "relativePath": [
2332
2361
  "dist",
2333
2362
  "commands",
2334
- "tickets",
2335
- "messages.js"
2363
+ "conversations",
2364
+ "list.js"
2336
2365
  ]
2337
2366
  },
2338
- "tickets:reply": {
2367
+ "conversations:tool-result": {
2339
2368
  "aliases": [],
2340
2369
  "args": {
2341
- "ticketNumber": {
2342
- "description": "Ticket number (alternative to --ticket)",
2343
- "name": "ticketNumber",
2370
+ "conversationId": {
2371
+ "description": "Conversation ID (alternative to --conversation)",
2372
+ "name": "conversationId",
2344
2373
  "required": false
2345
2374
  }
2346
2375
  },
2347
- "description": "Post an agent reply to a ticket's message thread",
2376
+ "description": "Submit the result of a client-side tool call so the paused chat turn can continue. The tool call ID comes from the tool-call part of the chat response that requested the execution.",
2348
2377
  "examples": [
2349
- "<%= config.bin %> tickets reply 42 -m \"On it\" --author-email sam@example.com -a agt_123"
2378
+ "<%= config.bin %> conversations tool-result conv_123 --tool-call-id tc_1 --output '{\"temperature\": 72}' -a agt_123",
2379
+ "<%= config.bin %> conversations tool-result conv_123 --tool-call-id tc_1 --output @result.json -a agt_123",
2380
+ "<%= config.bin %> conversations tool-result conv_123 --tool-call-id tc_1 -a agt_123"
2350
2381
  ],
2351
2382
  "flags": {
2352
2383
  "json": {
@@ -2406,32 +2437,24 @@
2406
2437
  "multiple": false,
2407
2438
  "type": "option"
2408
2439
  },
2409
- "ticket": {
2410
- "description": "Ticket number",
2411
- "name": "ticket",
2440
+ "conversation": {
2441
+ "description": "Conversation ID",
2442
+ "name": "conversation",
2412
2443
  "hasDynamicHelp": false,
2413
2444
  "multiple": false,
2414
2445
  "type": "option"
2415
2446
  },
2416
- "message": {
2417
- "char": "m",
2418
- "description": "Reply body as GitHub-flavored Markdown",
2419
- "name": "message",
2447
+ "tool-call-id": {
2448
+ "description": "The toolCallId from the tool-call part in the chat response",
2449
+ "name": "tool-call-id",
2420
2450
  "required": true,
2421
2451
  "hasDynamicHelp": false,
2422
2452
  "multiple": false,
2423
2453
  "type": "option"
2424
2454
  },
2425
- "author-id": {
2426
- "description": "Platform user id of the team member the reply is attributed to (exactly one of --author-id/--author-email)",
2427
- "name": "author-id",
2428
- "hasDynamicHelp": false,
2429
- "multiple": false,
2430
- "type": "option"
2431
- },
2432
- "author-email": {
2433
- "description": "Email of the team member the reply is attributed to (exactly one of --author-id/--author-email)",
2434
- "name": "author-email",
2455
+ "output": {
2456
+ "description": "Result of executing the tool (inline JSON, @file, or @-); a value that is not valid JSON is sent as a plain string",
2457
+ "name": "output",
2435
2458
  "hasDynamicHelp": false,
2436
2459
  "multiple": false,
2437
2460
  "type": "option"
@@ -2439,33 +2462,34 @@
2439
2462
  },
2440
2463
  "hasDynamicHelp": false,
2441
2464
  "hiddenAliases": [],
2442
- "id": "tickets:reply",
2465
+ "id": "conversations:tool-result",
2443
2466
  "pluginAlias": "chatbase",
2444
2467
  "pluginName": "chatbase",
2445
2468
  "pluginType": "core",
2446
2469
  "strict": true,
2470
+ "summary": "Submit a client-side tool result to a chat turn",
2447
2471
  "enableJsonFlag": false,
2448
2472
  "isESM": true,
2449
2473
  "relativePath": [
2450
2474
  "dist",
2451
2475
  "commands",
2452
- "tickets",
2453
- "reply.js"
2476
+ "conversations",
2477
+ "tool-result.js"
2454
2478
  ]
2455
2479
  },
2456
- "tickets:search": {
2480
+ "whatsapp:send-template": {
2457
2481
  "aliases": [],
2458
2482
  "args": {
2459
- "query": {
2460
- "description": "Free-text search terms (matched against ticket messages)",
2461
- "name": "query",
2483
+ "template": {
2484
+ "description": "Name of the approved template",
2485
+ "name": "template",
2462
2486
  "required": true
2463
2487
  }
2464
2488
  },
2465
- "description": "Search tickets by message content",
2489
+ "description": "Send an approved WhatsApp template to a phone number from one of the agent’s connected numbers. No user ID is needed — a Chatbase user is resolved or created from the recipient number, and replies flow through the agent’s regular WhatsApp pipeline. Use `whatsapp templates` to see available templates and the variables each expects.",
2466
2490
  "examples": [
2467
- "<%= config.bin %> tickets search \"refund not received\" -a agt_123",
2468
- "<%= config.bin %> tickets search \"refund\" -a agt_123 --limit 10 --json"
2491
+ "<%= config.bin %> whatsapp send-template order_update --to 14155552671 -a agt_123",
2492
+ "<%= config.bin %> whatsapp send-template order_update --to 14155552671 --language en_US --variables '{\"header\":{\"1\":\"#1042\"},\"body\":{\"1\":\"Jane\",\"2\":\"Friday\"}}' -a agt_123"
2469
2493
  ],
2470
2494
  "flags": {
2471
2495
  "json": {
@@ -2507,27 +2531,49 @@
2507
2531
  "allowNo": false,
2508
2532
  "type": "boolean"
2509
2533
  },
2510
- "agent": {
2511
- "char": "a",
2512
- "description": "Agent ID (or set CHATBASE_AGENT_ID)",
2513
- "name": "agent",
2534
+ "agent": {
2535
+ "char": "a",
2536
+ "description": "Agent ID (or set CHATBASE_AGENT_ID)",
2537
+ "name": "agent",
2538
+ "hasDynamicHelp": false,
2539
+ "multiple": false,
2540
+ "type": "option"
2541
+ },
2542
+ "agent-name": {
2543
+ "description": "Agent display name (looked up to an ID)",
2544
+ "exclusive": [
2545
+ "agent"
2546
+ ],
2547
+ "name": "agent-name",
2548
+ "hasDynamicHelp": false,
2549
+ "multiple": false,
2550
+ "type": "option"
2551
+ },
2552
+ "to": {
2553
+ "description": "Recipient phone number in international format (digits with country code)",
2554
+ "name": "to",
2555
+ "required": true,
2556
+ "hasDynamicHelp": false,
2557
+ "multiple": false,
2558
+ "type": "option"
2559
+ },
2560
+ "from": {
2561
+ "description": "Which connected WhatsApp number to send from — optional when the agent has exactly one",
2562
+ "name": "from",
2514
2563
  "hasDynamicHelp": false,
2515
2564
  "multiple": false,
2516
2565
  "type": "option"
2517
2566
  },
2518
- "agent-name": {
2519
- "description": "Agent display name (looked up to an ID)",
2520
- "exclusive": [
2521
- "agent"
2522
- ],
2523
- "name": "agent-name",
2567
+ "language": {
2568
+ "description": "Template language code (e.g. en_US) optional when the template exists in a single language",
2569
+ "name": "language",
2524
2570
  "hasDynamicHelp": false,
2525
2571
  "multiple": false,
2526
2572
  "type": "option"
2527
2573
  },
2528
- "limit": {
2529
- "description": "Number of results (1–50, default 20)",
2530
- "name": "limit",
2574
+ "variables": {
2575
+ "description": "Template variable values as JSON grouped by component (@file, @-, or inline), e.g. '{\"body\":{\"1\":\"Jane\"}}'",
2576
+ "name": "variables",
2531
2577
  "hasDynamicHelp": false,
2532
2578
  "multiple": false,
2533
2579
  "type": "option"
@@ -2535,32 +2581,28 @@
2535
2581
  },
2536
2582
  "hasDynamicHelp": false,
2537
2583
  "hiddenAliases": [],
2538
- "id": "tickets:search",
2584
+ "id": "whatsapp:send-template",
2539
2585
  "pluginAlias": "chatbase",
2540
2586
  "pluginName": "chatbase",
2541
2587
  "pluginType": "core",
2542
2588
  "strict": true,
2589
+ "summary": "Send an approved WhatsApp template message",
2543
2590
  "enableJsonFlag": false,
2544
2591
  "isESM": true,
2545
2592
  "relativePath": [
2546
2593
  "dist",
2547
2594
  "commands",
2548
- "tickets",
2549
- "search.js"
2595
+ "whatsapp",
2596
+ "send-template.js"
2550
2597
  ]
2551
2598
  },
2552
- "tickets:update": {
2599
+ "whatsapp:templates": {
2553
2600
  "aliases": [],
2554
- "args": {
2555
- "ticketNumber": {
2556
- "description": "Ticket number",
2557
- "name": "ticketNumber",
2558
- "required": true
2559
- }
2560
- },
2561
- "description": "Update a ticket's status, assignee, and/or team",
2601
+ "args": {},
2602
+ "description": "List the approved WhatsApp templates available to the agent, across all of its connected WhatsApp Business Accounts. A template can only be sent from a number on its own Business Account — pick a sender whose WABA matches the template’s WABA column.",
2562
2603
  "examples": [
2563
- "<%= config.bin %> tickets update 42 --data '{\"statusCategory\":\"closed\"}' -a agt_123"
2604
+ "<%= config.bin %> whatsapp templates -a agt_123",
2605
+ "<%= config.bin %> whatsapp templates -a agt_123 --json"
2564
2606
  ],
2565
2607
  "flags": {
2566
2608
  "json": {
@@ -2619,46 +2661,32 @@
2619
2661
  "hasDynamicHelp": false,
2620
2662
  "multiple": false,
2621
2663
  "type": "option"
2622
- },
2623
- "field": {
2624
- "char": "f",
2625
- "description": "Set a body field: -f key=value (repeatable)",
2626
- "name": "field",
2627
- "hasDynamicHelp": false,
2628
- "multiple": true,
2629
- "type": "option"
2630
- },
2631
- "data": {
2632
- "description": "JSON body (@file, @-, or inline). Fields: statusId, statusCategory, assigneeId, assigneeEmail, teamId",
2633
- "name": "data",
2634
- "hasDynamicHelp": false,
2635
- "multiple": false,
2636
- "type": "option"
2637
2664
  }
2638
2665
  },
2639
2666
  "hasDynamicHelp": false,
2640
2667
  "hiddenAliases": [],
2641
- "id": "tickets:update",
2668
+ "id": "whatsapp:templates",
2642
2669
  "pluginAlias": "chatbase",
2643
2670
  "pluginName": "chatbase",
2644
2671
  "pluginType": "core",
2645
2672
  "strict": true,
2673
+ "summary": "List approved WhatsApp templates for an agent",
2646
2674
  "enableJsonFlag": false,
2647
2675
  "isESM": true,
2648
2676
  "relativePath": [
2649
2677
  "dist",
2650
2678
  "commands",
2651
- "tickets",
2652
- "update.js"
2679
+ "whatsapp",
2680
+ "templates.js"
2653
2681
  ]
2654
2682
  },
2655
- "conversations:export": {
2683
+ "tickets:create": {
2656
2684
  "aliases": [],
2657
2685
  "args": {},
2658
- "description": "Export conversations with full message history, newest first.\n\nThis is the only endpoint that returns conversations from every source — the chat bubble and external integrations (Slack, WhatsApp, Instagram, Messenger, and the like) as well as API-created ones. Prefer it over `conversations list` whenever you need real traffic rather than just programmatically created conversations. Each item embeds its own `messages` array, so no follow-up `conversations get` or `messages list` call is needed (and neither works for bubble/integration conversations).",
2686
+ "description": "Create a helpdesk ticket",
2659
2687
  "examples": [
2660
- "<%= config.bin %> conversations export -a agt_123",
2661
- "<%= config.bin %> conversations export -a agt_123 --all -o export.json"
2688
+ "<%= config.bin %> tickets create --subject \"Export failing\" -f description=\"Customer cannot export.\" --customer-email jane@example.com -a agt_123",
2689
+ "<%= config.bin %> tickets create --subject \"Export failing\" --data '{\"description\":\"Customer cannot export.\",\"customer\":{\"email\":\"jane@example.com\"}}' -a agt_123"
2662
2690
  ],
2663
2691
  "flags": {
2664
2692
  "json": {
@@ -2718,30 +2746,41 @@
2718
2746
  "multiple": false,
2719
2747
  "type": "option"
2720
2748
  },
2721
- "cursor": {
2722
- "description": "Opaque cursor from a previous response",
2723
- "name": "cursor",
2749
+ "field": {
2750
+ "char": "f",
2751
+ "description": "Set a body field: -f key=value (repeatable)",
2752
+ "name": "field",
2753
+ "hasDynamicHelp": false,
2754
+ "multiple": true,
2755
+ "type": "option"
2756
+ },
2757
+ "subject": {
2758
+ "description": "Ticket subject",
2759
+ "name": "subject",
2724
2760
  "hasDynamicHelp": false,
2725
2761
  "multiple": false,
2726
2762
  "type": "option"
2727
2763
  },
2728
- "limit": {
2729
- "description": "Items per page (1-20, default 20)",
2730
- "name": "limit",
2764
+ "customer-email": {
2765
+ "description": "Customer email builds the required customer object (alternative to customer in --data)",
2766
+ "name": "customer-email",
2731
2767
  "hasDynamicHelp": false,
2732
2768
  "multiple": false,
2733
2769
  "type": "option"
2734
2770
  },
2735
- "all": {
2736
- "description": "Fetch every page",
2737
- "name": "all",
2738
- "allowNo": false,
2739
- "type": "boolean"
2771
+ "customer-name": {
2772
+ "dependsOn": [
2773
+ "customer-email"
2774
+ ],
2775
+ "description": "Customer display name, used only when the email creates a new customer record",
2776
+ "name": "customer-name",
2777
+ "hasDynamicHelp": false,
2778
+ "multiple": false,
2779
+ "type": "option"
2740
2780
  },
2741
- "output": {
2742
- "char": "o",
2743
- "description": "Write export JSON to a file instead of stdout",
2744
- "name": "output",
2781
+ "data": {
2782
+ "description": "JSON body (@file, @-, or inline). Fields: subject, description, customer, statusId, statusCategory, assigneeId, assigneeEmail, teamId",
2783
+ "name": "data",
2745
2784
  "hasDynamicHelp": false,
2746
2785
  "multiple": false,
2747
2786
  "type": "option"
@@ -2749,34 +2788,32 @@
2749
2788
  },
2750
2789
  "hasDynamicHelp": false,
2751
2790
  "hiddenAliases": [],
2752
- "id": "conversations:export",
2791
+ "id": "tickets:create",
2753
2792
  "pluginAlias": "chatbase",
2754
2793
  "pluginName": "chatbase",
2755
2794
  "pluginType": "core",
2756
2795
  "strict": true,
2757
- "summary": "Export conversations from every source, with full message history",
2758
2796
  "enableJsonFlag": false,
2759
2797
  "isESM": true,
2760
2798
  "relativePath": [
2761
2799
  "dist",
2762
2800
  "commands",
2763
- "conversations",
2764
- "export.js"
2801
+ "tickets",
2802
+ "create.js"
2765
2803
  ]
2766
2804
  },
2767
- "conversations:get": {
2805
+ "tickets:get": {
2768
2806
  "aliases": [],
2769
2807
  "args": {
2770
- "conversationId": {
2771
- "description": "Conversation ID (alternative to --conversation)",
2772
- "name": "conversationId",
2773
- "required": false
2808
+ "ticketNumber": {
2809
+ "description": "Ticket number",
2810
+ "name": "ticketNumber",
2811
+ "required": true
2774
2812
  }
2775
2813
  },
2776
- "description": "Show one conversation",
2814
+ "description": "Show one helpdesk ticket",
2777
2815
  "examples": [
2778
- "<%= config.bin %> conversations get conv_123 -a agt_123",
2779
- "<%= config.bin %> conversations get --conversation conv_123 -a agt_123"
2816
+ "<%= config.bin %> tickets get 42 -a agt_123"
2780
2817
  ],
2781
2818
  "flags": {
2782
2819
  "json": {
@@ -2835,18 +2872,11 @@
2835
2872
  "hasDynamicHelp": false,
2836
2873
  "multiple": false,
2837
2874
  "type": "option"
2838
- },
2839
- "conversation": {
2840
- "description": "Conversation ID",
2841
- "name": "conversation",
2842
- "hasDynamicHelp": false,
2843
- "multiple": false,
2844
- "type": "option"
2845
2875
  }
2846
2876
  },
2847
2877
  "hasDynamicHelp": false,
2848
2878
  "hiddenAliases": [],
2849
- "id": "conversations:get",
2879
+ "id": "tickets:get",
2850
2880
  "pluginAlias": "chatbase",
2851
2881
  "pluginName": "chatbase",
2852
2882
  "pluginType": "core",
@@ -2856,18 +2886,18 @@
2856
2886
  "relativePath": [
2857
2887
  "dist",
2858
2888
  "commands",
2859
- "conversations",
2889
+ "tickets",
2860
2890
  "get.js"
2861
2891
  ]
2862
2892
  },
2863
- "conversations:list": {
2893
+ "tickets:list": {
2864
2894
  "aliases": [],
2865
2895
  "args": {},
2866
- "description": "List conversations for an agent, newest first.\n\nScope: the API v2 list endpoint returns only conversations created programmatically through the API. Conversations from the chat bubble and external integrations (Slack, WhatsApp, Instagram, Messenger, and the like) are not accessible here and are not counted in `total`. Use `chatbase conversations export` to read conversations from every source — it also embeds full message history, which `conversations get` and `messages list` cannot retrieve for those conversations.",
2896
+ "description": "List helpdesk tickets for an agent",
2867
2897
  "examples": [
2868
- "<%= config.bin %> conversations list -a agt_123",
2869
- "<%= config.bin %> conversations list -a agt_123 --user usr_456",
2870
- "<%= config.bin %> conversations list -a agt_123 --all --json"
2898
+ "<%= config.bin %> tickets list -a agt_123",
2899
+ "<%= config.bin %> tickets list -a agt_123 --status new,on_you",
2900
+ "<%= config.bin %> tickets list -a agt_123 --all --json"
2871
2901
  ],
2872
2902
  "flags": {
2873
2903
  "json": {
@@ -2947,157 +2977,107 @@
2947
2977
  "allowNo": false,
2948
2978
  "type": "boolean"
2949
2979
  },
2950
- "user": {
2951
- "description": "List conversations for a specific user (uses GET /users/{userId}/conversations)",
2952
- "name": "user",
2980
+ "status": {
2981
+ "description": "Filter by status (comma-separated): new, on_you, on_customer, on_hold, closed, cancelled",
2982
+ "name": "status",
2953
2983
  "hasDynamicHelp": false,
2954
2984
  "multiple": false,
2955
2985
  "type": "option"
2956
- }
2957
- },
2958
- "hasDynamicHelp": false,
2959
- "hiddenAliases": [],
2960
- "id": "conversations:list",
2961
- "pluginAlias": "chatbase",
2962
- "pluginName": "chatbase",
2963
- "pluginType": "core",
2964
- "strict": true,
2965
- "summary": "List an agent’s API-created conversations",
2966
- "enableJsonFlag": false,
2967
- "isESM": true,
2968
- "relativePath": [
2969
- "dist",
2970
- "commands",
2971
- "conversations",
2972
- "list.js"
2973
- ]
2974
- },
2975
- "conversations:tool-result": {
2976
- "aliases": [],
2977
- "args": {
2978
- "conversationId": {
2979
- "description": "Conversation ID (alternative to --conversation)",
2980
- "name": "conversationId",
2981
- "required": false
2982
- }
2983
- },
2984
- "description": "Submit the result of a client-side tool call so the paused chat turn can continue. The tool call ID comes from the tool-call part of the chat response that requested the execution.",
2985
- "examples": [
2986
- "<%= config.bin %> conversations tool-result conv_123 --tool-call-id tc_1 --output '{\"temperature\": 72}' -a agt_123",
2987
- "<%= config.bin %> conversations tool-result conv_123 --tool-call-id tc_1 --output @result.json -a agt_123",
2988
- "<%= config.bin %> conversations tool-result conv_123 --tool-call-id tc_1 -a agt_123"
2989
- ],
2990
- "flags": {
2991
- "json": {
2992
- "description": "Output raw API JSON",
2993
- "helpGroup": "OUTPUT",
2994
- "name": "json",
2995
- "allowNo": false,
2996
- "type": "boolean"
2997
- },
2998
- "plain": {
2999
- "description": "Tab-separated output for scripts",
3000
- "helpGroup": "OUTPUT",
3001
- "name": "plain",
3002
- "allowNo": false,
3003
- "type": "boolean"
3004
- },
3005
- "quiet": {
3006
- "char": "q",
3007
- "description": "Suppress non-essential output",
3008
- "name": "quiet",
3009
- "allowNo": false,
3010
- "type": "boolean"
3011
- },
3012
- "verbose": {
3013
- "description": "Verbose diagnostics",
3014
- "name": "verbose",
3015
- "allowNo": false,
3016
- "type": "boolean"
3017
2986
  },
3018
- "no-input": {
3019
- "description": "Never prompt; fail instead",
3020
- "name": "no-input",
3021
- "allowNo": false,
3022
- "type": "boolean"
2987
+ "channel": {
2988
+ "description": "Filter by channel (comma-separated, e.g. email,api)",
2989
+ "name": "channel",
2990
+ "hasDynamicHelp": false,
2991
+ "multiple": false,
2992
+ "type": "option"
3023
2993
  },
3024
- "no-color": {
3025
- "description": "Disable colored output",
3026
- "name": "no-color",
3027
- "allowNo": false,
3028
- "type": "boolean"
2994
+ "assignee-id": {
2995
+ "description": "Filter by assignee UUID, or \"none\" for unassigned",
2996
+ "name": "assignee-id",
2997
+ "hasDynamicHelp": false,
2998
+ "multiple": false,
2999
+ "type": "option"
3029
3000
  },
3030
- "agent": {
3031
- "char": "a",
3032
- "description": "Agent ID (or set CHATBASE_AGENT_ID)",
3033
- "name": "agent",
3001
+ "team-id": {
3002
+ "description": "Filter by team UUID, or \"none\" for no team",
3003
+ "name": "team-id",
3034
3004
  "hasDynamicHelp": false,
3035
3005
  "multiple": false,
3036
3006
  "type": "option"
3037
3007
  },
3038
- "agent-name": {
3039
- "description": "Agent display name (looked up to an ID)",
3040
- "exclusive": [
3041
- "agent"
3042
- ],
3043
- "name": "agent-name",
3008
+ "created-after": {
3009
+ "description": "Only tickets created after this ISO 8601 date",
3010
+ "name": "created-after",
3044
3011
  "hasDynamicHelp": false,
3045
3012
  "multiple": false,
3046
3013
  "type": "option"
3047
3014
  },
3048
- "conversation": {
3049
- "description": "Conversation ID",
3050
- "name": "conversation",
3015
+ "created-before": {
3016
+ "description": "Only tickets created before this ISO 8601 date",
3017
+ "name": "created-before",
3051
3018
  "hasDynamicHelp": false,
3052
3019
  "multiple": false,
3053
3020
  "type": "option"
3054
3021
  },
3055
- "tool-call-id": {
3056
- "description": "The toolCallId from the tool-call part in the chat response",
3057
- "name": "tool-call-id",
3058
- "required": true,
3022
+ "sort-by": {
3023
+ "description": "Sort field",
3024
+ "name": "sort-by",
3059
3025
  "hasDynamicHelp": false,
3060
3026
  "multiple": false,
3027
+ "options": [
3028
+ "createdAt",
3029
+ "updatedAt",
3030
+ "lastMessageAt"
3031
+ ],
3061
3032
  "type": "option"
3062
3033
  },
3063
- "output": {
3064
- "description": "Result of executing the tool (inline JSON, @file, or @-); a value that is not valid JSON is sent as a plain string",
3065
- "name": "output",
3034
+ "order": {
3035
+ "description": "Sort direction",
3036
+ "name": "order",
3066
3037
  "hasDynamicHelp": false,
3067
3038
  "multiple": false,
3039
+ "options": [
3040
+ "asc",
3041
+ "desc"
3042
+ ],
3068
3043
  "type": "option"
3044
+ },
3045
+ "include-total": {
3046
+ "description": "Include pagination.total in the response",
3047
+ "name": "include-total",
3048
+ "allowNo": false,
3049
+ "type": "boolean"
3069
3050
  }
3070
3051
  },
3071
3052
  "hasDynamicHelp": false,
3072
3053
  "hiddenAliases": [],
3073
- "id": "conversations:tool-result",
3054
+ "id": "tickets:list",
3074
3055
  "pluginAlias": "chatbase",
3075
3056
  "pluginName": "chatbase",
3076
3057
  "pluginType": "core",
3077
3058
  "strict": true,
3078
- "summary": "Submit a client-side tool result to a chat turn",
3079
3059
  "enableJsonFlag": false,
3080
3060
  "isESM": true,
3081
3061
  "relativePath": [
3082
3062
  "dist",
3083
3063
  "commands",
3084
- "conversations",
3085
- "tool-result.js"
3064
+ "tickets",
3065
+ "list.js"
3086
3066
  ]
3087
3067
  },
3088
- "messages:feedback": {
3068
+ "tickets:messages": {
3089
3069
  "aliases": [],
3090
3070
  "args": {
3091
- "messageId": {
3092
- "description": "Message ID (alternative to --message)",
3093
- "name": "messageId",
3071
+ "ticketNumber": {
3072
+ "description": "Ticket number (alternative to --ticket)",
3073
+ "name": "ticketNumber",
3094
3074
  "required": false
3095
3075
  }
3096
3076
  },
3097
- "description": "Set or clear user feedback on an assistant message",
3077
+ "description": "List a ticket's message thread",
3098
3078
  "examples": [
3099
- "<%= config.bin %> messages feedback msg_1 --conversation conv_123 --rating positive -a agt_123",
3100
- "<%= config.bin %> messages feedback --conversation conv_123 --message msg_1 --rating clear -a agt_123"
3079
+ "<%= config.bin %> tickets messages 42 -a agt_123",
3080
+ "<%= config.bin %> tickets messages 42 -a agt_123 --all --json"
3101
3081
  ],
3102
3082
  "flags": {
3103
3083
  "json": {
@@ -3157,38 +3137,55 @@
3157
3137
  "multiple": false,
3158
3138
  "type": "option"
3159
3139
  },
3160
- "conversation": {
3161
- "description": "Conversation ID",
3162
- "name": "conversation",
3163
- "required": true,
3140
+ "limit": {
3141
+ "description": "Maximum items per page",
3142
+ "name": "limit",
3164
3143
  "hasDynamicHelp": false,
3165
3144
  "multiple": false,
3166
3145
  "type": "option"
3167
3146
  },
3168
- "message": {
3169
- "description": "Message ID",
3170
- "name": "message",
3147
+ "cursor": {
3148
+ "description": "Pagination cursor from a previous page",
3149
+ "name": "cursor",
3171
3150
  "hasDynamicHelp": false,
3172
3151
  "multiple": false,
3173
3152
  "type": "option"
3174
3153
  },
3175
- "rating": {
3176
- "description": "Feedback value (\"clear\" removes existing feedback)",
3177
- "name": "rating",
3178
- "required": true,
3154
+ "all": {
3155
+ "description": "Fetch every page",
3156
+ "name": "all",
3157
+ "allowNo": false,
3158
+ "type": "boolean"
3159
+ },
3160
+ "ticket": {
3161
+ "description": "Ticket number",
3162
+ "name": "ticket",
3163
+ "hasDynamicHelp": false,
3164
+ "multiple": false,
3165
+ "type": "option"
3166
+ },
3167
+ "types": {
3168
+ "description": "Message types to include (comma-separated): reply, note, event (default: reply,note)",
3169
+ "name": "types",
3170
+ "hasDynamicHelp": false,
3171
+ "multiple": false,
3172
+ "type": "option"
3173
+ },
3174
+ "order": {
3175
+ "description": "Sort direction",
3176
+ "name": "order",
3179
3177
  "hasDynamicHelp": false,
3180
3178
  "multiple": false,
3181
3179
  "options": [
3182
- "positive",
3183
- "negative",
3184
- "clear"
3180
+ "asc",
3181
+ "desc"
3185
3182
  ],
3186
3183
  "type": "option"
3187
3184
  }
3188
3185
  },
3189
3186
  "hasDynamicHelp": false,
3190
3187
  "hiddenAliases": [],
3191
- "id": "messages:feedback",
3188
+ "id": "tickets:messages",
3192
3189
  "pluginAlias": "chatbase",
3193
3190
  "pluginName": "chatbase",
3194
3191
  "pluginType": "core",
@@ -3198,17 +3195,22 @@
3198
3195
  "relativePath": [
3199
3196
  "dist",
3200
3197
  "commands",
3201
- "messages",
3202
- "feedback.js"
3198
+ "tickets",
3199
+ "messages.js"
3203
3200
  ]
3204
3201
  },
3205
- "messages:list": {
3202
+ "tickets:reply": {
3206
3203
  "aliases": [],
3207
- "args": {},
3208
- "description": "List messages in a conversation",
3204
+ "args": {
3205
+ "ticketNumber": {
3206
+ "description": "Ticket number (alternative to --ticket)",
3207
+ "name": "ticketNumber",
3208
+ "required": false
3209
+ }
3210
+ },
3211
+ "description": "Post an agent reply to a ticket's message thread",
3209
3212
  "examples": [
3210
- "<%= config.bin %> messages list --conversation conv_123 -a agt_123",
3211
- "<%= config.bin %> messages list --conversation conv_123 -a agt_123 --all --json"
3213
+ "<%= config.bin %> tickets reply 42 -m \"On it\" --author-email sam@example.com -a agt_123"
3212
3214
  ],
3213
3215
  "flags": {
3214
3216
  "json": {
@@ -3268,30 +3270,32 @@
3268
3270
  "multiple": false,
3269
3271
  "type": "option"
3270
3272
  },
3271
- "limit": {
3272
- "description": "Maximum items per page",
3273
- "name": "limit",
3273
+ "ticket": {
3274
+ "description": "Ticket number",
3275
+ "name": "ticket",
3274
3276
  "hasDynamicHelp": false,
3275
3277
  "multiple": false,
3276
3278
  "type": "option"
3277
3279
  },
3278
- "cursor": {
3279
- "description": "Pagination cursor from a previous page",
3280
- "name": "cursor",
3280
+ "message": {
3281
+ "char": "m",
3282
+ "description": "Reply body as GitHub-flavored Markdown",
3283
+ "name": "message",
3284
+ "required": true,
3281
3285
  "hasDynamicHelp": false,
3282
3286
  "multiple": false,
3283
3287
  "type": "option"
3284
3288
  },
3285
- "all": {
3286
- "description": "Fetch every page",
3287
- "name": "all",
3288
- "allowNo": false,
3289
- "type": "boolean"
3289
+ "author-id": {
3290
+ "description": "Platform user id of the team member the reply is attributed to (exactly one of --author-id/--author-email)",
3291
+ "name": "author-id",
3292
+ "hasDynamicHelp": false,
3293
+ "multiple": false,
3294
+ "type": "option"
3290
3295
  },
3291
- "conversation": {
3292
- "description": "Conversation ID",
3293
- "name": "conversation",
3294
- "required": true,
3296
+ "author-email": {
3297
+ "description": "Email of the team member the reply is attributed to (exactly one of --author-id/--author-email)",
3298
+ "name": "author-email",
3295
3299
  "hasDynamicHelp": false,
3296
3300
  "multiple": false,
3297
3301
  "type": "option"
@@ -3299,7 +3303,7 @@
3299
3303
  },
3300
3304
  "hasDynamicHelp": false,
3301
3305
  "hiddenAliases": [],
3302
- "id": "messages:list",
3306
+ "id": "tickets:reply",
3303
3307
  "pluginAlias": "chatbase",
3304
3308
  "pluginName": "chatbase",
3305
3309
  "pluginType": "core",
@@ -3309,23 +3313,23 @@
3309
3313
  "relativePath": [
3310
3314
  "dist",
3311
3315
  "commands",
3312
- "messages",
3313
- "list.js"
3316
+ "tickets",
3317
+ "reply.js"
3314
3318
  ]
3315
3319
  },
3316
- "whatsapp:send-template": {
3320
+ "tickets:search": {
3317
3321
  "aliases": [],
3318
3322
  "args": {
3319
- "template": {
3320
- "description": "Name of the approved template",
3321
- "name": "template",
3323
+ "query": {
3324
+ "description": "Free-text search terms (matched against ticket messages)",
3325
+ "name": "query",
3322
3326
  "required": true
3323
3327
  }
3324
3328
  },
3325
- "description": "Send an approved WhatsApp template to a phone number from one of the agent’s connected numbers. No user ID is needed — a Chatbase user is resolved or created from the recipient number, and replies flow through the agent’s regular WhatsApp pipeline. Use `whatsapp templates` to see available templates and the variables each expects.",
3329
+ "description": "Search tickets by message content",
3326
3330
  "examples": [
3327
- "<%= config.bin %> whatsapp send-template order_update --to 14155552671 -a agt_123",
3328
- "<%= config.bin %> whatsapp send-template order_update --to 14155552671 --language en_US --variables '{\"header\":{\"1\":\"#1042\"},\"body\":{\"1\":\"Jane\",\"2\":\"Friday\"}}' -a agt_123"
3331
+ "<%= config.bin %> tickets search \"refund not received\" -a agt_123",
3332
+ "<%= config.bin %> tickets search \"refund\" -a agt_123 --limit 10 --json"
3329
3333
  ],
3330
3334
  "flags": {
3331
3335
  "json": {
@@ -3385,31 +3389,9 @@
3385
3389
  "multiple": false,
3386
3390
  "type": "option"
3387
3391
  },
3388
- "to": {
3389
- "description": "Recipient phone number in international format (digits with country code)",
3390
- "name": "to",
3391
- "required": true,
3392
- "hasDynamicHelp": false,
3393
- "multiple": false,
3394
- "type": "option"
3395
- },
3396
- "from": {
3397
- "description": "Which connected WhatsApp number to send from — optional when the agent has exactly one",
3398
- "name": "from",
3399
- "hasDynamicHelp": false,
3400
- "multiple": false,
3401
- "type": "option"
3402
- },
3403
- "language": {
3404
- "description": "Template language code (e.g. en_US) — optional when the template exists in a single language",
3405
- "name": "language",
3406
- "hasDynamicHelp": false,
3407
- "multiple": false,
3408
- "type": "option"
3409
- },
3410
- "variables": {
3411
- "description": "Template variable values as JSON grouped by component (@file, @-, or inline), e.g. '{\"body\":{\"1\":\"Jane\"}}'",
3412
- "name": "variables",
3392
+ "limit": {
3393
+ "description": "Number of results (1–50, default 20)",
3394
+ "name": "limit",
3413
3395
  "hasDynamicHelp": false,
3414
3396
  "multiple": false,
3415
3397
  "type": "option"
@@ -3417,28 +3399,32 @@
3417
3399
  },
3418
3400
  "hasDynamicHelp": false,
3419
3401
  "hiddenAliases": [],
3420
- "id": "whatsapp:send-template",
3402
+ "id": "tickets:search",
3421
3403
  "pluginAlias": "chatbase",
3422
3404
  "pluginName": "chatbase",
3423
3405
  "pluginType": "core",
3424
3406
  "strict": true,
3425
- "summary": "Send an approved WhatsApp template message",
3426
3407
  "enableJsonFlag": false,
3427
3408
  "isESM": true,
3428
3409
  "relativePath": [
3429
3410
  "dist",
3430
3411
  "commands",
3431
- "whatsapp",
3432
- "send-template.js"
3412
+ "tickets",
3413
+ "search.js"
3433
3414
  ]
3434
3415
  },
3435
- "whatsapp:templates": {
3416
+ "tickets:update": {
3436
3417
  "aliases": [],
3437
- "args": {},
3438
- "description": "List the approved WhatsApp templates available to the agent, across all of its connected WhatsApp Business Accounts. A template can only be sent from a number on its own Business Account — pick a sender whose WABA matches the template’s WABA column.",
3418
+ "args": {
3419
+ "ticketNumber": {
3420
+ "description": "Ticket number",
3421
+ "name": "ticketNumber",
3422
+ "required": true
3423
+ }
3424
+ },
3425
+ "description": "Update a ticket's status, assignee, and/or team",
3439
3426
  "examples": [
3440
- "<%= config.bin %> whatsapp templates -a agt_123",
3441
- "<%= config.bin %> whatsapp templates -a agt_123 --json"
3427
+ "<%= config.bin %> tickets update 42 --data '{\"statusCategory\":\"closed\"}' -a agt_123"
3442
3428
  ],
3443
3429
  "flags": {
3444
3430
  "json": {
@@ -3497,23 +3483,37 @@
3497
3483
  "hasDynamicHelp": false,
3498
3484
  "multiple": false,
3499
3485
  "type": "option"
3486
+ },
3487
+ "field": {
3488
+ "char": "f",
3489
+ "description": "Set a body field: -f key=value (repeatable)",
3490
+ "name": "field",
3491
+ "hasDynamicHelp": false,
3492
+ "multiple": true,
3493
+ "type": "option"
3494
+ },
3495
+ "data": {
3496
+ "description": "JSON body (@file, @-, or inline). Fields: statusId, statusCategory, assigneeId, assigneeEmail, teamId",
3497
+ "name": "data",
3498
+ "hasDynamicHelp": false,
3499
+ "multiple": false,
3500
+ "type": "option"
3500
3501
  }
3501
3502
  },
3502
3503
  "hasDynamicHelp": false,
3503
3504
  "hiddenAliases": [],
3504
- "id": "whatsapp:templates",
3505
+ "id": "tickets:update",
3505
3506
  "pluginAlias": "chatbase",
3506
3507
  "pluginName": "chatbase",
3507
3508
  "pluginType": "core",
3508
3509
  "strict": true,
3509
- "summary": "List approved WhatsApp templates for an agent",
3510
3510
  "enableJsonFlag": false,
3511
3511
  "isESM": true,
3512
3512
  "relativePath": [
3513
3513
  "dist",
3514
3514
  "commands",
3515
- "whatsapp",
3516
- "templates.js"
3515
+ "tickets",
3516
+ "update.js"
3517
3517
  ]
3518
3518
  },
3519
3519
  "sources:create": {
@@ -4260,5 +4260,5 @@
4260
4260
  ]
4261
4261
  }
4262
4262
  },
4263
- "version": "0.1.1"
4263
+ "version": "0.2.0"
4264
4264
  }