generaltranslation 8.2.17 → 8.2.18

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # generaltranslation
2
2
 
3
+ ## 8.2.18
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1648](https://github.com/generaltranslation/gt/pull/1648) [`9709a2f`](https://github.com/generaltranslation/gt/commit/9709a2f2b97b9d8239298e39bb31e57692bbffd8) Thanks [@brian-lou](https://github.com/brian-lou)! - Use `gt-project-id` instead of `x-gt-project-id` for API request headers. Update the API key header to use standard `Authorization: Bearer <api-key>` prefix.
8
+
3
9
  ## 8.2.17
4
10
 
5
11
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -330,10 +330,9 @@ const API_VERSION$1 = "2026-03-06.v1";
330
330
  function generateRequestHeaders(config, excludeContentType = false) {
331
331
  const authHeaders = {
332
332
  ...!excludeContentType && { "Content-Type": "application/json" },
333
- "x-gt-project-id": config.projectId
333
+ "gt-project-id": config.projectId
334
334
  };
335
- if (config.apiKey) if (config.apiKey.startsWith("gtx-internal-")) authHeaders["x-gt-internal-api-key"] = config.apiKey;
336
- else authHeaders["x-gt-api-key"] = config.apiKey;
335
+ if (config.apiKey) authHeaders["Authorization"] = `Bearer ${config.apiKey}`;
337
336
  authHeaders["gt-api-version"] = API_VERSION$1;
338
337
  return authHeaders;
339
338
  }