@bxshefby/b24jssdk
Version:
Bitrix24 REST API JavaScript SDK
44 lines (40 loc) • 1.25 kB
JavaScript
/**
* @package @bxshefby/b24jssdk
* @version 3.3.0
* @copyright (c) 2026 Bitrix24
* @license MIT
* @see https://github.com/bx-shef/b24-js-sdk
* @see https://b24-js-sdk.bx-shef.by/
*/
;
const textCore = require('../tools/text-core.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 textCore.getUuidRfc4122();
}
getRequestId() {
return this.generate();
}
getHeaderFieldName() {
return DEFAULT_REQUEST_ID_HEADER_FIELD_NAME;
}
}
exports.RequestIdGenerator = RequestIdGenerator;