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,297 @@
|
|
|
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.RedirectRules = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const headers_1 = require("../../internal/headers.js");
|
|
7
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
8
|
+
/**
|
|
9
|
+
* Help centers allow organizations to create and manage knowledge bases with articles and collections. Currently, Featurebase supports one help center per organization.
|
|
10
|
+
*/
|
|
11
|
+
class RedirectRules extends resource_1.APIResource {
|
|
12
|
+
/**
|
|
13
|
+
* Creates a new redirect rule in your organization.
|
|
14
|
+
*
|
|
15
|
+
* The `fromUrl` is normalized on creation: query parameters and hash fragments are
|
|
16
|
+
* stripped, the hostname is lowercased, and trailing slashes are removed. The
|
|
17
|
+
* `fromUrl` hostname must match the Help Center's configured custom domain.
|
|
18
|
+
*
|
|
19
|
+
* The target article or collection must exist and have a resolvable URL (i.e., a
|
|
20
|
+
* published translation with a slug).
|
|
21
|
+
*
|
|
22
|
+
* ### Request Body
|
|
23
|
+
*
|
|
24
|
+
* Required attributes:
|
|
25
|
+
*
|
|
26
|
+
* - `helpCenterId` - The ID of the help center this rule belongs to
|
|
27
|
+
* - `locale` - Locale code used to resolve the target translation
|
|
28
|
+
* - `fromUrl` - The full absolute URL to redirect from (must match the help
|
|
29
|
+
* center's custom domain)
|
|
30
|
+
* - `targetType` - "article" or "collection"
|
|
31
|
+
* - `targetId` - The ID of the target article or collection
|
|
32
|
+
*
|
|
33
|
+
* ### Response
|
|
34
|
+
*
|
|
35
|
+
* Returns the created redirect rule object.
|
|
36
|
+
*
|
|
37
|
+
* ### Errors
|
|
38
|
+
*
|
|
39
|
+
* - `400` - Invalid request data, fromUrl does not match custom domain, or target
|
|
40
|
+
* not found
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* const redirectRule =
|
|
45
|
+
* await client.helpCenter.redirectRules.create({
|
|
46
|
+
* fromUrl:
|
|
47
|
+
* 'https://help.example.com/en/old/getting-started',
|
|
48
|
+
* helpCenterId: 'ox6qrqprmsuqaunj',
|
|
49
|
+
* locale: 'en',
|
|
50
|
+
* targetId: '10021362',
|
|
51
|
+
* targetType: 'article',
|
|
52
|
+
* });
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
create(params, options) {
|
|
56
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
57
|
+
return this._client.post('/v2/help_center/redirect_rules', {
|
|
58
|
+
body,
|
|
59
|
+
...options,
|
|
60
|
+
headers: (0, headers_1.buildHeaders)([
|
|
61
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
62
|
+
options?.headers,
|
|
63
|
+
]),
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Retrieves a specific redirect rule by its unique identifier.
|
|
68
|
+
*
|
|
69
|
+
* Returns the redirect rule object if found in your organization.
|
|
70
|
+
*
|
|
71
|
+
* ### Response
|
|
72
|
+
*
|
|
73
|
+
* Returns a redirect rule object with:
|
|
74
|
+
*
|
|
75
|
+
* - `id` - Unique identifier (MongoDB ObjectId)
|
|
76
|
+
* - `helpCenterId` - Help center this rule belongs to
|
|
77
|
+
* - `locale` - Locale code
|
|
78
|
+
* - `fromUrl` - Canonical source URL being redirected from
|
|
79
|
+
* - `targetType` - "article" or "collection"
|
|
80
|
+
* - `targetId` - ID of the target article or collection
|
|
81
|
+
* - `createdAt` - ISO 8601 timestamp when created
|
|
82
|
+
* - `updatedAt` - ISO 8601 timestamp when last updated
|
|
83
|
+
*
|
|
84
|
+
* ### Errors
|
|
85
|
+
*
|
|
86
|
+
* - `404` - Redirect rule not found in your organization
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```ts
|
|
90
|
+
* const redirectRule =
|
|
91
|
+
* await client.helpCenter.redirectRules.retrieve(
|
|
92
|
+
* '507f1f77bcf86cd799439011',
|
|
93
|
+
* );
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
retrieve(id, params = {}, options) {
|
|
97
|
+
const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
|
|
98
|
+
return this._client.get((0, path_1.path) `/v2/help_center/redirect_rules/${id}`, {
|
|
99
|
+
...options,
|
|
100
|
+
headers: (0, headers_1.buildHeaders)([
|
|
101
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
102
|
+
options?.headers,
|
|
103
|
+
]),
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Updates an existing redirect rule. Only include the fields you wish to update.
|
|
108
|
+
*
|
|
109
|
+
* If `fromUrl` is provided, it will be re-normalized and validated against the
|
|
110
|
+
* Help Center's custom domain. If `targetType` or `targetId` is changed, the new
|
|
111
|
+
* target must exist and have a resolvable URL.
|
|
112
|
+
*
|
|
113
|
+
* ### Path Parameters
|
|
114
|
+
*
|
|
115
|
+
* - `id` - The unique identifier of the redirect rule to update
|
|
116
|
+
*
|
|
117
|
+
* ### Request Body
|
|
118
|
+
*
|
|
119
|
+
* All fields are optional. Only provided fields will be updated:
|
|
120
|
+
*
|
|
121
|
+
* - `helpCenterId` - The help center ID
|
|
122
|
+
* - `locale` - Locale code
|
|
123
|
+
* - `fromUrl` - Updated source URL (will be re-normalized)
|
|
124
|
+
* - `targetType` - "article" or "collection"
|
|
125
|
+
* - `targetId` - ID of the new target article or collection
|
|
126
|
+
*
|
|
127
|
+
* ### Response
|
|
128
|
+
*
|
|
129
|
+
* Returns the updated redirect rule object.
|
|
130
|
+
*
|
|
131
|
+
* ### Errors
|
|
132
|
+
*
|
|
133
|
+
* - `404` - Redirect rule not found
|
|
134
|
+
* - `400` - Invalid data, domain mismatch, duplicate fromUrl, or target not found
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* ```ts
|
|
138
|
+
* const redirectRule =
|
|
139
|
+
* await client.helpCenter.redirectRules.update(
|
|
140
|
+
* '507f1f77bcf86cd799439011',
|
|
141
|
+
* );
|
|
142
|
+
* ```
|
|
143
|
+
*/
|
|
144
|
+
update(id, params, options) {
|
|
145
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
146
|
+
return this._client.patch((0, path_1.path) `/v2/help_center/redirect_rules/${id}`, {
|
|
147
|
+
body,
|
|
148
|
+
...options,
|
|
149
|
+
headers: (0, headers_1.buildHeaders)([
|
|
150
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
151
|
+
options?.headers,
|
|
152
|
+
]),
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Returns a paginated list of redirect rules within your organization.
|
|
157
|
+
*
|
|
158
|
+
* Redirect rules map old Help Center URLs to new article or collection
|
|
159
|
+
* destinations, enabling seamless migration from legacy help center systems. Only
|
|
160
|
+
* Help Centers with a custom domain configured support redirect rules.
|
|
161
|
+
*
|
|
162
|
+
* ### Query Parameters
|
|
163
|
+
*
|
|
164
|
+
* - `limit` - Number of items to return (1-100, default 10)
|
|
165
|
+
* - `cursor` - Cursor for pagination
|
|
166
|
+
* - `helpCenterId` - Filter by help center ID
|
|
167
|
+
* - `locale` - Filter by locale code
|
|
168
|
+
* - `targetType` - Filter by target type ("article" or "collection")
|
|
169
|
+
*
|
|
170
|
+
* ### Response Format
|
|
171
|
+
*
|
|
172
|
+
* Returns a list object with:
|
|
173
|
+
*
|
|
174
|
+
* - `object` - Always "list"
|
|
175
|
+
* - `data` - Array of redirect rule objects
|
|
176
|
+
* - `nextCursor` - Cursor for next page (null if no more results)
|
|
177
|
+
*
|
|
178
|
+
* ### Redirect Rule Object
|
|
179
|
+
*
|
|
180
|
+
* Each redirect rule includes:
|
|
181
|
+
*
|
|
182
|
+
* - `id` - Unique identifier (MongoDB ObjectId)
|
|
183
|
+
* - `helpCenterId` - Help center this rule belongs to
|
|
184
|
+
* - `locale` - Locale code used to resolve the target translation
|
|
185
|
+
* - `fromUrl` - Canonical source URL (query/hash stripped, hostname lowercased)
|
|
186
|
+
* - `targetType` - "article" or "collection"
|
|
187
|
+
* - `targetId` - ID of the target article or collection
|
|
188
|
+
* - `createdAt` - ISO 8601 timestamp when created
|
|
189
|
+
* - `updatedAt` - ISO 8601 timestamp when last updated
|
|
190
|
+
*
|
|
191
|
+
* @example
|
|
192
|
+
* ```ts
|
|
193
|
+
* const redirectRules =
|
|
194
|
+
* await client.helpCenter.redirectRules.list();
|
|
195
|
+
* ```
|
|
196
|
+
*/
|
|
197
|
+
list(params = {}, options) {
|
|
198
|
+
const { 'Featurebase-Version': featurebaseVersion, ...query } = params ?? {};
|
|
199
|
+
return this._client.get('/v2/help_center/redirect_rules', {
|
|
200
|
+
query,
|
|
201
|
+
...options,
|
|
202
|
+
headers: (0, headers_1.buildHeaders)([
|
|
203
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
204
|
+
options?.headers,
|
|
205
|
+
]),
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Deletes an existing redirect rule. The associated Redis cache entry is also
|
|
210
|
+
* invalidated.
|
|
211
|
+
*
|
|
212
|
+
* ### Path Parameters
|
|
213
|
+
*
|
|
214
|
+
* - `id` - The unique identifier of the redirect rule to delete
|
|
215
|
+
*
|
|
216
|
+
* ### Response
|
|
217
|
+
*
|
|
218
|
+
* Returns a deletion confirmation object:
|
|
219
|
+
*
|
|
220
|
+
* - `id` - The ID of the deleted redirect rule
|
|
221
|
+
* - `object` - Always "redirect_rule"
|
|
222
|
+
* - `deleted` - Always true
|
|
223
|
+
*
|
|
224
|
+
* ### Errors
|
|
225
|
+
*
|
|
226
|
+
* - `404` - Redirect rule not found in your organization
|
|
227
|
+
*
|
|
228
|
+
* @example
|
|
229
|
+
* ```ts
|
|
230
|
+
* const redirectRule =
|
|
231
|
+
* await client.helpCenter.redirectRules.delete(
|
|
232
|
+
* '507f1f77bcf86cd799439011',
|
|
233
|
+
* );
|
|
234
|
+
* ```
|
|
235
|
+
*/
|
|
236
|
+
delete(id, params = {}, options) {
|
|
237
|
+
const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
|
|
238
|
+
return this._client.delete((0, path_1.path) `/v2/help_center/redirect_rules/${id}`, {
|
|
239
|
+
...options,
|
|
240
|
+
headers: (0, headers_1.buildHeaders)([
|
|
241
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
242
|
+
options?.headers,
|
|
243
|
+
]),
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Retrieves a specific redirect rule by its source URL.
|
|
248
|
+
*
|
|
249
|
+
* The `url` query parameter is normalized before matching: query parameters and
|
|
250
|
+
* hash fragments are stripped, the hostname is lowercased, and trailing slashes
|
|
251
|
+
* are removed. This is the same normalization applied when creating a redirect
|
|
252
|
+
* rule.
|
|
253
|
+
*
|
|
254
|
+
* ### Query Parameters
|
|
255
|
+
*
|
|
256
|
+
* - `url` (required) - Full absolute URL to look up (http or https)
|
|
257
|
+
*
|
|
258
|
+
* ### Response
|
|
259
|
+
*
|
|
260
|
+
* Returns a redirect rule object with:
|
|
261
|
+
*
|
|
262
|
+
* - `id` - Unique identifier (MongoDB ObjectId)
|
|
263
|
+
* - `helpCenterId` - Help center this rule belongs to
|
|
264
|
+
* - `locale` - Locale code
|
|
265
|
+
* - `fromUrl` - Canonical source URL being redirected from
|
|
266
|
+
* - `targetType` - "article" or "collection"
|
|
267
|
+
* - `targetId` - ID of the target article or collection
|
|
268
|
+
* - `createdAt` - ISO 8601 timestamp when created
|
|
269
|
+
* - `updatedAt` - ISO 8601 timestamp when last updated
|
|
270
|
+
*
|
|
271
|
+
* ### Errors
|
|
272
|
+
*
|
|
273
|
+
* - `400` - Invalid URL format
|
|
274
|
+
* - `404` - No redirect rule exists for the given URL
|
|
275
|
+
*
|
|
276
|
+
* @example
|
|
277
|
+
* ```ts
|
|
278
|
+
* const redirectRule =
|
|
279
|
+
* await client.helpCenter.redirectRules.retrieveByURL({
|
|
280
|
+
* url: 'https://help.example.com/en/old/getting-started',
|
|
281
|
+
* });
|
|
282
|
+
* ```
|
|
283
|
+
*/
|
|
284
|
+
retrieveByURL(params, options) {
|
|
285
|
+
const { 'Featurebase-Version': featurebaseVersion, ...query } = params;
|
|
286
|
+
return this._client.get('/v2/help_center/redirect_rules/by-url', {
|
|
287
|
+
query,
|
|
288
|
+
...options,
|
|
289
|
+
headers: (0, headers_1.buildHeaders)([
|
|
290
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
291
|
+
options?.headers,
|
|
292
|
+
]),
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
exports.RedirectRules = RedirectRules;
|
|
297
|
+
//# sourceMappingURL=redirect-rules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redirect-rules.js","sourceRoot":"","sources":["../../src/resources/help-center/redirect-rules.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,uDAAsD;AAEtD,uDAAiD;AAEjD;;GAEG;AACH,MAAa,aAAc,SAAQ,sBAAW;IAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;IACH,MAAM,CAAC,MAAgC,EAAE,OAAwB;QAC/D,MAAM,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gCAAgC,EAAE;YACzD,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,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,QAAQ,CACN,EAAU,EACV,SAAwD,EAAE,EAC1D,OAAwB;QAExB,MAAM,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACnE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,kCAAkC,EAAE,EAAE,EAAE;YAClE,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,kBAAk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C;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,MAAM,CACJ,EAAU,EACV,SAAsD,EAAE,EACxD,OAAwB;QAExB,MAAM,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACnE,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,kCAAkC,EAAE,EAAE,EAAE;YACrE,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,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqCG;IACH,aAAa,CAAC,MAAuC,EAAE,OAAwB;QAC7E,MAAM,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QACvE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,uCAAuC,EAAE;YAC/D,KAAK;YACL,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,CAAC;IACL,CAAC;CACF;AA5SD,sCA4SC"}
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { buildHeaders } from "../../internal/headers.mjs";
|
|
4
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Help centers allow organizations to create and manage knowledge bases with articles and collections. Currently, Featurebase supports one help center per organization.
|
|
7
|
+
*/
|
|
8
|
+
export class RedirectRules extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Creates a new redirect rule in your organization.
|
|
11
|
+
*
|
|
12
|
+
* The `fromUrl` is normalized on creation: query parameters and hash fragments are
|
|
13
|
+
* stripped, the hostname is lowercased, and trailing slashes are removed. The
|
|
14
|
+
* `fromUrl` hostname must match the Help Center's configured custom domain.
|
|
15
|
+
*
|
|
16
|
+
* The target article or collection must exist and have a resolvable URL (i.e., a
|
|
17
|
+
* published translation with a slug).
|
|
18
|
+
*
|
|
19
|
+
* ### Request Body
|
|
20
|
+
*
|
|
21
|
+
* Required attributes:
|
|
22
|
+
*
|
|
23
|
+
* - `helpCenterId` - The ID of the help center this rule belongs to
|
|
24
|
+
* - `locale` - Locale code used to resolve the target translation
|
|
25
|
+
* - `fromUrl` - The full absolute URL to redirect from (must match the help
|
|
26
|
+
* center's custom domain)
|
|
27
|
+
* - `targetType` - "article" or "collection"
|
|
28
|
+
* - `targetId` - The ID of the target article or collection
|
|
29
|
+
*
|
|
30
|
+
* ### Response
|
|
31
|
+
*
|
|
32
|
+
* Returns the created redirect rule object.
|
|
33
|
+
*
|
|
34
|
+
* ### Errors
|
|
35
|
+
*
|
|
36
|
+
* - `400` - Invalid request data, fromUrl does not match custom domain, or target
|
|
37
|
+
* not found
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const redirectRule =
|
|
42
|
+
* await client.helpCenter.redirectRules.create({
|
|
43
|
+
* fromUrl:
|
|
44
|
+
* 'https://help.example.com/en/old/getting-started',
|
|
45
|
+
* helpCenterId: 'ox6qrqprmsuqaunj',
|
|
46
|
+
* locale: 'en',
|
|
47
|
+
* targetId: '10021362',
|
|
48
|
+
* targetType: 'article',
|
|
49
|
+
* });
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
create(params, options) {
|
|
53
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
54
|
+
return this._client.post('/v2/help_center/redirect_rules', {
|
|
55
|
+
body,
|
|
56
|
+
...options,
|
|
57
|
+
headers: buildHeaders([
|
|
58
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
59
|
+
options?.headers,
|
|
60
|
+
]),
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Retrieves a specific redirect rule by its unique identifier.
|
|
65
|
+
*
|
|
66
|
+
* Returns the redirect rule object if found in your organization.
|
|
67
|
+
*
|
|
68
|
+
* ### Response
|
|
69
|
+
*
|
|
70
|
+
* Returns a redirect rule object with:
|
|
71
|
+
*
|
|
72
|
+
* - `id` - Unique identifier (MongoDB ObjectId)
|
|
73
|
+
* - `helpCenterId` - Help center this rule belongs to
|
|
74
|
+
* - `locale` - Locale code
|
|
75
|
+
* - `fromUrl` - Canonical source URL being redirected from
|
|
76
|
+
* - `targetType` - "article" or "collection"
|
|
77
|
+
* - `targetId` - ID of the target article or collection
|
|
78
|
+
* - `createdAt` - ISO 8601 timestamp when created
|
|
79
|
+
* - `updatedAt` - ISO 8601 timestamp when last updated
|
|
80
|
+
*
|
|
81
|
+
* ### Errors
|
|
82
|
+
*
|
|
83
|
+
* - `404` - Redirect rule not found in your organization
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```ts
|
|
87
|
+
* const redirectRule =
|
|
88
|
+
* await client.helpCenter.redirectRules.retrieve(
|
|
89
|
+
* '507f1f77bcf86cd799439011',
|
|
90
|
+
* );
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
retrieve(id, params = {}, options) {
|
|
94
|
+
const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
|
|
95
|
+
return this._client.get(path `/v2/help_center/redirect_rules/${id}`, {
|
|
96
|
+
...options,
|
|
97
|
+
headers: buildHeaders([
|
|
98
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
99
|
+
options?.headers,
|
|
100
|
+
]),
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Updates an existing redirect rule. Only include the fields you wish to update.
|
|
105
|
+
*
|
|
106
|
+
* If `fromUrl` is provided, it will be re-normalized and validated against the
|
|
107
|
+
* Help Center's custom domain. If `targetType` or `targetId` is changed, the new
|
|
108
|
+
* target must exist and have a resolvable URL.
|
|
109
|
+
*
|
|
110
|
+
* ### Path Parameters
|
|
111
|
+
*
|
|
112
|
+
* - `id` - The unique identifier of the redirect rule to update
|
|
113
|
+
*
|
|
114
|
+
* ### Request Body
|
|
115
|
+
*
|
|
116
|
+
* All fields are optional. Only provided fields will be updated:
|
|
117
|
+
*
|
|
118
|
+
* - `helpCenterId` - The help center ID
|
|
119
|
+
* - `locale` - Locale code
|
|
120
|
+
* - `fromUrl` - Updated source URL (will be re-normalized)
|
|
121
|
+
* - `targetType` - "article" or "collection"
|
|
122
|
+
* - `targetId` - ID of the new target article or collection
|
|
123
|
+
*
|
|
124
|
+
* ### Response
|
|
125
|
+
*
|
|
126
|
+
* Returns the updated redirect rule object.
|
|
127
|
+
*
|
|
128
|
+
* ### Errors
|
|
129
|
+
*
|
|
130
|
+
* - `404` - Redirect rule not found
|
|
131
|
+
* - `400` - Invalid data, domain mismatch, duplicate fromUrl, or target not found
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* ```ts
|
|
135
|
+
* const redirectRule =
|
|
136
|
+
* await client.helpCenter.redirectRules.update(
|
|
137
|
+
* '507f1f77bcf86cd799439011',
|
|
138
|
+
* );
|
|
139
|
+
* ```
|
|
140
|
+
*/
|
|
141
|
+
update(id, params, options) {
|
|
142
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
143
|
+
return this._client.patch(path `/v2/help_center/redirect_rules/${id}`, {
|
|
144
|
+
body,
|
|
145
|
+
...options,
|
|
146
|
+
headers: buildHeaders([
|
|
147
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
148
|
+
options?.headers,
|
|
149
|
+
]),
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Returns a paginated list of redirect rules within your organization.
|
|
154
|
+
*
|
|
155
|
+
* Redirect rules map old Help Center URLs to new article or collection
|
|
156
|
+
* destinations, enabling seamless migration from legacy help center systems. Only
|
|
157
|
+
* Help Centers with a custom domain configured support redirect rules.
|
|
158
|
+
*
|
|
159
|
+
* ### Query Parameters
|
|
160
|
+
*
|
|
161
|
+
* - `limit` - Number of items to return (1-100, default 10)
|
|
162
|
+
* - `cursor` - Cursor for pagination
|
|
163
|
+
* - `helpCenterId` - Filter by help center ID
|
|
164
|
+
* - `locale` - Filter by locale code
|
|
165
|
+
* - `targetType` - Filter by target type ("article" or "collection")
|
|
166
|
+
*
|
|
167
|
+
* ### Response Format
|
|
168
|
+
*
|
|
169
|
+
* Returns a list object with:
|
|
170
|
+
*
|
|
171
|
+
* - `object` - Always "list"
|
|
172
|
+
* - `data` - Array of redirect rule objects
|
|
173
|
+
* - `nextCursor` - Cursor for next page (null if no more results)
|
|
174
|
+
*
|
|
175
|
+
* ### Redirect Rule Object
|
|
176
|
+
*
|
|
177
|
+
* Each redirect rule includes:
|
|
178
|
+
*
|
|
179
|
+
* - `id` - Unique identifier (MongoDB ObjectId)
|
|
180
|
+
* - `helpCenterId` - Help center this rule belongs to
|
|
181
|
+
* - `locale` - Locale code used to resolve the target translation
|
|
182
|
+
* - `fromUrl` - Canonical source URL (query/hash stripped, hostname lowercased)
|
|
183
|
+
* - `targetType` - "article" or "collection"
|
|
184
|
+
* - `targetId` - ID of the target article or collection
|
|
185
|
+
* - `createdAt` - ISO 8601 timestamp when created
|
|
186
|
+
* - `updatedAt` - ISO 8601 timestamp when last updated
|
|
187
|
+
*
|
|
188
|
+
* @example
|
|
189
|
+
* ```ts
|
|
190
|
+
* const redirectRules =
|
|
191
|
+
* await client.helpCenter.redirectRules.list();
|
|
192
|
+
* ```
|
|
193
|
+
*/
|
|
194
|
+
list(params = {}, options) {
|
|
195
|
+
const { 'Featurebase-Version': featurebaseVersion, ...query } = params ?? {};
|
|
196
|
+
return this._client.get('/v2/help_center/redirect_rules', {
|
|
197
|
+
query,
|
|
198
|
+
...options,
|
|
199
|
+
headers: buildHeaders([
|
|
200
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
201
|
+
options?.headers,
|
|
202
|
+
]),
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Deletes an existing redirect rule. The associated Redis cache entry is also
|
|
207
|
+
* invalidated.
|
|
208
|
+
*
|
|
209
|
+
* ### Path Parameters
|
|
210
|
+
*
|
|
211
|
+
* - `id` - The unique identifier of the redirect rule to delete
|
|
212
|
+
*
|
|
213
|
+
* ### Response
|
|
214
|
+
*
|
|
215
|
+
* Returns a deletion confirmation object:
|
|
216
|
+
*
|
|
217
|
+
* - `id` - The ID of the deleted redirect rule
|
|
218
|
+
* - `object` - Always "redirect_rule"
|
|
219
|
+
* - `deleted` - Always true
|
|
220
|
+
*
|
|
221
|
+
* ### Errors
|
|
222
|
+
*
|
|
223
|
+
* - `404` - Redirect rule not found in your organization
|
|
224
|
+
*
|
|
225
|
+
* @example
|
|
226
|
+
* ```ts
|
|
227
|
+
* const redirectRule =
|
|
228
|
+
* await client.helpCenter.redirectRules.delete(
|
|
229
|
+
* '507f1f77bcf86cd799439011',
|
|
230
|
+
* );
|
|
231
|
+
* ```
|
|
232
|
+
*/
|
|
233
|
+
delete(id, params = {}, options) {
|
|
234
|
+
const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
|
|
235
|
+
return this._client.delete(path `/v2/help_center/redirect_rules/${id}`, {
|
|
236
|
+
...options,
|
|
237
|
+
headers: buildHeaders([
|
|
238
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
239
|
+
options?.headers,
|
|
240
|
+
]),
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Retrieves a specific redirect rule by its source URL.
|
|
245
|
+
*
|
|
246
|
+
* The `url` query parameter is normalized before matching: query parameters and
|
|
247
|
+
* hash fragments are stripped, the hostname is lowercased, and trailing slashes
|
|
248
|
+
* are removed. This is the same normalization applied when creating a redirect
|
|
249
|
+
* rule.
|
|
250
|
+
*
|
|
251
|
+
* ### Query Parameters
|
|
252
|
+
*
|
|
253
|
+
* - `url` (required) - Full absolute URL to look up (http or https)
|
|
254
|
+
*
|
|
255
|
+
* ### Response
|
|
256
|
+
*
|
|
257
|
+
* Returns a redirect rule object with:
|
|
258
|
+
*
|
|
259
|
+
* - `id` - Unique identifier (MongoDB ObjectId)
|
|
260
|
+
* - `helpCenterId` - Help center this rule belongs to
|
|
261
|
+
* - `locale` - Locale code
|
|
262
|
+
* - `fromUrl` - Canonical source URL being redirected from
|
|
263
|
+
* - `targetType` - "article" or "collection"
|
|
264
|
+
* - `targetId` - ID of the target article or collection
|
|
265
|
+
* - `createdAt` - ISO 8601 timestamp when created
|
|
266
|
+
* - `updatedAt` - ISO 8601 timestamp when last updated
|
|
267
|
+
*
|
|
268
|
+
* ### Errors
|
|
269
|
+
*
|
|
270
|
+
* - `400` - Invalid URL format
|
|
271
|
+
* - `404` - No redirect rule exists for the given URL
|
|
272
|
+
*
|
|
273
|
+
* @example
|
|
274
|
+
* ```ts
|
|
275
|
+
* const redirectRule =
|
|
276
|
+
* await client.helpCenter.redirectRules.retrieveByURL({
|
|
277
|
+
* url: 'https://help.example.com/en/old/getting-started',
|
|
278
|
+
* });
|
|
279
|
+
* ```
|
|
280
|
+
*/
|
|
281
|
+
retrieveByURL(params, options) {
|
|
282
|
+
const { 'Featurebase-Version': featurebaseVersion, ...query } = params;
|
|
283
|
+
return this._client.get('/v2/help_center/redirect_rules/by-url', {
|
|
284
|
+
query,
|
|
285
|
+
...options,
|
|
286
|
+
headers: buildHeaders([
|
|
287
|
+
{ ...(featurebaseVersion != null ? { 'Featurebase-Version': featurebaseVersion } : undefined) },
|
|
288
|
+
options?.headers,
|
|
289
|
+
]),
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
//# sourceMappingURL=redirect-rules.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redirect-rules.mjs","sourceRoot":"","sources":["../../src/resources/help-center/redirect-rules.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;IACH,MAAM,CAAC,MAAgC,EAAE,OAAwB;QAC/D,MAAM,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gCAAgC,EAAE;YACzD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;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;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,QAAQ,CACN,EAAU,EACV,SAAwD,EAAE,EAC1D,OAAwB;QAExB,MAAM,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,GAAG,MAAM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":3,"file":"help-center.d.mts","sourceRoot":"","sources":["../src/resources/help-center.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help-center.d.ts","sourceRoot":"","sources":["../src/resources/help-center.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
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
|
+
const tslib_1 = require("../internal/tslib.js");
|
|
5
|
+
tslib_1.__exportStar(require("./help-center/index.js"), exports);
|
|
6
|
+
//# sourceMappingURL=help-center.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help-center.js","sourceRoot":"","sources":["../src/resources/help-center.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,iEAAoC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help-center.mjs","sourceRoot":"","sources":["../src/resources/help-center.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { Admins, type Admin, type AdminListResponse, type AdminListRolesResponse, type AdminRetrieveParams, type AdminListParams, type AdminListRolesParams, } from "./admins.mjs";
|
|
2
|
+
export { Boards, type Board, type BoardListResponse, type BoardRetrieveParams, type BoardListParams, } from "./boards.mjs";
|
|
3
|
+
export { Brands, type Brand, type BrandListResponse, type BrandRetrieveParams, type BrandListParams, } from "./brands.mjs";
|
|
4
|
+
export { Changelogs, type Changelog, type PublishUnpublishSuccess, type ChangelogListResponse, type ChangelogDeleteResponse, type ChangelogCreateParams, type ChangelogRetrieveParams, type ChangelogUpdateParams, type ChangelogListParams, type ChangelogDeleteParams, type ChangelogPublishParams, type ChangelogUnpublishParams, } from "./changelogs/changelogs.mjs";
|
|
5
|
+
export { Comments, type Comment, type CommentListResponse, type CommentDelete0Response, type CommentDelete1Response, type CommentCreateParams, type CommentRetrieveParams, type CommentUpdateParams, type CommentListParams, type CommentDelete0Params, type CommentDelete1Params, } from "./comments.mjs";
|
|
6
|
+
export { Companies, type Company, type DeletedCompany, type CompanyListResponse, type CompanyRetrieveParams, type CompanyListParams, type CompanyDeleteParams, type CompanyCreateOrUpdateParams, type CompanyDeleteByCompanyIDParams, } from "./companies/companies.mjs";
|
|
7
|
+
export { Contacts, type Contact, type ContactList, type DeletedContact, type ContactRetrieveResponse, type ContactBlockResponse, type ContactCreateOrUpdateResponse, type ContactUnblockResponse, type ContactRetrieveParams, type ContactListParams, type ContactDeleteParams, type ContactBlockParams, type ContactCreateOrUpdateParams, type ContactUnblockParams, } from "./contacts/contacts.mjs";
|
|
8
|
+
export { Conversations, type Conversation, type ConversationPart, type ConversationPartAuthor, type ConversationParticipant, type ConversationTagApplication, type CsatEmailDelivery, type CsatRatedAgent, type CsatWorkflowLink, type EmailRecipients, type ConversationListResponse, type ConversationDeleteResponse, type ConversationCreateParams, type ConversationRetrieveParams, type ConversationUpdateParams, type ConversationListParams, type ConversationDeleteParams, type ConversationRedactParams, type ConversationReplyParams, } from "./conversations/conversations.mjs";
|
|
9
|
+
export { CustomFields, type CustomField, type CustomFieldList, type CustomFieldRetrieveParams, type CustomFieldListParams, } from "./custom-fields.mjs";
|
|
10
|
+
export { HelpCenter } from "./help-center/help-center.mjs";
|
|
11
|
+
export { PostStatuses, type PostStatus, type PostStatusListResponse, type PostStatusRetrieveParams, type PostStatusListParams, } from "./post-statuses.mjs";
|
|
12
|
+
export { Posts, type Post, type PostListResponse, type PostDeleteResponse, type PostCreateParams, type PostRetrieveParams, type PostUpdateParams, type PostListParams, type PostDeleteParams, } from "./posts/posts.mjs";
|
|
13
|
+
export { Surveys, type Survey, type SurveyNextAction, type SurveyListResponse, type SurveyRetrieveResponsesResponse, type SurveyRetrieveParams, type SurveyListParams, type SurveyRetrieveResponsesParams, } from "./surveys.mjs";
|
|
14
|
+
export { Tags, type ConversationTag, type TagListResponse, type TagDeleteResponse, type TagRetrieveParams, type TagListParams, type TagDeleteParams, type TagCreateOrRenameParams, } from "./tags.mjs";
|
|
15
|
+
export { Teams, type Team, type TeamListResponse, type TeamRetrieveParams, type TeamListParams, } from "./teams.mjs";
|
|
16
|
+
export { Tickets, type AuthorInput, type Ticket, type TicketListResponse, type TicketDeleteResponse, type TicketCreateParams, type TicketRetrieveParams, type TicketUpdateParams, type TicketListParams, type TicketDeleteParams, type TicketReplyParams, } from "./tickets/tickets.mjs";
|
|
17
|
+
export { Webhooks, type Webhook, type WebhookRequestConfigInput, type WebhookListResponse, type WebhookDeleteResponse, type WebhookCreateParams, type WebhookRetrieveParams, type WebhookUpdateParams, type WebhookListParams, type WebhookDeleteParams, type WebhookRefreshSecretParams, } from "./webhooks.mjs";
|
|
18
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,MAAM,EACN,KAAK,KAAK,EACV,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,oBAAoB,GAC1B;OACM,EACL,MAAM,EACN,KAAK,KAAK,EACV,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,eAAe,GACrB;OACM,EACL,MAAM,EACN,KAAK,KAAK,EACV,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,eAAe,GACrB;OACM,EACL,UAAU,EACV,KAAK,SAAS,EACd,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,GAC9B;OACM,EACL,QAAQ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