featurebase-node 0.12.0 → 0.14.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 +37 -0
- package/api-promise.d.mts +1 -0
- package/api-promise.d.mts.map +1 -1
- package/api-promise.d.ts +1 -0
- package/api-promise.d.ts.map +1 -1
- package/api-promise.mjs +1 -0
- package/api-promise.mjs.map +1 -1
- package/client.d.mts +9 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +9 -3
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.mjs.map +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/uploads.d.mts.map +1 -1
- package/core/uploads.d.ts.map +1 -1
- package/core/uploads.mjs.map +1 -1
- package/error.d.mts +1 -0
- package/error.d.mts.map +1 -1
- package/error.d.ts +1 -0
- package/error.d.ts.map +1 -1
- package/error.mjs +1 -0
- package/error.mjs.map +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.mjs.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/qs/formats.d.mts.map +1 -1
- package/internal/qs/formats.d.ts.map +1 -1
- package/internal/qs/index.d.mts +2 -2
- package/internal/qs/index.d.mts.map +1 -1
- package/internal/qs/index.d.ts +2 -2
- package/internal/qs/index.d.ts.map +1 -1
- package/internal/qs/index.mjs.map +1 -1
- package/internal/qs/stringify.d.mts.map +1 -1
- package/internal/qs/stringify.d.ts.map +1 -1
- package/internal/qs/stringify.mjs.map +1 -1
- package/internal/qs/utils.d.mts.map +1 -1
- package/internal/qs/utils.d.ts.map +1 -1
- package/internal/qs/utils.mjs.map +1 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.d.mts +6 -0
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +6 -0
- package/internal/shims.d.ts.map +1 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/internal/types.d.mts +4 -4
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +4 -4
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +2 -0
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +2 -0
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.mjs.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts.map +1 -1
- package/internal/utils.d.ts.map +1 -1
- package/internal/utils.mjs.map +1 -1
- package/package.json +16 -10
- package/pagination.d.mts +1 -0
- package/pagination.d.mts.map +1 -1
- package/pagination.d.ts +1 -0
- package/pagination.d.ts.map +1 -1
- package/pagination.mjs +1 -0
- package/pagination.mjs.map +1 -1
- package/resource.d.mts +1 -0
- package/resource.d.mts.map +1 -1
- package/resource.d.ts +1 -0
- package/resource.d.ts.map +1 -1
- package/resource.mjs +1 -0
- package/resource.mjs.map +1 -1
- package/resources/changelogs/changelogs.d.mts +106 -106
- package/resources/changelogs/changelogs.d.mts.map +1 -1
- package/resources/changelogs/changelogs.d.ts +106 -106
- 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/index.mjs.map +1 -1
- package/resources/changelogs/subscribers.d.mts.map +1 -1
- package/resources/changelogs/subscribers.d.ts.map +1 -1
- package/resources/changelogs/subscribers.mjs.map +1 -1
- package/resources/changelogs.d.mts.map +1 -1
- package/resources/changelogs.d.ts.map +1 -1
- package/resources/changelogs.mjs.map +1 -1
- package/resources/conversation-attributes.d.mts +117 -0
- package/resources/conversation-attributes.d.mts.map +1 -0
- package/resources/conversation-attributes.d.ts +117 -0
- package/resources/conversation-attributes.d.ts.map +1 -0
- package/resources/conversation-attributes.js +61 -0
- package/resources/conversation-attributes.js.map +1 -0
- package/resources/conversation-attributes.mjs +57 -0
- package/resources/conversation-attributes.mjs.map +1 -0
- package/resources/feedback/boards.d.mts +17 -17
- package/resources/feedback/boards.d.mts.map +1 -1
- package/resources/feedback/boards.d.ts +17 -17
- 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 +400 -123
- package/resources/feedback/comments.d.mts.map +1 -1
- package/resources/feedback/comments.d.ts +400 -123
- package/resources/feedback/comments.d.ts.map +1 -1
- package/resources/feedback/comments.js +253 -93
- package/resources/feedback/comments.js.map +1 -1
- package/resources/feedback/comments.mjs +253 -93
- package/resources/feedback/comments.mjs.map +1 -1
- package/resources/feedback/custom-fields.d.mts +34 -34
- package/resources/feedback/custom-fields.d.mts.map +1 -1
- package/resources/feedback/custom-fields.d.ts +34 -34
- 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 +7 -7
- package/resources/feedback/feedback.d.mts.map +1 -1
- package/resources/feedback/feedback.d.ts +7 -7
- 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 +18 -18
- package/resources/feedback/post-statuses.d.mts.map +1 -1
- package/resources/feedback/post-statuses.d.ts +18 -18
- 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 +238 -284
- package/resources/feedback/posts/posts.d.mts.map +1 -1
- package/resources/feedback/posts/posts.d.ts +238 -284
- package/resources/feedback/posts/posts.d.ts.map +1 -1
- package/resources/feedback/posts/posts.js +122 -96
- package/resources/feedback/posts/posts.js.map +1 -1
- package/resources/feedback/posts/posts.mjs +122 -96
- package/resources/feedback/posts/posts.mjs.map +1 -1
- package/resources/feedback/posts/voters.d.mts.map +1 -1
- package/resources/feedback/posts/voters.d.ts.map +1 -1
- package/resources/feedback/posts/voters.mjs.map +1 -1
- package/resources/feedback/posts.d.mts.map +1 -1
- package/resources/feedback/posts.d.ts.map +1 -1
- package/resources/feedback/posts.mjs.map +1 -1
- package/resources/feedback.d.mts.map +1 -1
- package/resources/feedback.d.ts.map +1 -1
- package/resources/feedback.mjs.map +1 -1
- package/resources/help-center/articles.d.mts +98 -152
- package/resources/help-center/articles.d.mts.map +1 -1
- package/resources/help-center/articles.d.ts +98 -152
- 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 +64 -64
- package/resources/help-center/collections.d.mts.map +1 -1
- package/resources/help-center/collections.d.ts +64 -64
- 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 +5 -5
- package/resources/help-center/help-center.d.mts.map +1 -1
- package/resources/help-center/help-center.d.ts +5 -5
- package/resources/help-center/help-center.d.ts.map +1 -1
- package/resources/help-center/help-center.js.map +1 -1
- package/resources/help-center/help-center.mjs.map +1 -1
- package/resources/help-center/help-centers.d.mts +43 -43
- package/resources/help-center/help-centers.d.mts.map +1 -1
- package/resources/help-center/help-centers.d.ts +43 -43
- 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/index.js.map +1 -1
- package/resources/help-center/index.mjs.map +1 -1
- package/resources/help-center/redirect-rules.d.mts +117 -117
- package/resources/help-center/redirect-rules.d.mts.map +1 -1
- package/resources/help-center/redirect-rules.d.ts +117 -117
- 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/help-center.d.mts.map +1 -1
- package/resources/help-center.d.ts.map +1 -1
- package/resources/help-center.mjs.map +1 -1
- package/resources/index.d.mts +4 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/organization/admins.d.mts +23 -23
- package/resources/organization/admins.d.mts.map +1 -1
- package/resources/organization/admins.d.ts +23 -23
- 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 +50 -50
- package/resources/organization/brands.d.mts.map +1 -1
- package/resources/organization/brands.d.ts +50 -50
- 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/index.mjs.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/organization.mjs.map +1 -1
- package/resources/organization/teams.d.mts +45 -45
- package/resources/organization/teams.d.mts.map +1 -1
- package/resources/organization/teams.d.ts +45 -45
- 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/organization.d.mts.map +1 -1
- package/resources/organization.d.ts.map +1 -1
- package/resources/organization.mjs.map +1 -1
- package/resources/support/conversation-tags.d.mts +40 -40
- package/resources/support/conversation-tags.d.mts.map +1 -1
- package/resources/support/conversation-tags.d.ts +40 -40
- 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 +624 -722
- package/resources/support/conversations/conversations.d.mts.map +1 -1
- package/resources/support/conversations/conversations.d.ts +624 -722
- package/resources/support/conversations/conversations.d.ts.map +1 -1
- package/resources/support/conversations/conversations.js +309 -302
- package/resources/support/conversations/conversations.js.map +1 -1
- package/resources/support/conversations/conversations.mjs +309 -302
- 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/index.js.map +1 -1
- package/resources/support/conversations/index.mjs.map +1 -1
- package/resources/support/conversations/participants.d.mts.map +1 -1
- package/resources/support/conversations/participants.d.ts.map +1 -1
- package/resources/support/conversations/participants.mjs.map +1 -1
- package/resources/support/conversations.d.mts.map +1 -1
- package/resources/support/conversations.d.ts.map +1 -1
- package/resources/support/conversations.mjs.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/index.js.map +1 -1
- package/resources/support/index.mjs.map +1 -1
- package/resources/support/support.d.mts +4 -4
- package/resources/support/support.d.mts.map +1 -1
- package/resources/support/support.d.ts +4 -4
- package/resources/support/support.d.ts.map +1 -1
- package/resources/support/support.js.map +1 -1
- package/resources/support/support.mjs.map +1 -1
- package/resources/support/tickets/categories.d.mts +18 -18
- package/resources/support/tickets/categories.d.mts.map +1 -1
- package/resources/support/tickets/categories.d.ts +18 -18
- 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 +20 -20
- package/resources/support/tickets/custom-fields.d.mts.map +1 -1
- package/resources/support/tickets/custom-fields.d.ts +20 -20
- 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/index.mjs.map +1 -1
- package/resources/support/tickets/statuses.d.mts +17 -17
- package/resources/support/tickets/statuses.d.mts.map +1 -1
- package/resources/support/tickets/statuses.d.ts +17 -17
- 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 +69 -69
- package/resources/support/tickets/tickets.d.mts.map +1 -1
- package/resources/support/tickets/tickets.d.ts +69 -69
- 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/support/tickets.d.mts.map +1 -1
- package/resources/support/tickets.d.ts.map +1 -1
- package/resources/support/tickets.mjs.map +1 -1
- package/resources/support.d.mts.map +1 -1
- package/resources/support.d.ts.map +1 -1
- package/resources/support.mjs.map +1 -1
- package/resources/surveys.d.mts +41 -41
- package/resources/surveys.d.mts.map +1 -1
- package/resources/surveys.d.ts +41 -41
- 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 +149 -177
- package/resources/users/companies/companies.d.mts.map +1 -1
- package/resources/users/companies/companies.d.ts +149 -177
- package/resources/users/companies/companies.d.ts.map +1 -1
- package/resources/users/companies/companies.js +153 -142
- package/resources/users/companies/companies.js.map +1 -1
- package/resources/users/companies/companies.mjs +153 -142
- package/resources/users/companies/companies.mjs.map +1 -1
- package/resources/users/companies/contacts.d.mts.map +1 -1
- package/resources/users/companies/contacts.d.ts.map +1 -1
- package/resources/users/companies/contacts.mjs.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/companies/index.mjs.map +1 -1
- package/resources/users/companies.d.mts.map +1 -1
- package/resources/users/companies.d.ts.map +1 -1
- package/resources/users/companies.mjs.map +1 -1
- 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.map +1 -1
- package/resources/users/contacts/by-user-id/by-user-id.mjs.map +1 -1
- 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.map +1 -1
- package/resources/users/contacts/by-user-id/email-preferences.mjs.map +1 -1
- package/resources/users/contacts/by-user-id/index.d.mts.map +1 -1
- package/resources/users/contacts/by-user-id/index.d.ts.map +1 -1
- package/resources/users/contacts/by-user-id/index.mjs.map +1 -1
- package/resources/users/contacts/by-user-id.d.mts.map +1 -1
- package/resources/users/contacts/by-user-id.d.ts.map +1 -1
- package/resources/users/contacts/by-user-id.mjs.map +1 -1
- package/resources/users/contacts/contacts.d.mts +229 -256
- package/resources/users/contacts/contacts.d.mts.map +1 -1
- package/resources/users/contacts/contacts.d.ts +229 -256
- package/resources/users/contacts/contacts.d.ts.map +1 -1
- package/resources/users/contacts/contacts.js +213 -201
- package/resources/users/contacts/contacts.js.map +1 -1
- package/resources/users/contacts/contacts.mjs +213 -201
- package/resources/users/contacts/contacts.mjs.map +1 -1
- package/resources/users/contacts/email-preferences.d.mts.map +1 -1
- package/resources/users/contacts/email-preferences.d.ts.map +1 -1
- package/resources/users/contacts/email-preferences.mjs.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/contacts/index.mjs.map +1 -1
- package/resources/users/contacts.d.mts.map +1 -1
- package/resources/users/contacts.d.ts.map +1 -1
- package/resources/users/contacts.mjs.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/index.mjs.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/users/users.mjs.map +1 -1
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts.map +1 -1
- package/resources/users.mjs.map +1 -1
- package/resources/webhooks.d.mts +75 -75
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +75 -75
- 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/resources.d.mts.map +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.mjs.map +1 -1
- package/src/client.ts +25 -3
- package/src/internal/utils/log.ts +2 -0
- package/src/resources/changelogs/changelogs.ts +170 -170
- package/src/resources/changelogs/index.ts +1 -1
- package/src/resources/conversation-attributes.ts +181 -0
- package/src/resources/feedback/boards.ts +28 -28
- package/src/resources/feedback/comments.ts +464 -141
- package/src/resources/feedback/custom-fields.ts +44 -44
- package/src/resources/feedback/feedback.ts +23 -5
- package/src/resources/feedback/index.ts +14 -5
- package/src/resources/feedback/post-statuses.ts +31 -31
- package/src/resources/feedback/posts/index.ts +7 -1
- package/src/resources/feedback/posts/posts.ts +294 -340
- package/src/resources/help-center/articles.ts +123 -186
- package/src/resources/help-center/collections.ts +84 -84
- package/src/resources/help-center/help-center.ts +7 -5
- package/src/resources/help-center/help-centers.ts +55 -55
- package/src/resources/help-center/index.ts +6 -5
- package/src/resources/help-center/redirect-rules.ts +174 -174
- package/src/resources/index.ts +11 -3
- package/src/resources/organization/admins.ts +33 -33
- package/src/resources/organization/brands.ts +66 -66
- package/src/resources/organization/index.ts +3 -3
- package/src/resources/organization/organization.ts +3 -3
- package/src/resources/organization/teams.ts +52 -52
- package/src/resources/support/conversation-tags.ts +59 -59
- package/src/resources/support/conversations/conversations.ts +748 -867
- package/src/resources/support/conversations/index.ts +11 -6
- package/src/resources/support/index.ts +14 -9
- package/src/resources/support/support.ts +21 -11
- package/src/resources/support/tickets/categories.ts +33 -33
- package/src/resources/support/tickets/custom-fields.ts +27 -27
- package/src/resources/support/tickets/index.ts +4 -4
- package/src/resources/support/tickets/statuses.ts +29 -29
- package/src/resources/support/tickets/tickets.ts +95 -95
- package/src/resources/surveys.ts +58 -58
- package/src/resources/users/companies/companies.ts +193 -223
- package/src/resources/users/companies/index.ts +2 -2
- package/src/resources/users/contacts/contacts.ts +275 -302
- 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 +95 -95
- package/src/version.ts +1 -1
- package/uploads.d.mts +1 -0
- package/uploads.d.mts.map +1 -1
- package/uploads.d.ts +1 -0
- package/uploads.d.ts.map +1 -1
- package/uploads.mjs +1 -0
- package/uploads.mjs.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
4
|
import * as ContactsAPI from './contacts';
|
|
5
|
+
import * as PostsAPI from '../../feedback/posts/posts';
|
|
5
6
|
import * as CompaniesAPI from '../companies/companies';
|
|
6
7
|
import * as EmailPreferencesAPI from './email-preferences';
|
|
7
8
|
import {
|
|
@@ -35,19 +36,27 @@ export class Contacts extends APIResource {
|
|
|
35
36
|
);
|
|
36
37
|
|
|
37
38
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* Returns both customers and leads.
|
|
39
|
+
* Returns a list of contacts (customers and leads) in your organization using
|
|
40
|
+
* cursor-based pagination.
|
|
41
41
|
*
|
|
42
|
-
* ###
|
|
42
|
+
* ### Query Parameters
|
|
43
43
|
*
|
|
44
|
-
* - `
|
|
44
|
+
* - `limit` - Number of contacts to return (1-100, default 10)
|
|
45
|
+
* - `cursor` - Cursor from previous response for pagination
|
|
46
|
+
* - `contactType` - Filter by contact type: "customer" (default), "lead", or "all"
|
|
45
47
|
*
|
|
46
48
|
* ### Response Format
|
|
47
49
|
*
|
|
48
|
-
* Returns a
|
|
50
|
+
* Returns a list object with:
|
|
51
|
+
*
|
|
52
|
+
* - `object` - Always "list"
|
|
53
|
+
* - `data` - Array of contact objects
|
|
54
|
+
* - `nextCursor` - Cursor for the next page, or null if no more results
|
|
55
|
+
*
|
|
56
|
+
* ### Contact Object
|
|
57
|
+
*
|
|
58
|
+
* Each contact includes:
|
|
49
59
|
*
|
|
50
|
-
* - `object` - Always "contact"
|
|
51
60
|
* - `id` - Unique contact identifier
|
|
52
61
|
* - `userId` - External user ID from SSO (if set)
|
|
53
62
|
* - `email` - Contact email address
|
|
@@ -64,11 +73,133 @@ export class Contacts extends APIResource {
|
|
|
64
73
|
*
|
|
65
74
|
* ```json
|
|
66
75
|
* {
|
|
76
|
+
* "object": "list",
|
|
77
|
+
* "data": [
|
|
78
|
+
* {
|
|
79
|
+
* "object": "contact",
|
|
80
|
+
* "id": "676f0f6765bdaa7d7d760f88",
|
|
81
|
+
* "email": "john@example.com",
|
|
82
|
+
* "name": "John Doe",
|
|
83
|
+
* "type": "customer",
|
|
84
|
+
* ...
|
|
85
|
+
* }
|
|
86
|
+
* ],
|
|
87
|
+
* "nextCursor": "eyJpZCI6IjUwN2YxZjc3YmNmODZjZDc5OTQzOTAxMSJ9"
|
|
88
|
+
* }
|
|
89
|
+
* ```
|
|
90
|
+
*
|
|
91
|
+
* ### Version Availability
|
|
92
|
+
*
|
|
93
|
+
* This endpoint is only available in API version 2026-01-01.nova and newer.
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```ts
|
|
97
|
+
* // Automatically fetches more pages as needed.
|
|
98
|
+
* for await (const contact of client.users.contacts.list()) {
|
|
99
|
+
* // ...
|
|
100
|
+
* }
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
list(
|
|
104
|
+
params: ContactListParams | null | undefined = {},
|
|
105
|
+
options?: RequestOptions,
|
|
106
|
+
): PagePromise<ContactListDataCursorPage, ContactList.Data> {
|
|
107
|
+
const { 'Featurebase-Version': featurebaseVersion, ...query } = params ?? {};
|
|
108
|
+
return this._client.getAPIList('/v2/contacts', CursorPage<ContactList.Data>, {
|
|
109
|
+
query,
|
|
110
|
+
...options,
|
|
111
|
+
headers: buildHeaders([
|
|
112
|
+
{
|
|
113
|
+
...(featurebaseVersion?.toString() != null ?
|
|
114
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
115
|
+
: undefined),
|
|
116
|
+
},
|
|
117
|
+
options?.headers,
|
|
118
|
+
]),
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Creates a new contact or updates an existing one.
|
|
124
|
+
*
|
|
125
|
+
* If a contact with the given `email` or `userId` already exists, it will be
|
|
126
|
+
* updated. Otherwise, a new contact will be created.
|
|
127
|
+
*
|
|
128
|
+
* **At least one of `email` or `userId` must be provided for identification.**
|
|
129
|
+
*
|
|
130
|
+
* ### Request Body
|
|
131
|
+
*
|
|
132
|
+
* | Field | Type | Required | Description |
|
|
133
|
+
* | ----------------------- | ------- | ------------------- | --------------------------------------- |
|
|
134
|
+
* | `email` | string | One of email/userId | Contact email address |
|
|
135
|
+
* | `userId` | string | One of email/userId | External user ID from your system |
|
|
136
|
+
* | `name` | string | No | Contact display name |
|
|
137
|
+
* | `profilePicture` | string | No | Profile picture URL |
|
|
138
|
+
* | `companies` | array | No | Companies the contact belongs to |
|
|
139
|
+
* | `customFields` | object | No | Custom field values |
|
|
140
|
+
* | `subscribedToChangelog` | boolean | No | Whether subscribed to changelog |
|
|
141
|
+
* | `locale` | string | No | Contact locale/language |
|
|
142
|
+
* | `phone` | string | No | Contact phone number |
|
|
143
|
+
* | `roles` | array | No | Role IDs to assign |
|
|
144
|
+
* | `userHash` | string | No | HMAC hash for identity verification |
|
|
145
|
+
* | `createdAt` | string | No | When the contact was created (ISO 8601) |
|
|
146
|
+
*
|
|
147
|
+
* ### Company Object
|
|
148
|
+
*
|
|
149
|
+
* Each company in the `companies` array can have:
|
|
150
|
+
*
|
|
151
|
+
* - `id` (required) - External company ID from your system
|
|
152
|
+
* - `name` (required) - Company name
|
|
153
|
+
* - `monthlySpend` - Monthly spend/revenue
|
|
154
|
+
* - `customFields` - Custom field values
|
|
155
|
+
* - `industry` - Industry
|
|
156
|
+
* - `website` - Company website URL
|
|
157
|
+
* - `plan` - Current plan/subscription
|
|
158
|
+
* - `companySize` - Number of employees
|
|
159
|
+
* - `createdAt` - When the company was created
|
|
160
|
+
*
|
|
161
|
+
* ### Response
|
|
162
|
+
*
|
|
163
|
+
* Returns the created or updated contact object.
|
|
164
|
+
*
|
|
165
|
+
* - **201 Created** - A new contact was created
|
|
166
|
+
* - **200 OK** - An existing contact was updated
|
|
167
|
+
*
|
|
168
|
+
* ### Example Request
|
|
169
|
+
*
|
|
170
|
+
* ```json
|
|
171
|
+
* {
|
|
172
|
+
* "email": "john@example.com",
|
|
173
|
+
* "name": "John Doe",
|
|
174
|
+
* "userId": "usr_12345",
|
|
175
|
+
* "companies": [
|
|
176
|
+
* {
|
|
177
|
+
* "id": "company_123",
|
|
178
|
+
* "name": "Acme Inc",
|
|
179
|
+
* "monthlySpend": 500,
|
|
180
|
+
* "plan": "enterprise"
|
|
181
|
+
* }
|
|
182
|
+
* ],
|
|
183
|
+
* "customFields": {
|
|
184
|
+
* "plan": "pro",
|
|
185
|
+
* "signupSource": "website"
|
|
186
|
+
* },
|
|
187
|
+
* "subscribedToChangelog": true
|
|
188
|
+
* }
|
|
189
|
+
* ```
|
|
190
|
+
*
|
|
191
|
+
* ### Example Response
|
|
192
|
+
*
|
|
193
|
+
* ```json
|
|
194
|
+
* {
|
|
67
195
|
* "object": "contact",
|
|
68
196
|
* "id": "676f0f6765bdaa7d7d760f88",
|
|
69
197
|
* "email": "john@example.com",
|
|
70
198
|
* "name": "John Doe",
|
|
199
|
+
* "userId": "usr_12345",
|
|
71
200
|
* "type": "customer",
|
|
201
|
+
* "companies": [...],
|
|
202
|
+
* "customFields": {...},
|
|
72
203
|
* ...
|
|
73
204
|
* }
|
|
74
205
|
* ```
|
|
@@ -79,18 +210,17 @@ export class Contacts extends APIResource {
|
|
|
79
210
|
*
|
|
80
211
|
* @example
|
|
81
212
|
* ```ts
|
|
82
|
-
* const
|
|
83
|
-
*
|
|
84
|
-
* );
|
|
213
|
+
* const response =
|
|
214
|
+
* await client.users.contacts.createOrUpdate();
|
|
85
215
|
* ```
|
|
86
216
|
*/
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
params: ContactRetrieveParams | null | undefined = {},
|
|
217
|
+
createOrUpdate(
|
|
218
|
+
params: ContactCreateOrUpdateParams,
|
|
90
219
|
options?: RequestOptions,
|
|
91
|
-
): APIPromise<
|
|
92
|
-
const { 'Featurebase-Version': featurebaseVersion } = params
|
|
93
|
-
return this._client.
|
|
220
|
+
): APIPromise<ContactCreateOrUpdateResponse> {
|
|
221
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
222
|
+
return this._client.post('/v2/contacts', {
|
|
223
|
+
body,
|
|
94
224
|
...options,
|
|
95
225
|
headers: buildHeaders([
|
|
96
226
|
{
|
|
@@ -104,27 +234,19 @@ export class Contacts extends APIResource {
|
|
|
104
234
|
}
|
|
105
235
|
|
|
106
236
|
/**
|
|
107
|
-
*
|
|
108
|
-
* cursor-based pagination.
|
|
109
|
-
*
|
|
110
|
-
* ### Query Parameters
|
|
111
|
-
*
|
|
112
|
-
* - `limit` - Number of contacts to return (1-100, default 10)
|
|
113
|
-
* - `cursor` - Cursor from previous response for pagination
|
|
114
|
-
* - `contactType` - Filter by contact type: "customer" (default), "lead", or "all"
|
|
237
|
+
* Retrieves a single contact by their Featurebase ID.
|
|
115
238
|
*
|
|
116
|
-
*
|
|
239
|
+
* Returns both customers and leads.
|
|
117
240
|
*
|
|
118
|
-
*
|
|
241
|
+
* ### Path Parameters
|
|
119
242
|
*
|
|
120
|
-
* - `
|
|
121
|
-
* - `data` - Array of contact objects
|
|
122
|
-
* - `nextCursor` - Cursor for the next page, or null if no more results
|
|
243
|
+
* - `id` - The Featurebase contact ID (24-character ObjectId)
|
|
123
244
|
*
|
|
124
|
-
* ###
|
|
245
|
+
* ### Response Format
|
|
125
246
|
*
|
|
126
|
-
*
|
|
247
|
+
* Returns a single contact object with:
|
|
127
248
|
*
|
|
249
|
+
* - `object` - Always "contact"
|
|
128
250
|
* - `id` - Unique contact identifier
|
|
129
251
|
* - `userId` - External user ID from SSO (if set)
|
|
130
252
|
* - `email` - Contact email address
|
|
@@ -141,18 +263,12 @@ export class Contacts extends APIResource {
|
|
|
141
263
|
*
|
|
142
264
|
* ```json
|
|
143
265
|
* {
|
|
144
|
-
* "object": "
|
|
145
|
-
* "
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
* "name": "John Doe",
|
|
151
|
-
* "type": "customer",
|
|
152
|
-
* ...
|
|
153
|
-
* }
|
|
154
|
-
* ],
|
|
155
|
-
* "nextCursor": "eyJpZCI6IjUwN2YxZjc3YmNmODZjZDc5OTQzOTAxMSJ9"
|
|
266
|
+
* "object": "contact",
|
|
267
|
+
* "id": "676f0f6765bdaa7d7d760f88",
|
|
268
|
+
* "email": "john@example.com",
|
|
269
|
+
* "name": "John Doe",
|
|
270
|
+
* "type": "customer",
|
|
271
|
+
* ...
|
|
156
272
|
* }
|
|
157
273
|
* ```
|
|
158
274
|
*
|
|
@@ -162,19 +278,18 @@ export class Contacts extends APIResource {
|
|
|
162
278
|
*
|
|
163
279
|
* @example
|
|
164
280
|
* ```ts
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
* }
|
|
281
|
+
* const contact = await client.users.contacts.retrieve(
|
|
282
|
+
* '507f1f77bcf86cd799439011',
|
|
283
|
+
* );
|
|
169
284
|
* ```
|
|
170
285
|
*/
|
|
171
|
-
|
|
172
|
-
|
|
286
|
+
retrieve(
|
|
287
|
+
id: string,
|
|
288
|
+
params: ContactRetrieveParams | null | undefined = {},
|
|
173
289
|
options?: RequestOptions,
|
|
174
|
-
):
|
|
175
|
-
const { 'Featurebase-Version': featurebaseVersion
|
|
176
|
-
return this._client.
|
|
177
|
-
query,
|
|
290
|
+
): APIPromise<ContactRetrieveResponse> {
|
|
291
|
+
const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
|
|
292
|
+
return this._client.get(path`/v2/contacts/${id}`, {
|
|
178
293
|
...options,
|
|
179
294
|
headers: buildHeaders([
|
|
180
295
|
{
|
|
@@ -254,7 +369,7 @@ export class Contacts extends APIResource {
|
|
|
254
369
|
}
|
|
255
370
|
|
|
256
371
|
/**
|
|
257
|
-
* Blocks a contact by their Featurebase ID
|
|
372
|
+
* Blocks a contact by their Featurebase ID using the global moderation system.
|
|
258
373
|
*
|
|
259
374
|
* ### Path Parameters
|
|
260
375
|
*
|
|
@@ -272,6 +387,8 @@ export class Contacts extends APIResource {
|
|
|
272
387
|
* When a contact is blocked:
|
|
273
388
|
*
|
|
274
389
|
* - The contact cannot send new messages via messenger
|
|
390
|
+
* - The contact cannot interact with feedback/changelog surfaces for this
|
|
391
|
+
* organization
|
|
275
392
|
* - Existing conversations are not deleted but no new messages can be added by the
|
|
276
393
|
* blocked user
|
|
277
394
|
* - The block can be removed by unblocking the contact
|
|
@@ -325,87 +442,42 @@ export class Contacts extends APIResource {
|
|
|
325
442
|
}
|
|
326
443
|
|
|
327
444
|
/**
|
|
328
|
-
*
|
|
445
|
+
* Unblocks a contact by their Featurebase ID from the global moderation system.
|
|
329
446
|
*
|
|
330
|
-
*
|
|
331
|
-
* updated. Otherwise, a new contact will be created.
|
|
332
|
-
*
|
|
333
|
-
* **At least one of `email` or `userId` must be provided for identification.**
|
|
447
|
+
* ### Path Parameters
|
|
334
448
|
*
|
|
335
|
-
*
|
|
449
|
+
* - `id` - The Featurebase internal ID of the contact (MongoDB ObjectId)
|
|
336
450
|
*
|
|
337
|
-
*
|
|
338
|
-
* | ----------------------- | ------- | ------------------- | --------------------------------------- |
|
|
339
|
-
* | `email` | string | One of email/userId | Contact email address |
|
|
340
|
-
* | `userId` | string | One of email/userId | External user ID from your system |
|
|
341
|
-
* | `name` | string | No | Contact display name |
|
|
342
|
-
* | `profilePicture` | string | No | Profile picture URL |
|
|
343
|
-
* | `companies` | array | No | Companies the contact belongs to |
|
|
344
|
-
* | `customFields` | object | No | Custom field values |
|
|
345
|
-
* | `subscribedToChangelog` | boolean | No | Whether subscribed to changelog |
|
|
346
|
-
* | `locale` | string | No | Contact locale/language |
|
|
347
|
-
* | `phone` | string | No | Contact phone number |
|
|
348
|
-
* | `roles` | array | No | Role IDs to assign |
|
|
349
|
-
* | `userHash` | string | No | HMAC hash for identity verification |
|
|
350
|
-
* | `createdAt` | string | No | When the contact was created (ISO 8601) |
|
|
451
|
+
* ### Supported Contact Types
|
|
351
452
|
*
|
|
352
|
-
*
|
|
453
|
+
* This endpoint unblocks both:
|
|
353
454
|
*
|
|
354
|
-
*
|
|
455
|
+
* - **Customers** - Users with registered accounts
|
|
456
|
+
* - **Leads** - Anonymous or unregistered visitors
|
|
355
457
|
*
|
|
356
|
-
*
|
|
357
|
-
* - `name` (required) - Company name
|
|
358
|
-
* - `monthlySpend` - Monthly spend/revenue
|
|
359
|
-
* - `customFields` - Custom field values
|
|
360
|
-
* - `industry` - Industry
|
|
361
|
-
* - `website` - Company website URL
|
|
362
|
-
* - `plan` - Current plan/subscription
|
|
363
|
-
* - `companySize` - Number of employees
|
|
364
|
-
* - `createdAt` - When the company was created
|
|
458
|
+
* ### Unblocking Behavior
|
|
365
459
|
*
|
|
366
|
-
*
|
|
460
|
+
* When a contact is unblocked:
|
|
367
461
|
*
|
|
368
|
-
*
|
|
462
|
+
* - The contact can resume sending messages via messenger
|
|
463
|
+
* - Previously blocked conversations remain intact
|
|
464
|
+
* - The contact regains full messenger functionality
|
|
369
465
|
*
|
|
370
|
-
*
|
|
371
|
-
* - **200 OK** - An existing contact was updated
|
|
466
|
+
* ### Response
|
|
372
467
|
*
|
|
373
|
-
*
|
|
468
|
+
* Returns an unblock confirmation object:
|
|
374
469
|
*
|
|
375
|
-
*
|
|
376
|
-
*
|
|
377
|
-
*
|
|
378
|
-
* "name": "John Doe",
|
|
379
|
-
* "userId": "usr_12345",
|
|
380
|
-
* "companies": [
|
|
381
|
-
* {
|
|
382
|
-
* "id": "company_123",
|
|
383
|
-
* "name": "Acme Inc",
|
|
384
|
-
* "monthlySpend": 500,
|
|
385
|
-
* "plan": "enterprise"
|
|
386
|
-
* }
|
|
387
|
-
* ],
|
|
388
|
-
* "customFields": {
|
|
389
|
-
* "plan": "pro",
|
|
390
|
-
* "signupSource": "website"
|
|
391
|
-
* },
|
|
392
|
-
* "subscribedToChangelog": true
|
|
393
|
-
* }
|
|
394
|
-
* ```
|
|
470
|
+
* - `id` - The ID of the unblocked contact
|
|
471
|
+
* - `object` - Always "contact"
|
|
472
|
+
* - `unblocked` - Always `true`
|
|
395
473
|
*
|
|
396
474
|
* ### Example Response
|
|
397
475
|
*
|
|
398
476
|
* ```json
|
|
399
477
|
* {
|
|
478
|
+
* "id": "507f1f77bcf86cd799439011",
|
|
400
479
|
* "object": "contact",
|
|
401
|
-
* "
|
|
402
|
-
* "email": "john@example.com",
|
|
403
|
-
* "name": "John Doe",
|
|
404
|
-
* "userId": "usr_12345",
|
|
405
|
-
* "type": "customer",
|
|
406
|
-
* "companies": [...],
|
|
407
|
-
* "customFields": {...},
|
|
408
|
-
* ...
|
|
480
|
+
* "unblocked": true
|
|
409
481
|
* }
|
|
410
482
|
* ```
|
|
411
483
|
*
|
|
@@ -415,17 +487,18 @@ export class Contacts extends APIResource {
|
|
|
415
487
|
*
|
|
416
488
|
* @example
|
|
417
489
|
* ```ts
|
|
418
|
-
* const response =
|
|
419
|
-
*
|
|
490
|
+
* const response = await client.users.contacts.unblock(
|
|
491
|
+
* '507f1f77bcf86cd799439011',
|
|
492
|
+
* );
|
|
420
493
|
* ```
|
|
421
494
|
*/
|
|
422
|
-
|
|
423
|
-
|
|
495
|
+
unblock(
|
|
496
|
+
id: string,
|
|
497
|
+
params: ContactUnblockParams | null | undefined = {},
|
|
424
498
|
options?: RequestOptions,
|
|
425
|
-
): APIPromise<
|
|
426
|
-
const { 'Featurebase-Version': featurebaseVersion
|
|
427
|
-
return this._client.post(
|
|
428
|
-
body,
|
|
499
|
+
): APIPromise<ContactUnblockResponse> {
|
|
500
|
+
const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
|
|
501
|
+
return this._client.post(path`/v2/contacts/${id}/unblock`, {
|
|
429
502
|
...options,
|
|
430
503
|
headers: buildHeaders([
|
|
431
504
|
{
|
|
@@ -453,10 +526,10 @@ export class Contacts extends APIResource {
|
|
|
453
526
|
* "operator": "AND",
|
|
454
527
|
* "value": [
|
|
455
528
|
* { "field": "type", "operator": "=", "value": "customer" },
|
|
456
|
-
* { "field": "
|
|
529
|
+
* { "field": "lastActivity", "operator": ">", "value": 1735689600 }
|
|
457
530
|
* ]
|
|
458
531
|
* },
|
|
459
|
-
* "sort": "
|
|
532
|
+
* "sort": "lastActivity:desc",
|
|
460
533
|
* "limit": 20
|
|
461
534
|
* }
|
|
462
535
|
* ```
|
|
@@ -465,17 +538,23 @@ export class Contacts extends APIResource {
|
|
|
465
538
|
*
|
|
466
539
|
* ### Supported fields and operators
|
|
467
540
|
*
|
|
468
|
-
*
|
|
469
|
-
*
|
|
470
|
-
*
|
|
471
|
-
*
|
|
472
|
-
*
|
|
473
|
-
*
|
|
474
|
-
* |
|
|
475
|
-
* |
|
|
476
|
-
* | `
|
|
477
|
-
* | `
|
|
478
|
-
* | `
|
|
541
|
+
* Field names are camelCase, matching the rest of the v2 public API. Snake_case
|
|
542
|
+
* names that this endpoint originally shipped with (`external_id`, `company_ids`,
|
|
543
|
+
* `posts_created`, `comments_created`, `last_activity`, `created_at`) are still
|
|
544
|
+
* accepted for back-compat but are deprecated — please migrate to camelCase in new
|
|
545
|
+
* code.
|
|
546
|
+
*
|
|
547
|
+
* | Field | Type | Operators |
|
|
548
|
+
* | ----------------- | -------------------------------- | --------------------------- |
|
|
549
|
+
* | `externalId` | string (caller-provided user id) | `=`, `!=`, `IN`, `NIN` |
|
|
550
|
+
* | `email` | string | `=`, `!=`, `IN`, `NIN` |
|
|
551
|
+
* | `name` | string | `=`, `!=`, `IN`, `NIN`, `~` |
|
|
552
|
+
* | `type` | enum (`customer`, `lead`) | `=`, `!=`, `IN`, `NIN` |
|
|
553
|
+
* | `companyIds` | id (Featurebase company `id`) | `=`, `!=`, `IN`, `NIN` |
|
|
554
|
+
* | `postsCreated` | number | `=`, `!=`, `>`, `<` |
|
|
555
|
+
* | `commentsCreated` | number | `=`, `!=`, `>`, `<` |
|
|
556
|
+
* | `lastActivity` | unix seconds | `=`, `!=`, `>`, `<` |
|
|
557
|
+
* | `createdAt` | unix seconds | `=`, `!=`, `>`, `<` |
|
|
479
558
|
*
|
|
480
559
|
* The `name ~ "..."` operator runs a word-aware substring search via the
|
|
481
560
|
* underlying text index. Other string operators (`!~`, `^`, `$`) are reserved for
|
|
@@ -493,10 +572,14 @@ export class Contacts extends APIResource {
|
|
|
493
572
|
*
|
|
494
573
|
* Allowed values:
|
|
495
574
|
*
|
|
496
|
-
* - `
|
|
497
|
-
* - `
|
|
498
|
-
* - `
|
|
499
|
-
* - `
|
|
575
|
+
* - `lastActivity:desc` (default), `lastActivity:asc`
|
|
576
|
+
* - `createdAt:desc`, `createdAt:asc`
|
|
577
|
+
* - `postsCreated:desc`, `postsCreated:asc`
|
|
578
|
+
* - `commentsCreated:desc`, `commentsCreated:asc`
|
|
579
|
+
*
|
|
580
|
+
* Snake_case sort axes (`last_activity:desc`, `created_at:asc`, etc.) are accepted
|
|
581
|
+
* for back-compat — the cursor encodes the canonical camelCase identity, so a
|
|
582
|
+
* caller can switch naming conventions mid-pagination without restarting.
|
|
500
583
|
*
|
|
501
584
|
* The chosen sort axis is encoded in the cursor; switching `sort` mid-pagination
|
|
502
585
|
* returns `400 invalid_cursor`. Restart pagination without a cursor when changing
|
|
@@ -537,76 +620,6 @@ export class Contacts extends APIResource {
|
|
|
537
620
|
]),
|
|
538
621
|
});
|
|
539
622
|
}
|
|
540
|
-
|
|
541
|
-
/**
|
|
542
|
-
* Unblocks a contact by their Featurebase ID from the messenger/inbox.
|
|
543
|
-
*
|
|
544
|
-
* ### Path Parameters
|
|
545
|
-
*
|
|
546
|
-
* - `id` - The Featurebase internal ID of the contact (MongoDB ObjectId)
|
|
547
|
-
*
|
|
548
|
-
* ### Supported Contact Types
|
|
549
|
-
*
|
|
550
|
-
* This endpoint unblocks both:
|
|
551
|
-
*
|
|
552
|
-
* - **Customers** - Users with registered accounts
|
|
553
|
-
* - **Leads** - Anonymous or unregistered visitors
|
|
554
|
-
*
|
|
555
|
-
* ### Unblocking Behavior
|
|
556
|
-
*
|
|
557
|
-
* When a contact is unblocked:
|
|
558
|
-
*
|
|
559
|
-
* - The contact can resume sending messages via messenger
|
|
560
|
-
* - Previously blocked conversations remain intact
|
|
561
|
-
* - The contact regains full messenger functionality
|
|
562
|
-
*
|
|
563
|
-
* ### Response
|
|
564
|
-
*
|
|
565
|
-
* Returns an unblock confirmation object:
|
|
566
|
-
*
|
|
567
|
-
* - `id` - The ID of the unblocked contact
|
|
568
|
-
* - `object` - Always "contact"
|
|
569
|
-
* - `unblocked` - Always `true`
|
|
570
|
-
*
|
|
571
|
-
* ### Example Response
|
|
572
|
-
*
|
|
573
|
-
* ```json
|
|
574
|
-
* {
|
|
575
|
-
* "id": "507f1f77bcf86cd799439011",
|
|
576
|
-
* "object": "contact",
|
|
577
|
-
* "unblocked": true
|
|
578
|
-
* }
|
|
579
|
-
* ```
|
|
580
|
-
*
|
|
581
|
-
* ### Version Availability
|
|
582
|
-
*
|
|
583
|
-
* This endpoint is only available in API version 2026-01-01.nova and newer.
|
|
584
|
-
*
|
|
585
|
-
* @example
|
|
586
|
-
* ```ts
|
|
587
|
-
* const response = await client.users.contacts.unblock(
|
|
588
|
-
* '507f1f77bcf86cd799439011',
|
|
589
|
-
* );
|
|
590
|
-
* ```
|
|
591
|
-
*/
|
|
592
|
-
unblock(
|
|
593
|
-
id: string,
|
|
594
|
-
params: ContactUnblockParams | null | undefined = {},
|
|
595
|
-
options?: RequestOptions,
|
|
596
|
-
): APIPromise<ContactUnblockResponse> {
|
|
597
|
-
const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
|
|
598
|
-
return this._client.post(path`/v2/contacts/${id}/unblock`, {
|
|
599
|
-
...options,
|
|
600
|
-
headers: buildHeaders([
|
|
601
|
-
{
|
|
602
|
-
...(featurebaseVersion?.toString() != null ?
|
|
603
|
-
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
604
|
-
: undefined),
|
|
605
|
-
},
|
|
606
|
-
options?.headers,
|
|
607
|
-
]),
|
|
608
|
-
});
|
|
609
|
-
}
|
|
610
623
|
}
|
|
611
624
|
|
|
612
625
|
export type ContactListDataCursorPage = CursorPage<ContactList.Data>;
|
|
@@ -924,14 +937,6 @@ export interface ContactUnblockResponse {
|
|
|
924
937
|
unblocked: true;
|
|
925
938
|
}
|
|
926
939
|
|
|
927
|
-
export interface ContactRetrieveParams {
|
|
928
|
-
/**
|
|
929
|
-
* API version for this request. Defaults to your organization's configured API
|
|
930
|
-
* version if not specified.
|
|
931
|
-
*/
|
|
932
|
-
'Featurebase-Version'?: '2026-01-01.nova' | '2025-12-12.clover';
|
|
933
|
-
}
|
|
934
|
-
|
|
935
940
|
export interface ContactListParams extends CursorPageParams {
|
|
936
941
|
/**
|
|
937
942
|
* Query param: Filter contacts by type. Defaults to "customer".
|
|
@@ -945,22 +950,6 @@ export interface ContactListParams extends CursorPageParams {
|
|
|
945
950
|
'Featurebase-Version'?: '2026-01-01.nova' | '2025-12-12.clover';
|
|
946
951
|
}
|
|
947
952
|
|
|
948
|
-
export interface ContactDeleteParams {
|
|
949
|
-
/**
|
|
950
|
-
* API version for this request. Defaults to your organization's configured API
|
|
951
|
-
* version if not specified.
|
|
952
|
-
*/
|
|
953
|
-
'Featurebase-Version'?: '2026-01-01.nova' | '2025-12-12.clover';
|
|
954
|
-
}
|
|
955
|
-
|
|
956
|
-
export interface ContactBlockParams {
|
|
957
|
-
/**
|
|
958
|
-
* API version for this request. Defaults to your organization's configured API
|
|
959
|
-
* version if not specified.
|
|
960
|
-
*/
|
|
961
|
-
'Featurebase-Version'?: '2026-01-01.nova' | '2025-12-12.clover';
|
|
962
|
-
}
|
|
963
|
-
|
|
964
953
|
export interface ContactCreateOrUpdateParams {
|
|
965
954
|
/**
|
|
966
955
|
* Body param: Companies the contact belongs to
|
|
@@ -1113,6 +1102,38 @@ export namespace ContactCreateOrUpdateParams {
|
|
|
1113
1102
|
}
|
|
1114
1103
|
}
|
|
1115
1104
|
|
|
1105
|
+
export interface ContactRetrieveParams {
|
|
1106
|
+
/**
|
|
1107
|
+
* API version for this request. Defaults to your organization's configured API
|
|
1108
|
+
* version if not specified.
|
|
1109
|
+
*/
|
|
1110
|
+
'Featurebase-Version'?: '2026-01-01.nova' | '2025-12-12.clover';
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
export interface ContactDeleteParams {
|
|
1114
|
+
/**
|
|
1115
|
+
* API version for this request. Defaults to your organization's configured API
|
|
1116
|
+
* version if not specified.
|
|
1117
|
+
*/
|
|
1118
|
+
'Featurebase-Version'?: '2026-01-01.nova' | '2025-12-12.clover';
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
export interface ContactBlockParams {
|
|
1122
|
+
/**
|
|
1123
|
+
* API version for this request. Defaults to your organization's configured API
|
|
1124
|
+
* version if not specified.
|
|
1125
|
+
*/
|
|
1126
|
+
'Featurebase-Version'?: '2026-01-01.nova' | '2025-12-12.clover';
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
export interface ContactUnblockParams {
|
|
1130
|
+
/**
|
|
1131
|
+
* API version for this request. Defaults to your organization's configured API
|
|
1132
|
+
* version if not specified.
|
|
1133
|
+
*/
|
|
1134
|
+
'Featurebase-Version'?: '2026-01-01.nova' | '2025-12-12.clover';
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1116
1137
|
export interface ContactSearchParams {
|
|
1117
1138
|
/**
|
|
1118
1139
|
* Body param: An opaque cursor for pagination. Use the `nextCursor` value from a
|
|
@@ -1129,14 +1150,24 @@ export interface ContactSearchParams {
|
|
|
1129
1150
|
* Body param: Structured filter AST. Either a single filter clause or one
|
|
1130
1151
|
* top-level AND group (max 15 clauses). Top-level OR groups are not yet supported.
|
|
1131
1152
|
*/
|
|
1132
|
-
query?:
|
|
1153
|
+
query?: PostsAPI.SearchFilter | PostsAPI.SearchFilterGroup;
|
|
1133
1154
|
|
|
1134
1155
|
/**
|
|
1135
|
-
* Body param: Sort field + direction. Defaults to `
|
|
1136
|
-
*
|
|
1137
|
-
*
|
|
1156
|
+
* Body param: Sort field + direction. Defaults to `lastActivity:desc` (matches the
|
|
1157
|
+
* dashboard's default contact ordering). The chosen sort axis is encoded in the
|
|
1158
|
+
* cursor; switching `sort` mid-pagination returns `400 invalid_cursor`. Snake_case
|
|
1159
|
+
* names (`last_activity:desc`, `posts_created:asc`, …) are accepted for
|
|
1160
|
+
* back-compat — prefer camelCase in new code.
|
|
1138
1161
|
*/
|
|
1139
1162
|
sort?:
|
|
1163
|
+
| 'createdAt:desc'
|
|
1164
|
+
| 'createdAt:asc'
|
|
1165
|
+
| 'lastActivity:desc'
|
|
1166
|
+
| 'lastActivity:asc'
|
|
1167
|
+
| 'postsCreated:desc'
|
|
1168
|
+
| 'postsCreated:asc'
|
|
1169
|
+
| 'commentsCreated:desc'
|
|
1170
|
+
| 'commentsCreated:asc'
|
|
1140
1171
|
| 'created_at:desc'
|
|
1141
1172
|
| 'created_at:asc'
|
|
1142
1173
|
| 'last_activity:desc'
|
|
@@ -1153,64 +1184,6 @@ export interface ContactSearchParams {
|
|
|
1153
1184
|
'Featurebase-Version'?: '2026-01-01.nova' | '2025-12-12.clover';
|
|
1154
1185
|
}
|
|
1155
1186
|
|
|
1156
|
-
export namespace ContactSearchParams {
|
|
1157
|
-
export interface SearchFilter {
|
|
1158
|
-
/**
|
|
1159
|
-
* Field name to filter on (e.g. `state`, `tag_ids`, `created_at`)
|
|
1160
|
-
*/
|
|
1161
|
-
field: string;
|
|
1162
|
-
|
|
1163
|
-
/**
|
|
1164
|
-
* Comparison operator
|
|
1165
|
-
*/
|
|
1166
|
-
operator: '=' | '!=' | 'IN' | 'NIN' | '>' | '<' | '>=' | '<=' | '~' | '!~' | '^' | '$';
|
|
1167
|
-
|
|
1168
|
-
/**
|
|
1169
|
-
* Value to compare against (primitive or array of primitives)
|
|
1170
|
-
*/
|
|
1171
|
-
value: string | number | boolean | Array<string | number> | null;
|
|
1172
|
-
}
|
|
1173
|
-
|
|
1174
|
-
export interface SearchFilterGroup {
|
|
1175
|
-
/**
|
|
1176
|
-
* Group operator: AND (all match) or OR (any match)
|
|
1177
|
-
*/
|
|
1178
|
-
operator: 'AND' | 'OR';
|
|
1179
|
-
|
|
1180
|
-
/**
|
|
1181
|
-
* Array of filter clauses (1-15 entries)
|
|
1182
|
-
*/
|
|
1183
|
-
value: Array<SearchFilterGroup.Value>;
|
|
1184
|
-
}
|
|
1185
|
-
|
|
1186
|
-
export namespace SearchFilterGroup {
|
|
1187
|
-
export interface Value {
|
|
1188
|
-
/**
|
|
1189
|
-
* Field name to filter on (e.g. `state`, `tag_ids`, `created_at`)
|
|
1190
|
-
*/
|
|
1191
|
-
field: string;
|
|
1192
|
-
|
|
1193
|
-
/**
|
|
1194
|
-
* Comparison operator
|
|
1195
|
-
*/
|
|
1196
|
-
operator: '=' | '!=' | 'IN' | 'NIN' | '>' | '<' | '>=' | '<=' | '~' | '!~' | '^' | '$';
|
|
1197
|
-
|
|
1198
|
-
/**
|
|
1199
|
-
* Value to compare against (primitive or array of primitives)
|
|
1200
|
-
*/
|
|
1201
|
-
value: string | number | boolean | Array<string | number> | null;
|
|
1202
|
-
}
|
|
1203
|
-
}
|
|
1204
|
-
}
|
|
1205
|
-
|
|
1206
|
-
export interface ContactUnblockParams {
|
|
1207
|
-
/**
|
|
1208
|
-
* API version for this request. Defaults to your organization's configured API
|
|
1209
|
-
* version if not specified.
|
|
1210
|
-
*/
|
|
1211
|
-
'Featurebase-Version'?: '2026-01-01.nova' | '2025-12-12.clover';
|
|
1212
|
-
}
|
|
1213
|
-
|
|
1214
1187
|
Contacts.ByUserID = ByUserID;
|
|
1215
1188
|
Contacts.EmailPreferences = EmailPreferences;
|
|
1216
1189
|
|
|
@@ -1225,13 +1198,13 @@ export declare namespace Contacts {
|
|
|
1225
1198
|
type ContactSearchResponse as ContactSearchResponse,
|
|
1226
1199
|
type ContactUnblockResponse as ContactUnblockResponse,
|
|
1227
1200
|
type ContactListDataCursorPage as ContactListDataCursorPage,
|
|
1228
|
-
type ContactRetrieveParams as ContactRetrieveParams,
|
|
1229
1201
|
type ContactListParams as ContactListParams,
|
|
1202
|
+
type ContactCreateOrUpdateParams as ContactCreateOrUpdateParams,
|
|
1203
|
+
type ContactRetrieveParams as ContactRetrieveParams,
|
|
1230
1204
|
type ContactDeleteParams as ContactDeleteParams,
|
|
1231
1205
|
type ContactBlockParams as ContactBlockParams,
|
|
1232
|
-
type ContactCreateOrUpdateParams as ContactCreateOrUpdateParams,
|
|
1233
|
-
type ContactSearchParams as ContactSearchParams,
|
|
1234
1206
|
type ContactUnblockParams as ContactUnblockParams,
|
|
1207
|
+
type ContactSearchParams as ContactSearchParams,
|
|
1235
1208
|
};
|
|
1236
1209
|
|
|
1237
1210
|
export {
|