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,908 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as ContactsAPI from './contacts';
|
|
5
|
+
import * as CompaniesAPI from '../companies/companies';
|
|
6
|
+
import * as EmailPreferencesAPI from './email-preferences';
|
|
7
|
+
import {
|
|
8
|
+
EmailPreferenceRetrieveParams,
|
|
9
|
+
EmailPreferenceUpdateParams,
|
|
10
|
+
EmailPreferences,
|
|
11
|
+
PreferenceState,
|
|
12
|
+
PreferencesOutput,
|
|
13
|
+
UpdatePreferenceBody,
|
|
14
|
+
} from './email-preferences';
|
|
15
|
+
import * as ByUserIDAPI from './by-user-id/by-user-id';
|
|
16
|
+
import {
|
|
17
|
+
ByUserID,
|
|
18
|
+
ByUserIDDeleteParams,
|
|
19
|
+
ByUserIDRetrieveParams,
|
|
20
|
+
ByUserIDRetrieveResponse,
|
|
21
|
+
} from './by-user-id/by-user-id';
|
|
22
|
+
import { APIPromise } from '../../core/api-promise';
|
|
23
|
+
import { buildHeaders } from '../../internal/headers';
|
|
24
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
25
|
+
import { path } from '../../internal/utils/path';
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Contacts are the customers and leads in your Featurebase organization. Use this endpoint to list and retrieve contact information.
|
|
29
|
+
*/
|
|
30
|
+
export class Contacts extends APIResource {
|
|
31
|
+
byUserID: ByUserIDAPI.ByUserID = new ByUserIDAPI.ByUserID(this._client);
|
|
32
|
+
emailPreferences: EmailPreferencesAPI.EmailPreferences = new EmailPreferencesAPI.EmailPreferences(
|
|
33
|
+
this._client,
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Retrieves a single contact by their Featurebase ID.
|
|
38
|
+
*
|
|
39
|
+
* Returns both customers and leads.
|
|
40
|
+
*
|
|
41
|
+
* ### Path Parameters
|
|
42
|
+
*
|
|
43
|
+
* - `id` - The Featurebase contact ID (24-character ObjectId)
|
|
44
|
+
*
|
|
45
|
+
* ### Response Format
|
|
46
|
+
*
|
|
47
|
+
* Returns a single contact object with:
|
|
48
|
+
*
|
|
49
|
+
* - `object` - Always "contact"
|
|
50
|
+
* - `id` - Unique contact identifier
|
|
51
|
+
* - `userId` - External user ID from SSO (if set)
|
|
52
|
+
* - `email` - Contact email address
|
|
53
|
+
* - `name` - Contact display name
|
|
54
|
+
* - `profilePicture` - Profile picture URL
|
|
55
|
+
* - `type` - Contact type ("customer" or "lead")
|
|
56
|
+
* - `companies` - Array of companies the contact belongs to
|
|
57
|
+
* - `customFields` - Custom field values
|
|
58
|
+
* - `postsCreated` - Number of posts created
|
|
59
|
+
* - `commentsCreated` - Number of comments created
|
|
60
|
+
* - `lastActivity` - Last activity timestamp
|
|
61
|
+
*
|
|
62
|
+
* ### Example
|
|
63
|
+
*
|
|
64
|
+
* ```json
|
|
65
|
+
* {
|
|
66
|
+
* "object": "contact",
|
|
67
|
+
* "id": "676f0f6765bdaa7d7d760f88",
|
|
68
|
+
* "email": "john@example.com",
|
|
69
|
+
* "name": "John Doe",
|
|
70
|
+
* "type": "customer",
|
|
71
|
+
* ...
|
|
72
|
+
* }
|
|
73
|
+
* ```
|
|
74
|
+
*
|
|
75
|
+
* ### Version Availability
|
|
76
|
+
*
|
|
77
|
+
* This endpoint is only available in API version 2026-01-01.nova and newer.
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```ts
|
|
81
|
+
* const contact = await client.contacts.retrieve(
|
|
82
|
+
* '507f1f77bcf86cd799439011',
|
|
83
|
+
* );
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
retrieve(
|
|
87
|
+
id: string,
|
|
88
|
+
params: ContactRetrieveParams | null | undefined = {},
|
|
89
|
+
options?: RequestOptions,
|
|
90
|
+
): APIPromise<ContactRetrieveResponse> {
|
|
91
|
+
const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
|
|
92
|
+
return this._client.get(path`/v2/contacts/${id}`, {
|
|
93
|
+
...options,
|
|
94
|
+
headers: buildHeaders([
|
|
95
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
96
|
+
options?.headers,
|
|
97
|
+
]),
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Returns a list of contacts (customers and leads) in your organization using
|
|
103
|
+
* cursor-based pagination.
|
|
104
|
+
*
|
|
105
|
+
* ### Query Parameters
|
|
106
|
+
*
|
|
107
|
+
* - `limit` - Number of contacts to return (1-100, default 10)
|
|
108
|
+
* - `cursor` - Cursor from previous response for pagination
|
|
109
|
+
* - `contactType` - Filter by contact type: "customer" (default), "lead", or "all"
|
|
110
|
+
*
|
|
111
|
+
* ### Response Format
|
|
112
|
+
*
|
|
113
|
+
* Returns a list object with:
|
|
114
|
+
*
|
|
115
|
+
* - `object` - Always "list"
|
|
116
|
+
* - `data` - Array of contact objects
|
|
117
|
+
* - `nextCursor` - Cursor for the next page, or null if no more results
|
|
118
|
+
*
|
|
119
|
+
* ### Contact Object
|
|
120
|
+
*
|
|
121
|
+
* Each contact includes:
|
|
122
|
+
*
|
|
123
|
+
* - `id` - Unique contact identifier
|
|
124
|
+
* - `userId` - External user ID from SSO (if set)
|
|
125
|
+
* - `email` - Contact email address
|
|
126
|
+
* - `name` - Contact display name
|
|
127
|
+
* - `profilePicture` - Profile picture URL
|
|
128
|
+
* - `type` - Contact type ("customer" or "lead")
|
|
129
|
+
* - `companies` - Array of companies the contact belongs to
|
|
130
|
+
* - `customFields` - Custom field values
|
|
131
|
+
* - `postsCreated` - Number of posts created
|
|
132
|
+
* - `commentsCreated` - Number of comments created
|
|
133
|
+
* - `lastActivity` - Last activity timestamp
|
|
134
|
+
*
|
|
135
|
+
* ### Example
|
|
136
|
+
*
|
|
137
|
+
* ```json
|
|
138
|
+
* {
|
|
139
|
+
* "object": "list",
|
|
140
|
+
* "data": [
|
|
141
|
+
* {
|
|
142
|
+
* "object": "contact",
|
|
143
|
+
* "id": "676f0f6765bdaa7d7d760f88",
|
|
144
|
+
* "email": "john@example.com",
|
|
145
|
+
* "name": "John Doe",
|
|
146
|
+
* "type": "customer",
|
|
147
|
+
* ...
|
|
148
|
+
* }
|
|
149
|
+
* ],
|
|
150
|
+
* "nextCursor": "eyJpZCI6IjUwN2YxZjc3YmNmODZjZDc5OTQzOTAxMSJ9"
|
|
151
|
+
* }
|
|
152
|
+
* ```
|
|
153
|
+
*
|
|
154
|
+
* ### Version Availability
|
|
155
|
+
*
|
|
156
|
+
* This endpoint is only available in API version 2026-01-01.nova and newer.
|
|
157
|
+
*
|
|
158
|
+
* @example
|
|
159
|
+
* ```ts
|
|
160
|
+
* const contactList = await client.contacts.list();
|
|
161
|
+
* ```
|
|
162
|
+
*/
|
|
163
|
+
list(params: ContactListParams | null | undefined = {}, options?: RequestOptions): APIPromise<ContactList> {
|
|
164
|
+
const { 'Featurebase-Version': featurebaseVersion, ...query } = params ?? {};
|
|
165
|
+
return this._client.get('/v2/contacts', {
|
|
166
|
+
query,
|
|
167
|
+
...options,
|
|
168
|
+
headers: buildHeaders([
|
|
169
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
170
|
+
options?.headers,
|
|
171
|
+
]),
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Permanently deletes a contact by their Featurebase ID.
|
|
177
|
+
*
|
|
178
|
+
* Supports deleting both customers and leads.
|
|
179
|
+
*
|
|
180
|
+
* ### Path Parameters
|
|
181
|
+
*
|
|
182
|
+
* - `id` - The Featurebase contact ID (24-character ObjectId)
|
|
183
|
+
*
|
|
184
|
+
* ### Deletion Behavior
|
|
185
|
+
*
|
|
186
|
+
* When a contact is deleted:
|
|
187
|
+
*
|
|
188
|
+
* - The contact record is permanently removed
|
|
189
|
+
* - Associated data cleanup is triggered asynchronously
|
|
190
|
+
* - Comments and posts created by the contact are handled according to retention
|
|
191
|
+
* policies
|
|
192
|
+
*
|
|
193
|
+
* ### Response
|
|
194
|
+
*
|
|
195
|
+
* Returns a deletion confirmation object:
|
|
196
|
+
*
|
|
197
|
+
* - `id` - The ID of the deleted contact
|
|
198
|
+
* - `object` - Always "contact"
|
|
199
|
+
* - `deleted` - Always `true`
|
|
200
|
+
*
|
|
201
|
+
* ### Example Response
|
|
202
|
+
*
|
|
203
|
+
* ```json
|
|
204
|
+
* {
|
|
205
|
+
* "id": "676f0f6765bdaa7d7d760f88",
|
|
206
|
+
* "object": "contact",
|
|
207
|
+
* "deleted": true
|
|
208
|
+
* }
|
|
209
|
+
* ```
|
|
210
|
+
*
|
|
211
|
+
* ### Version Availability
|
|
212
|
+
*
|
|
213
|
+
* This endpoint is only available in API version 2026-01-01.nova and newer.
|
|
214
|
+
*
|
|
215
|
+
* @example
|
|
216
|
+
* ```ts
|
|
217
|
+
* const deletedContact = await client.contacts.delete(
|
|
218
|
+
* '507f1f77bcf86cd799439011',
|
|
219
|
+
* );
|
|
220
|
+
* ```
|
|
221
|
+
*/
|
|
222
|
+
delete(
|
|
223
|
+
id: string,
|
|
224
|
+
params: ContactDeleteParams | null | undefined = {},
|
|
225
|
+
options?: RequestOptions,
|
|
226
|
+
): APIPromise<DeletedContact> {
|
|
227
|
+
const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
|
|
228
|
+
return this._client.delete(path`/v2/contacts/${id}`, {
|
|
229
|
+
...options,
|
|
230
|
+
headers: buildHeaders([
|
|
231
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
232
|
+
options?.headers,
|
|
233
|
+
]),
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Blocks a contact by their Featurebase ID from the messenger/inbox.
|
|
239
|
+
*
|
|
240
|
+
* ### Path Parameters
|
|
241
|
+
*
|
|
242
|
+
* - `id` - The Featurebase internal ID of the contact (MongoDB ObjectId)
|
|
243
|
+
*
|
|
244
|
+
* ### Supported Contact Types
|
|
245
|
+
*
|
|
246
|
+
* This endpoint blocks both:
|
|
247
|
+
*
|
|
248
|
+
* - **Customers** - Users with registered accounts
|
|
249
|
+
* - **Leads** - Anonymous or unregistered visitors
|
|
250
|
+
*
|
|
251
|
+
* ### Blocking Behavior
|
|
252
|
+
*
|
|
253
|
+
* When a contact is blocked:
|
|
254
|
+
*
|
|
255
|
+
* - The contact cannot send new messages via messenger
|
|
256
|
+
* - Existing conversations are not deleted but no new messages can be added by the
|
|
257
|
+
* blocked user
|
|
258
|
+
* - The block can be removed by unblocking the contact
|
|
259
|
+
*
|
|
260
|
+
* ### Response
|
|
261
|
+
*
|
|
262
|
+
* Returns a block confirmation object:
|
|
263
|
+
*
|
|
264
|
+
* - `id` - The ID of the blocked contact
|
|
265
|
+
* - `object` - Always "contact"
|
|
266
|
+
* - `blocked` - Always `true`
|
|
267
|
+
*
|
|
268
|
+
* ### Example Response
|
|
269
|
+
*
|
|
270
|
+
* ```json
|
|
271
|
+
* {
|
|
272
|
+
* "id": "507f1f77bcf86cd799439011",
|
|
273
|
+
* "object": "contact",
|
|
274
|
+
* "blocked": true
|
|
275
|
+
* }
|
|
276
|
+
* ```
|
|
277
|
+
*
|
|
278
|
+
* ### Version Availability
|
|
279
|
+
*
|
|
280
|
+
* This endpoint is only available in API version 2026-01-01.nova and newer.
|
|
281
|
+
*
|
|
282
|
+
* @example
|
|
283
|
+
* ```ts
|
|
284
|
+
* const response = await client.contacts.block(
|
|
285
|
+
* '507f1f77bcf86cd799439011',
|
|
286
|
+
* );
|
|
287
|
+
* ```
|
|
288
|
+
*/
|
|
289
|
+
block(
|
|
290
|
+
id: string,
|
|
291
|
+
params: ContactBlockParams | null | undefined = {},
|
|
292
|
+
options?: RequestOptions,
|
|
293
|
+
): APIPromise<ContactBlockResponse> {
|
|
294
|
+
const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
|
|
295
|
+
return this._client.post(path`/v2/contacts/${id}/block`, {
|
|
296
|
+
...options,
|
|
297
|
+
headers: buildHeaders([
|
|
298
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
299
|
+
options?.headers,
|
|
300
|
+
]),
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Creates a new contact or updates an existing one.
|
|
306
|
+
*
|
|
307
|
+
* If a contact with the given `email` or `userId` already exists, it will be
|
|
308
|
+
* updated. Otherwise, a new contact will be created.
|
|
309
|
+
*
|
|
310
|
+
* **At least one of `email` or `userId` must be provided for identification.**
|
|
311
|
+
*
|
|
312
|
+
* ### Request Body
|
|
313
|
+
*
|
|
314
|
+
* | Field | Type | Required | Description |
|
|
315
|
+
* | ----------------------- | ------- | ------------------- | --------------------------------------- |
|
|
316
|
+
* | `email` | string | One of email/userId | Contact email address |
|
|
317
|
+
* | `userId` | string | One of email/userId | External user ID from your system |
|
|
318
|
+
* | `name` | string | No | Contact display name |
|
|
319
|
+
* | `profilePicture` | string | No | Profile picture URL |
|
|
320
|
+
* | `companies` | array | No | Companies the contact belongs to |
|
|
321
|
+
* | `customFields` | object | No | Custom field values |
|
|
322
|
+
* | `subscribedToChangelog` | boolean | No | Whether subscribed to changelog |
|
|
323
|
+
* | `locale` | string | No | Contact locale/language |
|
|
324
|
+
* | `phone` | string | No | Contact phone number |
|
|
325
|
+
* | `roles` | array | No | Role IDs to assign |
|
|
326
|
+
* | `userHash` | string | No | HMAC hash for identity verification |
|
|
327
|
+
* | `createdAt` | string | No | When the contact was created (ISO 8601) |
|
|
328
|
+
*
|
|
329
|
+
* ### Company Object
|
|
330
|
+
*
|
|
331
|
+
* Each company in the `companies` array can have:
|
|
332
|
+
*
|
|
333
|
+
* - `id` (required) - External company ID from your system
|
|
334
|
+
* - `name` (required) - Company name
|
|
335
|
+
* - `monthlySpend` - Monthly spend/revenue
|
|
336
|
+
* - `customFields` - Custom field values
|
|
337
|
+
* - `industry` - Industry
|
|
338
|
+
* - `website` - Company website URL
|
|
339
|
+
* - `plan` - Current plan/subscription
|
|
340
|
+
* - `companySize` - Number of employees
|
|
341
|
+
* - `createdAt` - When the company was created
|
|
342
|
+
*
|
|
343
|
+
* ### Response
|
|
344
|
+
*
|
|
345
|
+
* Returns the created or updated contact object.
|
|
346
|
+
*
|
|
347
|
+
* - **201 Created** - A new contact was created
|
|
348
|
+
* - **200 OK** - An existing contact was updated
|
|
349
|
+
*
|
|
350
|
+
* ### Example Request
|
|
351
|
+
*
|
|
352
|
+
* ```json
|
|
353
|
+
* {
|
|
354
|
+
* "email": "john@example.com",
|
|
355
|
+
* "name": "John Doe",
|
|
356
|
+
* "userId": "usr_12345",
|
|
357
|
+
* "companies": [
|
|
358
|
+
* {
|
|
359
|
+
* "id": "company_123",
|
|
360
|
+
* "name": "Acme Inc",
|
|
361
|
+
* "monthlySpend": 500,
|
|
362
|
+
* "plan": "enterprise"
|
|
363
|
+
* }
|
|
364
|
+
* ],
|
|
365
|
+
* "customFields": {
|
|
366
|
+
* "plan": "pro",
|
|
367
|
+
* "signupSource": "website"
|
|
368
|
+
* },
|
|
369
|
+
* "subscribedToChangelog": true
|
|
370
|
+
* }
|
|
371
|
+
* ```
|
|
372
|
+
*
|
|
373
|
+
* ### Example Response
|
|
374
|
+
*
|
|
375
|
+
* ```json
|
|
376
|
+
* {
|
|
377
|
+
* "object": "contact",
|
|
378
|
+
* "id": "676f0f6765bdaa7d7d760f88",
|
|
379
|
+
* "email": "john@example.com",
|
|
380
|
+
* "name": "John Doe",
|
|
381
|
+
* "userId": "usr_12345",
|
|
382
|
+
* "type": "customer",
|
|
383
|
+
* "companies": [...],
|
|
384
|
+
* "customFields": {...},
|
|
385
|
+
* ...
|
|
386
|
+
* }
|
|
387
|
+
* ```
|
|
388
|
+
*
|
|
389
|
+
* ### Version Availability
|
|
390
|
+
*
|
|
391
|
+
* This endpoint is only available in API version 2026-01-01.nova and newer.
|
|
392
|
+
*
|
|
393
|
+
* @example
|
|
394
|
+
* ```ts
|
|
395
|
+
* const response = await client.contacts.createOrUpdate();
|
|
396
|
+
* ```
|
|
397
|
+
*/
|
|
398
|
+
createOrUpdate(
|
|
399
|
+
params: ContactCreateOrUpdateParams,
|
|
400
|
+
options?: RequestOptions,
|
|
401
|
+
): APIPromise<ContactCreateOrUpdateResponse> {
|
|
402
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
403
|
+
return this._client.post('/v2/contacts', {
|
|
404
|
+
body,
|
|
405
|
+
...options,
|
|
406
|
+
headers: buildHeaders([
|
|
407
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
408
|
+
options?.headers,
|
|
409
|
+
]),
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Unblocks a contact by their Featurebase ID from the messenger/inbox.
|
|
415
|
+
*
|
|
416
|
+
* ### Path Parameters
|
|
417
|
+
*
|
|
418
|
+
* - `id` - The Featurebase internal ID of the contact (MongoDB ObjectId)
|
|
419
|
+
*
|
|
420
|
+
* ### Supported Contact Types
|
|
421
|
+
*
|
|
422
|
+
* This endpoint unblocks both:
|
|
423
|
+
*
|
|
424
|
+
* - **Customers** - Users with registered accounts
|
|
425
|
+
* - **Leads** - Anonymous or unregistered visitors
|
|
426
|
+
*
|
|
427
|
+
* ### Unblocking Behavior
|
|
428
|
+
*
|
|
429
|
+
* When a contact is unblocked:
|
|
430
|
+
*
|
|
431
|
+
* - The contact can resume sending messages via messenger
|
|
432
|
+
* - Previously blocked conversations remain intact
|
|
433
|
+
* - The contact regains full messenger functionality
|
|
434
|
+
*
|
|
435
|
+
* ### Response
|
|
436
|
+
*
|
|
437
|
+
* Returns an unblock confirmation object:
|
|
438
|
+
*
|
|
439
|
+
* - `id` - The ID of the unblocked contact
|
|
440
|
+
* - `object` - Always "contact"
|
|
441
|
+
* - `unblocked` - Always `true`
|
|
442
|
+
*
|
|
443
|
+
* ### Example Response
|
|
444
|
+
*
|
|
445
|
+
* ```json
|
|
446
|
+
* {
|
|
447
|
+
* "id": "507f1f77bcf86cd799439011",
|
|
448
|
+
* "object": "contact",
|
|
449
|
+
* "unblocked": true
|
|
450
|
+
* }
|
|
451
|
+
* ```
|
|
452
|
+
*
|
|
453
|
+
* ### Version Availability
|
|
454
|
+
*
|
|
455
|
+
* This endpoint is only available in API version 2026-01-01.nova and newer.
|
|
456
|
+
*
|
|
457
|
+
* @example
|
|
458
|
+
* ```ts
|
|
459
|
+
* const response = await client.contacts.unblock(
|
|
460
|
+
* '507f1f77bcf86cd799439011',
|
|
461
|
+
* );
|
|
462
|
+
* ```
|
|
463
|
+
*/
|
|
464
|
+
unblock(
|
|
465
|
+
id: string,
|
|
466
|
+
params: ContactUnblockParams | null | undefined = {},
|
|
467
|
+
options?: RequestOptions,
|
|
468
|
+
): APIPromise<ContactUnblockResponse> {
|
|
469
|
+
const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
|
|
470
|
+
return this._client.post(path`/v2/contacts/${id}/unblock`, {
|
|
471
|
+
...options,
|
|
472
|
+
headers: buildHeaders([
|
|
473
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
474
|
+
options?.headers,
|
|
475
|
+
]),
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* User who submitted the response
|
|
482
|
+
*/
|
|
483
|
+
export interface Contact {
|
|
484
|
+
/**
|
|
485
|
+
* Unique identifier
|
|
486
|
+
*/
|
|
487
|
+
id: string;
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* Contact display name
|
|
491
|
+
*/
|
|
492
|
+
name: string;
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Object type identifier
|
|
496
|
+
*/
|
|
497
|
+
object: 'contact';
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Type of contact
|
|
501
|
+
*/
|
|
502
|
+
type: 'customer' | 'lead';
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Number of comments created
|
|
506
|
+
*/
|
|
507
|
+
commentsCreated?: number;
|
|
508
|
+
|
|
509
|
+
/**
|
|
510
|
+
* Companies the contact belongs to
|
|
511
|
+
*/
|
|
512
|
+
companies?: Array<CompaniesAPI.Company>;
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* Custom field values on the contact
|
|
516
|
+
*/
|
|
517
|
+
customFields?: { [key: string]: unknown };
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* Contact description/bio
|
|
521
|
+
*/
|
|
522
|
+
description?: string;
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* Contact email
|
|
526
|
+
*/
|
|
527
|
+
email?: string | null;
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* Last activity ISO timestamp
|
|
531
|
+
*/
|
|
532
|
+
lastActivity?: string;
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* Contact locale
|
|
536
|
+
*/
|
|
537
|
+
locale?: string;
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* Whether manually opted out from changelog
|
|
541
|
+
*/
|
|
542
|
+
manuallyOptedOutFromChangelog?: boolean;
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* Organization ID the contact belongs to
|
|
546
|
+
*/
|
|
547
|
+
organizationId?: string;
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* Number of posts created
|
|
551
|
+
*/
|
|
552
|
+
postsCreated?: number;
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* Profile picture URL
|
|
556
|
+
*/
|
|
557
|
+
profilePicture?: string | null;
|
|
558
|
+
|
|
559
|
+
/**
|
|
560
|
+
* Contact roles
|
|
561
|
+
*/
|
|
562
|
+
roles?: Array<string>;
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* Whether subscribed to changelog
|
|
566
|
+
*/
|
|
567
|
+
subscribedToChangelog?: boolean;
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* External user ID from SSO
|
|
571
|
+
*/
|
|
572
|
+
userId?: string;
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* Whether email is verified
|
|
576
|
+
*/
|
|
577
|
+
verified?: boolean;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
export interface ContactList {
|
|
581
|
+
/**
|
|
582
|
+
* Array of contacts
|
|
583
|
+
*/
|
|
584
|
+
data: Array<ContactList.Data>;
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* Cursor for fetching the next page (cursor-based pagination)
|
|
588
|
+
*/
|
|
589
|
+
nextCursor: string | null;
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* Object type identifier
|
|
593
|
+
*/
|
|
594
|
+
object: 'list';
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
export namespace ContactList {
|
|
598
|
+
/**
|
|
599
|
+
* User who submitted the response
|
|
600
|
+
*/
|
|
601
|
+
export type Data = ContactsAPI.Contact | (null & {});
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
export interface DeletedContact {
|
|
605
|
+
/**
|
|
606
|
+
* Unique identifier of the deleted contact
|
|
607
|
+
*/
|
|
608
|
+
id: string;
|
|
609
|
+
|
|
610
|
+
/**
|
|
611
|
+
* Indicates the resource was deleted
|
|
612
|
+
*/
|
|
613
|
+
deleted: true;
|
|
614
|
+
|
|
615
|
+
/**
|
|
616
|
+
* Object type identifier
|
|
617
|
+
*/
|
|
618
|
+
object: 'contact';
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
/**
|
|
622
|
+
* User who submitted the response
|
|
623
|
+
*/
|
|
624
|
+
export type ContactRetrieveResponse = Contact | (null & {});
|
|
625
|
+
|
|
626
|
+
export interface ContactBlockResponse {
|
|
627
|
+
/**
|
|
628
|
+
* Unique identifier of the blocked contact
|
|
629
|
+
*/
|
|
630
|
+
id: string;
|
|
631
|
+
|
|
632
|
+
/**
|
|
633
|
+
* Indicates the contact was blocked
|
|
634
|
+
*/
|
|
635
|
+
blocked: true;
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* Object type identifier
|
|
639
|
+
*/
|
|
640
|
+
object: 'contact';
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* User who submitted the response
|
|
645
|
+
*/
|
|
646
|
+
export type ContactCreateOrUpdateResponse = Contact | (null & {});
|
|
647
|
+
|
|
648
|
+
export interface ContactUnblockResponse {
|
|
649
|
+
/**
|
|
650
|
+
* Unique identifier of the unblocked contact
|
|
651
|
+
*/
|
|
652
|
+
id: string;
|
|
653
|
+
|
|
654
|
+
/**
|
|
655
|
+
* Object type identifier
|
|
656
|
+
*/
|
|
657
|
+
object: 'contact';
|
|
658
|
+
|
|
659
|
+
/**
|
|
660
|
+
* Indicates the contact was unblocked
|
|
661
|
+
*/
|
|
662
|
+
unblocked: true;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
export interface ContactRetrieveParams {
|
|
666
|
+
/**
|
|
667
|
+
* API version for this request. Defaults to your organization's configured API
|
|
668
|
+
* version if not specified.
|
|
669
|
+
*/
|
|
670
|
+
'Featurebase-Version'?: string;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
export interface ContactListParams {
|
|
674
|
+
/**
|
|
675
|
+
* Query param: Filter contacts by type. Defaults to "customer".
|
|
676
|
+
*/
|
|
677
|
+
contactType?: 'customer' | 'lead' | 'all';
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
* Query param: An opaque cursor for pagination. Use the nextCursor value from a
|
|
681
|
+
* previous response to fetch the next page of results.
|
|
682
|
+
*/
|
|
683
|
+
cursor?: string;
|
|
684
|
+
|
|
685
|
+
/**
|
|
686
|
+
* Query param: A limit on the number of objects to be returned, between 1 and 100.
|
|
687
|
+
*/
|
|
688
|
+
limit?: number;
|
|
689
|
+
|
|
690
|
+
/**
|
|
691
|
+
* Header param: API version for this request. Defaults to your organization's
|
|
692
|
+
* configured API version if not specified.
|
|
693
|
+
*/
|
|
694
|
+
'Featurebase-Version'?: string;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
export interface ContactDeleteParams {
|
|
698
|
+
/**
|
|
699
|
+
* API version for this request. Defaults to your organization's configured API
|
|
700
|
+
* version if not specified.
|
|
701
|
+
*/
|
|
702
|
+
'Featurebase-Version'?: string;
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
export interface ContactBlockParams {
|
|
706
|
+
/**
|
|
707
|
+
* API version for this request. Defaults to your organization's configured API
|
|
708
|
+
* version if not specified.
|
|
709
|
+
*/
|
|
710
|
+
'Featurebase-Version'?: string;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
export interface ContactCreateOrUpdateParams {
|
|
714
|
+
/**
|
|
715
|
+
* Body param: Companies the contact belongs to
|
|
716
|
+
*/
|
|
717
|
+
companies?: Array<ContactCreateOrUpdateParams.Company>;
|
|
718
|
+
|
|
719
|
+
/**
|
|
720
|
+
* Body param: When the contact was created in your system (ISO 8601)
|
|
721
|
+
*/
|
|
722
|
+
createdAt?: string | null;
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* Body param: Custom field values on the contact. Values can be string, number,
|
|
726
|
+
* boolean, null, or array of primitives.
|
|
727
|
+
*/
|
|
728
|
+
customFields?: ContactCreateOrUpdateParams.CustomFields;
|
|
729
|
+
|
|
730
|
+
/**
|
|
731
|
+
* Body param: Contact email address. Used for identification if userId is not
|
|
732
|
+
* provided.
|
|
733
|
+
*/
|
|
734
|
+
email?: string;
|
|
735
|
+
|
|
736
|
+
/**
|
|
737
|
+
* Body param: Contact locale/language preference
|
|
738
|
+
*/
|
|
739
|
+
locale?: string;
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* Body param: Contact display name
|
|
743
|
+
*/
|
|
744
|
+
name?: string;
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* Body param: Contact phone number
|
|
748
|
+
*/
|
|
749
|
+
phone?: string | null;
|
|
750
|
+
|
|
751
|
+
/**
|
|
752
|
+
* Body param: Profile picture URL
|
|
753
|
+
*/
|
|
754
|
+
profilePicture?: string | null;
|
|
755
|
+
|
|
756
|
+
/**
|
|
757
|
+
* Body param: Array of role IDs to assign to the contact
|
|
758
|
+
*/
|
|
759
|
+
roles?: Array<string>;
|
|
760
|
+
|
|
761
|
+
/**
|
|
762
|
+
* Body param: Whether the contact is subscribed to changelog updates
|
|
763
|
+
*/
|
|
764
|
+
subscribedToChangelog?: boolean;
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* Body param: HMAC-SHA256 hash of userId or email for identity verification
|
|
768
|
+
*/
|
|
769
|
+
userHash?: string;
|
|
770
|
+
|
|
771
|
+
/**
|
|
772
|
+
* Body param: External user ID from your system. Takes precedence over email for
|
|
773
|
+
* identification.
|
|
774
|
+
*/
|
|
775
|
+
userId?: string;
|
|
776
|
+
|
|
777
|
+
/**
|
|
778
|
+
* Header param: API version for this request. Defaults to your organization's
|
|
779
|
+
* configured API version if not specified.
|
|
780
|
+
*/
|
|
781
|
+
'Featurebase-Version'?: string;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
export namespace ContactCreateOrUpdateParams {
|
|
785
|
+
export interface Company {
|
|
786
|
+
/**
|
|
787
|
+
* External company ID from your system
|
|
788
|
+
*/
|
|
789
|
+
id: string;
|
|
790
|
+
|
|
791
|
+
/**
|
|
792
|
+
* Company name
|
|
793
|
+
*/
|
|
794
|
+
name: string;
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* HMAC-SHA256 hash of company ID for identity verification
|
|
798
|
+
*/
|
|
799
|
+
companyHash?: string;
|
|
800
|
+
|
|
801
|
+
/**
|
|
802
|
+
* Number of employees in the company
|
|
803
|
+
*/
|
|
804
|
+
companySize?: number | null;
|
|
805
|
+
|
|
806
|
+
/**
|
|
807
|
+
* When the company was created (ISO 8601)
|
|
808
|
+
*/
|
|
809
|
+
createdAt?: string | null;
|
|
810
|
+
|
|
811
|
+
/**
|
|
812
|
+
* Custom field values on the company. Values can be string, number, boolean, null,
|
|
813
|
+
* or array of primitives.
|
|
814
|
+
*/
|
|
815
|
+
customFields?: Company.CustomFields;
|
|
816
|
+
|
|
817
|
+
/**
|
|
818
|
+
* Industry the company operates in
|
|
819
|
+
*/
|
|
820
|
+
industry?: string;
|
|
821
|
+
|
|
822
|
+
/**
|
|
823
|
+
* Monthly spend/revenue from this company
|
|
824
|
+
*/
|
|
825
|
+
monthlySpend?: number;
|
|
826
|
+
|
|
827
|
+
/**
|
|
828
|
+
* Current plan/subscription name
|
|
829
|
+
*/
|
|
830
|
+
plan?: string;
|
|
831
|
+
|
|
832
|
+
/**
|
|
833
|
+
* Company website URL
|
|
834
|
+
*/
|
|
835
|
+
website?: string;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
export namespace Company {
|
|
839
|
+
/**
|
|
840
|
+
* Custom field values on the company. Values can be string, number, boolean, null,
|
|
841
|
+
* or array of primitives.
|
|
842
|
+
*/
|
|
843
|
+
export interface CustomFields {
|
|
844
|
+
industry?: string;
|
|
845
|
+
|
|
846
|
+
plan?: string;
|
|
847
|
+
|
|
848
|
+
priority?: string;
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
/**
|
|
853
|
+
* Custom field values on the contact. Values can be string, number, boolean, null,
|
|
854
|
+
* or array of primitives.
|
|
855
|
+
*/
|
|
856
|
+
export interface CustomFields {
|
|
857
|
+
accountType?: string;
|
|
858
|
+
|
|
859
|
+
plan?: string;
|
|
860
|
+
|
|
861
|
+
signupSource?: string;
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
export interface ContactUnblockParams {
|
|
866
|
+
/**
|
|
867
|
+
* API version for this request. Defaults to your organization's configured API
|
|
868
|
+
* version if not specified.
|
|
869
|
+
*/
|
|
870
|
+
'Featurebase-Version'?: string;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
Contacts.ByUserID = ByUserID;
|
|
874
|
+
Contacts.EmailPreferences = EmailPreferences;
|
|
875
|
+
|
|
876
|
+
export declare namespace Contacts {
|
|
877
|
+
export {
|
|
878
|
+
type Contact as Contact,
|
|
879
|
+
type ContactList as ContactList,
|
|
880
|
+
type DeletedContact as DeletedContact,
|
|
881
|
+
type ContactRetrieveResponse as ContactRetrieveResponse,
|
|
882
|
+
type ContactBlockResponse as ContactBlockResponse,
|
|
883
|
+
type ContactCreateOrUpdateResponse as ContactCreateOrUpdateResponse,
|
|
884
|
+
type ContactUnblockResponse as ContactUnblockResponse,
|
|
885
|
+
type ContactRetrieveParams as ContactRetrieveParams,
|
|
886
|
+
type ContactListParams as ContactListParams,
|
|
887
|
+
type ContactDeleteParams as ContactDeleteParams,
|
|
888
|
+
type ContactBlockParams as ContactBlockParams,
|
|
889
|
+
type ContactCreateOrUpdateParams as ContactCreateOrUpdateParams,
|
|
890
|
+
type ContactUnblockParams as ContactUnblockParams,
|
|
891
|
+
};
|
|
892
|
+
|
|
893
|
+
export {
|
|
894
|
+
ByUserID as ByUserID,
|
|
895
|
+
type ByUserIDRetrieveResponse as ByUserIDRetrieveResponse,
|
|
896
|
+
type ByUserIDRetrieveParams as ByUserIDRetrieveParams,
|
|
897
|
+
type ByUserIDDeleteParams as ByUserIDDeleteParams,
|
|
898
|
+
};
|
|
899
|
+
|
|
900
|
+
export {
|
|
901
|
+
EmailPreferences as EmailPreferences,
|
|
902
|
+
type PreferenceState as PreferenceState,
|
|
903
|
+
type PreferencesOutput as PreferencesOutput,
|
|
904
|
+
type UpdatePreferenceBody as UpdatePreferenceBody,
|
|
905
|
+
type EmailPreferenceRetrieveParams as EmailPreferenceRetrieveParams,
|
|
906
|
+
type EmailPreferenceUpdateParams as EmailPreferenceUpdateParams,
|
|
907
|
+
};
|
|
908
|
+
}
|