@learncard/network-brain-client 2.3.28 → 2.4.1

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,23 @@
1
1
  # @learncard/network-brain-client
2
2
 
3
+ ## 2.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @learncard/network-brain-service@3.6.1
9
+
10
+ ## 2.4.0
11
+
12
+ ### Minor Changes
13
+
14
+ - [#807](https://github.com/learningeconomy/LearnCard/pull/807) [`cfabf6686a0233ed89de6201a70c01598c5ab298`](https://github.com/learningeconomy/LearnCard/commit/cfabf6686a0233ed89de6201a70c01598c5ab298) Thanks [@TaylorBeeston](https://github.com/TaylorBeeston)! - Add initFromApiKey support
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies [[`cfabf6686a0233ed89de6201a70c01598c5ab298`](https://github.com/learningeconomy/LearnCard/commit/cfabf6686a0233ed89de6201a70c01598c5ab298)]:
19
+ - @learncard/network-brain-service@3.6.0
20
+
3
21
  ## 2.3.28
4
22
 
5
23
  ### Patch Changes
@@ -5341,6 +5341,7 @@ var require_dist = __commonJS({
5341
5341
  var src_exports = {};
5342
5342
  __export(src_exports, {
5343
5343
  default: () => src_default,
5344
+ getApiTokenClient: () => getApiTokenClient,
5344
5345
  getClient: () => getClient
5345
5346
  });
5346
5347
  module.exports = __toCommonJS(src_exports);
@@ -5428,4 +5429,21 @@ var getClient = /* @__PURE__ */ __name(async (url, didAuthFunction) => {
5428
5429
  });
5429
5430
  return trpc;
5430
5431
  }, "getClient");
5432
+ var getApiTokenClient = /* @__PURE__ */ __name(async (url, apiToken) => {
5433
+ const trpc = (0, import_client.createTRPCClient)({
5434
+ links: [
5435
+ (0, import_client.httpBatchLink)({
5436
+ methodOverride: "POST",
5437
+ url,
5438
+ maxURLLength: 3072,
5439
+ headers: { Authorization: `Bearer ${apiToken}` },
5440
+ transformer: {
5441
+ input: import_helpers.RegExpTransformer,
5442
+ output: { serialize: (o) => o, deserialize: (o) => o }
5443
+ }
5444
+ })
5445
+ ]
5446
+ });
5447
+ return trpc;
5448
+ }, "getApiTokenClient");
5431
5449
  var src_default = getClient;