@meerkapp/wms-contracts 0.3.0-beta.3 → 0.3.0-beta.4
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.cjs +2 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +0 -29
- package/dist/index.d.ts +0 -29
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -22270,17 +22270,14 @@ declare const CharacteristicSchema: z$1.ZodDiscriminatedUnion<"type", [z$1.ZodOb
|
|
|
22270
22270
|
key: z$1.ZodString;
|
|
22271
22271
|
label: z$1.ZodString;
|
|
22272
22272
|
type: z$1.ZodLiteral<"checkbox">;
|
|
22273
|
-
required: z$1.ZodDefault<z$1.ZodBoolean>;
|
|
22274
22273
|
}, "strip", z$1.ZodTypeAny, {
|
|
22275
22274
|
type: "checkbox";
|
|
22276
22275
|
key: string;
|
|
22277
22276
|
label: string;
|
|
22278
|
-
required: boolean;
|
|
22279
22277
|
}, {
|
|
22280
22278
|
type: "checkbox";
|
|
22281
22279
|
key: string;
|
|
22282
22280
|
label: string;
|
|
22283
|
-
required?: boolean | undefined;
|
|
22284
22281
|
}>]>;
|
|
22285
22282
|
declare const CharacteristicsSchemeSchema: z$1.ZodArray<z$1.ZodDiscriminatedUnion<"type", [z$1.ZodObject<{
|
|
22286
22283
|
key: z$1.ZodString;
|
|
@@ -22386,17 +22383,14 @@ declare const CharacteristicsSchemeSchema: z$1.ZodArray<z$1.ZodDiscriminatedUnio
|
|
|
22386
22383
|
key: z$1.ZodString;
|
|
22387
22384
|
label: z$1.ZodString;
|
|
22388
22385
|
type: z$1.ZodLiteral<"checkbox">;
|
|
22389
|
-
required: z$1.ZodDefault<z$1.ZodBoolean>;
|
|
22390
22386
|
}, "strip", z$1.ZodTypeAny, {
|
|
22391
22387
|
type: "checkbox";
|
|
22392
22388
|
key: string;
|
|
22393
22389
|
label: string;
|
|
22394
|
-
required: boolean;
|
|
22395
22390
|
}, {
|
|
22396
22391
|
type: "checkbox";
|
|
22397
22392
|
key: string;
|
|
22398
22393
|
label: string;
|
|
22399
|
-
required?: boolean | undefined;
|
|
22400
22394
|
}>]>, "many">;
|
|
22401
22395
|
type Characteristic = z$1.infer<typeof CharacteristicSchema>;
|
|
22402
22396
|
type CharacteristicsScheme = z$1.infer<typeof CharacteristicsSchemeSchema>;
|
|
@@ -22509,17 +22503,14 @@ declare const CreateProductTypeSchema: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodObje
|
|
|
22509
22503
|
key: z$1.ZodString;
|
|
22510
22504
|
label: z$1.ZodString;
|
|
22511
22505
|
type: z$1.ZodLiteral<"checkbox">;
|
|
22512
|
-
required: z$1.ZodDefault<z$1.ZodBoolean>;
|
|
22513
22506
|
}, "strip", z$1.ZodTypeAny, {
|
|
22514
22507
|
type: "checkbox";
|
|
22515
22508
|
key: string;
|
|
22516
22509
|
label: string;
|
|
22517
|
-
required: boolean;
|
|
22518
22510
|
}, {
|
|
22519
22511
|
type: "checkbox";
|
|
22520
22512
|
key: string;
|
|
22521
22513
|
label: string;
|
|
22522
|
-
required?: boolean | undefined;
|
|
22523
22514
|
}>]>, "many">>>;
|
|
22524
22515
|
}, "strip", z$1.ZodTypeAny, {
|
|
22525
22516
|
name: string;
|
|
@@ -22558,7 +22549,6 @@ declare const CreateProductTypeSchema: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodObje
|
|
|
22558
22549
|
type: "checkbox";
|
|
22559
22550
|
key: string;
|
|
22560
22551
|
label: string;
|
|
22561
|
-
required: boolean;
|
|
22562
22552
|
})[] | null | undefined;
|
|
22563
22553
|
}, {
|
|
22564
22554
|
name: string;
|
|
@@ -22597,7 +22587,6 @@ declare const CreateProductTypeSchema: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodObje
|
|
|
22597
22587
|
type: "checkbox";
|
|
22598
22588
|
key: string;
|
|
22599
22589
|
label: string;
|
|
22600
|
-
required?: boolean | undefined;
|
|
22601
22590
|
})[] | null | undefined;
|
|
22602
22591
|
}>, {
|
|
22603
22592
|
name: string;
|
|
@@ -22636,7 +22625,6 @@ declare const CreateProductTypeSchema: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodObje
|
|
|
22636
22625
|
type: "checkbox";
|
|
22637
22626
|
key: string;
|
|
22638
22627
|
label: string;
|
|
22639
|
-
required: boolean;
|
|
22640
22628
|
})[] | null | undefined;
|
|
22641
22629
|
}, {
|
|
22642
22630
|
name: string;
|
|
@@ -22675,7 +22663,6 @@ declare const CreateProductTypeSchema: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodObje
|
|
|
22675
22663
|
type: "checkbox";
|
|
22676
22664
|
key: string;
|
|
22677
22665
|
label: string;
|
|
22678
|
-
required?: boolean | undefined;
|
|
22679
22666
|
})[] | null | undefined;
|
|
22680
22667
|
}>, {
|
|
22681
22668
|
name: string;
|
|
@@ -22714,7 +22701,6 @@ declare const CreateProductTypeSchema: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodObje
|
|
|
22714
22701
|
type: "checkbox";
|
|
22715
22702
|
key: string;
|
|
22716
22703
|
label: string;
|
|
22717
|
-
required: boolean;
|
|
22718
22704
|
})[] | null | undefined;
|
|
22719
22705
|
}, {
|
|
22720
22706
|
name: string;
|
|
@@ -22753,7 +22739,6 @@ declare const CreateProductTypeSchema: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodObje
|
|
|
22753
22739
|
type: "checkbox";
|
|
22754
22740
|
key: string;
|
|
22755
22741
|
label: string;
|
|
22756
|
-
required?: boolean | undefined;
|
|
22757
22742
|
})[] | null | undefined;
|
|
22758
22743
|
}>;
|
|
22759
22744
|
declare const UpdateProductTypeSchema: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodObject<{
|
|
@@ -22865,17 +22850,14 @@ declare const UpdateProductTypeSchema: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodObje
|
|
|
22865
22850
|
key: z$1.ZodString;
|
|
22866
22851
|
label: z$1.ZodString;
|
|
22867
22852
|
type: z$1.ZodLiteral<"checkbox">;
|
|
22868
|
-
required: z$1.ZodDefault<z$1.ZodBoolean>;
|
|
22869
22853
|
}, "strip", z$1.ZodTypeAny, {
|
|
22870
22854
|
type: "checkbox";
|
|
22871
22855
|
key: string;
|
|
22872
22856
|
label: string;
|
|
22873
|
-
required: boolean;
|
|
22874
22857
|
}, {
|
|
22875
22858
|
type: "checkbox";
|
|
22876
22859
|
key: string;
|
|
22877
22860
|
label: string;
|
|
22878
|
-
required?: boolean | undefined;
|
|
22879
22861
|
}>]>, "many">>>>;
|
|
22880
22862
|
}, "strip", z$1.ZodTypeAny, {
|
|
22881
22863
|
name?: string | undefined;
|
|
@@ -22914,7 +22896,6 @@ declare const UpdateProductTypeSchema: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodObje
|
|
|
22914
22896
|
type: "checkbox";
|
|
22915
22897
|
key: string;
|
|
22916
22898
|
label: string;
|
|
22917
|
-
required: boolean;
|
|
22918
22899
|
})[] | null | undefined;
|
|
22919
22900
|
}, {
|
|
22920
22901
|
name?: string | undefined;
|
|
@@ -22953,7 +22934,6 @@ declare const UpdateProductTypeSchema: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodObje
|
|
|
22953
22934
|
type: "checkbox";
|
|
22954
22935
|
key: string;
|
|
22955
22936
|
label: string;
|
|
22956
|
-
required?: boolean | undefined;
|
|
22957
22937
|
})[] | null | undefined;
|
|
22958
22938
|
}>, {
|
|
22959
22939
|
name?: string | undefined;
|
|
@@ -22992,7 +22972,6 @@ declare const UpdateProductTypeSchema: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodObje
|
|
|
22992
22972
|
type: "checkbox";
|
|
22993
22973
|
key: string;
|
|
22994
22974
|
label: string;
|
|
22995
|
-
required: boolean;
|
|
22996
22975
|
})[] | null | undefined;
|
|
22997
22976
|
}, {
|
|
22998
22977
|
name?: string | undefined;
|
|
@@ -23031,7 +23010,6 @@ declare const UpdateProductTypeSchema: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodObje
|
|
|
23031
23010
|
type: "checkbox";
|
|
23032
23011
|
key: string;
|
|
23033
23012
|
label: string;
|
|
23034
|
-
required?: boolean | undefined;
|
|
23035
23013
|
})[] | null | undefined;
|
|
23036
23014
|
}>, {
|
|
23037
23015
|
name?: string | undefined;
|
|
@@ -23070,7 +23048,6 @@ declare const UpdateProductTypeSchema: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodObje
|
|
|
23070
23048
|
type: "checkbox";
|
|
23071
23049
|
key: string;
|
|
23072
23050
|
label: string;
|
|
23073
|
-
required: boolean;
|
|
23074
23051
|
})[] | null | undefined;
|
|
23075
23052
|
}, {
|
|
23076
23053
|
name?: string | undefined;
|
|
@@ -23109,7 +23086,6 @@ declare const UpdateProductTypeSchema: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodObje
|
|
|
23109
23086
|
type: "checkbox";
|
|
23110
23087
|
key: string;
|
|
23111
23088
|
label: string;
|
|
23112
|
-
required?: boolean | undefined;
|
|
23113
23089
|
})[] | null | undefined;
|
|
23114
23090
|
}>;
|
|
23115
23091
|
declare const ProductTypeSchema: z$1.ZodObject<{
|
|
@@ -23223,17 +23199,14 @@ declare const ProductTypeSchema: z$1.ZodObject<{
|
|
|
23223
23199
|
key: z$1.ZodString;
|
|
23224
23200
|
label: z$1.ZodString;
|
|
23225
23201
|
type: z$1.ZodLiteral<"checkbox">;
|
|
23226
|
-
required: z$1.ZodDefault<z$1.ZodBoolean>;
|
|
23227
23202
|
}, "strip", z$1.ZodTypeAny, {
|
|
23228
23203
|
type: "checkbox";
|
|
23229
23204
|
key: string;
|
|
23230
23205
|
label: string;
|
|
23231
|
-
required: boolean;
|
|
23232
23206
|
}, {
|
|
23233
23207
|
type: "checkbox";
|
|
23234
23208
|
key: string;
|
|
23235
23209
|
label: string;
|
|
23236
|
-
required?: boolean | undefined;
|
|
23237
23210
|
}>]>, "many">>;
|
|
23238
23211
|
updatedAt: z$1.ZodString;
|
|
23239
23212
|
}, "strip", z$1.ZodTypeAny, {
|
|
@@ -23275,7 +23248,6 @@ declare const ProductTypeSchema: z$1.ZodObject<{
|
|
|
23275
23248
|
type: "checkbox";
|
|
23276
23249
|
key: string;
|
|
23277
23250
|
label: string;
|
|
23278
|
-
required: boolean;
|
|
23279
23251
|
})[] | null;
|
|
23280
23252
|
skuCounter: number;
|
|
23281
23253
|
}, {
|
|
@@ -23317,7 +23289,6 @@ declare const ProductTypeSchema: z$1.ZodObject<{
|
|
|
23317
23289
|
type: "checkbox";
|
|
23318
23290
|
key: string;
|
|
23319
23291
|
label: string;
|
|
23320
|
-
required?: boolean | undefined;
|
|
23321
23292
|
})[] | null;
|
|
23322
23293
|
skuCounter: number;
|
|
23323
23294
|
}>;
|
package/dist/index.d.ts
CHANGED
|
@@ -22270,17 +22270,14 @@ declare const CharacteristicSchema: z$1.ZodDiscriminatedUnion<"type", [z$1.ZodOb
|
|
|
22270
22270
|
key: z$1.ZodString;
|
|
22271
22271
|
label: z$1.ZodString;
|
|
22272
22272
|
type: z$1.ZodLiteral<"checkbox">;
|
|
22273
|
-
required: z$1.ZodDefault<z$1.ZodBoolean>;
|
|
22274
22273
|
}, "strip", z$1.ZodTypeAny, {
|
|
22275
22274
|
type: "checkbox";
|
|
22276
22275
|
key: string;
|
|
22277
22276
|
label: string;
|
|
22278
|
-
required: boolean;
|
|
22279
22277
|
}, {
|
|
22280
22278
|
type: "checkbox";
|
|
22281
22279
|
key: string;
|
|
22282
22280
|
label: string;
|
|
22283
|
-
required?: boolean | undefined;
|
|
22284
22281
|
}>]>;
|
|
22285
22282
|
declare const CharacteristicsSchemeSchema: z$1.ZodArray<z$1.ZodDiscriminatedUnion<"type", [z$1.ZodObject<{
|
|
22286
22283
|
key: z$1.ZodString;
|
|
@@ -22386,17 +22383,14 @@ declare const CharacteristicsSchemeSchema: z$1.ZodArray<z$1.ZodDiscriminatedUnio
|
|
|
22386
22383
|
key: z$1.ZodString;
|
|
22387
22384
|
label: z$1.ZodString;
|
|
22388
22385
|
type: z$1.ZodLiteral<"checkbox">;
|
|
22389
|
-
required: z$1.ZodDefault<z$1.ZodBoolean>;
|
|
22390
22386
|
}, "strip", z$1.ZodTypeAny, {
|
|
22391
22387
|
type: "checkbox";
|
|
22392
22388
|
key: string;
|
|
22393
22389
|
label: string;
|
|
22394
|
-
required: boolean;
|
|
22395
22390
|
}, {
|
|
22396
22391
|
type: "checkbox";
|
|
22397
22392
|
key: string;
|
|
22398
22393
|
label: string;
|
|
22399
|
-
required?: boolean | undefined;
|
|
22400
22394
|
}>]>, "many">;
|
|
22401
22395
|
type Characteristic = z$1.infer<typeof CharacteristicSchema>;
|
|
22402
22396
|
type CharacteristicsScheme = z$1.infer<typeof CharacteristicsSchemeSchema>;
|
|
@@ -22509,17 +22503,14 @@ declare const CreateProductTypeSchema: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodObje
|
|
|
22509
22503
|
key: z$1.ZodString;
|
|
22510
22504
|
label: z$1.ZodString;
|
|
22511
22505
|
type: z$1.ZodLiteral<"checkbox">;
|
|
22512
|
-
required: z$1.ZodDefault<z$1.ZodBoolean>;
|
|
22513
22506
|
}, "strip", z$1.ZodTypeAny, {
|
|
22514
22507
|
type: "checkbox";
|
|
22515
22508
|
key: string;
|
|
22516
22509
|
label: string;
|
|
22517
|
-
required: boolean;
|
|
22518
22510
|
}, {
|
|
22519
22511
|
type: "checkbox";
|
|
22520
22512
|
key: string;
|
|
22521
22513
|
label: string;
|
|
22522
|
-
required?: boolean | undefined;
|
|
22523
22514
|
}>]>, "many">>>;
|
|
22524
22515
|
}, "strip", z$1.ZodTypeAny, {
|
|
22525
22516
|
name: string;
|
|
@@ -22558,7 +22549,6 @@ declare const CreateProductTypeSchema: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodObje
|
|
|
22558
22549
|
type: "checkbox";
|
|
22559
22550
|
key: string;
|
|
22560
22551
|
label: string;
|
|
22561
|
-
required: boolean;
|
|
22562
22552
|
})[] | null | undefined;
|
|
22563
22553
|
}, {
|
|
22564
22554
|
name: string;
|
|
@@ -22597,7 +22587,6 @@ declare const CreateProductTypeSchema: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodObje
|
|
|
22597
22587
|
type: "checkbox";
|
|
22598
22588
|
key: string;
|
|
22599
22589
|
label: string;
|
|
22600
|
-
required?: boolean | undefined;
|
|
22601
22590
|
})[] | null | undefined;
|
|
22602
22591
|
}>, {
|
|
22603
22592
|
name: string;
|
|
@@ -22636,7 +22625,6 @@ declare const CreateProductTypeSchema: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodObje
|
|
|
22636
22625
|
type: "checkbox";
|
|
22637
22626
|
key: string;
|
|
22638
22627
|
label: string;
|
|
22639
|
-
required: boolean;
|
|
22640
22628
|
})[] | null | undefined;
|
|
22641
22629
|
}, {
|
|
22642
22630
|
name: string;
|
|
@@ -22675,7 +22663,6 @@ declare const CreateProductTypeSchema: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodObje
|
|
|
22675
22663
|
type: "checkbox";
|
|
22676
22664
|
key: string;
|
|
22677
22665
|
label: string;
|
|
22678
|
-
required?: boolean | undefined;
|
|
22679
22666
|
})[] | null | undefined;
|
|
22680
22667
|
}>, {
|
|
22681
22668
|
name: string;
|
|
@@ -22714,7 +22701,6 @@ declare const CreateProductTypeSchema: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodObje
|
|
|
22714
22701
|
type: "checkbox";
|
|
22715
22702
|
key: string;
|
|
22716
22703
|
label: string;
|
|
22717
|
-
required: boolean;
|
|
22718
22704
|
})[] | null | undefined;
|
|
22719
22705
|
}, {
|
|
22720
22706
|
name: string;
|
|
@@ -22753,7 +22739,6 @@ declare const CreateProductTypeSchema: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodObje
|
|
|
22753
22739
|
type: "checkbox";
|
|
22754
22740
|
key: string;
|
|
22755
22741
|
label: string;
|
|
22756
|
-
required?: boolean | undefined;
|
|
22757
22742
|
})[] | null | undefined;
|
|
22758
22743
|
}>;
|
|
22759
22744
|
declare const UpdateProductTypeSchema: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodObject<{
|
|
@@ -22865,17 +22850,14 @@ declare const UpdateProductTypeSchema: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodObje
|
|
|
22865
22850
|
key: z$1.ZodString;
|
|
22866
22851
|
label: z$1.ZodString;
|
|
22867
22852
|
type: z$1.ZodLiteral<"checkbox">;
|
|
22868
|
-
required: z$1.ZodDefault<z$1.ZodBoolean>;
|
|
22869
22853
|
}, "strip", z$1.ZodTypeAny, {
|
|
22870
22854
|
type: "checkbox";
|
|
22871
22855
|
key: string;
|
|
22872
22856
|
label: string;
|
|
22873
|
-
required: boolean;
|
|
22874
22857
|
}, {
|
|
22875
22858
|
type: "checkbox";
|
|
22876
22859
|
key: string;
|
|
22877
22860
|
label: string;
|
|
22878
|
-
required?: boolean | undefined;
|
|
22879
22861
|
}>]>, "many">>>>;
|
|
22880
22862
|
}, "strip", z$1.ZodTypeAny, {
|
|
22881
22863
|
name?: string | undefined;
|
|
@@ -22914,7 +22896,6 @@ declare const UpdateProductTypeSchema: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodObje
|
|
|
22914
22896
|
type: "checkbox";
|
|
22915
22897
|
key: string;
|
|
22916
22898
|
label: string;
|
|
22917
|
-
required: boolean;
|
|
22918
22899
|
})[] | null | undefined;
|
|
22919
22900
|
}, {
|
|
22920
22901
|
name?: string | undefined;
|
|
@@ -22953,7 +22934,6 @@ declare const UpdateProductTypeSchema: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodObje
|
|
|
22953
22934
|
type: "checkbox";
|
|
22954
22935
|
key: string;
|
|
22955
22936
|
label: string;
|
|
22956
|
-
required?: boolean | undefined;
|
|
22957
22937
|
})[] | null | undefined;
|
|
22958
22938
|
}>, {
|
|
22959
22939
|
name?: string | undefined;
|
|
@@ -22992,7 +22972,6 @@ declare const UpdateProductTypeSchema: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodObje
|
|
|
22992
22972
|
type: "checkbox";
|
|
22993
22973
|
key: string;
|
|
22994
22974
|
label: string;
|
|
22995
|
-
required: boolean;
|
|
22996
22975
|
})[] | null | undefined;
|
|
22997
22976
|
}, {
|
|
22998
22977
|
name?: string | undefined;
|
|
@@ -23031,7 +23010,6 @@ declare const UpdateProductTypeSchema: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodObje
|
|
|
23031
23010
|
type: "checkbox";
|
|
23032
23011
|
key: string;
|
|
23033
23012
|
label: string;
|
|
23034
|
-
required?: boolean | undefined;
|
|
23035
23013
|
})[] | null | undefined;
|
|
23036
23014
|
}>, {
|
|
23037
23015
|
name?: string | undefined;
|
|
@@ -23070,7 +23048,6 @@ declare const UpdateProductTypeSchema: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodObje
|
|
|
23070
23048
|
type: "checkbox";
|
|
23071
23049
|
key: string;
|
|
23072
23050
|
label: string;
|
|
23073
|
-
required: boolean;
|
|
23074
23051
|
})[] | null | undefined;
|
|
23075
23052
|
}, {
|
|
23076
23053
|
name?: string | undefined;
|
|
@@ -23109,7 +23086,6 @@ declare const UpdateProductTypeSchema: z$1.ZodEffects<z$1.ZodEffects<z$1.ZodObje
|
|
|
23109
23086
|
type: "checkbox";
|
|
23110
23087
|
key: string;
|
|
23111
23088
|
label: string;
|
|
23112
|
-
required?: boolean | undefined;
|
|
23113
23089
|
})[] | null | undefined;
|
|
23114
23090
|
}>;
|
|
23115
23091
|
declare const ProductTypeSchema: z$1.ZodObject<{
|
|
@@ -23223,17 +23199,14 @@ declare const ProductTypeSchema: z$1.ZodObject<{
|
|
|
23223
23199
|
key: z$1.ZodString;
|
|
23224
23200
|
label: z$1.ZodString;
|
|
23225
23201
|
type: z$1.ZodLiteral<"checkbox">;
|
|
23226
|
-
required: z$1.ZodDefault<z$1.ZodBoolean>;
|
|
23227
23202
|
}, "strip", z$1.ZodTypeAny, {
|
|
23228
23203
|
type: "checkbox";
|
|
23229
23204
|
key: string;
|
|
23230
23205
|
label: string;
|
|
23231
|
-
required: boolean;
|
|
23232
23206
|
}, {
|
|
23233
23207
|
type: "checkbox";
|
|
23234
23208
|
key: string;
|
|
23235
23209
|
label: string;
|
|
23236
|
-
required?: boolean | undefined;
|
|
23237
23210
|
}>]>, "many">>;
|
|
23238
23211
|
updatedAt: z$1.ZodString;
|
|
23239
23212
|
}, "strip", z$1.ZodTypeAny, {
|
|
@@ -23275,7 +23248,6 @@ declare const ProductTypeSchema: z$1.ZodObject<{
|
|
|
23275
23248
|
type: "checkbox";
|
|
23276
23249
|
key: string;
|
|
23277
23250
|
label: string;
|
|
23278
|
-
required: boolean;
|
|
23279
23251
|
})[] | null;
|
|
23280
23252
|
skuCounter: number;
|
|
23281
23253
|
}, {
|
|
@@ -23317,7 +23289,6 @@ declare const ProductTypeSchema: z$1.ZodObject<{
|
|
|
23317
23289
|
type: "checkbox";
|
|
23318
23290
|
key: string;
|
|
23319
23291
|
label: string;
|
|
23320
|
-
required?: boolean | undefined;
|
|
23321
23292
|
})[] | null;
|
|
23322
23293
|
skuCounter: number;
|
|
23323
23294
|
}>;
|
package/dist/index.js
CHANGED
|
@@ -10507,8 +10507,7 @@ var ToggleCharacteristicSchema = z882.object({
|
|
|
10507
10507
|
var CheckboxCharacteristicSchema = z882.object({
|
|
10508
10508
|
key: z882.string().min(1),
|
|
10509
10509
|
label: z882.string().min(1),
|
|
10510
|
-
type: z882.literal("checkbox")
|
|
10511
|
-
required: z882.boolean().default(false)
|
|
10510
|
+
type: z882.literal("checkbox")
|
|
10512
10511
|
});
|
|
10513
10512
|
var CharacteristicSchema = z882.discriminatedUnion("type", [
|
|
10514
10513
|
NumberCharacteristicSchema,
|
|
@@ -10523,7 +10522,7 @@ var SKU_COMPATIBLE_TYPES = /* @__PURE__ */ new Set(["number", "select", "toggle"
|
|
|
10523
10522
|
function validateSkuTemplate(data) {
|
|
10524
10523
|
if (data.skuMode !== "CUSTOM" || !data.skuTemplate || !data.characteristicsScheme) return true;
|
|
10525
10524
|
const skuCompatibleKeys = new Set(
|
|
10526
|
-
data.characteristicsScheme.filter((c) => c.required &&
|
|
10525
|
+
data.characteristicsScheme.filter((c) => SKU_COMPATIBLE_TYPES.has(c.type) && "required" in c && c.required).map((c) => c.key)
|
|
10527
10526
|
);
|
|
10528
10527
|
const templateKeys = [...data.skuTemplate.matchAll(/\{([a-z_]+)(?::\d+)?\}/g)].map(([, key]) => key).filter((key) => !RESERVED_SKU_KEYS.has(key));
|
|
10529
10528
|
return templateKeys.every((key) => skuCompatibleKeys.has(key));
|