featurebase-node 0.14.2 → 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 +16 -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 +6 -6
- package/resources/feedback/feedback.d.mts.map +1 -1
- package/resources/feedback/feedback.d.ts +6 -6
- package/resources/feedback/feedback.d.ts.map +1 -1
- package/resources/feedback/feedback.js.map +1 -1
- package/resources/feedback/feedback.mjs.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/index.js.map +1 -1
- package/resources/feedback/index.mjs.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/index.js.map +1 -1
- package/resources/feedback/posts/index.mjs.map +1 -1
- package/resources/feedback/posts/posts.d.mts +169 -102
- package/resources/feedback/posts/posts.d.mts.map +1 -1
- package/resources/feedback/posts/posts.d.ts +169 -102
- package/resources/feedback/posts/posts.d.ts.map +1 -1
- package/resources/feedback/posts/posts.js +144 -75
- package/resources/feedback/posts/posts.js.map +1 -1
- package/resources/feedback/posts/posts.mjs +144 -75
- 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 +347 -180
- package/resources/reports.d.mts.map +1 -1
- package/resources/reports.d.ts +347 -180
- package/resources/reports.d.ts.map +1 -1
- package/resources/reports.js +124 -99
- package/resources/reports.js.map +1 -1
- package/resources/reports.mjs +124 -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 +402 -351
- package/resources/support/conversations/conversations.d.mts.map +1 -1
- package/resources/support/conversations/conversations.d.ts +402 -351
- package/resources/support/conversations/conversations.d.ts.map +1 -1
- package/resources/support/conversations/conversations.js +340 -295
- package/resources/support/conversations/conversations.js.map +1 -1
- package/resources/support/conversations/conversations.mjs +340 -295
- 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 +9 -5
- package/src/resources/feedback/index.ts +7 -5
- package/src/resources/feedback/post-statuses.ts +33 -33
- package/src/resources/feedback/posts/index.ts +3 -1
- package/src/resources/feedback/posts/posts.ts +232 -128
- 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 +454 -232
- package/src/resources/support/conversation-tags.ts +62 -62
- package/src/resources/support/conversations/conversations.ts +489 -438
- 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
|
@@ -17,91 +17,6 @@ class Conversations extends resource_1.APIResource {
|
|
|
17
17
|
super(...arguments);
|
|
18
18
|
this.participants = new ParticipantsAPI.Participants(this._client);
|
|
19
19
|
}
|
|
20
|
-
/**
|
|
21
|
-
* Returns a list of conversations in your organization using cursor-based
|
|
22
|
-
* pagination.
|
|
23
|
-
*
|
|
24
|
-
* ### Query Parameters
|
|
25
|
-
*
|
|
26
|
-
* - `limit` - Number of conversations to return (1-100, default 10)
|
|
27
|
-
* - `cursor` - Cursor from previous response for pagination
|
|
28
|
-
* - `tagIds` - Optional tag filter as a comma-separated list of tag IDs. Matches
|
|
29
|
-
* conversations that contain all of the provided tags.
|
|
30
|
-
*
|
|
31
|
-
* ### Response Format
|
|
32
|
-
*
|
|
33
|
-
* Returns a list object with:
|
|
34
|
-
*
|
|
35
|
-
* - `object` - Always "list"
|
|
36
|
-
* - `data` - Array of conversation objects
|
|
37
|
-
* - `nextCursor` - Cursor for the next page, or null if no more results
|
|
38
|
-
*
|
|
39
|
-
* ### Conversation Object
|
|
40
|
-
*
|
|
41
|
-
* Each conversation includes:
|
|
42
|
-
*
|
|
43
|
-
* - `id` - Unique conversation identifier (short ID)
|
|
44
|
-
* - `title` - Conversation title
|
|
45
|
-
* - `state` - Current state ("open", "closed", or "snoozed")
|
|
46
|
-
* - `priority` - Whether the conversation is marked as priority
|
|
47
|
-
* - `adminAssigneeId` - ID of assigned admin (if any)
|
|
48
|
-
* - `teamAssigneeId` - ID of assigned team (if any)
|
|
49
|
-
* - `tags` - Current tags applied anywhere in the conversation
|
|
50
|
-
* - `participants` - Array of participants
|
|
51
|
-
* - `source` - Information about the first message
|
|
52
|
-
* - `createdAt` - Creation timestamp
|
|
53
|
-
* - `updatedAt` - Last update timestamp
|
|
54
|
-
*
|
|
55
|
-
* ### Example
|
|
56
|
-
*
|
|
57
|
-
* ```json
|
|
58
|
-
* {
|
|
59
|
-
* "object": "list",
|
|
60
|
-
* "data": [
|
|
61
|
-
* {
|
|
62
|
-
* "object": "conversation",
|
|
63
|
-
* "id": "12345",
|
|
64
|
-
* "title": "Question about pricing",
|
|
65
|
-
* "state": "open",
|
|
66
|
-
* "priority": false,
|
|
67
|
-
* "adminAssigneeId": null,
|
|
68
|
-
* "participants": [
|
|
69
|
-
* { "type": "customer", "id": "676f0f6765bdaa7d7d760f88" }
|
|
70
|
-
* ],
|
|
71
|
-
* ...
|
|
72
|
-
* }
|
|
73
|
-
* ],
|
|
74
|
-
* "nextCursor": "eyJpZCI6IjEyMzQ1In0="
|
|
75
|
-
* }
|
|
76
|
-
* ```
|
|
77
|
-
*
|
|
78
|
-
* ### Version Availability
|
|
79
|
-
*
|
|
80
|
-
* This endpoint is only available in API version 2026-01-01.nova and newer.
|
|
81
|
-
*
|
|
82
|
-
* @example
|
|
83
|
-
* ```ts
|
|
84
|
-
* // Automatically fetches more pages as needed.
|
|
85
|
-
* for await (const conversation of client.support.conversations.list()) {
|
|
86
|
-
* // ...
|
|
87
|
-
* }
|
|
88
|
-
* ```
|
|
89
|
-
*/
|
|
90
|
-
list(params = {}, options) {
|
|
91
|
-
const { 'Featurebase-Version': featurebaseVersion, ...query } = params ?? {};
|
|
92
|
-
return this._client.getAPIList('/v2/conversations', (pagination_1.CursorPage), {
|
|
93
|
-
query,
|
|
94
|
-
...options,
|
|
95
|
-
headers: (0, headers_1.buildHeaders)([
|
|
96
|
-
{
|
|
97
|
-
...(featurebaseVersion?.toString() != null ?
|
|
98
|
-
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
99
|
-
: undefined),
|
|
100
|
-
},
|
|
101
|
-
options?.headers,
|
|
102
|
-
]),
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
20
|
/**
|
|
106
21
|
* Creates a new conversation. Supports both contact-initiated (customer/lead) and
|
|
107
22
|
* admin-initiated (outreach) conversations.
|
|
@@ -369,54 +284,6 @@ class Conversations extends resource_1.APIResource {
|
|
|
369
284
|
]),
|
|
370
285
|
});
|
|
371
286
|
}
|
|
372
|
-
/**
|
|
373
|
-
* Permanently deletes a conversation by its short ID.
|
|
374
|
-
*
|
|
375
|
-
* ### Path Parameters
|
|
376
|
-
*
|
|
377
|
-
* - `id` - The conversation short ID (numeric)
|
|
378
|
-
*
|
|
379
|
-
* ### Response
|
|
380
|
-
*
|
|
381
|
-
* Returns a deletion confirmation object:
|
|
382
|
-
*
|
|
383
|
-
* ```json
|
|
384
|
-
* {
|
|
385
|
-
* "id": "12345",
|
|
386
|
-
* "object": "conversation",
|
|
387
|
-
* "deleted": true
|
|
388
|
-
* }
|
|
389
|
-
* ```
|
|
390
|
-
*
|
|
391
|
-
* ### Caution
|
|
392
|
-
*
|
|
393
|
-
* This operation is **irreversible**. The conversation and all its messages will
|
|
394
|
-
* be permanently deleted.
|
|
395
|
-
*
|
|
396
|
-
* ### Version Availability
|
|
397
|
-
*
|
|
398
|
-
* This endpoint is only available in API version 2026-01-01.nova and newer.
|
|
399
|
-
*
|
|
400
|
-
* @example
|
|
401
|
-
* ```ts
|
|
402
|
-
* const conversation =
|
|
403
|
-
* await client.support.conversations.delete('12345');
|
|
404
|
-
* ```
|
|
405
|
-
*/
|
|
406
|
-
delete(id, params = {}, options) {
|
|
407
|
-
const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
|
|
408
|
-
return this._client.delete((0, path_1.path) `/v2/conversations/${id}`, {
|
|
409
|
-
...options,
|
|
410
|
-
headers: (0, headers_1.buildHeaders)([
|
|
411
|
-
{
|
|
412
|
-
...(featurebaseVersion?.toString() != null ?
|
|
413
|
-
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
414
|
-
: undefined),
|
|
415
|
-
},
|
|
416
|
-
options?.headers,
|
|
417
|
-
]),
|
|
418
|
-
});
|
|
419
|
-
}
|
|
420
287
|
/**
|
|
421
288
|
* Updates a conversation's properties. Supports partial updates - only provided
|
|
422
289
|
* fields will be updated.
|
|
@@ -560,97 +427,236 @@ class Conversations extends resource_1.APIResource {
|
|
|
560
427
|
});
|
|
561
428
|
}
|
|
562
429
|
/**
|
|
563
|
-
*
|
|
564
|
-
*
|
|
430
|
+
* Returns a list of conversations in your organization using cursor-based
|
|
431
|
+
* pagination.
|
|
565
432
|
*
|
|
566
|
-
* ###
|
|
433
|
+
* ### Query Parameters
|
|
567
434
|
*
|
|
568
|
-
* - `
|
|
435
|
+
* - `limit` - Number of conversations to return (1-100, default 10)
|
|
436
|
+
* - `cursor` - Cursor from previous response for pagination
|
|
437
|
+
* - `tagIds` - Optional tag filter as a comma-separated list of tag IDs. Matches
|
|
438
|
+
* conversations that contain all of the provided tags.
|
|
569
439
|
*
|
|
570
|
-
* ###
|
|
440
|
+
* ### Response Format
|
|
571
441
|
*
|
|
572
|
-
*
|
|
442
|
+
* Returns a list object with:
|
|
573
443
|
*
|
|
574
|
-
*
|
|
444
|
+
* - `object` - Always "list"
|
|
445
|
+
* - `data` - Array of conversation objects
|
|
446
|
+
* - `nextCursor` - Cursor for the next page, or null if no more results
|
|
575
447
|
*
|
|
576
|
-
*
|
|
577
|
-
* | ------------------- | ------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
578
|
-
* | `type` | string | Yes | Must be "contact" |
|
|
579
|
-
* | `userId` | string | No\* | External user ID from your system |
|
|
580
|
-
* | `id` | string | No\* | Featurebase contact ID (24-character ObjectId) |
|
|
581
|
-
* | `bodyMarkdown` | string | Yes | The message content in markdown format. Images referenced by URL or as base64 data URIs will be automatically uploaded and stored. |
|
|
582
|
-
* | `messageType` | string | Yes | Must be "reply" |
|
|
583
|
-
* | `skipNotifications` | boolean | No | Skip sending notifications (default: false). Useful for bulk imports. |
|
|
448
|
+
* ### Conversation Object
|
|
584
449
|
*
|
|
585
|
-
*
|
|
450
|
+
* Each conversation includes:
|
|
586
451
|
*
|
|
587
|
-
*
|
|
452
|
+
* - `id` - Unique conversation identifier (short ID)
|
|
453
|
+
* - `title` - Conversation title
|
|
454
|
+
* - `state` - Current state ("open", "closed", or "snoozed")
|
|
455
|
+
* - `priority` - Whether the conversation is marked as priority
|
|
456
|
+
* - `adminAssigneeId` - ID of assigned admin (if any)
|
|
457
|
+
* - `teamAssigneeId` - ID of assigned team (if any)
|
|
458
|
+
* - `tags` - Current tags applied anywhere in the conversation
|
|
459
|
+
* - `participants` - Array of participants
|
|
460
|
+
* - `source` - Information about the first message
|
|
461
|
+
* - `createdAt` - Creation timestamp
|
|
462
|
+
* - `updatedAt` - Last update timestamp
|
|
588
463
|
*
|
|
589
|
-
*
|
|
590
|
-
* | ------------------- | ------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
591
|
-
* | `type` | string | Yes | Must be "admin" |
|
|
592
|
-
* | `id` | string | Yes | Featurebase admin ID (24-character ObjectId) |
|
|
593
|
-
* | `bodyMarkdown` | string | Yes | The message content in markdown format. Images referenced by URL or as base64 data URIs will be automatically uploaded and stored. |
|
|
594
|
-
* | `messageType` | string | Yes | "reply" for customer-visible reply, "note" for internal note |
|
|
595
|
-
* | `skipNotifications` | boolean | No | Skip sending notifications (default: false). Useful for bulk imports. |
|
|
464
|
+
* ### Example
|
|
596
465
|
*
|
|
597
|
-
*
|
|
466
|
+
* ```json
|
|
467
|
+
* {
|
|
468
|
+
* "object": "list",
|
|
469
|
+
* "data": [
|
|
470
|
+
* {
|
|
471
|
+
* "object": "conversation",
|
|
472
|
+
* "id": "12345",
|
|
473
|
+
* "title": "Question about pricing",
|
|
474
|
+
* "state": "open",
|
|
475
|
+
* "priority": false,
|
|
476
|
+
* "adminAssigneeId": null,
|
|
477
|
+
* "participants": [
|
|
478
|
+
* { "type": "customer", "id": "676f0f6765bdaa7d7d760f88" }
|
|
479
|
+
* ],
|
|
480
|
+
* ...
|
|
481
|
+
* }
|
|
482
|
+
* ],
|
|
483
|
+
* "nextCursor": "eyJpZCI6IjEyMzQ1In0="
|
|
484
|
+
* }
|
|
485
|
+
* ```
|
|
598
486
|
*
|
|
599
|
-
*
|
|
600
|
-
* response includes both `bodyHtml` (with signed image URLs) and `bodyMarkdown`
|
|
601
|
-
* fields.
|
|
487
|
+
* ### Version Availability
|
|
602
488
|
*
|
|
603
|
-
*
|
|
489
|
+
* This endpoint is only available in API version 2026-01-01.nova and newer.
|
|
604
490
|
*
|
|
605
|
-
*
|
|
606
|
-
*
|
|
607
|
-
*
|
|
608
|
-
*
|
|
609
|
-
*
|
|
610
|
-
* "messageType": "reply"
|
|
491
|
+
* @example
|
|
492
|
+
* ```ts
|
|
493
|
+
* // Automatically fetches more pages as needed.
|
|
494
|
+
* for await (const conversation of client.support.conversations.list()) {
|
|
495
|
+
* // ...
|
|
611
496
|
* }
|
|
612
497
|
* ```
|
|
498
|
+
*/
|
|
499
|
+
list(params = {}, options) {
|
|
500
|
+
const { 'Featurebase-Version': featurebaseVersion, ...query } = params ?? {};
|
|
501
|
+
return this._client.getAPIList('/v2/conversations', (pagination_1.CursorPage), {
|
|
502
|
+
query,
|
|
503
|
+
...options,
|
|
504
|
+
headers: (0, headers_1.buildHeaders)([
|
|
505
|
+
{
|
|
506
|
+
...(featurebaseVersion?.toString() != null ?
|
|
507
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
508
|
+
: undefined),
|
|
509
|
+
},
|
|
510
|
+
options?.headers,
|
|
511
|
+
]),
|
|
512
|
+
});
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* Permanently deletes a conversation by its short ID.
|
|
613
516
|
*
|
|
614
|
-
* ###
|
|
517
|
+
* ### Path Parameters
|
|
518
|
+
*
|
|
519
|
+
* - `id` - The conversation short ID (numeric)
|
|
520
|
+
*
|
|
521
|
+
* ### Response
|
|
522
|
+
*
|
|
523
|
+
* Returns a deletion confirmation object:
|
|
615
524
|
*
|
|
616
525
|
* ```json
|
|
617
526
|
* {
|
|
618
|
-
* "
|
|
619
|
-
* "
|
|
620
|
-
* "
|
|
621
|
-
* "messageType": "reply"
|
|
527
|
+
* "id": "12345",
|
|
528
|
+
* "object": "conversation",
|
|
529
|
+
* "deleted": true
|
|
622
530
|
* }
|
|
623
531
|
* ```
|
|
624
532
|
*
|
|
625
|
-
* ###
|
|
533
|
+
* ### Caution
|
|
534
|
+
*
|
|
535
|
+
* This operation is **irreversible**. The conversation and all its messages will
|
|
536
|
+
* be permanently deleted.
|
|
537
|
+
*
|
|
538
|
+
* ### Version Availability
|
|
539
|
+
*
|
|
540
|
+
* This endpoint is only available in API version 2026-01-01.nova and newer.
|
|
541
|
+
*
|
|
542
|
+
* @example
|
|
543
|
+
* ```ts
|
|
544
|
+
* const conversation =
|
|
545
|
+
* await client.support.conversations.delete('12345');
|
|
546
|
+
* ```
|
|
547
|
+
*/
|
|
548
|
+
delete(id, params = {}, options) {
|
|
549
|
+
const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
|
|
550
|
+
return this._client.delete((0, path_1.path) `/v2/conversations/${id}`, {
|
|
551
|
+
...options,
|
|
552
|
+
headers: (0, headers_1.buildHeaders)([
|
|
553
|
+
{
|
|
554
|
+
...(featurebaseVersion?.toString() != null ?
|
|
555
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
556
|
+
: undefined),
|
|
557
|
+
},
|
|
558
|
+
options?.headers,
|
|
559
|
+
]),
|
|
560
|
+
});
|
|
561
|
+
}
|
|
562
|
+
/**
|
|
563
|
+
* Attaches a workspace tag to a conversation.
|
|
564
|
+
*
|
|
565
|
+
* This endpoint requires both the tag ID to attach and the `actingAdminId` of the
|
|
566
|
+
* admin on whose behalf the mutation is recorded.
|
|
567
|
+
*
|
|
568
|
+
* ### Path Parameters
|
|
569
|
+
*
|
|
570
|
+
* - `id` - The conversation ID (short ID)
|
|
571
|
+
*
|
|
572
|
+
* ### Request Body
|
|
573
|
+
*
|
|
574
|
+
* | Field | Type | Required | Description |
|
|
575
|
+
* | --------------- | ------ | -------- | ------------------------------------------------------------------------ |
|
|
576
|
+
* | `tagId` | string | Yes | The Featurebase tag ID to attach |
|
|
577
|
+
* | `actingAdminId` | string | Yes | The admin performing the mutation. Must be a member of the organization. |
|
|
578
|
+
*
|
|
579
|
+
* ### Behavior
|
|
580
|
+
*
|
|
581
|
+
* Featurebase resolves the latest taggable reply/message in the conversation and
|
|
582
|
+
* records the tag attachment against that part so audit metadata remains
|
|
583
|
+
* deterministic.
|
|
584
|
+
*
|
|
585
|
+
* ### Response
|
|
586
|
+
*
|
|
587
|
+
* Returns the affected tag plus attachment metadata such as `targetPartId`,
|
|
588
|
+
* `appliedAt`, and `appliedBy`.
|
|
589
|
+
*
|
|
590
|
+
* ### Example Request
|
|
626
591
|
*
|
|
627
592
|
* ```json
|
|
628
593
|
* {
|
|
629
|
-
* "
|
|
630
|
-
* "
|
|
631
|
-
* "bodyMarkdown": "Customer seems frustrated, escalating to tier 2.",
|
|
632
|
-
* "messageType": "note"
|
|
594
|
+
* "tagId": "67ec1234abcd5678ef901234",
|
|
595
|
+
* "actingAdminId": "507f1f77bcf86cd799439011"
|
|
633
596
|
* }
|
|
634
597
|
* ```
|
|
635
598
|
*
|
|
636
|
-
* ###
|
|
599
|
+
* ### Version Availability
|
|
600
|
+
*
|
|
601
|
+
* This endpoint is only available in API version 2026-01-01.nova and newer.
|
|
602
|
+
*
|
|
603
|
+
* @example
|
|
604
|
+
* ```ts
|
|
605
|
+
* const attachedConversationTag =
|
|
606
|
+
* await client.support.conversations.attachTag('12345', {
|
|
607
|
+
* actingAdminId: '507f1f77bcf86cd799439011',
|
|
608
|
+
* tagId: '67ec1234abcd5678ef901234',
|
|
609
|
+
* });
|
|
610
|
+
* ```
|
|
611
|
+
*/
|
|
612
|
+
attachTag(id, params, options) {
|
|
613
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
614
|
+
return this._client.post((0, path_1.path) `/v2/conversations/${id}/tags`, {
|
|
615
|
+
body,
|
|
616
|
+
...options,
|
|
617
|
+
headers: (0, headers_1.buildHeaders)([
|
|
618
|
+
{
|
|
619
|
+
...(featurebaseVersion?.toString() != null ?
|
|
620
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
621
|
+
: undefined),
|
|
622
|
+
},
|
|
623
|
+
options?.headers,
|
|
624
|
+
]),
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
/**
|
|
628
|
+
* Removes a workspace tag from a conversation.
|
|
629
|
+
*
|
|
630
|
+
* This endpoint requires the `actingAdminId` of the admin on whose behalf the
|
|
631
|
+
* mutation is recorded.
|
|
632
|
+
*
|
|
633
|
+
* ### Path Parameters
|
|
634
|
+
*
|
|
635
|
+
* - `id` - The conversation ID (short ID)
|
|
636
|
+
* - `tagId` - The Featurebase tag ID to remove
|
|
637
|
+
*
|
|
638
|
+
* ### Request Body
|
|
639
|
+
*
|
|
640
|
+
* | Field | Type | Required | Description |
|
|
641
|
+
* | --------------- | ------ | -------- | ------------------------------------------------------------------------ |
|
|
642
|
+
* | `actingAdminId` | string | Yes | The admin performing the mutation. Must be a member of the organization. |
|
|
643
|
+
*
|
|
644
|
+
* ### Behavior
|
|
645
|
+
*
|
|
646
|
+
* Featurebase resolves the latest taggable reply/message in the conversation and
|
|
647
|
+
* records the tag removal against that part so audit metadata remains
|
|
648
|
+
* deterministic.
|
|
649
|
+
*
|
|
650
|
+
* ### Response
|
|
651
|
+
*
|
|
652
|
+
* Returns the affected tag payload with the most relevant attachment metadata
|
|
653
|
+
* available for that relationship.
|
|
654
|
+
*
|
|
655
|
+
* ### Example Request
|
|
637
656
|
*
|
|
638
657
|
* ```json
|
|
639
658
|
* {
|
|
640
|
-
* "
|
|
641
|
-
* "id": "3",
|
|
642
|
-
* "partType": "user_msg",
|
|
643
|
-
* "bodyHtml": "<p>Thank you for your help!</p>",
|
|
644
|
-
* "bodyMarkdown": "Thank you for your help!",
|
|
645
|
-
* "author": {
|
|
646
|
-
* "type": "customer",
|
|
647
|
-
* "id": "676f0f6765bdaa7d7d760f88",
|
|
648
|
-
* "name": "John Doe",
|
|
649
|
-
* "email": "john@example.com"
|
|
650
|
-
* },
|
|
651
|
-
* "channel": "desktop",
|
|
652
|
-
* "createdAt": "2025-01-15T10:40:00.000Z",
|
|
653
|
-
* "updatedAt": "2025-01-15T10:40:00.000Z"
|
|
659
|
+
* "actingAdminId": "507f1f77bcf86cd799439011"
|
|
654
660
|
* }
|
|
655
661
|
* ```
|
|
656
662
|
*
|
|
@@ -660,17 +666,19 @@ class Conversations extends resource_1.APIResource {
|
|
|
660
666
|
*
|
|
661
667
|
* @example
|
|
662
668
|
* ```ts
|
|
663
|
-
* const
|
|
664
|
-
* await client.support.conversations.
|
|
665
|
-
*
|
|
666
|
-
*
|
|
667
|
-
*
|
|
668
|
-
*
|
|
669
|
+
* const attachedConversationTag =
|
|
670
|
+
* await client.support.conversations.detachTag(
|
|
671
|
+
* '67ec1234abcd5678ef901234',
|
|
672
|
+
* {
|
|
673
|
+
* id: '12345',
|
|
674
|
+
* actingAdminId: '507f1f77bcf86cd799439011',
|
|
675
|
+
* },
|
|
676
|
+
* );
|
|
669
677
|
* ```
|
|
670
678
|
*/
|
|
671
|
-
|
|
672
|
-
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
673
|
-
return this._client.
|
|
679
|
+
detachTag(tagID, params, options) {
|
|
680
|
+
const { id, 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
681
|
+
return this._client.delete((0, path_1.path) `/v2/conversations/${id}/tags/${tagID}`, {
|
|
674
682
|
body,
|
|
675
683
|
...options,
|
|
676
684
|
headers: (0, headers_1.buildHeaders)([
|
|
@@ -777,10 +785,8 @@ class Conversations extends resource_1.APIResource {
|
|
|
777
785
|
});
|
|
778
786
|
}
|
|
779
787
|
/**
|
|
780
|
-
*
|
|
781
|
-
*
|
|
782
|
-
* This endpoint requires both the tag ID to attach and the `actingAdminId` of the
|
|
783
|
-
* admin on whose behalf the mutation is recorded.
|
|
788
|
+
* Adds a reply to an existing conversation. Supports both contact (customer/lead)
|
|
789
|
+
* and admin replies.
|
|
784
790
|
*
|
|
785
791
|
* ### Path Parameters
|
|
786
792
|
*
|
|
@@ -788,92 +794,88 @@ class Conversations extends resource_1.APIResource {
|
|
|
788
794
|
*
|
|
789
795
|
* ### Request Body
|
|
790
796
|
*
|
|
791
|
-
*
|
|
792
|
-
* | --------------- | ------ | -------- | ------------------------------------------------------------------------ |
|
|
793
|
-
* | `tagId` | string | Yes | The Featurebase tag ID to attach |
|
|
794
|
-
* | `actingAdminId` | string | Yes | The admin performing the mutation. Must be a member of the organization. |
|
|
797
|
+
* The request body varies based on who is sending the reply:
|
|
795
798
|
*
|
|
796
|
-
*
|
|
799
|
+
* #### Contact Reply (customer/lead)
|
|
797
800
|
*
|
|
798
|
-
*
|
|
799
|
-
*
|
|
800
|
-
*
|
|
801
|
+
* | Field | Type | Required | Description |
|
|
802
|
+
* | ------------------- | ------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
803
|
+
* | `type` | string | Yes | Must be "contact" |
|
|
804
|
+
* | `userId` | string | No\* | External user ID from your system |
|
|
805
|
+
* | `id` | string | No\* | Featurebase contact ID (24-character ObjectId) |
|
|
806
|
+
* | `bodyMarkdown` | string | Yes | The message content in markdown format. Images referenced by URL or as base64 data URIs will be automatically uploaded and stored. |
|
|
807
|
+
* | `messageType` | string | Yes | Must be "reply" |
|
|
808
|
+
* | `skipNotifications` | boolean | No | Skip sending notifications (default: false). Useful for bulk imports. |
|
|
809
|
+
*
|
|
810
|
+
* \*At least one of `userId` or `id` is required.
|
|
811
|
+
*
|
|
812
|
+
* #### Admin Reply
|
|
813
|
+
*
|
|
814
|
+
* | Field | Type | Required | Description |
|
|
815
|
+
* | ------------------- | ------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
816
|
+
* | `type` | string | Yes | Must be "admin" |
|
|
817
|
+
* | `id` | string | Yes | Featurebase admin ID (24-character ObjectId) |
|
|
818
|
+
* | `bodyMarkdown` | string | Yes | The message content in markdown format. Images referenced by URL or as base64 data URIs will be automatically uploaded and stored. |
|
|
819
|
+
* | `messageType` | string | Yes | "reply" for customer-visible reply, "note" for internal note |
|
|
820
|
+
* | `skipNotifications` | boolean | No | Skip sending notifications (default: false). Useful for bulk imports. |
|
|
801
821
|
*
|
|
802
822
|
* ### Response
|
|
803
823
|
*
|
|
804
|
-
* Returns the
|
|
805
|
-
* `
|
|
824
|
+
* Returns the created conversation part object with a **201 Created** status. The
|
|
825
|
+
* response includes both `bodyHtml` (with signed image URLs) and `bodyMarkdown`
|
|
826
|
+
* fields.
|
|
806
827
|
*
|
|
807
|
-
* ### Example
|
|
828
|
+
* ### Example Contact Reply
|
|
808
829
|
*
|
|
809
830
|
* ```json
|
|
810
831
|
* {
|
|
811
|
-
* "
|
|
812
|
-
* "
|
|
832
|
+
* "type": "contact",
|
|
833
|
+
* "userId": "user_123",
|
|
834
|
+
* "bodyMarkdown": "Thank you for your help!",
|
|
835
|
+
* "messageType": "reply"
|
|
813
836
|
* }
|
|
814
837
|
* ```
|
|
815
838
|
*
|
|
816
|
-
* ###
|
|
817
|
-
*
|
|
818
|
-
* This endpoint is only available in API version 2026-01-01.nova and newer.
|
|
839
|
+
* ### Example Admin Reply
|
|
819
840
|
*
|
|
820
|
-
*
|
|
821
|
-
*
|
|
822
|
-
*
|
|
823
|
-
*
|
|
824
|
-
*
|
|
825
|
-
*
|
|
826
|
-
*
|
|
841
|
+
* ```json
|
|
842
|
+
* {
|
|
843
|
+
* "type": "admin",
|
|
844
|
+
* "id": "507f1f77bcf86cd799439011",
|
|
845
|
+
* "bodyMarkdown": "I'm happy to help! Here's what you need to do...",
|
|
846
|
+
* "messageType": "reply"
|
|
847
|
+
* }
|
|
827
848
|
* ```
|
|
828
|
-
*/
|
|
829
|
-
attachTag(id, params, options) {
|
|
830
|
-
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
831
|
-
return this._client.post((0, path_1.path) `/v2/conversations/${id}/tags`, {
|
|
832
|
-
body,
|
|
833
|
-
...options,
|
|
834
|
-
headers: (0, headers_1.buildHeaders)([
|
|
835
|
-
{
|
|
836
|
-
...(featurebaseVersion?.toString() != null ?
|
|
837
|
-
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
838
|
-
: undefined),
|
|
839
|
-
},
|
|
840
|
-
options?.headers,
|
|
841
|
-
]),
|
|
842
|
-
});
|
|
843
|
-
}
|
|
844
|
-
/**
|
|
845
|
-
* Removes a workspace tag from a conversation.
|
|
846
|
-
*
|
|
847
|
-
* This endpoint requires the `actingAdminId` of the admin on whose behalf the
|
|
848
|
-
* mutation is recorded.
|
|
849
|
-
*
|
|
850
|
-
* ### Path Parameters
|
|
851
|
-
*
|
|
852
|
-
* - `id` - The conversation ID (short ID)
|
|
853
|
-
* - `tagId` - The Featurebase tag ID to remove
|
|
854
|
-
*
|
|
855
|
-
* ### Request Body
|
|
856
|
-
*
|
|
857
|
-
* | Field | Type | Required | Description |
|
|
858
|
-
* | --------------- | ------ | -------- | ------------------------------------------------------------------------ |
|
|
859
|
-
* | `actingAdminId` | string | Yes | The admin performing the mutation. Must be a member of the organization. |
|
|
860
|
-
*
|
|
861
|
-
* ### Behavior
|
|
862
|
-
*
|
|
863
|
-
* Featurebase resolves the latest taggable reply/message in the conversation and
|
|
864
|
-
* records the tag removal against that part so audit metadata remains
|
|
865
|
-
* deterministic.
|
|
866
849
|
*
|
|
867
|
-
* ###
|
|
850
|
+
* ### Example Admin Note (Internal)
|
|
868
851
|
*
|
|
869
|
-
*
|
|
870
|
-
*
|
|
852
|
+
* ```json
|
|
853
|
+
* {
|
|
854
|
+
* "type": "admin",
|
|
855
|
+
* "id": "507f1f77bcf86cd799439011",
|
|
856
|
+
* "bodyMarkdown": "Customer seems frustrated, escalating to tier 2.",
|
|
857
|
+
* "messageType": "note"
|
|
858
|
+
* }
|
|
859
|
+
* ```
|
|
871
860
|
*
|
|
872
|
-
* ### Example
|
|
861
|
+
* ### Example Response
|
|
873
862
|
*
|
|
874
863
|
* ```json
|
|
875
864
|
* {
|
|
876
|
-
* "
|
|
865
|
+
* "object": "conversation_part",
|
|
866
|
+
* "id": "3",
|
|
867
|
+
* "partType": "user_msg",
|
|
868
|
+
* "bodyHtml": "<p>Thank you for your help!</p>",
|
|
869
|
+
* "bodyMarkdown": "Thank you for your help!",
|
|
870
|
+
* "author": {
|
|
871
|
+
* "type": "customer",
|
|
872
|
+
* "id": "676f0f6765bdaa7d7d760f88",
|
|
873
|
+
* "name": "John Doe",
|
|
874
|
+
* "email": "john@example.com"
|
|
875
|
+
* },
|
|
876
|
+
* "channel": "desktop",
|
|
877
|
+
* "createdAt": "2025-01-15T10:40:00.000Z",
|
|
878
|
+
* "updatedAt": "2025-01-15T10:40:00.000Z"
|
|
877
879
|
* }
|
|
878
880
|
* ```
|
|
879
881
|
*
|
|
@@ -883,19 +885,17 @@ class Conversations extends resource_1.APIResource {
|
|
|
883
885
|
*
|
|
884
886
|
* @example
|
|
885
887
|
* ```ts
|
|
886
|
-
* const
|
|
887
|
-
* await client.support.conversations.
|
|
888
|
-
* '
|
|
889
|
-
*
|
|
890
|
-
*
|
|
891
|
-
*
|
|
892
|
-
* },
|
|
893
|
-
* );
|
|
888
|
+
* const conversationPart =
|
|
889
|
+
* await client.support.conversations.reply('12345', {
|
|
890
|
+
* bodyMarkdown: 'Thank you for your help!',
|
|
891
|
+
* messageType: 'reply',
|
|
892
|
+
* type: 'contact',
|
|
893
|
+
* });
|
|
894
894
|
* ```
|
|
895
895
|
*/
|
|
896
|
-
|
|
897
|
-
const {
|
|
898
|
-
return this._client.
|
|
896
|
+
reply(id, params, options) {
|
|
897
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
898
|
+
return this._client.post((0, path_1.path) `/v2/conversations/${id}/reply`, {
|
|
899
899
|
body,
|
|
900
900
|
...options,
|
|
901
901
|
headers: (0, headers_1.buildHeaders)([
|
|
@@ -954,18 +954,53 @@ class Conversations extends resource_1.APIResource {
|
|
|
954
954
|
* `participant_id`, `company_id`, `created_at`) are still accepted for back-compat
|
|
955
955
|
* but are deprecated — please migrate to camelCase in new code.
|
|
956
956
|
*
|
|
957
|
-
* | Field
|
|
958
|
-
* |
|
|
959
|
-
* | `state`
|
|
960
|
-
* | `priority`
|
|
961
|
-
* | `adminAssigneeId`
|
|
962
|
-
* | `teamAssigneeId`
|
|
963
|
-
* | `brandId`
|
|
964
|
-
* | `tagIds`
|
|
965
|
-
* | `userId` / `participantId`
|
|
966
|
-
* | `companyId`
|
|
967
|
-
* | `mentionedAdminIds`
|
|
968
|
-
* | `createdAt`
|
|
957
|
+
* | Field | Type | Operators |
|
|
958
|
+
* | -------------------------------- | --------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
|
959
|
+
* | `state` | enum (`open` / `closed` / `snoozed`) | `=`, `!=`, `IN`, `NIN` |
|
|
960
|
+
* | `priority` | boolean | `=`, `!=` |
|
|
961
|
+
* | `adminAssigneeId` | id or null (unassigned) | `=`, `!=`, `IN`, `NIN` |
|
|
962
|
+
* | `teamAssigneeId` | id or null (unassigned) | `=`, `!=`, `IN`, `NIN` |
|
|
963
|
+
* | `brandId` | id or null | `=`, `!=`, `IN`, `NIN` |
|
|
964
|
+
* | `tagIds` | id (matches any conversation containing this tag) | `=`, `!=`, `IN`, `NIN` |
|
|
965
|
+
* | `userId` / `participantId` | id of a conversation participant | `=`, `!=`, `IN`, `NIN` |
|
|
966
|
+
* | `companyId` | company id (matches conversations whose participants belong to the company) | `=`, `!=`, `IN`, `NIN` |
|
|
967
|
+
* | `mentionedAdminIds` | admin id | `=`, `!=`, `IN`, `NIN` |
|
|
968
|
+
* | `createdAt` | unix seconds | `=`, `>`, `<` |
|
|
969
|
+
* | `customAttributes.<attributeId>` | conversation custom attribute (see below) | `=`, `!=`, `IN`, `NIN`; plus `>`, `<`, `>=`, `<=` for `number` / `date` |
|
|
970
|
+
*
|
|
971
|
+
* ### Filtering by custom attributes
|
|
972
|
+
*
|
|
973
|
+
* Any non-archived conversation custom attribute can be used as a filter field via
|
|
974
|
+
* `customAttributes.<attributeId>`, where `<attributeId>` is the attribute's `id`
|
|
975
|
+
* from `GET /v2/conversation_attributes`. The accepted value shape follows the
|
|
976
|
+
* attribute's `fieldSubType`:
|
|
977
|
+
*
|
|
978
|
+
* - `select` / `multi-select` — pass an option **label** (e.g.
|
|
979
|
+
* `"Product question"`) or an option **id**; both are matched interchangeably,
|
|
980
|
+
* and id-based filters keep working after options are renamed
|
|
981
|
+
* - `text` — string
|
|
982
|
+
* - `number` — number; range operators (`>`, `<`, `>=`, `<=`) are supported
|
|
983
|
+
* - `date` — ISO 8601 string or unix seconds; range operators are supported
|
|
984
|
+
* - `checkbox` — boolean
|
|
985
|
+
*
|
|
986
|
+
* Example — all conversations where the "Issue type" select attribute is "Product
|
|
987
|
+
* question":
|
|
988
|
+
*
|
|
989
|
+
* ```json
|
|
990
|
+
* {
|
|
991
|
+
* "query": {
|
|
992
|
+
* "field": "customAttributes.6863d3fca1234b0d5e15c86c",
|
|
993
|
+
* "operator": "=",
|
|
994
|
+
* "value": "Product question"
|
|
995
|
+
* },
|
|
996
|
+
* "include": ["customAttributeDefinitions"]
|
|
997
|
+
* }
|
|
998
|
+
* ```
|
|
999
|
+
*
|
|
1000
|
+
* Referencing an attribute id that does not exist (or has been archived) returns a
|
|
1001
|
+
* `field_unknown` error. Set `include` to `["customAttributeDefinitions"]` to get
|
|
1002
|
+
* each returned conversation's attribute values resolved with names and types
|
|
1003
|
+
* alongside the ID-keyed `customAttributes` map.
|
|
969
1004
|
*
|
|
970
1005
|
* For unbounded fields a query consisting only of `!=` or `NIN` clauses is
|
|
971
1006
|
* rejected with `query_too_broad` to prevent full-org scans. Combine the negation
|
|
@@ -973,6 +1008,16 @@ class Conversations extends resource_1.APIResource {
|
|
|
973
1008
|
* fields (`state`, `priority`) are exempt because their negation is naturally
|
|
974
1009
|
* bounded.
|
|
975
1010
|
*
|
|
1011
|
+
* ### Inbox visibility
|
|
1012
|
+
*
|
|
1013
|
+
* An open-state filter uses the same visibility rule as the Featurebase dashboard
|
|
1014
|
+
* inbox. Workflow and outbound-message shells are excluded until a customer or
|
|
1015
|
+
* lead interacts with them. As a result, `state = "open"` (or an `IN`/`NIN` filter
|
|
1016
|
+
* that resolves exclusively to open) returns the conversations shown in the
|
|
1017
|
+
* dashboard's open inbox rather than unreplied campaign or automation shells.
|
|
1018
|
+
* Searches without an open-only state filter keep their existing organization-wide
|
|
1019
|
+
* semantics.
|
|
1020
|
+
*
|
|
976
1021
|
* ### Pagination
|
|
977
1022
|
*
|
|
978
1023
|
* Cursor-based, `limit` between 1 and 100 (default 10). Pagination cursors are
|