@learncard/network-brain-client 2.3.27 → 2.4.0

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.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#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
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [[`cfabf6686a0233ed89de6201a70c01598c5ab298`](https://github.com/learningeconomy/LearnCard/commit/cfabf6686a0233ed89de6201a70c01598c5ab298)]:
12
+ - @learncard/network-brain-service@3.6.0
13
+
14
+ ## 2.3.28
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies [[`f61e75a7a1de5913e4a7a2b381aa9815e726cec3`](https://github.com/learningeconomy/LearnCard/commit/f61e75a7a1de5913e4a7a2b381aa9815e726cec3), [`3627c858a339630e4cf033b64cb04564ff78040c`](https://github.com/learningeconomy/LearnCard/commit/3627c858a339630e4cf033b64cb04564ff78040c), [`beb9c54789a2f48b06e1f82082e1dd51eab6b51d`](https://github.com/learningeconomy/LearnCard/commit/beb9c54789a2f48b06e1f82082e1dd51eab6b51d)]:
19
+ - @learncard/network-brain-service@3.5.22
20
+
3
21
  ## 2.3.27
4
22
 
5
23
  ### Patch Changes
@@ -4415,6 +4415,7 @@ var require_helpers_cjs_development = __commonJS({
4415
4415
  controller: z.string(),
4416
4416
  publicKeyJwk: JWKValidator.optional(),
4417
4417
  publicKeyBase58: z.string().optional(),
4418
+ publicKeyMultibase: z.string().optional(),
4418
4419
  blockChainAccountId: z.string().optional()
4419
4420
  }).catchall(z.any())
4420
4421
  );
@@ -4723,7 +4724,8 @@ var require_helpers_cjs_development = __commonJS({
4723
4724
  display: LCNProfileDisplayValidator.optional().describe("Display settings for the profile."),
4724
4725
  highlightedCredentials: z.array(z.string()).max(5).optional().describe("Up to 5 unique boost URIs to highlight on the profile."),
4725
4726
  role: z.string().default("").optional().describe('Role of the profile: e.g. "teacher", "student".'),
4726
- dob: z.string().default("").optional().describe('Date of birth of the profile: e.g. "1990-01-01".')
4727
+ dob: z.string().default("").optional().describe('Date of birth of the profile: e.g. "1990-01-01".'),
4728
+ country: z.string().optional().describe("Country for the profile.")
4727
4729
  });
4728
4730
  var LCNProfileQueryValidator = z.object({
4729
4731
  profileId: StringQuery,
@@ -5339,6 +5341,7 @@ var require_dist = __commonJS({
5339
5341
  var src_exports = {};
5340
5342
  __export(src_exports, {
5341
5343
  default: () => src_default,
5344
+ getApiTokenClient: () => getApiTokenClient,
5342
5345
  getClient: () => getClient
5343
5346
  });
5344
5347
  module.exports = __toCommonJS(src_exports);
@@ -5426,4 +5429,21 @@ var getClient = /* @__PURE__ */ __name(async (url, didAuthFunction) => {
5426
5429
  });
5427
5430
  return trpc;
5428
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");
5429
5449
  var src_default = getClient;