featurebase-node 0.0.2
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 +10 -0
- package/LICENSE +201 -0
- package/README.md +356 -0
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/client.d.mts +274 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +274 -0
- package/client.d.ts.map +1 -0
- package/client.js +569 -0
- package/client.js.map +1 -0
- package/client.mjs +565 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +2 -0
- package/error.d.ts.map +1 -0
- package/error.js +6 -0
- package/error.js.map +1 -0
- package/error.mjs +2 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +6 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +6 -0
- package/index.d.ts.map +1 -0
- package/index.js +30 -0
- package/index.js.map +1 -0
- package/index.mjs +7 -0
- package/index.mjs.map +1 -0
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +20 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +20 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +79 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +74 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +40 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +37 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/qs/formats.d.mts +7 -0
- package/internal/qs/formats.d.mts.map +1 -0
- package/internal/qs/formats.d.ts +7 -0
- package/internal/qs/formats.d.ts.map +1 -0
- package/internal/qs/formats.js +13 -0
- package/internal/qs/formats.js.map +1 -0
- package/internal/qs/formats.mjs +9 -0
- package/internal/qs/formats.mjs.map +1 -0
- package/internal/qs/index.d.mts +10 -0
- package/internal/qs/index.d.mts.map +1 -0
- package/internal/qs/index.d.ts +10 -0
- package/internal/qs/index.d.ts.map +1 -0
- package/internal/qs/index.js +14 -0
- package/internal/qs/index.js.map +1 -0
- package/internal/qs/index.mjs +10 -0
- package/internal/qs/index.mjs.map +1 -0
- package/internal/qs/stringify.d.mts +3 -0
- package/internal/qs/stringify.d.mts.map +1 -0
- package/internal/qs/stringify.d.ts +3 -0
- package/internal/qs/stringify.d.ts.map +1 -0
- package/internal/qs/stringify.js +277 -0
- package/internal/qs/stringify.js.map +1 -0
- package/internal/qs/stringify.mjs +274 -0
- package/internal/qs/stringify.mjs.map +1 -0
- package/internal/qs/types.d.mts +57 -0
- package/internal/qs/types.d.mts.map +1 -0
- package/internal/qs/types.d.ts +57 -0
- package/internal/qs/types.d.ts.map +1 -0
- package/internal/qs/types.js +3 -0
- package/internal/qs/types.js.map +1 -0
- package/internal/qs/types.mjs +2 -0
- package/internal/qs/types.mjs.map +1 -0
- package/internal/qs/utils.d.mts +15 -0
- package/internal/qs/utils.d.mts.map +1 -0
- package/internal/qs/utils.d.ts +15 -0
- package/internal/qs/utils.d.ts.map +1 -0
- package/internal/qs/utils.js +230 -0
- package/internal/qs/utils.js.map +1 -0
- package/internal/qs/utils.mjs +217 -0
- package/internal/qs/utils.mjs.map +1 -0
- package/internal/request-options.d.mts +75 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +75 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +14 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +10 -0
- package/internal/request-options.mjs.map +1 -0
- package/internal/shim-types.d.mts +17 -0
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +17 -0
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +20 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +20 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +92 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +45 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +45 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +88 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +69 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +69 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +42 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +42 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +141 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +131 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +38 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +33 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +37 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +37 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +85 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +79 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +79 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +74 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/query.d.mts +2 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +2 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +10 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +6 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +19 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +15 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +18 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +18 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +112 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +94 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +8 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +8 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +12 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +9 -0
- package/internal/utils.mjs.map +1 -0
- package/package.json +143 -0
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +2 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +6 -0
- package/resource.js.map +1 -0
- package/resource.mjs +2 -0
- package/resource.mjs.map +1 -0
- package/resources/admins.d.mts +437 -0
- package/resources/admins.d.mts.map +1 -0
- package/resources/admins.d.ts +437 -0
- package/resources/admins.d.ts.map +1 -0
- package/resources/admins.js +157 -0
- package/resources/admins.js.map +1 -0
- package/resources/admins.mjs +153 -0
- package/resources/admins.mjs.map +1 -0
- package/resources/boards.d.mts +202 -0
- package/resources/boards.d.mts.map +1 -0
- package/resources/boards.d.ts +202 -0
- package/resources/boards.d.ts.map +1 -0
- package/resources/boards.js +52 -0
- package/resources/boards.js.map +1 -0
- package/resources/boards.mjs +48 -0
- package/resources/boards.mjs.map +1 -0
- package/resources/brands.d.mts +180 -0
- package/resources/brands.d.mts.map +1 -0
- package/resources/brands.d.ts +180 -0
- package/resources/brands.d.ts.map +1 -0
- package/resources/brands.js +130 -0
- package/resources/brands.js.map +1 -0
- package/resources/brands.mjs +126 -0
- package/resources/brands.mjs.map +1 -0
- package/resources/changelogs/changelogs.d.mts +723 -0
- package/resources/changelogs/changelogs.d.mts.map +1 -0
- package/resources/changelogs/changelogs.d.ts +723 -0
- package/resources/changelogs/changelogs.d.ts.map +1 -0
- package/resources/changelogs/changelogs.js +406 -0
- package/resources/changelogs/changelogs.js.map +1 -0
- package/resources/changelogs/changelogs.mjs +401 -0
- package/resources/changelogs/changelogs.mjs.map +1 -0
- package/resources/changelogs/index.d.mts +3 -0
- package/resources/changelogs/index.d.mts.map +1 -0
- package/resources/changelogs/index.d.ts +3 -0
- package/resources/changelogs/index.d.ts.map +1 -0
- package/resources/changelogs/index.js +9 -0
- package/resources/changelogs/index.js.map +1 -0
- package/resources/changelogs/index.mjs +4 -0
- package/resources/changelogs/index.mjs.map +1 -0
- package/resources/changelogs/subscribers.d.mts +145 -0
- package/resources/changelogs/subscribers.d.mts.map +1 -0
- package/resources/changelogs/subscribers.d.ts +145 -0
- package/resources/changelogs/subscribers.d.ts.map +1 -0
- package/resources/changelogs/subscribers.js +119 -0
- package/resources/changelogs/subscribers.js.map +1 -0
- package/resources/changelogs/subscribers.mjs +115 -0
- package/resources/changelogs/subscribers.mjs.map +1 -0
- package/resources/changelogs.d.mts +2 -0
- package/resources/changelogs.d.mts.map +1 -0
- package/resources/changelogs.d.ts +2 -0
- package/resources/changelogs.d.ts.map +1 -0
- package/resources/changelogs.js +6 -0
- package/resources/changelogs.js.map +1 -0
- package/resources/changelogs.mjs +3 -0
- package/resources/changelogs.mjs.map +1 -0
- package/resources/comments.d.mts +632 -0
- package/resources/comments.d.mts.map +1 -0
- package/resources/comments.d.ts +632 -0
- package/resources/comments.d.ts.map +1 -0
- package/resources/comments.js +397 -0
- package/resources/comments.js.map +1 -0
- package/resources/comments.mjs +393 -0
- package/resources/comments.mjs.map +1 -0
- package/resources/companies/companies.d.mts +497 -0
- package/resources/companies/companies.d.mts.map +1 -0
- package/resources/companies/companies.d.ts +497 -0
- package/resources/companies/companies.d.ts.map +1 -0
- package/resources/companies/companies.js +368 -0
- package/resources/companies/companies.js.map +1 -0
- package/resources/companies/companies.mjs +363 -0
- package/resources/companies/companies.mjs.map +1 -0
- package/resources/companies/contacts.d.mts +236 -0
- package/resources/companies/contacts.d.mts.map +1 -0
- package/resources/companies/contacts.d.ts +236 -0
- package/resources/companies/contacts.d.ts.map +1 -0
- package/resources/companies/contacts.js +218 -0
- package/resources/companies/contacts.js.map +1 -0
- package/resources/companies/contacts.mjs +214 -0
- package/resources/companies/contacts.mjs.map +1 -0
- package/resources/companies/index.d.mts +3 -0
- package/resources/companies/index.d.mts.map +1 -0
- package/resources/companies/index.d.ts +3 -0
- package/resources/companies/index.d.ts.map +1 -0
- package/resources/companies/index.js +9 -0
- package/resources/companies/index.js.map +1 -0
- package/resources/companies/index.mjs +4 -0
- package/resources/companies/index.mjs.map +1 -0
- package/resources/companies.d.mts +2 -0
- package/resources/companies.d.mts.map +1 -0
- package/resources/companies.d.ts +2 -0
- package/resources/companies.d.ts.map +1 -0
- package/resources/companies.js +6 -0
- package/resources/companies.js.map +1 -0
- package/resources/companies.mjs +3 -0
- package/resources/companies.mjs.map +1 -0
- package/resources/contacts/by-user-id/by-user-id.d.mts +147 -0
- package/resources/contacts/by-user-id/by-user-id.d.mts.map +1 -0
- package/resources/contacts/by-user-id/by-user-id.d.ts +147 -0
- package/resources/contacts/by-user-id/by-user-id.d.ts.map +1 -0
- package/resources/contacts/by-user-id/by-user-id.js +152 -0
- package/resources/contacts/by-user-id/by-user-id.js.map +1 -0
- package/resources/contacts/by-user-id/by-user-id.mjs +147 -0
- package/resources/contacts/by-user-id/by-user-id.mjs.map +1 -0
- package/resources/contacts/by-user-id/email-preferences.d.mts +199 -0
- package/resources/contacts/by-user-id/email-preferences.d.mts.map +1 -0
- package/resources/contacts/by-user-id/email-preferences.d.ts +199 -0
- package/resources/contacts/by-user-id/email-preferences.d.ts.map +1 -0
- package/resources/contacts/by-user-id/email-preferences.js +176 -0
- package/resources/contacts/by-user-id/email-preferences.js.map +1 -0
- package/resources/contacts/by-user-id/email-preferences.mjs +172 -0
- package/resources/contacts/by-user-id/email-preferences.mjs.map +1 -0
- package/resources/contacts/by-user-id/index.d.mts +3 -0
- package/resources/contacts/by-user-id/index.d.mts.map +1 -0
- package/resources/contacts/by-user-id/index.d.ts +3 -0
- package/resources/contacts/by-user-id/index.d.ts.map +1 -0
- package/resources/contacts/by-user-id/index.js +9 -0
- package/resources/contacts/by-user-id/index.js.map +1 -0
- package/resources/contacts/by-user-id/index.mjs +4 -0
- package/resources/contacts/by-user-id/index.mjs.map +1 -0
- package/resources/contacts/by-user-id.d.mts +2 -0
- package/resources/contacts/by-user-id.d.mts.map +1 -0
- package/resources/contacts/by-user-id.d.ts +2 -0
- package/resources/contacts/by-user-id.d.ts.map +1 -0
- package/resources/contacts/by-user-id.js +6 -0
- package/resources/contacts/by-user-id.js.map +1 -0
- package/resources/contacts/by-user-id.mjs +3 -0
- package/resources/contacts/by-user-id.mjs.map +1 -0
- package/resources/contacts/contacts.d.mts +708 -0
- package/resources/contacts/contacts.d.mts.map +1 -0
- package/resources/contacts/contacts.d.ts +708 -0
- package/resources/contacts/contacts.d.ts.map +1 -0
- package/resources/contacts/contacts.js +444 -0
- package/resources/contacts/contacts.js.map +1 -0
- package/resources/contacts/contacts.mjs +439 -0
- package/resources/contacts/contacts.mjs.map +1 -0
- package/resources/contacts/email-preferences.d.mts +334 -0
- package/resources/contacts/email-preferences.d.mts.map +1 -0
- package/resources/contacts/email-preferences.d.ts +334 -0
- package/resources/contacts/email-preferences.d.ts.map +1 -0
- package/resources/contacts/email-preferences.js +219 -0
- package/resources/contacts/email-preferences.js.map +1 -0
- package/resources/contacts/email-preferences.mjs +215 -0
- package/resources/contacts/email-preferences.mjs.map +1 -0
- package/resources/contacts/index.d.mts +4 -0
- package/resources/contacts/index.d.mts.map +1 -0
- package/resources/contacts/index.d.ts +4 -0
- package/resources/contacts/index.d.ts.map +1 -0
- package/resources/contacts/index.js +11 -0
- package/resources/contacts/index.js.map +1 -0
- package/resources/contacts/index.mjs +5 -0
- package/resources/contacts/index.mjs.map +1 -0
- package/resources/contacts.d.mts +2 -0
- package/resources/contacts.d.mts.map +1 -0
- package/resources/contacts.d.ts +2 -0
- package/resources/contacts.d.ts.map +1 -0
- package/resources/contacts.js +6 -0
- package/resources/contacts.js.map +1 -0
- package/resources/contacts.mjs +3 -0
- package/resources/contacts.mjs.map +1 -0
- package/resources/conversations/conversations.d.mts +2235 -0
- package/resources/conversations/conversations.d.mts.map +1 -0
- package/resources/conversations/conversations.d.ts +2235 -0
- package/resources/conversations/conversations.d.ts.map +1 -0
- package/resources/conversations/conversations.js +753 -0
- package/resources/conversations/conversations.js.map +1 -0
- package/resources/conversations/conversations.mjs +748 -0
- package/resources/conversations/conversations.mjs.map +1 -0
- package/resources/conversations/index.d.mts +4 -0
- package/resources/conversations/index.d.mts.map +1 -0
- package/resources/conversations/index.d.ts +4 -0
- package/resources/conversations/index.d.ts.map +1 -0
- package/resources/conversations/index.js +11 -0
- package/resources/conversations/index.js.map +1 -0
- package/resources/conversations/index.mjs +5 -0
- package/resources/conversations/index.mjs.map +1 -0
- package/resources/conversations/participants.d.mts +217 -0
- package/resources/conversations/participants.d.mts.map +1 -0
- package/resources/conversations/participants.d.ts +217 -0
- package/resources/conversations/participants.d.ts.map +1 -0
- package/resources/conversations/participants.js +185 -0
- package/resources/conversations/participants.js.map +1 -0
- package/resources/conversations/participants.mjs +181 -0
- package/resources/conversations/participants.mjs.map +1 -0
- package/resources/conversations/tags.d.mts +200 -0
- package/resources/conversations/tags.d.mts.map +1 -0
- package/resources/conversations/tags.d.ts +200 -0
- package/resources/conversations/tags.d.ts.map +1 -0
- package/resources/conversations/tags.js +138 -0
- package/resources/conversations/tags.js.map +1 -0
- package/resources/conversations/tags.mjs +134 -0
- package/resources/conversations/tags.mjs.map +1 -0
- package/resources/conversations.d.mts +2 -0
- package/resources/conversations.d.mts.map +1 -0
- package/resources/conversations.d.ts +2 -0
- package/resources/conversations.d.ts.map +1 -0
- package/resources/conversations.js +6 -0
- package/resources/conversations.js.map +1 -0
- package/resources/conversations.mjs +3 -0
- package/resources/conversations.mjs.map +1 -0
- package/resources/custom-fields.d.mts +189 -0
- package/resources/custom-fields.d.mts.map +1 -0
- package/resources/custom-fields.d.ts +189 -0
- package/resources/custom-fields.d.ts.map +1 -0
- package/resources/custom-fields.js +92 -0
- package/resources/custom-fields.js.map +1 -0
- package/resources/custom-fields.mjs +88 -0
- package/resources/custom-fields.mjs.map +1 -0
- package/resources/help-center/articles.d.mts +770 -0
- package/resources/help-center/articles.d.mts.map +1 -0
- package/resources/help-center/articles.d.ts +770 -0
- package/resources/help-center/articles.d.ts.map +1 -0
- package/resources/help-center/articles.js +296 -0
- package/resources/help-center/articles.js.map +1 -0
- package/resources/help-center/articles.mjs +292 -0
- package/resources/help-center/articles.mjs.map +1 -0
- package/resources/help-center/collections.d.mts +669 -0
- package/resources/help-center/collections.d.mts.map +1 -0
- package/resources/help-center/collections.d.ts +669 -0
- package/resources/help-center/collections.d.ts.map +1 -0
- package/resources/help-center/collections.js +278 -0
- package/resources/help-center/collections.js.map +1 -0
- package/resources/help-center/collections.mjs +274 -0
- package/resources/help-center/collections.mjs.map +1 -0
- package/resources/help-center/help-center.d.mts +22 -0
- package/resources/help-center/help-center.d.mts.map +1 -0
- package/resources/help-center/help-center.d.ts +22 -0
- package/resources/help-center/help-center.d.ts.map +1 -0
- package/resources/help-center/help-center.js +29 -0
- package/resources/help-center/help-center.js.map +1 -0
- package/resources/help-center/help-center.mjs +24 -0
- package/resources/help-center/help-center.mjs.map +1 -0
- package/resources/help-center/help-centers.d.mts +312 -0
- package/resources/help-center/help-centers.d.mts.map +1 -0
- package/resources/help-center/help-centers.d.ts +312 -0
- package/resources/help-center/help-centers.d.ts.map +1 -0
- package/resources/help-center/help-centers.js +111 -0
- package/resources/help-center/help-centers.js.map +1 -0
- package/resources/help-center/help-centers.mjs +107 -0
- package/resources/help-center/help-centers.mjs.map +1 -0
- package/resources/help-center/index.d.mts +6 -0
- package/resources/help-center/index.d.mts.map +1 -0
- package/resources/help-center/index.d.ts +6 -0
- package/resources/help-center/index.d.ts.map +1 -0
- package/resources/help-center/index.js +15 -0
- package/resources/help-center/index.js.map +1 -0
- package/resources/help-center/index.mjs +7 -0
- package/resources/help-center/index.mjs.map +1 -0
- package/resources/help-center/redirect-rules.d.mts +417 -0
- package/resources/help-center/redirect-rules.d.mts.map +1 -0
- package/resources/help-center/redirect-rules.d.ts +417 -0
- package/resources/help-center/redirect-rules.d.ts.map +1 -0
- package/resources/help-center/redirect-rules.js +297 -0
- package/resources/help-center/redirect-rules.js.map +1 -0
- package/resources/help-center/redirect-rules.mjs +293 -0
- package/resources/help-center/redirect-rules.mjs.map +1 -0
- package/resources/help-center.d.mts +2 -0
- package/resources/help-center.d.mts.map +1 -0
- package/resources/help-center.d.ts +2 -0
- package/resources/help-center.d.ts.map +1 -0
- package/resources/help-center.js +6 -0
- package/resources/help-center.js.map +1 -0
- package/resources/help-center.mjs +3 -0
- package/resources/help-center.mjs.map +1 -0
- package/resources/index.d.mts +18 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +18 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +39 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +19 -0
- package/resources/index.mjs.map +1 -0
- package/resources/post-statuses.d.mts +74 -0
- package/resources/post-statuses.d.mts.map +1 -0
- package/resources/post-statuses.d.ts +74 -0
- package/resources/post-statuses.d.ts.map +1 -0
- package/resources/post-statuses.js +53 -0
- package/resources/post-statuses.js.map +1 -0
- package/resources/post-statuses.mjs +49 -0
- package/resources/post-statuses.mjs.map +1 -0
- package/resources/posts/index.d.mts +3 -0
- package/resources/posts/index.d.mts.map +1 -0
- package/resources/posts/index.d.ts +3 -0
- package/resources/posts/index.d.ts.map +1 -0
- package/resources/posts/index.js +9 -0
- package/resources/posts/index.js.map +1 -0
- package/resources/posts/index.mjs +4 -0
- package/resources/posts/index.mjs.map +1 -0
- package/resources/posts/posts.d.mts +799 -0
- package/resources/posts/posts.d.mts.map +1 -0
- package/resources/posts/posts.d.ts +799 -0
- package/resources/posts/posts.d.ts.map +1 -0
- package/resources/posts/posts.js +271 -0
- package/resources/posts/posts.js.map +1 -0
- package/resources/posts/posts.mjs +266 -0
- package/resources/posts/posts.mjs.map +1 -0
- package/resources/posts/voters.d.mts +359 -0
- package/resources/posts/voters.d.mts.map +1 -0
- package/resources/posts/voters.d.ts +359 -0
- package/resources/posts/voters.d.ts.map +1 -0
- package/resources/posts/voters.js +171 -0
- package/resources/posts/voters.js.map +1 -0
- package/resources/posts/voters.mjs +167 -0
- package/resources/posts/voters.mjs.map +1 -0
- package/resources/posts.d.mts +2 -0
- package/resources/posts.d.mts.map +1 -0
- package/resources/posts.d.ts +2 -0
- package/resources/posts.d.ts.map +1 -0
- package/resources/posts.js +6 -0
- package/resources/posts.js.map +1 -0
- package/resources/posts.mjs +3 -0
- package/resources/posts.mjs.map +1 -0
- package/resources/surveys.d.mts +451 -0
- package/resources/surveys.d.mts.map +1 -0
- package/resources/surveys.d.ts +451 -0
- package/resources/surveys.d.ts.map +1 -0
- package/resources/surveys.js +149 -0
- package/resources/surveys.js.map +1 -0
- package/resources/surveys.mjs +145 -0
- package/resources/surveys.mjs.map +1 -0
- package/resources/tags.d.mts +147 -0
- package/resources/tags.d.mts.map +1 -0
- package/resources/tags.d.ts +147 -0
- package/resources/tags.d.ts.map +1 -0
- package/resources/tags.js +100 -0
- package/resources/tags.js.map +1 -0
- package/resources/tags.mjs +96 -0
- package/resources/tags.mjs.map +1 -0
- package/resources/teams.d.mts +165 -0
- package/resources/teams.d.mts.map +1 -0
- package/resources/teams.d.ts +165 -0
- package/resources/teams.d.ts.map +1 -0
- package/resources/teams.js +120 -0
- package/resources/teams.js.map +1 -0
- package/resources/teams.mjs +116 -0
- package/resources/teams.mjs.map +1 -0
- package/resources/tickets/categories.d.mts +63 -0
- package/resources/tickets/categories.d.mts.map +1 -0
- package/resources/tickets/categories.d.ts +63 -0
- package/resources/tickets/categories.d.ts.map +1 -0
- package/resources/tickets/categories.js +67 -0
- package/resources/tickets/categories.js.map +1 -0
- package/resources/tickets/categories.mjs +63 -0
- package/resources/tickets/categories.mjs.map +1 -0
- package/resources/tickets/custom-fields.d.mts +80 -0
- package/resources/tickets/custom-fields.d.mts.map +1 -0
- package/resources/tickets/custom-fields.d.ts +80 -0
- package/resources/tickets/custom-fields.d.ts.map +1 -0
- package/resources/tickets/custom-fields.js +85 -0
- package/resources/tickets/custom-fields.js.map +1 -0
- package/resources/tickets/custom-fields.mjs +81 -0
- package/resources/tickets/custom-fields.mjs.map +1 -0
- package/resources/tickets/index.d.mts +5 -0
- package/resources/tickets/index.d.mts.map +1 -0
- package/resources/tickets/index.d.ts +5 -0
- package/resources/tickets/index.d.ts.map +1 -0
- package/resources/tickets/index.js +13 -0
- package/resources/tickets/index.js.map +1 -0
- package/resources/tickets/index.mjs +6 -0
- package/resources/tickets/index.mjs.map +1 -0
- package/resources/tickets/statuses.d.mts +59 -0
- package/resources/tickets/statuses.d.mts.map +1 -0
- package/resources/tickets/statuses.d.ts +59 -0
- package/resources/tickets/statuses.d.ts.map +1 -0
- package/resources/tickets/statuses.js +63 -0
- package/resources/tickets/statuses.js.map +1 -0
- package/resources/tickets/statuses.mjs +59 -0
- package/resources/tickets/statuses.mjs.map +1 -0
- package/resources/tickets/tickets.d.mts +794 -0
- package/resources/tickets/tickets.d.mts.map +1 -0
- package/resources/tickets/tickets.d.ts +794 -0
- package/resources/tickets/tickets.d.ts.map +1 -0
- package/resources/tickets/tickets.js +327 -0
- package/resources/tickets/tickets.js.map +1 -0
- package/resources/tickets/tickets.mjs +322 -0
- package/resources/tickets/tickets.mjs.map +1 -0
- package/resources/tickets.d.mts +2 -0
- package/resources/tickets.d.mts.map +1 -0
- package/resources/tickets.d.ts +2 -0
- package/resources/tickets.d.ts.map +1 -0
- package/resources/tickets.js +6 -0
- package/resources/tickets.js.map +1 -0
- package/resources/tickets.mjs +3 -0
- package/resources/tickets.mjs.map +1 -0
- package/resources/webhooks.d.mts +626 -0
- package/resources/webhooks.d.mts.map +1 -0
- package/resources/webhooks.d.ts +626 -0
- package/resources/webhooks.d.ts.map +1 -0
- package/resources/webhooks.js +442 -0
- package/resources/webhooks.js.map +1 -0
- package/resources/webhooks.mjs +438 -0
- package/resources/webhooks.mjs.map +1 -0
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +5 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/api-promise.ts +2 -0
- package/src/client.ts +1169 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -0
- package/src/index.ts +22 -0
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +97 -0
- package/src/internal/parse.ts +56 -0
- package/src/internal/qs/LICENSE.md +13 -0
- package/src/internal/qs/README.md +3 -0
- package/src/internal/qs/formats.ts +10 -0
- package/src/internal/qs/index.ts +13 -0
- package/src/internal/qs/stringify.ts +385 -0
- package/src/internal/qs/types.ts +71 -0
- package/src/internal/qs/utils.ts +265 -0
- package/src/internal/request-options.ts +91 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +154 -0
- package/src/internal/types.ts +95 -0
- package/src/internal/uploads.ts +187 -0
- package/src/internal/utils/base64.ts +40 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +126 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/query.ts +7 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +17 -0
- package/src/internal/utils/values.ts +105 -0
- package/src/internal/utils.ts +9 -0
- package/src/lib/.keep +4 -0
- package/src/resource.ts +2 -0
- package/src/resources/admins.ts +557 -0
- package/src/resources/boards.ts +259 -0
- package/src/resources/brands.ts +232 -0
- package/src/resources/changelogs/changelogs.ts +1139 -0
- package/src/resources/changelogs/index.ts +23 -0
- package/src/resources/changelogs/subscribers.ts +226 -0
- package/src/resources/changelogs.ts +3 -0
- package/src/resources/comments.ts +786 -0
- package/src/resources/companies/companies.ts +632 -0
- package/src/resources/companies/contacts.ts +299 -0
- package/src/resources/companies/index.ts +21 -0
- package/src/resources/companies.ts +3 -0
- package/src/resources/contacts/by-user-id/by-user-id.ts +200 -0
- package/src/resources/contacts/by-user-id/email-preferences.ts +243 -0
- package/src/resources/contacts/by-user-id/index.ts +13 -0
- package/src/resources/contacts/by-user-id.ts +3 -0
- package/src/resources/contacts/contacts.ts +908 -0
- package/src/resources/contacts/email-preferences.ts +399 -0
- package/src/resources/contacts/index.ts +32 -0
- package/src/resources/contacts.ts +3 -0
- package/src/resources/conversations/conversations.ts +2721 -0
- package/src/resources/conversations/index.ts +31 -0
- package/src/resources/conversations/participants.ts +263 -0
- package/src/resources/conversations/tags.ts +252 -0
- package/src/resources/conversations.ts +3 -0
- package/src/resources/custom-fields.ts +249 -0
- package/src/resources/help-center/articles.ts +1231 -0
- package/src/resources/help-center/collections.ts +1065 -0
- package/src/resources/help-center/help-center.ts +125 -0
- package/src/resources/help-center/help-centers.ts +558 -0
- package/src/resources/help-center/index.ts +52 -0
- package/src/resources/help-center/redirect-rules.ts +711 -0
- package/src/resources/help-center.ts +3 -0
- package/src/resources/index.ts +179 -0
- package/src/resources/post-statuses.ts +119 -0
- package/src/resources/posts/index.ts +22 -0
- package/src/resources/posts/posts.ts +1019 -0
- package/src/resources/posts/voters.ts +453 -0
- package/src/resources/posts.ts +3 -0
- package/src/resources/surveys.ts +576 -0
- package/src/resources/tags.ts +226 -0
- package/src/resources/teams.ts +213 -0
- package/src/resources/tickets/categories.ts +101 -0
- package/src/resources/tickets/custom-fields.ts +116 -0
- package/src/resources/tickets/index.ts +28 -0
- package/src/resources/tickets/statuses.ts +97 -0
- package/src/resources/tickets/tickets.ts +1019 -0
- package/src/resources/tickets.ts +3 -0
- package/src/resources/webhooks.ts +850 -0
- package/src/resources.ts +1 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +2 -0
- package/src/version.ts +1 -0
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +2 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +6 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +2 -0
- package/uploads.mjs.map +1 -0
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tickets.d.ts","sourceRoot":"","sources":["../../src/resources/tickets/tickets.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,eAAe;OACpB,KAAK,gBAAgB;OACrB,KAAK,aAAa;OAClB,EAAE,UAAU,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE;OAChF,KAAK,eAAe;OACpB,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,YAAY,EAAE;OAClE,KAAK,WAAW;OAChB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,QAAQ,EAAE;OACxE,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC,YAAY,EAAE,eAAe,CAAC,YAAY,CA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AAI,kBAAkB,EAC7C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;IAEF,OAAO,EACL,YAAY,IAAI,YAAY,EAC5B,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;IAEF,OAAO,EACL,UAAU,IAAI,UAAU,EACxB,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;IAEF,OAAO,EACL,QAAQ,IAAI,QAAQ,EACpB,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
|
@@ -0,0 +1,327 @@
|
|
|
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.Tickets = void 0;
|
|
5
|
+
const tslib_1 = require("../../internal/tslib.js");
|
|
6
|
+
const resource_1 = require("../../core/resource.js");
|
|
7
|
+
const CategoriesAPI = tslib_1.__importStar(require("./categories.js"));
|
|
8
|
+
const categories_1 = require("./categories.js");
|
|
9
|
+
const CustomFieldsAPI = tslib_1.__importStar(require("./custom-fields.js"));
|
|
10
|
+
const custom_fields_1 = require("./custom-fields.js");
|
|
11
|
+
const StatusesAPI = tslib_1.__importStar(require("./statuses.js"));
|
|
12
|
+
const statuses_1 = require("./statuses.js");
|
|
13
|
+
const headers_1 = require("../../internal/headers.js");
|
|
14
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
15
|
+
/**
|
|
16
|
+
* Tickets represent support requests in your Featurebase organization. Create, update, reply to, and manage tickets via these endpoints.
|
|
17
|
+
*/
|
|
18
|
+
class Tickets extends resource_1.APIResource {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
this.customFields = new CustomFieldsAPI.CustomFields(this._client);
|
|
22
|
+
this.categories = new CategoriesAPI.Categories(this._client);
|
|
23
|
+
this.statuses = new StatusesAPI.Statuses(this._client);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Creates a new ticket.
|
|
27
|
+
*
|
|
28
|
+
* ### Required Fields
|
|
29
|
+
*
|
|
30
|
+
* | Field | Type | Description |
|
|
31
|
+
* | ------------------ | ------ | ------------------------------------------------------------- |
|
|
32
|
+
* | `ticketCategoryId` | string | Ticket category ID |
|
|
33
|
+
* | `title` | string | Ticket title (min 2 characters) |
|
|
34
|
+
* | `author` | object | Author/contact info (id, userId, email, name, profilePicture) |
|
|
35
|
+
*
|
|
36
|
+
* ### Optional Fields
|
|
37
|
+
*
|
|
38
|
+
* | Field | Type | Description |
|
|
39
|
+
* | ---------------------- | ------- | ------------------------------------------ |
|
|
40
|
+
* | `content` | string | Ticket description (HTML) |
|
|
41
|
+
* | `customFields` | object | Custom field values |
|
|
42
|
+
* | `companyId` | string | Company to associate |
|
|
43
|
+
* | `linkedConversationId` | string | Conversation to link |
|
|
44
|
+
* | `assigneeId` | string | Admin to assign |
|
|
45
|
+
* | `statusId` | string | Initial status |
|
|
46
|
+
* | `createdAt` | string | ISO 8601 timestamp for backdating |
|
|
47
|
+
* | `skipNotifications` | boolean | Skip sending notifications (default false) |
|
|
48
|
+
*
|
|
49
|
+
* ### File Custom Fields
|
|
50
|
+
*
|
|
51
|
+
* File-type custom fields can be provided in two ways:
|
|
52
|
+
*
|
|
53
|
+
* **Method 1: Multipart upload** — Send the request as `multipart/form-data`. Put
|
|
54
|
+
* the JSON body in a field named `data`, and attach files with field names like
|
|
55
|
+
* `customFields.<fieldId>`. For `allowMultiple` fields, send multiple files with
|
|
56
|
+
* the same field name.
|
|
57
|
+
*
|
|
58
|
+
* **Method 2: External URL** — In the JSON body, set the file custom field value
|
|
59
|
+
* to `{ "url": "https://..." }`. Optionally include `"name"` to set the filename
|
|
60
|
+
* (e.g. `{ "url": "https://...", "name": "report.pdf" }`); if omitted, the
|
|
61
|
+
* filename is extracted from the download response. For `allowMultiple` fields,
|
|
62
|
+
* use an array: `[{ "url": "..." }, ...]`. The server downloads the file (max
|
|
63
|
+
* 10MB, HTTPS only) and stores it.
|
|
64
|
+
*
|
|
65
|
+
* Both methods produce signed download URLs in the response.
|
|
66
|
+
*
|
|
67
|
+
* **Limits:** Max 10 files per request, 400MB total upload size. Executable file
|
|
68
|
+
* types (.exe, .bat, .js, .sh, etc.) are blocked.
|
|
69
|
+
*
|
|
70
|
+
* **Response format:** File custom field values in the response are JSON strings
|
|
71
|
+
* containing `{ "key": "...", "name": "...", "url": "https://signed-url..." }`.
|
|
72
|
+
* For `allowMultiple` fields, an array of these objects. The `url` is a
|
|
73
|
+
* time-limited signed download URL (expires in 1 hour).
|
|
74
|
+
*
|
|
75
|
+
* ### Response
|
|
76
|
+
*
|
|
77
|
+
* Returns the created ticket object with **201 Created** status.
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```ts
|
|
81
|
+
* const ticket = await client.tickets.create({
|
|
82
|
+
* author: {},
|
|
83
|
+
* ticketCategoryId: '507f1f77bcf86cd799439011',
|
|
84
|
+
* title: 'Cannot login to dashboard',
|
|
85
|
+
* });
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
create(params, options) {
|
|
89
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
90
|
+
return this._client.post('/v2/tickets', {
|
|
91
|
+
body,
|
|
92
|
+
...options,
|
|
93
|
+
headers: (0, headers_1.buildHeaders)([
|
|
94
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
95
|
+
options?.headers,
|
|
96
|
+
]),
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Retrieves a single ticket by its ticket number.
|
|
101
|
+
*
|
|
102
|
+
* ### Path Parameters
|
|
103
|
+
*
|
|
104
|
+
* - `id` - The ticket number (e.g. 42 from TK-42)
|
|
105
|
+
*
|
|
106
|
+
* ### Response
|
|
107
|
+
*
|
|
108
|
+
* Returns the ticket object, including `conversationParts` from the linked
|
|
109
|
+
* conversation (message history).
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```ts
|
|
113
|
+
* const ticket = await client.tickets.retrieve(1);
|
|
114
|
+
* ```
|
|
115
|
+
*/
|
|
116
|
+
retrieve(id, params = {}, options) {
|
|
117
|
+
const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
|
|
118
|
+
return this._client.get((0, path_1.path) `/v2/tickets/${id}`, {
|
|
119
|
+
...options,
|
|
120
|
+
headers: (0, headers_1.buildHeaders)([
|
|
121
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
122
|
+
options?.headers,
|
|
123
|
+
]),
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Updates a ticket's properties. Only provided fields will be updated.
|
|
128
|
+
*
|
|
129
|
+
* ### Path Parameters
|
|
130
|
+
*
|
|
131
|
+
* - `id` - The ticket number
|
|
132
|
+
*
|
|
133
|
+
* ### Request Body
|
|
134
|
+
*
|
|
135
|
+
* All fields are optional.
|
|
136
|
+
*
|
|
137
|
+
* | Field | Type | Description |
|
|
138
|
+
* | ------------------- | ----------- | -------------------------------------------------- |
|
|
139
|
+
* | `title` | string | Update title |
|
|
140
|
+
* | `content` | string | Update description (HTML) |
|
|
141
|
+
* | `statusId` | string | Set status by ID |
|
|
142
|
+
* | `open` | boolean | Close (false) or reopen (true) the ticket |
|
|
143
|
+
* | `assigneeId` | string/null | Assign/unassign admin |
|
|
144
|
+
* | `companyId` | string/null | Update company association |
|
|
145
|
+
* | `customFields` | object | Update custom field values |
|
|
146
|
+
* | `snoozedUntil` | string/null | Snooze until ISO 8601 timestamp (null to unsnooze) |
|
|
147
|
+
* | `skipNotifications` | boolean | Skip notifications (default false) |
|
|
148
|
+
*
|
|
149
|
+
* ### Closing a Ticket
|
|
150
|
+
*
|
|
151
|
+
* Set `open: false` to close the ticket. Closing a ticket will also unsnooze it.
|
|
152
|
+
* The status is not changed automatically — use `statusId` to change the status
|
|
153
|
+
* explicitly.
|
|
154
|
+
*
|
|
155
|
+
* ### File Custom Fields
|
|
156
|
+
*
|
|
157
|
+
* File-type custom fields support the same two upload methods as ticket creation:
|
|
158
|
+
* multipart upload (`customFields.<fieldId>` file parts with JSON in the `data`
|
|
159
|
+
* field) and external URLs (`{ "url": "https://..." }` with optional `"name"` in
|
|
160
|
+
* the custom field value). Same limits apply (10 files, 400MB total, executable
|
|
161
|
+
* types blocked).
|
|
162
|
+
*
|
|
163
|
+
* ### Response
|
|
164
|
+
*
|
|
165
|
+
* Returns the updated ticket object.
|
|
166
|
+
*
|
|
167
|
+
* @example
|
|
168
|
+
* ```ts
|
|
169
|
+
* const ticket = await client.tickets.update(1);
|
|
170
|
+
* ```
|
|
171
|
+
*/
|
|
172
|
+
update(id, params, options) {
|
|
173
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
174
|
+
return this._client.patch((0, path_1.path) `/v2/tickets/${id}`, {
|
|
175
|
+
body,
|
|
176
|
+
...options,
|
|
177
|
+
headers: (0, headers_1.buildHeaders)([
|
|
178
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
179
|
+
options?.headers,
|
|
180
|
+
]),
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Returns a list of tickets in your organization using cursor-based pagination.
|
|
185
|
+
*
|
|
186
|
+
* ### Query Parameters
|
|
187
|
+
*
|
|
188
|
+
* | Parameter | Type | Description |
|
|
189
|
+
* | ------------------- | -------- | ---------------------------------------------------------------- |
|
|
190
|
+
* | `limit` | number | Number of tickets to return (1-100, default 10) |
|
|
191
|
+
* | `cursor` | string | Cursor from previous response for pagination |
|
|
192
|
+
* | `ticketCategoryIds` | string[] | Filter by ticket category IDs |
|
|
193
|
+
* | `statusIds` | string[] | Filter by status IDs |
|
|
194
|
+
* | `q` | string | Search query |
|
|
195
|
+
* | `assigneeId` | string | Filter by assignee ID |
|
|
196
|
+
* | `categoryType` | string | Filter by category type: "customer", "tracker", or "back-office" |
|
|
197
|
+
* | `sortBy` | string | Sort field: "date" (default), "recent", or "ticketNumber" |
|
|
198
|
+
* | `sortOrder` | string | Sort direction: "asc" or "desc" (default) |
|
|
199
|
+
*
|
|
200
|
+
* ### Response
|
|
201
|
+
*
|
|
202
|
+
* Returns a list object with `data` (array of ticket objects) and `nextCursor`.
|
|
203
|
+
*
|
|
204
|
+
* @example
|
|
205
|
+
* ```ts
|
|
206
|
+
* const tickets = await client.tickets.list();
|
|
207
|
+
* ```
|
|
208
|
+
*/
|
|
209
|
+
list(params = {}, options) {
|
|
210
|
+
const { 'Featurebase-Version': featurebaseVersion, ...query } = params ?? {};
|
|
211
|
+
return this._client.get('/v2/tickets', {
|
|
212
|
+
query,
|
|
213
|
+
...options,
|
|
214
|
+
headers: (0, headers_1.buildHeaders)([
|
|
215
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
216
|
+
options?.headers,
|
|
217
|
+
]),
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Permanently deletes a ticket by its ticket number.
|
|
222
|
+
*
|
|
223
|
+
* ### Path Parameters
|
|
224
|
+
*
|
|
225
|
+
* - `id` - The ticket number
|
|
226
|
+
*
|
|
227
|
+
* ### Response
|
|
228
|
+
*
|
|
229
|
+
* Returns a deletion confirmation:
|
|
230
|
+
*
|
|
231
|
+
* ```json
|
|
232
|
+
* {
|
|
233
|
+
* "id": "507f1f77bcf86cd799439011",
|
|
234
|
+
* "object": "ticket",
|
|
235
|
+
* "deleted": true
|
|
236
|
+
* }
|
|
237
|
+
* ```
|
|
238
|
+
*
|
|
239
|
+
* ### Behavior
|
|
240
|
+
*
|
|
241
|
+
* - **Customer-facing tickets**: Deletes the ticket and its linked conversation.
|
|
242
|
+
* - **Back-office / tracker tickets**: Deletes the ticket and unlinks it from the
|
|
243
|
+
* conversation (conversation is preserved).
|
|
244
|
+
*
|
|
245
|
+
* ### Caution
|
|
246
|
+
*
|
|
247
|
+
* This operation is **irreversible**.
|
|
248
|
+
*
|
|
249
|
+
* @example
|
|
250
|
+
* ```ts
|
|
251
|
+
* const ticket = await client.tickets.delete(1);
|
|
252
|
+
* ```
|
|
253
|
+
*/
|
|
254
|
+
delete(id, params = {}, options) {
|
|
255
|
+
const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
|
|
256
|
+
return this._client.delete((0, path_1.path) `/v2/tickets/${id}`, {
|
|
257
|
+
...options,
|
|
258
|
+
headers: (0, headers_1.buildHeaders)([
|
|
259
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
260
|
+
options?.headers,
|
|
261
|
+
]),
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Adds a reply to a ticket's linked conversation. Supports both contact and admin
|
|
266
|
+
* replies.
|
|
267
|
+
*
|
|
268
|
+
* ### Path Parameters
|
|
269
|
+
*
|
|
270
|
+
* - `id` - The ticket number
|
|
271
|
+
*
|
|
272
|
+
* ### Contact Reply
|
|
273
|
+
*
|
|
274
|
+
* | Field | Type | Required | Description |
|
|
275
|
+
* | ------------------- | -------- | -------- | ---------------------------------------- |
|
|
276
|
+
* | `type` | string | Yes | Must be "contact" |
|
|
277
|
+
* | `contactId` | string | No\* | Featurebase contact ID |
|
|
278
|
+
* | `contactEmail` | string | No\* | Contact email |
|
|
279
|
+
* | `body` | string | Yes | Message content (HTML) |
|
|
280
|
+
* | `messageType` | string | No | Always "comment" for contacts |
|
|
281
|
+
* | `attachmentUrls` | string[] | No | Attachment URLs (max 10) |
|
|
282
|
+
* | `skipNotifications` | boolean | No | Skip notifications (default false) |
|
|
283
|
+
* | `createdAt` | string | No | ISO 8601 timestamp to backdate the reply |
|
|
284
|
+
*
|
|
285
|
+
* \*At least one of `contactId` or `contactEmail` is required.
|
|
286
|
+
*
|
|
287
|
+
* ### Admin Reply
|
|
288
|
+
*
|
|
289
|
+
* | Field | Type | Required | Description |
|
|
290
|
+
* | ------------------- | -------- | -------- | ------------------------------------------------ |
|
|
291
|
+
* | `type` | string | Yes | Must be "admin" |
|
|
292
|
+
* | `adminId` | string | Yes | ID of the admin authoring the reply |
|
|
293
|
+
* | `body` | string | Yes | Message content (HTML) |
|
|
294
|
+
* | `messageType` | string | No | "comment" (default) or "note" for internal notes |
|
|
295
|
+
* | `attachmentUrls` | string[] | No | Attachment URLs (max 10) |
|
|
296
|
+
* | `skipNotifications` | boolean | No | Skip notifications (default false) |
|
|
297
|
+
* | `createdAt` | string | No | ISO 8601 timestamp to backdate the reply |
|
|
298
|
+
*
|
|
299
|
+
* ### Response
|
|
300
|
+
*
|
|
301
|
+
* Returns a reply confirmation object.
|
|
302
|
+
*
|
|
303
|
+
* @example
|
|
304
|
+
* ```ts
|
|
305
|
+
* const ticket = await client.tickets.reply(1, {
|
|
306
|
+
* body: '<p>Thank you for your help!</p>',
|
|
307
|
+
* type: 'contact',
|
|
308
|
+
* });
|
|
309
|
+
* ```
|
|
310
|
+
*/
|
|
311
|
+
reply(id, params, options) {
|
|
312
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
313
|
+
return this._client.post((0, path_1.path) `/v2/tickets/${id}/reply`, {
|
|
314
|
+
body,
|
|
315
|
+
...options,
|
|
316
|
+
headers: (0, headers_1.buildHeaders)([
|
|
317
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
318
|
+
options?.headers,
|
|
319
|
+
]),
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
exports.Tickets = Tickets;
|
|
324
|
+
Tickets.CustomFields = custom_fields_1.CustomFields;
|
|
325
|
+
Tickets.Categories = categories_1.Categories;
|
|
326
|
+
Tickets.Statuses = statuses_1.Statuses;
|
|
327
|
+
//# sourceMappingURL=tickets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tickets.js","sourceRoot":"","sources":["../../src/resources/tickets/tickets.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAGlD,uEAA8C;AAC9C,gDAA4G;AAC5G,4EAAmD;AACnD,sDAAiG;AACjG,mEAA0C;AAC1C,4CAAkG;AAElG,uDAAsD;AAEtD,uDAAiD;AAEjD;;GAEG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IAAxC;;QACE,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5F,eAAU,GAA6B,IAAI,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClF,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA2T1E,CAAC;IAzTC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8DG;IACH,MAAM,CAAC,MAA0B,EAAE,OAAwB;QACzD,MAAM,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE;YACtC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,kBAAkB,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBAC/F,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,C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C;gBACpB,EAAE,GAAG,CAAC,kBAAkB,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBAC/F,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AA9TD,0BA8TC;AAooBD,OAAO,CAAC,YAAY,GAAG,4BAAY,CAAC;AACpC,OAAO,CAAC,UAAU,GAAG,uBAAU,CAAC;AAChC,OAAO,CAAC,QAAQ,GAAG,mBAAQ,CAAC"}
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import * as CategoriesAPI from "./categories.mjs";
|
|
4
|
+
import { Categories } from "./categories.mjs";
|
|
5
|
+
import * as CustomFieldsAPI from "./custom-fields.mjs";
|
|
6
|
+
import { CustomFields } from "./custom-fields.mjs";
|
|
7
|
+
import * as StatusesAPI from "./statuses.mjs";
|
|
8
|
+
import { Statuses } from "./statuses.mjs";
|
|
9
|
+
import { buildHeaders } from "../../internal/headers.mjs";
|
|
10
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
11
|
+
/**
|
|
12
|
+
* Tickets represent support requests in your Featurebase organization. Create, update, reply to, and manage tickets via these endpoints.
|
|
13
|
+
*/
|
|
14
|
+
export class Tickets extends APIResource {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
this.customFields = new CustomFieldsAPI.CustomFields(this._client);
|
|
18
|
+
this.categories = new CategoriesAPI.Categories(this._client);
|
|
19
|
+
this.statuses = new StatusesAPI.Statuses(this._client);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Creates a new ticket.
|
|
23
|
+
*
|
|
24
|
+
* ### Required Fields
|
|
25
|
+
*
|
|
26
|
+
* | Field | Type | Description |
|
|
27
|
+
* | ------------------ | ------ | ------------------------------------------------------------- |
|
|
28
|
+
* | `ticketCategoryId` | string | Ticket category ID |
|
|
29
|
+
* | `title` | string | Ticket title (min 2 characters) |
|
|
30
|
+
* | `author` | object | Author/contact info (id, userId, email, name, profilePicture) |
|
|
31
|
+
*
|
|
32
|
+
* ### Optional Fields
|
|
33
|
+
*
|
|
34
|
+
* | Field | Type | Description |
|
|
35
|
+
* | ---------------------- | ------- | ------------------------------------------ |
|
|
36
|
+
* | `content` | string | Ticket description (HTML) |
|
|
37
|
+
* | `customFields` | object | Custom field values |
|
|
38
|
+
* | `companyId` | string | Company to associate |
|
|
39
|
+
* | `linkedConversationId` | string | Conversation to link |
|
|
40
|
+
* | `assigneeId` | string | Admin to assign |
|
|
41
|
+
* | `statusId` | string | Initial status |
|
|
42
|
+
* | `createdAt` | string | ISO 8601 timestamp for backdating |
|
|
43
|
+
* | `skipNotifications` | boolean | Skip sending notifications (default false) |
|
|
44
|
+
*
|
|
45
|
+
* ### File Custom Fields
|
|
46
|
+
*
|
|
47
|
+
* File-type custom fields can be provided in two ways:
|
|
48
|
+
*
|
|
49
|
+
* **Method 1: Multipart upload** — Send the request as `multipart/form-data`. Put
|
|
50
|
+
* the JSON body in a field named `data`, and attach files with field names like
|
|
51
|
+
* `customFields.<fieldId>`. For `allowMultiple` fields, send multiple files with
|
|
52
|
+
* the same field name.
|
|
53
|
+
*
|
|
54
|
+
* **Method 2: External URL** — In the JSON body, set the file custom field value
|
|
55
|
+
* to `{ "url": "https://..." }`. Optionally include `"name"` to set the filename
|
|
56
|
+
* (e.g. `{ "url": "https://...", "name": "report.pdf" }`); if omitted, the
|
|
57
|
+
* filename is extracted from the download response. For `allowMultiple` fields,
|
|
58
|
+
* use an array: `[{ "url": "..." }, ...]`. The server downloads the file (max
|
|
59
|
+
* 10MB, HTTPS only) and stores it.
|
|
60
|
+
*
|
|
61
|
+
* Both methods produce signed download URLs in the response.
|
|
62
|
+
*
|
|
63
|
+
* **Limits:** Max 10 files per request, 400MB total upload size. Executable file
|
|
64
|
+
* types (.exe, .bat, .js, .sh, etc.) are blocked.
|
|
65
|
+
*
|
|
66
|
+
* **Response format:** File custom field values in the response are JSON strings
|
|
67
|
+
* containing `{ "key": "...", "name": "...", "url": "https://signed-url..." }`.
|
|
68
|
+
* For `allowMultiple` fields, an array of these objects. The `url` is a
|
|
69
|
+
* time-limited signed download URL (expires in 1 hour).
|
|
70
|
+
*
|
|
71
|
+
* ### Response
|
|
72
|
+
*
|
|
73
|
+
* Returns the created ticket object with **201 Created** status.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```ts
|
|
77
|
+
* const ticket = await client.tickets.create({
|
|
78
|
+
* author: {},
|
|
79
|
+
* ticketCategoryId: '507f1f77bcf86cd799439011',
|
|
80
|
+
* title: 'Cannot login to dashboard',
|
|
81
|
+
* });
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
create(params, options) {
|
|
85
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
86
|
+
return this._client.post('/v2/tickets', {
|
|
87
|
+
body,
|
|
88
|
+
...options,
|
|
89
|
+
headers: buildHeaders([
|
|
90
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
91
|
+
options?.headers,
|
|
92
|
+
]),
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Retrieves a single ticket by its ticket number.
|
|
97
|
+
*
|
|
98
|
+
* ### Path Parameters
|
|
99
|
+
*
|
|
100
|
+
* - `id` - The ticket number (e.g. 42 from TK-42)
|
|
101
|
+
*
|
|
102
|
+
* ### Response
|
|
103
|
+
*
|
|
104
|
+
* Returns the ticket object, including `conversationParts` from the linked
|
|
105
|
+
* conversation (message history).
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* ```ts
|
|
109
|
+
* const ticket = await client.tickets.retrieve(1);
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
retrieve(id, params = {}, options) {
|
|
113
|
+
const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
|
|
114
|
+
return this._client.get(path `/v2/tickets/${id}`, {
|
|
115
|
+
...options,
|
|
116
|
+
headers: buildHeaders([
|
|
117
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
118
|
+
options?.headers,
|
|
119
|
+
]),
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Updates a ticket's properties. Only provided fields will be updated.
|
|
124
|
+
*
|
|
125
|
+
* ### Path Parameters
|
|
126
|
+
*
|
|
127
|
+
* - `id` - The ticket number
|
|
128
|
+
*
|
|
129
|
+
* ### Request Body
|
|
130
|
+
*
|
|
131
|
+
* All fields are optional.
|
|
132
|
+
*
|
|
133
|
+
* | Field | Type | Description |
|
|
134
|
+
* | ------------------- | ----------- | -------------------------------------------------- |
|
|
135
|
+
* | `title` | string | Update title |
|
|
136
|
+
* | `content` | string | Update description (HTML) |
|
|
137
|
+
* | `statusId` | string | Set status by ID |
|
|
138
|
+
* | `open` | boolean | Close (false) or reopen (true) the ticket |
|
|
139
|
+
* | `assigneeId` | string/null | Assign/unassign admin |
|
|
140
|
+
* | `companyId` | string/null | Update company association |
|
|
141
|
+
* | `customFields` | object | Update custom field values |
|
|
142
|
+
* | `snoozedUntil` | string/null | Snooze until ISO 8601 timestamp (null to unsnooze) |
|
|
143
|
+
* | `skipNotifications` | boolean | Skip notifications (default false) |
|
|
144
|
+
*
|
|
145
|
+
* ### Closing a Ticket
|
|
146
|
+
*
|
|
147
|
+
* Set `open: false` to close the ticket. Closing a ticket will also unsnooze it.
|
|
148
|
+
* The status is not changed automatically — use `statusId` to change the status
|
|
149
|
+
* explicitly.
|
|
150
|
+
*
|
|
151
|
+
* ### File Custom Fields
|
|
152
|
+
*
|
|
153
|
+
* File-type custom fields support the same two upload methods as ticket creation:
|
|
154
|
+
* multipart upload (`customFields.<fieldId>` file parts with JSON in the `data`
|
|
155
|
+
* field) and external URLs (`{ "url": "https://..." }` with optional `"name"` in
|
|
156
|
+
* the custom field value). Same limits apply (10 files, 400MB total, executable
|
|
157
|
+
* types blocked).
|
|
158
|
+
*
|
|
159
|
+
* ### Response
|
|
160
|
+
*
|
|
161
|
+
* Returns the updated ticket object.
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* ```ts
|
|
165
|
+
* const ticket = await client.tickets.update(1);
|
|
166
|
+
* ```
|
|
167
|
+
*/
|
|
168
|
+
update(id, params, options) {
|
|
169
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
170
|
+
return this._client.patch(path `/v2/tickets/${id}`, {
|
|
171
|
+
body,
|
|
172
|
+
...options,
|
|
173
|
+
headers: buildHeaders([
|
|
174
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
175
|
+
options?.headers,
|
|
176
|
+
]),
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Returns a list of tickets in your organization using cursor-based pagination.
|
|
181
|
+
*
|
|
182
|
+
* ### Query Parameters
|
|
183
|
+
*
|
|
184
|
+
* | Parameter | Type | Description |
|
|
185
|
+
* | ------------------- | -------- | ---------------------------------------------------------------- |
|
|
186
|
+
* | `limit` | number | Number of tickets to return (1-100, default 10) |
|
|
187
|
+
* | `cursor` | string | Cursor from previous response for pagination |
|
|
188
|
+
* | `ticketCategoryIds` | string[] | Filter by ticket category IDs |
|
|
189
|
+
* | `statusIds` | string[] | Filter by status IDs |
|
|
190
|
+
* | `q` | string | Search query |
|
|
191
|
+
* | `assigneeId` | string | Filter by assignee ID |
|
|
192
|
+
* | `categoryType` | string | Filter by category type: "customer", "tracker", or "back-office" |
|
|
193
|
+
* | `sortBy` | string | Sort field: "date" (default), "recent", or "ticketNumber" |
|
|
194
|
+
* | `sortOrder` | string | Sort direction: "asc" or "desc" (default) |
|
|
195
|
+
*
|
|
196
|
+
* ### Response
|
|
197
|
+
*
|
|
198
|
+
* Returns a list object with `data` (array of ticket objects) and `nextCursor`.
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* ```ts
|
|
202
|
+
* const tickets = await client.tickets.list();
|
|
203
|
+
* ```
|
|
204
|
+
*/
|
|
205
|
+
list(params = {}, options) {
|
|
206
|
+
const { 'Featurebase-Version': featurebaseVersion, ...query } = params ?? {};
|
|
207
|
+
return this._client.get('/v2/tickets', {
|
|
208
|
+
query,
|
|
209
|
+
...options,
|
|
210
|
+
headers: buildHeaders([
|
|
211
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
212
|
+
options?.headers,
|
|
213
|
+
]),
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Permanently deletes a ticket by its ticket number.
|
|
218
|
+
*
|
|
219
|
+
* ### Path Parameters
|
|
220
|
+
*
|
|
221
|
+
* - `id` - The ticket number
|
|
222
|
+
*
|
|
223
|
+
* ### Response
|
|
224
|
+
*
|
|
225
|
+
* Returns a deletion confirmation:
|
|
226
|
+
*
|
|
227
|
+
* ```json
|
|
228
|
+
* {
|
|
229
|
+
* "id": "507f1f77bcf86cd799439011",
|
|
230
|
+
* "object": "ticket",
|
|
231
|
+
* "deleted": true
|
|
232
|
+
* }
|
|
233
|
+
* ```
|
|
234
|
+
*
|
|
235
|
+
* ### Behavior
|
|
236
|
+
*
|
|
237
|
+
* - **Customer-facing tickets**: Deletes the ticket and its linked conversation.
|
|
238
|
+
* - **Back-office / tracker tickets**: Deletes the ticket and unlinks it from the
|
|
239
|
+
* conversation (conversation is preserved).
|
|
240
|
+
*
|
|
241
|
+
* ### Caution
|
|
242
|
+
*
|
|
243
|
+
* This operation is **irreversible**.
|
|
244
|
+
*
|
|
245
|
+
* @example
|
|
246
|
+
* ```ts
|
|
247
|
+
* const ticket = await client.tickets.delete(1);
|
|
248
|
+
* ```
|
|
249
|
+
*/
|
|
250
|
+
delete(id, params = {}, options) {
|
|
251
|
+
const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
|
|
252
|
+
return this._client.delete(path `/v2/tickets/${id}`, {
|
|
253
|
+
...options,
|
|
254
|
+
headers: buildHeaders([
|
|
255
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
256
|
+
options?.headers,
|
|
257
|
+
]),
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Adds a reply to a ticket's linked conversation. Supports both contact and admin
|
|
262
|
+
* replies.
|
|
263
|
+
*
|
|
264
|
+
* ### Path Parameters
|
|
265
|
+
*
|
|
266
|
+
* - `id` - The ticket number
|
|
267
|
+
*
|
|
268
|
+
* ### Contact Reply
|
|
269
|
+
*
|
|
270
|
+
* | Field | Type | Required | Description |
|
|
271
|
+
* | ------------------- | -------- | -------- | ---------------------------------------- |
|
|
272
|
+
* | `type` | string | Yes | Must be "contact" |
|
|
273
|
+
* | `contactId` | string | No\* | Featurebase contact ID |
|
|
274
|
+
* | `contactEmail` | string | No\* | Contact email |
|
|
275
|
+
* | `body` | string | Yes | Message content (HTML) |
|
|
276
|
+
* | `messageType` | string | No | Always "comment" for contacts |
|
|
277
|
+
* | `attachmentUrls` | string[] | No | Attachment URLs (max 10) |
|
|
278
|
+
* | `skipNotifications` | boolean | No | Skip notifications (default false) |
|
|
279
|
+
* | `createdAt` | string | No | ISO 8601 timestamp to backdate the reply |
|
|
280
|
+
*
|
|
281
|
+
* \*At least one of `contactId` or `contactEmail` is required.
|
|
282
|
+
*
|
|
283
|
+
* ### Admin Reply
|
|
284
|
+
*
|
|
285
|
+
* | Field | Type | Required | Description |
|
|
286
|
+
* | ------------------- | -------- | -------- | ------------------------------------------------ |
|
|
287
|
+
* | `type` | string | Yes | Must be "admin" |
|
|
288
|
+
* | `adminId` | string | Yes | ID of the admin authoring the reply |
|
|
289
|
+
* | `body` | string | Yes | Message content (HTML) |
|
|
290
|
+
* | `messageType` | string | No | "comment" (default) or "note" for internal notes |
|
|
291
|
+
* | `attachmentUrls` | string[] | No | Attachment URLs (max 10) |
|
|
292
|
+
* | `skipNotifications` | boolean | No | Skip notifications (default false) |
|
|
293
|
+
* | `createdAt` | string | No | ISO 8601 timestamp to backdate the reply |
|
|
294
|
+
*
|
|
295
|
+
* ### Response
|
|
296
|
+
*
|
|
297
|
+
* Returns a reply confirmation object.
|
|
298
|
+
*
|
|
299
|
+
* @example
|
|
300
|
+
* ```ts
|
|
301
|
+
* const ticket = await client.tickets.reply(1, {
|
|
302
|
+
* body: '<p>Thank you for your help!</p>',
|
|
303
|
+
* type: 'contact',
|
|
304
|
+
* });
|
|
305
|
+
* ```
|
|
306
|
+
*/
|
|
307
|
+
reply(id, params, options) {
|
|
308
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
309
|
+
return this._client.post(path `/v2/tickets/${id}/reply`, {
|
|
310
|
+
body,
|
|
311
|
+
...options,
|
|
312
|
+
headers: buildHeaders([
|
|
313
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
314
|
+
options?.headers,
|
|
315
|
+
]),
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
Tickets.CustomFields = CustomFields;
|
|
320
|
+
Tickets.Categories = Categories;
|
|
321
|
+
Tickets.Statuses = Statuses;
|
|
322
|
+
//# sourceMappingURL=tickets.mjs.map
|