@jsdev_ninja/core 0.15.2 → 0.15.3

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.
@@ -1860,6 +1860,26 @@ export declare const OrderSchema: z.ZodObject<{
1860
1860
  emailOnInvoice: z.ZodOptional<z.ZodString>;
1861
1861
  phoneNumberOnInvoice: z.ZodOptional<z.ZodString>;
1862
1862
  clientComment: z.ZodOptional<z.ZodString>;
1863
+ companyName: z.ZodOptional<z.ZodString>;
1864
+ companyNumber: z.ZodOptional<z.ZodString>;
1865
+ contact: z.ZodOptional<z.ZodObject<{
1866
+ fullName: z.ZodOptional<z.ZodString>;
1867
+ role: z.ZodOptional<z.ZodString>;
1868
+ phone: z.ZodOptional<z.ZodString>;
1869
+ email: z.ZodOptional<z.ZodString>;
1870
+ }, "strip", z.ZodTypeAny, {
1871
+ email?: string | undefined;
1872
+ phone?: string | undefined;
1873
+ fullName?: string | undefined;
1874
+ role?: string | undefined;
1875
+ }, {
1876
+ email?: string | undefined;
1877
+ phone?: string | undefined;
1878
+ fullName?: string | undefined;
1879
+ role?: string | undefined;
1880
+ }>>;
1881
+ poNumber: z.ZodOptional<z.ZodString>;
1882
+ outOfStockPolicy: z.ZodOptional<z.ZodEnum<["substitute", "remove"]>>;
1863
1883
  organizationId: z.ZodOptional<z.ZodString>;
1864
1884
  billingAccount: z.ZodOptional<z.ZodObject<{
1865
1885
  number: z.ZodString;
@@ -2498,6 +2518,7 @@ export declare const OrderSchema: z.ZodObject<{
2498
2518
  deliveryPrice?: number | undefined;
2499
2519
  };
2500
2520
  deliveryDate: number;
2521
+ companyName?: string | undefined;
2501
2522
  address?: {
2502
2523
  country?: string | undefined;
2503
2524
  city?: string | undefined;
@@ -2510,6 +2531,7 @@ export declare const OrderSchema: z.ZodObject<{
2510
2531
  paymentType?: "none" | "external" | "j5" | undefined;
2511
2532
  organizationId?: string | undefined;
2512
2533
  nameOnInvoice?: string | undefined;
2534
+ companyNumber?: string | undefined;
2513
2535
  createdBy?: "user" | "admin" | undefined;
2514
2536
  storeOptions?: {
2515
2537
  deliveryPrice?: number | undefined;
@@ -2548,6 +2570,14 @@ export declare const OrderSchema: z.ZodObject<{
2548
2570
  emailOnInvoice?: string | undefined;
2549
2571
  phoneNumberOnInvoice?: string | undefined;
2550
2572
  clientComment?: string | undefined;
2573
+ contact?: {
2574
+ email?: string | undefined;
2575
+ phone?: string | undefined;
2576
+ fullName?: string | undefined;
2577
+ role?: string | undefined;
2578
+ } | undefined;
2579
+ poNumber?: string | undefined;
2580
+ outOfStockPolicy?: "substitute" | "remove" | undefined;
2551
2581
  billingAccount?: {
2552
2582
  number: string;
2553
2583
  id: string;
@@ -2869,6 +2899,7 @@ export declare const OrderSchema: z.ZodObject<{
2869
2899
  deliveryPrice?: number | undefined;
2870
2900
  };
2871
2901
  deliveryDate: number;
2902
+ companyName?: string | undefined;
2872
2903
  address?: {
2873
2904
  country?: string | undefined;
2874
2905
  city?: string | undefined;
@@ -2881,6 +2912,7 @@ export declare const OrderSchema: z.ZodObject<{
2881
2912
  paymentType?: "none" | "external" | "j5" | undefined;
2882
2913
  organizationId?: string | undefined;
2883
2914
  nameOnInvoice?: string | undefined;
2915
+ companyNumber?: string | undefined;
2884
2916
  createdBy?: "user" | "admin" | undefined;
2885
2917
  storeOptions?: {
2886
2918
  deliveryPrice?: number | undefined;
@@ -2919,6 +2951,14 @@ export declare const OrderSchema: z.ZodObject<{
2919
2951
  emailOnInvoice?: string | undefined;
2920
2952
  phoneNumberOnInvoice?: string | undefined;
2921
2953
  clientComment?: string | undefined;
2954
+ contact?: {
2955
+ email?: string | undefined;
2956
+ phone?: string | undefined;
2957
+ fullName?: string | undefined;
2958
+ role?: string | undefined;
2959
+ } | undefined;
2960
+ poNumber?: string | undefined;
2961
+ outOfStockPolicy?: "substitute" | "remove" | undefined;
2922
2962
  billingAccount?: {
2923
2963
  number: string;
2924
2964
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Order.d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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkEtB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
@@ -57,6 +57,19 @@ export const OrderSchema = z.object({
57
57
  emailOnInvoice: z.string().email().optional(),
58
58
  phoneNumberOnInvoice: z.string().optional(),
59
59
  clientComment: z.string().optional(),
60
+ // --- B2B buyer details (optional, additive — back-compat) ---
61
+ companyName: z.string().optional(),
62
+ companyNumber: z.string().optional(), // ח.פ / עוסק מורשה (aligns with Organization.companyNumber)
63
+ contact: z
64
+ .object({
65
+ fullName: z.string().optional(),
66
+ role: z.string().optional(), // תפקיד
67
+ phone: z.string().optional(),
68
+ email: z.string().optional(),
69
+ })
70
+ .optional(),
71
+ poNumber: z.string().optional(), // הזמנת רכש
72
+ outOfStockPolicy: z.enum(["substitute", "remove"]).optional(),
60
73
  organizationId: z.string().optional(),
61
74
  billingAccount: BillingAccountSchema.optional(),
62
75
  deliveryNote: DeliveryNoteSchema.optional(),