@fanfare-io/fanfare-sdk-contracts 0.22.0 → 0.23.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/dist/beacon.d.ts CHANGED
@@ -2726,7 +2726,7 @@ export declare const WaitlistLeftEventSchema: v.SchemaWithPipe<readonly [v.Objec
2726
2726
  experienceId?: string | undefined;
2727
2727
  sequenceId?: string | undefined;
2728
2728
  }, "validation.beacon.sequenceRequiresExperience">]>;
2729
- export declare const BeaconEventSchema: v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
2729
+ export declare const BeaconEventSchema: v.VariantSchema<"eventName", [v.SchemaWithPipe<readonly [v.ObjectSchema<{
2730
2730
  readonly eventName: v.LiteralSchema<"pageView", undefined>;
2731
2731
  readonly eventProperties: v.OptionalSchema<v.StrictObjectSchema<{
2732
2732
  readonly pageType: v.OptionalSchema<v.PicklistSchema<readonly ["hosted", "embed"], undefined>, undefined>;
package/dist/beacon.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as e from "valibot";
2
- import { RFM_SEGMENT_KEYS as g, BeaconEventNames as v, BeaconEventName as N } from "./beacon-names.js";
2
+ import { RFM_SEGMENT_KEYS as v, BeaconEventNames as g, BeaconEventName as N } from "./beacon-names.js";
3
3
  import { GrantProducingMechanisms as C, SequenceOutcomeTypes as P, DistributionTypes as d } from "./consumer-me.js";
4
- const o = N, I = 50, O = 64, R = 2048, u = 256, b = 50, A = /^\d{1,12}(\.\d{1,8})?$/, L = e.picklist(g), i = e.pipe(
4
+ const o = N, I = 50, O = 64, R = 2048, u = 256, b = 50, A = /^\d{1,12}(\.\d{1,8})?$/, L = e.picklist(v), i = e.pipe(
5
5
  e.string(),
6
6
  e.maxLength(R, "validation.beacon.string.maxLength")
7
7
  ), t = e.pipe(
@@ -41,7 +41,7 @@ const o = N, I = 50, O = 64, R = 2048, u = 256, b = 50, A = /^\d{1,12}(\.\d{1,8}
41
41
  // consumer is a guest and is scoped out of activity/RFM/segmentation analytics.
42
42
  isGuest: e.optional(e.boolean()),
43
43
  eventId: t,
44
- eventName: e.picklist(v),
44
+ eventName: e.picklist(g),
45
45
  eventTimestamp: l,
46
46
  eventTimestampNs: e.optional(m),
47
47
  receivedTimestamp: e.optional(l),
@@ -237,10 +237,10 @@ const o = N, I = 50, O = 64, R = 2048, u = 256, b = 50, A = /^\d{1,12}(\.\d{1,8}
237
237
  ), Te = n(o.SEQUENCE_ENDED, z), _e = n(
238
238
  o.DISTRIBUTION_ENTERED,
239
239
  $
240
- ), ge = n(
240
+ ), ve = n(
241
241
  o.WAITLIST_ENTERED,
242
242
  J
243
- ), ve = n(o.WAITLIST_LEFT, Z), Ne = e.union([
243
+ ), ge = n(o.WAITLIST_LEFT, Z), Ne = e.variant("eventName", [
244
244
  ee,
245
245
  te,
246
246
  oe,
@@ -260,8 +260,8 @@ const o = N, I = 50, O = 64, R = 2048, u = 256, b = 50, A = /^\d{1,12}(\.\d{1,8}
260
260
  he,
261
261
  Te,
262
262
  _e,
263
- ge,
264
- ve
263
+ ve,
264
+ ge
265
265
  ]);
266
266
  function Ie(s) {
267
267
  return e.parse(Ne, JSON.parse(s));
@@ -281,7 +281,7 @@ export {
281
281
  i as BeaconEventLongStringSchema,
282
282
  r as BeaconEventMoneyStringSchema,
283
283
  o as BeaconEventName,
284
- v as BeaconEventNames,
284
+ g as BeaconEventNames,
285
285
  m as BeaconEventNanosecondsStringSchema,
286
286
  c as BeaconEventNumberSchema,
287
287
  D as BeaconEventPropertiesSchema,
@@ -318,7 +318,7 @@ export {
318
318
  q as PurchasePropertiesSchema,
319
319
  Ee as QRScannedEventSchema,
320
320
  X as QRScannedPropertiesSchema,
321
- g as RFM_SEGMENT_KEYS,
321
+ v as RFM_SEGMENT_KEYS,
322
322
  ie as RemoveFromCartEventSchema,
323
323
  k as RemoveFromCartPropertiesSchema,
324
324
  L as RfmSegmentKeySchema,
@@ -330,9 +330,9 @@ export {
330
330
  Y as SequenceGrantedPropertiesSchema,
331
331
  ce as ViewCartEventSchema,
332
332
  U as ViewCartPropertiesSchema,
333
- ge as WaitlistEnteredEventSchema,
333
+ ve as WaitlistEnteredEventSchema,
334
334
  J as WaitlistEnteredPropertiesSchema,
335
- ve as WaitlistLeftEventSchema,
335
+ ge as WaitlistLeftEventSchema,
336
336
  Z as WaitlistLeftPropertiesSchema,
337
337
  Ie as deserializeBeaconEvent
338
338
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fanfare-io/fanfare-sdk-contracts",
3
- "version": "0.22.0",
3
+ "version": "0.23.0",
4
4
  "description": "Public Fanfare schemas, types, and contract helpers shared by SDKs and internal services",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {