@floristcloud/api-lib 1.2.32 → 1.2.35

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.
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MoyskladOrderStateMappingSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const order_status_enum_1 = require("../../../enum/order-status.enum");
6
- // zod 3.x quirk: `z.record(nativeEnum(...), V)` infers as non-partial Record<K, V>,
7
- // but its runtime behaviour is partial (missing keys pass validation). We assert the
8
- // schema's TS type so callers see the truthful Partial<Record<...>> everywhere.
6
+ // MS state id is an external identifier don't enforce a UUID shape here.
7
+ // Empty string means "unmap this status"; the server normalizes empties away
8
+ // and validates remaining values against the live MS state list.
9
9
  exports.MoyskladOrderStateMappingSchema = zod_1.z
10
- .record(zod_1.z.nativeEnum(order_status_enum_1.OrderStatusEnum), zod_1.z.string().uuid())
10
+ .partialRecord(zod_1.z.nativeEnum(order_status_enum_1.OrderStatusEnum), zod_1.z.string())
11
11
  .nullable();
@@ -4,4 +4,5 @@ exports.ConsignmentImportNameConventionEnum = void 0;
4
4
  var ConsignmentImportNameConventionEnum;
5
5
  (function (ConsignmentImportNameConventionEnum) {
6
6
  ConsignmentImportNameConventionEnum["INVOICE_V1"] = "INVOICE_V1";
7
+ ConsignmentImportNameConventionEnum["INVOICE_V2"] = "INVOICE_V2";
7
8
  })(ConsignmentImportNameConventionEnum || (exports.ConsignmentImportNameConventionEnum = ConsignmentImportNameConventionEnum = {}));
@@ -3,9 +3,9 @@ import { OrderStatusEnum } from '../../../enum/order-status.enum';
3
3
 
4
4
  export type MoyskladOrderStateMapping = Partial<Record<OrderStatusEnum, string>>;
5
5
 
6
- // zod 3.x quirk: `z.record(nativeEnum(...), V)` infers as non-partial Record<K, V>,
7
- // but its runtime behaviour is partial (missing keys pass validation). We assert the
8
- // schema's TS type so callers see the truthful Partial<Record<...>> everywhere.
6
+ // MS state id is an external identifier don't enforce a UUID shape here.
7
+ // Empty string means "unmap this status"; the server normalizes empties away
8
+ // and validates remaining values against the live MS state list.
9
9
  export const MoyskladOrderStateMappingSchema = z
10
- .record(z.nativeEnum(OrderStatusEnum), z.string().uuid())
10
+ .partialRecord(z.nativeEnum(OrderStatusEnum), z.string())
11
11
  .nullable() as z.ZodType<MoyskladOrderStateMapping | null>;
@@ -1,3 +1,4 @@
1
1
  export enum ConsignmentImportNameConventionEnum {
2
2
  INVOICE_V1 = 'INVOICE_V1',
3
+ INVOICE_V2 = 'INVOICE_V2',
3
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floristcloud/api-lib",
3
- "version": "1.2.32",
3
+ "version": "1.2.35",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "scripts": {