featurebase-node 0.15.1 → 0.15.2
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/CHANGELOG.md +4 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/changelogs/changelogs.d.mts +1166 -6
- package/resources/changelogs/changelogs.d.mts.map +1 -1
- package/resources/changelogs/changelogs.d.ts +1166 -6
- package/resources/changelogs/changelogs.d.ts.map +1 -1
- package/resources/changelogs/changelogs.js +53 -3
- package/resources/changelogs/changelogs.js.map +1 -1
- package/resources/changelogs/changelogs.mjs +53 -3
- package/resources/changelogs/changelogs.mjs.map +1 -1
- package/resources/changelogs/index.d.mts +1 -1
- package/resources/changelogs/index.d.mts.map +1 -1
- package/resources/changelogs/index.d.ts +1 -1
- package/resources/changelogs/index.d.ts.map +1 -1
- package/resources/changelogs/index.js.map +1 -1
- package/resources/changelogs/index.mjs.map +1 -1
- package/resources/feedback/comments.d.mts +4 -2
- package/resources/feedback/comments.d.mts.map +1 -1
- package/resources/feedback/comments.d.ts +4 -2
- package/resources/feedback/comments.d.ts.map +1 -1
- package/resources/feedback/custom-fields.d.mts +12 -0
- package/resources/feedback/custom-fields.d.mts.map +1 -1
- package/resources/feedback/custom-fields.d.ts +12 -0
- package/resources/feedback/custom-fields.d.ts.map +1 -1
- package/resources/feedback/posts/index.d.mts +1 -0
- package/resources/feedback/posts/index.d.mts.map +1 -1
- package/resources/feedback/posts/index.d.ts +1 -0
- package/resources/feedback/posts/index.d.ts.map +1 -1
- package/resources/feedback/posts/index.js +3 -1
- package/resources/feedback/posts/index.js.map +1 -1
- package/resources/feedback/posts/index.mjs +1 -0
- package/resources/feedback/posts/index.mjs.map +1 -1
- package/resources/feedback/posts/insights.d.mts +254 -0
- package/resources/feedback/posts/insights.d.mts.map +1 -0
- package/resources/feedback/posts/insights.d.ts +254 -0
- package/resources/feedback/posts/insights.d.ts.map +1 -0
- package/resources/feedback/posts/insights.js +269 -0
- package/resources/feedback/posts/insights.js.map +1 -0
- package/resources/feedback/posts/insights.mjs +265 -0
- package/resources/feedback/posts/insights.mjs.map +1 -0
- package/resources/feedback/posts/posts.d.mts +647 -20
- package/resources/feedback/posts/posts.d.mts.map +1 -1
- package/resources/feedback/posts/posts.d.ts +647 -20
- package/resources/feedback/posts/posts.d.ts.map +1 -1
- package/resources/feedback/posts/posts.js +199 -7
- package/resources/feedback/posts/posts.js.map +1 -1
- package/resources/feedback/posts/posts.mjs +199 -7
- package/resources/feedback/posts/posts.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/support/tickets/tickets.d.mts +9 -5
- package/resources/support/tickets/tickets.d.mts.map +1 -1
- package/resources/support/tickets/tickets.d.ts +9 -5
- package/resources/support/tickets/tickets.d.ts.map +1 -1
- package/resources/support/tickets/tickets.js.map +1 -1
- package/resources/support/tickets/tickets.mjs.map +1 -1
- package/src/client.ts +2 -0
- package/src/resources/changelogs/changelogs.ts +2003 -51
- package/src/resources/changelogs/index.ts +1 -0
- package/src/resources/feedback/comments.ts +4 -2
- package/src/resources/feedback/custom-fields.ts +15 -0
- package/src/resources/feedback/posts/index.ts +7 -0
- package/src/resources/feedback/posts/insights.ts +340 -0
- package/src/resources/feedback/posts/posts.ts +764 -20
- package/src/resources/index.ts +1 -0
- package/src/resources/support/tickets/tickets.ts +9 -5
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { APIResource } from "../../../core/resource.js";
|
|
2
2
|
import * as PostsAPI from "./posts.js";
|
|
3
3
|
import * as PostStatusesAPI from "../post-statuses.js";
|
|
4
|
+
import * as InsightsAPI from "./insights.js";
|
|
5
|
+
import { InsightConvertToPostParams, InsightLinkParams, InsightListParams, InsightUnlinkParams, Insights } from "./insights.js";
|
|
4
6
|
import * as VotersAPI from "./voters.js";
|
|
5
7
|
import { VoterAddParams, VoterAddResponse, VoterListParams, VoterListResponse, VoterListResponsesCursorPage, VoterRemoveParams, VoterRemoveResponse, Voters } from "./voters.js";
|
|
6
8
|
import * as TicketsAPI from "../../support/tickets/tickets.js";
|
|
@@ -12,16 +14,28 @@ import { RequestOptions } from "../../../internal/request-options.js";
|
|
|
12
14
|
*/
|
|
13
15
|
export declare class Posts extends APIResource {
|
|
14
16
|
voters: VotersAPI.Voters;
|
|
17
|
+
insights: InsightsAPI.Insights;
|
|
15
18
|
/**
|
|
16
19
|
* Creates a new post (feedback submission) in the specified board.
|
|
17
20
|
*
|
|
18
21
|
* ### Required Fields
|
|
19
22
|
*
|
|
20
|
-
* - `title` - Post title (minimum 2 characters)
|
|
21
|
-
*
|
|
23
|
+
* - `title` - Post title (minimum 2 characters). Required unless `intakeMode` is
|
|
24
|
+
* `feedback`; see "Intake mode" below.
|
|
22
25
|
*
|
|
23
26
|
* ### Optional Fields
|
|
24
27
|
*
|
|
28
|
+
* - `boardId` - Board ID to create the post in. Omit to use the organization's
|
|
29
|
+
* default board.
|
|
30
|
+
* - `intakeMode` - What the text is: `request` (default) or `feedback`. See
|
|
31
|
+
* "Intake mode" below.
|
|
32
|
+
* - `source` - Where the request came from:
|
|
33
|
+
* `{ channel, externalId, url?, conversationId?, label? }`. See "Provenance and
|
|
34
|
+
* idempotency" below.
|
|
35
|
+
* - `attachTo` - Id of an existing open request this post belongs with. The new
|
|
36
|
+
* post stays a post. See "attachTo, or link-insight?" below.
|
|
37
|
+
* - `internal` - Store this request on the hidden internal board (never
|
|
38
|
+
* portal-visible). Cannot be combined with `boardId`.
|
|
25
39
|
* - `content` - Post content in HTML format
|
|
26
40
|
* - `tags` - Array of tag names to attach
|
|
27
41
|
* - `statusId` - Status ID to set (defaults to board's default status)
|
|
@@ -47,20 +61,155 @@ export declare class Posts extends APIResource {
|
|
|
47
61
|
*
|
|
48
62
|
* Resolution priority: `id` > `userId` > `email` > authenticated user
|
|
49
63
|
*
|
|
64
|
+
* ### Intake mode
|
|
65
|
+
*
|
|
66
|
+
* `intakeMode` is the caller's declared intent, and the ONE field that selects how
|
|
67
|
+
* the post is processed. `author` and `source` only describe where the text came
|
|
68
|
+
* from; they never select the path.
|
|
69
|
+
*
|
|
70
|
+
* - `request` (default, and the behaviour of every call that does not send the
|
|
71
|
+
* field): a finished request. Stored exactly as supplied — no AI claim
|
|
72
|
+
* extraction, no rewrite — whoever the author is. Featurebase may still link
|
|
73
|
+
* existing customer evidence TO the new request in the background; that never
|
|
74
|
+
* modifies it.
|
|
75
|
+
* - `feedback`: raw customer feedback (a Slack message, a call note, a survey
|
|
76
|
+
* answer). Processed exactly like a post written on the portal: organized into a
|
|
77
|
+
* request when the workspace's "Organize submissions" lane is on, otherwise its
|
|
78
|
+
* claims are extracted and matched against existing requests. The workspace's
|
|
79
|
+
* Autopilot dial, plan, AI budget, moderation and spam settings all apply, and
|
|
80
|
+
* the post is processed even when it is filed under the API key's own user.
|
|
81
|
+
* `statusId` and `eta` are rejected in this mode (400): raw feedback carries no
|
|
82
|
+
* decision yet. Feedback creates are rate-limited per workspace more strictly
|
|
83
|
+
* than requests (429 with `Retry-After`).
|
|
84
|
+
*
|
|
85
|
+
* At most 5 requests organized from one submission notify the team (admin
|
|
86
|
+
* notifications, mentions, Slack, Discord and tracker pushes); the rest are
|
|
87
|
+
* created silently — still revealed, published and returned in
|
|
88
|
+
* `processing.results` — and still fire the `post.created` webhook.
|
|
89
|
+
*
|
|
90
|
+
* In `feedback` mode `title` is optional: raw text rarely has one. Omit it (or
|
|
91
|
+
* send it blank) and the first line of `content` becomes the title, cut to 120
|
|
92
|
+
* characters. `content` is then required — an empty title and an empty content
|
|
93
|
+
* together are rejected with a 400 on `content`. In `request` mode `title` stays
|
|
94
|
+
* required, minimum 2 characters.
|
|
95
|
+
*
|
|
96
|
+
* #### How much text a feedback create may carry
|
|
97
|
+
*
|
|
98
|
+
* Feedback text is read whole or not at all: up to the limit of its
|
|
99
|
+
* `source.channel` it is read in full, from the first line to the last; anything
|
|
100
|
+
* longer is rejected (400 on `content`) instead of being trimmed, and the error
|
|
101
|
+
* message states the limit and the length that was sent.
|
|
102
|
+
*
|
|
103
|
+
* | `source.channel` | Limit (characters) | Sized for |
|
|
104
|
+
* | ------------------ | ------------------ | -------------------------- |
|
|
105
|
+
* | `call` | 120,000 | a two-hour call transcript |
|
|
106
|
+
* | `email` | 60,000 | a long email thread |
|
|
107
|
+
* | `api` | 60,000 | a document or an export |
|
|
108
|
+
* | `slack`, `discord` | 30,000 | a thread or channel export |
|
|
109
|
+
*
|
|
110
|
+
* Text sent without a `source.channel` gets the `api` limit. The limits are the
|
|
111
|
+
* same for every workspace.
|
|
112
|
+
*
|
|
113
|
+
* The count is of plain text: the title and the content with its HTML markup
|
|
114
|
+
* removed. Workspaces that do not process feedback at all (the AI is switched off)
|
|
115
|
+
* have no limit — the text is stored exactly as sent. To send more, split it and
|
|
116
|
+
* give each part its own `source.externalId`.
|
|
117
|
+
*
|
|
118
|
+
* Long text takes longer. A short message is processed in seconds; a long one is
|
|
119
|
+
* read in parts, one after the other, and every ask it produces is then matched
|
|
120
|
+
* and filed in turn — allow tens of minutes for a two-hour transcript. An ask that
|
|
121
|
+
* comes up more than once in the same text is reported once. One submission yields
|
|
122
|
+
* at most 30 requests: when the text holds more separate asks than that, the 29
|
|
123
|
+
* strongest become requests as usual and the rest are listed — one line each, the
|
|
124
|
+
* ask and the customer's own words — in a single request held for a teammate.
|
|
125
|
+
* Where the workspace does not organize submissions, at most 50 asks are captured
|
|
126
|
+
* from one submission; the rest of a longer text is not read.
|
|
127
|
+
*
|
|
128
|
+
* Long feedback is rate-limited on its own: at most 20 submissions per workspace
|
|
129
|
+
* per hour may be longer than a single reading pass (about 16,000 characters where
|
|
130
|
+
* the workspace organizes submissions, otherwise 6,000 — 24,000 for a `call`).
|
|
131
|
+
* Past that the create answers 429 with `Retry-After`; shorter feedback is not
|
|
132
|
+
* affected.
|
|
133
|
+
*
|
|
134
|
+
* The response reports what happened in `intakeMode` and `processing`:
|
|
135
|
+
* `processing.status` is `queued` when an AI run was enqueued (its result lands on
|
|
136
|
+
* the post asynchronously), `skipped` with a `reason` when nothing was enqueued
|
|
137
|
+
* (`request_mode`, `autopilot_off`, `pipeline_paused`, `support_board`,
|
|
138
|
+
* `spam_held`, `staff_authored`, …), or `existing` on an idempotent replay. To
|
|
139
|
+
* read where the feedback ended up afterwards, fetch the post with
|
|
140
|
+
* `GET /v2/posts/{id}`.
|
|
141
|
+
*
|
|
142
|
+
* ### Provenance and idempotency
|
|
143
|
+
*
|
|
144
|
+
* `source` records where a request came from and makes the create idempotent:
|
|
145
|
+
*
|
|
146
|
+
* - `source.externalId` is the stable id of the message or record in your system.
|
|
147
|
+
* Sending the same `(channel, externalId)` twice returns the post created the
|
|
148
|
+
* first time, unchanged, with `deduped: true` — the first delivery always wins.
|
|
149
|
+
* - Ids are stored namespaced as `api:<externalId>`, so they can never collide
|
|
150
|
+
* with ids Featurebase writes itself.
|
|
151
|
+
* - `feedback`, `widget` and `support` are reserved for posts authored on the
|
|
152
|
+
* portal, the widget and the inbox, and are rejected with a 400.
|
|
153
|
+
* - With `source` and no `author`, the post is attributed to a guest named after
|
|
154
|
+
* `source.label` (or the channel), because a relayed request belongs to the
|
|
155
|
+
* customer who said it — not to the API key that carried it.
|
|
156
|
+
*
|
|
157
|
+
* ### attachTo, or link-insight?
|
|
158
|
+
*
|
|
159
|
+
* Both attach something to a request that already exists, and they do different
|
|
160
|
+
* things.
|
|
161
|
+
*
|
|
162
|
+
* `attachTo` records that the NEW post belongs with an existing request. **The
|
|
163
|
+
* post stays a post**: it keeps `kind: 'issue'`, it is still returned by
|
|
164
|
+
* `GET /v2/posts` and `GET /v2/posts/{id}`, it keeps its own votes, and its author
|
|
165
|
+
* does **not** become a supporter of the target — nothing about the target changes
|
|
166
|
+
* except that it now counts this post among the posts linked to it. The link is
|
|
167
|
+
* silent: no notification, no ack to the author. The post does **not** appear in
|
|
168
|
+
* `GET /v2/posts/{targetId}/insights` — that endpoint lists insights, and this is
|
|
169
|
+
* a post.
|
|
170
|
+
*
|
|
171
|
+
* `POST /v2/posts/{id}/link-insight` does the opposite: it files the post as a
|
|
172
|
+
* **quote** under the request. The post becomes an insight, leaves the posts
|
|
173
|
+
* resource (`GET /v2/posts/{id}` answers 404 afterwards), appears in
|
|
174
|
+
* `GET /v2/posts/{targetId}/insights`, and its author is rolled up as a supporter
|
|
175
|
+
* of the request.
|
|
176
|
+
*
|
|
177
|
+
* So: two customers asking for the same thing, and you want both to keep their own
|
|
178
|
+
* request row → `attachTo`. A sentence a customer said that is evidence for a
|
|
179
|
+
* request you already track → create the post, then call `link-insight` on it.
|
|
180
|
+
* Both take the same kind of target: an open request in this workspace.
|
|
181
|
+
*
|
|
182
|
+
* `attachTo` cannot be combined with `intakeMode: 'feedback'` (400
|
|
183
|
+
* `invalid_parameter` on `attachTo`): `attachTo` says where the text belongs, and
|
|
184
|
+
* `feedback` mode asks Featurebase to decide that for every ask the text contains.
|
|
185
|
+
* Pick one.
|
|
186
|
+
*
|
|
187
|
+
* The link is made AFTER the post is written, so an unusable target is a **422
|
|
188
|
+
* that says the post was created** — it is not rolled back. The target is refused
|
|
189
|
+
* when it does not exist in this workspace, is not a request (an insight or a
|
|
190
|
+
* record), was merged into another request, is a processed submission, is still
|
|
191
|
+
* awaiting moderation, is held as spam, or is the new post itself.
|
|
192
|
+
*
|
|
50
193
|
* ### Backdating (Imports)
|
|
51
194
|
*
|
|
52
195
|
* - `createdAt` - Override creation date for importing historical data
|
|
53
196
|
*
|
|
54
197
|
* ### Response
|
|
55
198
|
*
|
|
56
|
-
*
|
|
199
|
+
* - **201** - the post was created. Returns the post object with all fields
|
|
200
|
+
* populated, plus `intakeMode` and `processing`.
|
|
201
|
+
* - **200** - a post already existed for this
|
|
202
|
+
* `(source.channel, source.externalId)`. Returns that post unchanged, with
|
|
203
|
+
* `deduped: true` and `processing.status: 'existing'`. A replay is answered from
|
|
204
|
+
* the existing post and never links anything a second time, whatever `attachTo`
|
|
205
|
+
* says.
|
|
206
|
+
* - **422** - `attachTo` named a request that cannot carry evidence (missing,
|
|
207
|
+
* merged, atomized, held for moderation or spam, not a request, or the post
|
|
208
|
+
* itself). **The post was still created**; the error message says so.
|
|
57
209
|
*
|
|
58
210
|
* @example
|
|
59
211
|
* ```ts
|
|
60
|
-
* const post = await client.feedback.posts.create(
|
|
61
|
-
* boardId: '507f1f77bcf86cd799439011',
|
|
62
|
-
* title: 'Add dark mode support',
|
|
63
|
-
* });
|
|
212
|
+
* const post = await client.feedback.posts.create();
|
|
64
213
|
* ```
|
|
65
214
|
*/
|
|
66
215
|
create(params: PostCreateParams, options?: RequestOptions): APIPromise<Post>;
|
|
@@ -76,6 +225,46 @@ export declare class Posts extends APIResource {
|
|
|
76
225
|
* - Engagement metrics
|
|
77
226
|
* - Custom field values
|
|
78
227
|
*
|
|
228
|
+
* ### Feedback processing
|
|
229
|
+
*
|
|
230
|
+
* For a post created with `intakeMode: 'feedback'`, the response also carries
|
|
231
|
+
* `processing`, which says how far Featurebase has got with the text and what it
|
|
232
|
+
* made of it. It is absent on every other post, and on the list endpoint.
|
|
233
|
+
*
|
|
234
|
+
* `processing.status`:
|
|
235
|
+
*
|
|
236
|
+
* - `queued` - the text was accepted and no result has landed yet
|
|
237
|
+
* - `processing` - Featurebase is organizing the submission right now
|
|
238
|
+
* - `complete` - it is done; `results` lists what came out of it
|
|
239
|
+
* - `needs_review` - it is done, and a teammate still has to decide something
|
|
240
|
+
* - `skipped` - nothing ran, and nothing will; `reason` says why (the same reason
|
|
241
|
+
* the create returned, for example `autopilot_off`). The post is stored exactly
|
|
242
|
+
* as it was sent.
|
|
243
|
+
*
|
|
244
|
+
* `processing.results` is present in workspaces that organize submissions, once
|
|
245
|
+
* the run has finished: one entry per ask found in the text, in the order they
|
|
246
|
+
* appear. Each entry has the ask's `title` and its `outcome`:
|
|
247
|
+
*
|
|
248
|
+
* - `request` - the ask became a request of its own
|
|
249
|
+
* - `attached` - it was added as evidence to a request that already existed
|
|
250
|
+
* - `held` - it became a request waiting for a teammate to publish it
|
|
251
|
+
* - `question` - it asked something; no request was created and a teammate answers
|
|
252
|
+
* it
|
|
253
|
+
*
|
|
254
|
+
* `postId` and `postTitle` name the request the ask became or was attached to.
|
|
255
|
+
* They are absent for a `question`, and absent when that request is not readable
|
|
256
|
+
* through this API.
|
|
257
|
+
*
|
|
258
|
+
* `held` results carry a `reason` code saying what the teammate still has to
|
|
259
|
+
* decide: `too_many_topics` (the submission held more separate asks than one
|
|
260
|
+
* submission can become requests, so this request lists the ones that did not
|
|
261
|
+
* fit), `uncertain`, `custom_fields` or `processing_failed` (the AI could not
|
|
262
|
+
* rewrite the text, or could not check the ask against existing requests, so a
|
|
263
|
+
* teammate confirms it). No other outcome carries it.
|
|
264
|
+
*
|
|
265
|
+
* Workspaces that do not organize submissions report `status` only: there the post
|
|
266
|
+
* you sent IS the request, so there is no separate result to list.
|
|
267
|
+
*
|
|
79
268
|
* @example
|
|
80
269
|
* ```ts
|
|
81
270
|
* const post = await client.feedback.posts.retrieve(
|
|
@@ -165,6 +354,8 @@ export declare class Posts extends APIResource {
|
|
|
165
354
|
* - `tags` - Filter by tag names (can be comma-separated or repeated)
|
|
166
355
|
* - `q` - Search query for title/content
|
|
167
356
|
* - `inReview` - Include posts pending moderation
|
|
357
|
+
* - `kind` - `issue` (default: work items) or `record`; insights are never served
|
|
358
|
+
* by this resource — use `/v2/insights`
|
|
168
359
|
*
|
|
169
360
|
* ### Sorting
|
|
170
361
|
*
|
|
@@ -432,6 +623,12 @@ export interface Post {
|
|
|
432
623
|
*/
|
|
433
624
|
id: string;
|
|
434
625
|
access: PostAccess;
|
|
626
|
+
/**
|
|
627
|
+
* When kind is 'insight', where exactly the insight points back into its origin:
|
|
628
|
+
* an insight source record with character ranges into its fullText, or the native
|
|
629
|
+
* conversation/message/comment/post ids.
|
|
630
|
+
*/
|
|
631
|
+
anchor: Post.Anchor | null;
|
|
435
632
|
/**
|
|
436
633
|
* ID of the admin assigned to this post, null if unassigned
|
|
437
634
|
*/
|
|
@@ -464,10 +661,20 @@ export interface Post {
|
|
|
464
661
|
*/
|
|
465
662
|
eta: string | null;
|
|
466
663
|
features: PostFeatures;
|
|
664
|
+
/**
|
|
665
|
+
* When kind is 'insight', the triage grouping key (source record id, conversation
|
|
666
|
+
* id, origin post id, or the insight's own id for singletons). Legacy insights may
|
|
667
|
+
* be null and group as singletons.
|
|
668
|
+
*/
|
|
669
|
+
groupKey: string | null;
|
|
467
670
|
/**
|
|
468
671
|
* Whether the post is pending moderation review
|
|
469
672
|
*/
|
|
470
673
|
inReview: boolean;
|
|
674
|
+
/**
|
|
675
|
+
* Provenance of an insight: which channel it came from and how it was captured.
|
|
676
|
+
*/
|
|
677
|
+
insightSource: Post.InsightSource | null;
|
|
471
678
|
/**
|
|
472
679
|
* Third-party integration links associated with this post
|
|
473
680
|
*/
|
|
@@ -476,6 +683,24 @@ export interface Post {
|
|
|
476
683
|
* Whether the post is pinned to the top
|
|
477
684
|
*/
|
|
478
685
|
isPinned: boolean;
|
|
686
|
+
/**
|
|
687
|
+
* Discriminates an actionable work item ('issue') from a customer submission whose
|
|
688
|
+
* claims were extracted into insights ('record' — not a work item). Defaults to
|
|
689
|
+
* 'issue' for all pre-existing posts. Default list responses return issues only;
|
|
690
|
+
* pass kind='record' to opt in. Raw signal ('insight') is never returned by the
|
|
691
|
+
* posts resource — insights are served by /v2/insights.
|
|
692
|
+
*/
|
|
693
|
+
kind: 'issue' | 'insight' | 'record';
|
|
694
|
+
/**
|
|
695
|
+
* Number of insights linked to this issue as supporting evidence. Only meaningful
|
|
696
|
+
* when kind is 'issue'.
|
|
697
|
+
*/
|
|
698
|
+
linkedInsightCount: number;
|
|
699
|
+
/**
|
|
700
|
+
* When kind is 'insight', the ID of the issue this insight supports. Null when the
|
|
701
|
+
* insight is unlinked or when kind is 'issue'.
|
|
702
|
+
*/
|
|
703
|
+
linkedIssueId: string | null;
|
|
479
704
|
/**
|
|
480
705
|
* Object type identifier
|
|
481
706
|
*/
|
|
@@ -484,6 +709,11 @@ export interface Post {
|
|
|
484
709
|
* Total opportunity amount from linked HubSpot deals and Salesforce opportunities
|
|
485
710
|
*/
|
|
486
711
|
opportunityAmount: number | null;
|
|
712
|
+
/**
|
|
713
|
+
* True when the issue is hidden from portal/public surfaces. Missing stored values
|
|
714
|
+
* are returned as false.
|
|
715
|
+
*/
|
|
716
|
+
portalHidden: boolean;
|
|
487
717
|
/**
|
|
488
718
|
* Full URL to view the post
|
|
489
719
|
*/
|
|
@@ -509,8 +739,64 @@ export interface Post {
|
|
|
509
739
|
* Total number of upvotes
|
|
510
740
|
*/
|
|
511
741
|
upvotes: number;
|
|
742
|
+
/**
|
|
743
|
+
* Present and true only on POST /v2/posts, when the request carried a
|
|
744
|
+
* `source.externalId` that already had a post. The existing post is returned
|
|
745
|
+
* unchanged with HTTP 200; a newly created post returns HTTP 201 without this
|
|
746
|
+
* field.
|
|
747
|
+
*/
|
|
748
|
+
deduped?: true;
|
|
749
|
+
/**
|
|
750
|
+
* Present only on POST /v2/posts: the `intakeMode` the post was processed under
|
|
751
|
+
* ('request' when the request named none). On an idempotent replay
|
|
752
|
+
* (`deduped: true`) this is the mode the post was ORIGINALLY created with.
|
|
753
|
+
*/
|
|
754
|
+
intakeMode?: 'request' | 'feedback';
|
|
755
|
+
/**
|
|
756
|
+
* On POST /v2/posts — `queued`: a processing run (claim extraction or the Organize
|
|
757
|
+
* rewrite) was enqueued and its result lands asynchronously on the post.
|
|
758
|
+
* `skipped`: nothing was enqueued; `reason` says which gate decided
|
|
759
|
+
* ('request_mode' for every intakeMode: 'request' create). `existing`: the create
|
|
760
|
+
* was an idempotent replay and the post was not processed again. On GET
|
|
761
|
+
* /v2/posts/{id} this field is present only for posts created with
|
|
762
|
+
* `intakeMode: 'feedback'` and reports how far that processing has got ('queued',
|
|
763
|
+
* 'processing', 'complete', 'needs_review', or 'skipped' with the same `reason`
|
|
764
|
+
* the create returned), with `results` listing what was made of the submission
|
|
765
|
+
* once the run has finished.
|
|
766
|
+
*/
|
|
767
|
+
processing?: Post.Processing;
|
|
512
768
|
}
|
|
513
769
|
export declare namespace Post {
|
|
770
|
+
/**
|
|
771
|
+
* When kind is 'insight', where exactly the insight points back into its origin:
|
|
772
|
+
* an insight source record with character ranges into its fullText, or the native
|
|
773
|
+
* conversation/message/comment/post ids.
|
|
774
|
+
*/
|
|
775
|
+
interface Anchor {
|
|
776
|
+
commentId?: string | null;
|
|
777
|
+
conversationId?: string | null;
|
|
778
|
+
messageId?: string | null;
|
|
779
|
+
ranges?: Array<Anchor.Range> | null;
|
|
780
|
+
sourceRecordId?: string | null;
|
|
781
|
+
submissionId?: string | null;
|
|
782
|
+
}
|
|
783
|
+
namespace Anchor {
|
|
784
|
+
interface Range {
|
|
785
|
+
end: number;
|
|
786
|
+
start: number;
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
/**
|
|
790
|
+
* Provenance of an insight: which channel it came from and how it was captured.
|
|
791
|
+
*/
|
|
792
|
+
interface InsightSource {
|
|
793
|
+
channel: 'slack' | 'discord' | 'email' | 'support' | 'widget' | 'call' | 'api' | 'feedback';
|
|
794
|
+
capturedBy?: 'manual' | 'auto' | 'ai' | 'api' | null;
|
|
795
|
+
conversationId?: string | null;
|
|
796
|
+
externalId?: string | null;
|
|
797
|
+
sourceLabel?: string | null;
|
|
798
|
+
url?: string | null;
|
|
799
|
+
}
|
|
514
800
|
/**
|
|
515
801
|
* Third-party integration links associated with this post
|
|
516
802
|
*/
|
|
@@ -643,6 +929,85 @@ export declare namespace Post {
|
|
|
643
929
|
objectType: 'Opportunity' | 'Case';
|
|
644
930
|
}
|
|
645
931
|
}
|
|
932
|
+
/**
|
|
933
|
+
* On POST /v2/posts — `queued`: a processing run (claim extraction or the Organize
|
|
934
|
+
* rewrite) was enqueued and its result lands asynchronously on the post.
|
|
935
|
+
* `skipped`: nothing was enqueued; `reason` says which gate decided
|
|
936
|
+
* ('request_mode' for every intakeMode: 'request' create). `existing`: the create
|
|
937
|
+
* was an idempotent replay and the post was not processed again. On GET
|
|
938
|
+
* /v2/posts/{id} this field is present only for posts created with
|
|
939
|
+
* `intakeMode: 'feedback'` and reports how far that processing has got ('queued',
|
|
940
|
+
* 'processing', 'complete', 'needs_review', or 'skipped' with the same `reason`
|
|
941
|
+
* the create returned), with `results` listing what was made of the submission
|
|
942
|
+
* once the run has finished.
|
|
943
|
+
*/
|
|
944
|
+
interface Processing {
|
|
945
|
+
/**
|
|
946
|
+
* 'queued' = an AI run was enqueued and has not landed yet; 'processing' = the run
|
|
947
|
+
* is working on the submission; 'complete' = it finished and `results` lists what
|
|
948
|
+
* it produced; 'needs_review' = it finished and a teammate still has to decide
|
|
949
|
+
* something; 'skipped' = nothing was enqueued (see `reason`); 'existing' =
|
|
950
|
+
* idempotent replay, not processed again.
|
|
951
|
+
*/
|
|
952
|
+
status: 'queued' | 'processing' | 'complete' | 'needs_review' | 'skipped' | 'existing';
|
|
953
|
+
/**
|
|
954
|
+
* Why processing was skipped. 'request_mode' = intakeMode was 'request' (the
|
|
955
|
+
* default); 'autopilot_off' = the workspace's Autopilot dial is off or its plan
|
|
956
|
+
* does not include it; 'pipeline_paused' = the platform paused AI processing (it
|
|
957
|
+
* resumes automatically); 'support_board' / 'spam_held' / 'staff_authored' /
|
|
958
|
+
* 'no_content' = the post did not qualify; 'source_too_long' = the text was over
|
|
959
|
+
* the length limit when the run read it (a create that long is normally refused
|
|
960
|
+
* with a 400 first); 'extraction_failed' = the AI could not read the text after
|
|
961
|
+
* repeated attempts; nothing was written, and opening the post in Triage runs the
|
|
962
|
+
* analysis again.
|
|
963
|
+
*/
|
|
964
|
+
reason?: 'request_mode' | 'autopilot_off' | 'insights_disabled' | 'pipeline_paused' | 'support_board' | 'spam_held' | 'staff_authored' | 'not_a_post' | 'no_board' | 'no_id' | 'no_content' | 'source_too_long' | 'extraction_failed' | 'hook_error';
|
|
965
|
+
/**
|
|
966
|
+
* What the workspace's "Organize submissions" lane made of this submission, one
|
|
967
|
+
* entry per ask it found, in the order they appear in the text. Present on GET
|
|
968
|
+
* /v2/posts/{id} for posts created with `intakeMode: 'feedback'` once the run has
|
|
969
|
+
* finished. Absent while the run is still working, and absent for workspaces that
|
|
970
|
+
* do not organize submissions — there the post itself is the request.
|
|
971
|
+
*/
|
|
972
|
+
results?: Array<Processing.Result>;
|
|
973
|
+
}
|
|
974
|
+
namespace Processing {
|
|
975
|
+
interface Result {
|
|
976
|
+
/**
|
|
977
|
+
* 'request' = the ask became a request of its own; 'attached' = it was added as
|
|
978
|
+
* evidence to a request that already existed; 'held' = it became a request that is
|
|
979
|
+
* waiting for a teammate to publish it; 'question' = it asked something and no
|
|
980
|
+
* request was created, so a teammate answers it.
|
|
981
|
+
*/
|
|
982
|
+
outcome: 'attached' | 'request' | 'question' | 'held';
|
|
983
|
+
/**
|
|
984
|
+
* The ask, as it was written up.
|
|
985
|
+
*/
|
|
986
|
+
title: string;
|
|
987
|
+
/**
|
|
988
|
+
* The request this ask became, or was attached to. Absent for a question, and
|
|
989
|
+
* absent when the request is not readable through this API (for example a ticket
|
|
990
|
+
* board).
|
|
991
|
+
*/
|
|
992
|
+
postId?: string;
|
|
993
|
+
/**
|
|
994
|
+
* Title of `postId`.
|
|
995
|
+
*/
|
|
996
|
+
postTitle?: string;
|
|
997
|
+
/**
|
|
998
|
+
* Why a 'held' result is waiting for a teammate. Only on a 'held' result, and only
|
|
999
|
+
* one of these codes: 'too_many_topics' = the submission held more separate asks
|
|
1000
|
+
* than one submission can become requests, so this one request lists the asks that
|
|
1001
|
+
* did not fit, one line each in the customer's words; 'uncertain' = the ask was
|
|
1002
|
+
* too vague to file without a person; 'custom_fields' = the board requires custom
|
|
1003
|
+
* fields this submission did not carry; 'processing_failed' = the AI could not
|
|
1004
|
+
* rewrite the text (the request then holds the original words) or could not check
|
|
1005
|
+
* this ask against existing requests, so a teammate confirms it is not a
|
|
1006
|
+
* duplicate.
|
|
1007
|
+
*/
|
|
1008
|
+
reason?: 'too_many_topics' | 'uncertain' | 'custom_fields' | 'processing_failed';
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
646
1011
|
}
|
|
647
1012
|
export interface PostAccess {
|
|
648
1013
|
/**
|
|
@@ -770,6 +1135,12 @@ export declare namespace PostSearchResponse {
|
|
|
770
1135
|
*/
|
|
771
1136
|
id: string;
|
|
772
1137
|
access: PostsAPI.PostAccess;
|
|
1138
|
+
/**
|
|
1139
|
+
* When kind is 'insight', where exactly the insight points back into its origin:
|
|
1140
|
+
* an insight source record with character ranges into its fullText, or the native
|
|
1141
|
+
* conversation/message/comment/post ids.
|
|
1142
|
+
*/
|
|
1143
|
+
anchor: Data.Anchor | null;
|
|
773
1144
|
/**
|
|
774
1145
|
* ID of the admin assigned to this post, null if unassigned
|
|
775
1146
|
*/
|
|
@@ -802,10 +1173,20 @@ export declare namespace PostSearchResponse {
|
|
|
802
1173
|
*/
|
|
803
1174
|
eta: string | null;
|
|
804
1175
|
features: PostsAPI.PostFeatures;
|
|
1176
|
+
/**
|
|
1177
|
+
* When kind is 'insight', the triage grouping key (source record id, conversation
|
|
1178
|
+
* id, origin post id, or the insight's own id for singletons). Legacy insights may
|
|
1179
|
+
* be null and group as singletons.
|
|
1180
|
+
*/
|
|
1181
|
+
groupKey: string | null;
|
|
805
1182
|
/**
|
|
806
1183
|
* Whether the post is pending moderation review
|
|
807
1184
|
*/
|
|
808
1185
|
inReview: boolean;
|
|
1186
|
+
/**
|
|
1187
|
+
* Provenance of an insight: which channel it came from and how it was captured.
|
|
1188
|
+
*/
|
|
1189
|
+
insightSource: Data.InsightSource | null;
|
|
809
1190
|
/**
|
|
810
1191
|
* Third-party integration links associated with this post
|
|
811
1192
|
*/
|
|
@@ -814,6 +1195,24 @@ export declare namespace PostSearchResponse {
|
|
|
814
1195
|
* Whether the post is pinned to the top
|
|
815
1196
|
*/
|
|
816
1197
|
isPinned: boolean;
|
|
1198
|
+
/**
|
|
1199
|
+
* Discriminates an actionable work item ('issue') from a customer submission whose
|
|
1200
|
+
* claims were extracted into insights ('record' — not a work item). Defaults to
|
|
1201
|
+
* 'issue' for all pre-existing posts. Default list responses return issues only;
|
|
1202
|
+
* pass kind='record' to opt in. Raw signal ('insight') is never returned by the
|
|
1203
|
+
* posts resource — insights are served by /v2/insights.
|
|
1204
|
+
*/
|
|
1205
|
+
kind: 'issue' | 'insight' | 'record';
|
|
1206
|
+
/**
|
|
1207
|
+
* Number of insights linked to this issue as supporting evidence. Only meaningful
|
|
1208
|
+
* when kind is 'issue'.
|
|
1209
|
+
*/
|
|
1210
|
+
linkedInsightCount: number;
|
|
1211
|
+
/**
|
|
1212
|
+
* When kind is 'insight', the ID of the issue this insight supports. Null when the
|
|
1213
|
+
* insight is unlinked or when kind is 'issue'.
|
|
1214
|
+
*/
|
|
1215
|
+
linkedIssueId: string | null;
|
|
817
1216
|
/**
|
|
818
1217
|
* Object type identifier
|
|
819
1218
|
*/
|
|
@@ -822,6 +1221,11 @@ export declare namespace PostSearchResponse {
|
|
|
822
1221
|
* Total opportunity amount from linked HubSpot deals and Salesforce opportunities
|
|
823
1222
|
*/
|
|
824
1223
|
opportunityAmount: number | null;
|
|
1224
|
+
/**
|
|
1225
|
+
* True when the issue is hidden from portal/public surfaces. Missing stored values
|
|
1226
|
+
* are returned as false.
|
|
1227
|
+
*/
|
|
1228
|
+
portalHidden: boolean;
|
|
825
1229
|
/**
|
|
826
1230
|
* Full URL to view the post
|
|
827
1231
|
*/
|
|
@@ -847,8 +1251,64 @@ export declare namespace PostSearchResponse {
|
|
|
847
1251
|
* Total number of upvotes
|
|
848
1252
|
*/
|
|
849
1253
|
upvotes: number;
|
|
1254
|
+
/**
|
|
1255
|
+
* Present and true only on POST /v2/posts, when the request carried a
|
|
1256
|
+
* `source.externalId` that already had a post. The existing post is returned
|
|
1257
|
+
* unchanged with HTTP 200; a newly created post returns HTTP 201 without this
|
|
1258
|
+
* field.
|
|
1259
|
+
*/
|
|
1260
|
+
deduped?: true;
|
|
1261
|
+
/**
|
|
1262
|
+
* Present only on POST /v2/posts: the `intakeMode` the post was processed under
|
|
1263
|
+
* ('request' when the request named none). On an idempotent replay
|
|
1264
|
+
* (`deduped: true`) this is the mode the post was ORIGINALLY created with.
|
|
1265
|
+
*/
|
|
1266
|
+
intakeMode?: 'request' | 'feedback';
|
|
1267
|
+
/**
|
|
1268
|
+
* On POST /v2/posts — `queued`: a processing run (claim extraction or the Organize
|
|
1269
|
+
* rewrite) was enqueued and its result lands asynchronously on the post.
|
|
1270
|
+
* `skipped`: nothing was enqueued; `reason` says which gate decided
|
|
1271
|
+
* ('request_mode' for every intakeMode: 'request' create). `existing`: the create
|
|
1272
|
+
* was an idempotent replay and the post was not processed again. On GET
|
|
1273
|
+
* /v2/posts/{id} this field is present only for posts created with
|
|
1274
|
+
* `intakeMode: 'feedback'` and reports how far that processing has got ('queued',
|
|
1275
|
+
* 'processing', 'complete', 'needs_review', or 'skipped' with the same `reason`
|
|
1276
|
+
* the create returned), with `results` listing what was made of the submission
|
|
1277
|
+
* once the run has finished.
|
|
1278
|
+
*/
|
|
1279
|
+
processing?: Data.Processing;
|
|
850
1280
|
}
|
|
851
1281
|
namespace Data {
|
|
1282
|
+
/**
|
|
1283
|
+
* When kind is 'insight', where exactly the insight points back into its origin:
|
|
1284
|
+
* an insight source record with character ranges into its fullText, or the native
|
|
1285
|
+
* conversation/message/comment/post ids.
|
|
1286
|
+
*/
|
|
1287
|
+
interface Anchor {
|
|
1288
|
+
commentId?: string | null;
|
|
1289
|
+
conversationId?: string | null;
|
|
1290
|
+
messageId?: string | null;
|
|
1291
|
+
ranges?: Array<Anchor.Range> | null;
|
|
1292
|
+
sourceRecordId?: string | null;
|
|
1293
|
+
submissionId?: string | null;
|
|
1294
|
+
}
|
|
1295
|
+
namespace Anchor {
|
|
1296
|
+
interface Range {
|
|
1297
|
+
end: number;
|
|
1298
|
+
start: number;
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1301
|
+
/**
|
|
1302
|
+
* Provenance of an insight: which channel it came from and how it was captured.
|
|
1303
|
+
*/
|
|
1304
|
+
interface InsightSource {
|
|
1305
|
+
channel: 'slack' | 'discord' | 'email' | 'support' | 'widget' | 'call' | 'api' | 'feedback';
|
|
1306
|
+
capturedBy?: 'manual' | 'auto' | 'ai' | 'api' | null;
|
|
1307
|
+
conversationId?: string | null;
|
|
1308
|
+
externalId?: string | null;
|
|
1309
|
+
sourceLabel?: string | null;
|
|
1310
|
+
url?: string | null;
|
|
1311
|
+
}
|
|
852
1312
|
/**
|
|
853
1313
|
* Third-party integration links associated with this post
|
|
854
1314
|
*/
|
|
@@ -981,33 +1441,118 @@ export declare namespace PostSearchResponse {
|
|
|
981
1441
|
objectType: 'Opportunity' | 'Case';
|
|
982
1442
|
}
|
|
983
1443
|
}
|
|
1444
|
+
/**
|
|
1445
|
+
* On POST /v2/posts — `queued`: a processing run (claim extraction or the Organize
|
|
1446
|
+
* rewrite) was enqueued and its result lands asynchronously on the post.
|
|
1447
|
+
* `skipped`: nothing was enqueued; `reason` says which gate decided
|
|
1448
|
+
* ('request_mode' for every intakeMode: 'request' create). `existing`: the create
|
|
1449
|
+
* was an idempotent replay and the post was not processed again. On GET
|
|
1450
|
+
* /v2/posts/{id} this field is present only for posts created with
|
|
1451
|
+
* `intakeMode: 'feedback'` and reports how far that processing has got ('queued',
|
|
1452
|
+
* 'processing', 'complete', 'needs_review', or 'skipped' with the same `reason`
|
|
1453
|
+
* the create returned), with `results` listing what was made of the submission
|
|
1454
|
+
* once the run has finished.
|
|
1455
|
+
*/
|
|
1456
|
+
interface Processing {
|
|
1457
|
+
/**
|
|
1458
|
+
* 'queued' = an AI run was enqueued and has not landed yet; 'processing' = the run
|
|
1459
|
+
* is working on the submission; 'complete' = it finished and `results` lists what
|
|
1460
|
+
* it produced; 'needs_review' = it finished and a teammate still has to decide
|
|
1461
|
+
* something; 'skipped' = nothing was enqueued (see `reason`); 'existing' =
|
|
1462
|
+
* idempotent replay, not processed again.
|
|
1463
|
+
*/
|
|
1464
|
+
status: 'queued' | 'processing' | 'complete' | 'needs_review' | 'skipped' | 'existing';
|
|
1465
|
+
/**
|
|
1466
|
+
* Why processing was skipped. 'request_mode' = intakeMode was 'request' (the
|
|
1467
|
+
* default); 'autopilot_off' = the workspace's Autopilot dial is off or its plan
|
|
1468
|
+
* does not include it; 'pipeline_paused' = the platform paused AI processing (it
|
|
1469
|
+
* resumes automatically); 'support_board' / 'spam_held' / 'staff_authored' /
|
|
1470
|
+
* 'no_content' = the post did not qualify; 'source_too_long' = the text was over
|
|
1471
|
+
* the length limit when the run read it (a create that long is normally refused
|
|
1472
|
+
* with a 400 first); 'extraction_failed' = the AI could not read the text after
|
|
1473
|
+
* repeated attempts; nothing was written, and opening the post in Triage runs the
|
|
1474
|
+
* analysis again.
|
|
1475
|
+
*/
|
|
1476
|
+
reason?: 'request_mode' | 'autopilot_off' | 'insights_disabled' | 'pipeline_paused' | 'support_board' | 'spam_held' | 'staff_authored' | 'not_a_post' | 'no_board' | 'no_id' | 'no_content' | 'source_too_long' | 'extraction_failed' | 'hook_error';
|
|
1477
|
+
/**
|
|
1478
|
+
* What the workspace's "Organize submissions" lane made of this submission, one
|
|
1479
|
+
* entry per ask it found, in the order they appear in the text. Present on GET
|
|
1480
|
+
* /v2/posts/{id} for posts created with `intakeMode: 'feedback'` once the run has
|
|
1481
|
+
* finished. Absent while the run is still working, and absent for workspaces that
|
|
1482
|
+
* do not organize submissions — there the post itself is the request.
|
|
1483
|
+
*/
|
|
1484
|
+
results?: Array<Processing.Result>;
|
|
1485
|
+
}
|
|
1486
|
+
namespace Processing {
|
|
1487
|
+
interface Result {
|
|
1488
|
+
/**
|
|
1489
|
+
* 'request' = the ask became a request of its own; 'attached' = it was added as
|
|
1490
|
+
* evidence to a request that already existed; 'held' = it became a request that is
|
|
1491
|
+
* waiting for a teammate to publish it; 'question' = it asked something and no
|
|
1492
|
+
* request was created, so a teammate answers it.
|
|
1493
|
+
*/
|
|
1494
|
+
outcome: 'attached' | 'request' | 'question' | 'held';
|
|
1495
|
+
/**
|
|
1496
|
+
* The ask, as it was written up.
|
|
1497
|
+
*/
|
|
1498
|
+
title: string;
|
|
1499
|
+
/**
|
|
1500
|
+
* The request this ask became, or was attached to. Absent for a question, and
|
|
1501
|
+
* absent when the request is not readable through this API (for example a ticket
|
|
1502
|
+
* board).
|
|
1503
|
+
*/
|
|
1504
|
+
postId?: string;
|
|
1505
|
+
/**
|
|
1506
|
+
* Title of `postId`.
|
|
1507
|
+
*/
|
|
1508
|
+
postTitle?: string;
|
|
1509
|
+
/**
|
|
1510
|
+
* Why a 'held' result is waiting for a teammate. Only on a 'held' result, and only
|
|
1511
|
+
* one of these codes: 'too_many_topics' = the submission held more separate asks
|
|
1512
|
+
* than one submission can become requests, so this one request lists the asks that
|
|
1513
|
+
* did not fit, one line each in the customer's words; 'uncertain' = the ask was
|
|
1514
|
+
* too vague to file without a person; 'custom_fields' = the board requires custom
|
|
1515
|
+
* fields this submission did not carry; 'processing_failed' = the AI could not
|
|
1516
|
+
* rewrite the text (the request then holds the original words) or could not check
|
|
1517
|
+
* this ask against existing requests, so a teammate confirms it is not a
|
|
1518
|
+
* duplicate.
|
|
1519
|
+
*/
|
|
1520
|
+
reason?: 'too_many_topics' | 'uncertain' | 'custom_fields' | 'processing_failed';
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
984
1523
|
}
|
|
985
1524
|
}
|
|
986
1525
|
export interface PostCreateParams {
|
|
987
|
-
/**
|
|
988
|
-
* Body param: Board ID to create post in
|
|
989
|
-
*/
|
|
990
|
-
boardId: string;
|
|
991
|
-
/**
|
|
992
|
-
* Body param: Post title
|
|
993
|
-
*/
|
|
994
|
-
title: string;
|
|
995
1526
|
/**
|
|
996
1527
|
* Body param: Admin ID to assign this post to
|
|
997
1528
|
*/
|
|
998
1529
|
assigneeId?: string;
|
|
1530
|
+
/**
|
|
1531
|
+
* Body param: Id of an existing open request this post is evidence for. The post
|
|
1532
|
+
* is created, then linked.
|
|
1533
|
+
*/
|
|
1534
|
+
attachTo?: string;
|
|
999
1535
|
/**
|
|
1000
1536
|
* Body param: Author to attribute the post to. If not provided, uses the
|
|
1001
|
-
* authenticated user
|
|
1002
|
-
*
|
|
1537
|
+
* authenticated user — unless `source` is given, in which case a guest author is
|
|
1538
|
+
* synthesised from `source.label` (or the channel name), because a relayed request
|
|
1539
|
+
* belongs to the customer who said it. Supports multiple identification methods:
|
|
1540
|
+
* id (Featurebase ID), userId (external SSO ID), or email.
|
|
1003
1541
|
*/
|
|
1004
1542
|
author?: TicketsAPI.AuthorInput;
|
|
1543
|
+
/**
|
|
1544
|
+
* Body param: Board ID to create the post in. Omit to use the default board of the
|
|
1545
|
+
* organization.
|
|
1546
|
+
*/
|
|
1547
|
+
boardId?: string;
|
|
1005
1548
|
/**
|
|
1006
1549
|
* Body param: Whether comments are enabled on this post
|
|
1007
1550
|
*/
|
|
1008
1551
|
commentsEnabled?: boolean | null;
|
|
1009
1552
|
/**
|
|
1010
|
-
* Body param: Post content (HTML)
|
|
1553
|
+
* Body param: Post content (HTML). Required when `intakeMode` is 'feedback' and no
|
|
1554
|
+
* title is given. In 'feedback' mode its plain text is limited by `source.channel`
|
|
1555
|
+
* (see `intakeMode`); longer content is rejected with a 400.
|
|
1011
1556
|
*/
|
|
1012
1557
|
content?: string;
|
|
1013
1558
|
/**
|
|
@@ -1030,18 +1575,51 @@ export interface PostCreateParams {
|
|
|
1030
1575
|
* Body param: Whether post is pending moderation
|
|
1031
1576
|
*/
|
|
1032
1577
|
inReview?: boolean | null;
|
|
1578
|
+
/**
|
|
1579
|
+
* Body param: What the text is. 'request' (default): a finished request — stored
|
|
1580
|
+
* exactly as supplied, no AI claim extraction, regardless of author. 'feedback':
|
|
1581
|
+
* raw customer feedback — processed like a portal post (organized into a request,
|
|
1582
|
+
* or its claims extracted and matched against existing requests) under the
|
|
1583
|
+
* workspace's Autopilot dial, plan, AI budget and moderation settings. In
|
|
1584
|
+
* 'feedback' mode `title` is optional (the first line of `content` becomes it),
|
|
1585
|
+
* `statusId` and `eta` are rejected (400) because raw feedback has no decision
|
|
1586
|
+
* yet, and text is read in full up to the limit of its `source.channel` — 120,000
|
|
1587
|
+
* characters of plain text for 'call' (a two-hour transcript), 60,000 for 'email'
|
|
1588
|
+
* and 'api', 30,000 for 'slack' and 'discord'; without a `source.channel` the
|
|
1589
|
+
* 'api' limit applies — while anything longer is rejected (400) rather than
|
|
1590
|
+
* trimmed. Long text takes tens of minutes rather than seconds to process, and one
|
|
1591
|
+
* submission yields at most 30 requests.
|
|
1592
|
+
*/
|
|
1593
|
+
intakeMode?: 'request' | 'feedback';
|
|
1033
1594
|
/**
|
|
1034
1595
|
* Body param: Push the created post to third-party integrations configured on your
|
|
1035
1596
|
* organization. Each integration must be explicitly set to true to trigger;
|
|
1036
1597
|
* omitted integrations will not be pushed to.
|
|
1037
1598
|
*/
|
|
1038
1599
|
integrations?: PostCreateParams.Integrations;
|
|
1600
|
+
/**
|
|
1601
|
+
* Body param: Create this request on the internal board. Never visible on the
|
|
1602
|
+
* portal.
|
|
1603
|
+
*/
|
|
1604
|
+
internal?: boolean;
|
|
1039
1605
|
/**
|
|
1040
1606
|
* Body param: Whether to send email notifications to admins when this post is
|
|
1041
1607
|
* created. When true, admins will receive the same email notifications as when a
|
|
1042
1608
|
* post is created from the dashboard. Defaults to false (no emails sent).
|
|
1043
1609
|
*/
|
|
1044
1610
|
notifyAdmins?: boolean;
|
|
1611
|
+
/**
|
|
1612
|
+
* Body param: When true, hides the issue from portal/public surfaces. Omitted or
|
|
1613
|
+
* false is visible.
|
|
1614
|
+
*/
|
|
1615
|
+
portalHidden?: boolean;
|
|
1616
|
+
/**
|
|
1617
|
+
* Body param: Provenance of this request, and the idempotency key for the create.
|
|
1618
|
+
* With `source` and no `author`, the post is attributed to a guest named after
|
|
1619
|
+
* `label` (or the channel) so it belongs to the customer who said it, not to the
|
|
1620
|
+
* API key.
|
|
1621
|
+
*/
|
|
1622
|
+
source?: PostCreateParams.Source;
|
|
1045
1623
|
/**
|
|
1046
1624
|
* Body param: Status ID to set
|
|
1047
1625
|
*/
|
|
@@ -1050,6 +1628,12 @@ export interface PostCreateParams {
|
|
|
1050
1628
|
* Body param: Tag names to attach
|
|
1051
1629
|
*/
|
|
1052
1630
|
tags?: string | Array<string>;
|
|
1631
|
+
/**
|
|
1632
|
+
* Body param: Post title. Required unless `intakeMode` is 'feedback', where raw
|
|
1633
|
+
* customer text rarely has one: omit it (or send it blank) and the first line of
|
|
1634
|
+
* `content` becomes the title, cut to 120 characters.
|
|
1635
|
+
*/
|
|
1636
|
+
title?: string;
|
|
1053
1637
|
/**
|
|
1054
1638
|
* Body param: Initial upvotes count. Defaults to 1 (post author is automatically
|
|
1055
1639
|
* added as voter). Use 0 to create a post without any votes.
|
|
@@ -1099,6 +1683,40 @@ export declare namespace PostCreateParams {
|
|
|
1099
1683
|
*/
|
|
1100
1684
|
slack?: boolean;
|
|
1101
1685
|
}
|
|
1686
|
+
/**
|
|
1687
|
+
* Provenance of this request, and the idempotency key for the create. With
|
|
1688
|
+
* `source` and no `author`, the post is attributed to a guest named after `label`
|
|
1689
|
+
* (or the channel) so it belongs to the customer who said it, not to the API key.
|
|
1690
|
+
*/
|
|
1691
|
+
interface Source {
|
|
1692
|
+
/**
|
|
1693
|
+
* Channel the request arrived on. 'feedback', 'widget' and 'support' are reserved
|
|
1694
|
+
* for posts authored on the portal, the widget and the inbox, and are rejected
|
|
1695
|
+
* with a 400. With `intakeMode: 'feedback'` the channel also sets how much text is
|
|
1696
|
+
* read: 'call' 120,000 characters, 'email' and 'api' 60,000, 'slack' and 'discord'
|
|
1697
|
+
* 30,000.
|
|
1698
|
+
*/
|
|
1699
|
+
channel: 'slack' | 'discord' | 'email' | 'support' | 'widget' | 'call' | 'api' | 'feedback';
|
|
1700
|
+
/**
|
|
1701
|
+
* Stable id of the message/record in the source system. Sending the same (channel,
|
|
1702
|
+
* externalId) twice returns the post created the first time instead of a duplicate
|
|
1703
|
+
* (HTTP 200 with `deduped: true`). Stored namespaced as `api:<externalId>`.
|
|
1704
|
+
*/
|
|
1705
|
+
externalId: string;
|
|
1706
|
+
/**
|
|
1707
|
+
* Id of the support conversation this request came from
|
|
1708
|
+
*/
|
|
1709
|
+
conversationId?: string;
|
|
1710
|
+
/**
|
|
1711
|
+
* Display name of the specific source. Also names the guest author when no
|
|
1712
|
+
* `author` is given.
|
|
1713
|
+
*/
|
|
1714
|
+
label?: string;
|
|
1715
|
+
/**
|
|
1716
|
+
* Deep link back to the original message/record
|
|
1717
|
+
*/
|
|
1718
|
+
url?: string;
|
|
1719
|
+
}
|
|
1102
1720
|
}
|
|
1103
1721
|
export interface PostRetrieveParams {
|
|
1104
1722
|
/**
|
|
@@ -1114,8 +1732,10 @@ export interface PostUpdateParams {
|
|
|
1114
1732
|
assigneeId?: string | null;
|
|
1115
1733
|
/**
|
|
1116
1734
|
* Body param: Author to attribute the post to. If not provided, uses the
|
|
1117
|
-
* authenticated user
|
|
1118
|
-
*
|
|
1735
|
+
* authenticated user — unless `source` is given, in which case a guest author is
|
|
1736
|
+
* synthesised from `source.label` (or the channel name), because a relayed request
|
|
1737
|
+
* belongs to the customer who said it. Supports multiple identification methods:
|
|
1738
|
+
* id (Featurebase ID), userId (external SSO ID), or email.
|
|
1119
1739
|
*/
|
|
1120
1740
|
author?: TicketsAPI.AuthorInput;
|
|
1121
1741
|
/**
|
|
@@ -1192,6 +1812,12 @@ export interface PostListParams extends CursorPageParams {
|
|
|
1192
1812
|
* Query param: Include posts that are in review
|
|
1193
1813
|
*/
|
|
1194
1814
|
inReview?: boolean | null;
|
|
1815
|
+
/**
|
|
1816
|
+
* Query param: Filter by submission kind. Omitted or 'issue' returns work items
|
|
1817
|
+
* only. Pass 'record' for customer submissions whose claims were extracted into
|
|
1818
|
+
* insights. Insights are never served by this resource — use /v2/insights.
|
|
1819
|
+
*/
|
|
1820
|
+
kind?: 'issue' | 'record';
|
|
1195
1821
|
/**
|
|
1196
1822
|
* Query param: Search query to filter posts by title/content
|
|
1197
1823
|
*/
|
|
@@ -1290,5 +1916,6 @@ export interface PostUnmergeParams {
|
|
|
1290
1916
|
export declare namespace Posts {
|
|
1291
1917
|
export { type Post as Post, type PostAccess as PostAccess, type PostAuthor as PostAuthor, type PostFeatures as PostFeatures, type PostTag as PostTag, type SearchFilter as SearchFilter, type SearchFilterGroup as SearchFilterGroup, type PostDeleteResponse as PostDeleteResponse, type PostSearchResponse as PostSearchResponse, type PostsCursorPage as PostsCursorPage, type PostCreateParams as PostCreateParams, type PostRetrieveParams as PostRetrieveParams, type PostUpdateParams as PostUpdateParams, type PostListParams as PostListParams, type PostDeleteParams as PostDeleteParams, type PostMergeParams as PostMergeParams, type PostSearchParams as PostSearchParams, type PostUnmergeParams as PostUnmergeParams, };
|
|
1292
1918
|
export { Voters as Voters, type VoterListResponse as VoterListResponse, type VoterAddResponse as VoterAddResponse, type VoterRemoveResponse as VoterRemoveResponse, type VoterListResponsesCursorPage as VoterListResponsesCursorPage, type VoterListParams as VoterListParams, type VoterAddParams as VoterAddParams, type VoterRemoveParams as VoterRemoveParams, };
|
|
1919
|
+
export { Insights as Insights, type InsightListParams as InsightListParams, type InsightConvertToPostParams as InsightConvertToPostParams, type InsightLinkParams as InsightLinkParams, type InsightUnlinkParams as InsightUnlinkParams, };
|
|
1293
1920
|
}
|
|
1294
1921
|
//# sourceMappingURL=posts.d.ts.map
|