@nfcard/validation 0.2.0 → 0.3.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
@@ -522,7 +522,7 @@ declare const digitalVisibilitySchema: z.ZodObject<{
522
522
  showSocialLinks?: boolean | undefined;
523
523
  }>;
524
524
  declare const digitalConfigSchema: z.ZodObject<{
525
- templateId: z.ZodEnum<["minimal", "bold", "card"]>;
525
+ templateId: z.ZodEnum<["minimal", "bold", "card", "aurora"]>;
526
526
  accentColor: z.ZodString;
527
527
  primaryColor: z.ZodOptional<z.ZodString>;
528
528
  secondaryColor: z.ZodOptional<z.ZodString>;
@@ -590,7 +590,7 @@ declare const digitalConfigSchema: z.ZodObject<{
590
590
  customUrlLabel?: string | undefined;
591
591
  }>>;
592
592
  }, "strip", z.ZodTypeAny, {
593
- templateId: "minimal" | "bold" | "card";
593
+ templateId: "minimal" | "bold" | "card" | "aurora";
594
594
  accentColor: string;
595
595
  fontKey: string;
596
596
  showAvatar: boolean;
@@ -620,7 +620,7 @@ declare const digitalConfigSchema: z.ZodObject<{
620
620
  customUrlLabel?: string | undefined;
621
621
  } | undefined;
622
622
  }, {
623
- templateId: "minimal" | "bold" | "card";
623
+ templateId: "minimal" | "bold" | "card" | "aurora";
624
624
  accentColor: string;
625
625
  fontKey: string;
626
626
  showAvatar: boolean;
@@ -1040,7 +1040,7 @@ declare const configurationCreateSchema: z.ZodObject<{
1040
1040
  } | undefined;
1041
1041
  }>;
1042
1042
  digitalConfig: z.ZodObject<{
1043
- templateId: z.ZodEnum<["minimal", "bold", "card"]>;
1043
+ templateId: z.ZodEnum<["minimal", "bold", "card", "aurora"]>;
1044
1044
  accentColor: z.ZodString;
1045
1045
  primaryColor: z.ZodOptional<z.ZodString>;
1046
1046
  secondaryColor: z.ZodOptional<z.ZodString>;
@@ -1108,7 +1108,7 @@ declare const configurationCreateSchema: z.ZodObject<{
1108
1108
  customUrlLabel?: string | undefined;
1109
1109
  }>>;
1110
1110
  }, "strip", z.ZodTypeAny, {
1111
- templateId: "minimal" | "bold" | "card";
1111
+ templateId: "minimal" | "bold" | "card" | "aurora";
1112
1112
  accentColor: string;
1113
1113
  fontKey: string;
1114
1114
  showAvatar: boolean;
@@ -1138,7 +1138,7 @@ declare const configurationCreateSchema: z.ZodObject<{
1138
1138
  customUrlLabel?: string | undefined;
1139
1139
  } | undefined;
1140
1140
  }, {
1141
- templateId: "minimal" | "bold" | "card";
1141
+ templateId: "minimal" | "bold" | "card" | "aurora";
1142
1142
  accentColor: string;
1143
1143
  fontKey: string;
1144
1144
  showAvatar: boolean;
@@ -1244,7 +1244,7 @@ declare const configurationCreateSchema: z.ZodObject<{
1244
1244
  } | undefined;
1245
1245
  };
1246
1246
  digitalConfig: {
1247
- templateId: "minimal" | "bold" | "card";
1247
+ templateId: "minimal" | "bold" | "card" | "aurora";
1248
1248
  accentColor: string;
1249
1249
  fontKey: string;
1250
1250
  showAvatar: boolean;
@@ -1350,7 +1350,7 @@ declare const configurationCreateSchema: z.ZodObject<{
1350
1350
  } | undefined;
1351
1351
  };
1352
1352
  digitalConfig: {
1353
- templateId: "minimal" | "bold" | "card";
1353
+ templateId: "minimal" | "bold" | "card" | "aurora";
1354
1354
  accentColor: string;
1355
1355
  fontKey: string;
1356
1356
  showAvatar: boolean;
@@ -1772,7 +1772,7 @@ declare const configurationUpdateSchema: z.ZodObject<{
1772
1772
  } | undefined;
1773
1773
  }>>;
1774
1774
  digitalConfig: z.ZodOptional<z.ZodObject<{
1775
- templateId: z.ZodEnum<["minimal", "bold", "card"]>;
1775
+ templateId: z.ZodEnum<["minimal", "bold", "card", "aurora"]>;
1776
1776
  accentColor: z.ZodString;
1777
1777
  primaryColor: z.ZodOptional<z.ZodString>;
1778
1778
  secondaryColor: z.ZodOptional<z.ZodString>;
@@ -1840,7 +1840,7 @@ declare const configurationUpdateSchema: z.ZodObject<{
1840
1840
  customUrlLabel?: string | undefined;
1841
1841
  }>>;
1842
1842
  }, "strip", z.ZodTypeAny, {
1843
- templateId: "minimal" | "bold" | "card";
1843
+ templateId: "minimal" | "bold" | "card" | "aurora";
1844
1844
  accentColor: string;
1845
1845
  fontKey: string;
1846
1846
  showAvatar: boolean;
@@ -1870,7 +1870,7 @@ declare const configurationUpdateSchema: z.ZodObject<{
1870
1870
  customUrlLabel?: string | undefined;
1871
1871
  } | undefined;
1872
1872
  }, {
1873
- templateId: "minimal" | "bold" | "card";
1873
+ templateId: "minimal" | "bold" | "card" | "aurora";
1874
1874
  accentColor: string;
1875
1875
  fontKey: string;
1876
1876
  showAvatar: boolean;
@@ -1975,7 +1975,7 @@ declare const configurationUpdateSchema: z.ZodObject<{
1975
1975
  } | undefined;
1976
1976
  } | undefined;
1977
1977
  digitalConfig?: {
1978
- templateId: "minimal" | "bold" | "card";
1978
+ templateId: "minimal" | "bold" | "card" | "aurora";
1979
1979
  accentColor: string;
1980
1980
  fontKey: string;
1981
1981
  showAvatar: boolean;
@@ -2080,7 +2080,7 @@ declare const configurationUpdateSchema: z.ZodObject<{
2080
2080
  } | undefined;
2081
2081
  } | undefined;
2082
2082
  digitalConfig?: {
2083
- templateId: "minimal" | "bold" | "card";
2083
+ templateId: "minimal" | "bold" | "card" | "aurora";
2084
2084
  accentColor: string;
2085
2085
  fontKey: string;
2086
2086
  showAvatar: boolean;
@@ -2116,16 +2116,19 @@ declare const configurationUpdateSchema: z.ZodObject<{
2116
2116
  declare const createOrderSchema: z.ZodObject<{
2117
2117
  configurationId: z.ZodString;
2118
2118
  discountCode: z.ZodOptional<z.ZodString>;
2119
+ designType: z.ZodEnum<["template", "custom"]>;
2119
2120
  }, "strip", z.ZodTypeAny, {
2120
2121
  configurationId: string;
2122
+ designType: "custom" | "template";
2121
2123
  discountCode?: string | undefined;
2122
2124
  }, {
2123
2125
  configurationId: string;
2126
+ designType: "custom" | "template";
2124
2127
  discountCode?: string | undefined;
2125
2128
  }>;
2126
2129
  declare const cardUpdateSchema: z.ZodObject<{
2127
2130
  digitalConfigOverride: z.ZodOptional<z.ZodObject<{
2128
- templateId: z.ZodOptional<z.ZodOptional<z.ZodEnum<["minimal", "bold", "card"]>>>;
2131
+ templateId: z.ZodOptional<z.ZodOptional<z.ZodEnum<["minimal", "bold", "card", "aurora"]>>>;
2129
2132
  accentColor: z.ZodOptional<z.ZodOptional<z.ZodString>>;
2130
2133
  primaryColor: z.ZodOptional<z.ZodOptional<z.ZodOptional<z.ZodString>>>;
2131
2134
  secondaryColor: z.ZodOptional<z.ZodOptional<z.ZodOptional<z.ZodString>>>;
@@ -2197,7 +2200,7 @@ declare const cardUpdateSchema: z.ZodObject<{
2197
2200
  }, "strip", z.ZodTypeAny, {
2198
2201
  profilePhotoUrl?: string | undefined;
2199
2202
  companyLogoUrl?: string | undefined;
2200
- templateId?: "minimal" | "bold" | "card" | undefined;
2203
+ templateId?: "minimal" | "bold" | "card" | "aurora" | undefined;
2201
2204
  accentColor?: string | undefined;
2202
2205
  primaryColor?: string | undefined;
2203
2206
  secondaryColor?: string | undefined;
@@ -2229,7 +2232,7 @@ declare const cardUpdateSchema: z.ZodObject<{
2229
2232
  }, {
2230
2233
  profilePhotoUrl?: string | undefined;
2231
2234
  companyLogoUrl?: string | undefined;
2232
- templateId?: "minimal" | "bold" | "card" | undefined;
2235
+ templateId?: "minimal" | "bold" | "card" | "aurora" | undefined;
2233
2236
  accentColor?: string | undefined;
2234
2237
  primaryColor?: string | undefined;
2235
2238
  secondaryColor?: string | undefined;
@@ -2265,7 +2268,7 @@ declare const cardUpdateSchema: z.ZodObject<{
2265
2268
  digitalConfigOverride?: {
2266
2269
  profilePhotoUrl?: string | undefined;
2267
2270
  companyLogoUrl?: string | undefined;
2268
- templateId?: "minimal" | "bold" | "card" | undefined;
2271
+ templateId?: "minimal" | "bold" | "card" | "aurora" | undefined;
2269
2272
  accentColor?: string | undefined;
2270
2273
  primaryColor?: string | undefined;
2271
2274
  secondaryColor?: string | undefined;
@@ -2300,7 +2303,7 @@ declare const cardUpdateSchema: z.ZodObject<{
2300
2303
  digitalConfigOverride?: {
2301
2304
  profilePhotoUrl?: string | undefined;
2302
2305
  companyLogoUrl?: string | undefined;
2303
- templateId?: "minimal" | "bold" | "card" | undefined;
2306
+ templateId?: "minimal" | "bold" | "card" | "aurora" | undefined;
2304
2307
  accentColor?: string | undefined;
2305
2308
  primaryColor?: string | undefined;
2306
2309
  secondaryColor?: string | undefined;
@@ -2422,7 +2425,7 @@ declare const adminCardCreateSchema: z.ZodObject<{
2422
2425
  } | undefined;
2423
2426
  }>;
2424
2427
  digitalConfig: z.ZodObject<{
2425
- templateId: z.ZodEnum<["minimal", "bold", "card"]>;
2428
+ templateId: z.ZodEnum<["minimal", "bold", "card", "aurora"]>;
2426
2429
  accentColor: z.ZodString;
2427
2430
  primaryColor: z.ZodOptional<z.ZodString>;
2428
2431
  secondaryColor: z.ZodOptional<z.ZodString>;
@@ -2490,7 +2493,7 @@ declare const adminCardCreateSchema: z.ZodObject<{
2490
2493
  customUrlLabel?: string | undefined;
2491
2494
  }>>;
2492
2495
  }, "strip", z.ZodTypeAny, {
2493
- templateId: "minimal" | "bold" | "card";
2496
+ templateId: "minimal" | "bold" | "card" | "aurora";
2494
2497
  accentColor: string;
2495
2498
  fontKey: string;
2496
2499
  showAvatar: boolean;
@@ -2520,7 +2523,7 @@ declare const adminCardCreateSchema: z.ZodObject<{
2520
2523
  customUrlLabel?: string | undefined;
2521
2524
  } | undefined;
2522
2525
  }, {
2523
- templateId: "minimal" | "bold" | "card";
2526
+ templateId: "minimal" | "bold" | "card" | "aurora";
2524
2527
  accentColor: string;
2525
2528
  fontKey: string;
2526
2529
  showAvatar: boolean;
@@ -2875,7 +2878,7 @@ declare const adminCardCreateSchema: z.ZodObject<{
2875
2878
  } | undefined;
2876
2879
  };
2877
2880
  digitalConfig: {
2878
- templateId: "minimal" | "bold" | "card";
2881
+ templateId: "minimal" | "bold" | "card" | "aurora";
2879
2882
  accentColor: string;
2880
2883
  fontKey: string;
2881
2884
  showAvatar: boolean;
@@ -2979,7 +2982,7 @@ declare const adminCardCreateSchema: z.ZodObject<{
2979
2982
  } | undefined;
2980
2983
  };
2981
2984
  digitalConfig: {
2982
- templateId: "minimal" | "bold" | "card";
2985
+ templateId: "minimal" | "bold" | "card" | "aurora";
2983
2986
  accentColor: string;
2984
2987
  fontKey: string;
2985
2988
  showAvatar: boolean;
@@ -3242,7 +3245,7 @@ declare const profileCreateSchema: z.ZodObject<{
3242
3245
  } | undefined;
3243
3246
  }>;
3244
3247
  digitalConfig: z.ZodObject<{
3245
- templateId: z.ZodEnum<["minimal", "bold", "card"]>;
3248
+ templateId: z.ZodEnum<["minimal", "bold", "card", "aurora"]>;
3246
3249
  accentColor: z.ZodString;
3247
3250
  primaryColor: z.ZodOptional<z.ZodString>;
3248
3251
  secondaryColor: z.ZodOptional<z.ZodString>;
@@ -3310,7 +3313,7 @@ declare const profileCreateSchema: z.ZodObject<{
3310
3313
  customUrlLabel?: string | undefined;
3311
3314
  }>>;
3312
3315
  }, "strip", z.ZodTypeAny, {
3313
- templateId: "minimal" | "bold" | "card";
3316
+ templateId: "minimal" | "bold" | "card" | "aurora";
3314
3317
  accentColor: string;
3315
3318
  fontKey: string;
3316
3319
  showAvatar: boolean;
@@ -3340,7 +3343,7 @@ declare const profileCreateSchema: z.ZodObject<{
3340
3343
  customUrlLabel?: string | undefined;
3341
3344
  } | undefined;
3342
3345
  }, {
3343
- templateId: "minimal" | "bold" | "card";
3346
+ templateId: "minimal" | "bold" | "card" | "aurora";
3344
3347
  accentColor: string;
3345
3348
  fontKey: string;
3346
3349
  showAvatar: boolean;
@@ -3399,7 +3402,7 @@ declare const profileCreateSchema: z.ZodObject<{
3399
3402
  } | undefined;
3400
3403
  };
3401
3404
  digitalConfig: {
3402
- templateId: "minimal" | "bold" | "card";
3405
+ templateId: "minimal" | "bold" | "card" | "aurora";
3403
3406
  accentColor: string;
3404
3407
  fontKey: string;
3405
3408
  showAvatar: boolean;
@@ -3459,7 +3462,7 @@ declare const profileCreateSchema: z.ZodObject<{
3459
3462
  } | undefined;
3460
3463
  };
3461
3464
  digitalConfig: {
3462
- templateId: "minimal" | "bold" | "card";
3465
+ templateId: "minimal" | "bold" | "card" | "aurora";
3463
3466
  accentColor: string;
3464
3467
  fontKey: string;
3465
3468
  showAvatar: boolean;
@@ -3594,7 +3597,7 @@ declare const signupWithProfileSchema: z.ZodObject<{
3594
3597
  } | undefined;
3595
3598
  }>;
3596
3599
  digitalConfig: z.ZodObject<{
3597
- templateId: z.ZodEnum<["minimal", "bold", "card"]>;
3600
+ templateId: z.ZodEnum<["minimal", "bold", "card", "aurora"]>;
3598
3601
  accentColor: z.ZodString;
3599
3602
  primaryColor: z.ZodOptional<z.ZodString>;
3600
3603
  secondaryColor: z.ZodOptional<z.ZodString>;
@@ -3662,7 +3665,7 @@ declare const signupWithProfileSchema: z.ZodObject<{
3662
3665
  customUrlLabel?: string | undefined;
3663
3666
  }>>;
3664
3667
  }, "strip", z.ZodTypeAny, {
3665
- templateId: "minimal" | "bold" | "card";
3668
+ templateId: "minimal" | "bold" | "card" | "aurora";
3666
3669
  accentColor: string;
3667
3670
  fontKey: string;
3668
3671
  showAvatar: boolean;
@@ -3692,7 +3695,7 @@ declare const signupWithProfileSchema: z.ZodObject<{
3692
3695
  customUrlLabel?: string | undefined;
3693
3696
  } | undefined;
3694
3697
  }, {
3695
- templateId: "minimal" | "bold" | "card";
3698
+ templateId: "minimal" | "bold" | "card" | "aurora";
3696
3699
  accentColor: string;
3697
3700
  fontKey: string;
3698
3701
  showAvatar: boolean;
@@ -3749,7 +3752,7 @@ declare const signupWithProfileSchema: z.ZodObject<{
3749
3752
  } | undefined;
3750
3753
  };
3751
3754
  digitalConfig: {
3752
- templateId: "minimal" | "bold" | "card";
3755
+ templateId: "minimal" | "bold" | "card" | "aurora";
3753
3756
  accentColor: string;
3754
3757
  fontKey: string;
3755
3758
  showAvatar: boolean;
@@ -3813,7 +3816,7 @@ declare const signupWithProfileSchema: z.ZodObject<{
3813
3816
  } | undefined;
3814
3817
  };
3815
3818
  digitalConfig: {
3816
- templateId: "minimal" | "bold" | "card";
3819
+ templateId: "minimal" | "bold" | "card" | "aurora";
3817
3820
  accentColor: string;
3818
3821
  fontKey: string;
3819
3822
  showAvatar: boolean;
@@ -3944,7 +3947,7 @@ declare const profileUpdateSchema: z.ZodObject<{
3944
3947
  } | undefined;
3945
3948
  }>>;
3946
3949
  digitalConfig: z.ZodOptional<z.ZodObject<{
3947
- templateId: z.ZodOptional<z.ZodOptional<z.ZodEnum<["minimal", "bold", "card"]>>>;
3950
+ templateId: z.ZodOptional<z.ZodOptional<z.ZodEnum<["minimal", "bold", "card", "aurora"]>>>;
3948
3951
  accentColor: z.ZodOptional<z.ZodOptional<z.ZodString>>;
3949
3952
  primaryColor: z.ZodOptional<z.ZodOptional<z.ZodOptional<z.ZodString>>>;
3950
3953
  secondaryColor: z.ZodOptional<z.ZodOptional<z.ZodOptional<z.ZodString>>>;
@@ -4016,7 +4019,7 @@ declare const profileUpdateSchema: z.ZodObject<{
4016
4019
  }, "strip", z.ZodTypeAny, {
4017
4020
  profilePhotoUrl?: string | undefined;
4018
4021
  companyLogoUrl?: string | undefined;
4019
- templateId?: "minimal" | "bold" | "card" | undefined;
4022
+ templateId?: "minimal" | "bold" | "card" | "aurora" | undefined;
4020
4023
  accentColor?: string | undefined;
4021
4024
  primaryColor?: string | undefined;
4022
4025
  secondaryColor?: string | undefined;
@@ -4048,7 +4051,7 @@ declare const profileUpdateSchema: z.ZodObject<{
4048
4051
  }, {
4049
4052
  profilePhotoUrl?: string | undefined;
4050
4053
  companyLogoUrl?: string | undefined;
4051
- templateId?: "minimal" | "bold" | "card" | undefined;
4054
+ templateId?: "minimal" | "bold" | "card" | "aurora" | undefined;
4052
4055
  accentColor?: string | undefined;
4053
4056
  primaryColor?: string | undefined;
4054
4057
  secondaryColor?: string | undefined;
@@ -4109,7 +4112,7 @@ declare const profileUpdateSchema: z.ZodObject<{
4109
4112
  digitalConfig?: {
4110
4113
  profilePhotoUrl?: string | undefined;
4111
4114
  companyLogoUrl?: string | undefined;
4112
- templateId?: "minimal" | "bold" | "card" | undefined;
4115
+ templateId?: "minimal" | "bold" | "card" | "aurora" | undefined;
4113
4116
  accentColor?: string | undefined;
4114
4117
  primaryColor?: string | undefined;
4115
4118
  secondaryColor?: string | undefined;
@@ -4171,7 +4174,7 @@ declare const profileUpdateSchema: z.ZodObject<{
4171
4174
  digitalConfig?: {
4172
4175
  profilePhotoUrl?: string | undefined;
4173
4176
  companyLogoUrl?: string | undefined;
4174
- templateId?: "minimal" | "bold" | "card" | undefined;
4177
+ templateId?: "minimal" | "bold" | "card" | "aurora" | undefined;
4175
4178
  accentColor?: string | undefined;
4176
4179
  primaryColor?: string | undefined;
4177
4180
  secondaryColor?: string | undefined;
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.2.0",
3
+ "version": "0.3.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.2.0"
20
+ "@nfcard/types": "0.4.0"
21
21
  },
22
22
  "devDependencies": {
23
23
  "tsup": "^8.0.0"
package/src/index.test.ts CHANGED
@@ -366,6 +366,14 @@ describe('digitalConfigSchema / validateDigitalConfig', () => {
366
366
  expect(r.success).toBe(false);
367
367
  });
368
368
 
369
+ it('accepts the aurora templateId', () => {
370
+ const r = validateDigitalConfig({
371
+ ...validDigitalConfig,
372
+ templateId: 'aurora',
373
+ });
374
+ expect(r.success).toBe(true);
375
+ });
376
+
369
377
  it('rejects an empty fontKey', () => {
370
378
  const r = validateDigitalConfig({ ...validDigitalConfig, fontKey: '' });
371
379
  expect(r.success).toBe(false);
@@ -518,23 +526,36 @@ describe('createOrderSchema', () => {
518
526
  expect(
519
527
  createOrderSchema.safeParse({
520
528
  configurationId: '550e8400-e29b-41d4-a716-446655440000',
529
+ designType: 'custom',
521
530
  }).success,
522
531
  ).toBe(true);
523
532
  });
524
533
 
525
534
  it('rejects a non-uuid configurationId', () => {
526
535
  expect(
527
- createOrderSchema.safeParse({ configurationId: 'not-a-uuid' }).success,
536
+ createOrderSchema.safeParse({
537
+ configurationId: 'not-a-uuid',
538
+ designType: 'custom',
539
+ }).success,
528
540
  ).toBe(false);
529
541
  });
530
542
 
531
543
  it('accepts an optional discountCode', () => {
532
544
  const r = createOrderSchema.safeParse({
533
545
  configurationId: '550e8400-e29b-41d4-a716-446655440000',
546
+ designType: 'custom',
534
547
  discountCode: 'SUMMER10',
535
548
  });
536
549
  expect(r.success).toBe(true);
537
550
  });
551
+
552
+ it('requires designType (FOXHOLE-714 — Template/Custom pricing path)', () => {
553
+ expect(
554
+ createOrderSchema.safeParse({
555
+ configurationId: '550e8400-e29b-41d4-a716-446655440000',
556
+ }).success,
557
+ ).toBe(false);
558
+ });
538
559
  });
539
560
 
540
561
  // ── contactExchangeSchema ───────────────────────────────────────
package/src/index.ts CHANGED
Binary file