@roarkanalytics/sdk 2.21.0 → 2.21.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 +16 -0
- package/README.md +112 -51
- 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 +196 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +196 -0
- package/client.d.ts.map +1 -0
- package/client.js +472 -0
- package/client.js.map +1 -0
- package/client.mjs +468 -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 +1 -46
- package/error.d.ts.map +1 -1
- package/error.js +3 -110
- package/error.js.map +1 -1
- package/error.mjs +1 -96
- package/error.mjs.map +1 -1
- package/index.d.mts +6 -132
- package/index.d.mts.map +1 -0
- package/index.d.ts +5 -131
- package/index.d.ts.map +1 -1
- package/index.js +12 -130
- package/index.js.map +1 -1
- package/index.mjs +5 -103
- package/index.mjs.map +1 -1
- 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 +1 -0
- package/internal/qs/formats.d.ts.map +1 -1
- package/internal/qs/formats.js +4 -2
- package/internal/qs/formats.js.map +1 -1
- package/internal/qs/formats.mjs +2 -1
- package/internal/qs/formats.mjs.map +1 -1
- package/internal/qs/index.d.mts +10 -0
- package/internal/qs/index.d.mts.map +1 -0
- package/internal/qs/index.d.ts.map +1 -1
- package/internal/qs/stringify.d.mts +3 -0
- package/internal/qs/stringify.d.mts.map +1 -0
- package/internal/qs/stringify.d.ts.map +1 -1
- package/internal/qs/stringify.js +16 -19
- package/internal/qs/stringify.js.map +1 -1
- package/internal/qs/stringify.mjs +17 -19
- package/internal/qs/stringify.mjs.map +1 -1
- package/internal/qs/types.d.mts +57 -0
- package/internal/qs/types.d.mts.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 +1 -0
- package/internal/qs/utils.d.ts.map +1 -1
- package/internal/qs/utils.js +22 -21
- package/internal/qs/utils.js.map +1 -1
- package/internal/qs/utils.mjs +12 -12
- package/internal/qs/utils.mjs.map +1 -1
- 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/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 +7 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +7 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +11 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +8 -0
- package/internal/utils.mjs.map +1 -0
- package/package.json +108 -73
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +1 -5
- package/resource.d.ts.map +1 -1
- package/resource.js +3 -8
- package/resource.js.map +1 -1
- package/resource.mjs +1 -6
- package/resource.mjs.map +1 -1
- package/resources/call.d.mts +1207 -0
- package/resources/call.d.mts.map +1 -0
- package/resources/call.d.ts +9 -10
- package/resources/call.d.ts.map +1 -1
- package/resources/call.js +17 -16
- package/resources/call.js.map +1 -1
- package/resources/call.mjs +17 -16
- package/resources/call.mjs.map +1 -1
- package/resources/evaluation.d.mts +1307 -0
- package/resources/evaluation.d.mts.map +1 -0
- package/resources/evaluation.d.ts +8 -9
- package/resources/evaluation.d.ts.map +1 -1
- package/resources/evaluation.js +15 -14
- package/resources/evaluation.js.map +1 -1
- package/resources/evaluation.mjs +15 -14
- package/resources/evaluation.mjs.map +1 -1
- package/resources/health.d.mts +29 -0
- package/resources/health.d.mts.map +1 -0
- package/resources/health.d.ts +4 -3
- package/resources/health.d.ts.map +1 -1
- package/resources/health.js +1 -1
- package/resources/health.js.map +1 -1
- package/resources/health.mjs +1 -1
- package/resources/health.mjs.map +1 -1
- package/resources/index.d.mts +8 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/integrations.d.mts +114 -0
- package/resources/integrations.d.mts.map +1 -0
- package/resources/integrations.d.ts +5 -4
- package/resources/integrations.d.ts.map +1 -1
- package/resources/integrations.js +1 -1
- package/resources/integrations.js.map +1 -1
- package/resources/integrations.mjs +1 -1
- package/resources/integrations.mjs.map +1 -1
- package/resources/metric.d.mts +75 -0
- package/resources/metric.d.mts.map +1 -0
- package/resources/metric.d.ts +4 -3
- package/resources/metric.d.ts.map +1 -1
- package/resources/metric.js +1 -1
- package/resources/metric.js.map +1 -1
- package/resources/metric.mjs +1 -1
- package/resources/metric.mjs.map +1 -1
- package/resources/persona.d.mts +528 -0
- package/resources/persona.d.mts.map +1 -0
- package/resources/persona.d.ts +8 -9
- package/resources/persona.d.ts.map +1 -1
- package/resources/persona.js +23 -13
- package/resources/persona.js.map +1 -1
- package/resources/persona.mjs +23 -13
- package/resources/persona.mjs.map +1 -1
- package/resources/simulation.d.mts +802 -0
- package/resources/simulation.d.mts.map +1 -0
- package/resources/simulation.d.ts +10 -11
- package/resources/simulation.d.ts.map +1 -1
- package/resources/simulation.js +26 -15
- package/resources/simulation.js.map +1 -1
- package/resources/simulation.mjs +26 -15
- package/resources/simulation.mjs.map +1 -1
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts.map +1 -1
- package/resources.js +2 -15
- package/resources.js.map +1 -1
- package/src/api-promise.ts +2 -0
- package/src/client.ts +842 -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 -130
- package/src/index.ts +5 -308
- 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/formats.ts +2 -1
- package/src/internal/qs/stringify.ts +17 -20
- package/src/internal/qs/utils.ts +14 -14
- 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/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 +8 -0
- package/src/resource.ts +2 -11
- package/src/resources/call.ts +19 -38
- package/src/resources/evaluation.ts +21 -37
- package/src/resources/health.ts +4 -3
- package/src/resources/integrations.ts +7 -6
- package/src/resources/metric.ts +4 -3
- package/src/resources/persona.ts +16 -29
- package/src/resources/simulation.ts +22 -43
- package/src/tsconfig.json +2 -2
- package/src/uploads.ts +2 -255
- package/src/version.ts +1 -1
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +1 -74
- package/uploads.d.ts.map +1 -1
- package/uploads.js +3 -168
- package/uploads.js.map +1 -1
- package/uploads.mjs +1 -157
- package/uploads.mjs.map +1 -1
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/_shims/MultipartBody.d.ts +0 -9
- package/_shims/MultipartBody.d.ts.map +0 -1
- package/_shims/MultipartBody.js +0 -16
- package/_shims/MultipartBody.js.map +0 -1
- package/_shims/MultipartBody.mjs +0 -12
- package/_shims/MultipartBody.mjs.map +0 -1
- package/_shims/README.md +0 -46
- package/_shims/auto/runtime-bun.d.ts +0 -5
- package/_shims/auto/runtime-bun.d.ts.map +0 -1
- package/_shims/auto/runtime-bun.js +0 -21
- package/_shims/auto/runtime-bun.js.map +0 -1
- package/_shims/auto/runtime-bun.mjs +0 -2
- package/_shims/auto/runtime-bun.mjs.map +0 -1
- package/_shims/auto/runtime-node.d.ts +0 -5
- package/_shims/auto/runtime-node.d.ts.map +0 -1
- package/_shims/auto/runtime-node.js +0 -21
- package/_shims/auto/runtime-node.js.map +0 -1
- package/_shims/auto/runtime-node.mjs +0 -2
- package/_shims/auto/runtime-node.mjs.map +0 -1
- package/_shims/auto/runtime.d.ts +0 -5
- package/_shims/auto/runtime.d.ts.map +0 -1
- package/_shims/auto/runtime.js +0 -21
- package/_shims/auto/runtime.js.map +0 -1
- package/_shims/auto/runtime.mjs +0 -2
- package/_shims/auto/runtime.mjs.map +0 -1
- package/_shims/auto/types-node.d.ts +0 -5
- package/_shims/auto/types-node.d.ts.map +0 -1
- package/_shims/auto/types-node.js +0 -21
- package/_shims/auto/types-node.js.map +0 -1
- package/_shims/auto/types-node.mjs +0 -2
- package/_shims/auto/types-node.mjs.map +0 -1
- package/_shims/auto/types.d.ts +0 -101
- package/_shims/auto/types.js +0 -3
- package/_shims/auto/types.mjs +0 -3
- package/_shims/bun-runtime.d.ts +0 -6
- package/_shims/bun-runtime.d.ts.map +0 -1
- package/_shims/bun-runtime.js +0 -14
- package/_shims/bun-runtime.js.map +0 -1
- package/_shims/bun-runtime.mjs +0 -10
- package/_shims/bun-runtime.mjs.map +0 -1
- package/_shims/index.d.ts +0 -83
- package/_shims/index.js +0 -17
- package/_shims/index.mjs +0 -11
- package/_shims/manual-types.d.ts +0 -12
- package/_shims/manual-types.js +0 -3
- package/_shims/manual-types.mjs +0 -3
- package/_shims/node-runtime.d.ts +0 -3
- package/_shims/node-runtime.d.ts.map +0 -1
- package/_shims/node-runtime.js +0 -89
- package/_shims/node-runtime.js.map +0 -1
- package/_shims/node-runtime.mjs +0 -56
- package/_shims/node-runtime.mjs.map +0 -1
- package/_shims/node-types.d.ts +0 -42
- package/_shims/node-types.js +0 -3
- package/_shims/node-types.mjs +0 -3
- package/_shims/registry.d.ts +0 -37
- package/_shims/registry.d.ts.map +0 -1
- package/_shims/registry.js +0 -41
- package/_shims/registry.js.map +0 -1
- package/_shims/registry.mjs +0 -37
- package/_shims/registry.mjs.map +0 -1
- package/_shims/web-runtime.d.ts +0 -5
- package/_shims/web-runtime.d.ts.map +0 -1
- package/_shims/web-runtime.js +0 -78
- package/_shims/web-runtime.js.map +0 -1
- package/_shims/web-runtime.mjs +0 -71
- package/_shims/web-runtime.mjs.map +0 -1
- package/_shims/web-types.d.ts +0 -83
- package/_shims/web-types.js +0 -3
- package/_shims/web-types.mjs +0 -3
- package/core.d.ts +0 -255
- package/core.d.ts.map +0 -1
- package/core.js +0 -929
- package/core.js.map +0 -1
- package/core.mjs +0 -897
- package/core.mjs.map +0 -1
- package/shims/node.d.ts +0 -30
- package/shims/node.d.ts.map +0 -1
- package/shims/node.js +0 -31
- package/shims/node.js.map +0 -1
- package/shims/node.mjs +0 -5
- package/shims/node.mjs.map +0 -1
- package/shims/web.d.ts +0 -26
- package/shims/web.d.ts.map +0 -1
- package/shims/web.js +0 -31
- package/shims/web.js.map +0 -1
- package/shims/web.mjs +0 -5
- package/shims/web.mjs.map +0 -1
- package/src/_shims/MultipartBody.ts +0 -9
- package/src/_shims/README.md +0 -46
- package/src/_shims/auto/runtime-bun.ts +0 -4
- package/src/_shims/auto/runtime-node.ts +0 -4
- package/src/_shims/auto/runtime.ts +0 -4
- package/src/_shims/auto/types-node.ts +0 -4
- package/src/_shims/auto/types.d.ts +0 -101
- package/src/_shims/auto/types.js +0 -3
- package/src/_shims/auto/types.mjs +0 -3
- package/src/_shims/bun-runtime.ts +0 -14
- package/src/_shims/index.d.ts +0 -83
- package/src/_shims/index.js +0 -17
- package/src/_shims/index.mjs +0 -11
- package/src/_shims/manual-types.d.ts +0 -12
- package/src/_shims/manual-types.js +0 -3
- package/src/_shims/manual-types.mjs +0 -3
- package/src/_shims/node-runtime.ts +0 -81
- package/src/_shims/node-types.d.ts +0 -42
- package/src/_shims/node-types.js +0 -3
- package/src/_shims/node-types.mjs +0 -3
- package/src/_shims/registry.ts +0 -67
- package/src/_shims/web-runtime.ts +0 -103
- package/src/_shims/web-types.d.ts +0 -83
- package/src/_shims/web-types.js +0 -3
- package/src/_shims/web-types.mjs +0 -3
- package/src/core.ts +0 -1242
- package/src/shims/node.ts +0 -50
- package/src/shims/web.ts +0 -50
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.21.2 (2026-02-11)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v2.21.1...v2.21.2](https://github.com/roarkhq/sdk-roark-analytics-node/compare/v2.21.1...v2.21.2)
|
|
6
|
+
|
|
7
|
+
### Chores
|
|
8
|
+
|
|
9
|
+
* **internal:** codegen related update ([6fb1d9f](https://github.com/roarkhq/sdk-roark-analytics-node/commit/6fb1d9fa50d1a5ca32c64b6a6f48e295eccbbaa9))
|
|
10
|
+
|
|
11
|
+
## 2.21.1 (2026-02-10)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v2.21.0...v2.21.1](https://github.com/roarkhq/sdk-roark-analytics-node/compare/v2.21.0...v2.21.1)
|
|
14
|
+
|
|
15
|
+
### Chores
|
|
16
|
+
|
|
17
|
+
* remove custom code ([ffba344](https://github.com/roarkhq/sdk-roark-analytics-node/commit/ffba3447da35dfe5e64906bda1b6290164981c4b))
|
|
18
|
+
|
|
3
19
|
## 2.21.0 (2026-02-10)
|
|
4
20
|
|
|
5
21
|
Full Changelog: [v2.20.0...v2.21.0](https://github.com/roarkhq/sdk-roark-analytics-node/compare/v2.20.0...v2.21.0)
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Roark
|
|
1
|
+
# Roark TypeScript API Library
|
|
2
2
|
|
|
3
|
-
[](https://npmjs.org/package/@roarkanalytics/sdk) 
|
|
3
|
+
[>)](https://npmjs.org/package/@roarkanalytics/sdk) 
|
|
4
4
|
|
|
5
5
|
This library provides convenient access to the Roark REST API from server-side TypeScript or JavaScript.
|
|
6
6
|
|
|
@@ -8,15 +8,6 @@ The REST API documentation can be found on [docs.roark.ai](https://docs.roark.ai
|
|
|
8
8
|
|
|
9
9
|
It is generated with [Stainless](https://www.stainless.com/).
|
|
10
10
|
|
|
11
|
-
## MCP Server
|
|
12
|
-
|
|
13
|
-
Use the Roark MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
|
|
14
|
-
|
|
15
|
-
[](https://cursor.com/en-US/install-mcp?name=%40roarkanalytics%2Fsdk-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkByb2Fya2FuYWx5dGljcy9zZGstbWNwIl0sImVudiI6eyJST0FSS19BUElfQkVBUkVSX1RPS0VOIjoiTXkgQmVhcmVyIFRva2VuIn19)
|
|
16
|
-
[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40roarkanalytics%2Fsdk-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40roarkanalytics%2Fsdk-mcp%22%5D%2C%22env%22%3A%7B%22ROARK_API_BEARER_TOKEN%22%3A%22My%20Bearer%20Token%22%7D%7D)
|
|
17
|
-
|
|
18
|
-
> Note: You may need to set environment variables in your MCP client.
|
|
19
|
-
|
|
20
11
|
## Installation
|
|
21
12
|
|
|
22
13
|
```sh
|
|
@@ -139,8 +130,10 @@ Note that requests which time out will be [retried twice by default](#retries).
|
|
|
139
130
|
### Accessing raw Response data (e.g., headers)
|
|
140
131
|
|
|
141
132
|
The "raw" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.
|
|
133
|
+
This method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.
|
|
142
134
|
|
|
143
135
|
You can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.
|
|
136
|
+
Unlike `.asResponse()` this method consumes the body, returning once it is parsed.
|
|
144
137
|
|
|
145
138
|
<!-- prettier-ignore -->
|
|
146
139
|
```ts
|
|
@@ -157,6 +150,59 @@ console.log(raw.headers.get('X-My-Header'));
|
|
|
157
150
|
console.log(response.data);
|
|
158
151
|
```
|
|
159
152
|
|
|
153
|
+
### Logging
|
|
154
|
+
|
|
155
|
+
> [!IMPORTANT]
|
|
156
|
+
> All log messages are intended for debugging only. The format and content of log messages
|
|
157
|
+
> may change between releases.
|
|
158
|
+
|
|
159
|
+
#### Log levels
|
|
160
|
+
|
|
161
|
+
The log level can be configured in two ways:
|
|
162
|
+
|
|
163
|
+
1. Via the `ROARK_LOG` environment variable
|
|
164
|
+
2. Using the `logLevel` client option (overrides the environment variable if set)
|
|
165
|
+
|
|
166
|
+
```ts
|
|
167
|
+
import Roark from '@roarkanalytics/sdk';
|
|
168
|
+
|
|
169
|
+
const client = new Roark({
|
|
170
|
+
logLevel: 'debug', // Show all log messages
|
|
171
|
+
});
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Available log levels, from most to least verbose:
|
|
175
|
+
|
|
176
|
+
- `'debug'` - Show debug messages, info, warnings, and errors
|
|
177
|
+
- `'info'` - Show info messages, warnings, and errors
|
|
178
|
+
- `'warn'` - Show warnings and errors (default)
|
|
179
|
+
- `'error'` - Show only errors
|
|
180
|
+
- `'off'` - Disable all logging
|
|
181
|
+
|
|
182
|
+
At the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.
|
|
183
|
+
Some authentication-related headers are redacted, but sensitive data in request and response bodies
|
|
184
|
+
may still be visible.
|
|
185
|
+
|
|
186
|
+
#### Custom logger
|
|
187
|
+
|
|
188
|
+
By default, this library logs to `globalThis.console`. You can also provide a custom logger.
|
|
189
|
+
Most logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.
|
|
190
|
+
|
|
191
|
+
When providing a custom logger, the `logLevel` option still controls which messages are emitted, messages
|
|
192
|
+
below the configured level will not be sent to your logger.
|
|
193
|
+
|
|
194
|
+
```ts
|
|
195
|
+
import Roark from '@roarkanalytics/sdk';
|
|
196
|
+
import pino from 'pino';
|
|
197
|
+
|
|
198
|
+
const logger = pino();
|
|
199
|
+
|
|
200
|
+
const client = new Roark({
|
|
201
|
+
logger: logger.child({ name: 'Roark' }),
|
|
202
|
+
logLevel: 'debug', // Send all messages to pino, allowing it to filter
|
|
203
|
+
});
|
|
204
|
+
```
|
|
205
|
+
|
|
160
206
|
### Making custom/undocumented requests
|
|
161
207
|
|
|
162
208
|
This library is typed for convenient access to the documented API. If you need to access undocumented
|
|
@@ -181,9 +227,8 @@ parameter. This library doesn't validate at runtime that the request matches the
|
|
|
181
227
|
send will be sent as-is.
|
|
182
228
|
|
|
183
229
|
```ts
|
|
184
|
-
client.
|
|
185
|
-
|
|
186
|
-
bar: 12,
|
|
230
|
+
client.evaluation.createJob({
|
|
231
|
+
// ...
|
|
187
232
|
// @ts-expect-error baz is not yet public
|
|
188
233
|
baz: 'undocumented option',
|
|
189
234
|
});
|
|
@@ -203,69 +248,85 @@ validate or strip extra properties from the response from the API.
|
|
|
203
248
|
|
|
204
249
|
### Customizing the fetch client
|
|
205
250
|
|
|
206
|
-
By default, this library
|
|
251
|
+
By default, this library expects a global `fetch` function is defined.
|
|
207
252
|
|
|
208
|
-
If you
|
|
209
|
-
(for example, if you are running Node with `--experimental-fetch` or using NextJS which polyfills with `undici`),
|
|
210
|
-
add the following import before your first import `from "Roark"`:
|
|
253
|
+
If you want to use a different `fetch` function, you can either polyfill the global:
|
|
211
254
|
|
|
212
255
|
```ts
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
import Roark from '@roarkanalytics/sdk';
|
|
256
|
+
import fetch from 'my-fetch';
|
|
257
|
+
|
|
258
|
+
globalThis.fetch = fetch;
|
|
217
259
|
```
|
|
218
260
|
|
|
219
|
-
|
|
220
|
-
|
|
261
|
+
Or pass it to the client:
|
|
262
|
+
|
|
263
|
+
```ts
|
|
264
|
+
import Roark from '@roarkanalytics/sdk';
|
|
265
|
+
import fetch from 'my-fetch';
|
|
266
|
+
|
|
267
|
+
const client = new Roark({ fetch });
|
|
268
|
+
```
|
|
221
269
|
|
|
222
|
-
###
|
|
270
|
+
### Fetch options
|
|
223
271
|
|
|
224
|
-
|
|
225
|
-
which can be used to inspect or alter the `Request` or `Response` before/after each request:
|
|
272
|
+
If you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)
|
|
226
273
|
|
|
227
274
|
```ts
|
|
228
|
-
import { fetch } from 'undici'; // as one example
|
|
229
275
|
import Roark from '@roarkanalytics/sdk';
|
|
230
276
|
|
|
231
277
|
const client = new Roark({
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
const response = await fetch(url, init);
|
|
235
|
-
console.log('Got response', response);
|
|
236
|
-
return response;
|
|
278
|
+
fetchOptions: {
|
|
279
|
+
// `RequestInit` options
|
|
237
280
|
},
|
|
238
281
|
});
|
|
239
282
|
```
|
|
240
283
|
|
|
241
|
-
|
|
242
|
-
This is intended for debugging purposes only and may change in the future without notice.
|
|
284
|
+
#### Configuring proxies
|
|
243
285
|
|
|
244
|
-
|
|
286
|
+
To modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy
|
|
287
|
+
options to requests:
|
|
245
288
|
|
|
246
|
-
|
|
289
|
+
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg" align="top" width="18" height="21"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>
|
|
247
290
|
|
|
248
|
-
|
|
291
|
+
```ts
|
|
292
|
+
import Roark from '@roarkanalytics/sdk';
|
|
293
|
+
import * as undici from 'undici';
|
|
294
|
+
|
|
295
|
+
const proxyAgent = new undici.ProxyAgent('http://localhost:8888');
|
|
296
|
+
const client = new Roark({
|
|
297
|
+
fetchOptions: {
|
|
298
|
+
dispatcher: proxyAgent,
|
|
299
|
+
},
|
|
300
|
+
});
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg" align="top" width="18" height="21"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>
|
|
249
304
|
|
|
250
|
-
<!-- prettier-ignore -->
|
|
251
305
|
```ts
|
|
252
|
-
import
|
|
253
|
-
import { HttpsProxyAgent } from 'https-proxy-agent';
|
|
306
|
+
import Roark from '@roarkanalytics/sdk';
|
|
254
307
|
|
|
255
|
-
// Configure the default for all requests:
|
|
256
308
|
const client = new Roark({
|
|
257
|
-
|
|
309
|
+
fetchOptions: {
|
|
310
|
+
proxy: 'http://localhost:8888',
|
|
311
|
+
},
|
|
258
312
|
});
|
|
313
|
+
```
|
|
259
314
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
315
|
+
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg" align="top" width="18" height="21"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>
|
|
316
|
+
|
|
317
|
+
```ts
|
|
318
|
+
import Roark from 'npm:@roarkanalytics/sdk';
|
|
319
|
+
|
|
320
|
+
const httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });
|
|
321
|
+
const client = new Roark({
|
|
322
|
+
fetchOptions: {
|
|
323
|
+
client: httpClient,
|
|
265
324
|
},
|
|
266
|
-
);
|
|
325
|
+
});
|
|
267
326
|
```
|
|
268
327
|
|
|
328
|
+
## Frequently Asked Questions
|
|
329
|
+
|
|
269
330
|
## Semantic versioning
|
|
270
331
|
|
|
271
332
|
This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:
|
|
@@ -280,12 +341,12 @@ We are keen for your feedback; please open an [issue](https://www.github.com/roa
|
|
|
280
341
|
|
|
281
342
|
## Requirements
|
|
282
343
|
|
|
283
|
-
TypeScript >= 4.
|
|
344
|
+
TypeScript >= 4.9 is supported.
|
|
284
345
|
|
|
285
346
|
The following runtimes are supported:
|
|
286
347
|
|
|
287
348
|
- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)
|
|
288
|
-
- Node.js
|
|
349
|
+
- Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.
|
|
289
350
|
- Deno v1.28.0 or higher.
|
|
290
351
|
- Bun 1.0 or later.
|
|
291
352
|
- Cloudflare Workers.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-promise.d.mts","sourceRoot":"","sources":["src/api-promise.ts"],"names":[],"mappings":""}
|
package/api-promise.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-promise.d.ts","sourceRoot":"","sources":["src/api-promise.ts"],"names":[],"mappings":""}
|
package/api-promise.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("./internal/tslib.js");
|
|
4
|
+
/** @deprecated Import from ./core/api-promise instead */
|
|
5
|
+
tslib_1.__exportStar(require("./core/api-promise.js"), exports);
|
|
6
|
+
//# sourceMappingURL=api-promise.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-promise.js","sourceRoot":"","sources":["src/api-promise.ts"],"names":[],"mappings":";;;AAAA,yDAAyD;AACzD,gEAAmC"}
|
package/api-promise.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-promise.mjs","sourceRoot":"","sources":["src/api-promise.ts"],"names":[],"mappings":""}
|
package/client.d.mts
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import type { RequestInit, RequestInfo } from "./internal/builtin-types.mjs";
|
|
2
|
+
import type { PromiseOrValue, MergedRequestInit, FinalizedRequestInit } from "./internal/types.mjs";
|
|
3
|
+
export type { Logger, LogLevel } from "./internal/utils/log.mjs";
|
|
4
|
+
import * as Opts from "./internal/request-options.mjs";
|
|
5
|
+
import * as Errors from "./core/error.mjs";
|
|
6
|
+
import * as Uploads from "./core/uploads.mjs";
|
|
7
|
+
import * as API from "./resources/index.mjs";
|
|
8
|
+
import { APIPromise } from "./core/api-promise.mjs";
|
|
9
|
+
import { Call, CallCreateParams, CallCreateResponse, CallGetByIDResponse, CallListEvaluationRunsResponse, CallListMetricsParams, CallListMetricsResponse, CallListParams, CallListResponse, CallListSentimentRunsResponse } from "./resources/call.mjs";
|
|
10
|
+
import { Evaluation, EvaluationCreateJobParams, EvaluationCreateJobResponse, EvaluationGetEvaluatorByIDResponse, EvaluationGetJobResponse, EvaluationListEvaluatorsParams, EvaluationListEvaluatorsResponse, EvaluationListJobRunsParams, EvaluationListJobRunsResponse } from "./resources/evaluation.mjs";
|
|
11
|
+
import { Health, HealthGetResponse } from "./resources/health.mjs";
|
|
12
|
+
import { IntegrationCreateRetellCallParams, IntegrationCreateRetellCallResponse, IntegrationCreateVapiCallParams, IntegrationCreateVapiCallResponse, Integrations } from "./resources/integrations.mjs";
|
|
13
|
+
import { Metric, MetricListDefinitionsResponse } from "./resources/metric.mjs";
|
|
14
|
+
import { Persona, PersonaCreateParams, PersonaCreateResponse, PersonaGetByIDResponse, PersonaListParams, PersonaListResponse, PersonaUpdateParams, PersonaUpdateResponse } from "./resources/persona.mjs";
|
|
15
|
+
import { Simulation, SimulationGetRunPlanJobResponse, SimulationGetSimulationJobByIDResponse, SimulationListRunPlanJobsParams, SimulationListRunPlanJobsResponse, SimulationListScenariosParams, SimulationListScenariosResponse, SimulationLookupSimulationJobParams, SimulationLookupSimulationJobResponse, SimulationStartRunPlanJobResponse } from "./resources/simulation.mjs";
|
|
16
|
+
import { type Fetch } from "./internal/builtin-types.mjs";
|
|
17
|
+
import { HeadersLike, NullableHeaders } from "./internal/headers.mjs";
|
|
18
|
+
import { FinalRequestOptions, RequestOptions } from "./internal/request-options.mjs";
|
|
19
|
+
import { type LogLevel, type Logger } from "./internal/utils/log.mjs";
|
|
20
|
+
export interface ClientOptions {
|
|
21
|
+
/**
|
|
22
|
+
* JWT token for authentication
|
|
23
|
+
*/
|
|
24
|
+
bearerToken?: string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Override the default base URL for the API, e.g., "https://api.example.com/v2/"
|
|
27
|
+
*
|
|
28
|
+
* Defaults to process.env['ROARK_BASE_URL'].
|
|
29
|
+
*/
|
|
30
|
+
baseURL?: string | null | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* The maximum amount of time (in milliseconds) that the client should wait for a response
|
|
33
|
+
* from the server before timing out a single request.
|
|
34
|
+
*
|
|
35
|
+
* Note that request timeouts are retried by default, so in a worst-case scenario you may wait
|
|
36
|
+
* much longer than this timeout before the promise succeeds or fails.
|
|
37
|
+
*
|
|
38
|
+
* @unit milliseconds
|
|
39
|
+
*/
|
|
40
|
+
timeout?: number | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Additional `RequestInit` options to be passed to `fetch` calls.
|
|
43
|
+
* Properties will be overridden by per-request `fetchOptions`.
|
|
44
|
+
*/
|
|
45
|
+
fetchOptions?: MergedRequestInit | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Specify a custom `fetch` function implementation.
|
|
48
|
+
*
|
|
49
|
+
* If not provided, we expect that `fetch` is defined globally.
|
|
50
|
+
*/
|
|
51
|
+
fetch?: Fetch | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* The maximum number of times that the client will retry a request in case of a
|
|
54
|
+
* temporary failure, like a network error or a 5XX error from the server.
|
|
55
|
+
*
|
|
56
|
+
* @default 2
|
|
57
|
+
*/
|
|
58
|
+
maxRetries?: number | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* Default headers to include with every request to the API.
|
|
61
|
+
*
|
|
62
|
+
* These can be removed in individual requests by explicitly setting the
|
|
63
|
+
* header to `null` in request options.
|
|
64
|
+
*/
|
|
65
|
+
defaultHeaders?: HeadersLike | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Default query parameters to include with every request to the API.
|
|
68
|
+
*
|
|
69
|
+
* These can be removed in individual requests by explicitly setting the
|
|
70
|
+
* param to `undefined` in request options.
|
|
71
|
+
*/
|
|
72
|
+
defaultQuery?: Record<string, string | undefined> | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* Set the log level.
|
|
75
|
+
*
|
|
76
|
+
* Defaults to process.env['ROARK_LOG'] or 'warn' if it isn't set.
|
|
77
|
+
*/
|
|
78
|
+
logLevel?: LogLevel | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* Set the logger.
|
|
81
|
+
*
|
|
82
|
+
* Defaults to globalThis.console.
|
|
83
|
+
*/
|
|
84
|
+
logger?: Logger | undefined;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* API Client for interfacing with the Roark API.
|
|
88
|
+
*/
|
|
89
|
+
export declare class Roark {
|
|
90
|
+
#private;
|
|
91
|
+
bearerToken: string;
|
|
92
|
+
baseURL: string;
|
|
93
|
+
maxRetries: number;
|
|
94
|
+
timeout: number;
|
|
95
|
+
logger: Logger;
|
|
96
|
+
logLevel: LogLevel | undefined;
|
|
97
|
+
fetchOptions: MergedRequestInit | undefined;
|
|
98
|
+
private fetch;
|
|
99
|
+
protected idempotencyHeader?: string;
|
|
100
|
+
private _options;
|
|
101
|
+
/**
|
|
102
|
+
* API Client for interfacing with the Roark API.
|
|
103
|
+
*
|
|
104
|
+
* @param {string | undefined} [opts.bearerToken=process.env['ROARK_API_BEARER_TOKEN'] ?? undefined]
|
|
105
|
+
* @param {string} [opts.baseURL=process.env['ROARK_BASE_URL'] ?? https://api.roark.ai] - Override the default base URL for the API.
|
|
106
|
+
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
107
|
+
* @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.
|
|
108
|
+
* @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
109
|
+
* @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
|
|
110
|
+
* @param {HeadersLike} opts.defaultHeaders - Default headers to include with every request to the API.
|
|
111
|
+
* @param {Record<string, string | undefined>} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
112
|
+
*/
|
|
113
|
+
constructor({ baseURL, bearerToken, ...opts }?: ClientOptions);
|
|
114
|
+
/**
|
|
115
|
+
* Create a new client instance re-using the same options given to the current client with optional overriding.
|
|
116
|
+
*/
|
|
117
|
+
withOptions(options: Partial<ClientOptions>): this;
|
|
118
|
+
protected defaultQuery(): Record<string, string | undefined> | undefined;
|
|
119
|
+
protected validateHeaders({ values, nulls }: NullableHeaders): void;
|
|
120
|
+
protected authHeaders(opts: FinalRequestOptions): Promise<NullableHeaders | undefined>;
|
|
121
|
+
protected stringifyQuery(query: Record<string, unknown>): string;
|
|
122
|
+
private getUserAgent;
|
|
123
|
+
protected defaultIdempotencyKey(): string;
|
|
124
|
+
protected makeStatusError(status: number, error: Object, message: string | undefined, headers: Headers): Errors.APIError;
|
|
125
|
+
buildURL(path: string, query: Record<string, unknown> | null | undefined, defaultBaseURL?: string | undefined): string;
|
|
126
|
+
/**
|
|
127
|
+
* Used as a callback for mutating the given `FinalRequestOptions` object.
|
|
128
|
+
*/
|
|
129
|
+
protected prepareOptions(options: FinalRequestOptions): Promise<void>;
|
|
130
|
+
/**
|
|
131
|
+
* Used as a callback for mutating the given `RequestInit` object.
|
|
132
|
+
*
|
|
133
|
+
* This is useful for cases where you want to add certain headers based off of
|
|
134
|
+
* the request properties, e.g. `method` or `url`.
|
|
135
|
+
*/
|
|
136
|
+
protected prepareRequest(request: RequestInit, { url, options }: {
|
|
137
|
+
url: string;
|
|
138
|
+
options: FinalRequestOptions;
|
|
139
|
+
}): Promise<void>;
|
|
140
|
+
get<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
|
|
141
|
+
post<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
|
|
142
|
+
patch<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
|
|
143
|
+
put<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
|
|
144
|
+
delete<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
|
|
145
|
+
private methodRequest;
|
|
146
|
+
request<Rsp>(options: PromiseOrValue<FinalRequestOptions>, remainingRetries?: number | null): APIPromise<Rsp>;
|
|
147
|
+
private makeRequest;
|
|
148
|
+
fetchWithTimeout(url: RequestInfo, init: RequestInit | undefined, ms: number, controller: AbortController): Promise<Response>;
|
|
149
|
+
private shouldRetry;
|
|
150
|
+
private retryRequest;
|
|
151
|
+
private calculateDefaultRetryTimeoutMillis;
|
|
152
|
+
buildRequest(inputOptions: FinalRequestOptions, { retryCount }?: {
|
|
153
|
+
retryCount?: number;
|
|
154
|
+
}): Promise<{
|
|
155
|
+
req: FinalizedRequestInit;
|
|
156
|
+
url: string;
|
|
157
|
+
timeout: number;
|
|
158
|
+
}>;
|
|
159
|
+
private buildHeaders;
|
|
160
|
+
private _makeAbort;
|
|
161
|
+
private buildBody;
|
|
162
|
+
static Roark: typeof Roark;
|
|
163
|
+
static DEFAULT_TIMEOUT: number;
|
|
164
|
+
static RoarkError: typeof Errors.RoarkError;
|
|
165
|
+
static APIError: typeof Errors.APIError;
|
|
166
|
+
static APIConnectionError: typeof Errors.APIConnectionError;
|
|
167
|
+
static APIConnectionTimeoutError: typeof Errors.APIConnectionTimeoutError;
|
|
168
|
+
static APIUserAbortError: typeof Errors.APIUserAbortError;
|
|
169
|
+
static NotFoundError: typeof Errors.NotFoundError;
|
|
170
|
+
static ConflictError: typeof Errors.ConflictError;
|
|
171
|
+
static RateLimitError: typeof Errors.RateLimitError;
|
|
172
|
+
static BadRequestError: typeof Errors.BadRequestError;
|
|
173
|
+
static AuthenticationError: typeof Errors.AuthenticationError;
|
|
174
|
+
static InternalServerError: typeof Errors.InternalServerError;
|
|
175
|
+
static PermissionDeniedError: typeof Errors.PermissionDeniedError;
|
|
176
|
+
static UnprocessableEntityError: typeof Errors.UnprocessableEntityError;
|
|
177
|
+
static toFile: typeof Uploads.toFile;
|
|
178
|
+
health: API.Health;
|
|
179
|
+
evaluation: API.Evaluation;
|
|
180
|
+
call: API.Call;
|
|
181
|
+
metric: API.Metric;
|
|
182
|
+
integrations: API.Integrations;
|
|
183
|
+
simulation: API.Simulation;
|
|
184
|
+
persona: API.Persona;
|
|
185
|
+
}
|
|
186
|
+
export declare namespace Roark {
|
|
187
|
+
export type RequestOptions = Opts.RequestOptions;
|
|
188
|
+
export { Health as Health, type HealthGetResponse as HealthGetResponse };
|
|
189
|
+
export { Evaluation as Evaluation, type EvaluationCreateJobResponse as EvaluationCreateJobResponse, type EvaluationGetEvaluatorByIDResponse as EvaluationGetEvaluatorByIDResponse, type EvaluationGetJobResponse as EvaluationGetJobResponse, type EvaluationListEvaluatorsResponse as EvaluationListEvaluatorsResponse, type EvaluationListJobRunsResponse as EvaluationListJobRunsResponse, type EvaluationCreateJobParams as EvaluationCreateJobParams, type EvaluationListEvaluatorsParams as EvaluationListEvaluatorsParams, type EvaluationListJobRunsParams as EvaluationListJobRunsParams, };
|
|
190
|
+
export { Call as Call, type CallCreateResponse as CallCreateResponse, type CallListResponse as CallListResponse, type CallGetByIDResponse as CallGetByIDResponse, type CallListEvaluationRunsResponse as CallListEvaluationRunsResponse, type CallListMetricsResponse as CallListMetricsResponse, type CallListSentimentRunsResponse as CallListSentimentRunsResponse, type CallCreateParams as CallCreateParams, type CallListParams as CallListParams, type CallListMetricsParams as CallListMetricsParams, };
|
|
191
|
+
export { Metric as Metric, type MetricListDefinitionsResponse as MetricListDefinitionsResponse };
|
|
192
|
+
export { Integrations as Integrations, type IntegrationCreateRetellCallResponse as IntegrationCreateRetellCallResponse, type IntegrationCreateVapiCallResponse as IntegrationCreateVapiCallResponse, type IntegrationCreateRetellCallParams as IntegrationCreateRetellCallParams, type IntegrationCreateVapiCallParams as IntegrationCreateVapiCallParams, };
|
|
193
|
+
export { Simulation as Simulation, type SimulationGetRunPlanJobResponse as SimulationGetRunPlanJobResponse, type SimulationGetSimulationJobByIDResponse as SimulationGetSimulationJobByIDResponse, type SimulationListRunPlanJobsResponse as SimulationListRunPlanJobsResponse, type SimulationListScenariosResponse as SimulationListScenariosResponse, type SimulationLookupSimulationJobResponse as SimulationLookupSimulationJobResponse, type SimulationStartRunPlanJobResponse as SimulationStartRunPlanJobResponse, type SimulationListRunPlanJobsParams as SimulationListRunPlanJobsParams, type SimulationListScenariosParams as SimulationListScenariosParams, type SimulationLookupSimulationJobParams as SimulationLookupSimulationJobParams, };
|
|
194
|
+
export { Persona as Persona, type PersonaCreateResponse as PersonaCreateResponse, type PersonaUpdateResponse as PersonaUpdateResponse, type PersonaListResponse as PersonaListResponse, type PersonaGetByIDResponse as PersonaGetByIDResponse, type PersonaCreateParams as PersonaCreateParams, type PersonaUpdateParams as PersonaUpdateParams, type PersonaListParams as PersonaListParams, };
|
|
195
|
+
}
|
|
196
|
+
//# sourceMappingURL=client.d.mts.map
|
package/client.d.mts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.mts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAY;OAC3C,KAAK,EAAc,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE;YAIvE,EAAE,MAAM,EAAE,QAAQ,EAAE;OAKzB,KAAK,IAAI;OAGT,KAAK,MAAM;OACX,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,EAAE,UAAU,EAAE;OACd,EACL,IAAI,EACJ,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,8BAA8B,EAC9B,qBAAqB,EACrB,uBAAuB,EACvB,cAAc,EACd,gBAAgB,EAChB,6BAA6B,EAC9B;OACM,EACL,UAAU,EACV,yBAAyB,EACzB,2BAA2B,EAC3B,kCAAkC,EAClC,wBAAwB,EACxB,8BAA8B,EAC9B,gCAAgC,EAChC,2BAA2B,EAC3B,6BAA6B,EAC9B;OACM,EAAE,MAAM,EAAE,iBAAiB,EAAE;OAC7B,EACL,iCAAiC,EACjC,mCAAmC,EACnC,+BA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