@nfcard/validation 0.6.0 → 0.8.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/index.d.ts CHANGED
@@ -32,6 +32,34 @@ declare const socialLinksSchema: z.ZodObject<{
32
32
  customUrl?: string | undefined;
33
33
  customUrlLabel?: string | undefined;
34
34
  }>;
35
+ declare const socialOverridesSchema: z.ZodObject<{
36
+ facebook: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
37
+ linkedin: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
38
+ instagram: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
39
+ x: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
40
+ youtube: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
41
+ tiktok: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
42
+ customUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
43
+ customUrlLabel: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
44
+ }, "strip", z.ZodTypeAny, {
45
+ facebook?: string | undefined;
46
+ linkedin?: string | undefined;
47
+ instagram?: string | undefined;
48
+ x?: string | undefined;
49
+ youtube?: string | undefined;
50
+ tiktok?: string | undefined;
51
+ customUrl?: string | undefined;
52
+ customUrlLabel?: string | undefined;
53
+ }, {
54
+ facebook?: string | undefined;
55
+ linkedin?: string | undefined;
56
+ instagram?: string | undefined;
57
+ x?: string | undefined;
58
+ youtube?: string | undefined;
59
+ tiktok?: string | undefined;
60
+ customUrl?: string | undefined;
61
+ customUrlLabel?: string | undefined;
62
+ }>;
35
63
  declare const userDataSchema: z.ZodObject<{
36
64
  firstName: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
37
65
  lastName: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
@@ -1439,6 +1467,33 @@ declare const digitalVisibilitySchema: z.ZodObject<{
1439
1467
  showBio?: boolean | undefined;
1440
1468
  showSocialLinks?: boolean | undefined;
1441
1469
  }>;
1470
+ declare const MAX_CTA_BUTTONS = 5;
1471
+ declare const ctaButtonSchema: z.ZodObject<{
1472
+ label: z.ZodEffects<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>, string, string | undefined>;
1473
+ url: z.ZodEffects<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>, string, string | undefined>;
1474
+ }, "strip", z.ZodTypeAny, {
1475
+ url: string;
1476
+ label: string;
1477
+ }, {
1478
+ url?: string | undefined;
1479
+ label?: string | undefined;
1480
+ }>;
1481
+ declare const ctaButtonsSchema: z.ZodEffects<z.ZodArray<z.ZodObject<{
1482
+ label: z.ZodEffects<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>, string, string | undefined>;
1483
+ url: z.ZodEffects<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>, string, string | undefined>;
1484
+ }, "strip", z.ZodTypeAny, {
1485
+ url: string;
1486
+ label: string;
1487
+ }, {
1488
+ url?: string | undefined;
1489
+ label?: string | undefined;
1490
+ }>, "many">, {
1491
+ url: string;
1492
+ label: string;
1493
+ }[], {
1494
+ url?: string | undefined;
1495
+ label?: string | undefined;
1496
+ }[]>;
1442
1497
  declare const digitalConfigSchema: z.ZodObject<{
1443
1498
  templateId: z.ZodEnum<["minimal", "bold", "card", "aurora"]>;
1444
1499
  accentColor: z.ZodString;
@@ -1483,17 +1538,19 @@ declare const digitalConfigSchema: z.ZodObject<{
1483
1538
  showSocialLinks?: boolean | undefined;
1484
1539
  }>>;
1485
1540
  socialOverrides: z.ZodOptional<z.ZodObject<{
1486
- facebook: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
1487
- linkedin: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
1488
- instagram: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
1489
- youtube: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
1490
- tiktok: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
1491
- customUrl: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
1492
- customUrlLabel: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
1541
+ facebook: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1542
+ linkedin: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1543
+ instagram: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1544
+ x: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1545
+ youtube: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1546
+ tiktok: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1547
+ customUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1548
+ customUrlLabel: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1493
1549
  }, "strip", z.ZodTypeAny, {
1494
1550
  facebook?: string | undefined;
1495
1551
  linkedin?: string | undefined;
1496
1552
  instagram?: string | undefined;
1553
+ x?: string | undefined;
1497
1554
  youtube?: string | undefined;
1498
1555
  tiktok?: string | undefined;
1499
1556
  customUrl?: string | undefined;
@@ -1502,11 +1559,28 @@ declare const digitalConfigSchema: z.ZodObject<{
1502
1559
  facebook?: string | undefined;
1503
1560
  linkedin?: string | undefined;
1504
1561
  instagram?: string | undefined;
1562
+ x?: string | undefined;
1505
1563
  youtube?: string | undefined;
1506
1564
  tiktok?: string | undefined;
1507
1565
  customUrl?: string | undefined;
1508
1566
  customUrlLabel?: string | undefined;
1509
1567
  }>>;
1568
+ ctaButtons: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
1569
+ label: z.ZodEffects<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>, string, string | undefined>;
1570
+ url: z.ZodEffects<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>, string, string | undefined>;
1571
+ }, "strip", z.ZodTypeAny, {
1572
+ url: string;
1573
+ label: string;
1574
+ }, {
1575
+ url?: string | undefined;
1576
+ label?: string | undefined;
1577
+ }>, "many">, {
1578
+ url: string;
1579
+ label: string;
1580
+ }[], {
1581
+ url?: string | undefined;
1582
+ label?: string | undefined;
1583
+ }[]>>;
1510
1584
  }, "strip", z.ZodTypeAny, {
1511
1585
  templateId: "minimal" | "bold" | "card" | "aurora";
1512
1586
  accentColor: string;
@@ -1532,11 +1606,16 @@ declare const digitalConfigSchema: z.ZodObject<{
1532
1606
  facebook?: string | undefined;
1533
1607
  linkedin?: string | undefined;
1534
1608
  instagram?: string | undefined;
1609
+ x?: string | undefined;
1535
1610
  youtube?: string | undefined;
1536
1611
  tiktok?: string | undefined;
1537
1612
  customUrl?: string | undefined;
1538
1613
  customUrlLabel?: string | undefined;
1539
1614
  } | undefined;
1615
+ ctaButtons?: {
1616
+ url: string;
1617
+ label: string;
1618
+ }[] | undefined;
1540
1619
  }, {
1541
1620
  templateId: "minimal" | "bold" | "card" | "aurora";
1542
1621
  accentColor: string;
@@ -1562,11 +1641,16 @@ declare const digitalConfigSchema: z.ZodObject<{
1562
1641
  facebook?: string | undefined;
1563
1642
  linkedin?: string | undefined;
1564
1643
  instagram?: string | undefined;
1644
+ x?: string | undefined;
1565
1645
  youtube?: string | undefined;
1566
1646
  tiktok?: string | undefined;
1567
1647
  customUrl?: string | undefined;
1568
1648
  customUrlLabel?: string | undefined;
1569
1649
  } | undefined;
1650
+ ctaButtons?: {
1651
+ url?: string | undefined;
1652
+ label?: string | undefined;
1653
+ }[] | undefined;
1570
1654
  }>;
1571
1655
  declare const configurationCreateSchema: z.ZodObject<{
1572
1656
  sessionId: z.ZodString;
@@ -2618,17 +2702,19 @@ declare const configurationCreateSchema: z.ZodObject<{
2618
2702
  showSocialLinks?: boolean | undefined;
2619
2703
  }>>;
2620
2704
  socialOverrides: z.ZodOptional<z.ZodObject<{
2621
- facebook: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
2622
- linkedin: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
2623
- instagram: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
2624
- youtube: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
2625
- tiktok: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
2626
- customUrl: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
2627
- customUrlLabel: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
2705
+ facebook: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2706
+ linkedin: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2707
+ instagram: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2708
+ x: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2709
+ youtube: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2710
+ tiktok: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2711
+ customUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2712
+ customUrlLabel: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2628
2713
  }, "strip", z.ZodTypeAny, {
2629
2714
  facebook?: string | undefined;
2630
2715
  linkedin?: string | undefined;
2631
2716
  instagram?: string | undefined;
2717
+ x?: string | undefined;
2632
2718
  youtube?: string | undefined;
2633
2719
  tiktok?: string | undefined;
2634
2720
  customUrl?: string | undefined;
@@ -2637,11 +2723,28 @@ declare const configurationCreateSchema: z.ZodObject<{
2637
2723
  facebook?: string | undefined;
2638
2724
  linkedin?: string | undefined;
2639
2725
  instagram?: string | undefined;
2726
+ x?: string | undefined;
2640
2727
  youtube?: string | undefined;
2641
2728
  tiktok?: string | undefined;
2642
2729
  customUrl?: string | undefined;
2643
2730
  customUrlLabel?: string | undefined;
2644
2731
  }>>;
2732
+ ctaButtons: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
2733
+ label: z.ZodEffects<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>, string, string | undefined>;
2734
+ url: z.ZodEffects<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>, string, string | undefined>;
2735
+ }, "strip", z.ZodTypeAny, {
2736
+ url: string;
2737
+ label: string;
2738
+ }, {
2739
+ url?: string | undefined;
2740
+ label?: string | undefined;
2741
+ }>, "many">, {
2742
+ url: string;
2743
+ label: string;
2744
+ }[], {
2745
+ url?: string | undefined;
2746
+ label?: string | undefined;
2747
+ }[]>>;
2645
2748
  }, "strip", z.ZodTypeAny, {
2646
2749
  templateId: "minimal" | "bold" | "card" | "aurora";
2647
2750
  accentColor: string;
@@ -2667,11 +2770,16 @@ declare const configurationCreateSchema: z.ZodObject<{
2667
2770
  facebook?: string | undefined;
2668
2771
  linkedin?: string | undefined;
2669
2772
  instagram?: string | undefined;
2773
+ x?: string | undefined;
2670
2774
  youtube?: string | undefined;
2671
2775
  tiktok?: string | undefined;
2672
2776
  customUrl?: string | undefined;
2673
2777
  customUrlLabel?: string | undefined;
2674
2778
  } | undefined;
2779
+ ctaButtons?: {
2780
+ url: string;
2781
+ label: string;
2782
+ }[] | undefined;
2675
2783
  }, {
2676
2784
  templateId: "minimal" | "bold" | "card" | "aurora";
2677
2785
  accentColor: string;
@@ -2697,11 +2805,16 @@ declare const configurationCreateSchema: z.ZodObject<{
2697
2805
  facebook?: string | undefined;
2698
2806
  linkedin?: string | undefined;
2699
2807
  instagram?: string | undefined;
2808
+ x?: string | undefined;
2700
2809
  youtube?: string | undefined;
2701
2810
  tiktok?: string | undefined;
2702
2811
  customUrl?: string | undefined;
2703
2812
  customUrlLabel?: string | undefined;
2704
2813
  } | undefined;
2814
+ ctaButtons?: {
2815
+ url?: string | undefined;
2816
+ label?: string | undefined;
2817
+ }[] | undefined;
2705
2818
  }>;
2706
2819
  quantity: z.ZodDefault<z.ZodNumber>;
2707
2820
  existingProfileId: z.ZodOptional<z.ZodString>;
@@ -2851,11 +2964,16 @@ declare const configurationCreateSchema: z.ZodObject<{
2851
2964
  facebook?: string | undefined;
2852
2965
  linkedin?: string | undefined;
2853
2966
  instagram?: string | undefined;
2967
+ x?: string | undefined;
2854
2968
  youtube?: string | undefined;
2855
2969
  tiktok?: string | undefined;
2856
2970
  customUrl?: string | undefined;
2857
2971
  customUrlLabel?: string | undefined;
2858
2972
  } | undefined;
2973
+ ctaButtons?: {
2974
+ url: string;
2975
+ label: string;
2976
+ }[] | undefined;
2859
2977
  };
2860
2978
  quantity: number;
2861
2979
  existingProfileId?: string | undefined;
@@ -3005,11 +3123,16 @@ declare const configurationCreateSchema: z.ZodObject<{
3005
3123
  facebook?: string | undefined;
3006
3124
  linkedin?: string | undefined;
3007
3125
  instagram?: string | undefined;
3126
+ x?: string | undefined;
3008
3127
  youtube?: string | undefined;
3009
3128
  tiktok?: string | undefined;
3010
3129
  customUrl?: string | undefined;
3011
3130
  customUrlLabel?: string | undefined;
3012
3131
  } | undefined;
3132
+ ctaButtons?: {
3133
+ url?: string | undefined;
3134
+ label?: string | undefined;
3135
+ }[] | undefined;
3013
3136
  };
3014
3137
  quantity?: number | undefined;
3015
3138
  existingProfileId?: string | undefined;
@@ -4064,17 +4187,19 @@ declare const configurationUpdateSchema: z.ZodObject<{
4064
4187
  showSocialLinks?: boolean | undefined;
4065
4188
  }>>;
4066
4189
  socialOverrides: z.ZodOptional<z.ZodObject<{
4067
- facebook: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
4068
- linkedin: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
4069
- instagram: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
4070
- youtube: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
4071
- tiktok: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
4072
- customUrl: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
4073
- customUrlLabel: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
4190
+ facebook: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
4191
+ linkedin: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
4192
+ instagram: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
4193
+ x: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
4194
+ youtube: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
4195
+ tiktok: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
4196
+ customUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
4197
+ customUrlLabel: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
4074
4198
  }, "strip", z.ZodTypeAny, {
4075
4199
  facebook?: string | undefined;
4076
4200
  linkedin?: string | undefined;
4077
4201
  instagram?: string | undefined;
4202
+ x?: string | undefined;
4078
4203
  youtube?: string | undefined;
4079
4204
  tiktok?: string | undefined;
4080
4205
  customUrl?: string | undefined;
@@ -4083,11 +4208,28 @@ declare const configurationUpdateSchema: z.ZodObject<{
4083
4208
  facebook?: string | undefined;
4084
4209
  linkedin?: string | undefined;
4085
4210
  instagram?: string | undefined;
4211
+ x?: string | undefined;
4086
4212
  youtube?: string | undefined;
4087
4213
  tiktok?: string | undefined;
4088
4214
  customUrl?: string | undefined;
4089
4215
  customUrlLabel?: string | undefined;
4090
4216
  }>>;
4217
+ ctaButtons: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
4218
+ label: z.ZodEffects<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>, string, string | undefined>;
4219
+ url: z.ZodEffects<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>, string, string | undefined>;
4220
+ }, "strip", z.ZodTypeAny, {
4221
+ url: string;
4222
+ label: string;
4223
+ }, {
4224
+ url?: string | undefined;
4225
+ label?: string | undefined;
4226
+ }>, "many">, {
4227
+ url: string;
4228
+ label: string;
4229
+ }[], {
4230
+ url?: string | undefined;
4231
+ label?: string | undefined;
4232
+ }[]>>;
4091
4233
  }, "strip", z.ZodTypeAny, {
4092
4234
  templateId: "minimal" | "bold" | "card" | "aurora";
4093
4235
  accentColor: string;
@@ -4113,11 +4255,16 @@ declare const configurationUpdateSchema: z.ZodObject<{
4113
4255
  facebook?: string | undefined;
4114
4256
  linkedin?: string | undefined;
4115
4257
  instagram?: string | undefined;
4258
+ x?: string | undefined;
4116
4259
  youtube?: string | undefined;
4117
4260
  tiktok?: string | undefined;
4118
4261
  customUrl?: string | undefined;
4119
4262
  customUrlLabel?: string | undefined;
4120
4263
  } | undefined;
4264
+ ctaButtons?: {
4265
+ url: string;
4266
+ label: string;
4267
+ }[] | undefined;
4121
4268
  }, {
4122
4269
  templateId: "minimal" | "bold" | "card" | "aurora";
4123
4270
  accentColor: string;
@@ -4143,11 +4290,16 @@ declare const configurationUpdateSchema: z.ZodObject<{
4143
4290
  facebook?: string | undefined;
4144
4291
  linkedin?: string | undefined;
4145
4292
  instagram?: string | undefined;
4293
+ x?: string | undefined;
4146
4294
  youtube?: string | undefined;
4147
4295
  tiktok?: string | undefined;
4148
4296
  customUrl?: string | undefined;
4149
4297
  customUrlLabel?: string | undefined;
4150
4298
  } | undefined;
4299
+ ctaButtons?: {
4300
+ url?: string | undefined;
4301
+ label?: string | undefined;
4302
+ }[] | undefined;
4151
4303
  }>>;
4152
4304
  quantity: z.ZodOptional<z.ZodNumber>;
4153
4305
  existingProfileId: z.ZodOptional<z.ZodString>;
@@ -4296,11 +4448,16 @@ declare const configurationUpdateSchema: z.ZodObject<{
4296
4448
  facebook?: string | undefined;
4297
4449
  linkedin?: string | undefined;
4298
4450
  instagram?: string | undefined;
4451
+ x?: string | undefined;
4299
4452
  youtube?: string | undefined;
4300
4453
  tiktok?: string | undefined;
4301
4454
  customUrl?: string | undefined;
4302
4455
  customUrlLabel?: string | undefined;
4303
4456
  } | undefined;
4457
+ ctaButtons?: {
4458
+ url: string;
4459
+ label: string;
4460
+ }[] | undefined;
4304
4461
  } | undefined;
4305
4462
  quantity?: number | undefined;
4306
4463
  existingProfileId?: string | undefined;
@@ -4449,11 +4606,16 @@ declare const configurationUpdateSchema: z.ZodObject<{
4449
4606
  facebook?: string | undefined;
4450
4607
  linkedin?: string | undefined;
4451
4608
  instagram?: string | undefined;
4609
+ x?: string | undefined;
4452
4610
  youtube?: string | undefined;
4453
4611
  tiktok?: string | undefined;
4454
4612
  customUrl?: string | undefined;
4455
4613
  customUrlLabel?: string | undefined;
4456
4614
  } | undefined;
4615
+ ctaButtons?: {
4616
+ url?: string | undefined;
4617
+ label?: string | undefined;
4618
+ }[] | undefined;
4457
4619
  } | undefined;
4458
4620
  quantity?: number | undefined;
4459
4621
  existingProfileId?: string | undefined;
@@ -4517,17 +4679,19 @@ declare const cardUpdateSchema: z.ZodObject<{
4517
4679
  showSocialLinks?: boolean | undefined;
4518
4680
  }>>>>;
4519
4681
  socialOverrides: z.ZodOptional<z.ZodOptional<z.ZodOptional<z.ZodObject<{
4520
- facebook: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
4521
- linkedin: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
4522
- instagram: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
4523
- youtube: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
4524
- tiktok: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
4525
- customUrl: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
4526
- customUrlLabel: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
4682
+ facebook: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
4683
+ linkedin: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
4684
+ instagram: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
4685
+ x: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
4686
+ youtube: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
4687
+ tiktok: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
4688
+ customUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
4689
+ customUrlLabel: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
4527
4690
  }, "strip", z.ZodTypeAny, {
4528
4691
  facebook?: string | undefined;
4529
4692
  linkedin?: string | undefined;
4530
4693
  instagram?: string | undefined;
4694
+ x?: string | undefined;
4531
4695
  youtube?: string | undefined;
4532
4696
  tiktok?: string | undefined;
4533
4697
  customUrl?: string | undefined;
@@ -4536,11 +4700,28 @@ declare const cardUpdateSchema: z.ZodObject<{
4536
4700
  facebook?: string | undefined;
4537
4701
  linkedin?: string | undefined;
4538
4702
  instagram?: string | undefined;
4703
+ x?: string | undefined;
4539
4704
  youtube?: string | undefined;
4540
4705
  tiktok?: string | undefined;
4541
4706
  customUrl?: string | undefined;
4542
4707
  customUrlLabel?: string | undefined;
4543
4708
  }>>>>;
4709
+ ctaButtons: z.ZodOptional<z.ZodOptional<z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
4710
+ label: z.ZodEffects<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>, string, string | undefined>;
4711
+ url: z.ZodEffects<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>, string, string | undefined>;
4712
+ }, "strip", z.ZodTypeAny, {
4713
+ url: string;
4714
+ label: string;
4715
+ }, {
4716
+ url?: string | undefined;
4717
+ label?: string | undefined;
4718
+ }>, "many">, {
4719
+ url: string;
4720
+ label: string;
4721
+ }[], {
4722
+ url?: string | undefined;
4723
+ label?: string | undefined;
4724
+ }[]>>>>;
4544
4725
  profilePhotoUrl: z.ZodOptional<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>;
4545
4726
  companyLogoUrl: z.ZodOptional<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>;
4546
4727
  }, "strip", z.ZodTypeAny, {
@@ -4570,11 +4751,16 @@ declare const cardUpdateSchema: z.ZodObject<{
4570
4751
  facebook?: string | undefined;
4571
4752
  linkedin?: string | undefined;
4572
4753
  instagram?: string | undefined;
4754
+ x?: string | undefined;
4573
4755
  youtube?: string | undefined;
4574
4756
  tiktok?: string | undefined;
4575
4757
  customUrl?: string | undefined;
4576
4758
  customUrlLabel?: string | undefined;
4577
4759
  } | undefined;
4760
+ ctaButtons?: {
4761
+ url: string;
4762
+ label: string;
4763
+ }[] | undefined;
4578
4764
  }, {
4579
4765
  profilePhotoUrl?: string | undefined;
4580
4766
  companyLogoUrl?: string | undefined;
@@ -4602,11 +4788,16 @@ declare const cardUpdateSchema: z.ZodObject<{
4602
4788
  facebook?: string | undefined;
4603
4789
  linkedin?: string | undefined;
4604
4790
  instagram?: string | undefined;
4791
+ x?: string | undefined;
4605
4792
  youtube?: string | undefined;
4606
4793
  tiktok?: string | undefined;
4607
4794
  customUrl?: string | undefined;
4608
4795
  customUrlLabel?: string | undefined;
4609
4796
  } | undefined;
4797
+ ctaButtons?: {
4798
+ url?: string | undefined;
4799
+ label?: string | undefined;
4800
+ }[] | undefined;
4610
4801
  }>>;
4611
4802
  status: z.ZodOptional<z.ZodEnum<["active", "suspended", "archived"]>>;
4612
4803
  }, "strip", z.ZodTypeAny, {
@@ -4638,11 +4829,16 @@ declare const cardUpdateSchema: z.ZodObject<{
4638
4829
  facebook?: string | undefined;
4639
4830
  linkedin?: string | undefined;
4640
4831
  instagram?: string | undefined;
4832
+ x?: string | undefined;
4641
4833
  youtube?: string | undefined;
4642
4834
  tiktok?: string | undefined;
4643
4835
  customUrl?: string | undefined;
4644
4836
  customUrlLabel?: string | undefined;
4645
4837
  } | undefined;
4838
+ ctaButtons?: {
4839
+ url: string;
4840
+ label: string;
4841
+ }[] | undefined;
4646
4842
  } | undefined;
4647
4843
  }, {
4648
4844
  status?: "active" | "suspended" | "archived" | undefined;
@@ -4673,11 +4869,16 @@ declare const cardUpdateSchema: z.ZodObject<{
4673
4869
  facebook?: string | undefined;
4674
4870
  linkedin?: string | undefined;
4675
4871
  instagram?: string | undefined;
4872
+ x?: string | undefined;
4676
4873
  youtube?: string | undefined;
4677
4874
  tiktok?: string | undefined;
4678
4875
  customUrl?: string | undefined;
4679
4876
  customUrlLabel?: string | undefined;
4680
4877
  } | undefined;
4878
+ ctaButtons?: {
4879
+ url?: string | undefined;
4880
+ label?: string | undefined;
4881
+ }[] | undefined;
4681
4882
  } | undefined;
4682
4883
  }>;
4683
4884
  declare const adminCardCreateSchema: z.ZodObject<{
@@ -4814,17 +5015,19 @@ declare const adminCardCreateSchema: z.ZodObject<{
4814
5015
  showSocialLinks?: boolean | undefined;
4815
5016
  }>>;
4816
5017
  socialOverrides: z.ZodOptional<z.ZodObject<{
4817
- facebook: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
4818
- linkedin: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
4819
- instagram: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
4820
- youtube: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
4821
- tiktok: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
4822
- customUrl: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
4823
- customUrlLabel: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
5018
+ facebook: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
5019
+ linkedin: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
5020
+ instagram: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
5021
+ x: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
5022
+ youtube: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
5023
+ tiktok: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
5024
+ customUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
5025
+ customUrlLabel: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
4824
5026
  }, "strip", z.ZodTypeAny, {
4825
5027
  facebook?: string | undefined;
4826
5028
  linkedin?: string | undefined;
4827
5029
  instagram?: string | undefined;
5030
+ x?: string | undefined;
4828
5031
  youtube?: string | undefined;
4829
5032
  tiktok?: string | undefined;
4830
5033
  customUrl?: string | undefined;
@@ -4833,11 +5036,28 @@ declare const adminCardCreateSchema: z.ZodObject<{
4833
5036
  facebook?: string | undefined;
4834
5037
  linkedin?: string | undefined;
4835
5038
  instagram?: string | undefined;
5039
+ x?: string | undefined;
4836
5040
  youtube?: string | undefined;
4837
5041
  tiktok?: string | undefined;
4838
5042
  customUrl?: string | undefined;
4839
5043
  customUrlLabel?: string | undefined;
4840
5044
  }>>;
5045
+ ctaButtons: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
5046
+ label: z.ZodEffects<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>, string, string | undefined>;
5047
+ url: z.ZodEffects<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>, string, string | undefined>;
5048
+ }, "strip", z.ZodTypeAny, {
5049
+ url: string;
5050
+ label: string;
5051
+ }, {
5052
+ url?: string | undefined;
5053
+ label?: string | undefined;
5054
+ }>, "many">, {
5055
+ url: string;
5056
+ label: string;
5057
+ }[], {
5058
+ url?: string | undefined;
5059
+ label?: string | undefined;
5060
+ }[]>>;
4841
5061
  }, "strip", z.ZodTypeAny, {
4842
5062
  templateId: "minimal" | "bold" | "card" | "aurora";
4843
5063
  accentColor: string;
@@ -4863,11 +5083,16 @@ declare const adminCardCreateSchema: z.ZodObject<{
4863
5083
  facebook?: string | undefined;
4864
5084
  linkedin?: string | undefined;
4865
5085
  instagram?: string | undefined;
5086
+ x?: string | undefined;
4866
5087
  youtube?: string | undefined;
4867
5088
  tiktok?: string | undefined;
4868
5089
  customUrl?: string | undefined;
4869
5090
  customUrlLabel?: string | undefined;
4870
5091
  } | undefined;
5092
+ ctaButtons?: {
5093
+ url: string;
5094
+ label: string;
5095
+ }[] | undefined;
4871
5096
  }, {
4872
5097
  templateId: "minimal" | "bold" | "card" | "aurora";
4873
5098
  accentColor: string;
@@ -4893,11 +5118,16 @@ declare const adminCardCreateSchema: z.ZodObject<{
4893
5118
  facebook?: string | undefined;
4894
5119
  linkedin?: string | undefined;
4895
5120
  instagram?: string | undefined;
5121
+ x?: string | undefined;
4896
5122
  youtube?: string | undefined;
4897
5123
  tiktok?: string | undefined;
4898
5124
  customUrl?: string | undefined;
4899
5125
  customUrlLabel?: string | undefined;
4900
5126
  } | undefined;
5127
+ ctaButtons?: {
5128
+ url?: string | undefined;
5129
+ label?: string | undefined;
5130
+ }[] | undefined;
4901
5131
  }>;
4902
5132
  physicalConfig: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodObject<{
4903
5133
  material: z.ZodEnum<["plastic", "3dprint_standard", "metal", "bamboo"]>;
@@ -5865,11 +6095,16 @@ declare const adminCardCreateSchema: z.ZodObject<{
5865
6095
  facebook?: string | undefined;
5866
6096
  linkedin?: string | undefined;
5867
6097
  instagram?: string | undefined;
6098
+ x?: string | undefined;
5868
6099
  youtube?: string | undefined;
5869
6100
  tiktok?: string | undefined;
5870
6101
  customUrl?: string | undefined;
5871
6102
  customUrlLabel?: string | undefined;
5872
6103
  } | undefined;
6104
+ ctaButtons?: {
6105
+ url: string;
6106
+ label: string;
6107
+ }[] | undefined;
5873
6108
  };
5874
6109
  targetUserId: string;
5875
6110
  physicalConfig?: {
@@ -6016,11 +6251,16 @@ declare const adminCardCreateSchema: z.ZodObject<{
6016
6251
  facebook?: string | undefined;
6017
6252
  linkedin?: string | undefined;
6018
6253
  instagram?: string | undefined;
6254
+ x?: string | undefined;
6019
6255
  youtube?: string | undefined;
6020
6256
  tiktok?: string | undefined;
6021
6257
  customUrl?: string | undefined;
6022
6258
  customUrlLabel?: string | undefined;
6023
6259
  } | undefined;
6260
+ ctaButtons?: {
6261
+ url?: string | undefined;
6262
+ label?: string | undefined;
6263
+ }[] | undefined;
6024
6264
  };
6025
6265
  targetUserId: string;
6026
6266
  physicalConfig?: {
@@ -6345,17 +6585,19 @@ declare const profileCreateSchema: z.ZodObject<{
6345
6585
  showSocialLinks?: boolean | undefined;
6346
6586
  }>>;
6347
6587
  socialOverrides: z.ZodOptional<z.ZodObject<{
6348
- facebook: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
6349
- linkedin: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
6350
- instagram: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
6351
- youtube: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
6352
- tiktok: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
6353
- customUrl: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
6354
- customUrlLabel: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
6588
+ facebook: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
6589
+ linkedin: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
6590
+ instagram: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
6591
+ x: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
6592
+ youtube: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
6593
+ tiktok: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
6594
+ customUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
6595
+ customUrlLabel: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
6355
6596
  }, "strip", z.ZodTypeAny, {
6356
6597
  facebook?: string | undefined;
6357
6598
  linkedin?: string | undefined;
6358
6599
  instagram?: string | undefined;
6600
+ x?: string | undefined;
6359
6601
  youtube?: string | undefined;
6360
6602
  tiktok?: string | undefined;
6361
6603
  customUrl?: string | undefined;
@@ -6364,11 +6606,28 @@ declare const profileCreateSchema: z.ZodObject<{
6364
6606
  facebook?: string | undefined;
6365
6607
  linkedin?: string | undefined;
6366
6608
  instagram?: string | undefined;
6609
+ x?: string | undefined;
6367
6610
  youtube?: string | undefined;
6368
6611
  tiktok?: string | undefined;
6369
6612
  customUrl?: string | undefined;
6370
6613
  customUrlLabel?: string | undefined;
6371
6614
  }>>;
6615
+ ctaButtons: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
6616
+ label: z.ZodEffects<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>, string, string | undefined>;
6617
+ url: z.ZodEffects<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>, string, string | undefined>;
6618
+ }, "strip", z.ZodTypeAny, {
6619
+ url: string;
6620
+ label: string;
6621
+ }, {
6622
+ url?: string | undefined;
6623
+ label?: string | undefined;
6624
+ }>, "many">, {
6625
+ url: string;
6626
+ label: string;
6627
+ }[], {
6628
+ url?: string | undefined;
6629
+ label?: string | undefined;
6630
+ }[]>>;
6372
6631
  }, "strip", z.ZodTypeAny, {
6373
6632
  templateId: "minimal" | "bold" | "card" | "aurora";
6374
6633
  accentColor: string;
@@ -6394,11 +6653,16 @@ declare const profileCreateSchema: z.ZodObject<{
6394
6653
  facebook?: string | undefined;
6395
6654
  linkedin?: string | undefined;
6396
6655
  instagram?: string | undefined;
6656
+ x?: string | undefined;
6397
6657
  youtube?: string | undefined;
6398
6658
  tiktok?: string | undefined;
6399
6659
  customUrl?: string | undefined;
6400
6660
  customUrlLabel?: string | undefined;
6401
6661
  } | undefined;
6662
+ ctaButtons?: {
6663
+ url: string;
6664
+ label: string;
6665
+ }[] | undefined;
6402
6666
  }, {
6403
6667
  templateId: "minimal" | "bold" | "card" | "aurora";
6404
6668
  accentColor: string;
@@ -6424,11 +6688,16 @@ declare const profileCreateSchema: z.ZodObject<{
6424
6688
  facebook?: string | undefined;
6425
6689
  linkedin?: string | undefined;
6426
6690
  instagram?: string | undefined;
6691
+ x?: string | undefined;
6427
6692
  youtube?: string | undefined;
6428
6693
  tiktok?: string | undefined;
6429
6694
  customUrl?: string | undefined;
6430
6695
  customUrlLabel?: string | undefined;
6431
6696
  } | undefined;
6697
+ ctaButtons?: {
6698
+ url?: string | undefined;
6699
+ label?: string | undefined;
6700
+ }[] | undefined;
6432
6701
  }>;
6433
6702
  visibility: z.ZodDefault<z.ZodEnum<["public", "private", "link_only"]>>;
6434
6703
  accessPin: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
@@ -6483,14 +6752,19 @@ declare const profileCreateSchema: z.ZodObject<{
6483
6752
  facebook?: string | undefined;
6484
6753
  linkedin?: string | undefined;
6485
6754
  instagram?: string | undefined;
6755
+ x?: string | undefined;
6486
6756
  youtube?: string | undefined;
6487
6757
  tiktok?: string | undefined;
6488
6758
  customUrl?: string | undefined;
6489
6759
  customUrlLabel?: string | undefined;
6490
6760
  } | undefined;
6761
+ ctaButtons?: {
6762
+ url: string;
6763
+ label: string;
6764
+ }[] | undefined;
6491
6765
  };
6492
- cardId?: string | undefined;
6493
6766
  label?: string | undefined;
6767
+ cardId?: string | undefined;
6494
6768
  icon?: string | undefined;
6495
6769
  accessPin?: string | undefined;
6496
6770
  }, {
@@ -6543,15 +6817,20 @@ declare const profileCreateSchema: z.ZodObject<{
6543
6817
  facebook?: string | undefined;
6544
6818
  linkedin?: string | undefined;
6545
6819
  instagram?: string | undefined;
6820
+ x?: string | undefined;
6546
6821
  youtube?: string | undefined;
6547
6822
  tiktok?: string | undefined;
6548
6823
  customUrl?: string | undefined;
6549
6824
  customUrlLabel?: string | undefined;
6550
6825
  } | undefined;
6826
+ ctaButtons?: {
6827
+ url?: string | undefined;
6828
+ label?: string | undefined;
6829
+ }[] | undefined;
6551
6830
  };
6831
+ label?: string | undefined;
6552
6832
  visibility?: "public" | "private" | "link_only" | undefined;
6553
6833
  cardId?: string | undefined;
6554
- label?: string | undefined;
6555
6834
  icon?: string | undefined;
6556
6835
  accessPin?: string | undefined;
6557
6836
  }>;
@@ -6697,17 +6976,19 @@ declare const signupWithProfileSchema: z.ZodObject<{
6697
6976
  showSocialLinks?: boolean | undefined;
6698
6977
  }>>;
6699
6978
  socialOverrides: z.ZodOptional<z.ZodObject<{
6700
- facebook: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
6701
- linkedin: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
6702
- instagram: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
6703
- youtube: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
6704
- tiktok: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
6705
- customUrl: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
6706
- customUrlLabel: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
6979
+ facebook: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
6980
+ linkedin: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
6981
+ instagram: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
6982
+ x: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
6983
+ youtube: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
6984
+ tiktok: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
6985
+ customUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
6986
+ customUrlLabel: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
6707
6987
  }, "strip", z.ZodTypeAny, {
6708
6988
  facebook?: string | undefined;
6709
6989
  linkedin?: string | undefined;
6710
6990
  instagram?: string | undefined;
6991
+ x?: string | undefined;
6711
6992
  youtube?: string | undefined;
6712
6993
  tiktok?: string | undefined;
6713
6994
  customUrl?: string | undefined;
@@ -6716,11 +6997,28 @@ declare const signupWithProfileSchema: z.ZodObject<{
6716
6997
  facebook?: string | undefined;
6717
6998
  linkedin?: string | undefined;
6718
6999
  instagram?: string | undefined;
7000
+ x?: string | undefined;
6719
7001
  youtube?: string | undefined;
6720
7002
  tiktok?: string | undefined;
6721
7003
  customUrl?: string | undefined;
6722
7004
  customUrlLabel?: string | undefined;
6723
7005
  }>>;
7006
+ ctaButtons: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
7007
+ label: z.ZodEffects<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>, string, string | undefined>;
7008
+ url: z.ZodEffects<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>, string, string | undefined>;
7009
+ }, "strip", z.ZodTypeAny, {
7010
+ url: string;
7011
+ label: string;
7012
+ }, {
7013
+ url?: string | undefined;
7014
+ label?: string | undefined;
7015
+ }>, "many">, {
7016
+ url: string;
7017
+ label: string;
7018
+ }[], {
7019
+ url?: string | undefined;
7020
+ label?: string | undefined;
7021
+ }[]>>;
6724
7022
  }, "strip", z.ZodTypeAny, {
6725
7023
  templateId: "minimal" | "bold" | "card" | "aurora";
6726
7024
  accentColor: string;
@@ -6746,11 +7044,16 @@ declare const signupWithProfileSchema: z.ZodObject<{
6746
7044
  facebook?: string | undefined;
6747
7045
  linkedin?: string | undefined;
6748
7046
  instagram?: string | undefined;
7047
+ x?: string | undefined;
6749
7048
  youtube?: string | undefined;
6750
7049
  tiktok?: string | undefined;
6751
7050
  customUrl?: string | undefined;
6752
7051
  customUrlLabel?: string | undefined;
6753
7052
  } | undefined;
7053
+ ctaButtons?: {
7054
+ url: string;
7055
+ label: string;
7056
+ }[] | undefined;
6754
7057
  }, {
6755
7058
  templateId: "minimal" | "bold" | "card" | "aurora";
6756
7059
  accentColor: string;
@@ -6776,11 +7079,16 @@ declare const signupWithProfileSchema: z.ZodObject<{
6776
7079
  facebook?: string | undefined;
6777
7080
  linkedin?: string | undefined;
6778
7081
  instagram?: string | undefined;
7082
+ x?: string | undefined;
6779
7083
  youtube?: string | undefined;
6780
7084
  tiktok?: string | undefined;
6781
7085
  customUrl?: string | undefined;
6782
7086
  customUrlLabel?: string | undefined;
6783
7087
  } | undefined;
7088
+ ctaButtons?: {
7089
+ url?: string | undefined;
7090
+ label?: string | undefined;
7091
+ }[] | undefined;
6784
7092
  }>;
6785
7093
  }, "strip", z.ZodTypeAny, {
6786
7094
  email: string;
@@ -6833,11 +7141,16 @@ declare const signupWithProfileSchema: z.ZodObject<{
6833
7141
  facebook?: string | undefined;
6834
7142
  linkedin?: string | undefined;
6835
7143
  instagram?: string | undefined;
7144
+ x?: string | undefined;
6836
7145
  youtube?: string | undefined;
6837
7146
  tiktok?: string | undefined;
6838
7147
  customUrl?: string | undefined;
6839
7148
  customUrlLabel?: string | undefined;
6840
7149
  } | undefined;
7150
+ ctaButtons?: {
7151
+ url: string;
7152
+ label: string;
7153
+ }[] | undefined;
6841
7154
  };
6842
7155
  password: string;
6843
7156
  acceptedTerms: true;
@@ -6897,11 +7210,16 @@ declare const signupWithProfileSchema: z.ZodObject<{
6897
7210
  facebook?: string | undefined;
6898
7211
  linkedin?: string | undefined;
6899
7212
  instagram?: string | undefined;
7213
+ x?: string | undefined;
6900
7214
  youtube?: string | undefined;
6901
7215
  tiktok?: string | undefined;
6902
7216
  customUrl?: string | undefined;
6903
7217
  customUrlLabel?: string | undefined;
6904
7218
  } | undefined;
7219
+ ctaButtons?: {
7220
+ url?: string | undefined;
7221
+ label?: string | undefined;
7222
+ }[] | undefined;
6905
7223
  };
6906
7224
  password: string;
6907
7225
  acceptedTerms: true;
@@ -7047,17 +7365,19 @@ declare const profileUpdateSchema: z.ZodObject<{
7047
7365
  showSocialLinks?: boolean | undefined;
7048
7366
  }>>>>;
7049
7367
  socialOverrides: z.ZodOptional<z.ZodOptional<z.ZodOptional<z.ZodObject<{
7050
- facebook: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
7051
- linkedin: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
7052
- instagram: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
7053
- youtube: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
7054
- tiktok: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
7055
- customUrl: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
7056
- customUrlLabel: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
7368
+ facebook: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
7369
+ linkedin: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
7370
+ instagram: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
7371
+ x: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
7372
+ youtube: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
7373
+ tiktok: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
7374
+ customUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
7375
+ customUrlLabel: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
7057
7376
  }, "strip", z.ZodTypeAny, {
7058
7377
  facebook?: string | undefined;
7059
7378
  linkedin?: string | undefined;
7060
7379
  instagram?: string | undefined;
7380
+ x?: string | undefined;
7061
7381
  youtube?: string | undefined;
7062
7382
  tiktok?: string | undefined;
7063
7383
  customUrl?: string | undefined;
@@ -7066,11 +7386,28 @@ declare const profileUpdateSchema: z.ZodObject<{
7066
7386
  facebook?: string | undefined;
7067
7387
  linkedin?: string | undefined;
7068
7388
  instagram?: string | undefined;
7389
+ x?: string | undefined;
7069
7390
  youtube?: string | undefined;
7070
7391
  tiktok?: string | undefined;
7071
7392
  customUrl?: string | undefined;
7072
7393
  customUrlLabel?: string | undefined;
7073
7394
  }>>>>;
7395
+ ctaButtons: z.ZodOptional<z.ZodOptional<z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
7396
+ label: z.ZodEffects<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>, string, string | undefined>;
7397
+ url: z.ZodEffects<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>, string, string | undefined>;
7398
+ }, "strip", z.ZodTypeAny, {
7399
+ url: string;
7400
+ label: string;
7401
+ }, {
7402
+ url?: string | undefined;
7403
+ label?: string | undefined;
7404
+ }>, "many">, {
7405
+ url: string;
7406
+ label: string;
7407
+ }[], {
7408
+ url?: string | undefined;
7409
+ label?: string | undefined;
7410
+ }[]>>>>;
7074
7411
  profilePhotoUrl: z.ZodOptional<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>;
7075
7412
  companyLogoUrl: z.ZodOptional<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>;
7076
7413
  }, "strip", z.ZodTypeAny, {
@@ -7100,11 +7437,16 @@ declare const profileUpdateSchema: z.ZodObject<{
7100
7437
  facebook?: string | undefined;
7101
7438
  linkedin?: string | undefined;
7102
7439
  instagram?: string | undefined;
7440
+ x?: string | undefined;
7103
7441
  youtube?: string | undefined;
7104
7442
  tiktok?: string | undefined;
7105
7443
  customUrl?: string | undefined;
7106
7444
  customUrlLabel?: string | undefined;
7107
7445
  } | undefined;
7446
+ ctaButtons?: {
7447
+ url: string;
7448
+ label: string;
7449
+ }[] | undefined;
7108
7450
  }, {
7109
7451
  profilePhotoUrl?: string | undefined;
7110
7452
  companyLogoUrl?: string | undefined;
@@ -7132,15 +7474,21 @@ declare const profileUpdateSchema: z.ZodObject<{
7132
7474
  facebook?: string | undefined;
7133
7475
  linkedin?: string | undefined;
7134
7476
  instagram?: string | undefined;
7477
+ x?: string | undefined;
7135
7478
  youtube?: string | undefined;
7136
7479
  tiktok?: string | undefined;
7137
7480
  customUrl?: string | undefined;
7138
7481
  customUrlLabel?: string | undefined;
7139
7482
  } | undefined;
7483
+ ctaButtons?: {
7484
+ url?: string | undefined;
7485
+ label?: string | undefined;
7486
+ }[] | undefined;
7140
7487
  }>>;
7141
7488
  visibility: z.ZodOptional<z.ZodEnum<["public", "private", "link_only"]>>;
7142
7489
  accessPin: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
7143
7490
  }, "strip", z.ZodTypeAny, {
7491
+ label?: string | undefined;
7144
7492
  visibility?: "public" | "private" | "link_only" | undefined;
7145
7493
  userData?: {
7146
7494
  firstName?: string | undefined;
@@ -7193,16 +7541,21 @@ declare const profileUpdateSchema: z.ZodObject<{
7193
7541
  facebook?: string | undefined;
7194
7542
  linkedin?: string | undefined;
7195
7543
  instagram?: string | undefined;
7544
+ x?: string | undefined;
7196
7545
  youtube?: string | undefined;
7197
7546
  tiktok?: string | undefined;
7198
7547
  customUrl?: string | undefined;
7199
7548
  customUrlLabel?: string | undefined;
7200
7549
  } | undefined;
7550
+ ctaButtons?: {
7551
+ url: string;
7552
+ label: string;
7553
+ }[] | undefined;
7201
7554
  } | undefined;
7202
- label?: string | undefined;
7203
7555
  icon?: string | undefined;
7204
7556
  accessPin?: string | undefined;
7205
7557
  }, {
7558
+ label?: string | undefined;
7206
7559
  visibility?: "public" | "private" | "link_only" | undefined;
7207
7560
  userData?: {
7208
7561
  firstName?: string | undefined;
@@ -7255,13 +7608,17 @@ declare const profileUpdateSchema: z.ZodObject<{
7255
7608
  facebook?: string | undefined;
7256
7609
  linkedin?: string | undefined;
7257
7610
  instagram?: string | undefined;
7611
+ x?: string | undefined;
7258
7612
  youtube?: string | undefined;
7259
7613
  tiktok?: string | undefined;
7260
7614
  customUrl?: string | undefined;
7261
7615
  customUrlLabel?: string | undefined;
7262
7616
  } | undefined;
7617
+ ctaButtons?: {
7618
+ url?: string | undefined;
7619
+ label?: string | undefined;
7620
+ }[] | undefined;
7263
7621
  } | undefined;
7264
- label?: string | undefined;
7265
7622
  icon?: string | undefined;
7266
7623
  accessPin?: string | undefined;
7267
7624
  }>;
@@ -7409,4 +7766,4 @@ declare function validatePhysicalConfig(data: unknown): ValidationResult<z.infer
7409
7766
  declare function validateDigitalConfig(data: unknown): ValidationResult<z.infer<typeof digitalConfigSchema>>;
7410
7767
  declare function validateConfiguration(data: unknown): ValidationResult<z.infer<typeof configurationCreateSchema>>;
7411
7768
 
7412
- export { type ValidationResult, adminCardCreateSchema, cardDesignMaterialSchema, cardDesignPatternSchema, cardDesignSchema, cardElementsSchema, cardProfileUpdateSchema, cardUpdateSchema, comboIdSchema, configurationCreateSchema, configurationUpdateSchema, contactDetailTogglesSchema, contactExchangeSchema, createOrderSchema, digitalConfigSchema, digitalVisibilitySchema, hubConfigSchema, hubProfilesUpdateSchema, materialSchema, patternFamilySchema, physicalConfigSchema, physicalContentOverridesSchema, profileAccessTokenCreateSchema, profileCreateSchema, profilePinVerifySchema, profileUpdateSchema, profileUserDataSchema, profileVisibilitySchema, sanitizeHttpUrl, sanitizeText, signupWithProfileSchema, socialLinksSchema, userDataSchema, validateConfiguration, validateDigitalConfig, validatePhysicalConfig, validateUserData, webAddressSchema };
7769
+ export { MAX_CTA_BUTTONS, type ValidationResult, adminCardCreateSchema, cardDesignMaterialSchema, cardDesignPatternSchema, cardDesignSchema, cardElementsSchema, cardProfileUpdateSchema, cardUpdateSchema, comboIdSchema, configurationCreateSchema, configurationUpdateSchema, contactDetailTogglesSchema, contactExchangeSchema, createOrderSchema, ctaButtonSchema, ctaButtonsSchema, digitalConfigSchema, digitalVisibilitySchema, hubConfigSchema, hubProfilesUpdateSchema, materialSchema, patternFamilySchema, physicalConfigSchema, physicalContentOverridesSchema, profileAccessTokenCreateSchema, profileCreateSchema, profilePinVerifySchema, profileUpdateSchema, profileUserDataSchema, profileVisibilitySchema, sanitizeHttpUrl, sanitizeText, signupWithProfileSchema, socialLinksSchema, socialOverridesSchema, userDataSchema, validateConfiguration, validateDigitalConfig, validatePhysicalConfig, validateUserData, webAddressSchema };
package/dist/index.js CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nfcard/validation",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "description": "Shared Zod validation schemas for the NFCard product family.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -17,7 +17,7 @@
17
17
  ],
18
18
  "dependencies": {
19
19
  "zod": "^3.24.0",
20
- "@nfcard/types": "0.5.0"
20
+ "@nfcard/types": "0.7.0"
21
21
  },
22
22
  "devDependencies": {
23
23
  "tsup": "^8.0.0"
package/src/index.test.ts CHANGED
@@ -6,9 +6,11 @@ import {
6
6
  configurationCreateSchema,
7
7
  contactExchangeSchema,
8
8
  createOrderSchema,
9
+ ctaButtonsSchema,
9
10
  digitalConfigSchema,
10
11
  hubConfigSchema,
11
12
  materialSchema,
13
+ MAX_CTA_BUTTONS,
12
14
  physicalConfigSchema,
13
15
  profileCreateSchema,
14
16
  profileVisibilitySchema,
@@ -16,6 +18,7 @@ import {
16
18
  sanitizeText,
17
19
  signupWithProfileSchema,
18
20
  socialLinksSchema,
21
+ socialOverridesSchema,
19
22
  userDataSchema,
20
23
  validateConfiguration,
21
24
  validateDigitalConfig,
@@ -209,6 +212,151 @@ describe('socialLinksSchema', () => {
209
212
  });
210
213
  });
211
214
 
215
+ // ── socialOverridesSchema (FOXHOLE-595 input side) ──────────────
216
+
217
+ describe('socialOverridesSchema (FOXHOLE-595 input side)', () => {
218
+ it('sanitizes every present URL field to safe https (or drops unsafe)', () => {
219
+ const out = socialOverridesSchema.parse({
220
+ facebook: 'https://facebook.com/foxhome',
221
+ linkedin: 'javascript:alert(1)', // unsafe scheme → ''
222
+ instagram: 'instagram.com/foxhome', // bare host → https
223
+ x: 'http://x.com/foxhome', // http upgraded → https
224
+ customUrl: '<script>x</script>https://foo.bar', // tags stripped
225
+ customUrlLabel: '<b>My link</b>',
226
+ });
227
+ expect(out.facebook).toBe('https://facebook.com/foxhome');
228
+ expect(out.linkedin).toBe('');
229
+ expect(out.instagram).toBe('https://instagram.com/foxhome');
230
+ expect(out.x?.startsWith('https://')).toBe(true);
231
+ expect(out.customUrl).not.toMatch(/script/i);
232
+ expect(out.customUrlLabel).toBe('My link');
233
+ });
234
+
235
+ it('preserves SPARSE semantics — omitted keys stay omitted (no merge clobber)', () => {
236
+ // The renderer merges { ...baseSocialLinks, ...socialOverrides }; an
237
+ // omitted override key must NOT appear as '' or it would wipe the
238
+ // inherited link. See socialOverridesSchema comment.
239
+ const out = socialOverridesSchema.parse({ facebook: 'https://fb.com/x' });
240
+ expect(out.facebook).toBe('https://fb.com/x');
241
+ expect('linkedin' in out).toBe(false);
242
+ expect('x' in out).toBe(false);
243
+ expect('customUrl' in out).toBe(false);
244
+ expect('customUrlLabel' in out).toBe(false);
245
+ expect(Object.keys(out)).toEqual(['facebook']);
246
+ });
247
+
248
+ it('includes x for parity with the SocialLinks type + renderer', () => {
249
+ const out = socialOverridesSchema.parse({ x: 'x.com/foo' });
250
+ expect(out.x).toBe('https://x.com/foo');
251
+ });
252
+
253
+ it.each([
254
+ 'javascript:alert(1)',
255
+ 'JaVaScRiPt:alert(1)',
256
+ 'data:text/html,<script>alert(1)</script>',
257
+ 'vbscript:msgbox(1)',
258
+ 'file:///etc/passwd',
259
+ 'mailto:a@b.c',
260
+ ])('coerces a dangerous override to empty rather than 400ing: %s', (bad) => {
261
+ const r = socialOverridesSchema.safeParse({ customUrl: bad });
262
+ expect(r.success).toBe(true);
263
+ if (r.success) expect(r.data.customUrl).toBe('');
264
+ });
265
+
266
+ it('accepts an empty object (every field optional)', () => {
267
+ const r = socialOverridesSchema.safeParse({});
268
+ expect(r.success).toBe(true);
269
+ if (r.success) expect(Object.keys(r.data)).toEqual([]);
270
+ });
271
+ });
272
+
273
+ // ── ctaButtonsSchema (NFCARD-211 — Pro CTA buttons) ─────────────
274
+
275
+ describe('ctaButtonsSchema (NFCARD-211 — Pro CTA buttons)', () => {
276
+ it('keeps a valid button and upgrades http → https', () => {
277
+ const out = ctaButtonsSchema.parse([
278
+ { label: 'Book a call', url: 'http://calendly.com/foxhome' },
279
+ ]);
280
+ expect(out).toEqual([
281
+ { label: 'Book a call', url: 'https://calendly.com/foxhome' },
282
+ ]);
283
+ });
284
+
285
+ it('prefixes https onto a bare-host url', () => {
286
+ const [btn] = ctaButtonsSchema.parse([
287
+ { label: 'Shop', url: 'foxhome.hu/shop' },
288
+ ]);
289
+ expect(btn.url).toBe('https://foxhome.hu/shop');
290
+ });
291
+
292
+ it.each([
293
+ 'javascript:alert(1)',
294
+ 'JaVaScRiPt:alert(1)',
295
+ 'data:text/html,<script>alert(1)</script>',
296
+ 'vbscript:msgbox(1)',
297
+ 'file:///etc/passwd',
298
+ 'mailto:a@b.c',
299
+ ])('drops a button whose url is a dangerous/non-http scheme: %s', (bad) => {
300
+ // url sanitizes to '' → the button is incomplete → filtered out.
301
+ expect(ctaButtonsSchema.parse([{ label: 'Click me', url: bad }])).toEqual([]);
302
+ });
303
+
304
+ it('strips HTML tags from the label and caps its length at 40', () => {
305
+ const [btn] = ctaButtonsSchema.parse([
306
+ { label: '<b>Pay now</b>', url: 'https://pay.example.com' },
307
+ ]);
308
+ expect(btn.label).toBe('Pay now');
309
+ const long = ctaButtonsSchema.parse([
310
+ { label: 'x'.repeat(200), url: 'https://e.com' },
311
+ ]);
312
+ expect(long[0].label.length).toBe(40);
313
+ });
314
+
315
+ it('drops incomplete buttons (missing label or url)', () => {
316
+ const out = ctaButtonsSchema.parse([
317
+ { label: '', url: 'https://valid.example.com' },
318
+ { label: 'No link', url: '' },
319
+ { label: 'Good', url: 'https://ok.example.com' },
320
+ ]);
321
+ // URL.href normalises a bare origin with a trailing slash.
322
+ expect(out).toEqual([{ label: 'Good', url: 'https://ok.example.com/' }]);
323
+ });
324
+
325
+ it(`caps the list at MAX_CTA_BUTTONS (${MAX_CTA_BUTTONS})`, () => {
326
+ const many = Array.from({ length: MAX_CTA_BUTTONS + 4 }, (_, i) => ({
327
+ label: `Btn ${i}`,
328
+ url: `https://e${i}.example.com`,
329
+ }));
330
+ expect(ctaButtonsSchema.parse(many)).toHaveLength(MAX_CTA_BUTTONS);
331
+ });
332
+
333
+ it('rejects an abusive payload over the hard array cap', () => {
334
+ const huge = Array.from({ length: 51 }, () => ({
335
+ label: 'x',
336
+ url: 'https://e.example.com',
337
+ }));
338
+ expect(ctaButtonsSchema.safeParse(huge).success).toBe(false);
339
+ });
340
+
341
+ it('flows through digitalConfigSchema — unsafe buttons dropped on save', () => {
342
+ const r = digitalConfigSchema.safeParse({
343
+ templateId: 'card',
344
+ accentColor: '#1A6B52',
345
+ fontKey: 'inter',
346
+ showAvatar: true,
347
+ ctaButtons: [
348
+ { label: 'Evil', url: 'javascript:alert(1)' },
349
+ { label: 'Book', url: 'calendly.com/x' },
350
+ ],
351
+ });
352
+ expect(r.success).toBe(true);
353
+ if (r.success)
354
+ expect(r.data.ctaButtons).toEqual([
355
+ { label: 'Book', url: 'https://calendly.com/x' },
356
+ ]);
357
+ });
358
+ });
359
+
212
360
  // ── userDataSchema ──────────────────────────────────────────────
213
361
 
214
362
  describe('userDataSchema / validateUserData', () => {
@@ -379,6 +527,23 @@ describe('digitalConfigSchema / validateDigitalConfig', () => {
379
527
  const r = validateDigitalConfig({ ...validDigitalConfig, fontKey: '' });
380
528
  expect(r.success).toBe(false);
381
529
  });
530
+
531
+ it('sanitizes socialOverrides on the full config (FOXHOLE-595 input side)', () => {
532
+ const r = validateDigitalConfig({
533
+ ...validDigitalConfig,
534
+ socialOverrides: {
535
+ linkedin: 'javascript:alert(1)', // unsafe → ''
536
+ facebook: 'fb.com/x', // bare host → https
537
+ },
538
+ });
539
+ expect(r.success).toBe(true);
540
+ if (r.success) {
541
+ expect(r.data.socialOverrides?.linkedin).toBe('');
542
+ expect(r.data.socialOverrides?.facebook).toBe('https://fb.com/x');
543
+ // omitted override keys stay absent — no merge clobber downstream
544
+ expect('instagram' in (r.data.socialOverrides ?? {})).toBe(false);
545
+ }
546
+ });
382
547
  });
383
548
 
384
549
  // ── configurationCreateSchema ───────────────────────────────────
package/src/index.ts CHANGED
Binary file