featurebase-node 0.14.3 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/client.d.mts +5 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +5 -5
- package/client.d.ts.map +1 -1
- package/package.json +1 -1
- package/resources/audit-logs.d.mts +3 -3
- package/resources/audit-logs.d.mts.map +1 -1
- package/resources/audit-logs.d.ts +3 -3
- package/resources/audit-logs.d.ts.map +1 -1
- package/resources/changelogs/changelogs.d.mts +116 -116
- package/resources/changelogs/changelogs.d.mts.map +1 -1
- package/resources/changelogs/changelogs.d.ts +116 -116
- package/resources/changelogs/changelogs.d.ts.map +1 -1
- package/resources/changelogs/changelogs.js +74 -74
- package/resources/changelogs/changelogs.js.map +1 -1
- package/resources/changelogs/changelogs.mjs +74 -74
- 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/subscribers.d.mts +3 -3
- package/resources/changelogs/subscribers.d.mts.map +1 -1
- package/resources/changelogs/subscribers.d.ts +3 -3
- package/resources/changelogs/subscribers.d.ts.map +1 -1
- package/resources/conversation-attributes.d.mts +17 -17
- package/resources/conversation-attributes.d.mts.map +1 -1
- package/resources/conversation-attributes.d.ts +17 -17
- package/resources/conversation-attributes.d.ts.map +1 -1
- package/resources/conversation-attributes.js +19 -19
- package/resources/conversation-attributes.js.map +1 -1
- package/resources/conversation-attributes.mjs +19 -19
- package/resources/conversation-attributes.mjs.map +1 -1
- package/resources/feedback/boards.d.mts +19 -19
- package/resources/feedback/boards.d.mts.map +1 -1
- package/resources/feedback/boards.d.ts +19 -19
- package/resources/feedback/boards.d.ts.map +1 -1
- package/resources/feedback/boards.js +20 -20
- package/resources/feedback/boards.js.map +1 -1
- package/resources/feedback/boards.mjs +20 -20
- package/resources/feedback/boards.mjs.map +1 -1
- package/resources/feedback/comments.d.mts +113 -113
- package/resources/feedback/comments.d.mts.map +1 -1
- package/resources/feedback/comments.d.ts +113 -113
- package/resources/feedback/comments.d.ts.map +1 -1
- package/resources/feedback/comments.js +93 -93
- package/resources/feedback/comments.js.map +1 -1
- package/resources/feedback/comments.mjs +93 -93
- package/resources/feedback/comments.mjs.map +1 -1
- package/resources/feedback/custom-fields.d.mts +36 -36
- package/resources/feedback/custom-fields.d.mts.map +1 -1
- package/resources/feedback/custom-fields.d.ts +36 -36
- package/resources/feedback/custom-fields.d.ts.map +1 -1
- package/resources/feedback/custom-fields.js +36 -36
- package/resources/feedback/custom-fields.js.map +1 -1
- package/resources/feedback/custom-fields.mjs +36 -36
- package/resources/feedback/custom-fields.mjs.map +1 -1
- package/resources/feedback/feedback.d.mts +5 -5
- package/resources/feedback/feedback.d.mts.map +1 -1
- package/resources/feedback/feedback.d.ts +5 -5
- package/resources/feedback/feedback.d.ts.map +1 -1
- package/resources/feedback/index.d.mts +5 -5
- package/resources/feedback/index.d.mts.map +1 -1
- package/resources/feedback/index.d.ts +5 -5
- package/resources/feedback/index.d.ts.map +1 -1
- package/resources/feedback/post-statuses.d.mts +20 -20
- package/resources/feedback/post-statuses.d.mts.map +1 -1
- package/resources/feedback/post-statuses.d.ts +20 -20
- package/resources/feedback/post-statuses.d.ts.map +1 -1
- package/resources/feedback/post-statuses.js +23 -23
- package/resources/feedback/post-statuses.js.map +1 -1
- package/resources/feedback/post-statuses.mjs +23 -23
- package/resources/feedback/post-statuses.mjs.map +1 -1
- package/resources/feedback/posts/index.d.mts +1 -1
- package/resources/feedback/posts/index.d.mts.map +1 -1
- package/resources/feedback/posts/index.d.ts +1 -1
- package/resources/feedback/posts/index.d.ts.map +1 -1
- package/resources/feedback/posts/posts.d.mts +132 -132
- package/resources/feedback/posts/posts.d.mts.map +1 -1
- package/resources/feedback/posts/posts.d.ts +132 -132
- package/resources/feedback/posts/posts.d.ts.map +1 -1
- package/resources/feedback/posts/posts.js +107 -107
- package/resources/feedback/posts/posts.js.map +1 -1
- package/resources/feedback/posts/posts.mjs +107 -107
- package/resources/feedback/posts/posts.mjs.map +1 -1
- package/resources/feedback/posts/voters.d.mts +3 -3
- package/resources/feedback/posts/voters.d.mts.map +1 -1
- package/resources/feedback/posts/voters.d.ts +3 -3
- package/resources/feedback/posts/voters.d.ts.map +1 -1
- package/resources/help-center/articles.d.mts +213 -97
- package/resources/help-center/articles.d.mts.map +1 -1
- package/resources/help-center/articles.d.ts +213 -97
- package/resources/help-center/articles.d.ts.map +1 -1
- package/resources/help-center/articles.js +73 -73
- package/resources/help-center/articles.js.map +1 -1
- package/resources/help-center/articles.mjs +73 -73
- package/resources/help-center/articles.mjs.map +1 -1
- package/resources/help-center/collections.d.mts +158 -71
- package/resources/help-center/collections.d.mts.map +1 -1
- package/resources/help-center/collections.d.ts +158 -71
- package/resources/help-center/collections.d.ts.map +1 -1
- package/resources/help-center/collections.js +65 -65
- package/resources/help-center/collections.js.map +1 -1
- package/resources/help-center/collections.mjs +65 -65
- package/resources/help-center/collections.mjs.map +1 -1
- package/resources/help-center/help-center.d.mts +4 -4
- package/resources/help-center/help-center.d.mts.map +1 -1
- package/resources/help-center/help-center.d.ts +4 -4
- package/resources/help-center/help-center.d.ts.map +1 -1
- package/resources/help-center/help-centers.d.mts +77 -48
- package/resources/help-center/help-centers.d.mts.map +1 -1
- package/resources/help-center/help-centers.d.ts +77 -48
- package/resources/help-center/help-centers.d.ts.map +1 -1
- package/resources/help-center/help-centers.js +43 -43
- package/resources/help-center/help-centers.js.map +1 -1
- package/resources/help-center/help-centers.mjs +43 -43
- package/resources/help-center/help-centers.mjs.map +1 -1
- package/resources/help-center/index.d.mts +4 -4
- package/resources/help-center/index.d.mts.map +1 -1
- package/resources/help-center/index.d.ts +4 -4
- package/resources/help-center/index.d.ts.map +1 -1
- package/resources/help-center/redirect-rules.d.mts +124 -124
- package/resources/help-center/redirect-rules.d.mts.map +1 -1
- package/resources/help-center/redirect-rules.d.ts +124 -124
- package/resources/help-center/redirect-rules.d.ts.map +1 -1
- package/resources/help-center/redirect-rules.js +112 -112
- package/resources/help-center/redirect-rules.js.map +1 -1
- package/resources/help-center/redirect-rules.mjs +112 -112
- package/resources/help-center/redirect-rules.mjs.map +1 -1
- package/resources/index.d.mts +5 -5
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -5
- package/resources/index.d.ts.map +1 -1
- package/resources/organization/admins.d.mts +26 -26
- package/resources/organization/admins.d.mts.map +1 -1
- package/resources/organization/admins.d.ts +26 -26
- package/resources/organization/admins.d.ts.map +1 -1
- package/resources/organization/admins.js +25 -25
- package/resources/organization/admins.js.map +1 -1
- package/resources/organization/admins.mjs +25 -25
- package/resources/organization/admins.mjs.map +1 -1
- package/resources/organization/brands.d.mts +52 -52
- package/resources/organization/brands.d.mts.map +1 -1
- package/resources/organization/brands.d.ts +52 -52
- package/resources/organization/brands.d.ts.map +1 -1
- package/resources/organization/brands.js +54 -54
- package/resources/organization/brands.js.map +1 -1
- package/resources/organization/brands.mjs +54 -54
- package/resources/organization/brands.mjs.map +1 -1
- package/resources/organization/index.d.mts +3 -3
- package/resources/organization/index.d.mts.map +1 -1
- package/resources/organization/index.d.ts +3 -3
- package/resources/organization/index.d.ts.map +1 -1
- package/resources/organization/organization.d.mts +3 -3
- package/resources/organization/organization.d.mts.map +1 -1
- package/resources/organization/organization.d.ts +3 -3
- package/resources/organization/organization.d.ts.map +1 -1
- package/resources/organization/teams.d.mts +47 -47
- package/resources/organization/teams.d.mts.map +1 -1
- package/resources/organization/teams.d.ts +47 -47
- package/resources/organization/teams.d.ts.map +1 -1
- package/resources/organization/teams.js +44 -44
- package/resources/organization/teams.js.map +1 -1
- package/resources/organization/teams.mjs +44 -44
- package/resources/organization/teams.mjs.map +1 -1
- package/resources/reports.d.mts +249 -215
- package/resources/reports.d.mts.map +1 -1
- package/resources/reports.d.ts +249 -215
- package/resources/reports.d.ts.map +1 -1
- package/resources/reports.js +99 -99
- package/resources/reports.js.map +1 -1
- package/resources/reports.mjs +99 -99
- package/resources/reports.mjs.map +1 -1
- package/resources/support/conversation-tags.d.mts +43 -43
- package/resources/support/conversation-tags.d.mts.map +1 -1
- package/resources/support/conversation-tags.d.ts +43 -43
- package/resources/support/conversation-tags.d.ts.map +1 -1
- package/resources/support/conversation-tags.js +32 -32
- package/resources/support/conversation-tags.js.map +1 -1
- package/resources/support/conversation-tags.mjs +32 -32
- package/resources/support/conversation-tags.mjs.map +1 -1
- package/resources/support/conversations/conversations.d.mts +337 -327
- package/resources/support/conversations/conversations.d.mts.map +1 -1
- package/resources/support/conversations/conversations.d.ts +337 -327
- package/resources/support/conversations/conversations.d.ts.map +1 -1
- package/resources/support/conversations/conversations.js +293 -283
- package/resources/support/conversations/conversations.js.map +1 -1
- package/resources/support/conversations/conversations.mjs +293 -283
- package/resources/support/conversations/conversations.mjs.map +1 -1
- package/resources/support/conversations/index.d.mts +1 -1
- package/resources/support/conversations/index.d.mts.map +1 -1
- package/resources/support/conversations/index.d.ts +1 -1
- package/resources/support/conversations/index.d.ts.map +1 -1
- package/resources/support/conversations/participants.d.mts +2 -2
- package/resources/support/conversations/participants.d.mts.map +1 -1
- package/resources/support/conversations/participants.d.ts +2 -2
- package/resources/support/conversations/participants.d.ts.map +1 -1
- package/resources/support/index.d.mts +3 -3
- package/resources/support/index.d.mts.map +1 -1
- package/resources/support/index.d.ts +3 -3
- package/resources/support/index.d.ts.map +1 -1
- package/resources/support/support.d.mts +3 -3
- package/resources/support/support.d.mts.map +1 -1
- package/resources/support/support.d.ts +3 -3
- package/resources/support/support.d.ts.map +1 -1
- package/resources/support/tickets/categories.d.mts +20 -20
- package/resources/support/tickets/categories.d.mts.map +1 -1
- package/resources/support/tickets/categories.d.ts +20 -20
- package/resources/support/tickets/categories.d.ts.map +1 -1
- package/resources/support/tickets/categories.js +25 -25
- package/resources/support/tickets/categories.js.map +1 -1
- package/resources/support/tickets/categories.mjs +25 -25
- package/resources/support/tickets/categories.mjs.map +1 -1
- package/resources/support/tickets/custom-fields.d.mts +22 -22
- package/resources/support/tickets/custom-fields.d.mts.map +1 -1
- package/resources/support/tickets/custom-fields.d.ts +22 -22
- package/resources/support/tickets/custom-fields.d.ts.map +1 -1
- package/resources/support/tickets/custom-fields.js +19 -19
- package/resources/support/tickets/custom-fields.js.map +1 -1
- package/resources/support/tickets/custom-fields.mjs +19 -19
- package/resources/support/tickets/custom-fields.mjs.map +1 -1
- package/resources/support/tickets/index.d.mts +4 -4
- package/resources/support/tickets/index.d.mts.map +1 -1
- package/resources/support/tickets/index.d.ts +4 -4
- package/resources/support/tickets/index.d.ts.map +1 -1
- package/resources/support/tickets/statuses.d.mts +19 -19
- package/resources/support/tickets/statuses.d.mts.map +1 -1
- package/resources/support/tickets/statuses.d.ts +19 -19
- package/resources/support/tickets/statuses.d.ts.map +1 -1
- package/resources/support/tickets/statuses.js +21 -21
- package/resources/support/tickets/statuses.js.map +1 -1
- package/resources/support/tickets/statuses.mjs +21 -21
- package/resources/support/tickets/statuses.mjs.map +1 -1
- package/resources/support/tickets/tickets.d.mts +75 -75
- package/resources/support/tickets/tickets.d.mts.map +1 -1
- package/resources/support/tickets/tickets.d.ts +75 -75
- package/resources/support/tickets/tickets.d.ts.map +1 -1
- package/resources/support/tickets/tickets.js +44 -44
- package/resources/support/tickets/tickets.js.map +1 -1
- package/resources/support/tickets/tickets.mjs +44 -44
- package/resources/support/tickets/tickets.mjs.map +1 -1
- package/resources/surveys.d.mts +43 -43
- package/resources/surveys.d.mts.map +1 -1
- package/resources/surveys.d.ts +43 -43
- package/resources/surveys.d.ts.map +1 -1
- package/resources/surveys.js +44 -44
- package/resources/surveys.js.map +1 -1
- package/resources/surveys.mjs +44 -44
- package/resources/surveys.mjs.map +1 -1
- package/resources/users/companies/companies.d.mts +121 -130
- package/resources/users/companies/companies.d.mts.map +1 -1
- package/resources/users/companies/companies.d.ts +121 -130
- package/resources/users/companies/companies.d.ts.map +1 -1
- package/resources/users/companies/companies.js +125 -125
- package/resources/users/companies/companies.js.map +1 -1
- package/resources/users/companies/companies.mjs +125 -125
- package/resources/users/companies/companies.mjs.map +1 -1
- package/resources/users/companies/contacts.d.mts +3 -3
- package/resources/users/companies/contacts.d.mts.map +1 -1
- package/resources/users/companies/contacts.d.ts +3 -3
- package/resources/users/companies/contacts.d.ts.map +1 -1
- package/resources/users/companies/index.d.mts +1 -1
- package/resources/users/companies/index.d.mts.map +1 -1
- package/resources/users/companies/index.d.ts +1 -1
- package/resources/users/companies/index.d.ts.map +1 -1
- package/resources/users/contacts/by-user-id/by-user-id.d.mts +2 -2
- package/resources/users/contacts/by-user-id/by-user-id.d.mts.map +1 -1
- package/resources/users/contacts/by-user-id/by-user-id.d.ts +2 -2
- package/resources/users/contacts/by-user-id/by-user-id.d.ts.map +1 -1
- package/resources/users/contacts/by-user-id/email-preferences.d.mts +2 -2
- package/resources/users/contacts/by-user-id/email-preferences.d.mts.map +1 -1
- package/resources/users/contacts/by-user-id/email-preferences.d.ts +2 -2
- package/resources/users/contacts/by-user-id/email-preferences.d.ts.map +1 -1
- package/resources/users/contacts/contacts.d.mts +249 -235
- package/resources/users/contacts/contacts.d.mts.map +1 -1
- package/resources/users/contacts/contacts.d.ts +249 -235
- package/resources/users/contacts/contacts.d.ts.map +1 -1
- package/resources/users/contacts/contacts.js +211 -184
- package/resources/users/contacts/contacts.js.map +1 -1
- package/resources/users/contacts/contacts.mjs +211 -184
- package/resources/users/contacts/contacts.mjs.map +1 -1
- package/resources/users/contacts/email-preferences.d.mts +2 -2
- package/resources/users/contacts/email-preferences.d.mts.map +1 -1
- package/resources/users/contacts/email-preferences.d.ts +2 -2
- package/resources/users/contacts/email-preferences.d.ts.map +1 -1
- package/resources/users/contacts/index.d.mts +1 -1
- package/resources/users/contacts/index.d.mts.map +1 -1
- package/resources/users/contacts/index.d.ts +1 -1
- package/resources/users/contacts/index.d.ts.map +1 -1
- package/resources/users/index.d.mts +2 -2
- package/resources/users/index.d.mts.map +1 -1
- package/resources/users/index.d.ts +2 -2
- package/resources/users/index.d.ts.map +1 -1
- package/resources/users/users.d.mts +2 -2
- package/resources/users/users.d.mts.map +1 -1
- package/resources/users/users.d.ts +2 -2
- package/resources/users/users.d.ts.map +1 -1
- package/resources/webhooks.d.mts +83 -83
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +83 -83
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +77 -77
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +77 -77
- package/resources/webhooks.mjs.map +1 -1
- package/src/client.ts +6 -6
- package/src/resources/audit-logs.ts +7 -1
- package/src/resources/changelogs/changelogs.ts +320 -175
- package/src/resources/changelogs/index.ts +1 -1
- package/src/resources/changelogs/subscribers.ts +31 -2
- package/src/resources/conversation-attributes.ts +34 -34
- package/src/resources/feedback/boards.ts +30 -30
- package/src/resources/feedback/comments.ts +137 -137
- package/src/resources/feedback/custom-fields.ts +46 -46
- package/src/resources/feedback/feedback.ts +6 -6
- package/src/resources/feedback/index.ts +6 -6
- package/src/resources/feedback/post-statuses.ts +33 -33
- package/src/resources/feedback/posts/index.ts +2 -2
- package/src/resources/feedback/posts/posts.ts +176 -176
- package/src/resources/feedback/posts/voters.ts +3 -3
- package/src/resources/help-center/articles.ts +631 -109
- package/src/resources/help-center/collections.ts +349 -88
- package/src/resources/help-center/help-center.ts +5 -5
- package/src/resources/help-center/help-centers.ts +202 -57
- package/src/resources/help-center/index.ts +5 -5
- package/src/resources/help-center/redirect-rules.ts +294 -178
- package/src/resources/index.ts +6 -6
- package/src/resources/organization/admins.ts +36 -36
- package/src/resources/organization/brands.ts +68 -68
- package/src/resources/organization/index.ts +3 -3
- package/src/resources/organization/organization.ts +3 -3
- package/src/resources/organization/teams.ts +54 -54
- package/src/resources/reports.ts +311 -262
- package/src/resources/support/conversation-tags.ts +62 -62
- package/src/resources/support/conversations/conversations.ts +429 -419
- package/src/resources/support/conversations/index.ts +4 -4
- package/src/resources/support/conversations/participants.ts +2 -2
- package/src/resources/support/index.ts +7 -7
- package/src/resources/support/support.ts +7 -7
- package/src/resources/support/tickets/categories.ts +35 -35
- package/src/resources/support/tickets/custom-fields.ts +29 -29
- package/src/resources/support/tickets/index.ts +4 -4
- package/src/resources/support/tickets/statuses.ts +31 -31
- package/src/resources/support/tickets/tickets.ts +101 -101
- package/src/resources/surveys.ts +60 -60
- package/src/resources/users/companies/companies.ts +158 -172
- package/src/resources/users/companies/contacts.ts +3 -3
- package/src/resources/users/companies/index.ts +2 -2
- package/src/resources/users/contacts/by-user-id/by-user-id.ts +2 -2
- package/src/resources/users/contacts/by-user-id/email-preferences.ts +2 -2
- package/src/resources/users/contacts/contacts.ts +284 -280
- package/src/resources/users/contacts/email-preferences.ts +2 -2
- package/src/resources/users/contacts/index.ts +3 -3
- package/src/resources/users/index.ts +5 -5
- package/src/resources/users/users.ts +5 -5
- package/src/resources/webhooks.ts +106 -100
- 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
|
@@ -13,91 +13,6 @@ export class Conversations extends APIResource {
|
|
|
13
13
|
super(...arguments);
|
|
14
14
|
this.participants = new ParticipantsAPI.Participants(this._client);
|
|
15
15
|
}
|
|
16
|
-
/**
|
|
17
|
-
* Returns a list of conversations in your organization using cursor-based
|
|
18
|
-
* pagination.
|
|
19
|
-
*
|
|
20
|
-
* ### Query Parameters
|
|
21
|
-
*
|
|
22
|
-
* - `limit` - Number of conversations to return (1-100, default 10)
|
|
23
|
-
* - `cursor` - Cursor from previous response for pagination
|
|
24
|
-
* - `tagIds` - Optional tag filter as a comma-separated list of tag IDs. Matches
|
|
25
|
-
* conversations that contain all of the provided tags.
|
|
26
|
-
*
|
|
27
|
-
* ### Response Format
|
|
28
|
-
*
|
|
29
|
-
* Returns a list object with:
|
|
30
|
-
*
|
|
31
|
-
* - `object` - Always "list"
|
|
32
|
-
* - `data` - Array of conversation objects
|
|
33
|
-
* - `nextCursor` - Cursor for the next page, or null if no more results
|
|
34
|
-
*
|
|
35
|
-
* ### Conversation Object
|
|
36
|
-
*
|
|
37
|
-
* Each conversation includes:
|
|
38
|
-
*
|
|
39
|
-
* - `id` - Unique conversation identifier (short ID)
|
|
40
|
-
* - `title` - Conversation title
|
|
41
|
-
* - `state` - Current state ("open", "closed", or "snoozed")
|
|
42
|
-
* - `priority` - Whether the conversation is marked as priority
|
|
43
|
-
* - `adminAssigneeId` - ID of assigned admin (if any)
|
|
44
|
-
* - `teamAssigneeId` - ID of assigned team (if any)
|
|
45
|
-
* - `tags` - Current tags applied anywhere in the conversation
|
|
46
|
-
* - `participants` - Array of participants
|
|
47
|
-
* - `source` - Information about the first message
|
|
48
|
-
* - `createdAt` - Creation timestamp
|
|
49
|
-
* - `updatedAt` - Last update timestamp
|
|
50
|
-
*
|
|
51
|
-
* ### Example
|
|
52
|
-
*
|
|
53
|
-
* ```json
|
|
54
|
-
* {
|
|
55
|
-
* "object": "list",
|
|
56
|
-
* "data": [
|
|
57
|
-
* {
|
|
58
|
-
* "object": "conversation",
|
|
59
|
-
* "id": "12345",
|
|
60
|
-
* "title": "Question about pricing",
|
|
61
|
-
* "state": "open",
|
|
62
|
-
* "priority": false,
|
|
63
|
-
* "adminAssigneeId": null,
|
|
64
|
-
* "participants": [
|
|
65
|
-
* { "type": "customer", "id": "676f0f6765bdaa7d7d760f88" }
|
|
66
|
-
* ],
|
|
67
|
-
* ...
|
|
68
|
-
* }
|
|
69
|
-
* ],
|
|
70
|
-
* "nextCursor": "eyJpZCI6IjEyMzQ1In0="
|
|
71
|
-
* }
|
|
72
|
-
* ```
|
|
73
|
-
*
|
|
74
|
-
* ### Version Availability
|
|
75
|
-
*
|
|
76
|
-
* This endpoint is only available in API version 2026-01-01.nova and newer.
|
|
77
|
-
*
|
|
78
|
-
* @example
|
|
79
|
-
* ```ts
|
|
80
|
-
* // Automatically fetches more pages as needed.
|
|
81
|
-
* for await (const conversation of client.support.conversations.list()) {
|
|
82
|
-
* // ...
|
|
83
|
-
* }
|
|
84
|
-
* ```
|
|
85
|
-
*/
|
|
86
|
-
list(params = {}, options) {
|
|
87
|
-
const { 'Featurebase-Version': featurebaseVersion, ...query } = params ?? {};
|
|
88
|
-
return this._client.getAPIList('/v2/conversations', (CursorPage), {
|
|
89
|
-
query,
|
|
90
|
-
...options,
|
|
91
|
-
headers: buildHeaders([
|
|
92
|
-
{
|
|
93
|
-
...(featurebaseVersion?.toString() != null ?
|
|
94
|
-
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
95
|
-
: undefined),
|
|
96
|
-
},
|
|
97
|
-
options?.headers,
|
|
98
|
-
]),
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
16
|
/**
|
|
102
17
|
* Creates a new conversation. Supports both contact-initiated (customer/lead) and
|
|
103
18
|
* admin-initiated (outreach) conversations.
|
|
@@ -365,54 +280,6 @@ export class Conversations extends APIResource {
|
|
|
365
280
|
]),
|
|
366
281
|
});
|
|
367
282
|
}
|
|
368
|
-
/**
|
|
369
|
-
* Permanently deletes a conversation by its short ID.
|
|
370
|
-
*
|
|
371
|
-
* ### Path Parameters
|
|
372
|
-
*
|
|
373
|
-
* - `id` - The conversation short ID (numeric)
|
|
374
|
-
*
|
|
375
|
-
* ### Response
|
|
376
|
-
*
|
|
377
|
-
* Returns a deletion confirmation object:
|
|
378
|
-
*
|
|
379
|
-
* ```json
|
|
380
|
-
* {
|
|
381
|
-
* "id": "12345",
|
|
382
|
-
* "object": "conversation",
|
|
383
|
-
* "deleted": true
|
|
384
|
-
* }
|
|
385
|
-
* ```
|
|
386
|
-
*
|
|
387
|
-
* ### Caution
|
|
388
|
-
*
|
|
389
|
-
* This operation is **irreversible**. The conversation and all its messages will
|
|
390
|
-
* be permanently deleted.
|
|
391
|
-
*
|
|
392
|
-
* ### Version Availability
|
|
393
|
-
*
|
|
394
|
-
* This endpoint is only available in API version 2026-01-01.nova and newer.
|
|
395
|
-
*
|
|
396
|
-
* @example
|
|
397
|
-
* ```ts
|
|
398
|
-
* const conversation =
|
|
399
|
-
* await client.support.conversations.delete('12345');
|
|
400
|
-
* ```
|
|
401
|
-
*/
|
|
402
|
-
delete(id, params = {}, options) {
|
|
403
|
-
const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
|
|
404
|
-
return this._client.delete(path `/v2/conversations/${id}`, {
|
|
405
|
-
...options,
|
|
406
|
-
headers: buildHeaders([
|
|
407
|
-
{
|
|
408
|
-
...(featurebaseVersion?.toString() != null ?
|
|
409
|
-
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
410
|
-
: undefined),
|
|
411
|
-
},
|
|
412
|
-
options?.headers,
|
|
413
|
-
]),
|
|
414
|
-
});
|
|
415
|
-
}
|
|
416
283
|
/**
|
|
417
284
|
* Updates a conversation's properties. Supports partial updates - only provided
|
|
418
285
|
* fields will be updated.
|
|
@@ -556,97 +423,236 @@ export class Conversations extends APIResource {
|
|
|
556
423
|
});
|
|
557
424
|
}
|
|
558
425
|
/**
|
|
559
|
-
*
|
|
560
|
-
*
|
|
426
|
+
* Returns a list of conversations in your organization using cursor-based
|
|
427
|
+
* pagination.
|
|
561
428
|
*
|
|
562
|
-
* ###
|
|
429
|
+
* ### Query Parameters
|
|
563
430
|
*
|
|
564
|
-
* - `
|
|
431
|
+
* - `limit` - Number of conversations to return (1-100, default 10)
|
|
432
|
+
* - `cursor` - Cursor from previous response for pagination
|
|
433
|
+
* - `tagIds` - Optional tag filter as a comma-separated list of tag IDs. Matches
|
|
434
|
+
* conversations that contain all of the provided tags.
|
|
565
435
|
*
|
|
566
|
-
* ###
|
|
436
|
+
* ### Response Format
|
|
567
437
|
*
|
|
568
|
-
*
|
|
438
|
+
* Returns a list object with:
|
|
569
439
|
*
|
|
570
|
-
*
|
|
440
|
+
* - `object` - Always "list"
|
|
441
|
+
* - `data` - Array of conversation objects
|
|
442
|
+
* - `nextCursor` - Cursor for the next page, or null if no more results
|
|
571
443
|
*
|
|
572
|
-
*
|
|
573
|
-
* | ------------------- | ------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
574
|
-
* | `type` | string | Yes | Must be "contact" |
|
|
575
|
-
* | `userId` | string | No\* | External user ID from your system |
|
|
576
|
-
* | `id` | string | No\* | Featurebase contact ID (24-character ObjectId) |
|
|
577
|
-
* | `bodyMarkdown` | string | Yes | The message content in markdown format. Images referenced by URL or as base64 data URIs will be automatically uploaded and stored. |
|
|
578
|
-
* | `messageType` | string | Yes | Must be "reply" |
|
|
579
|
-
* | `skipNotifications` | boolean | No | Skip sending notifications (default: false). Useful for bulk imports. |
|
|
444
|
+
* ### Conversation Object
|
|
580
445
|
*
|
|
581
|
-
*
|
|
446
|
+
* Each conversation includes:
|
|
582
447
|
*
|
|
583
|
-
*
|
|
448
|
+
* - `id` - Unique conversation identifier (short ID)
|
|
449
|
+
* - `title` - Conversation title
|
|
450
|
+
* - `state` - Current state ("open", "closed", or "snoozed")
|
|
451
|
+
* - `priority` - Whether the conversation is marked as priority
|
|
452
|
+
* - `adminAssigneeId` - ID of assigned admin (if any)
|
|
453
|
+
* - `teamAssigneeId` - ID of assigned team (if any)
|
|
454
|
+
* - `tags` - Current tags applied anywhere in the conversation
|
|
455
|
+
* - `participants` - Array of participants
|
|
456
|
+
* - `source` - Information about the first message
|
|
457
|
+
* - `createdAt` - Creation timestamp
|
|
458
|
+
* - `updatedAt` - Last update timestamp
|
|
584
459
|
*
|
|
585
|
-
*
|
|
586
|
-
* | ------------------- | ------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
587
|
-
* | `type` | string | Yes | Must be "admin" |
|
|
588
|
-
* | `id` | string | Yes | Featurebase admin ID (24-character ObjectId) |
|
|
589
|
-
* | `bodyMarkdown` | string | Yes | The message content in markdown format. Images referenced by URL or as base64 data URIs will be automatically uploaded and stored. |
|
|
590
|
-
* | `messageType` | string | Yes | "reply" for customer-visible reply, "note" for internal note |
|
|
591
|
-
* | `skipNotifications` | boolean | No | Skip sending notifications (default: false). Useful for bulk imports. |
|
|
460
|
+
* ### Example
|
|
592
461
|
*
|
|
593
|
-
*
|
|
462
|
+
* ```json
|
|
463
|
+
* {
|
|
464
|
+
* "object": "list",
|
|
465
|
+
* "data": [
|
|
466
|
+
* {
|
|
467
|
+
* "object": "conversation",
|
|
468
|
+
* "id": "12345",
|
|
469
|
+
* "title": "Question about pricing",
|
|
470
|
+
* "state": "open",
|
|
471
|
+
* "priority": false,
|
|
472
|
+
* "adminAssigneeId": null,
|
|
473
|
+
* "participants": [
|
|
474
|
+
* { "type": "customer", "id": "676f0f6765bdaa7d7d760f88" }
|
|
475
|
+
* ],
|
|
476
|
+
* ...
|
|
477
|
+
* }
|
|
478
|
+
* ],
|
|
479
|
+
* "nextCursor": "eyJpZCI6IjEyMzQ1In0="
|
|
480
|
+
* }
|
|
481
|
+
* ```
|
|
594
482
|
*
|
|
595
|
-
*
|
|
596
|
-
* response includes both `bodyHtml` (with signed image URLs) and `bodyMarkdown`
|
|
597
|
-
* fields.
|
|
483
|
+
* ### Version Availability
|
|
598
484
|
*
|
|
599
|
-
*
|
|
485
|
+
* This endpoint is only available in API version 2026-01-01.nova and newer.
|
|
600
486
|
*
|
|
601
|
-
*
|
|
602
|
-
*
|
|
603
|
-
*
|
|
604
|
-
*
|
|
605
|
-
*
|
|
606
|
-
* "messageType": "reply"
|
|
487
|
+
* @example
|
|
488
|
+
* ```ts
|
|
489
|
+
* // Automatically fetches more pages as needed.
|
|
490
|
+
* for await (const conversation of client.support.conversations.list()) {
|
|
491
|
+
* // ...
|
|
607
492
|
* }
|
|
608
493
|
* ```
|
|
494
|
+
*/
|
|
495
|
+
list(params = {}, options) {
|
|
496
|
+
const { 'Featurebase-Version': featurebaseVersion, ...query } = params ?? {};
|
|
497
|
+
return this._client.getAPIList('/v2/conversations', (CursorPage), {
|
|
498
|
+
query,
|
|
499
|
+
...options,
|
|
500
|
+
headers: buildHeaders([
|
|
501
|
+
{
|
|
502
|
+
...(featurebaseVersion?.toString() != null ?
|
|
503
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
504
|
+
: undefined),
|
|
505
|
+
},
|
|
506
|
+
options?.headers,
|
|
507
|
+
]),
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* Permanently deletes a conversation by its short ID.
|
|
609
512
|
*
|
|
610
|
-
* ###
|
|
513
|
+
* ### Path Parameters
|
|
514
|
+
*
|
|
515
|
+
* - `id` - The conversation short ID (numeric)
|
|
516
|
+
*
|
|
517
|
+
* ### Response
|
|
518
|
+
*
|
|
519
|
+
* Returns a deletion confirmation object:
|
|
611
520
|
*
|
|
612
521
|
* ```json
|
|
613
522
|
* {
|
|
614
|
-
* "
|
|
615
|
-
* "
|
|
616
|
-
* "
|
|
617
|
-
* "messageType": "reply"
|
|
523
|
+
* "id": "12345",
|
|
524
|
+
* "object": "conversation",
|
|
525
|
+
* "deleted": true
|
|
618
526
|
* }
|
|
619
527
|
* ```
|
|
620
528
|
*
|
|
621
|
-
* ###
|
|
529
|
+
* ### Caution
|
|
530
|
+
*
|
|
531
|
+
* This operation is **irreversible**. The conversation and all its messages will
|
|
532
|
+
* be permanently deleted.
|
|
533
|
+
*
|
|
534
|
+
* ### Version Availability
|
|
535
|
+
*
|
|
536
|
+
* This endpoint is only available in API version 2026-01-01.nova and newer.
|
|
537
|
+
*
|
|
538
|
+
* @example
|
|
539
|
+
* ```ts
|
|
540
|
+
* const conversation =
|
|
541
|
+
* await client.support.conversations.delete('12345');
|
|
542
|
+
* ```
|
|
543
|
+
*/
|
|
544
|
+
delete(id, params = {}, options) {
|
|
545
|
+
const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
|
|
546
|
+
return this._client.delete(path `/v2/conversations/${id}`, {
|
|
547
|
+
...options,
|
|
548
|
+
headers: buildHeaders([
|
|
549
|
+
{
|
|
550
|
+
...(featurebaseVersion?.toString() != null ?
|
|
551
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
552
|
+
: undefined),
|
|
553
|
+
},
|
|
554
|
+
options?.headers,
|
|
555
|
+
]),
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* Attaches a workspace tag to a conversation.
|
|
560
|
+
*
|
|
561
|
+
* This endpoint requires both the tag ID to attach and the `actingAdminId` of the
|
|
562
|
+
* admin on whose behalf the mutation is recorded.
|
|
563
|
+
*
|
|
564
|
+
* ### Path Parameters
|
|
565
|
+
*
|
|
566
|
+
* - `id` - The conversation ID (short ID)
|
|
567
|
+
*
|
|
568
|
+
* ### Request Body
|
|
569
|
+
*
|
|
570
|
+
* | Field | Type | Required | Description |
|
|
571
|
+
* | --------------- | ------ | -------- | ------------------------------------------------------------------------ |
|
|
572
|
+
* | `tagId` | string | Yes | The Featurebase tag ID to attach |
|
|
573
|
+
* | `actingAdminId` | string | Yes | The admin performing the mutation. Must be a member of the organization. |
|
|
574
|
+
*
|
|
575
|
+
* ### Behavior
|
|
576
|
+
*
|
|
577
|
+
* Featurebase resolves the latest taggable reply/message in the conversation and
|
|
578
|
+
* records the tag attachment against that part so audit metadata remains
|
|
579
|
+
* deterministic.
|
|
580
|
+
*
|
|
581
|
+
* ### Response
|
|
582
|
+
*
|
|
583
|
+
* Returns the affected tag plus attachment metadata such as `targetPartId`,
|
|
584
|
+
* `appliedAt`, and `appliedBy`.
|
|
585
|
+
*
|
|
586
|
+
* ### Example Request
|
|
622
587
|
*
|
|
623
588
|
* ```json
|
|
624
589
|
* {
|
|
625
|
-
* "
|
|
626
|
-
* "
|
|
627
|
-
* "bodyMarkdown": "Customer seems frustrated, escalating to tier 2.",
|
|
628
|
-
* "messageType": "note"
|
|
590
|
+
* "tagId": "67ec1234abcd5678ef901234",
|
|
591
|
+
* "actingAdminId": "507f1f77bcf86cd799439011"
|
|
629
592
|
* }
|
|
630
593
|
* ```
|
|
631
594
|
*
|
|
632
|
-
* ###
|
|
595
|
+
* ### Version Availability
|
|
596
|
+
*
|
|
597
|
+
* This endpoint is only available in API version 2026-01-01.nova and newer.
|
|
598
|
+
*
|
|
599
|
+
* @example
|
|
600
|
+
* ```ts
|
|
601
|
+
* const attachedConversationTag =
|
|
602
|
+
* await client.support.conversations.attachTag('12345', {
|
|
603
|
+
* actingAdminId: '507f1f77bcf86cd799439011',
|
|
604
|
+
* tagId: '67ec1234abcd5678ef901234',
|
|
605
|
+
* });
|
|
606
|
+
* ```
|
|
607
|
+
*/
|
|
608
|
+
attachTag(id, params, options) {
|
|
609
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
610
|
+
return this._client.post(path `/v2/conversations/${id}/tags`, {
|
|
611
|
+
body,
|
|
612
|
+
...options,
|
|
613
|
+
headers: buildHeaders([
|
|
614
|
+
{
|
|
615
|
+
...(featurebaseVersion?.toString() != null ?
|
|
616
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
617
|
+
: undefined),
|
|
618
|
+
},
|
|
619
|
+
options?.headers,
|
|
620
|
+
]),
|
|
621
|
+
});
|
|
622
|
+
}
|
|
623
|
+
/**
|
|
624
|
+
* Removes a workspace tag from a conversation.
|
|
625
|
+
*
|
|
626
|
+
* This endpoint requires the `actingAdminId` of the admin on whose behalf the
|
|
627
|
+
* mutation is recorded.
|
|
628
|
+
*
|
|
629
|
+
* ### Path Parameters
|
|
630
|
+
*
|
|
631
|
+
* - `id` - The conversation ID (short ID)
|
|
632
|
+
* - `tagId` - The Featurebase tag ID to remove
|
|
633
|
+
*
|
|
634
|
+
* ### Request Body
|
|
635
|
+
*
|
|
636
|
+
* | Field | Type | Required | Description |
|
|
637
|
+
* | --------------- | ------ | -------- | ------------------------------------------------------------------------ |
|
|
638
|
+
* | `actingAdminId` | string | Yes | The admin performing the mutation. Must be a member of the organization. |
|
|
639
|
+
*
|
|
640
|
+
* ### Behavior
|
|
641
|
+
*
|
|
642
|
+
* Featurebase resolves the latest taggable reply/message in the conversation and
|
|
643
|
+
* records the tag removal against that part so audit metadata remains
|
|
644
|
+
* deterministic.
|
|
645
|
+
*
|
|
646
|
+
* ### Response
|
|
647
|
+
*
|
|
648
|
+
* Returns the affected tag payload with the most relevant attachment metadata
|
|
649
|
+
* available for that relationship.
|
|
650
|
+
*
|
|
651
|
+
* ### Example Request
|
|
633
652
|
*
|
|
634
653
|
* ```json
|
|
635
654
|
* {
|
|
636
|
-
* "
|
|
637
|
-
* "id": "3",
|
|
638
|
-
* "partType": "user_msg",
|
|
639
|
-
* "bodyHtml": "<p>Thank you for your help!</p>",
|
|
640
|
-
* "bodyMarkdown": "Thank you for your help!",
|
|
641
|
-
* "author": {
|
|
642
|
-
* "type": "customer",
|
|
643
|
-
* "id": "676f0f6765bdaa7d7d760f88",
|
|
644
|
-
* "name": "John Doe",
|
|
645
|
-
* "email": "john@example.com"
|
|
646
|
-
* },
|
|
647
|
-
* "channel": "desktop",
|
|
648
|
-
* "createdAt": "2025-01-15T10:40:00.000Z",
|
|
649
|
-
* "updatedAt": "2025-01-15T10:40:00.000Z"
|
|
655
|
+
* "actingAdminId": "507f1f77bcf86cd799439011"
|
|
650
656
|
* }
|
|
651
657
|
* ```
|
|
652
658
|
*
|
|
@@ -656,17 +662,19 @@ export class Conversations extends APIResource {
|
|
|
656
662
|
*
|
|
657
663
|
* @example
|
|
658
664
|
* ```ts
|
|
659
|
-
* const
|
|
660
|
-
* await client.support.conversations.
|
|
661
|
-
*
|
|
662
|
-
*
|
|
663
|
-
*
|
|
664
|
-
*
|
|
665
|
+
* const attachedConversationTag =
|
|
666
|
+
* await client.support.conversations.detachTag(
|
|
667
|
+
* '67ec1234abcd5678ef901234',
|
|
668
|
+
* {
|
|
669
|
+
* id: '12345',
|
|
670
|
+
* actingAdminId: '507f1f77bcf86cd799439011',
|
|
671
|
+
* },
|
|
672
|
+
* );
|
|
665
673
|
* ```
|
|
666
674
|
*/
|
|
667
|
-
|
|
668
|
-
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
669
|
-
return this._client.
|
|
675
|
+
detachTag(tagID, params, options) {
|
|
676
|
+
const { id, 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
677
|
+
return this._client.delete(path `/v2/conversations/${id}/tags/${tagID}`, {
|
|
670
678
|
body,
|
|
671
679
|
...options,
|
|
672
680
|
headers: buildHeaders([
|
|
@@ -773,10 +781,8 @@ export class Conversations extends APIResource {
|
|
|
773
781
|
});
|
|
774
782
|
}
|
|
775
783
|
/**
|
|
776
|
-
*
|
|
777
|
-
*
|
|
778
|
-
* This endpoint requires both the tag ID to attach and the `actingAdminId` of the
|
|
779
|
-
* admin on whose behalf the mutation is recorded.
|
|
784
|
+
* Adds a reply to an existing conversation. Supports both contact (customer/lead)
|
|
785
|
+
* and admin replies.
|
|
780
786
|
*
|
|
781
787
|
* ### Path Parameters
|
|
782
788
|
*
|
|
@@ -784,92 +790,88 @@ export class Conversations extends APIResource {
|
|
|
784
790
|
*
|
|
785
791
|
* ### Request Body
|
|
786
792
|
*
|
|
787
|
-
*
|
|
788
|
-
* | --------------- | ------ | -------- | ------------------------------------------------------------------------ |
|
|
789
|
-
* | `tagId` | string | Yes | The Featurebase tag ID to attach |
|
|
790
|
-
* | `actingAdminId` | string | Yes | The admin performing the mutation. Must be a member of the organization. |
|
|
793
|
+
* The request body varies based on who is sending the reply:
|
|
791
794
|
*
|
|
792
|
-
*
|
|
795
|
+
* #### Contact Reply (customer/lead)
|
|
793
796
|
*
|
|
794
|
-
*
|
|
795
|
-
*
|
|
796
|
-
*
|
|
797
|
+
* | Field | Type | Required | Description |
|
|
798
|
+
* | ------------------- | ------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
799
|
+
* | `type` | string | Yes | Must be "contact" |
|
|
800
|
+
* | `userId` | string | No\* | External user ID from your system |
|
|
801
|
+
* | `id` | string | No\* | Featurebase contact ID (24-character ObjectId) |
|
|
802
|
+
* | `bodyMarkdown` | string | Yes | The message content in markdown format. Images referenced by URL or as base64 data URIs will be automatically uploaded and stored. |
|
|
803
|
+
* | `messageType` | string | Yes | Must be "reply" |
|
|
804
|
+
* | `skipNotifications` | boolean | No | Skip sending notifications (default: false). Useful for bulk imports. |
|
|
805
|
+
*
|
|
806
|
+
* \*At least one of `userId` or `id` is required.
|
|
807
|
+
*
|
|
808
|
+
* #### Admin Reply
|
|
809
|
+
*
|
|
810
|
+
* | Field | Type | Required | Description |
|
|
811
|
+
* | ------------------- | ------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
812
|
+
* | `type` | string | Yes | Must be "admin" |
|
|
813
|
+
* | `id` | string | Yes | Featurebase admin ID (24-character ObjectId) |
|
|
814
|
+
* | `bodyMarkdown` | string | Yes | The message content in markdown format. Images referenced by URL or as base64 data URIs will be automatically uploaded and stored. |
|
|
815
|
+
* | `messageType` | string | Yes | "reply" for customer-visible reply, "note" for internal note |
|
|
816
|
+
* | `skipNotifications` | boolean | No | Skip sending notifications (default: false). Useful for bulk imports. |
|
|
797
817
|
*
|
|
798
818
|
* ### Response
|
|
799
819
|
*
|
|
800
|
-
* Returns the
|
|
801
|
-
* `
|
|
820
|
+
* Returns the created conversation part object with a **201 Created** status. The
|
|
821
|
+
* response includes both `bodyHtml` (with signed image URLs) and `bodyMarkdown`
|
|
822
|
+
* fields.
|
|
802
823
|
*
|
|
803
|
-
* ### Example
|
|
824
|
+
* ### Example Contact Reply
|
|
804
825
|
*
|
|
805
826
|
* ```json
|
|
806
827
|
* {
|
|
807
|
-
* "
|
|
808
|
-
* "
|
|
828
|
+
* "type": "contact",
|
|
829
|
+
* "userId": "user_123",
|
|
830
|
+
* "bodyMarkdown": "Thank you for your help!",
|
|
831
|
+
* "messageType": "reply"
|
|
809
832
|
* }
|
|
810
833
|
* ```
|
|
811
834
|
*
|
|
812
|
-
* ###
|
|
813
|
-
*
|
|
814
|
-
* This endpoint is only available in API version 2026-01-01.nova and newer.
|
|
835
|
+
* ### Example Admin Reply
|
|
815
836
|
*
|
|
816
|
-
*
|
|
817
|
-
*
|
|
818
|
-
*
|
|
819
|
-
*
|
|
820
|
-
*
|
|
821
|
-
*
|
|
822
|
-
*
|
|
837
|
+
* ```json
|
|
838
|
+
* {
|
|
839
|
+
* "type": "admin",
|
|
840
|
+
* "id": "507f1f77bcf86cd799439011",
|
|
841
|
+
* "bodyMarkdown": "I'm happy to help! Here's what you need to do...",
|
|
842
|
+
* "messageType": "reply"
|
|
843
|
+
* }
|
|
823
844
|
* ```
|
|
824
|
-
*/
|
|
825
|
-
attachTag(id, params, options) {
|
|
826
|
-
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
827
|
-
return this._client.post(path `/v2/conversations/${id}/tags`, {
|
|
828
|
-
body,
|
|
829
|
-
...options,
|
|
830
|
-
headers: buildHeaders([
|
|
831
|
-
{
|
|
832
|
-
...(featurebaseVersion?.toString() != null ?
|
|
833
|
-
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
834
|
-
: undefined),
|
|
835
|
-
},
|
|
836
|
-
options?.headers,
|
|
837
|
-
]),
|
|
838
|
-
});
|
|
839
|
-
}
|
|
840
|
-
/**
|
|
841
|
-
* Removes a workspace tag from a conversation.
|
|
842
|
-
*
|
|
843
|
-
* This endpoint requires the `actingAdminId` of the admin on whose behalf the
|
|
844
|
-
* mutation is recorded.
|
|
845
845
|
*
|
|
846
|
-
* ###
|
|
847
|
-
*
|
|
848
|
-
* - `id` - The conversation ID (short ID)
|
|
849
|
-
* - `tagId` - The Featurebase tag ID to remove
|
|
850
|
-
*
|
|
851
|
-
* ### Request Body
|
|
852
|
-
*
|
|
853
|
-
* | Field | Type | Required | Description |
|
|
854
|
-
* | --------------- | ------ | -------- | ------------------------------------------------------------------------ |
|
|
855
|
-
* | `actingAdminId` | string | Yes | The admin performing the mutation. Must be a member of the organization. |
|
|
856
|
-
*
|
|
857
|
-
* ### Behavior
|
|
858
|
-
*
|
|
859
|
-
* Featurebase resolves the latest taggable reply/message in the conversation and
|
|
860
|
-
* records the tag removal against that part so audit metadata remains
|
|
861
|
-
* deterministic.
|
|
862
|
-
*
|
|
863
|
-
* ### Response
|
|
846
|
+
* ### Example Admin Note (Internal)
|
|
864
847
|
*
|
|
865
|
-
*
|
|
866
|
-
*
|
|
848
|
+
* ```json
|
|
849
|
+
* {
|
|
850
|
+
* "type": "admin",
|
|
851
|
+
* "id": "507f1f77bcf86cd799439011",
|
|
852
|
+
* "bodyMarkdown": "Customer seems frustrated, escalating to tier 2.",
|
|
853
|
+
* "messageType": "note"
|
|
854
|
+
* }
|
|
855
|
+
* ```
|
|
867
856
|
*
|
|
868
|
-
* ### Example
|
|
857
|
+
* ### Example Response
|
|
869
858
|
*
|
|
870
859
|
* ```json
|
|
871
860
|
* {
|
|
872
|
-
* "
|
|
861
|
+
* "object": "conversation_part",
|
|
862
|
+
* "id": "3",
|
|
863
|
+
* "partType": "user_msg",
|
|
864
|
+
* "bodyHtml": "<p>Thank you for your help!</p>",
|
|
865
|
+
* "bodyMarkdown": "Thank you for your help!",
|
|
866
|
+
* "author": {
|
|
867
|
+
* "type": "customer",
|
|
868
|
+
* "id": "676f0f6765bdaa7d7d760f88",
|
|
869
|
+
* "name": "John Doe",
|
|
870
|
+
* "email": "john@example.com"
|
|
871
|
+
* },
|
|
872
|
+
* "channel": "desktop",
|
|
873
|
+
* "createdAt": "2025-01-15T10:40:00.000Z",
|
|
874
|
+
* "updatedAt": "2025-01-15T10:40:00.000Z"
|
|
873
875
|
* }
|
|
874
876
|
* ```
|
|
875
877
|
*
|
|
@@ -879,19 +881,17 @@ export class Conversations extends APIResource {
|
|
|
879
881
|
*
|
|
880
882
|
* @example
|
|
881
883
|
* ```ts
|
|
882
|
-
* const
|
|
883
|
-
* await client.support.conversations.
|
|
884
|
-
* '
|
|
885
|
-
*
|
|
886
|
-
*
|
|
887
|
-
*
|
|
888
|
-
* },
|
|
889
|
-
* );
|
|
884
|
+
* const conversationPart =
|
|
885
|
+
* await client.support.conversations.reply('12345', {
|
|
886
|
+
* bodyMarkdown: 'Thank you for your help!',
|
|
887
|
+
* messageType: 'reply',
|
|
888
|
+
* type: 'contact',
|
|
889
|
+
* });
|
|
890
890
|
* ```
|
|
891
891
|
*/
|
|
892
|
-
|
|
893
|
-
const {
|
|
894
|
-
return this._client.
|
|
892
|
+
reply(id, params, options) {
|
|
893
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
894
|
+
return this._client.post(path `/v2/conversations/${id}/reply`, {
|
|
895
895
|
body,
|
|
896
896
|
...options,
|
|
897
897
|
headers: buildHeaders([
|
|
@@ -1004,6 +1004,16 @@ export class Conversations extends APIResource {
|
|
|
1004
1004
|
* fields (`state`, `priority`) are exempt because their negation is naturally
|
|
1005
1005
|
* bounded.
|
|
1006
1006
|
*
|
|
1007
|
+
* ### Inbox visibility
|
|
1008
|
+
*
|
|
1009
|
+
* An open-state filter uses the same visibility rule as the Featurebase dashboard
|
|
1010
|
+
* inbox. Workflow and outbound-message shells are excluded until a customer or
|
|
1011
|
+
* lead interacts with them. As a result, `state = "open"` (or an `IN`/`NIN` filter
|
|
1012
|
+
* that resolves exclusively to open) returns the conversations shown in the
|
|
1013
|
+
* dashboard's open inbox rather than unreplied campaign or automation shells.
|
|
1014
|
+
* Searches without an open-only state filter keep their existing organization-wide
|
|
1015
|
+
* semantics.
|
|
1016
|
+
*
|
|
1007
1017
|
* ### Pagination
|
|
1008
1018
|
*
|
|
1009
1019
|
* Cursor-based, `limit` between 1 and 100 (default 10). Pagination cursors are
|