@stableflow/core 3.0.2 → 3.0.3-rc-6501a38666-20260630

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/dist/index.mjs CHANGED
@@ -131,6 +131,7 @@ var OpenAPI = {
131
131
  WITH_CREDENTIALS: false,
132
132
  CREDENTIALS: "include",
133
133
  TOKEN: void 0,
134
+ NEARINTENTS_TOKEN: void 0,
134
135
  USERNAME: void 0,
135
136
  PASSWORD: void 0,
136
137
  HEADERS: void 0,
@@ -417,11 +418,12 @@ var resolve = async (options, resolver) => {
417
418
  return resolver;
418
419
  };
419
420
  var getHeaders = async (config, options, formData) => {
420
- const [token, username, password, additionalHeaders] = await Promise.all([
421
+ const [token, username, password, additionalHeaders, nearintentsToken] = await Promise.all([
421
422
  resolve(options, config.TOKEN),
422
423
  resolve(options, config.USERNAME),
423
424
  resolve(options, config.PASSWORD),
424
- resolve(options, config.HEADERS)
425
+ resolve(options, config.HEADERS),
426
+ resolve(options, config.NEARINTENTS_TOKEN)
425
427
  ]);
426
428
  const formHeaders = typeof formData?.getHeaders === "function" && formData?.getHeaders() || {};
427
429
  const headers = Object.entries({
@@ -436,6 +438,9 @@ var getHeaders = async (config, options, formData) => {
436
438
  if (isStringWithValue(token)) {
437
439
  headers["Authorization"] = `Bearer ${token}`;
438
440
  }
441
+ if (isStringWithValue(nearintentsToken)) {
442
+ headers["nearintent-api-key"] = nearintentsToken;
443
+ }
439
444
  if (isStringWithValue(username) && isStringWithValue(password)) {
440
445
  const credentials = base64(`${username}:${password}`);
441
446
  headers["Authorization"] = `Basic ${credentials}`;