@getcommunity/gc-validators 0.0.172 → 0.0.174

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.cts CHANGED
@@ -1508,21 +1508,18 @@ type ClientContentPillarDocument = {
1508
1508
  is_active: boolean;
1509
1509
  } & BaseDocument;
1510
1510
 
1511
- declare const ReportCommentReasonOptions: ("BAD_WORDS" | "OTHER" | "DISCRIMINATION" | "IRRELEVANT" | "INAPPROPRIATE" | "SPAM")[];
1511
+ declare const ReportCommentReasonOptions: ("BAD_LANGUAGE" | "DISCRIMINATION" | "OTHER")[];
1512
1512
  declare const ReportCommentReason: {
1513
- readonly BAD_WORDS: "BAD_WORDS";
1514
- readonly OTHER: "OTHER";
1513
+ readonly BAD_LANGUAGE: "BAD_LANGUAGE";
1515
1514
  readonly DISCRIMINATION: "DISCRIMINATION";
1516
- readonly IRRELEVANT: "IRRELEVANT";
1517
- readonly INAPPROPRIATE: "INAPPROPRIATE";
1518
- readonly SPAM: "SPAM";
1515
+ readonly OTHER: "OTHER";
1519
1516
  };
1520
1517
  type ReportCommentReason = keyof typeof ReportCommentReason;
1521
1518
  type CommentReportDocument = {
1522
1519
  content: string;
1523
1520
  reason: ReportCommentReason | null;
1524
- resolved: boolean | null;
1525
1521
  related: CommentDocument[] | null;
1522
+ resolved?: boolean | null;
1526
1523
  } & BaseDocument;
1527
1524
  declare const CommentApprovalStatusOptions: ("PENDING" | "APPROVED" | "REJECTED")[];
1528
1525
  declare const CommentApprovalStatus: {
@@ -1532,20 +1529,24 @@ declare const CommentApprovalStatus: {
1532
1529
  };
1533
1530
  type CommentApprovalStatus = keyof typeof CommentApprovalStatus;
1534
1531
  type CommentDocument = {
1532
+ id: string;
1533
+ documentId: string;
1534
+ createdAt: string;
1535
+ updatedAt: string;
1535
1536
  content: string;
1536
1537
  blocked: boolean | null;
1537
1538
  blockedThread: boolean | null;
1538
1539
  removed: boolean | null;
1539
1540
  approvalStatus: CommentApprovalStatus | null;
1540
1541
  author: {
1541
- id: number;
1542
+ id: string;
1542
1543
  name: string;
1543
1544
  } | null;
1544
1545
  threadOf: {
1545
- id: number;
1546
+ id: string;
1546
1547
  } | null;
1547
1548
  children: CommentDocument[] | null;
1548
- } & BaseDocument;
1549
+ };
1549
1550
 
1550
1551
  type LeadDocument = {
1551
1552
  first_name: string;
@@ -2714,7 +2715,7 @@ declare const SReportCommentDocument: v.ObjectSchema<{
2714
2715
  readonly relation: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, "Please provide a valid string.">, v.MaxLengthAction<string, 255, "The string you provided is too long, it must be 255 characters or less.">]>;
2715
2716
  readonly commentId: v.NumberSchema<"please provide a valid id">;
2716
2717
  readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, "Please provide a valid string.">, v.MaxLengthAction<string, 5000, "The string you provided is too long, please abbreviate your string to be 5000 characters or less.">]>;
2717
- readonly reason: v.PicklistSchema<("BAD_WORDS" | "OTHER" | "DISCRIMINATION" | "IRRELEVANT" | "INAPPROPRIATE" | "SPAM")[], "You must select a valid reason for reporting this comment.">;
2718
+ readonly reason: v.PicklistSchema<("BAD_LANGUAGE" | "DISCRIMINATION" | "OTHER")[], "You must select a valid reason for reporting this comment.">;
2718
2719
  }, undefined>;
2719
2720
  type SReportCommentDocument = v.InferOutput<typeof SReportCommentDocument>;
2720
2721
 
package/dist/index.d.ts CHANGED
@@ -1508,21 +1508,18 @@ type ClientContentPillarDocument = {
1508
1508
  is_active: boolean;
1509
1509
  } & BaseDocument;
1510
1510
 
1511
- declare const ReportCommentReasonOptions: ("BAD_WORDS" | "OTHER" | "DISCRIMINATION" | "IRRELEVANT" | "INAPPROPRIATE" | "SPAM")[];
1511
+ declare const ReportCommentReasonOptions: ("BAD_LANGUAGE" | "DISCRIMINATION" | "OTHER")[];
1512
1512
  declare const ReportCommentReason: {
1513
- readonly BAD_WORDS: "BAD_WORDS";
1514
- readonly OTHER: "OTHER";
1513
+ readonly BAD_LANGUAGE: "BAD_LANGUAGE";
1515
1514
  readonly DISCRIMINATION: "DISCRIMINATION";
1516
- readonly IRRELEVANT: "IRRELEVANT";
1517
- readonly INAPPROPRIATE: "INAPPROPRIATE";
1518
- readonly SPAM: "SPAM";
1515
+ readonly OTHER: "OTHER";
1519
1516
  };
1520
1517
  type ReportCommentReason = keyof typeof ReportCommentReason;
1521
1518
  type CommentReportDocument = {
1522
1519
  content: string;
1523
1520
  reason: ReportCommentReason | null;
1524
- resolved: boolean | null;
1525
1521
  related: CommentDocument[] | null;
1522
+ resolved?: boolean | null;
1526
1523
  } & BaseDocument;
1527
1524
  declare const CommentApprovalStatusOptions: ("PENDING" | "APPROVED" | "REJECTED")[];
1528
1525
  declare const CommentApprovalStatus: {
@@ -1532,20 +1529,24 @@ declare const CommentApprovalStatus: {
1532
1529
  };
1533
1530
  type CommentApprovalStatus = keyof typeof CommentApprovalStatus;
1534
1531
  type CommentDocument = {
1532
+ id: string;
1533
+ documentId: string;
1534
+ createdAt: string;
1535
+ updatedAt: string;
1535
1536
  content: string;
1536
1537
  blocked: boolean | null;
1537
1538
  blockedThread: boolean | null;
1538
1539
  removed: boolean | null;
1539
1540
  approvalStatus: CommentApprovalStatus | null;
1540
1541
  author: {
1541
- id: number;
1542
+ id: string;
1542
1543
  name: string;
1543
1544
  } | null;
1544
1545
  threadOf: {
1545
- id: number;
1546
+ id: string;
1546
1547
  } | null;
1547
1548
  children: CommentDocument[] | null;
1548
- } & BaseDocument;
1549
+ };
1549
1550
 
1550
1551
  type LeadDocument = {
1551
1552
  first_name: string;
@@ -2714,7 +2715,7 @@ declare const SReportCommentDocument: v.ObjectSchema<{
2714
2715
  readonly relation: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, "Please provide a valid string.">, v.MaxLengthAction<string, 255, "The string you provided is too long, it must be 255 characters or less.">]>;
2715
2716
  readonly commentId: v.NumberSchema<"please provide a valid id">;
2716
2717
  readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, "Please provide a valid string.">, v.MaxLengthAction<string, 5000, "The string you provided is too long, please abbreviate your string to be 5000 characters or less.">]>;
2717
- readonly reason: v.PicklistSchema<("BAD_WORDS" | "OTHER" | "DISCRIMINATION" | "IRRELEVANT" | "INAPPROPRIATE" | "SPAM")[], "You must select a valid reason for reporting this comment.">;
2718
+ readonly reason: v.PicklistSchema<("BAD_LANGUAGE" | "DISCRIMINATION" | "OTHER")[], "You must select a valid reason for reporting this comment.">;
2718
2719
  }, undefined>;
2719
2720
  type SReportCommentDocument = v.InferOutput<typeof SReportCommentDocument>;
2720
2721
 
package/dist/index.js CHANGED
@@ -106,11 +106,11 @@ var ROLE_PERMISSIONS = {
106
106
  create: true,
107
107
  update: (u, p, d) => {
108
108
  var _a;
109
- return u.id === ((_a = d == null ? void 0 : d.author) == null ? void 0 : _a.id);
109
+ return u.id === Number((_a = d == null ? void 0 : d.author) == null ? void 0 : _a.id);
110
110
  },
111
111
  delete: (u, p, d) => {
112
112
  var _a;
113
- return u.id === ((_a = d == null ? void 0 : d.author) == null ? void 0 : _a.id);
113
+ return u.id === Number((_a = d == null ? void 0 : d.author) == null ? void 0 : _a.id);
114
114
  },
115
115
  report: true
116
116
  },
@@ -352,11 +352,11 @@ var ROLE_PERMISSIONS = {
352
352
  create: true,
353
353
  update: (u, p, d) => {
354
354
  var _a;
355
- return u.id === ((_a = d == null ? void 0 : d.author) == null ? void 0 : _a.id);
355
+ return u.id === Number((_a = d == null ? void 0 : d.author) == null ? void 0 : _a.id);
356
356
  },
357
357
  delete: (u, p, d) => {
358
358
  var _a;
359
- return u.id === ((_a = d == null ? void 0 : d.author) == null ? void 0 : _a.id);
359
+ return u.id === Number((_a = d == null ? void 0 : d.author) == null ? void 0 : _a.id);
360
360
  },
361
361
  report: true
362
362
  },
@@ -488,7 +488,7 @@ var ROLE_PERMISSIONS = {
488
488
  create: true,
489
489
  update: (u, p, d) => {
490
490
  var _a;
491
- return u.id === ((_a = d == null ? void 0 : d.author) == null ? void 0 : _a.id);
491
+ return u.id === Number((_a = d == null ? void 0 : d.author) == null ? void 0 : _a.id);
492
492
  },
493
493
  delete: true,
494
494
  report: true
@@ -612,11 +612,11 @@ var ROLE_PERMISSIONS = {
612
612
  create: true,
613
613
  update: (u, p, d) => {
614
614
  var _a;
615
- return u.id === ((_a = d == null ? void 0 : d.author) == null ? void 0 : _a.id);
615
+ return u.id === Number((_a = d == null ? void 0 : d.author) == null ? void 0 : _a.id);
616
616
  },
617
617
  delete: (u, p, d) => {
618
618
  var _a;
619
- return u.id === ((_a = d == null ? void 0 : d.author) == null ? void 0 : _a.id);
619
+ return u.id === Number((_a = d == null ? void 0 : d.author) == null ? void 0 : _a.id);
620
620
  },
621
621
  report: true
622
622
  },
@@ -845,12 +845,9 @@ var ClientProjectPhaseOptions = [
845
845
 
846
846
  // src/types/documents/comment.document.ts
847
847
  var ReportCommentReason = {
848
- BAD_WORDS: "BAD_WORDS",
849
- OTHER: "OTHER",
848
+ BAD_LANGUAGE: "BAD_LANGUAGE",
850
849
  DISCRIMINATION: "DISCRIMINATION",
851
- IRRELEVANT: "IRRELEVANT",
852
- INAPPROPRIATE: "INAPPROPRIATE",
853
- SPAM: "SPAM"
850
+ OTHER: "OTHER"
854
851
  };
855
852
  var ReportCommentReasonOptions = Object.values(ReportCommentReason);
856
853
  var CommentApprovalStatus = {