@learncard/network-plugin 2.2.1 → 2.2.3

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.
@@ -1264,6 +1264,7 @@ var require_helpers_cjs_development = __commonJS({
1264
1264
  LCNNotificationTypeEnumValidator: () => LCNNotificationTypeEnumValidator2,
1265
1265
  LCNNotificationValidator: () => LCNNotificationValidator2,
1266
1266
  LCNProfileConnectionStatusEnum: () => LCNProfileConnectionStatusEnum2,
1267
+ LCNProfileDisplayValidator: () => LCNProfileDisplayValidator2,
1267
1268
  LCNProfileQueryValidator: () => LCNProfileQueryValidator2,
1268
1269
  LCNProfileValidator: () => LCNProfileValidator2,
1269
1270
  LCNSigningAuthorityForUserValidator: () => LCNSigningAuthorityForUserValidator2,
@@ -5099,6 +5100,19 @@ var require_helpers_cjs_development = __commonJS({
5099
5100
  })
5100
5101
  );
5101
5102
  var StringQuery2 = mod2.string().or(mod2.object({ $in: mod2.string().array() })).or(mod2.object({ $regex: RegExpValidator2 }));
5103
+ var LCNProfileDisplayValidator2 = mod2.object({
5104
+ backgroundColor: mod2.string().optional(),
5105
+ backgroundImage: mod2.string().optional(),
5106
+ fadeBackgroundImage: mod2.boolean().optional(),
5107
+ repeatBackgroundImage: mod2.boolean().optional(),
5108
+ fontColor: mod2.string().optional(),
5109
+ accentColor: mod2.string().optional(),
5110
+ accentFontColor: mod2.string().optional(),
5111
+ idBackgroundImage: mod2.string().optional(),
5112
+ fadeIdBackgroundImage: mod2.boolean().optional(),
5113
+ idBackgroundColor: mod2.string().optional(),
5114
+ repeatIdBackgroundImage: mod2.boolean().optional()
5115
+ });
5102
5116
  var LCNProfileValidator2 = mod2.object({
5103
5117
  profileId: mod2.string().min(3).max(40),
5104
5118
  displayName: mod2.string().default(""),
@@ -5111,7 +5125,8 @@ var require_helpers_cjs_development = __commonJS({
5111
5125
  websiteLink: mod2.string().optional(),
5112
5126
  isServiceProfile: mod2.boolean().default(false).optional(),
5113
5127
  type: mod2.string().optional(),
5114
- notificationsWebhook: mod2.string().url().startsWith("http").optional()
5128
+ notificationsWebhook: mod2.string().url().startsWith("http").optional(),
5129
+ display: LCNProfileDisplayValidator2.optional()
5115
5130
  });
5116
5131
  var LCNProfileQueryValidator2 = mod2.object({
5117
5132
  profileId: StringQuery2,
@@ -9259,6 +9274,19 @@ var RegExpValidator = mod.instanceof(RegExp).or(
9259
9274
  })
9260
9275
  );
9261
9276
  var StringQuery = mod.string().or(mod.object({ $in: mod.string().array() })).or(mod.object({ $regex: RegExpValidator }));
9277
+ var LCNProfileDisplayValidator = mod.object({
9278
+ backgroundColor: mod.string().optional(),
9279
+ backgroundImage: mod.string().optional(),
9280
+ fadeBackgroundImage: mod.boolean().optional(),
9281
+ repeatBackgroundImage: mod.boolean().optional(),
9282
+ fontColor: mod.string().optional(),
9283
+ accentColor: mod.string().optional(),
9284
+ accentFontColor: mod.string().optional(),
9285
+ idBackgroundImage: mod.string().optional(),
9286
+ fadeIdBackgroundImage: mod.boolean().optional(),
9287
+ idBackgroundColor: mod.string().optional(),
9288
+ repeatIdBackgroundImage: mod.boolean().optional()
9289
+ });
9262
9290
  var LCNProfileValidator = mod.object({
9263
9291
  profileId: mod.string().min(3).max(40),
9264
9292
  displayName: mod.string().default(""),
@@ -9271,7 +9299,8 @@ var LCNProfileValidator = mod.object({
9271
9299
  websiteLink: mod.string().optional(),
9272
9300
  isServiceProfile: mod.boolean().default(false).optional(),
9273
9301
  type: mod.string().optional(),
9274
- notificationsWebhook: mod.string().url().startsWith("http").optional()
9302
+ notificationsWebhook: mod.string().url().startsWith("http").optional(),
9303
+ display: LCNProfileDisplayValidator.optional()
9275
9304
  });
9276
9305
  var LCNProfileQueryValidator = mod.object({
9277
9306
  profileId: StringQuery,
@@ -9934,7 +9963,7 @@ var getLearnCardNetworkPlugin = /* @__PURE__ */ __name(async (learnCard, url) =>
9934
9963
  throw new Error("Please make an account first!");
9935
9964
  return client.boost.updateBoost.mutate({
9936
9965
  uri,
9937
- updates: { credential, ...updates }
9966
+ updates: { ...credential && { credential }, ...updates }
9938
9967
  });
9939
9968
  },
9940
9969
  getBoostAdmins: async (_learnCard, uri, options = {}) => {