featurebase-node 0.2.0 → 0.4.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 +18 -0
- package/README.md +31 -0
- package/client.d.mts +25 -10
- package/client.d.mts.map +1 -1
- package/client.d.ts +25 -10
- package/client.d.ts.map +1 -1
- package/client.js +27 -8
- package/client.js.map +1 -1
- package/client.mjs +27 -8
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +54 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +54 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +101 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +95 -0
- package/core/pagination.mjs.map +1 -0
- package/index.d.mts +1 -0
- package/index.d.mts.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -0
- package/index.mjs.map +1 -1
- package/package.json +11 -1
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +2 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +2 -0
- package/pagination.mjs.map +1 -0
- package/resources/changelogs/changelogs.d.mts +9 -53
- package/resources/changelogs/changelogs.d.mts.map +1 -1
- package/resources/changelogs/changelogs.d.ts +9 -53
- package/resources/changelogs/changelogs.d.ts.map +1 -1
- package/resources/changelogs/changelogs.js +6 -2
- package/resources/changelogs/changelogs.js.map +1 -1
- package/resources/changelogs/changelogs.mjs +6 -2
- 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/feedback/comments.d.mts +10 -54
- package/resources/feedback/comments.d.mts.map +1 -1
- package/resources/feedback/comments.d.ts +10 -54
- package/resources/feedback/comments.d.ts.map +1 -1
- package/resources/feedback/comments.js +6 -2
- package/resources/feedback/comments.js.map +1 -1
- package/resources/feedback/comments.mjs +6 -2
- package/resources/feedback/comments.mjs.map +1 -1
- package/resources/feedback/feedback.d.mts +4 -4
- package/resources/feedback/feedback.d.mts.map +1 -1
- package/resources/feedback/feedback.d.ts +4 -4
- package/resources/feedback/feedback.d.ts.map +1 -1
- package/resources/feedback/feedback.mjs.map +1 -1
- package/resources/feedback/index.d.mts +2 -2
- package/resources/feedback/index.d.mts.map +1 -1
- package/resources/feedback/index.d.ts +2 -2
- package/resources/feedback/index.d.ts.map +1 -1
- package/resources/feedback/posts/index.d.mts +2 -2
- package/resources/feedback/posts/index.d.mts.map +1 -1
- package/resources/feedback/posts/index.d.ts +2 -2
- 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 +12 -57
- package/resources/feedback/posts/posts.d.mts.map +1 -1
- package/resources/feedback/posts/posts.d.ts +12 -57
- package/resources/feedback/posts/posts.d.ts.map +1 -1
- package/resources/feedback/posts/posts.js +6 -2
- package/resources/feedback/posts/posts.js.map +1 -1
- package/resources/feedback/posts/posts.mjs +6 -2
- package/resources/feedback/posts/posts.mjs.map +1 -1
- package/resources/feedback/posts/voters.d.mts +79 -124
- package/resources/feedback/posts/voters.d.mts.map +1 -1
- package/resources/feedback/posts/voters.d.ts +79 -124
- package/resources/feedback/posts/voters.d.ts.map +1 -1
- package/resources/feedback/posts/voters.js +7 -3
- package/resources/feedback/posts/voters.js.map +1 -1
- package/resources/feedback/posts/voters.mjs +7 -3
- package/resources/feedback/posts/voters.mjs.map +1 -1
- package/resources/help-center/articles.d.mts +9 -27
- package/resources/help-center/articles.d.mts.map +1 -1
- package/resources/help-center/articles.d.ts +9 -27
- package/resources/help-center/articles.d.ts.map +1 -1
- package/resources/help-center/articles.js +6 -2
- package/resources/help-center/articles.js.map +1 -1
- package/resources/help-center/articles.mjs +6 -2
- package/resources/help-center/articles.mjs.map +1 -1
- package/resources/help-center/collections.d.mts +9 -28
- package/resources/help-center/collections.d.mts.map +1 -1
- package/resources/help-center/collections.d.ts +9 -28
- package/resources/help-center/collections.d.ts.map +1 -1
- package/resources/help-center/collections.js +6 -3
- package/resources/help-center/collections.js.map +1 -1
- package/resources/help-center/collections.mjs +6 -3
- package/resources/help-center/collections.mjs.map +1 -1
- package/resources/help-center/help-center.d.mts +8 -8
- package/resources/help-center/help-center.d.mts.map +1 -1
- package/resources/help-center/help-center.d.ts +8 -8
- package/resources/help-center/help-center.d.ts.map +1 -1
- package/resources/help-center/help-center.mjs.map +1 -1
- package/resources/help-center/help-centers.d.mts +9 -28
- package/resources/help-center/help-centers.d.mts.map +1 -1
- package/resources/help-center/help-centers.d.ts +9 -28
- package/resources/help-center/help-centers.d.ts.map +1 -1
- package/resources/help-center/help-centers.js +6 -3
- package/resources/help-center/help-centers.js.map +1 -1
- package/resources/help-center/help-centers.mjs +6 -3
- 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 +9 -28
- package/resources/help-center/redirect-rules.d.mts.map +1 -1
- package/resources/help-center/redirect-rules.d.ts +9 -28
- package/resources/help-center/redirect-rules.d.ts.map +1 -1
- package/resources/help-center/redirect-rules.js +6 -3
- package/resources/help-center/redirect-rules.js.map +1 -1
- package/resources/help-center/redirect-rules.mjs +6 -3
- package/resources/help-center/redirect-rules.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 +7 -5
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -2
- package/resources/index.mjs.map +1 -1
- package/resources/organization/brands.d.mts +5 -26
- package/resources/organization/brands.d.mts.map +1 -1
- package/resources/organization/brands.d.ts +5 -26
- package/resources/organization/brands.d.ts.map +1 -1
- package/resources/organization/brands.js +2 -1
- package/resources/organization/brands.js.map +1 -1
- package/resources/organization/brands.mjs +2 -1
- package/resources/organization/brands.mjs.map +1 -1
- package/resources/organization/index.d.mts +1 -1
- package/resources/organization/index.d.mts.map +1 -1
- package/resources/organization/index.d.ts +1 -1
- package/resources/organization/index.d.ts.map +1 -1
- package/resources/organization/organization.d.mts +2 -2
- package/resources/organization/organization.d.mts.map +1 -1
- package/resources/organization/organization.d.ts +2 -2
- package/resources/organization/organization.d.ts.map +1 -1
- package/resources/organization/organization.js.map +1 -1
- package/resources/organization/organization.mjs.map +1 -1
- package/resources/{products → support}/conversation-tags.d.mts +4 -4
- package/resources/{products/conversation-tags.d.ts.map → support/conversation-tags.d.mts.map} +1 -1
- package/resources/{products → support}/conversation-tags.d.ts +4 -4
- package/resources/support/conversation-tags.d.ts.map +1 -0
- package/resources/{products → support}/conversation-tags.js +4 -4
- package/resources/support/conversation-tags.js.map +1 -0
- package/resources/{products → support}/conversation-tags.mjs +4 -4
- package/resources/support/conversation-tags.mjs.map +1 -0
- package/resources/{products → support}/conversations/conversations.d.mts +15 -34
- package/resources/support/conversations/conversations.d.mts.map +1 -0
- package/resources/{products → support}/conversations/conversations.d.ts +15 -34
- package/resources/support/conversations/conversations.d.ts.map +1 -0
- package/resources/{products → support}/conversations/conversations.js +12 -9
- package/resources/support/conversations/conversations.js.map +1 -0
- package/resources/{products → support}/conversations/conversations.mjs +12 -9
- package/resources/support/conversations/conversations.mjs.map +1 -0
- package/resources/{products → support}/conversations/index.d.mts +1 -1
- package/resources/support/conversations/index.d.mts.map +1 -0
- package/resources/{products → support}/conversations/index.d.ts +1 -1
- package/resources/support/conversations/index.d.ts.map +1 -0
- package/resources/support/conversations/index.js.map +1 -0
- package/resources/support/conversations/index.mjs.map +1 -0
- package/resources/{products → support}/conversations/participants.d.mts +2 -2
- package/resources/{products/conversations/participants.d.ts.map → support/conversations/participants.d.mts.map} +1 -1
- package/resources/{products → support}/conversations/participants.d.ts +2 -2
- package/resources/support/conversations/participants.d.ts.map +1 -0
- package/resources/{products → support}/conversations/participants.js +2 -2
- package/resources/support/conversations/participants.js.map +1 -0
- package/resources/{products → support}/conversations/participants.mjs +2 -2
- package/resources/support/conversations/participants.mjs.map +1 -0
- package/resources/{products → support}/conversations/tags.d.mts +2 -2
- package/resources/{products/conversations/tags.d.ts.map → support/conversations/tags.d.mts.map} +1 -1
- package/resources/{products → support}/conversations/tags.d.ts +2 -2
- package/resources/support/conversations/tags.d.ts.map +1 -0
- package/resources/{products → support}/conversations/tags.js +2 -2
- package/resources/support/conversations/tags.js.map +1 -0
- package/resources/{products → support}/conversations/tags.mjs +2 -2
- package/resources/support/conversations/tags.mjs.map +1 -0
- package/resources/support/conversations.d.mts.map +1 -0
- package/resources/support/conversations.d.ts.map +1 -0
- package/resources/support/conversations.js.map +1 -0
- package/resources/support/conversations.mjs.map +1 -0
- package/resources/support/index.d.mts +5 -0
- package/resources/support/index.d.mts.map +1 -0
- package/resources/support/index.d.ts +5 -0
- package/resources/support/index.d.ts.map +1 -0
- package/resources/{products → support}/index.js +3 -5
- package/resources/support/index.js.map +1 -0
- package/resources/{products → support}/index.mjs +1 -2
- package/resources/support/index.mjs.map +1 -0
- package/resources/support/support.d.mts +18 -0
- package/resources/support/support.d.mts.map +1 -0
- package/resources/support/support.d.ts +18 -0
- package/resources/support/support.d.ts.map +1 -0
- package/resources/{products/products.js → support/support.js} +7 -11
- package/resources/support/support.js.map +1 -0
- package/resources/{products/products.mjs → support/support.mjs} +5 -9
- package/resources/support/support.mjs.map +1 -0
- package/resources/{products → support}/tickets/categories.d.mts +2 -2
- package/resources/{products/tickets/categories.d.ts.map → support/tickets/categories.d.mts.map} +1 -1
- package/resources/{products → support}/tickets/categories.d.ts +2 -2
- package/resources/support/tickets/categories.d.ts.map +1 -0
- package/resources/{products → support}/tickets/categories.js +2 -2
- package/resources/support/tickets/categories.js.map +1 -0
- package/resources/{products → support}/tickets/categories.mjs +2 -2
- package/resources/support/tickets/categories.mjs.map +1 -0
- package/resources/{products → support}/tickets/custom-fields.d.mts +2 -2
- package/resources/{products/tickets/custom-fields.d.ts.map → support/tickets/custom-fields.d.mts.map} +1 -1
- package/resources/{products → support}/tickets/custom-fields.d.ts +2 -2
- package/resources/support/tickets/custom-fields.d.ts.map +1 -0
- package/resources/{products → support}/tickets/custom-fields.js +2 -2
- package/resources/support/tickets/custom-fields.js.map +1 -0
- package/resources/{products → support}/tickets/custom-fields.mjs +2 -2
- package/resources/support/tickets/custom-fields.mjs.map +1 -0
- package/resources/{products → support}/tickets/index.d.mts +1 -1
- package/resources/support/tickets/index.d.mts.map +1 -0
- package/resources/{products → support}/tickets/index.d.ts +1 -1
- package/resources/support/tickets/index.d.ts.map +1 -0
- package/resources/support/tickets/index.js.map +1 -0
- package/resources/support/tickets/index.mjs.map +1 -0
- package/resources/{products → support}/tickets/statuses.d.mts +2 -2
- package/resources/{products/tickets/statuses.d.ts.map → support/tickets/statuses.d.mts.map} +1 -1
- package/resources/{products → support}/tickets/statuses.d.ts +2 -2
- package/resources/support/tickets/statuses.d.ts.map +1 -0
- package/resources/{products → support}/tickets/statuses.js +2 -2
- package/resources/support/tickets/statuses.js.map +1 -0
- package/resources/{products → support}/tickets/statuses.mjs +2 -2
- package/resources/support/tickets/statuses.mjs.map +1 -0
- package/resources/{products → support}/tickets/tickets.d.mts +14 -31
- package/resources/support/tickets/tickets.d.mts.map +1 -0
- package/resources/{products → support}/tickets/tickets.d.ts +14 -31
- package/resources/support/tickets/tickets.d.ts.map +1 -0
- package/resources/{products → support}/tickets/tickets.js +11 -7
- package/resources/support/tickets/tickets.js.map +1 -0
- package/resources/{products → support}/tickets/tickets.mjs +11 -7
- package/resources/support/tickets/tickets.mjs.map +1 -0
- package/resources/support/tickets.d.mts.map +1 -0
- package/resources/support/tickets.d.ts.map +1 -0
- package/resources/support/tickets.js.map +1 -0
- package/resources/support/tickets.mjs.map +1 -0
- package/resources/support.d.mts +2 -0
- package/resources/support.d.mts.map +1 -0
- package/resources/support.d.ts +2 -0
- package/resources/support.d.ts.map +1 -0
- package/resources/{products.js → support.js} +2 -2
- package/resources/support.js.map +1 -0
- package/{src/resources/integrations.ts → resources/support.mjs} +2 -2
- package/resources/support.mjs.map +1 -0
- package/resources/{products/surveys.d.mts → surveys.d.mts} +38 -103
- package/resources/surveys.d.mts.map +1 -0
- package/resources/{products/surveys.d.ts → surveys.d.ts} +38 -103
- package/resources/surveys.d.ts.map +1 -0
- package/resources/{products/surveys.js → surveys.js} +7 -26
- package/resources/surveys.js.map +1 -0
- package/resources/{products/surveys.mjs → surveys.mjs} +7 -26
- package/resources/surveys.mjs.map +1 -0
- package/resources/users/companies/companies.d.mts +9 -28
- package/resources/users/companies/companies.d.mts.map +1 -1
- package/resources/users/companies/companies.d.ts +9 -28
- package/resources/users/companies/companies.d.ts.map +1 -1
- package/resources/users/companies/companies.js +6 -2
- package/resources/users/companies/companies.js.map +1 -1
- package/resources/users/companies/companies.mjs +6 -2
- package/resources/users/companies/companies.mjs.map +1 -1
- package/resources/users/companies/contacts.d.mts +11 -16
- package/resources/users/companies/contacts.d.mts.map +1 -1
- package/resources/users/companies/contacts.d.ts +11 -16
- package/resources/users/companies/contacts.d.ts.map +1 -1
- package/resources/users/companies/contacts.js +8 -5
- package/resources/users/companies/contacts.js.map +1 -1
- package/resources/users/companies/contacts.mjs +8 -5
- 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/contacts/contacts.d.mts +9 -13
- package/resources/users/contacts/contacts.d.mts.map +1 -1
- package/resources/users/contacts/contacts.d.ts +9 -13
- package/resources/users/contacts/contacts.d.ts.map +1 -1
- package/resources/users/contacts/contacts.js +6 -2
- package/resources/users/contacts/contacts.js.map +1 -1
- package/resources/users/contacts/contacts.mjs +6 -2
- package/resources/users/contacts/contacts.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.js.map +1 -1
- package/resources/users/contacts/index.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.js.map +1 -1
- package/resources/users/index.mjs.map +1 -1
- package/resources/users/users.d.mts +4 -4
- package/resources/users/users.d.mts.map +1 -1
- package/resources/users/users.d.ts +4 -4
- package/resources/users/users.d.ts.map +1 -1
- package/resources/users/users.js.map +1 -1
- package/resources/users/users.mjs.map +1 -1
- package/resources/{integrations/webhooks.d.mts → webhooks.d.mts} +19 -38
- package/resources/webhooks.d.mts.map +1 -0
- package/resources/{integrations/webhooks.d.ts → webhooks.d.ts} +19 -38
- package/resources/webhooks.d.ts.map +1 -0
- package/resources/{integrations/webhooks.js → webhooks.js} +16 -13
- package/resources/webhooks.js.map +1 -0
- package/resources/{integrations/webhooks.mjs → webhooks.mjs} +16 -13
- package/resources/webhooks.mjs.map +1 -0
- package/src/client.ts +98 -14
- package/src/core/pagination.ts +157 -0
- package/src/index.ts +1 -0
- package/src/pagination.ts +2 -0
- package/src/resources/changelogs/changelogs.ts +11 -64
- package/src/resources/changelogs/index.ts +1 -1
- package/src/resources/feedback/comments.ts +12 -65
- package/src/resources/feedback/feedback.ts +4 -4
- package/src/resources/feedback/index.ts +2 -2
- package/src/resources/feedback/posts/index.ts +2 -1
- package/src/resources/feedback/posts/posts.ts +14 -66
- package/src/resources/feedback/posts/voters.ts +87 -140
- package/src/resources/help-center/articles.ts +11 -33
- package/src/resources/help-center/collections.ts +11 -34
- package/src/resources/help-center/help-center.ts +8 -8
- package/src/resources/help-center/help-centers.ts +11 -34
- package/src/resources/help-center/index.ts +4 -4
- package/src/resources/help-center/redirect-rules.ts +11 -34
- package/src/resources/index.ts +26 -3
- package/src/resources/organization/brands.ts +7 -32
- package/src/resources/organization/index.ts +1 -1
- package/src/resources/organization/organization.ts +2 -2
- package/src/resources/{products → support}/conversation-tags.ts +4 -4
- package/src/resources/{products → support}/conversations/conversations.ts +17 -40
- package/src/resources/{products → support}/conversations/index.ts +1 -1
- package/src/resources/{products → support}/conversations/participants.ts +2 -2
- package/src/resources/{products → support}/conversations/tags.ts +2 -2
- package/src/resources/{products → support}/index.ts +3 -13
- package/src/resources/{products/products.ts → support/support.ts} +9 -33
- package/src/resources/{products → support}/tickets/categories.ts +2 -2
- package/src/resources/{products → support}/tickets/custom-fields.ts +2 -2
- package/src/resources/{products → support}/tickets/index.ts +1 -1
- package/src/resources/{products → support}/tickets/statuses.ts +2 -2
- package/src/resources/{products → support}/tickets/tickets.ts +16 -37
- package/src/resources/{products.ts → support.ts} +1 -1
- package/src/resources/{products/surveys.ts → surveys.ts} +60 -128
- package/src/resources/users/companies/companies.ts +11 -34
- package/src/resources/users/companies/contacts.ts +24 -26
- package/src/resources/users/companies/index.ts +1 -1
- package/src/resources/users/contacts/contacts.ts +14 -15
- package/src/resources/users/contacts/index.ts +1 -0
- package/src/resources/users/index.ts +2 -1
- package/src/resources/users/users.ts +4 -2
- package/src/resources/{integrations/webhooks.ts → webhooks.ts} +23 -46
- 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
- package/resources/integrations/index.d.mts +0 -3
- package/resources/integrations/index.d.mts.map +0 -1
- package/resources/integrations/index.d.ts +0 -3
- package/resources/integrations/index.d.ts.map +0 -1
- package/resources/integrations/index.js +0 -9
- package/resources/integrations/index.js.map +0 -1
- package/resources/integrations/index.mjs +0 -4
- package/resources/integrations/index.mjs.map +0 -1
- package/resources/integrations/integrations.d.mts +0 -10
- package/resources/integrations/integrations.d.mts.map +0 -1
- package/resources/integrations/integrations.d.ts +0 -10
- package/resources/integrations/integrations.d.ts.map +0 -1
- package/resources/integrations/integrations.js +0 -17
- package/resources/integrations/integrations.js.map +0 -1
- package/resources/integrations/integrations.mjs +0 -12
- package/resources/integrations/integrations.mjs.map +0 -1
- package/resources/integrations/webhooks.d.mts.map +0 -1
- package/resources/integrations/webhooks.d.ts.map +0 -1
- package/resources/integrations/webhooks.js.map +0 -1
- package/resources/integrations/webhooks.mjs.map +0 -1
- package/resources/integrations.d.mts +0 -2
- package/resources/integrations.d.mts.map +0 -1
- package/resources/integrations.d.ts +0 -2
- package/resources/integrations.d.ts.map +0 -1
- package/resources/integrations.js +0 -6
- package/resources/integrations.js.map +0 -1
- package/resources/integrations.mjs +0 -3
- package/resources/integrations.mjs.map +0 -1
- package/resources/products/conversation-tags.d.mts.map +0 -1
- package/resources/products/conversation-tags.js.map +0 -1
- package/resources/products/conversation-tags.mjs.map +0 -1
- package/resources/products/conversations/conversations.d.mts.map +0 -1
- package/resources/products/conversations/conversations.d.ts.map +0 -1
- package/resources/products/conversations/conversations.js.map +0 -1
- package/resources/products/conversations/conversations.mjs.map +0 -1
- package/resources/products/conversations/index.d.mts.map +0 -1
- package/resources/products/conversations/index.d.ts.map +0 -1
- package/resources/products/conversations/index.js.map +0 -1
- package/resources/products/conversations/index.mjs.map +0 -1
- package/resources/products/conversations/participants.d.mts.map +0 -1
- package/resources/products/conversations/participants.js.map +0 -1
- package/resources/products/conversations/participants.mjs.map +0 -1
- package/resources/products/conversations/tags.d.mts.map +0 -1
- package/resources/products/conversations/tags.js.map +0 -1
- package/resources/products/conversations/tags.mjs.map +0 -1
- package/resources/products/conversations.d.mts.map +0 -1
- package/resources/products/conversations.d.ts.map +0 -1
- package/resources/products/conversations.js.map +0 -1
- package/resources/products/conversations.mjs.map +0 -1
- package/resources/products/index.d.mts +0 -6
- package/resources/products/index.d.mts.map +0 -1
- package/resources/products/index.d.ts +0 -6
- package/resources/products/index.d.ts.map +0 -1
- package/resources/products/index.js.map +0 -1
- package/resources/products/index.mjs.map +0 -1
- package/resources/products/products.d.mts +0 -22
- package/resources/products/products.d.mts.map +0 -1
- package/resources/products/products.d.ts +0 -22
- package/resources/products/products.d.ts.map +0 -1
- package/resources/products/products.js.map +0 -1
- package/resources/products/products.mjs.map +0 -1
- package/resources/products/surveys.d.mts.map +0 -1
- package/resources/products/surveys.d.ts.map +0 -1
- package/resources/products/surveys.js.map +0 -1
- package/resources/products/surveys.mjs.map +0 -1
- package/resources/products/tickets/categories.d.mts.map +0 -1
- package/resources/products/tickets/categories.js.map +0 -1
- package/resources/products/tickets/categories.mjs.map +0 -1
- package/resources/products/tickets/custom-fields.d.mts.map +0 -1
- package/resources/products/tickets/custom-fields.js.map +0 -1
- package/resources/products/tickets/custom-fields.mjs.map +0 -1
- package/resources/products/tickets/index.d.mts.map +0 -1
- package/resources/products/tickets/index.d.ts.map +0 -1
- package/resources/products/tickets/index.js.map +0 -1
- package/resources/products/tickets/index.mjs.map +0 -1
- package/resources/products/tickets/statuses.d.mts.map +0 -1
- package/resources/products/tickets/statuses.js.map +0 -1
- package/resources/products/tickets/statuses.mjs.map +0 -1
- package/resources/products/tickets/tickets.d.mts.map +0 -1
- package/resources/products/tickets/tickets.d.ts.map +0 -1
- package/resources/products/tickets/tickets.js.map +0 -1
- package/resources/products/tickets/tickets.mjs.map +0 -1
- package/resources/products/tickets.d.mts.map +0 -1
- package/resources/products/tickets.d.ts.map +0 -1
- package/resources/products/tickets.js.map +0 -1
- package/resources/products/tickets.mjs.map +0 -1
- package/resources/products.d.mts +0 -2
- package/resources/products.d.mts.map +0 -1
- package/resources/products.d.ts +0 -2
- package/resources/products.d.ts.map +0 -1
- package/resources/products.js.map +0 -1
- package/resources/products.mjs +0 -3
- package/resources/products.mjs.map +0 -1
- package/src/resources/integrations/index.ts +0 -16
- package/src/resources/integrations/integrations.ts +0 -39
- /package/resources/{products → support}/conversations/index.js +0 -0
- /package/resources/{products → support}/conversations/index.mjs +0 -0
- /package/resources/{products → support}/conversations.d.mts +0 -0
- /package/resources/{products → support}/conversations.d.ts +0 -0
- /package/resources/{products → support}/conversations.js +0 -0
- /package/resources/{products → support}/conversations.mjs +0 -0
- /package/resources/{products → support}/tickets/index.js +0 -0
- /package/resources/{products → support}/tickets/index.mjs +0 -0
- /package/resources/{products → support}/tickets.d.mts +0 -0
- /package/resources/{products → support}/tickets.d.ts +0 -0
- /package/resources/{products → support}/tickets.js +0 -0
- /package/resources/{products → support}/tickets.mjs +0 -0
- /package/src/resources/{products → support}/conversations.ts +0 -0
- /package/src/resources/{products → support}/tickets.ts +0 -0
|
@@ -20,7 +20,7 @@ export class Categories extends APIResource {
|
|
|
20
20
|
* @example
|
|
21
21
|
* ```ts
|
|
22
22
|
* const board =
|
|
23
|
-
* await client.
|
|
23
|
+
* await client.support.tickets.categories.retrieve(
|
|
24
24
|
* '507f1f77bcf86cd799439011',
|
|
25
25
|
* );
|
|
26
26
|
* ```
|
|
@@ -58,7 +58,7 @@ export class Categories extends APIResource {
|
|
|
58
58
|
* @example
|
|
59
59
|
* ```ts
|
|
60
60
|
* const boards =
|
|
61
|
-
* await client.
|
|
61
|
+
* await client.support.tickets.categories.list();
|
|
62
62
|
* ```
|
|
63
63
|
*/
|
|
64
64
|
list(
|
|
@@ -31,7 +31,7 @@ export class CustomFields extends APIResource {
|
|
|
31
31
|
* @example
|
|
32
32
|
* ```ts
|
|
33
33
|
* const customField =
|
|
34
|
-
* await client.
|
|
34
|
+
* await client.support.tickets.customFields.retrieve(
|
|
35
35
|
* '65d26304b2e65b1e1278170c',
|
|
36
36
|
* );
|
|
37
37
|
* ```
|
|
@@ -74,7 +74,7 @@ export class CustomFields extends APIResource {
|
|
|
74
74
|
* @example
|
|
75
75
|
* ```ts
|
|
76
76
|
* const customFieldList =
|
|
77
|
-
* await client.
|
|
77
|
+
* await client.support.tickets.customFields.list();
|
|
78
78
|
* ```
|
|
79
79
|
*/
|
|
80
80
|
list(
|
|
@@ -17,7 +17,6 @@ export {
|
|
|
17
17
|
Tickets,
|
|
18
18
|
type AuthorInput,
|
|
19
19
|
type Ticket,
|
|
20
|
-
type TicketListResponse,
|
|
21
20
|
type TicketDeleteResponse,
|
|
22
21
|
type TicketCreateParams,
|
|
23
22
|
type TicketRetrieveParams,
|
|
@@ -25,4 +24,5 @@ export {
|
|
|
25
24
|
type TicketListParams,
|
|
26
25
|
type TicketDeleteParams,
|
|
27
26
|
type TicketReplyParams,
|
|
27
|
+
type TicketsCursorPage,
|
|
28
28
|
} from './tickets';
|
|
@@ -19,7 +19,7 @@ export class Statuses extends APIResource {
|
|
|
19
19
|
* @example
|
|
20
20
|
* ```ts
|
|
21
21
|
* const postStatus =
|
|
22
|
-
* await client.
|
|
22
|
+
* await client.support.tickets.statuses.retrieve(
|
|
23
23
|
* '507f1f77bcf86cd799439011',
|
|
24
24
|
* );
|
|
25
25
|
* ```
|
|
@@ -54,7 +54,7 @@ export class Statuses extends APIResource {
|
|
|
54
54
|
* @example
|
|
55
55
|
* ```ts
|
|
56
56
|
* const postStatuses =
|
|
57
|
-
* await client.
|
|
57
|
+
* await client.support.tickets.statuses.list();
|
|
58
58
|
* ```
|
|
59
59
|
*/
|
|
60
60
|
list(
|
|
@@ -10,6 +10,7 @@ import { CustomFieldListParams, CustomFieldRetrieveParams, CustomFields } from '
|
|
|
10
10
|
import * as StatusesAPI from './statuses';
|
|
11
11
|
import { StatusListParams, StatusListResponse, StatusRetrieveParams, Statuses } from './statuses';
|
|
12
12
|
import { APIPromise } from '../../../core/api-promise';
|
|
13
|
+
import { CursorPage, type CursorPageParams, PagePromise } from '../../../core/pagination';
|
|
13
14
|
import { buildHeaders } from '../../../internal/headers';
|
|
14
15
|
import { RequestOptions } from '../../../internal/request-options';
|
|
15
16
|
import { path } from '../../../internal/utils/path';
|
|
@@ -78,7 +79,7 @@ export class Tickets extends APIResource {
|
|
|
78
79
|
*
|
|
79
80
|
* @example
|
|
80
81
|
* ```ts
|
|
81
|
-
* const ticket = await client.
|
|
82
|
+
* const ticket = await client.support.tickets.create({
|
|
82
83
|
* author: {},
|
|
83
84
|
* ticketCategoryId: '507f1f77bcf86cd799439011',
|
|
84
85
|
* title: 'Cannot login to dashboard',
|
|
@@ -111,7 +112,7 @@ export class Tickets extends APIResource {
|
|
|
111
112
|
*
|
|
112
113
|
* @example
|
|
113
114
|
* ```ts
|
|
114
|
-
* const ticket = await client.
|
|
115
|
+
* const ticket = await client.support.tickets.retrieve(1);
|
|
115
116
|
* ```
|
|
116
117
|
*/
|
|
117
118
|
retrieve(
|
|
@@ -172,7 +173,7 @@ export class Tickets extends APIResource {
|
|
|
172
173
|
*
|
|
173
174
|
* @example
|
|
174
175
|
* ```ts
|
|
175
|
-
* const ticket = await client.
|
|
176
|
+
* const ticket = await client.support.tickets.update(1);
|
|
176
177
|
* ```
|
|
177
178
|
*/
|
|
178
179
|
update(id: number, params: TicketUpdateParams, options?: RequestOptions): APIPromise<Ticket> {
|
|
@@ -210,15 +211,18 @@ export class Tickets extends APIResource {
|
|
|
210
211
|
*
|
|
211
212
|
* @example
|
|
212
213
|
* ```ts
|
|
213
|
-
*
|
|
214
|
+
* // Automatically fetches more pages as needed.
|
|
215
|
+
* for await (const ticket of client.support.tickets.list()) {
|
|
216
|
+
* // ...
|
|
217
|
+
* }
|
|
214
218
|
* ```
|
|
215
219
|
*/
|
|
216
220
|
list(
|
|
217
221
|
params: TicketListParams | null | undefined = {},
|
|
218
222
|
options?: RequestOptions,
|
|
219
|
-
):
|
|
223
|
+
): PagePromise<TicketsCursorPage, Ticket> {
|
|
220
224
|
const { 'Featurebase-Version': featurebaseVersion, ...query } = params ?? {};
|
|
221
|
-
return this._client.
|
|
225
|
+
return this._client.getAPIList('/v2/tickets', CursorPage<Ticket>, {
|
|
222
226
|
query,
|
|
223
227
|
...options,
|
|
224
228
|
headers: buildHeaders([
|
|
@@ -259,7 +263,7 @@ export class Tickets extends APIResource {
|
|
|
259
263
|
*
|
|
260
264
|
* @example
|
|
261
265
|
* ```ts
|
|
262
|
-
* const ticket = await client.
|
|
266
|
+
* const ticket = await client.support.tickets.delete(1);
|
|
263
267
|
* ```
|
|
264
268
|
*/
|
|
265
269
|
delete(
|
|
@@ -318,7 +322,7 @@ export class Tickets extends APIResource {
|
|
|
318
322
|
*
|
|
319
323
|
* @example
|
|
320
324
|
* ```ts
|
|
321
|
-
* const ticket = await client.
|
|
325
|
+
* const ticket = await client.support.tickets.reply(1, {
|
|
322
326
|
* body: '<p>Thank you for your help!</p>',
|
|
323
327
|
* type: 'contact',
|
|
324
328
|
* });
|
|
@@ -337,6 +341,8 @@ export class Tickets extends APIResource {
|
|
|
337
341
|
}
|
|
338
342
|
}
|
|
339
343
|
|
|
344
|
+
export type TicketsCursorPage = CursorPage<Ticket>;
|
|
345
|
+
|
|
340
346
|
/**
|
|
341
347
|
* Author to attribute the post to. If not provided, uses the authenticated user.
|
|
342
348
|
* Supports multiple identification methods: id (Featurebase ID), userId (external
|
|
@@ -663,23 +669,6 @@ export namespace Ticket {
|
|
|
663
669
|
}
|
|
664
670
|
}
|
|
665
671
|
|
|
666
|
-
export interface TicketListResponse {
|
|
667
|
-
/**
|
|
668
|
-
* Array of tickets
|
|
669
|
-
*/
|
|
670
|
-
data: Array<Ticket>;
|
|
671
|
-
|
|
672
|
-
/**
|
|
673
|
-
* Cursor for fetching the next page
|
|
674
|
-
*/
|
|
675
|
-
nextCursor: string | null;
|
|
676
|
-
|
|
677
|
-
/**
|
|
678
|
-
* Object type identifier
|
|
679
|
-
*/
|
|
680
|
-
object: 'list';
|
|
681
|
-
}
|
|
682
|
-
|
|
683
672
|
export interface TicketDeleteResponse {
|
|
684
673
|
/**
|
|
685
674
|
* Unique identifier of the deleted ticket
|
|
@@ -823,7 +812,7 @@ export interface TicketUpdateParams {
|
|
|
823
812
|
'Featurebase-Version'?: string;
|
|
824
813
|
}
|
|
825
814
|
|
|
826
|
-
export interface TicketListParams {
|
|
815
|
+
export interface TicketListParams extends CursorPageParams {
|
|
827
816
|
/**
|
|
828
817
|
* Query param
|
|
829
818
|
*/
|
|
@@ -834,16 +823,6 @@ export interface TicketListParams {
|
|
|
834
823
|
*/
|
|
835
824
|
categoryType?: 'customer' | 'tracker' | 'back-office';
|
|
836
825
|
|
|
837
|
-
/**
|
|
838
|
-
* Query param
|
|
839
|
-
*/
|
|
840
|
-
cursor?: string;
|
|
841
|
-
|
|
842
|
-
/**
|
|
843
|
-
* Query param
|
|
844
|
-
*/
|
|
845
|
-
limit?: number;
|
|
846
|
-
|
|
847
826
|
/**
|
|
848
827
|
* Query param
|
|
849
828
|
*/
|
|
@@ -987,8 +966,8 @@ export declare namespace Tickets {
|
|
|
987
966
|
export {
|
|
988
967
|
type AuthorInput as AuthorInput,
|
|
989
968
|
type Ticket as Ticket,
|
|
990
|
-
type TicketListResponse as TicketListResponse,
|
|
991
969
|
type TicketDeleteResponse as TicketDeleteResponse,
|
|
970
|
+
type TicketsCursorPage as TicketsCursorPage,
|
|
992
971
|
type TicketCreateParams as TicketCreateParams,
|
|
993
972
|
type TicketRetrieveParams as TicketRetrieveParams,
|
|
994
973
|
type TicketUpdateParams as TicketUpdateParams,
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
4
|
import * as SurveysAPI from './surveys';
|
|
5
|
-
import * as ContactsAPI from '
|
|
6
|
-
import { APIPromise } from '
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import * as ContactsAPI from './users/contacts/contacts';
|
|
6
|
+
import { APIPromise } from '../core/api-promise';
|
|
7
|
+
import { CursorPage, type CursorPageParams, PagePromise } from '../core/pagination';
|
|
8
|
+
import { buildHeaders } from '../internal/headers';
|
|
9
|
+
import { RequestOptions } from '../internal/request-options';
|
|
10
|
+
import { path } from '../internal/utils/path';
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* Surveys allow you to collect targeted feedback from your users within your product. Surveys can be targeted to specific user segments or pages and can contain multiple questions with conditional logic.
|
|
@@ -44,13 +45,6 @@ export class Surveys extends APIResource {
|
|
|
44
45
|
* ### Errors
|
|
45
46
|
*
|
|
46
47
|
* - `404` - Survey not found in your organization
|
|
47
|
-
*
|
|
48
|
-
* @example
|
|
49
|
-
* ```ts
|
|
50
|
-
* const survey = await client.products.surveys.retrieve(
|
|
51
|
-
* '6743752ca81ae59d25cf834b',
|
|
52
|
-
* );
|
|
53
|
-
* ```
|
|
54
48
|
*/
|
|
55
49
|
retrieve(
|
|
56
50
|
id: string,
|
|
@@ -98,18 +92,13 @@ export class Surveys extends APIResource {
|
|
|
98
92
|
* - `pages` - Array of survey pages/questions
|
|
99
93
|
* - `createdAt` - ISO 8601 timestamp when created
|
|
100
94
|
* - `updatedAt` - ISO 8601 timestamp when last updated
|
|
101
|
-
*
|
|
102
|
-
* @example
|
|
103
|
-
* ```ts
|
|
104
|
-
* const surveys = await client.products.surveys.list();
|
|
105
|
-
* ```
|
|
106
95
|
*/
|
|
107
96
|
list(
|
|
108
97
|
params: SurveyListParams | null | undefined = {},
|
|
109
98
|
options?: RequestOptions,
|
|
110
|
-
):
|
|
99
|
+
): PagePromise<SurveysCursorPage, Survey> {
|
|
111
100
|
const { 'Featurebase-Version': featurebaseVersion, ...query } = params ?? {};
|
|
112
|
-
return this._client.
|
|
101
|
+
return this._client.getAPIList('/v2/surveys', CursorPage<Survey>, {
|
|
113
102
|
query,
|
|
114
103
|
...options,
|
|
115
104
|
headers: buildHeaders([
|
|
@@ -156,32 +145,32 @@ export class Surveys extends APIResource {
|
|
|
156
145
|
* ### Errors
|
|
157
146
|
*
|
|
158
147
|
* - `404` - Survey not found in your organization
|
|
159
|
-
*
|
|
160
|
-
* @example
|
|
161
|
-
* ```ts
|
|
162
|
-
* const response =
|
|
163
|
-
* await client.products.surveys.retrieveResponses(
|
|
164
|
-
* '6743752ca81ae59d25cf834b',
|
|
165
|
-
* );
|
|
166
|
-
* ```
|
|
167
148
|
*/
|
|
168
|
-
|
|
149
|
+
listResponses(
|
|
169
150
|
id: string,
|
|
170
|
-
params:
|
|
151
|
+
params: SurveyListResponsesParams | null | undefined = {},
|
|
171
152
|
options?: RequestOptions,
|
|
172
|
-
):
|
|
153
|
+
): PagePromise<SurveyListResponsesResponsesCursorPage, SurveyListResponsesResponse> {
|
|
173
154
|
const { 'Featurebase-Version': featurebaseVersion, ...query } = params ?? {};
|
|
174
|
-
return this._client.
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
options
|
|
180
|
-
|
|
181
|
-
|
|
155
|
+
return this._client.getAPIList(
|
|
156
|
+
path`/v2/surveys/${id}/responses`,
|
|
157
|
+
CursorPage<SurveyListResponsesResponse>,
|
|
158
|
+
{
|
|
159
|
+
query,
|
|
160
|
+
...options,
|
|
161
|
+
headers: buildHeaders([
|
|
162
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
163
|
+
options?.headers,
|
|
164
|
+
]),
|
|
165
|
+
},
|
|
166
|
+
);
|
|
182
167
|
}
|
|
183
168
|
}
|
|
184
169
|
|
|
170
|
+
export type SurveysCursorPage = CursorPage<Survey>;
|
|
171
|
+
|
|
172
|
+
export type SurveyListResponsesResponsesCursorPage = CursorPage<SurveyListResponsesResponse>;
|
|
173
|
+
|
|
185
174
|
export interface Survey {
|
|
186
175
|
/**
|
|
187
176
|
* Unique identifier
|
|
@@ -425,100 +414,64 @@ export interface SurveyNextAction {
|
|
|
425
414
|
pageId?: string;
|
|
426
415
|
}
|
|
427
416
|
|
|
428
|
-
export interface
|
|
417
|
+
export interface SurveyListResponsesResponse {
|
|
429
418
|
/**
|
|
430
|
-
*
|
|
419
|
+
* Unique identifier
|
|
431
420
|
*/
|
|
432
|
-
|
|
421
|
+
id: string;
|
|
433
422
|
|
|
434
423
|
/**
|
|
435
|
-
*
|
|
424
|
+
* ISO 8601 timestamp when created
|
|
436
425
|
*/
|
|
437
|
-
|
|
426
|
+
createdAt: string;
|
|
438
427
|
|
|
439
428
|
/**
|
|
440
429
|
* Object type identifier
|
|
441
430
|
*/
|
|
442
|
-
object: '
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
export interface SurveyRetrieveResponsesResponse {
|
|
446
|
-
/**
|
|
447
|
-
* Array of survey responses
|
|
448
|
-
*/
|
|
449
|
-
data: Array<SurveyRetrieveResponsesResponse.Data>;
|
|
431
|
+
object: 'survey_response';
|
|
450
432
|
|
|
451
433
|
/**
|
|
452
|
-
*
|
|
434
|
+
* Individual responses to questions
|
|
453
435
|
*/
|
|
454
|
-
|
|
436
|
+
responses: Array<SurveyListResponsesResponse.Response>;
|
|
455
437
|
|
|
456
438
|
/**
|
|
457
|
-
*
|
|
439
|
+
* User who submitted the response
|
|
458
440
|
*/
|
|
459
|
-
|
|
441
|
+
user: ContactsAPI.Contact | null;
|
|
460
442
|
}
|
|
461
443
|
|
|
462
|
-
export namespace
|
|
463
|
-
export interface
|
|
444
|
+
export namespace SurveyListResponsesResponse {
|
|
445
|
+
export interface Response {
|
|
464
446
|
/**
|
|
465
|
-
*
|
|
447
|
+
* Page ID this response is for
|
|
466
448
|
*/
|
|
467
|
-
|
|
449
|
+
pageId: string;
|
|
468
450
|
|
|
469
451
|
/**
|
|
470
|
-
*
|
|
452
|
+
* Response type
|
|
471
453
|
*/
|
|
472
|
-
|
|
454
|
+
type: 'text' | 'link' | 'rating' | 'multiple-choice';
|
|
473
455
|
|
|
474
456
|
/**
|
|
475
|
-
*
|
|
457
|
+
* Response value
|
|
476
458
|
*/
|
|
477
|
-
|
|
459
|
+
value: string | number | boolean | Array<string>;
|
|
478
460
|
|
|
479
461
|
/**
|
|
480
|
-
*
|
|
462
|
+
* Response ID
|
|
481
463
|
*/
|
|
482
|
-
|
|
464
|
+
id?: string;
|
|
483
465
|
|
|
484
466
|
/**
|
|
485
|
-
*
|
|
467
|
+
* ISO 8601 timestamp when created
|
|
486
468
|
*/
|
|
487
|
-
|
|
488
|
-
}
|
|
469
|
+
createdAt?: string;
|
|
489
470
|
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
*/
|
|
495
|
-
pageId: string;
|
|
496
|
-
|
|
497
|
-
/**
|
|
498
|
-
* Response type
|
|
499
|
-
*/
|
|
500
|
-
type: 'text' | 'link' | 'rating' | 'multiple-choice';
|
|
501
|
-
|
|
502
|
-
/**
|
|
503
|
-
* Response value
|
|
504
|
-
*/
|
|
505
|
-
value: string | number | boolean | Array<string>;
|
|
506
|
-
|
|
507
|
-
/**
|
|
508
|
-
* Response ID
|
|
509
|
-
*/
|
|
510
|
-
id?: string;
|
|
511
|
-
|
|
512
|
-
/**
|
|
513
|
-
* ISO 8601 timestamp when created
|
|
514
|
-
*/
|
|
515
|
-
createdAt?: string;
|
|
516
|
-
|
|
517
|
-
/**
|
|
518
|
-
* ISO 8601 timestamp when updated
|
|
519
|
-
*/
|
|
520
|
-
updatedAt?: string;
|
|
521
|
-
}
|
|
471
|
+
/**
|
|
472
|
+
* ISO 8601 timestamp when updated
|
|
473
|
+
*/
|
|
474
|
+
updatedAt?: string;
|
|
522
475
|
}
|
|
523
476
|
}
|
|
524
477
|
|
|
@@ -530,23 +483,12 @@ export interface SurveyRetrieveParams {
|
|
|
530
483
|
'Featurebase-Version'?: string;
|
|
531
484
|
}
|
|
532
485
|
|
|
533
|
-
export interface SurveyListParams {
|
|
534
|
-
/**
|
|
535
|
-
* Query param: An opaque cursor for pagination. Use the nextCursor value from a
|
|
536
|
-
* previous response to fetch the next page.
|
|
537
|
-
*/
|
|
538
|
-
cursor?: string;
|
|
539
|
-
|
|
486
|
+
export interface SurveyListParams extends CursorPageParams {
|
|
540
487
|
/**
|
|
541
488
|
* Query param: Filter by active status
|
|
542
489
|
*/
|
|
543
490
|
isActive?: boolean | null;
|
|
544
491
|
|
|
545
|
-
/**
|
|
546
|
-
* Query param: A limit on the number of objects to be returned, between 1 and 100.
|
|
547
|
-
*/
|
|
548
|
-
limit?: number;
|
|
549
|
-
|
|
550
492
|
/**
|
|
551
493
|
* Query param: Filter by survey page type
|
|
552
494
|
*/
|
|
@@ -559,18 +501,7 @@ export interface SurveyListParams {
|
|
|
559
501
|
'Featurebase-Version'?: string;
|
|
560
502
|
}
|
|
561
503
|
|
|
562
|
-
export interface
|
|
563
|
-
/**
|
|
564
|
-
* Query param: An opaque cursor for pagination. Use the nextCursor value from a
|
|
565
|
-
* previous response to fetch the next page.
|
|
566
|
-
*/
|
|
567
|
-
cursor?: string;
|
|
568
|
-
|
|
569
|
-
/**
|
|
570
|
-
* Query param: A limit on the number of objects to be returned, between 1 and 100.
|
|
571
|
-
*/
|
|
572
|
-
limit?: number;
|
|
573
|
-
|
|
504
|
+
export interface SurveyListResponsesParams extends CursorPageParams {
|
|
574
505
|
/**
|
|
575
506
|
* Query param: Filter by survey page ID
|
|
576
507
|
*/
|
|
@@ -587,10 +518,11 @@ export declare namespace Surveys {
|
|
|
587
518
|
export {
|
|
588
519
|
type Survey as Survey,
|
|
589
520
|
type SurveyNextAction as SurveyNextAction,
|
|
590
|
-
type
|
|
591
|
-
type
|
|
521
|
+
type SurveyListResponsesResponse as SurveyListResponsesResponse,
|
|
522
|
+
type SurveysCursorPage as SurveysCursorPage,
|
|
523
|
+
type SurveyListResponsesResponsesCursorPage as SurveyListResponsesResponsesCursorPage,
|
|
592
524
|
type SurveyRetrieveParams as SurveyRetrieveParams,
|
|
593
525
|
type SurveyListParams as SurveyListParams,
|
|
594
|
-
type
|
|
526
|
+
type SurveyListResponsesParams as SurveyListResponsesParams,
|
|
595
527
|
};
|
|
596
528
|
}
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
Contacts,
|
|
12
12
|
} from './contacts';
|
|
13
13
|
import { APIPromise } from '../../../core/api-promise';
|
|
14
|
+
import { CursorPage, type CursorPageParams, PagePromise } from '../../../core/pagination';
|
|
14
15
|
import { buildHeaders } from '../../../internal/headers';
|
|
15
16
|
import { RequestOptions } from '../../../internal/request-options';
|
|
16
17
|
import { path } from '../../../internal/utils/path';
|
|
@@ -164,15 +165,18 @@ export class Companies extends APIResource {
|
|
|
164
165
|
*
|
|
165
166
|
* @example
|
|
166
167
|
* ```ts
|
|
167
|
-
*
|
|
168
|
+
* // Automatically fetches more pages as needed.
|
|
169
|
+
* for await (const company of client.users.companies.list()) {
|
|
170
|
+
* // ...
|
|
171
|
+
* }
|
|
168
172
|
* ```
|
|
169
173
|
*/
|
|
170
174
|
list(
|
|
171
175
|
params: CompanyListParams | null | undefined = {},
|
|
172
176
|
options?: RequestOptions,
|
|
173
|
-
):
|
|
177
|
+
): PagePromise<CompaniesCursorPage, Company> {
|
|
174
178
|
const { 'Featurebase-Version': featurebaseVersion, ...query } = params ?? {};
|
|
175
|
-
return this._client.
|
|
179
|
+
return this._client.getAPIList('/v2/companies', CursorPage<Company>, {
|
|
176
180
|
query,
|
|
177
181
|
...options,
|
|
178
182
|
headers: buildHeaders([
|
|
@@ -389,6 +393,8 @@ export class Companies extends APIResource {
|
|
|
389
393
|
}
|
|
390
394
|
}
|
|
391
395
|
|
|
396
|
+
export type CompaniesCursorPage = CursorPage<Company>;
|
|
397
|
+
|
|
392
398
|
export interface Company {
|
|
393
399
|
/**
|
|
394
400
|
* Featurebase internal ID
|
|
@@ -478,23 +484,6 @@ export interface DeletedCompany {
|
|
|
478
484
|
object: 'company';
|
|
479
485
|
}
|
|
480
486
|
|
|
481
|
-
export interface CompanyListResponse {
|
|
482
|
-
/**
|
|
483
|
-
* Array of companies
|
|
484
|
-
*/
|
|
485
|
-
data: Array<Company>;
|
|
486
|
-
|
|
487
|
-
/**
|
|
488
|
-
* Cursor for fetching the next page (cursor-based pagination)
|
|
489
|
-
*/
|
|
490
|
-
nextCursor: string | null;
|
|
491
|
-
|
|
492
|
-
/**
|
|
493
|
-
* Object type identifier
|
|
494
|
-
*/
|
|
495
|
-
object: 'list';
|
|
496
|
-
}
|
|
497
|
-
|
|
498
487
|
export interface CompanyRetrieveParams {
|
|
499
488
|
/**
|
|
500
489
|
* API version for this request. Defaults to your organization's configured API
|
|
@@ -503,19 +492,7 @@ export interface CompanyRetrieveParams {
|
|
|
503
492
|
'Featurebase-Version'?: string;
|
|
504
493
|
}
|
|
505
494
|
|
|
506
|
-
export interface CompanyListParams {
|
|
507
|
-
/**
|
|
508
|
-
* Query param: An opaque cursor for pagination. Use the nextCursor value from a
|
|
509
|
-
* previous response to fetch the next page of results.
|
|
510
|
-
*/
|
|
511
|
-
cursor?: string;
|
|
512
|
-
|
|
513
|
-
/**
|
|
514
|
-
* Query param: A limit on the number of companies to be returned, between 1
|
|
515
|
-
* and 100.
|
|
516
|
-
*/
|
|
517
|
-
limit?: number;
|
|
518
|
-
|
|
495
|
+
export interface CompanyListParams extends CursorPageParams {
|
|
519
496
|
/**
|
|
520
497
|
* Header param: API version for this request. Defaults to your organization's
|
|
521
498
|
* configured API version if not specified.
|
|
@@ -614,7 +591,7 @@ export declare namespace Companies {
|
|
|
614
591
|
export {
|
|
615
592
|
type Company as Company,
|
|
616
593
|
type DeletedCompany as DeletedCompany,
|
|
617
|
-
type
|
|
594
|
+
type CompaniesCursorPage as CompaniesCursorPage,
|
|
618
595
|
type CompanyRetrieveParams as CompanyRetrieveParams,
|
|
619
596
|
type CompanyListParams as CompanyListParams,
|
|
620
597
|
type CompanyDeleteParams as CompanyDeleteParams,
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
4
|
import * as UsersContactsAPI from '../contacts/contacts';
|
|
5
|
+
import { ContactListDataCursorPage } from '../contacts/contacts';
|
|
5
6
|
import { APIPromise } from '../../../core/api-promise';
|
|
7
|
+
import { CursorPage, type CursorPageParams, PagePromise } from '../../../core/pagination';
|
|
6
8
|
import { buildHeaders } from '../../../internal/headers';
|
|
7
9
|
import { RequestOptions } from '../../../internal/request-options';
|
|
8
10
|
import { path } from '../../../internal/utils/path';
|
|
@@ -65,26 +67,32 @@ export class Contacts extends APIResource {
|
|
|
65
67
|
*
|
|
66
68
|
* @example
|
|
67
69
|
* ```ts
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
70
|
+
* // Automatically fetches more pages as needed.
|
|
71
|
+
* for await (const contact of client.users.companies.contacts.list(
|
|
72
|
+
* '507f1f77bcf86cd799439011',
|
|
73
|
+
* )) {
|
|
74
|
+
* // ...
|
|
75
|
+
* }
|
|
72
76
|
* ```
|
|
73
77
|
*/
|
|
74
78
|
list(
|
|
75
79
|
id: string,
|
|
76
80
|
params: ContactListParams | null | undefined = {},
|
|
77
81
|
options?: RequestOptions,
|
|
78
|
-
):
|
|
82
|
+
): PagePromise<ContactListDataCursorPage, UsersContactsAPI.ContactList.Data> {
|
|
79
83
|
const { 'Featurebase-Version': featurebaseVersion, ...query } = params ?? {};
|
|
80
|
-
return this._client.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
options
|
|
86
|
-
|
|
87
|
-
|
|
84
|
+
return this._client.getAPIList(
|
|
85
|
+
path`/v2/companies/${id}/contacts`,
|
|
86
|
+
CursorPage<UsersContactsAPI.ContactList.Data>,
|
|
87
|
+
{
|
|
88
|
+
query,
|
|
89
|
+
...options,
|
|
90
|
+
headers: buildHeaders([
|
|
91
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
92
|
+
options?.headers,
|
|
93
|
+
]),
|
|
94
|
+
},
|
|
95
|
+
);
|
|
88
96
|
}
|
|
89
97
|
|
|
90
98
|
/**
|
|
@@ -244,19 +252,7 @@ export type ContactAttachResponse = UsersContactsAPI.Contact | (null & {});
|
|
|
244
252
|
*/
|
|
245
253
|
export type ContactRemoveResponse = UsersContactsAPI.Contact | (null & {});
|
|
246
254
|
|
|
247
|
-
export interface ContactListParams {
|
|
248
|
-
/**
|
|
249
|
-
* Query param: An opaque cursor for pagination. Use the nextCursor value from a
|
|
250
|
-
* previous response to fetch the next page of results.
|
|
251
|
-
*/
|
|
252
|
-
cursor?: string;
|
|
253
|
-
|
|
254
|
-
/**
|
|
255
|
-
* Query param: A limit on the number of contacts to be returned, between 1
|
|
256
|
-
* and 100.
|
|
257
|
-
*/
|
|
258
|
-
limit?: number;
|
|
259
|
-
|
|
255
|
+
export interface ContactListParams extends CursorPageParams {
|
|
260
256
|
/**
|
|
261
257
|
* Header param: API version for this request. Defaults to your organization's
|
|
262
258
|
* configured API version if not specified.
|
|
@@ -300,3 +296,5 @@ export declare namespace Contacts {
|
|
|
300
296
|
type ContactRemoveParams as ContactRemoveParams,
|
|
301
297
|
};
|
|
302
298
|
}
|
|
299
|
+
|
|
300
|
+
export { type ContactListDataCursorPage };
|