@sixb/server 0.1.5 → 0.1.6

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/dist/index.js CHANGED
@@ -9489,7 +9489,11 @@ var AuthInvitationSchema = z29.object({
9489
9489
  revokedAt: z29.string().optional()
9490
9490
  });
9491
9491
  var AuthInvitationDeliverySchema = z29.object({
9492
- status: z29.enum(["sent", "skipped", "rate_limited", "not_supported"])
9492
+ status: z29.enum(["sent", "skipped", "rate_limited", "not_supported"]),
9493
+ link: z29.object({
9494
+ url: z29.string().url(),
9495
+ expiresAt: z29.string().optional()
9496
+ }).optional()
9493
9497
  });
9494
9498
  var AuthInvitationGroupOptionSchema = AuthGroupOptionSchema;
9495
9499
  var AuthAccessTokenKindSchema = z29.enum(["personal", "serviceAccount"]);
@@ -9660,7 +9664,8 @@ var CreateAuthInvitationBodySchema = z29.object({
9660
9664
  groupIds: z29.array(z29.string().min(1)).optional(),
9661
9665
  destinationId: z29.enum(["atlas", "app"]).optional(),
9662
9666
  expiresAt: z29.string().optional(),
9663
- returnTo: z29.string().optional()
9667
+ returnTo: z29.string().optional(),
9668
+ revealLink: z29.boolean().optional()
9664
9669
  });
9665
9670
  var CreateAuthInvitationResponseSchema = z29.object({
9666
9671
  invitation: AuthInvitationSchema,
@@ -10270,7 +10275,8 @@ function registerAuthRoutes(app, host, options) {
10270
10275
  email: parsed.email,
10271
10276
  groupIds: parsed.groupIds,
10272
10277
  expiresAt: parseDate(parsed.expiresAt),
10273
- returnTo: deliveryContext.returnTo
10278
+ returnTo: deliveryContext.returnTo,
10279
+ revealLink: parsed.revealLink
10274
10280
  }, {
10275
10281
  ...authOptions,
10276
10282
  delivery: {
@@ -10281,7 +10287,7 @@ function registerAuthRoutes(app, host, options) {
10281
10287
  });
10282
10288
  return jsonResponse2({
10283
10289
  invitation: serializeInvitation(result.invitation),
10284
- delivery: result.delivery
10290
+ delivery: serializeInvitationDelivery(result.delivery)
10285
10291
  }, 201);
10286
10292
  } catch (error) {
10287
10293
  return authRouteErrorResponse(error);
@@ -11247,6 +11253,17 @@ function serializeInvitation(invitation) {
11247
11253
  revokedAt: invitation.revokedAt ? toIsoString(invitation.revokedAt) : undefined
11248
11254
  };
11249
11255
  }
11256
+ function serializeInvitationDelivery(delivery) {
11257
+ return {
11258
+ status: delivery.status,
11259
+ ...delivery.link ? {
11260
+ link: {
11261
+ url: delivery.link.url,
11262
+ expiresAt: delivery.link.expiresAt ? toIsoString(delivery.link.expiresAt) : undefined
11263
+ }
11264
+ } : {}
11265
+ };
11266
+ }
11250
11267
  function serializeMemberSummary(member) {
11251
11268
  return {
11252
11269
  ...serializeManagedMember(member.user, member.groupIds),
@@ -12886,4 +12903,4 @@ export {
12886
12903
  SixbServer
12887
12904
  };
12888
12905
 
12889
- //# debugId=D4859E1909D00F4164756E2164756E21
12906
+ //# debugId=07F881CA7D25E16A64756E2164756E21