@experts_hub/shared 1.0.444 → 1.0.445

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.mts CHANGED
@@ -2682,6 +2682,7 @@ declare class CreateDisputeDto {
2682
2682
  disputeType: string;
2683
2683
  description: any;
2684
2684
  comment?: string;
2685
+ dynamicFields?: Record<string, any>;
2685
2686
  }
2686
2687
 
2687
2688
  declare const UserTCPAdapter: () => MicroserviceOptions;
package/dist/index.d.ts CHANGED
@@ -2682,6 +2682,7 @@ declare class CreateDisputeDto {
2682
2682
  disputeType: string;
2683
2683
  description: any;
2684
2684
  comment?: string;
2685
+ dynamicFields?: Record<string, any>;
2685
2686
  }
2686
2687
 
2687
2688
  declare const UserTCPAdapter: () => MicroserviceOptions;
package/dist/index.js CHANGED
@@ -6740,16 +6740,14 @@ __decorateClass([
6740
6740
  ], UpdateInvoiceStatusDto.prototype, "status", 2);
6741
6741
 
6742
6742
  // src/modules/dispute/dto/create-dispute.dto.ts
6743
+ var import_types = require("class-transformer/types");
6743
6744
  var import_class_validator77 = require("class-validator");
6744
6745
  var CreateDisputeDto = class {
6745
6746
  };
6746
6747
  __decorateClass([
6747
6748
  (0, import_class_validator77.IsNotEmpty)({ message: "Please select dispute type." }),
6748
6749
  (0, import_class_validator77.IsString)(),
6749
- (0, import_class_validator77.IsIn)([
6750
- "JOB",
6751
- "INVOICE"
6752
- ])
6750
+ (0, import_class_validator77.IsIn)(["JOB", "INVOICE"])
6753
6751
  ], CreateDisputeDto.prototype, "disputeType", 2);
6754
6752
  __decorateClass([
6755
6753
  (0, import_class_validator77.IsNotEmpty)({ message: "Please enter description." }),
@@ -6761,6 +6759,12 @@ __decorateClass([
6761
6759
  (0, import_class_validator77.IsString)({ message: "Comment must be a string" }),
6762
6760
  (0, import_class_validator77.MaxLength)(500, { message: "Comment must not exceed 500 characters" })
6763
6761
  ], CreateDisputeDto.prototype, "comment", 2);
6762
+ // ensures it’s parsed as an object when passed as JSON string in multipart/form-data
6763
+ __decorateClass([
6764
+ (0, import_class_validator77.IsOptional)(),
6765
+ (0, import_class_validator77.IsObject)({ message: "Dynamic fields must be a valid object" }),
6766
+ (0, import_types.Type)(() => Object)
6767
+ ], CreateDisputeDto.prototype, "dynamicFields", 2);
6764
6768
 
6765
6769
  // src/adapters/tcp/user.tcp.adapter.ts
6766
6770
  var import_dotenv = require("dotenv");
package/dist/index.mjs CHANGED
@@ -6888,22 +6888,21 @@ __decorateClass([
6888
6888
  ], UpdateInvoiceStatusDto.prototype, "status", 2);
6889
6889
 
6890
6890
  // src/modules/dispute/dto/create-dispute.dto.ts
6891
+ import { Type as Type14 } from "class-transformer/types";
6891
6892
  import {
6892
6893
  IsString as IsString44,
6893
6894
  IsNotEmpty as IsNotEmpty67,
6894
6895
  IsIn as IsIn4,
6895
6896
  IsOptional as IsOptional42,
6896
- MaxLength as MaxLength19
6897
+ MaxLength as MaxLength19,
6898
+ IsObject
6897
6899
  } from "class-validator";
6898
6900
  var CreateDisputeDto = class {
6899
6901
  };
6900
6902
  __decorateClass([
6901
6903
  IsNotEmpty67({ message: "Please select dispute type." }),
6902
6904
  IsString44(),
6903
- IsIn4([
6904
- "JOB",
6905
- "INVOICE"
6906
- ])
6905
+ IsIn4(["JOB", "INVOICE"])
6907
6906
  ], CreateDisputeDto.prototype, "disputeType", 2);
6908
6907
  __decorateClass([
6909
6908
  IsNotEmpty67({ message: "Please enter description." }),
@@ -6915,6 +6914,12 @@ __decorateClass([
6915
6914
  IsString44({ message: "Comment must be a string" }),
6916
6915
  MaxLength19(500, { message: "Comment must not exceed 500 characters" })
6917
6916
  ], CreateDisputeDto.prototype, "comment", 2);
6917
+ // ensures it’s parsed as an object when passed as JSON string in multipart/form-data
6918
+ __decorateClass([
6919
+ IsOptional42(),
6920
+ IsObject({ message: "Dynamic fields must be a valid object" }),
6921
+ Type14(() => Object)
6922
+ ], CreateDisputeDto.prototype, "dynamicFields", 2);
6918
6923
 
6919
6924
  // src/adapters/tcp/user.tcp.adapter.ts
6920
6925
  import { config } from "dotenv";
@@ -2,4 +2,5 @@ export declare class CreateDisputeDto {
2
2
  disputeType: string;
3
3
  description: any;
4
4
  comment?: string;
5
+ dynamicFields?: Record<string, any>;
5
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@experts_hub/shared",
3
- "version": "1.0.444",
3
+ "version": "1.0.445",
4
4
  "description": "Shared DTOs, interfaces, and utilities for experts hub applications",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",