UNPKG

@bitrix24/b24jssdk

Version:

Bitrix24 REST API JavaScript SDK

45 lines (41 loc) 1.3 kB
/** * @package @bitrix24/b24jssdk * @version 2.0.0 * @copyright (c) 2026 Bitrix24 * @license MIT * @see https://github.com/bitrix24/b24jssdk * @see https://bitrix24.github.io/b24jssdk/ */ 'use strict'; const text = require('../tools/text.cjs'); 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.Text.getUuidRfc4122(); } getRequestId() { return this.generate(); } getHeaderFieldName() { return DEFAULT_REQUEST_ID_HEADER_FIELD_NAME; } } exports.RequestIdGenerator = RequestIdGenerator; //# sourceMappingURL=request-id-generator.cjs.map