featurebase-node 0.14.3 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/client.d.mts +11 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +11 -5
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/audit-logs.d.mts +3 -3
- package/resources/audit-logs.d.mts.map +1 -1
- package/resources/audit-logs.d.ts +3 -3
- package/resources/audit-logs.d.ts.map +1 -1
- package/resources/changelogs/changelogs.d.mts +116 -116
- package/resources/changelogs/changelogs.d.mts.map +1 -1
- package/resources/changelogs/changelogs.d.ts +116 -116
- package/resources/changelogs/changelogs.d.ts.map +1 -1
- package/resources/changelogs/changelogs.js +74 -74
- package/resources/changelogs/changelogs.js.map +1 -1
- package/resources/changelogs/changelogs.mjs +74 -74
- package/resources/changelogs/changelogs.mjs.map +1 -1
- package/resources/changelogs/index.d.mts +1 -1
- package/resources/changelogs/index.d.mts.map +1 -1
- package/resources/changelogs/index.d.ts +1 -1
- package/resources/changelogs/index.d.ts.map +1 -1
- package/resources/changelogs/subscribers.d.mts +3 -3
- package/resources/changelogs/subscribers.d.mts.map +1 -1
- package/resources/changelogs/subscribers.d.ts +3 -3
- package/resources/changelogs/subscribers.d.ts.map +1 -1
- package/resources/conversation-attributes.d.mts +22 -17
- package/resources/conversation-attributes.d.mts.map +1 -1
- package/resources/conversation-attributes.d.ts +22 -17
- package/resources/conversation-attributes.d.ts.map +1 -1
- package/resources/conversation-attributes.js +19 -19
- package/resources/conversation-attributes.js.map +1 -1
- package/resources/conversation-attributes.mjs +19 -19
- package/resources/conversation-attributes.mjs.map +1 -1
- package/resources/feedback/boards.d.mts +19 -19
- package/resources/feedback/boards.d.mts.map +1 -1
- package/resources/feedback/boards.d.ts +19 -19
- package/resources/feedback/boards.d.ts.map +1 -1
- package/resources/feedback/boards.js +20 -20
- package/resources/feedback/boards.js.map +1 -1
- package/resources/feedback/boards.mjs +20 -20
- package/resources/feedback/boards.mjs.map +1 -1
- package/resources/feedback/comments.d.mts +113 -113
- package/resources/feedback/comments.d.mts.map +1 -1
- package/resources/feedback/comments.d.ts +113 -113
- package/resources/feedback/comments.d.ts.map +1 -1
- package/resources/feedback/comments.js +93 -93
- package/resources/feedback/comments.js.map +1 -1
- package/resources/feedback/comments.mjs +93 -93
- package/resources/feedback/comments.mjs.map +1 -1
- package/resources/feedback/custom-fields.d.mts +36 -36
- package/resources/feedback/custom-fields.d.mts.map +1 -1
- package/resources/feedback/custom-fields.d.ts +36 -36
- package/resources/feedback/custom-fields.d.ts.map +1 -1
- package/resources/feedback/custom-fields.js +36 -36
- package/resources/feedback/custom-fields.js.map +1 -1
- package/resources/feedback/custom-fields.mjs +36 -36
- package/resources/feedback/custom-fields.mjs.map +1 -1
- package/resources/feedback/feedback.d.mts +5 -5
- package/resources/feedback/feedback.d.mts.map +1 -1
- package/resources/feedback/feedback.d.ts +5 -5
- package/resources/feedback/feedback.d.ts.map +1 -1
- package/resources/feedback/index.d.mts +5 -5
- package/resources/feedback/index.d.mts.map +1 -1
- package/resources/feedback/index.d.ts +5 -5
- package/resources/feedback/index.d.ts.map +1 -1
- package/resources/feedback/post-statuses.d.mts +20 -20
- package/resources/feedback/post-statuses.d.mts.map +1 -1
- package/resources/feedback/post-statuses.d.ts +20 -20
- package/resources/feedback/post-statuses.d.ts.map +1 -1
- package/resources/feedback/post-statuses.js +23 -23
- package/resources/feedback/post-statuses.js.map +1 -1
- package/resources/feedback/post-statuses.mjs +23 -23
- package/resources/feedback/post-statuses.mjs.map +1 -1
- package/resources/feedback/posts/index.d.mts +1 -1
- package/resources/feedback/posts/index.d.mts.map +1 -1
- package/resources/feedback/posts/index.d.ts +1 -1
- package/resources/feedback/posts/index.d.ts.map +1 -1
- package/resources/feedback/posts/posts.d.mts +132 -132
- package/resources/feedback/posts/posts.d.mts.map +1 -1
- package/resources/feedback/posts/posts.d.ts +132 -132
- package/resources/feedback/posts/posts.d.ts.map +1 -1
- package/resources/feedback/posts/posts.js +107 -107
- package/resources/feedback/posts/posts.js.map +1 -1
- package/resources/feedback/posts/posts.mjs +107 -107
- package/resources/feedback/posts/posts.mjs.map +1 -1
- package/resources/feedback/posts/voters.d.mts +3 -3
- package/resources/feedback/posts/voters.d.mts.map +1 -1
- package/resources/feedback/posts/voters.d.ts +3 -3
- package/resources/feedback/posts/voters.d.ts.map +1 -1
- package/resources/help-center/articles.d.mts +213 -97
- package/resources/help-center/articles.d.mts.map +1 -1
- package/resources/help-center/articles.d.ts +213 -97
- package/resources/help-center/articles.d.ts.map +1 -1
- package/resources/help-center/articles.js +73 -73
- package/resources/help-center/articles.js.map +1 -1
- package/resources/help-center/articles.mjs +73 -73
- package/resources/help-center/articles.mjs.map +1 -1
- package/resources/help-center/collections.d.mts +158 -71
- package/resources/help-center/collections.d.mts.map +1 -1
- package/resources/help-center/collections.d.ts +158 -71
- package/resources/help-center/collections.d.ts.map +1 -1
- package/resources/help-center/collections.js +65 -65
- package/resources/help-center/collections.js.map +1 -1
- package/resources/help-center/collections.mjs +65 -65
- package/resources/help-center/collections.mjs.map +1 -1
- package/resources/help-center/help-center.d.mts +4 -4
- package/resources/help-center/help-center.d.mts.map +1 -1
- package/resources/help-center/help-center.d.ts +4 -4
- package/resources/help-center/help-center.d.ts.map +1 -1
- package/resources/help-center/help-centers.d.mts +77 -48
- package/resources/help-center/help-centers.d.mts.map +1 -1
- package/resources/help-center/help-centers.d.ts +77 -48
- package/resources/help-center/help-centers.d.ts.map +1 -1
- package/resources/help-center/help-centers.js +43 -43
- package/resources/help-center/help-centers.js.map +1 -1
- package/resources/help-center/help-centers.mjs +43 -43
- package/resources/help-center/help-centers.mjs.map +1 -1
- package/resources/help-center/index.d.mts +4 -4
- package/resources/help-center/index.d.mts.map +1 -1
- package/resources/help-center/index.d.ts +4 -4
- package/resources/help-center/index.d.ts.map +1 -1
- package/resources/help-center/redirect-rules.d.mts +124 -124
- package/resources/help-center/redirect-rules.d.mts.map +1 -1
- package/resources/help-center/redirect-rules.d.ts +124 -124
- package/resources/help-center/redirect-rules.d.ts.map +1 -1
- package/resources/help-center/redirect-rules.js +112 -112
- package/resources/help-center/redirect-rules.js.map +1 -1
- package/resources/help-center/redirect-rules.mjs +112 -112
- package/resources/help-center/redirect-rules.mjs.map +1 -1
- package/resources/index.d.mts +6 -5
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +6 -5
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/organization/admins.d.mts +26 -26
- package/resources/organization/admins.d.mts.map +1 -1
- package/resources/organization/admins.d.ts +26 -26
- package/resources/organization/admins.d.ts.map +1 -1
- package/resources/organization/admins.js +25 -25
- package/resources/organization/admins.js.map +1 -1
- package/resources/organization/admins.mjs +25 -25
- package/resources/organization/admins.mjs.map +1 -1
- package/resources/organization/brands.d.mts +52 -52
- package/resources/organization/brands.d.mts.map +1 -1
- package/resources/organization/brands.d.ts +52 -52
- package/resources/organization/brands.d.ts.map +1 -1
- package/resources/organization/brands.js +54 -54
- package/resources/organization/brands.js.map +1 -1
- package/resources/organization/brands.mjs +54 -54
- package/resources/organization/brands.mjs.map +1 -1
- package/resources/organization/index.d.mts +3 -3
- package/resources/organization/index.d.mts.map +1 -1
- package/resources/organization/index.d.ts +3 -3
- package/resources/organization/index.d.ts.map +1 -1
- package/resources/organization/organization.d.mts +3 -3
- package/resources/organization/organization.d.mts.map +1 -1
- package/resources/organization/organization.d.ts +3 -3
- package/resources/organization/organization.d.ts.map +1 -1
- package/resources/organization/teams.d.mts +47 -47
- package/resources/organization/teams.d.mts.map +1 -1
- package/resources/organization/teams.d.ts +47 -47
- package/resources/organization/teams.d.ts.map +1 -1
- package/resources/organization/teams.js +44 -44
- package/resources/organization/teams.js.map +1 -1
- package/resources/organization/teams.mjs +44 -44
- package/resources/organization/teams.mjs.map +1 -1
- package/resources/reports.d.mts +339 -223
- package/resources/reports.d.mts.map +1 -1
- package/resources/reports.d.ts +339 -223
- package/resources/reports.d.ts.map +1 -1
- package/resources/reports.js +114 -107
- package/resources/reports.js.map +1 -1
- package/resources/reports.mjs +114 -107
- package/resources/reports.mjs.map +1 -1
- package/resources/support/conversation-tags.d.mts +43 -43
- package/resources/support/conversation-tags.d.mts.map +1 -1
- package/resources/support/conversation-tags.d.ts +43 -43
- package/resources/support/conversation-tags.d.ts.map +1 -1
- package/resources/support/conversation-tags.js +32 -32
- package/resources/support/conversation-tags.js.map +1 -1
- package/resources/support/conversation-tags.mjs +32 -32
- package/resources/support/conversation-tags.mjs.map +1 -1
- package/resources/support/conversations/conversations.d.mts +363 -332
- package/resources/support/conversations/conversations.d.mts.map +1 -1
- package/resources/support/conversations/conversations.d.ts +363 -332
- package/resources/support/conversations/conversations.d.ts.map +1 -1
- package/resources/support/conversations/conversations.js +293 -283
- package/resources/support/conversations/conversations.js.map +1 -1
- package/resources/support/conversations/conversations.mjs +293 -283
- package/resources/support/conversations/conversations.mjs.map +1 -1
- package/resources/support/conversations/index.d.mts +1 -1
- package/resources/support/conversations/index.d.mts.map +1 -1
- package/resources/support/conversations/index.d.ts +1 -1
- package/resources/support/conversations/index.d.ts.map +1 -1
- package/resources/support/conversations/participants.d.mts +2 -2
- package/resources/support/conversations/participants.d.mts.map +1 -1
- package/resources/support/conversations/participants.d.ts +2 -2
- package/resources/support/conversations/participants.d.ts.map +1 -1
- package/resources/support/index.d.mts +3 -3
- package/resources/support/index.d.mts.map +1 -1
- package/resources/support/index.d.ts +3 -3
- package/resources/support/index.d.ts.map +1 -1
- package/resources/support/support.d.mts +3 -3
- package/resources/support/support.d.mts.map +1 -1
- package/resources/support/support.d.ts +3 -3
- package/resources/support/support.d.ts.map +1 -1
- package/resources/support/tickets/categories.d.mts +20 -20
- package/resources/support/tickets/categories.d.mts.map +1 -1
- package/resources/support/tickets/categories.d.ts +20 -20
- package/resources/support/tickets/categories.d.ts.map +1 -1
- package/resources/support/tickets/categories.js +25 -25
- package/resources/support/tickets/categories.js.map +1 -1
- package/resources/support/tickets/categories.mjs +25 -25
- package/resources/support/tickets/categories.mjs.map +1 -1
- package/resources/support/tickets/custom-fields.d.mts +22 -22
- package/resources/support/tickets/custom-fields.d.mts.map +1 -1
- package/resources/support/tickets/custom-fields.d.ts +22 -22
- package/resources/support/tickets/custom-fields.d.ts.map +1 -1
- package/resources/support/tickets/custom-fields.js +19 -19
- package/resources/support/tickets/custom-fields.js.map +1 -1
- package/resources/support/tickets/custom-fields.mjs +19 -19
- package/resources/support/tickets/custom-fields.mjs.map +1 -1
- package/resources/support/tickets/index.d.mts +4 -4
- package/resources/support/tickets/index.d.mts.map +1 -1
- package/resources/support/tickets/index.d.ts +4 -4
- package/resources/support/tickets/index.d.ts.map +1 -1
- package/resources/support/tickets/statuses.d.mts +19 -19
- package/resources/support/tickets/statuses.d.mts.map +1 -1
- package/resources/support/tickets/statuses.d.ts +19 -19
- package/resources/support/tickets/statuses.d.ts.map +1 -1
- package/resources/support/tickets/statuses.js +21 -21
- package/resources/support/tickets/statuses.js.map +1 -1
- package/resources/support/tickets/statuses.mjs +21 -21
- package/resources/support/tickets/statuses.mjs.map +1 -1
- package/resources/support/tickets/tickets.d.mts +75 -75
- package/resources/support/tickets/tickets.d.mts.map +1 -1
- package/resources/support/tickets/tickets.d.ts +75 -75
- package/resources/support/tickets/tickets.d.ts.map +1 -1
- package/resources/support/tickets/tickets.js +44 -44
- package/resources/support/tickets/tickets.js.map +1 -1
- package/resources/support/tickets/tickets.mjs +44 -44
- package/resources/support/tickets/tickets.mjs.map +1 -1
- package/resources/surveys.d.mts +43 -43
- package/resources/surveys.d.mts.map +1 -1
- package/resources/surveys.d.ts +43 -43
- package/resources/surveys.d.ts.map +1 -1
- package/resources/surveys.js +44 -44
- package/resources/surveys.js.map +1 -1
- package/resources/surveys.mjs +44 -44
- package/resources/surveys.mjs.map +1 -1
- package/resources/training-data/files.d.mts +292 -0
- package/resources/training-data/files.d.mts.map +1 -0
- package/resources/training-data/files.d.ts +292 -0
- package/resources/training-data/files.d.ts.map +1 -0
- package/resources/training-data/files.js +171 -0
- package/resources/training-data/files.js.map +1 -0
- package/resources/training-data/files.mjs +167 -0
- package/resources/training-data/files.mjs.map +1 -0
- package/resources/training-data/index.d.mts +4 -0
- package/resources/training-data/index.d.mts.map +1 -0
- package/resources/training-data/index.d.ts +4 -0
- package/resources/training-data/index.d.ts.map +1 -0
- package/resources/training-data/index.js +11 -0
- package/resources/training-data/index.js.map +1 -0
- package/resources/training-data/index.mjs +5 -0
- package/resources/training-data/index.mjs.map +1 -0
- package/resources/training-data/qna.d.mts +370 -0
- package/resources/training-data/qna.d.mts.map +1 -0
- package/resources/training-data/qna.d.ts +370 -0
- package/resources/training-data/qna.d.ts.map +1 -0
- package/resources/training-data/qna.js +177 -0
- package/resources/training-data/qna.js.map +1 -0
- package/resources/training-data/qna.mjs +173 -0
- package/resources/training-data/qna.mjs.map +1 -0
- package/resources/training-data/training-data.d.mts +442 -0
- package/resources/training-data/training-data.d.mts.map +1 -0
- package/resources/training-data/training-data.d.ts +442 -0
- package/resources/training-data/training-data.d.ts.map +1 -0
- package/resources/training-data/training-data.js +105 -0
- package/resources/training-data/training-data.js.map +1 -0
- package/resources/training-data/training-data.mjs +100 -0
- package/resources/training-data/training-data.mjs.map +1 -0
- package/resources/training-data.d.mts +2 -0
- package/resources/training-data.d.mts.map +1 -0
- package/resources/training-data.d.ts +2 -0
- package/resources/training-data.d.ts.map +1 -0
- package/resources/training-data.js +6 -0
- package/resources/training-data.js.map +1 -0
- package/resources/training-data.mjs +3 -0
- package/resources/training-data.mjs.map +1 -0
- package/resources/users/companies/companies.d.mts +121 -130
- package/resources/users/companies/companies.d.mts.map +1 -1
- package/resources/users/companies/companies.d.ts +121 -130
- package/resources/users/companies/companies.d.ts.map +1 -1
- package/resources/users/companies/companies.js +125 -125
- package/resources/users/companies/companies.js.map +1 -1
- package/resources/users/companies/companies.mjs +125 -125
- package/resources/users/companies/companies.mjs.map +1 -1
- package/resources/users/companies/contacts.d.mts +3 -3
- package/resources/users/companies/contacts.d.mts.map +1 -1
- package/resources/users/companies/contacts.d.ts +3 -3
- package/resources/users/companies/contacts.d.ts.map +1 -1
- package/resources/users/companies/index.d.mts +1 -1
- package/resources/users/companies/index.d.mts.map +1 -1
- package/resources/users/companies/index.d.ts +1 -1
- package/resources/users/companies/index.d.ts.map +1 -1
- package/resources/users/contacts/by-user-id/by-user-id.d.mts +2 -2
- package/resources/users/contacts/by-user-id/by-user-id.d.mts.map +1 -1
- package/resources/users/contacts/by-user-id/by-user-id.d.ts +2 -2
- package/resources/users/contacts/by-user-id/by-user-id.d.ts.map +1 -1
- package/resources/users/contacts/by-user-id/email-preferences.d.mts +2 -2
- package/resources/users/contacts/by-user-id/email-preferences.d.mts.map +1 -1
- package/resources/users/contacts/by-user-id/email-preferences.d.ts +2 -2
- package/resources/users/contacts/by-user-id/email-preferences.d.ts.map +1 -1
- package/resources/users/contacts/contacts.d.mts +249 -235
- package/resources/users/contacts/contacts.d.mts.map +1 -1
- package/resources/users/contacts/contacts.d.ts +249 -235
- package/resources/users/contacts/contacts.d.ts.map +1 -1
- package/resources/users/contacts/contacts.js +211 -184
- package/resources/users/contacts/contacts.js.map +1 -1
- package/resources/users/contacts/contacts.mjs +211 -184
- package/resources/users/contacts/contacts.mjs.map +1 -1
- package/resources/users/contacts/email-preferences.d.mts +2 -2
- package/resources/users/contacts/email-preferences.d.mts.map +1 -1
- package/resources/users/contacts/email-preferences.d.ts +2 -2
- package/resources/users/contacts/email-preferences.d.ts.map +1 -1
- package/resources/users/contacts/index.d.mts +1 -1
- package/resources/users/contacts/index.d.mts.map +1 -1
- package/resources/users/contacts/index.d.ts +1 -1
- package/resources/users/contacts/index.d.ts.map +1 -1
- package/resources/users/index.d.mts +2 -2
- package/resources/users/index.d.mts.map +1 -1
- package/resources/users/index.d.ts +2 -2
- package/resources/users/index.d.ts.map +1 -1
- package/resources/users/users.d.mts +2 -2
- package/resources/users/users.d.mts.map +1 -1
- package/resources/users/users.d.ts +2 -2
- package/resources/users/users.d.ts.map +1 -1
- package/resources/webhooks.d.mts +83 -83
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +83 -83
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +77 -77
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +77 -77
- package/resources/webhooks.mjs.map +1 -1
- package/src/client.ts +26 -6
- package/src/resources/audit-logs.ts +19 -1
- package/src/resources/changelogs/changelogs.ts +320 -175
- package/src/resources/changelogs/index.ts +1 -1
- package/src/resources/changelogs/subscribers.ts +31 -2
- package/src/resources/conversation-attributes.ts +40 -34
- package/src/resources/feedback/boards.ts +30 -30
- package/src/resources/feedback/comments.ts +137 -137
- package/src/resources/feedback/custom-fields.ts +46 -46
- package/src/resources/feedback/feedback.ts +6 -6
- package/src/resources/feedback/index.ts +6 -6
- package/src/resources/feedback/post-statuses.ts +33 -33
- package/src/resources/feedback/posts/index.ts +2 -2
- package/src/resources/feedback/posts/posts.ts +176 -176
- package/src/resources/feedback/posts/voters.ts +3 -3
- package/src/resources/help-center/articles.ts +631 -109
- package/src/resources/help-center/collections.ts +349 -88
- package/src/resources/help-center/help-center.ts +5 -5
- package/src/resources/help-center/help-centers.ts +202 -57
- package/src/resources/help-center/index.ts +5 -5
- package/src/resources/help-center/redirect-rules.ts +294 -178
- package/src/resources/index.ts +13 -6
- package/src/resources/organization/admins.ts +36 -36
- package/src/resources/organization/brands.ts +68 -68
- package/src/resources/organization/index.ts +3 -3
- package/src/resources/organization/organization.ts +3 -3
- package/src/resources/organization/teams.ts +54 -54
- package/src/resources/reports.ts +462 -272
- package/src/resources/support/conversation-tags.ts +62 -62
- package/src/resources/support/conversations/conversations.ts +453 -417
- package/src/resources/support/conversations/index.ts +4 -4
- package/src/resources/support/conversations/participants.ts +2 -2
- package/src/resources/support/index.ts +7 -7
- package/src/resources/support/support.ts +7 -7
- package/src/resources/support/tickets/categories.ts +35 -35
- package/src/resources/support/tickets/custom-fields.ts +29 -29
- package/src/resources/support/tickets/index.ts +4 -4
- package/src/resources/support/tickets/statuses.ts +31 -31
- package/src/resources/support/tickets/tickets.ts +101 -101
- package/src/resources/surveys.ts +60 -60
- package/src/resources/training-data/files.ts +431 -0
- package/src/resources/training-data/index.ts +31 -0
- package/src/resources/training-data/qna.ts +514 -0
- package/src/resources/training-data/training-data.ts +603 -0
- package/src/resources/training-data.ts +3 -0
- package/src/resources/users/companies/companies.ts +158 -172
- package/src/resources/users/companies/contacts.ts +3 -3
- package/src/resources/users/companies/index.ts +2 -2
- package/src/resources/users/contacts/by-user-id/by-user-id.ts +2 -2
- package/src/resources/users/contacts/by-user-id/email-preferences.ts +2 -2
- package/src/resources/users/contacts/contacts.ts +284 -280
- package/src/resources/users/contacts/email-preferences.ts +2 -2
- package/src/resources/users/contacts/index.ts +3 -3
- package/src/resources/users/index.ts +5 -5
- package/src/resources/users/users.ts +5 -5
- package/src/resources/webhooks.ts +106 -100
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
3
|
+
import { CursorPage, type CursorPageParams, PagePromise } from "../../core/pagination.js";
|
|
4
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
5
|
+
/**
|
|
6
|
+
* Training data teaches the AI agent about your product beyond your public Help Center: training files (documents, policies, internal notes) and Q&A entries (question variants with the exact answer to give). Use these endpoints to keep that knowledge in sync from your own systems — for example, pushing resolved support conversations, internal runbooks, or SOP documents automatically.
|
|
7
|
+
*/
|
|
8
|
+
export declare class Files extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Adds a document the AI agent can learn from. Provide exactly one source:
|
|
11
|
+
*
|
|
12
|
+
* - **Inline text** — `{ "name": "refund-policy.md", "content": "..." }`. Markdown
|
|
13
|
+
* or plain text is stored as-is and indexing is attempted before the response
|
|
14
|
+
* returns; check `indexStatus` (`status` is `completed`). Best for content you
|
|
15
|
+
* generate yourself, such as an SOP compiled from resolved conversations.
|
|
16
|
+
* - **Remote file** — `{ "url": "https://..." }` (optional `name`). The file (PDF,
|
|
17
|
+
* DOCX, PPTX, XLSX, TXT, HTML, …; max 50 MB) is downloaded and converted to text
|
|
18
|
+
* in the background. The response returns immediately with
|
|
19
|
+
* `status: "processing"`; poll the file until it is `completed` or `failed`.
|
|
20
|
+
* - **Multipart upload** — send `multipart/form-data` with the document in a
|
|
21
|
+
* `file` part and, optionally, a JSON `data` field such as `{"name": "..."}`.
|
|
22
|
+
* Converted in the background like a remote file.
|
|
23
|
+
*
|
|
24
|
+
* **Keeping files in sync (create-or-update).** Pass your own `externalId` (unique
|
|
25
|
+
* per workspace) and the same request becomes idempotent: a new ID creates the
|
|
26
|
+
* file (`201`), a known ID with different content updates that file in place and
|
|
27
|
+
* re-indexes it (`200`), and a known ID with identical content is a no-op (`200`,
|
|
28
|
+
* no embedding work). Add a `source` label to group everything one pipeline owns,
|
|
29
|
+
* then list by `source` to find entries to remove. Every response carries
|
|
30
|
+
* `contentHash` so you can diff a whole library from the list endpoint.
|
|
31
|
+
*
|
|
32
|
+
* Without `externalId`, uploading a file whose name and bytes match an existing
|
|
33
|
+
* file returns the existing file with status `200` instead of creating a
|
|
34
|
+
* duplicate. Multipart uploads over 50 MB are rejected with `413`.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const trainingFile =
|
|
39
|
+
* await client.trainingData.files.create();
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
create(params?: FileCreateParams | null | undefined, options?: RequestOptions): APIPromise<TrainingFile>;
|
|
43
|
+
/**
|
|
44
|
+
* Returns a training file including its extracted text (`content`). Poll this
|
|
45
|
+
* endpoint after an upload until `status` is `completed`.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* const trainingFile =
|
|
50
|
+
* await client.trainingData.files.retrieve(
|
|
51
|
+
* '67ec1234abcd5678ef901234',
|
|
52
|
+
* );
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
retrieve(id: string, params?: FileRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<TrainingFile>;
|
|
56
|
+
/**
|
|
57
|
+
* Renames a training file, replaces content, or sets externalId / source. Indexing
|
|
58
|
+
* is attempted before returning when content is available. Check status and
|
|
59
|
+
* indexStatus; HTTP success alone does not establish search readiness. Serialize
|
|
60
|
+
* updates to a source identity in your pipeline.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* const trainingFile = await client.trainingData.files.update(
|
|
65
|
+
* '67ec1234abcd5678ef901234',
|
|
66
|
+
* );
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
update(id: string, params: FileUpdateParams, options?: RequestOptions): APIPromise<TrainingFile>;
|
|
70
|
+
/**
|
|
71
|
+
* Returns uploaded training files, newest first, with cursor pagination. Filter by
|
|
72
|
+
* `externalId` (exact) or `source`. The extracted text is omitted from list
|
|
73
|
+
* responses — compare `contentHash` to detect changes, and retrieve a single file
|
|
74
|
+
* to read it.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* // Automatically fetches more pages as needed.
|
|
79
|
+
* for await (const trainingFile of client.trainingData.files.list()) {
|
|
80
|
+
* // ...
|
|
81
|
+
* }
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
list(params?: FileListParams | null | undefined, options?: RequestOptions): PagePromise<TrainingFilesCursorPage, TrainingFile>;
|
|
85
|
+
/**
|
|
86
|
+
* Removes a training file from the workspace and attempts search-index cleanup.
|
|
87
|
+
* In-flight answers may already contain earlier knowledge.
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```ts
|
|
91
|
+
* const file = await client.trainingData.files.delete(
|
|
92
|
+
* '67ec1234abcd5678ef901234',
|
|
93
|
+
* );
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
delete(id: string, params?: FileDeleteParams | null | undefined, options?: RequestOptions): APIPromise<FileDeleteResponse>;
|
|
97
|
+
}
|
|
98
|
+
export type TrainingFilesCursorPage = CursorPage<TrainingFile>;
|
|
99
|
+
export interface TrainingFile {
|
|
100
|
+
/**
|
|
101
|
+
* Training file ID
|
|
102
|
+
*/
|
|
103
|
+
id: string;
|
|
104
|
+
/**
|
|
105
|
+
* Characters of extracted text
|
|
106
|
+
*/
|
|
107
|
+
characterCount: number | null;
|
|
108
|
+
/**
|
|
109
|
+
* SHA-256 (hex) of the stored source: for inline text and content edits the
|
|
110
|
+
* trimmed text, for uploads and URLs the original bytes. Compare it with your own
|
|
111
|
+
* hash to detect changes without downloading `content`.
|
|
112
|
+
*/
|
|
113
|
+
contentHash: string | null;
|
|
114
|
+
/**
|
|
115
|
+
* First 200 characters of the extracted text
|
|
116
|
+
*/
|
|
117
|
+
contentPreview: string | null;
|
|
118
|
+
/**
|
|
119
|
+
* ISO timestamp of the upload
|
|
120
|
+
*/
|
|
121
|
+
createdAt: string;
|
|
122
|
+
/**
|
|
123
|
+
* Your own identifier for this file, if one was set
|
|
124
|
+
*/
|
|
125
|
+
externalId: string | null;
|
|
126
|
+
/**
|
|
127
|
+
* Size of the originally uploaded source in bytes (unchanged by content edits)
|
|
128
|
+
*/
|
|
129
|
+
fileSize: number | null;
|
|
130
|
+
/**
|
|
131
|
+
* Whether the content is searchable by the AI agent. `pending` while indexing,
|
|
132
|
+
* `indexed` when the AI agent can use it, `failed` if indexing failed (the content
|
|
133
|
+
* is stored and indexing is retried hourly).
|
|
134
|
+
*/
|
|
135
|
+
indexStatus: 'pending' | 'indexed' | 'failed';
|
|
136
|
+
/**
|
|
137
|
+
* MIME type of the originally uploaded source
|
|
138
|
+
*/
|
|
139
|
+
mimeType: string | null;
|
|
140
|
+
/**
|
|
141
|
+
* File name shown in the dashboard
|
|
142
|
+
*/
|
|
143
|
+
name: string;
|
|
144
|
+
/**
|
|
145
|
+
* Object type identifier
|
|
146
|
+
*/
|
|
147
|
+
object: 'training_file';
|
|
148
|
+
/**
|
|
149
|
+
* Conversion error message when `status` is `failed`
|
|
150
|
+
*/
|
|
151
|
+
processingError: string | null;
|
|
152
|
+
/**
|
|
153
|
+
* Pipeline label, if one was set
|
|
154
|
+
*/
|
|
155
|
+
source: string | null;
|
|
156
|
+
/**
|
|
157
|
+
* `processing` while the file is being converted to text, `completed` once the
|
|
158
|
+
* content is stored, `failed` if conversion failed (see `processingError`).
|
|
159
|
+
*/
|
|
160
|
+
status: 'processing' | 'completed' | 'failed';
|
|
161
|
+
/**
|
|
162
|
+
* ISO timestamp of the last change
|
|
163
|
+
*/
|
|
164
|
+
updatedAt: string;
|
|
165
|
+
/**
|
|
166
|
+
* Words of extracted text
|
|
167
|
+
*/
|
|
168
|
+
wordCount: number | null;
|
|
169
|
+
/**
|
|
170
|
+
* Full extracted text (markdown). Returned when retrieving or updating a single
|
|
171
|
+
* file; omitted from list and create responses.
|
|
172
|
+
*/
|
|
173
|
+
content?: string | null;
|
|
174
|
+
/**
|
|
175
|
+
* On create and update responses: `created`, `updated` (same `externalId` or same
|
|
176
|
+
* name and bytes, content replaced and re-indexed), or `unchanged` (identical
|
|
177
|
+
* content, nothing done). Absent on reads.
|
|
178
|
+
*/
|
|
179
|
+
outcome?: 'created' | 'updated' | 'unchanged';
|
|
180
|
+
}
|
|
181
|
+
export interface FileDeleteResponse {
|
|
182
|
+
/**
|
|
183
|
+
* ID of the deleted training file
|
|
184
|
+
*/
|
|
185
|
+
id: string;
|
|
186
|
+
/**
|
|
187
|
+
* Indicates the resource was deleted
|
|
188
|
+
*/
|
|
189
|
+
deleted: true;
|
|
190
|
+
/**
|
|
191
|
+
* Object type identifier
|
|
192
|
+
*/
|
|
193
|
+
object: 'training_file';
|
|
194
|
+
}
|
|
195
|
+
export interface FileCreateParams {
|
|
196
|
+
/**
|
|
197
|
+
* Body param: Text or markdown to train on. Stored as-is; indexing is attempted
|
|
198
|
+
* before returning. Check indexStatus. Cannot be combined with `url`.
|
|
199
|
+
*/
|
|
200
|
+
content?: string;
|
|
201
|
+
/**
|
|
202
|
+
* Body param: Your own identifier for this entry (unique per workspace). When
|
|
203
|
+
* provided, the request creates the entry if the ID is new and otherwise updates
|
|
204
|
+
* the existing entry in place — an unchanged payload is a no-op. Use it to keep
|
|
205
|
+
* the AI agent in sync with a system of record without tracking Featurebase IDs.
|
|
206
|
+
*/
|
|
207
|
+
externalId?: string;
|
|
208
|
+
/**
|
|
209
|
+
* Body param: Display name of the file. Required with `content`; optional with
|
|
210
|
+
* `url` (defaults to the downloaded file name) or a multipart upload (defaults to
|
|
211
|
+
* the uploaded file name).
|
|
212
|
+
*/
|
|
213
|
+
name?: string;
|
|
214
|
+
/**
|
|
215
|
+
* Body param: Free-form label for the pipeline or system this entry came from.
|
|
216
|
+
* Filter lists by it to review or sweep everything from one source.
|
|
217
|
+
*/
|
|
218
|
+
source?: string;
|
|
219
|
+
/**
|
|
220
|
+
* Body param: Public http(s) URL of a document to download and convert (PDF, DOCX,
|
|
221
|
+
* TXT, HTML, …; max 50 MB). Conversion runs in the background — poll the file
|
|
222
|
+
* until `status` is `completed`. Cannot be combined with `content`.
|
|
223
|
+
*/
|
|
224
|
+
url?: string;
|
|
225
|
+
/**
|
|
226
|
+
* Header param: API version for this request. Defaults to your organization's
|
|
227
|
+
* configured API version if not specified.
|
|
228
|
+
*/
|
|
229
|
+
'Featurebase-Version'?: '2026-08-19.orbit' | '2026-01-01.nova' | '2025-12-12.clover';
|
|
230
|
+
}
|
|
231
|
+
export interface FileRetrieveParams {
|
|
232
|
+
/**
|
|
233
|
+
* API version for this request. Defaults to your organization's configured API
|
|
234
|
+
* version if not specified.
|
|
235
|
+
*/
|
|
236
|
+
'Featurebase-Version'?: '2026-08-19.orbit' | '2026-01-01.nova' | '2025-12-12.clover';
|
|
237
|
+
}
|
|
238
|
+
export interface FileUpdateParams {
|
|
239
|
+
/**
|
|
240
|
+
* Body param: Replacement text/markdown. Indexing is attempted before returning;
|
|
241
|
+
* check indexStatus.
|
|
242
|
+
*/
|
|
243
|
+
content?: string;
|
|
244
|
+
/**
|
|
245
|
+
* Body param: Your own identifier for this entry (unique per workspace).
|
|
246
|
+
*/
|
|
247
|
+
externalId?: string;
|
|
248
|
+
/**
|
|
249
|
+
* Body param: New display name
|
|
250
|
+
*/
|
|
251
|
+
name?: string;
|
|
252
|
+
/**
|
|
253
|
+
* Body param: Free-form label for the pipeline or system this entry came from.
|
|
254
|
+
* Filter lists by it to review or sweep everything from one source.
|
|
255
|
+
*/
|
|
256
|
+
source?: string;
|
|
257
|
+
/**
|
|
258
|
+
* Header param: API version for this request. Defaults to your organization's
|
|
259
|
+
* configured API version if not specified.
|
|
260
|
+
*/
|
|
261
|
+
'Featurebase-Version'?: '2026-08-19.orbit' | '2026-01-01.nova' | '2025-12-12.clover';
|
|
262
|
+
}
|
|
263
|
+
export interface FileListParams extends CursorPageParams {
|
|
264
|
+
/**
|
|
265
|
+
* Query param: Only return the entry with this `externalId`
|
|
266
|
+
*/
|
|
267
|
+
externalId?: string;
|
|
268
|
+
/**
|
|
269
|
+
* Query param: Only return entries with this `source` label
|
|
270
|
+
*/
|
|
271
|
+
source?: string;
|
|
272
|
+
/**
|
|
273
|
+
* Query param: Only return files in this processing state
|
|
274
|
+
*/
|
|
275
|
+
status?: 'processing' | 'completed' | 'failed';
|
|
276
|
+
/**
|
|
277
|
+
* Header param: API version for this request. Defaults to your organization's
|
|
278
|
+
* configured API version if not specified.
|
|
279
|
+
*/
|
|
280
|
+
'Featurebase-Version'?: '2026-08-19.orbit' | '2026-01-01.nova' | '2025-12-12.clover';
|
|
281
|
+
}
|
|
282
|
+
export interface FileDeleteParams {
|
|
283
|
+
/**
|
|
284
|
+
* API version for this request. Defaults to your organization's configured API
|
|
285
|
+
* version if not specified.
|
|
286
|
+
*/
|
|
287
|
+
'Featurebase-Version'?: '2026-08-19.orbit' | '2026-01-01.nova' | '2025-12-12.clover';
|
|
288
|
+
}
|
|
289
|
+
export declare namespace Files {
|
|
290
|
+
export { type TrainingFile as TrainingFile, type FileDeleteResponse as FileDeleteResponse, type TrainingFilesCursorPage as TrainingFilesCursorPage, type FileCreateParams as FileCreateParams, type FileRetrieveParams as FileRetrieveParams, type FileUpdateParams as FileUpdateParams, type FileListParams as FileListParams, type FileDeleteParams as FileDeleteParams, };
|
|
291
|
+
}
|
|
292
|
+
//# sourceMappingURL=files.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/resources/training-data/files.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE,iCAA8B;AAEvF,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE;;GAEG;AACH,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACH,MAAM,CACJ,MAAM,GAAE,gBAAgB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,YAAY,CAAC;IAgB3B;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,EAAE,EAAE,MAAM,EACV,MAAM,GAAE,kBAAkB,GAAG,IAAI,GAAG,SAAc,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,YAAY,CAAC;IAe3B;;;;;;;;;;;;OAYG;IACH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BAAiB,GAAG,mBAAmB,CAAC;CACtF;AAED,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IACtD;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,YAAY,GAAG,WAAW,GAAG,QAAQ,CAAC;IAE/C;;;OAGG;IACH,qBAAqB,CAAC,EAAE,kBAAkB,GAAG,iBAAiB,GAAG,mBAAmB,CAAC;CACtF;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,qBAAqB,CAAC,EAAE,kBAAkB,GAAG,iBAAiB,GAAG,mBAAmB,CAAC;CACtF;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Files = void 0;
|
|
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");
|
|
9
|
+
/**
|
|
10
|
+
* Training data teaches the AI agent about your product beyond your public Help Center: training files (documents, policies, internal notes) and Q&A entries (question variants with the exact answer to give). Use these endpoints to keep that knowledge in sync from your own systems — for example, pushing resolved support conversations, internal runbooks, or SOP documents automatically.
|
|
11
|
+
*/
|
|
12
|
+
class Files extends resource_1.APIResource {
|
|
13
|
+
/**
|
|
14
|
+
* Adds a document the AI agent can learn from. Provide exactly one source:
|
|
15
|
+
*
|
|
16
|
+
* - **Inline text** — `{ "name": "refund-policy.md", "content": "..." }`. Markdown
|
|
17
|
+
* or plain text is stored as-is and indexing is attempted before the response
|
|
18
|
+
* returns; check `indexStatus` (`status` is `completed`). Best for content you
|
|
19
|
+
* generate yourself, such as an SOP compiled from resolved conversations.
|
|
20
|
+
* - **Remote file** — `{ "url": "https://..." }` (optional `name`). The file (PDF,
|
|
21
|
+
* DOCX, PPTX, XLSX, TXT, HTML, …; max 50 MB) is downloaded and converted to text
|
|
22
|
+
* in the background. The response returns immediately with
|
|
23
|
+
* `status: "processing"`; poll the file until it is `completed` or `failed`.
|
|
24
|
+
* - **Multipart upload** — send `multipart/form-data` with the document in a
|
|
25
|
+
* `file` part and, optionally, a JSON `data` field such as `{"name": "..."}`.
|
|
26
|
+
* Converted in the background like a remote file.
|
|
27
|
+
*
|
|
28
|
+
* **Keeping files in sync (create-or-update).** Pass your own `externalId` (unique
|
|
29
|
+
* per workspace) and the same request becomes idempotent: a new ID creates the
|
|
30
|
+
* file (`201`), a known ID with different content updates that file in place and
|
|
31
|
+
* re-indexes it (`200`), and a known ID with identical content is a no-op (`200`,
|
|
32
|
+
* no embedding work). Add a `source` label to group everything one pipeline owns,
|
|
33
|
+
* then list by `source` to find entries to remove. Every response carries
|
|
34
|
+
* `contentHash` so you can diff a whole library from the list endpoint.
|
|
35
|
+
*
|
|
36
|
+
* Without `externalId`, uploading a file whose name and bytes match an existing
|
|
37
|
+
* file returns the existing file with status `200` instead of creating a
|
|
38
|
+
* duplicate. Multipart uploads over 50 MB are rejected with `413`.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const trainingFile =
|
|
43
|
+
* await client.trainingData.files.create();
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
create(params = {}, options) {
|
|
47
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params ?? {};
|
|
48
|
+
return this._client.post('/v2/training_data/files', {
|
|
49
|
+
body,
|
|
50
|
+
...options,
|
|
51
|
+
headers: (0, headers_1.buildHeaders)([
|
|
52
|
+
{
|
|
53
|
+
...(featurebaseVersion?.toString() != null ?
|
|
54
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
55
|
+
: undefined),
|
|
56
|
+
},
|
|
57
|
+
options?.headers,
|
|
58
|
+
]),
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Returns a training file including its extracted text (`content`). Poll this
|
|
63
|
+
* endpoint after an upload until `status` is `completed`.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* const trainingFile =
|
|
68
|
+
* await client.trainingData.files.retrieve(
|
|
69
|
+
* '67ec1234abcd5678ef901234',
|
|
70
|
+
* );
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
retrieve(id, params = {}, options) {
|
|
74
|
+
const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
|
|
75
|
+
return this._client.get((0, path_1.path) `/v2/training_data/files/${id}`, {
|
|
76
|
+
...options,
|
|
77
|
+
headers: (0, headers_1.buildHeaders)([
|
|
78
|
+
{
|
|
79
|
+
...(featurebaseVersion?.toString() != null ?
|
|
80
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
81
|
+
: undefined),
|
|
82
|
+
},
|
|
83
|
+
options?.headers,
|
|
84
|
+
]),
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Renames a training file, replaces content, or sets externalId / source. Indexing
|
|
89
|
+
* is attempted before returning when content is available. Check status and
|
|
90
|
+
* indexStatus; HTTP success alone does not establish search readiness. Serialize
|
|
91
|
+
* updates to a source identity in your pipeline.
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```ts
|
|
95
|
+
* const trainingFile = await client.trainingData.files.update(
|
|
96
|
+
* '67ec1234abcd5678ef901234',
|
|
97
|
+
* );
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
update(id, params, options) {
|
|
101
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
102
|
+
return this._client.patch((0, path_1.path) `/v2/training_data/files/${id}`, {
|
|
103
|
+
body,
|
|
104
|
+
...options,
|
|
105
|
+
headers: (0, headers_1.buildHeaders)([
|
|
106
|
+
{
|
|
107
|
+
...(featurebaseVersion?.toString() != null ?
|
|
108
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
109
|
+
: undefined),
|
|
110
|
+
},
|
|
111
|
+
options?.headers,
|
|
112
|
+
]),
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Returns uploaded training files, newest first, with cursor pagination. Filter by
|
|
117
|
+
* `externalId` (exact) or `source`. The extracted text is omitted from list
|
|
118
|
+
* responses — compare `contentHash` to detect changes, and retrieve a single file
|
|
119
|
+
* to read it.
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* ```ts
|
|
123
|
+
* // Automatically fetches more pages as needed.
|
|
124
|
+
* for await (const trainingFile of client.trainingData.files.list()) {
|
|
125
|
+
* // ...
|
|
126
|
+
* }
|
|
127
|
+
* ```
|
|
128
|
+
*/
|
|
129
|
+
list(params = {}, options) {
|
|
130
|
+
const { 'Featurebase-Version': featurebaseVersion, ...query } = params ?? {};
|
|
131
|
+
return this._client.getAPIList('/v2/training_data/files', (pagination_1.CursorPage), {
|
|
132
|
+
query,
|
|
133
|
+
...options,
|
|
134
|
+
headers: (0, headers_1.buildHeaders)([
|
|
135
|
+
{
|
|
136
|
+
...(featurebaseVersion?.toString() != null ?
|
|
137
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
138
|
+
: undefined),
|
|
139
|
+
},
|
|
140
|
+
options?.headers,
|
|
141
|
+
]),
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Removes a training file from the workspace and attempts search-index cleanup.
|
|
146
|
+
* In-flight answers may already contain earlier knowledge.
|
|
147
|
+
*
|
|
148
|
+
* @example
|
|
149
|
+
* ```ts
|
|
150
|
+
* const file = await client.trainingData.files.delete(
|
|
151
|
+
* '67ec1234abcd5678ef901234',
|
|
152
|
+
* );
|
|
153
|
+
* ```
|
|
154
|
+
*/
|
|
155
|
+
delete(id, params = {}, options) {
|
|
156
|
+
const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
|
|
157
|
+
return this._client.delete((0, path_1.path) `/v2/training_data/files/${id}`, {
|
|
158
|
+
...options,
|
|
159
|
+
headers: (0, headers_1.buildHeaders)([
|
|
160
|
+
{
|
|
161
|
+
...(featurebaseVersion?.toString() != null ?
|
|
162
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
163
|
+
: undefined),
|
|
164
|
+
},
|
|
165
|
+
options?.headers,
|
|
166
|
+
]),
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
exports.Files = Files;
|
|
171
|
+
//# sourceMappingURL=files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/resources/training-data/files.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,yDAAuF;AACvF,uDAAsD;AAEtD,uDAAiD;AAEjD;;GAEG;AACH,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACH,MAAM,CACJ,SAA8C,EAAE,EAChD,OAAwB;QAExB,MAAM,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC5E,OAAO,IAAI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,CAAC,CAAC,SAAS,CAAC;iBACb;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AA/KD,sBA+KC"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
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";
|
|
6
|
+
/**
|
|
7
|
+
* Training data teaches the AI agent about your product beyond your public Help Center: training files (documents, policies, internal notes) and Q&A entries (question variants with the exact answer to give). Use these endpoints to keep that knowledge in sync from your own systems — for example, pushing resolved support conversations, internal runbooks, or SOP documents automatically.
|
|
8
|
+
*/
|
|
9
|
+
export class Files extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Adds a document the AI agent can learn from. Provide exactly one source:
|
|
12
|
+
*
|
|
13
|
+
* - **Inline text** — `{ "name": "refund-policy.md", "content": "..." }`. Markdown
|
|
14
|
+
* or plain text is stored as-is and indexing is attempted before the response
|
|
15
|
+
* returns; check `indexStatus` (`status` is `completed`). Best for content you
|
|
16
|
+
* generate yourself, such as an SOP compiled from resolved conversations.
|
|
17
|
+
* - **Remote file** — `{ "url": "https://..." }` (optional `name`). The file (PDF,
|
|
18
|
+
* DOCX, PPTX, XLSX, TXT, HTML, …; max 50 MB) is downloaded and converted to text
|
|
19
|
+
* in the background. The response returns immediately with
|
|
20
|
+
* `status: "processing"`; poll the file until it is `completed` or `failed`.
|
|
21
|
+
* - **Multipart upload** — send `multipart/form-data` with the document in a
|
|
22
|
+
* `file` part and, optionally, a JSON `data` field such as `{"name": "..."}`.
|
|
23
|
+
* Converted in the background like a remote file.
|
|
24
|
+
*
|
|
25
|
+
* **Keeping files in sync (create-or-update).** Pass your own `externalId` (unique
|
|
26
|
+
* per workspace) and the same request becomes idempotent: a new ID creates the
|
|
27
|
+
* file (`201`), a known ID with different content updates that file in place and
|
|
28
|
+
* re-indexes it (`200`), and a known ID with identical content is a no-op (`200`,
|
|
29
|
+
* no embedding work). Add a `source` label to group everything one pipeline owns,
|
|
30
|
+
* then list by `source` to find entries to remove. Every response carries
|
|
31
|
+
* `contentHash` so you can diff a whole library from the list endpoint.
|
|
32
|
+
*
|
|
33
|
+
* Without `externalId`, uploading a file whose name and bytes match an existing
|
|
34
|
+
* file returns the existing file with status `200` instead of creating a
|
|
35
|
+
* duplicate. Multipart uploads over 50 MB are rejected with `413`.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* const trainingFile =
|
|
40
|
+
* await client.trainingData.files.create();
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
create(params = {}, options) {
|
|
44
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params ?? {};
|
|
45
|
+
return this._client.post('/v2/training_data/files', {
|
|
46
|
+
body,
|
|
47
|
+
...options,
|
|
48
|
+
headers: buildHeaders([
|
|
49
|
+
{
|
|
50
|
+
...(featurebaseVersion?.toString() != null ?
|
|
51
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
52
|
+
: undefined),
|
|
53
|
+
},
|
|
54
|
+
options?.headers,
|
|
55
|
+
]),
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Returns a training file including its extracted text (`content`). Poll this
|
|
60
|
+
* endpoint after an upload until `status` is `completed`.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* const trainingFile =
|
|
65
|
+
* await client.trainingData.files.retrieve(
|
|
66
|
+
* '67ec1234abcd5678ef901234',
|
|
67
|
+
* );
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
retrieve(id, params = {}, options) {
|
|
71
|
+
const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
|
|
72
|
+
return this._client.get(path `/v2/training_data/files/${id}`, {
|
|
73
|
+
...options,
|
|
74
|
+
headers: buildHeaders([
|
|
75
|
+
{
|
|
76
|
+
...(featurebaseVersion?.toString() != null ?
|
|
77
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
78
|
+
: undefined),
|
|
79
|
+
},
|
|
80
|
+
options?.headers,
|
|
81
|
+
]),
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Renames a training file, replaces content, or sets externalId / source. Indexing
|
|
86
|
+
* is attempted before returning when content is available. Check status and
|
|
87
|
+
* indexStatus; HTTP success alone does not establish search readiness. Serialize
|
|
88
|
+
* updates to a source identity in your pipeline.
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```ts
|
|
92
|
+
* const trainingFile = await client.trainingData.files.update(
|
|
93
|
+
* '67ec1234abcd5678ef901234',
|
|
94
|
+
* );
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
update(id, params, options) {
|
|
98
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
99
|
+
return this._client.patch(path `/v2/training_data/files/${id}`, {
|
|
100
|
+
body,
|
|
101
|
+
...options,
|
|
102
|
+
headers: buildHeaders([
|
|
103
|
+
{
|
|
104
|
+
...(featurebaseVersion?.toString() != null ?
|
|
105
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
106
|
+
: undefined),
|
|
107
|
+
},
|
|
108
|
+
options?.headers,
|
|
109
|
+
]),
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Returns uploaded training files, newest first, with cursor pagination. Filter by
|
|
114
|
+
* `externalId` (exact) or `source`. The extracted text is omitted from list
|
|
115
|
+
* responses — compare `contentHash` to detect changes, and retrieve a single file
|
|
116
|
+
* to read it.
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* ```ts
|
|
120
|
+
* // Automatically fetches more pages as needed.
|
|
121
|
+
* for await (const trainingFile of client.trainingData.files.list()) {
|
|
122
|
+
* // ...
|
|
123
|
+
* }
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
126
|
+
list(params = {}, options) {
|
|
127
|
+
const { 'Featurebase-Version': featurebaseVersion, ...query } = params ?? {};
|
|
128
|
+
return this._client.getAPIList('/v2/training_data/files', (CursorPage), {
|
|
129
|
+
query,
|
|
130
|
+
...options,
|
|
131
|
+
headers: buildHeaders([
|
|
132
|
+
{
|
|
133
|
+
...(featurebaseVersion?.toString() != null ?
|
|
134
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
135
|
+
: undefined),
|
|
136
|
+
},
|
|
137
|
+
options?.headers,
|
|
138
|
+
]),
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Removes a training file from the workspace and attempts search-index cleanup.
|
|
143
|
+
* In-flight answers may already contain earlier knowledge.
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* ```ts
|
|
147
|
+
* const file = await client.trainingData.files.delete(
|
|
148
|
+
* '67ec1234abcd5678ef901234',
|
|
149
|
+
* );
|
|
150
|
+
* ```
|
|
151
|
+
*/
|
|
152
|
+
delete(id, params = {}, options) {
|
|
153
|
+
const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
|
|
154
|
+
return this._client.delete(path `/v2/training_data/files/${id}`, {
|
|
155
|
+
...options,
|
|
156
|
+
headers: buildHeaders([
|
|
157
|
+
{
|
|
158
|
+
...(featurebaseVersion?.toString() != null ?
|
|
159
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
160
|
+
: undefined),
|
|
161
|
+
},
|
|
162
|
+
options?.headers,
|
|
163
|
+
]),
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
//# sourceMappingURL=files.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.mjs","sourceRoot":"","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IACH,MAAM,CACJ,EAAU,EACV,SAA8C,EAAE,EAChD,OAAwB;QAExB,MAAM,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACnE,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,2BAA2B,EAAE,EAAE,EAAE;YAC9D,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,GAAG,CAAC,kBAAkB,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC;wBAC1C,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,QAAQ,EAAE,EAAE;wBAC3D,CAAC,CAAC,SAAS,CAAC;iBACb;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { Files, type TrainingFile, type FileDeleteResponse, type FileCreateParams, type FileRetrieveParams, type FileUpdateParams, type FileListParams, type FileDeleteParams, type TrainingFilesCursorPage, } from "./files.mjs";
|
|
2
|
+
export { QnaResource, type Qna, type QnaDeleteResponse, type QnaCreateParams, type QnaRetrieveParams, type QnaUpdateParams, type QnaListParams, type QnaDeleteParams, type QnasCursorPage, } from "./qna.mjs";
|
|
3
|
+
export { TrainingData, type KnowledgeSearch, type Oracle, type TrainingDataOracleParams, type TrainingDataSearchParams, } from "./training-data.mjs";
|
|
4
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/training-data/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,EACL,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,GAC7B,oBAAgB;AACjB,OAAO,EACL,WAAW,EACX,KAAK,GAAG,EACR,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB,kBAAc;AACf,OAAO,EACL,YAAY,EACZ,KAAK,eAAe,EACpB,KAAK,MAAM,EACX,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,GAC9B,4BAAwB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { Files, type TrainingFile, type FileDeleteResponse, type FileCreateParams, type FileRetrieveParams, type FileUpdateParams, type FileListParams, type FileDeleteParams, type TrainingFilesCursorPage, } from "./files.js";
|
|
2
|
+
export { QnaResource, type Qna, type QnaDeleteResponse, type QnaCreateParams, type QnaRetrieveParams, type QnaUpdateParams, type QnaListParams, type QnaDeleteParams, type QnasCursorPage, } from "./qna.js";
|
|
3
|
+
export { TrainingData, type KnowledgeSearch, type Oracle, type TrainingDataOracleParams, type TrainingDataSearchParams, } from "./training-data.js";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/training-data/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,EACL,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,GAC7B,mBAAgB;AACjB,OAAO,EACL,WAAW,EACX,KAAK,GAAG,EACR,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB,iBAAc;AACf,OAAO,EACL,YAAY,EACZ,KAAK,eAAe,EACpB,KAAK,MAAM,EACX,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,GAC9B,2BAAwB"}
|