UNPKG

@bitrix24/b24jssdk

Version:

Bitrix24 REST API JavaScript SDK

43 lines (40 loc) 1.26 kB
/** * @package @bitrix24/b24jssdk * @version 1.0.4 * @copyright (c) 2026 Bitrix24 * @license MIT * @see https://github.com/bitrix24/b24jssdk * @see https://bitrix24.github.io/b24jssdk/ */ import { Text } from '../tools/text.mjs'; var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); const DEFAULT_REQUEST_ID_HEADER_FIELD_NAME = "X-Request-ID"; const DEFAULT_QUERY_STRING_PARAMETER_NAME = "bx24_request_id"; const DEFAULT_QUERY_STRING_SDK_VER_PARAMETER_NAME = "bx24_sdk_ver"; const DEFAULT_QUERY_STRING_SDK_TYPE_PARAMETER_NAME = "bx24_sdk_type"; class RequestIdGenerator { static { __name(this, "RequestIdGenerator"); } getQueryStringParameterName() { return DEFAULT_QUERY_STRING_PARAMETER_NAME; } getQueryStringSdkParameterName() { return DEFAULT_QUERY_STRING_SDK_VER_PARAMETER_NAME; } getQueryStringSdkTypeParameterName() { return DEFAULT_QUERY_STRING_SDK_TYPE_PARAMETER_NAME; } generate() { return Text.getUuidRfc4122(); } getRequestId() { return this.generate(); } getHeaderFieldName() { return DEFAULT_REQUEST_ID_HEADER_FIELD_NAME; } } export { RequestIdGenerator }; //# sourceMappingURL=request-id-generator.mjs.map