@bxshefby/b24jssdk
Version:
Bitrix24 REST API JavaScript SDK
42 lines (39 loc) • 1.22 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/
*/
import { getUuidRfc4122 } from '../tools/text-core.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 getUuidRfc4122();
}
getRequestId() {
return this.generate();
}
getHeaderFieldName() {
return DEFAULT_REQUEST_ID_HEADER_FIELD_NAME;
}
}
export { RequestIdGenerator };