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
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { APIResource } from "
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
2
|
import * as SurveysAPI from "./surveys.mjs";
|
|
3
|
-
import * as ContactsAPI from "
|
|
4
|
-
import { APIPromise } from "
|
|
5
|
-
import {
|
|
3
|
+
import * as ContactsAPI from "./users/contacts/contacts.mjs";
|
|
4
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
5
|
+
import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.mjs";
|
|
6
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
6
7
|
/**
|
|
7
8
|
* 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.
|
|
8
9
|
*/
|
|
@@ -39,13 +40,6 @@ export declare class Surveys extends APIResource {
|
|
|
39
40
|
* ### Errors
|
|
40
41
|
*
|
|
41
42
|
* - `404` - Survey not found in your organization
|
|
42
|
-
*
|
|
43
|
-
* @example
|
|
44
|
-
* ```ts
|
|
45
|
-
* const survey = await client.products.surveys.retrieve(
|
|
46
|
-
* '6743752ca81ae59d25cf834b',
|
|
47
|
-
* );
|
|
48
|
-
* ```
|
|
49
43
|
*/
|
|
50
44
|
retrieve(id: string, params?: SurveyRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<Survey>;
|
|
51
45
|
/**
|
|
@@ -79,13 +73,8 @@ export declare class Surveys extends APIResource {
|
|
|
79
73
|
* - `pages` - Array of survey pages/questions
|
|
80
74
|
* - `createdAt` - ISO 8601 timestamp when created
|
|
81
75
|
* - `updatedAt` - ISO 8601 timestamp when last updated
|
|
82
|
-
*
|
|
83
|
-
* @example
|
|
84
|
-
* ```ts
|
|
85
|
-
* const surveys = await client.products.surveys.list();
|
|
86
|
-
* ```
|
|
87
76
|
*/
|
|
88
|
-
list(params?: SurveyListParams | null | undefined, options?: RequestOptions):
|
|
77
|
+
list(params?: SurveyListParams | null | undefined, options?: RequestOptions): PagePromise<SurveysCursorPage, Survey>;
|
|
89
78
|
/**
|
|
90
79
|
* Retrieves all user responses for a specific survey.
|
|
91
80
|
*
|
|
@@ -123,17 +112,11 @@ export declare class Surveys extends APIResource {
|
|
|
123
112
|
* ### Errors
|
|
124
113
|
*
|
|
125
114
|
* - `404` - Survey not found in your organization
|
|
126
|
-
*
|
|
127
|
-
* @example
|
|
128
|
-
* ```ts
|
|
129
|
-
* const response =
|
|
130
|
-
* await client.products.surveys.retrieveResponses(
|
|
131
|
-
* '6743752ca81ae59d25cf834b',
|
|
132
|
-
* );
|
|
133
|
-
* ```
|
|
134
115
|
*/
|
|
135
|
-
|
|
116
|
+
listResponses(id: string, params?: SurveyListResponsesParams | null | undefined, options?: RequestOptions): PagePromise<SurveyListResponsesResponsesCursorPage, SurveyListResponsesResponse>;
|
|
136
117
|
}
|
|
118
|
+
export type SurveysCursorPage = CursorPage<Survey>;
|
|
119
|
+
export type SurveyListResponsesResponsesCursorPage = CursorPage<SurveyListResponsesResponse>;
|
|
137
120
|
export interface Survey {
|
|
138
121
|
/**
|
|
139
122
|
* Unique identifier
|
|
@@ -334,84 +317,54 @@ export interface SurveyNextAction {
|
|
|
334
317
|
*/
|
|
335
318
|
pageId?: string;
|
|
336
319
|
}
|
|
337
|
-
export interface
|
|
320
|
+
export interface SurveyListResponsesResponse {
|
|
338
321
|
/**
|
|
339
|
-
*
|
|
322
|
+
* Unique identifier
|
|
340
323
|
*/
|
|
341
|
-
|
|
324
|
+
id: string;
|
|
342
325
|
/**
|
|
343
|
-
*
|
|
326
|
+
* ISO 8601 timestamp when created
|
|
344
327
|
*/
|
|
345
|
-
|
|
328
|
+
createdAt: string;
|
|
346
329
|
/**
|
|
347
330
|
* Object type identifier
|
|
348
331
|
*/
|
|
349
|
-
object: '
|
|
350
|
-
}
|
|
351
|
-
export interface SurveyRetrieveResponsesResponse {
|
|
352
|
-
/**
|
|
353
|
-
* Array of survey responses
|
|
354
|
-
*/
|
|
355
|
-
data: Array<SurveyRetrieveResponsesResponse.Data>;
|
|
332
|
+
object: 'survey_response';
|
|
356
333
|
/**
|
|
357
|
-
*
|
|
334
|
+
* Individual responses to questions
|
|
358
335
|
*/
|
|
359
|
-
|
|
336
|
+
responses: Array<SurveyListResponsesResponse.Response>;
|
|
360
337
|
/**
|
|
361
|
-
*
|
|
338
|
+
* User who submitted the response
|
|
362
339
|
*/
|
|
363
|
-
|
|
340
|
+
user: ContactsAPI.Contact | null;
|
|
364
341
|
}
|
|
365
|
-
export declare namespace
|
|
366
|
-
interface
|
|
342
|
+
export declare namespace SurveyListResponsesResponse {
|
|
343
|
+
interface Response {
|
|
367
344
|
/**
|
|
368
|
-
*
|
|
345
|
+
* Page ID this response is for
|
|
369
346
|
*/
|
|
370
|
-
|
|
347
|
+
pageId: string;
|
|
371
348
|
/**
|
|
372
|
-
*
|
|
349
|
+
* Response type
|
|
373
350
|
*/
|
|
374
|
-
|
|
351
|
+
type: 'text' | 'link' | 'rating' | 'multiple-choice';
|
|
375
352
|
/**
|
|
376
|
-
*
|
|
353
|
+
* Response value
|
|
377
354
|
*/
|
|
378
|
-
|
|
355
|
+
value: string | number | boolean | Array<string>;
|
|
379
356
|
/**
|
|
380
|
-
*
|
|
357
|
+
* Response ID
|
|
381
358
|
*/
|
|
382
|
-
|
|
359
|
+
id?: string;
|
|
383
360
|
/**
|
|
384
|
-
*
|
|
361
|
+
* ISO 8601 timestamp when created
|
|
385
362
|
*/
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
* Page ID this response is for
|
|
392
|
-
*/
|
|
393
|
-
pageId: string;
|
|
394
|
-
/**
|
|
395
|
-
* Response type
|
|
396
|
-
*/
|
|
397
|
-
type: 'text' | 'link' | 'rating' | 'multiple-choice';
|
|
398
|
-
/**
|
|
399
|
-
* Response value
|
|
400
|
-
*/
|
|
401
|
-
value: string | number | boolean | Array<string>;
|
|
402
|
-
/**
|
|
403
|
-
* Response ID
|
|
404
|
-
*/
|
|
405
|
-
id?: string;
|
|
406
|
-
/**
|
|
407
|
-
* ISO 8601 timestamp when created
|
|
408
|
-
*/
|
|
409
|
-
createdAt?: string;
|
|
410
|
-
/**
|
|
411
|
-
* ISO 8601 timestamp when updated
|
|
412
|
-
*/
|
|
413
|
-
updatedAt?: string;
|
|
414
|
-
}
|
|
363
|
+
createdAt?: string;
|
|
364
|
+
/**
|
|
365
|
+
* ISO 8601 timestamp when updated
|
|
366
|
+
*/
|
|
367
|
+
updatedAt?: string;
|
|
415
368
|
}
|
|
416
369
|
}
|
|
417
370
|
export interface SurveyRetrieveParams {
|
|
@@ -421,20 +374,11 @@ export interface SurveyRetrieveParams {
|
|
|
421
374
|
*/
|
|
422
375
|
'Featurebase-Version'?: string;
|
|
423
376
|
}
|
|
424
|
-
export interface SurveyListParams {
|
|
425
|
-
/**
|
|
426
|
-
* Query param: An opaque cursor for pagination. Use the nextCursor value from a
|
|
427
|
-
* previous response to fetch the next page.
|
|
428
|
-
*/
|
|
429
|
-
cursor?: string;
|
|
377
|
+
export interface SurveyListParams extends CursorPageParams {
|
|
430
378
|
/**
|
|
431
379
|
* Query param: Filter by active status
|
|
432
380
|
*/
|
|
433
381
|
isActive?: boolean | null;
|
|
434
|
-
/**
|
|
435
|
-
* Query param: A limit on the number of objects to be returned, between 1 and 100.
|
|
436
|
-
*/
|
|
437
|
-
limit?: number;
|
|
438
382
|
/**
|
|
439
383
|
* Query param: Filter by survey page type
|
|
440
384
|
*/
|
|
@@ -445,16 +389,7 @@ export interface SurveyListParams {
|
|
|
445
389
|
*/
|
|
446
390
|
'Featurebase-Version'?: string;
|
|
447
391
|
}
|
|
448
|
-
export interface
|
|
449
|
-
/**
|
|
450
|
-
* Query param: An opaque cursor for pagination. Use the nextCursor value from a
|
|
451
|
-
* previous response to fetch the next page.
|
|
452
|
-
*/
|
|
453
|
-
cursor?: string;
|
|
454
|
-
/**
|
|
455
|
-
* Query param: A limit on the number of objects to be returned, between 1 and 100.
|
|
456
|
-
*/
|
|
457
|
-
limit?: number;
|
|
392
|
+
export interface SurveyListResponsesParams extends CursorPageParams {
|
|
458
393
|
/**
|
|
459
394
|
* Query param: Filter by survey page ID
|
|
460
395
|
*/
|
|
@@ -466,6 +401,6 @@ export interface SurveyRetrieveResponsesParams {
|
|
|
466
401
|
'Featurebase-Version'?: string;
|
|
467
402
|
}
|
|
468
403
|
export declare namespace Surveys {
|
|
469
|
-
export { type Survey as Survey, type SurveyNextAction as SurveyNextAction, type
|
|
404
|
+
export { type Survey as Survey, type SurveyNextAction as SurveyNextAction, type SurveyListResponsesResponse as SurveyListResponsesResponse, type SurveysCursorPage as SurveysCursorPage, type SurveyListResponsesResponsesCursorPage as SurveyListResponsesResponsesCursorPage, type SurveyRetrieveParams as SurveyRetrieveParams, type SurveyListParams as SurveyListParams, type SurveyListResponsesParams as SurveyListResponsesParams, };
|
|
470
405
|
}
|
|
471
406
|
//# sourceMappingURL=surveys.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surveys.d.mts","sourceRoot":"","sources":["../src/resources/surveys.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,KAAK,WAAW;OA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gBAAgB,EACzC,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,sCAAsC,IAAI,sCAAsC,EACrF,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { APIResource } from "
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
2
|
import * as SurveysAPI from "./surveys.js";
|
|
3
|
-
import * as ContactsAPI from "
|
|
4
|
-
import { APIPromise } from "
|
|
5
|
-
import {
|
|
3
|
+
import * as ContactsAPI from "./users/contacts/contacts.js";
|
|
4
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
5
|
+
import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.js";
|
|
6
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
6
7
|
/**
|
|
7
8
|
* 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.
|
|
8
9
|
*/
|
|
@@ -39,13 +40,6 @@ export declare class Surveys extends APIResource {
|
|
|
39
40
|
* ### Errors
|
|
40
41
|
*
|
|
41
42
|
* - `404` - Survey not found in your organization
|
|
42
|
-
*
|
|
43
|
-
* @example
|
|
44
|
-
* ```ts
|
|
45
|
-
* const survey = await client.products.surveys.retrieve(
|
|
46
|
-
* '6743752ca81ae59d25cf834b',
|
|
47
|
-
* );
|
|
48
|
-
* ```
|
|
49
43
|
*/
|
|
50
44
|
retrieve(id: string, params?: SurveyRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<Survey>;
|
|
51
45
|
/**
|
|
@@ -79,13 +73,8 @@ export declare class Surveys extends APIResource {
|
|
|
79
73
|
* - `pages` - Array of survey pages/questions
|
|
80
74
|
* - `createdAt` - ISO 8601 timestamp when created
|
|
81
75
|
* - `updatedAt` - ISO 8601 timestamp when last updated
|
|
82
|
-
*
|
|
83
|
-
* @example
|
|
84
|
-
* ```ts
|
|
85
|
-
* const surveys = await client.products.surveys.list();
|
|
86
|
-
* ```
|
|
87
76
|
*/
|
|
88
|
-
list(params?: SurveyListParams | null | undefined, options?: RequestOptions):
|
|
77
|
+
list(params?: SurveyListParams | null | undefined, options?: RequestOptions): PagePromise<SurveysCursorPage, Survey>;
|
|
89
78
|
/**
|
|
90
79
|
* Retrieves all user responses for a specific survey.
|
|
91
80
|
*
|
|
@@ -123,17 +112,11 @@ export declare class Surveys extends APIResource {
|
|
|
123
112
|
* ### Errors
|
|
124
113
|
*
|
|
125
114
|
* - `404` - Survey not found in your organization
|
|
126
|
-
*
|
|
127
|
-
* @example
|
|
128
|
-
* ```ts
|
|
129
|
-
* const response =
|
|
130
|
-
* await client.products.surveys.retrieveResponses(
|
|
131
|
-
* '6743752ca81ae59d25cf834b',
|
|
132
|
-
* );
|
|
133
|
-
* ```
|
|
134
115
|
*/
|
|
135
|
-
|
|
116
|
+
listResponses(id: string, params?: SurveyListResponsesParams | null | undefined, options?: RequestOptions): PagePromise<SurveyListResponsesResponsesCursorPage, SurveyListResponsesResponse>;
|
|
136
117
|
}
|
|
118
|
+
export type SurveysCursorPage = CursorPage<Survey>;
|
|
119
|
+
export type SurveyListResponsesResponsesCursorPage = CursorPage<SurveyListResponsesResponse>;
|
|
137
120
|
export interface Survey {
|
|
138
121
|
/**
|
|
139
122
|
* Unique identifier
|
|
@@ -334,84 +317,54 @@ export interface SurveyNextAction {
|
|
|
334
317
|
*/
|
|
335
318
|
pageId?: string;
|
|
336
319
|
}
|
|
337
|
-
export interface
|
|
320
|
+
export interface SurveyListResponsesResponse {
|
|
338
321
|
/**
|
|
339
|
-
*
|
|
322
|
+
* Unique identifier
|
|
340
323
|
*/
|
|
341
|
-
|
|
324
|
+
id: string;
|
|
342
325
|
/**
|
|
343
|
-
*
|
|
326
|
+
* ISO 8601 timestamp when created
|
|
344
327
|
*/
|
|
345
|
-
|
|
328
|
+
createdAt: string;
|
|
346
329
|
/**
|
|
347
330
|
* Object type identifier
|
|
348
331
|
*/
|
|
349
|
-
object: '
|
|
350
|
-
}
|
|
351
|
-
export interface SurveyRetrieveResponsesResponse {
|
|
352
|
-
/**
|
|
353
|
-
* Array of survey responses
|
|
354
|
-
*/
|
|
355
|
-
data: Array<SurveyRetrieveResponsesResponse.Data>;
|
|
332
|
+
object: 'survey_response';
|
|
356
333
|
/**
|
|
357
|
-
*
|
|
334
|
+
* Individual responses to questions
|
|
358
335
|
*/
|
|
359
|
-
|
|
336
|
+
responses: Array<SurveyListResponsesResponse.Response>;
|
|
360
337
|
/**
|
|
361
|
-
*
|
|
338
|
+
* User who submitted the response
|
|
362
339
|
*/
|
|
363
|
-
|
|
340
|
+
user: ContactsAPI.Contact | null;
|
|
364
341
|
}
|
|
365
|
-
export declare namespace
|
|
366
|
-
interface
|
|
342
|
+
export declare namespace SurveyListResponsesResponse {
|
|
343
|
+
interface Response {
|
|
367
344
|
/**
|
|
368
|
-
*
|
|
345
|
+
* Page ID this response is for
|
|
369
346
|
*/
|
|
370
|
-
|
|
347
|
+
pageId: string;
|
|
371
348
|
/**
|
|
372
|
-
*
|
|
349
|
+
* Response type
|
|
373
350
|
*/
|
|
374
|
-
|
|
351
|
+
type: 'text' | 'link' | 'rating' | 'multiple-choice';
|
|
375
352
|
/**
|
|
376
|
-
*
|
|
353
|
+
* Response value
|
|
377
354
|
*/
|
|
378
|
-
|
|
355
|
+
value: string | number | boolean | Array<string>;
|
|
379
356
|
/**
|
|
380
|
-
*
|
|
357
|
+
* Response ID
|
|
381
358
|
*/
|
|
382
|
-
|
|
359
|
+
id?: string;
|
|
383
360
|
/**
|
|
384
|
-
*
|
|
361
|
+
* ISO 8601 timestamp when created
|
|
385
362
|
*/
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
* Page ID this response is for
|
|
392
|
-
*/
|
|
393
|
-
pageId: string;
|
|
394
|
-
/**
|
|
395
|
-
* Response type
|
|
396
|
-
*/
|
|
397
|
-
type: 'text' | 'link' | 'rating' | 'multiple-choice';
|
|
398
|
-
/**
|
|
399
|
-
* Response value
|
|
400
|
-
*/
|
|
401
|
-
value: string | number | boolean | Array<string>;
|
|
402
|
-
/**
|
|
403
|
-
* Response ID
|
|
404
|
-
*/
|
|
405
|
-
id?: string;
|
|
406
|
-
/**
|
|
407
|
-
* ISO 8601 timestamp when created
|
|
408
|
-
*/
|
|
409
|
-
createdAt?: string;
|
|
410
|
-
/**
|
|
411
|
-
* ISO 8601 timestamp when updated
|
|
412
|
-
*/
|
|
413
|
-
updatedAt?: string;
|
|
414
|
-
}
|
|
363
|
+
createdAt?: string;
|
|
364
|
+
/**
|
|
365
|
+
* ISO 8601 timestamp when updated
|
|
366
|
+
*/
|
|
367
|
+
updatedAt?: string;
|
|
415
368
|
}
|
|
416
369
|
}
|
|
417
370
|
export interface SurveyRetrieveParams {
|
|
@@ -421,20 +374,11 @@ export interface SurveyRetrieveParams {
|
|
|
421
374
|
*/
|
|
422
375
|
'Featurebase-Version'?: string;
|
|
423
376
|
}
|
|
424
|
-
export interface SurveyListParams {
|
|
425
|
-
/**
|
|
426
|
-
* Query param: An opaque cursor for pagination. Use the nextCursor value from a
|
|
427
|
-
* previous response to fetch the next page.
|
|
428
|
-
*/
|
|
429
|
-
cursor?: string;
|
|
377
|
+
export interface SurveyListParams extends CursorPageParams {
|
|
430
378
|
/**
|
|
431
379
|
* Query param: Filter by active status
|
|
432
380
|
*/
|
|
433
381
|
isActive?: boolean | null;
|
|
434
|
-
/**
|
|
435
|
-
* Query param: A limit on the number of objects to be returned, between 1 and 100.
|
|
436
|
-
*/
|
|
437
|
-
limit?: number;
|
|
438
382
|
/**
|
|
439
383
|
* Query param: Filter by survey page type
|
|
440
384
|
*/
|
|
@@ -445,16 +389,7 @@ export interface SurveyListParams {
|
|
|
445
389
|
*/
|
|
446
390
|
'Featurebase-Version'?: string;
|
|
447
391
|
}
|
|
448
|
-
export interface
|
|
449
|
-
/**
|
|
450
|
-
* Query param: An opaque cursor for pagination. Use the nextCursor value from a
|
|
451
|
-
* previous response to fetch the next page.
|
|
452
|
-
*/
|
|
453
|
-
cursor?: string;
|
|
454
|
-
/**
|
|
455
|
-
* Query param: A limit on the number of objects to be returned, between 1 and 100.
|
|
456
|
-
*/
|
|
457
|
-
limit?: number;
|
|
392
|
+
export interface SurveyListResponsesParams extends CursorPageParams {
|
|
458
393
|
/**
|
|
459
394
|
* Query param: Filter by survey page ID
|
|
460
395
|
*/
|
|
@@ -466,6 +401,6 @@ export interface SurveyRetrieveResponsesParams {
|
|
|
466
401
|
'Featurebase-Version'?: string;
|
|
467
402
|
}
|
|
468
403
|
export declare namespace Surveys {
|
|
469
|
-
export { type Survey as Survey, type SurveyNextAction as SurveyNextAction, type
|
|
404
|
+
export { type Survey as Survey, type SurveyNextAction as SurveyNextAction, type SurveyListResponsesResponse as SurveyListResponsesResponse, type SurveysCursorPage as SurveysCursorPage, type SurveyListResponsesResponsesCursorPage as SurveyListResponsesResponsesCursorPage, type SurveyRetrieveParams as SurveyRetrieveParams, type SurveyListParams as SurveyListParams, type SurveyListResponsesParams as SurveyListResponsesParams, };
|
|
470
405
|
}
|
|
471
406
|
//# sourceMappingURL=surveys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surveys.d.ts","sourceRoot":"","sources":["../src/resources/surveys.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAElD,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACH,QAAQ,CACN,EAAE,EAAE,MAAM,EACV,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}
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Surveys = void 0;
|
|
5
|
-
const resource_1 = require("
|
|
6
|
-
const
|
|
7
|
-
const
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../core/pagination.js");
|
|
7
|
+
const headers_1 = require("../internal/headers.js");
|
|
8
|
+
const path_1 = require("../internal/utils/path.js");
|
|
8
9
|
/**
|
|
9
10
|
* 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.
|
|
10
11
|
*/
|
|
@@ -41,13 +42,6 @@ class Surveys extends resource_1.APIResource {
|
|
|
41
42
|
* ### Errors
|
|
42
43
|
*
|
|
43
44
|
* - `404` - Survey not found in your organization
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```ts
|
|
47
|
-
* const survey = await client.products.surveys.retrieve(
|
|
48
|
-
* '6743752ca81ae59d25cf834b',
|
|
49
|
-
* );
|
|
50
|
-
* ```
|
|
51
45
|
*/
|
|
52
46
|
retrieve(id, params = {}, options) {
|
|
53
47
|
const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
|
|
@@ -90,15 +84,10 @@ class Surveys extends resource_1.APIResource {
|
|
|
90
84
|
* - `pages` - Array of survey pages/questions
|
|
91
85
|
* - `createdAt` - ISO 8601 timestamp when created
|
|
92
86
|
* - `updatedAt` - ISO 8601 timestamp when last updated
|
|
93
|
-
*
|
|
94
|
-
* @example
|
|
95
|
-
* ```ts
|
|
96
|
-
* const surveys = await client.products.surveys.list();
|
|
97
|
-
* ```
|
|
98
87
|
*/
|
|
99
88
|
list(params = {}, options) {
|
|
100
89
|
const { 'Featurebase-Version': featurebaseVersion, ...query } = params ?? {};
|
|
101
|
-
return this._client.
|
|
90
|
+
return this._client.getAPIList('/v2/surveys', (pagination_1.CursorPage), {
|
|
102
91
|
query,
|
|
103
92
|
...options,
|
|
104
93
|
headers: (0, headers_1.buildHeaders)([
|
|
@@ -144,18 +133,10 @@ class Surveys extends resource_1.APIResource {
|
|
|
144
133
|
* ### Errors
|
|
145
134
|
*
|
|
146
135
|
* - `404` - Survey not found in your organization
|
|
147
|
-
*
|
|
148
|
-
* @example
|
|
149
|
-
* ```ts
|
|
150
|
-
* const response =
|
|
151
|
-
* await client.products.surveys.retrieveResponses(
|
|
152
|
-
* '6743752ca81ae59d25cf834b',
|
|
153
|
-
* );
|
|
154
|
-
* ```
|
|
155
136
|
*/
|
|
156
|
-
|
|
137
|
+
listResponses(id, params = {}, options) {
|
|
157
138
|
const { 'Featurebase-Version': featurebaseVersion, ...query } = params ?? {};
|
|
158
|
-
return this._client.
|
|
139
|
+
return this._client.getAPIList((0, path_1.path) `/v2/surveys/${id}/responses`, (pagination_1.CursorPage), {
|
|
159
140
|
query,
|
|
160
141
|
...options,
|
|
161
142
|
headers: (0, headers_1.buildHeaders)([
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surveys.js","sourceRoot":"","sources":["../src/resources/surveys.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,sDAAoF;AACpF,oDAAmD;AAEnD,oDAA8C;AAE9C;;GAEG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACH,QAAQ,CACN,EAAU,EACV,SAAkD,EAAE,EACpD,OAAwB;QAExB,MAAM,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACnE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,eAAe,EAAE,EAAE,EAAE;YAC/C,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,kB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;gBAC/F,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CACF,CAAC;IACJ,CAAC;CACF;AAzJD,0BAyJC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { CursorPage } from "../core/pagination.mjs";
|
|
4
|
+
import { buildHeaders } from "../internal/headers.mjs";
|
|
5
|
+
import { path } from "../internal/utils/path.mjs";
|
|
5
6
|
/**
|
|
6
7
|
* 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.
|
|
7
8
|
*/
|
|
@@ -38,13 +39,6 @@ export class Surveys extends APIResource {
|
|
|
38
39
|
* ### Errors
|
|
39
40
|
*
|
|
40
41
|
* - `404` - Survey not found in your organization
|
|
41
|
-
*
|
|
42
|
-
* @example
|
|
43
|
-
* ```ts
|
|
44
|
-
* const survey = await client.products.surveys.retrieve(
|
|
45
|
-
* '6743752ca81ae59d25cf834b',
|
|
46
|
-
* );
|
|
47
|
-
* ```
|
|
48
42
|
*/
|
|
49
43
|
retrieve(id, params = {}, options) {
|
|
50
44
|
const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
|
|
@@ -87,15 +81,10 @@ export class Surveys extends APIResource {
|
|
|
87
81
|
* - `pages` - Array of survey pages/questions
|
|
88
82
|
* - `createdAt` - ISO 8601 timestamp when created
|
|
89
83
|
* - `updatedAt` - ISO 8601 timestamp when last updated
|
|
90
|
-
*
|
|
91
|
-
* @example
|
|
92
|
-
* ```ts
|
|
93
|
-
* const surveys = await client.products.surveys.list();
|
|
94
|
-
* ```
|
|
95
84
|
*/
|
|
96
85
|
list(params = {}, options) {
|
|
97
86
|
const { 'Featurebase-Version': featurebaseVersion, ...query } = params ?? {};
|
|
98
|
-
return this._client.
|
|
87
|
+
return this._client.getAPIList('/v2/surveys', (CursorPage), {
|
|
99
88
|
query,
|
|
100
89
|
...options,
|
|
101
90
|
headers: buildHeaders([
|
|
@@ -141,18 +130,10 @@ export class Surveys extends APIResource {
|
|
|
141
130
|
* ### Errors
|
|
142
131
|
*
|
|
143
132
|
* - `404` - Survey not found in your organization
|
|
144
|
-
*
|
|
145
|
-
* @example
|
|
146
|
-
* ```ts
|
|
147
|
-
* const response =
|
|
148
|
-
* await client.products.surveys.retrieveResponses(
|
|
149
|
-
* '6743752ca81ae59d25cf834b',
|
|
150
|
-
* );
|
|
151
|
-
* ```
|
|
152
133
|
*/
|
|
153
|
-
|
|
134
|
+
listResponses(id, params = {}, options) {
|
|
154
135
|
const { 'Featurebase-Version': featurebaseVersion, ...query } = params ?? {};
|
|
155
|
-
return this._client.
|
|
136
|
+
return this._client.getAPIList(path `/v2/surveys/${id}/responses`, (CursorPage), {
|
|
156
137
|
query,
|
|
157
138
|
...options,
|
|
158
139
|
headers: buildHeaders([
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surveys.mjs","sourceRoot":"","sources":["../src/resources/surveys.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,UAAU,EAAsC;OAClD,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACH,QAAQ,CACN,EAAU,EACV,SAAkD,EAAE,EACpD,OAAwB;QAExB,MAAM,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACnE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,eAAe,EAAE,EAAE,EAAE;YAC/C,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,GAAG,CAAC,k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