@learncard/network-brain-client 2.5.21 → 2.5.25

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,35 @@
1
1
  # @learncard/network-brain-client
2
2
 
3
+ ## 2.5.25
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`8b5325da517d957ef93598511ba7dca14b31a656`](https://github.com/learningeconomy/LearnCard/commit/8b5325da517d957ef93598511ba7dca14b31a656), [`fb6627b7fa3c4a07c83d4186619a937e6a83f369`](https://github.com/learningeconomy/LearnCard/commit/fb6627b7fa3c4a07c83d4186619a937e6a83f369)]:
8
+ - @learncard/network-brain-service@3.13.3
9
+
10
+ ## 2.5.24
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [[`359a64bc190505255cf49b9317a7853b8fc71226`](https://github.com/learningeconomy/LearnCard/commit/359a64bc190505255cf49b9317a7853b8fc71226), [`00976e097128d18c25c8016a75be9580cd3a7050`](https://github.com/learningeconomy/LearnCard/commit/00976e097128d18c25c8016a75be9580cd3a7050), [`bba1f735e107d9cc86880e9f869413bc7072bff8`](https://github.com/learningeconomy/LearnCard/commit/bba1f735e107d9cc86880e9f869413bc7072bff8), [`fce9d2fd32898cfc64c59b88ca644dea3b53d1a5`](https://github.com/learningeconomy/LearnCard/commit/fce9d2fd32898cfc64c59b88ca644dea3b53d1a5), [`a702862957303a3e25c21bdc7f0998b3ee3e64a3`](https://github.com/learningeconomy/LearnCard/commit/a702862957303a3e25c21bdc7f0998b3ee3e64a3)]:
15
+ - @learncard/network-brain-service@3.13.2
16
+
17
+ ## 2.5.23
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies [[`e8c886eac8907e127805e760c9622118c80c7bf5`](https://github.com/learningeconomy/LearnCard/commit/e8c886eac8907e127805e760c9622118c80c7bf5), [`c83e3de987c11a6d95deec31c1fdb2401a990db2`](https://github.com/learningeconomy/LearnCard/commit/c83e3de987c11a6d95deec31c1fdb2401a990db2), [`fe4a1a265132271860460b8121e28ec0eacf4cb0`](https://github.com/learningeconomy/LearnCard/commit/fe4a1a265132271860460b8121e28ec0eacf4cb0), [`6a1e0096ab35d0c98a51c6e06aea347f2a3e89c2`](https://github.com/learningeconomy/LearnCard/commit/6a1e0096ab35d0c98a51c6e06aea347f2a3e89c2)]:
22
+ - @learncard/network-brain-service@3.13.1
23
+
24
+ ## 2.5.22
25
+
26
+ ### Patch Changes
27
+
28
+ - [#1075](https://github.com/learningeconomy/LearnCard/pull/1075) [`50fa611b714ae47fa3d6d56e7751ba59b5b71322`](https://github.com/learningeconomy/LearnCard/commit/50fa611b714ae47fa3d6d56e7751ba59b5b71322) Thanks [@smurflo2](https://github.com/smurflo2)! - Add guardianGatedRoute so backend has access to isChildProfile and hasGuardianApproval
29
+
30
+ - Updated dependencies [[`3935a7c28ded7270133496f30562bad54a14f200`](https://github.com/learningeconomy/LearnCard/commit/3935a7c28ded7270133496f30562bad54a14f200), [`01a12c4353c28196a6e49ea6996656717faa246a`](https://github.com/learningeconomy/LearnCard/commit/01a12c4353c28196a6e49ea6996656717faa246a), [`50fa611b714ae47fa3d6d56e7751ba59b5b71322`](https://github.com/learningeconomy/LearnCard/commit/50fa611b714ae47fa3d6d56e7751ba59b5b71322), [`b8f9581422406f78d3738c4c3a6d9f335725b745`](https://github.com/learningeconomy/LearnCard/commit/b8f9581422406f78d3738c4c3a6d9f335725b745), [`34ced8d1c933ca7015dd1d3bd37b6b2ff847de3c`](https://github.com/learningeconomy/LearnCard/commit/34ced8d1c933ca7015dd1d3bd37b6b2ff847de3c)]:
31
+ - @learncard/network-brain-service@3.13.0
32
+
3
33
  ## 2.5.21
4
34
 
5
35
  ### Patch Changes
@@ -100,17 +100,20 @@ var require_helpers_cjs_development = __commonJS({
100
100
  AgeRatingValidator: /* @__PURE__ */ __name2(() => AgeRatingValidator, "AgeRatingValidator"),
101
101
  AlignmentTargetTypeValidator: /* @__PURE__ */ __name2(() => AlignmentTargetTypeValidator, "AlignmentTargetTypeValidator"),
102
102
  AlignmentValidator: /* @__PURE__ */ __name2(() => AlignmentValidator, "AlignmentValidator"),
103
+ AllowConnectionRequestsEnum: /* @__PURE__ */ __name2(() => AllowConnectionRequestsEnum, "AllowConnectionRequestsEnum"),
103
104
  AppBoostValidator: /* @__PURE__ */ __name2(() => AppBoostValidator, "AppBoostValidator"),
104
105
  AppEventInputValidator: /* @__PURE__ */ __name2(() => AppEventInputValidator, "AppEventInputValidator"),
105
106
  AppEventResponseValidator: /* @__PURE__ */ __name2(() => AppEventResponseValidator, "AppEventResponseValidator"),
106
107
  AppEventValidator: /* @__PURE__ */ __name2(() => AppEventValidator, "AppEventValidator"),
107
108
  AppListingStatusValidator: /* @__PURE__ */ __name2(() => AppListingStatusValidator, "AppListingStatusValidator"),
108
109
  AppStoreListingCreateValidator: /* @__PURE__ */ __name2(() => AppStoreListingCreateValidator, "AppStoreListingCreateValidator"),
110
+ AppStoreListingSubmitterValidator: /* @__PURE__ */ __name2(() => AppStoreListingSubmitterValidator, "AppStoreListingSubmitterValidator"),
109
111
  AppStoreListingUpdateValidator: /* @__PURE__ */ __name2(() => AppStoreListingUpdateValidator, "AppStoreListingUpdateValidator"),
110
112
  AppStoreListingValidator: /* @__PURE__ */ __name2(() => AppStoreListingValidator, "AppStoreListingValidator"),
111
113
  AuthGrantQueryValidator: /* @__PURE__ */ __name2(() => AuthGrantQueryValidator, "AuthGrantQueryValidator"),
112
114
  AuthGrantStatusValidator: /* @__PURE__ */ __name2(() => AuthGrantStatusValidator, "AuthGrantStatusValidator"),
113
115
  AuthGrantValidator: /* @__PURE__ */ __name2(() => AuthGrantValidator, "AuthGrantValidator"),
116
+ AuthSessionError: /* @__PURE__ */ __name2(() => AuthSessionError, "AuthSessionError"),
114
117
  AutoBoostConfigValidator: /* @__PURE__ */ __name2(() => AutoBoostConfigValidator, "AutoBoostConfigValidator"),
115
118
  BoostPermissionsQueryValidator: /* @__PURE__ */ __name2(() => BoostPermissionsQueryValidator, "BoostPermissionsQueryValidator"),
116
119
  BoostPermissionsValidator: /* @__PURE__ */ __name2(() => BoostPermissionsValidator, "BoostPermissionsValidator"),
@@ -118,6 +121,8 @@ var require_helpers_cjs_development = __commonJS({
118
121
  BoostRecipientValidator: /* @__PURE__ */ __name2(() => BoostRecipientValidator, "BoostRecipientValidator"),
119
122
  BoostRecipientWithChildrenValidator: /* @__PURE__ */ __name2(() => BoostRecipientWithChildrenValidator, "BoostRecipientWithChildrenValidator"),
120
123
  BoostValidator: /* @__PURE__ */ __name2(() => BoostValidator, "BoostValidator"),
124
+ CheckCredentialEventValidator: /* @__PURE__ */ __name2(() => CheckCredentialEventValidator, "CheckCredentialEventValidator"),
125
+ CheckIssuanceStatusEventValidator: /* @__PURE__ */ __name2(() => CheckIssuanceStatusEventValidator, "CheckIssuanceStatusEventValidator"),
121
126
  ClaimHookQueryValidator: /* @__PURE__ */ __name2(() => ClaimHookQueryValidator, "ClaimHookQueryValidator"),
122
127
  ClaimHookTypeValidator: /* @__PURE__ */ __name2(() => ClaimHookTypeValidator, "ClaimHookTypeValidator"),
123
128
  ClaimHookValidator: /* @__PURE__ */ __name2(() => ClaimHookValidator, "ClaimHookValidator"),
@@ -127,6 +132,10 @@ var require_helpers_cjs_development = __commonJS({
127
132
  ConsentFlowContractDataValidator: /* @__PURE__ */ __name2(() => ConsentFlowContractDataValidator, "ConsentFlowContractDataValidator"),
128
133
  ConsentFlowContractDetailsValidator: /* @__PURE__ */ __name2(() => ConsentFlowContractDetailsValidator, "ConsentFlowContractDetailsValidator"),
129
134
  ConsentFlowContractQueryValidator: /* @__PURE__ */ __name2(() => ConsentFlowContractQueryValidator, "ConsentFlowContractQueryValidator"),
135
+ ConsentFlowContractRequestForProfileListValidator: /* @__PURE__ */ __name2(() => ConsentFlowContractRequestForProfileListValidator, "ConsentFlowContractRequestForProfileListValidator"),
136
+ ConsentFlowContractRequestForProfileValidator: /* @__PURE__ */ __name2(() => ConsentFlowContractRequestForProfileValidator, "ConsentFlowContractRequestForProfileValidator"),
137
+ ConsentFlowContractRequestReadStatusValidator: /* @__PURE__ */ __name2(() => ConsentFlowContractRequestReadStatusValidator, "ConsentFlowContractRequestReadStatusValidator"),
138
+ ConsentFlowContractRequestStatusValidator: /* @__PURE__ */ __name2(() => ConsentFlowContractRequestStatusValidator, "ConsentFlowContractRequestStatusValidator"),
130
139
  ConsentFlowContractValidator: /* @__PURE__ */ __name2(() => ConsentFlowContractValidator, "ConsentFlowContractValidator"),
131
140
  ConsentFlowDataForDidQueryValidator: /* @__PURE__ */ __name2(() => ConsentFlowDataForDidQueryValidator, "ConsentFlowDataForDidQueryValidator"),
132
141
  ConsentFlowDataQueryValidator: /* @__PURE__ */ __name2(() => ConsentFlowDataQueryValidator, "ConsentFlowDataQueryValidator"),
@@ -159,6 +168,7 @@ var require_helpers_cjs_development = __commonJS({
159
168
  CredentialActivityValidator: /* @__PURE__ */ __name2(() => CredentialActivityValidator, "CredentialActivityValidator"),
160
169
  CredentialActivityWithDetailsValidator: /* @__PURE__ */ __name2(() => CredentialActivityWithDetailsValidator, "CredentialActivityWithDetailsValidator"),
161
170
  CredentialInfoValidator: /* @__PURE__ */ __name2(() => CredentialInfoValidator, "CredentialInfoValidator"),
171
+ CredentialNameRefValidator: /* @__PURE__ */ __name2(() => CredentialNameRefValidator, "CredentialNameRefValidator"),
162
172
  CredentialRecordValidator: /* @__PURE__ */ __name2(() => CredentialRecordValidator, "CredentialRecordValidator"),
163
173
  CredentialSchemaValidator: /* @__PURE__ */ __name2(() => CredentialSchemaValidator, "CredentialSchemaValidator"),
164
174
  CredentialStatusValidator: /* @__PURE__ */ __name2(() => CredentialStatusValidator, "CredentialStatusValidator"),
@@ -180,6 +190,7 @@ var require_helpers_cjs_development = __commonJS({
180
190
  GetFullSkillTreeResultValidator: /* @__PURE__ */ __name2(() => GetFullSkillTreeResultValidator, "GetFullSkillTreeResultValidator"),
181
191
  GetSkillPathInputValidator: /* @__PURE__ */ __name2(() => GetSkillPathInputValidator, "GetSkillPathInputValidator"),
182
192
  GetSkillPathResultValidator: /* @__PURE__ */ __name2(() => GetSkillPathResultValidator, "GetSkillPathResultValidator"),
193
+ GetTemplateRecipientsEventValidator: /* @__PURE__ */ __name2(() => GetTemplateRecipientsEventValidator, "GetTemplateRecipientsEventValidator"),
183
194
  IdentifierEntryValidator: /* @__PURE__ */ __name2(() => IdentifierEntryValidator, "IdentifierEntryValidator"),
184
195
  IdentifierTypeValidator: /* @__PURE__ */ __name2(() => IdentifierTypeValidator, "IdentifierTypeValidator"),
185
196
  IdentityObjectValidator: /* @__PURE__ */ __name2(() => IdentityObjectValidator, "IdentityObjectValidator"),
@@ -196,9 +207,11 @@ var require_helpers_cjs_development = __commonJS({
196
207
  JWKValidator: /* @__PURE__ */ __name2(() => JWKValidator, "JWKValidator"),
197
208
  JWKWithPrivateKeyValidator: /* @__PURE__ */ __name2(() => JWKWithPrivateKeyValidator, "JWKWithPrivateKeyValidator"),
198
209
  KnownAchievementTypeValidator: /* @__PURE__ */ __name2(() => KnownAchievementTypeValidator, "KnownAchievementTypeValidator"),
210
+ LCNAuthedProfileValidator: /* @__PURE__ */ __name2(() => LCNAuthedProfileValidator, "LCNAuthedProfileValidator"),
199
211
  LCNBoostClaimLinkOptionsValidator: /* @__PURE__ */ __name2(() => LCNBoostClaimLinkOptionsValidator, "LCNBoostClaimLinkOptionsValidator"),
200
212
  LCNBoostClaimLinkSigningAuthorityValidator: /* @__PURE__ */ __name2(() => LCNBoostClaimLinkSigningAuthorityValidator, "LCNBoostClaimLinkSigningAuthorityValidator"),
201
213
  LCNBoostStatus: /* @__PURE__ */ __name2(() => LCNBoostStatus, "LCNBoostStatus"),
214
+ LCNConnectionProfileValidator: /* @__PURE__ */ __name2(() => LCNConnectionProfileValidator, "LCNConnectionProfileValidator"),
202
215
  LCNDomainOrOriginValidator: /* @__PURE__ */ __name2(() => LCNDomainOrOriginValidator, "LCNDomainOrOriginValidator"),
203
216
  LCNInboxContactMethodValidator: /* @__PURE__ */ __name2(() => LCNInboxContactMethodValidator, "LCNInboxContactMethodValidator"),
204
217
  LCNInboxStatusEnumValidator: /* @__PURE__ */ __name2(() => LCNInboxStatusEnumValidator, "LCNInboxStatusEnumValidator"),
@@ -218,8 +231,10 @@ var require_helpers_cjs_development = __commonJS({
218
231
  LCNProfileManagerValidator: /* @__PURE__ */ __name2(() => LCNProfileManagerValidator, "LCNProfileManagerValidator"),
219
232
  LCNProfileQueryValidator: /* @__PURE__ */ __name2(() => LCNProfileQueryValidator, "LCNProfileQueryValidator"),
220
233
  LCNProfileValidator: /* @__PURE__ */ __name2(() => LCNProfileValidator, "LCNProfileValidator"),
234
+ LCNPublicProfileValidator: /* @__PURE__ */ __name2(() => LCNPublicProfileValidator, "LCNPublicProfileValidator"),
221
235
  LCNSigningAuthorityForUserValidator: /* @__PURE__ */ __name2(() => LCNSigningAuthorityForUserValidator, "LCNSigningAuthorityForUserValidator"),
222
236
  LCNSigningAuthorityValidator: /* @__PURE__ */ __name2(() => LCNSigningAuthorityValidator, "LCNSigningAuthorityValidator"),
237
+ LCNVisibleProfileValidator: /* @__PURE__ */ __name2(() => LCNVisibleProfileValidator, "LCNVisibleProfileValidator"),
223
238
  LaunchTypeValidator: /* @__PURE__ */ __name2(() => LaunchTypeValidator, "LaunchTypeValidator"),
224
239
  LinkProviderFrameworkInputValidator: /* @__PURE__ */ __name2(() => LinkProviderFrameworkInputValidator, "LinkProviderFrameworkInputValidator"),
225
240
  PaginatedAppStoreListingsValidator: /* @__PURE__ */ __name2(() => PaginatedAppStoreListingsValidator, "PaginatedAppStoreListingsValidator"),
@@ -244,9 +259,11 @@ var require_helpers_cjs_development = __commonJS({
244
259
  PaginatedLCNProfilesValidator: /* @__PURE__ */ __name2(() => PaginatedLCNProfilesValidator, "PaginatedLCNProfilesValidator"),
245
260
  PaginatedSkillFrameworksValidator: /* @__PURE__ */ __name2(() => PaginatedSkillFrameworksValidator, "PaginatedSkillFrameworksValidator"),
246
261
  PaginatedSkillTreeValidator: /* @__PURE__ */ __name2(() => PaginatedSkillTreeValidator, "PaginatedSkillTreeValidator"),
262
+ PaginatedVisibleLCNProfilesValidator: /* @__PURE__ */ __name2(() => PaginatedVisibleLCNProfilesValidator, "PaginatedVisibleLCNProfilesValidator"),
247
263
  PaginationOptionsValidator: /* @__PURE__ */ __name2(() => PaginationOptionsValidator, "PaginationOptionsValidator"),
248
264
  PaginationResponseValidator: /* @__PURE__ */ __name2(() => PaginationResponseValidator, "PaginationResponseValidator"),
249
265
  ProfileValidator: /* @__PURE__ */ __name2(() => ProfileValidator, "ProfileValidator"),
266
+ ProfileVisibilityEnum: /* @__PURE__ */ __name2(() => ProfileVisibilityEnum, "ProfileVisibilityEnum"),
250
267
  PromotionLevelValidator: /* @__PURE__ */ __name2(() => PromotionLevelValidator, "PromotionLevelValidator"),
251
268
  ProofValidator: /* @__PURE__ */ __name2(() => ProofValidator, "ProofValidator"),
252
269
  RefreshServiceValidator: /* @__PURE__ */ __name2(() => RefreshServiceValidator, "RefreshServiceValidator"),
@@ -14569,6 +14586,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14569
14586
  idBackgroundColor: external_exports.string().optional(),
14570
14587
  repeatIdBackgroundImage: external_exports.boolean().optional()
14571
14588
  });
14589
+ var ProfileVisibilityEnum = external_exports.enum(["public", "connections_only", "private"]);
14590
+ var AllowConnectionRequestsEnum = external_exports.enum(["anyone", "invite_only"]);
14572
14591
  var LCNProfileValidator = external_exports.object({
14573
14592
  profileId: external_exports.string().min(3).max(40).describe("Unique, URL-safe identifier for the profile."),
14574
14593
  displayName: external_exports.string().default("").describe("Human-readable display name for the profile."),
@@ -14576,6 +14595,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14576
14595
  bio: external_exports.string().default("").describe("Longer bio for the profile."),
14577
14596
  did: external_exports.string().describe("Decentralized Identifier for the profile. (auto-assigned)"),
14578
14597
  isPrivate: external_exports.boolean().optional().describe("Whether the profile is private or not and shows up in search results."),
14598
+ profileVisibility: ProfileVisibilityEnum.default("public").optional().describe("Profile visibility: 'public', 'connections_only', or 'private'."),
14599
+ showEmail: external_exports.boolean().default(false).optional().describe("Whether to show email to connections."),
14600
+ allowConnectionRequests: AllowConnectionRequestsEnum.default("anyone").optional().describe("Who can send connection requests: 'anyone' or 'invite_only'."),
14579
14601
  email: external_exports.string().optional().describe("Contact email address for the profile. (deprecated)"),
14580
14602
  image: external_exports.string().optional().describe("Profile image URL for the profile."),
14581
14603
  heroImage: external_exports.string().optional().describe("Hero image URL for the profile."),
@@ -14590,6 +14612,32 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14590
14612
  country: external_exports.string().optional().describe("Country for the profile."),
14591
14613
  approved: external_exports.boolean().optional().describe("Approval status for the profile.")
14592
14614
  });
14615
+ var LCNPublicProfileValidator = LCNProfileValidator.pick({
14616
+ profileId: true,
14617
+ displayName: true,
14618
+ shortBio: true,
14619
+ image: true,
14620
+ heroImage: true,
14621
+ type: true,
14622
+ isServiceProfile: true,
14623
+ display: true
14624
+ });
14625
+ var LCNAuthedProfileValidator = LCNPublicProfileValidator.extend({
14626
+ bio: LCNProfileValidator.shape.bio,
14627
+ websiteLink: LCNProfileValidator.shape.websiteLink,
14628
+ role: LCNProfileValidator.shape.role,
14629
+ highlightedCredentials: LCNProfileValidator.shape.highlightedCredentials,
14630
+ did: LCNProfileValidator.shape.did
14631
+ });
14632
+ var LCNConnectionProfileValidator = LCNAuthedProfileValidator.extend({
14633
+ email: LCNProfileValidator.shape.email
14634
+ });
14635
+ var LCNVisibleProfileValidator = external_exports.union([
14636
+ LCNConnectionProfileValidator.strict(),
14637
+ LCNAuthedProfileValidator.strict(),
14638
+ LCNPublicProfileValidator.strict(),
14639
+ LCNProfileValidator
14640
+ ]);
14593
14641
  var LCNProfileQueryValidator = external_exports.object({
14594
14642
  profileId: StringQuery,
14595
14643
  displayName: StringQuery,
@@ -14603,6 +14651,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14603
14651
  var PaginatedLCNProfilesValidator = PaginationResponseValidator.extend({
14604
14652
  records: LCNProfileValidator.array()
14605
14653
  });
14654
+ var PaginatedVisibleLCNProfilesValidator = PaginationResponseValidator.extend({
14655
+ records: LCNVisibleProfileValidator.array()
14656
+ });
14606
14657
  var LCNProfileConnectionStatusEnum = external_exports.enum([
14607
14658
  "CONNECTED",
14608
14659
  "PENDING_REQUEST_SENT",
@@ -14736,7 +14787,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14736
14787
  records: BoostValidator.array()
14737
14788
  });
14738
14789
  var BoostRecipientValidator = external_exports.object({
14739
- to: LCNProfileValidator,
14790
+ to: LCNVisibleProfileValidator,
14740
14791
  from: external_exports.string(),
14741
14792
  received: external_exports.string().optional(),
14742
14793
  uri: external_exports.string().optional()
@@ -14745,7 +14796,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14745
14796
  records: BoostRecipientValidator.array()
14746
14797
  });
14747
14798
  var BoostRecipientWithChildrenValidator = external_exports.object({
14748
- to: LCNProfileValidator,
14799
+ to: LCNVisibleProfileValidator,
14749
14800
  from: external_exports.string(),
14750
14801
  received: external_exports.string().optional(),
14751
14802
  boostUris: external_exports.array(external_exports.string()),
@@ -14889,6 +14940,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14889
14940
  autoBoosts: external_exports.string().array().optional(),
14890
14941
  writers: external_exports.array(LCNProfileValidator).optional()
14891
14942
  });
14943
+ var ConsentFlowContractRequestStatusValidator = external_exports.enum(["pending", "accepted", "denied"]).nullable();
14944
+ var ConsentFlowContractRequestReadStatusValidator = external_exports.enum(["unseen", "seen"]).nullable();
14945
+ var ConsentFlowContractRequestForProfileValidator = external_exports.object({
14946
+ profile: LCNProfileValidator,
14947
+ status: ConsentFlowContractRequestStatusValidator,
14948
+ readStatus: ConsentFlowContractRequestReadStatusValidator.optional()
14949
+ });
14950
+ var ConsentFlowContractRequestForProfileListValidator = external_exports.array(
14951
+ ConsentFlowContractRequestForProfileValidator
14952
+ );
14892
14953
  var PaginatedConsentFlowContractsValidator = PaginationResponseValidator.extend({
14893
14954
  records: ConsentFlowContractDetailsValidator.omit({ owner: true }).array()
14894
14955
  });
@@ -15049,7 +15110,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15049
15110
  "PROFILE_PARENT_APPROVED",
15050
15111
  "APP_LISTING_SUBMITTED",
15051
15112
  "APP_LISTING_APPROVED",
15052
- "APP_LISTING_REJECTED"
15113
+ "APP_LISTING_REJECTED",
15114
+ "APP_LISTING_WITHDRAWN",
15115
+ "DEVICE_LINK_REQUEST"
15053
15116
  ]);
15054
15117
  var LCNNotificationMessageValidator = external_exports.object({
15055
15118
  title: external_exports.string().optional(),
@@ -15188,6 +15251,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15188
15251
  webhookUrl: external_exports.string().optional(),
15189
15252
  boostUri: external_exports.string().optional(),
15190
15253
  activityId: external_exports.string().optional(),
15254
+ integrationId: external_exports.string().optional(),
15191
15255
  signingAuthority: external_exports.object({
15192
15256
  endpoint: external_exports.string().optional(),
15193
15257
  name: external_exports.string().optional()
@@ -15289,8 +15353,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15289
15353
  claimUrl: external_exports.string().url().optional(),
15290
15354
  recipientDid: external_exports.string().optional()
15291
15355
  });
15356
+ var CredentialNameRefValidator = external_exports.object({ name: external_exports.string() }).passthrough();
15292
15357
  var ClaimInboxCredentialValidator = external_exports.object({
15293
- credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).describe("The credential to issue."),
15358
+ credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).or(CredentialNameRefValidator).describe("The credential to issue, or a { name } reference to resolve a boost template."),
15294
15359
  configuration: external_exports.object({
15295
15360
  publishableKey: external_exports.string(),
15296
15361
  signingAuthorityName: external_exports.string().optional(),
@@ -15574,6 +15639,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15574
15639
  "DEMOTED"
15575
15640
  ]);
15576
15641
  var AgeRatingValidator = external_exports.enum(["4+", "9+", "12+", "17+"]);
15642
+ var AppStoreListingSubmitterValidator = external_exports.object({
15643
+ profileId: external_exports.string(),
15644
+ displayName: external_exports.string(),
15645
+ email: external_exports.string().optional()
15646
+ });
15577
15647
  var AppStoreListingValidator = external_exports.object({
15578
15648
  listing_id: external_exports.string(),
15579
15649
  slug: external_exports.string().optional(),
@@ -15595,7 +15665,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15595
15665
  screenshots: external_exports.array(external_exports.string()).optional(),
15596
15666
  hero_background_color: external_exports.string().optional(),
15597
15667
  min_age: external_exports.number().int().min(0).max(18).optional(),
15598
- age_rating: AgeRatingValidator.optional()
15668
+ age_rating: AgeRatingValidator.optional(),
15669
+ submitted_at: external_exports.string().optional(),
15670
+ submitter: AppStoreListingSubmitterValidator.optional(),
15671
+ contact_email: external_exports.string().email().optional()
15599
15672
  });
15600
15673
  var AppStoreListingCreateValidator = AppStoreListingValidator.omit({
15601
15674
  listing_id: true,
@@ -15623,9 +15696,39 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15623
15696
  var SendCredentialEventValidator = external_exports.object({
15624
15697
  type: external_exports.literal("send-credential"),
15625
15698
  templateAlias: external_exports.string(),
15626
- templateData: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
15699
+ templateData: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
15700
+ preventDuplicateClaim: external_exports.boolean().optional()
15701
+ });
15702
+ var CheckCredentialEventValidator = external_exports.object({
15703
+ type: external_exports.literal("check-credential"),
15704
+ templateAlias: external_exports.string().optional(),
15705
+ boostUri: external_exports.string().optional()
15706
+ }).refine((input) => Boolean(input.templateAlias) !== Boolean(input.boostUri), {
15707
+ message: "Exactly one of templateAlias or boostUri is required"
15708
+ });
15709
+ var CheckIssuanceStatusEventValidator = external_exports.object({
15710
+ type: external_exports.literal("check-issuance-status"),
15711
+ templateAlias: external_exports.string().optional(),
15712
+ boostUri: external_exports.string().optional(),
15713
+ recipient: external_exports.string()
15714
+ }).refine((input) => Boolean(input.templateAlias) !== Boolean(input.boostUri), {
15715
+ message: "Exactly one of templateAlias or boostUri is required"
15627
15716
  });
15628
- var AppEventValidator = external_exports.discriminatedUnion("type", [SendCredentialEventValidator]);
15717
+ var GetTemplateRecipientsEventValidator = external_exports.object({
15718
+ type: external_exports.literal("get-template-recipients"),
15719
+ templateAlias: external_exports.string().optional(),
15720
+ boostUri: external_exports.string().optional(),
15721
+ limit: external_exports.number().optional(),
15722
+ cursor: external_exports.string().optional()
15723
+ }).refine((input) => Boolean(input.templateAlias) !== Boolean(input.boostUri), {
15724
+ message: "Exactly one of templateAlias or boostUri is required"
15725
+ });
15726
+ var AppEventValidator = external_exports.discriminatedUnion("type", [
15727
+ SendCredentialEventValidator,
15728
+ CheckCredentialEventValidator,
15729
+ CheckIssuanceStatusEventValidator,
15730
+ GetTemplateRecipientsEventValidator
15731
+ ]);
15629
15732
  var AppEventInputValidator = external_exports.object({
15630
15733
  listingId: external_exports.string(),
15631
15734
  event: AppEventValidator
@@ -15688,6 +15791,22 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15688
15791
  failed: external_exports.number(),
15689
15792
  claimRate: external_exports.number()
15690
15793
  });
15794
+ var AuthSessionError = class extends Error {
15795
+ static {
15796
+ __name(this, "AuthSessionError");
15797
+ }
15798
+ static {
15799
+ __name2(this, "AuthSessionError");
15800
+ }
15801
+ constructor(message, reason) {
15802
+ super(message);
15803
+ this.reason = reason;
15804
+ this.name = "AuthSessionError";
15805
+ }
15806
+ static {
15807
+ __name22(this, "AuthSessionError");
15808
+ }
15809
+ };
15691
15810
  }
15692
15811
  });
15693
15812
  var require_dist2 = __commonJS2({
@@ -15702,13 +15821,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15702
15821
  });
15703
15822
  var index_exports2 = {};
15704
15823
  __export2(index_exports2, {
15824
+ AGE_RATING_TO_MIN_AGE: /* @__PURE__ */ __name(() => AGE_RATING_TO_MIN_AGE, "AGE_RATING_TO_MIN_AGE"),
15705
15825
  DEFAULT_RESOLUTIONS: /* @__PURE__ */ __name(() => DEFAULT_RESOLUTIONS, "DEFAULT_RESOLUTIONS"),
15706
15826
  ImageResizingValidator: /* @__PURE__ */ __name(() => ImageResizingValidator, "ImageResizingValidator"),
15707
15827
  ImageUploadingValidator: /* @__PURE__ */ __name(() => ImageUploadingValidator, "ImageUploadingValidator"),
15708
15828
  ImageWithLoadingStateValdator: /* @__PURE__ */ __name(() => ImageWithLoadingStateValdator, "ImageWithLoadingStateValdator"),
15709
15829
  RegExpTransformer: /* @__PURE__ */ __name(() => RegExpTransformer2, "RegExpTransformer"),
15830
+ calculateAgeFromDob: /* @__PURE__ */ __name(() => calculateAgeFromDob, "calculateAgeFromDob"),
15710
15831
  capitalizeFirstLetter: /* @__PURE__ */ __name(() => capitalizeFirstLetter, "capitalizeFirstLetter"),
15711
15832
  changeQuality: /* @__PURE__ */ __name(() => changeQuality4, "changeQuality"),
15833
+ checkAppInstallEligibility: /* @__PURE__ */ __name(() => checkAppInstallEligibility, "checkAppInstallEligibility"),
15712
15834
  curriedArraySlice: /* @__PURE__ */ __name(() => curriedArraySlice, "curriedArraySlice"),
15713
15835
  curriedInnerImmerOuterImmer: /* @__PURE__ */ __name(() => curriedInnerImmerOuterImmer, "curriedInnerImmerOuterImmer"),
15714
15836
  curriedInnerImmerOuterReact: /* @__PURE__ */ __name(() => curriedInnerImmerOuterReact, "curriedInnerImmerOuterReact"),
@@ -16544,6 +16666,88 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16544
16666
  });
16545
16667
  var isNotUndefined = /* @__PURE__ */ __name2((value) => Boolean(value), "isNotUndefined");
16546
16668
  var filterUndefined = /* @__PURE__ */ __name2((arr) => arr.filter(isNotUndefined), "filterUndefined");
16669
+ var checkAppInstallEligibility = /* @__PURE__ */ __name2((input) => {
16670
+ const {
16671
+ isChildProfile,
16672
+ userAge,
16673
+ minAge,
16674
+ ageRating,
16675
+ hasContract,
16676
+ hasGuardianApproval = false
16677
+ } = input;
16678
+ const ageRatingMinAge = getAgeRatingMinAge(ageRating);
16679
+ const isHardBlocked = userAge !== null && minAge !== void 0 && minAge > 0 && userAge < minAge;
16680
+ if (isHardBlocked) {
16681
+ return {
16682
+ action: "hard_blocked",
16683
+ reason: `User does not meet the minimum age requirement of ${minAge}`
16684
+ };
16685
+ }
16686
+ if (isChildProfile) {
16687
+ const noAgeRating = ageRatingMinAge === 0;
16688
+ const childAgeUnknown = userAge === null;
16689
+ const childTooYoung = userAge !== null && userAge < ageRatingMinAge;
16690
+ if (childAgeUnknown) {
16691
+ if (hasGuardianApproval) {
16692
+ return { action: "proceed" };
16693
+ }
16694
+ return {
16695
+ action: "require_dob",
16696
+ reason: "Child profile age is unknown and must be verified by guardian"
16697
+ };
16698
+ }
16699
+ if (noAgeRating) {
16700
+ if (hasGuardianApproval) {
16701
+ return { action: "proceed" };
16702
+ }
16703
+ return {
16704
+ action: "require_guardian_approval",
16705
+ reason: "App has no age rating; guardian approval required for child profiles"
16706
+ };
16707
+ }
16708
+ if (childTooYoung) {
16709
+ if (hasGuardianApproval) {
16710
+ return { action: "proceed" };
16711
+ }
16712
+ return {
16713
+ action: "require_guardian_approval",
16714
+ reason: `Child is under the age rating of ${ageRatingMinAge}+; guardian approval required`
16715
+ };
16716
+ }
16717
+ if (hasContract) {
16718
+ if (hasGuardianApproval) {
16719
+ return { action: "proceed" };
16720
+ }
16721
+ return {
16722
+ action: "require_guardian_approval",
16723
+ reason: "App requires consent to a contract; guardian approval required for child profiles"
16724
+ };
16725
+ }
16726
+ }
16727
+ return { action: "proceed" };
16728
+ }, "checkAppInstallEligibility");
16729
+ var AGE_RATING_TO_MIN_AGE = {
16730
+ "4+": 4,
16731
+ "9+": 9,
16732
+ "12+": 12,
16733
+ "17+": 17
16734
+ };
16735
+ var getAgeRatingMinAge = /* @__PURE__ */ __name2((ageRating) => {
16736
+ if (!ageRating) return 0;
16737
+ return AGE_RATING_TO_MIN_AGE[ageRating] ?? 0;
16738
+ }, "getAgeRatingMinAge");
16739
+ var calculateAgeFromDob = /* @__PURE__ */ __name2((dob) => {
16740
+ if (!dob) return null;
16741
+ const birthDate = new Date(dob);
16742
+ if (isNaN(birthDate.getTime())) return null;
16743
+ const today = /* @__PURE__ */ new Date();
16744
+ let age = today.getFullYear() - birthDate.getFullYear();
16745
+ const monthDiff = today.getMonth() - birthDate.getMonth();
16746
+ if (monthDiff < 0 || monthDiff === 0 && today.getDate() < birthDate.getDate()) {
16747
+ age--;
16748
+ }
16749
+ return age;
16750
+ }, "calculateAgeFromDob");
16547
16751
  var isHex = /* @__PURE__ */ __name2((str) => /^[0-9a-f]+$/i.test(str), "isHex");
16548
16752
  var isEncrypted = /* @__PURE__ */ __name2((item) => {
16549
16753
  return import_types.JWEValidator.safeParse(item).success;
@@ -16654,7 +16858,7 @@ var callbackLink = /* @__PURE__ */ __name((callback) => {
16654
16858
  }, "callbackLink");
16655
16859
 
16656
16860
  // src/index.ts
16657
- var getClient = /* @__PURE__ */ __name(async (url, didAuthFunction) => {
16861
+ var getClient = /* @__PURE__ */ __name(async (url, didAuthFunction, guardianApprovalGetter) => {
16658
16862
  let challenges = [];
16659
16863
  const challengeRequester = (0, import_client.createTRPCClient)({
16660
16864
  links: [
@@ -16685,7 +16889,11 @@ var getClient = /* @__PURE__ */ __name(async (url, didAuthFunction) => {
16685
16889
  url,
16686
16890
  headers: /* @__PURE__ */ __name(async () => {
16687
16891
  if (challenges.length === 0) challenges.push(...await getChallenges());
16688
- return { Authorization: `Bearer ${await didAuthFunction(challenges.pop())}` };
16892
+ const guardianApproval = guardianApprovalGetter ? await guardianApprovalGetter() : void 0;
16893
+ return {
16894
+ Authorization: `Bearer ${await didAuthFunction(challenges.pop())}`,
16895
+ ...guardianApproval ? { "x-guardian-approval": guardianApproval } : {}
16896
+ };
16689
16897
  }, "headers"),
16690
16898
  transformer: {
16691
16899
  input: import_helpers.RegExpTransformer,
@@ -16696,14 +16904,20 @@ var getClient = /* @__PURE__ */ __name(async (url, didAuthFunction) => {
16696
16904
  });
16697
16905
  return trpc;
16698
16906
  }, "getClient");
16699
- var getApiTokenClient = /* @__PURE__ */ __name(async (url, apiToken) => {
16907
+ var getApiTokenClient = /* @__PURE__ */ __name(async (url, apiToken, guardianApprovalGetter) => {
16700
16908
  const trpc = (0, import_client.createTRPCClient)({
16701
16909
  links: [
16702
16910
  (0, import_client.httpBatchLink)({
16703
16911
  methodOverride: "POST",
16704
16912
  url,
16705
16913
  maxURLLength: 3072,
16706
- headers: { Authorization: `Bearer ${apiToken}` },
16914
+ headers: /* @__PURE__ */ __name(async () => {
16915
+ const guardianApproval = guardianApprovalGetter ? await guardianApprovalGetter() : void 0;
16916
+ return {
16917
+ Authorization: `Bearer ${apiToken}`,
16918
+ ...guardianApproval ? { "x-guardian-approval": guardianApproval } : {}
16919
+ };
16920
+ }, "headers"),
16707
16921
  transformer: {
16708
16922
  input: import_helpers.RegExpTransformer,
16709
16923
  output: { serialize: /* @__PURE__ */ __name((o) => o, "serialize"), deserialize: /* @__PURE__ */ __name((o) => o, "deserialize") }