@homespot-sdk/core 0.0.339 → 0.0.341

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.
@@ -178,6 +178,118 @@ export const UpdateEmailRequestSchema = {
178
178
  },
179
179
  required: ['email'],
180
180
  };
181
+ export const CommentBodyRequestSchema = {
182
+ type: 'object',
183
+ properties: {
184
+ body: {
185
+ type: 'string',
186
+ maxLength: 4000,
187
+ minLength: 0,
188
+ },
189
+ },
190
+ required: ['body'],
191
+ };
192
+ export const SetTaskValueRequestSchema = {
193
+ type: 'object',
194
+ properties: {
195
+ value: {
196
+ type: 'number',
197
+ },
198
+ },
199
+ };
200
+ export const TransferTaskRequestSchema = {
201
+ type: 'object',
202
+ properties: {
203
+ targetBoardId: {
204
+ type: 'string',
205
+ format: 'uuid',
206
+ },
207
+ targetStageId: {
208
+ type: 'string',
209
+ format: 'uuid',
210
+ },
211
+ },
212
+ required: ['targetBoardId', 'targetStageId'],
213
+ };
214
+ export const RenameTaskRequestSchema = {
215
+ type: 'object',
216
+ properties: {
217
+ title: {
218
+ type: 'string',
219
+ },
220
+ },
221
+ required: ['title'],
222
+ };
223
+ export const MoveTaskRequestSchema = {
224
+ type: 'object',
225
+ properties: {
226
+ targetStageId: {
227
+ type: 'string',
228
+ format: 'uuid',
229
+ },
230
+ },
231
+ required: ['targetStageId'],
232
+ };
233
+ export const MarkTaskLostRequestSchema = {
234
+ type: 'object',
235
+ properties: {
236
+ reason: {
237
+ type: 'string',
238
+ enum: [
239
+ 'NOT_WORKING_WITH_AGENTS',
240
+ 'NOT_RESPONDING',
241
+ 'ALREADY_SOLD',
242
+ 'COULD_NOT_NEGOTIATE_PRICE',
243
+ 'CHOSE_ANOTHER_AGENCY',
244
+ 'CHANGED_PLANS',
245
+ 'OUT_OF_BUDGET',
246
+ 'SPAM',
247
+ 'OTHER',
248
+ ],
249
+ },
250
+ },
251
+ required: ['reason'],
252
+ };
253
+ export const SetExpectedCloseDateRequestSchema = {
254
+ type: 'object',
255
+ properties: {
256
+ expectedCloseDate: {
257
+ type: 'string',
258
+ format: 'date',
259
+ },
260
+ },
261
+ };
262
+ export const DescribeTaskRequestSchema = {
263
+ type: 'object',
264
+ properties: {
265
+ description: {
266
+ type: 'string',
267
+ },
268
+ },
269
+ };
270
+ export const SetTaskCommissionRequestSchema = {
271
+ type: 'object',
272
+ properties: {
273
+ type: {
274
+ type: 'string',
275
+ enum: ['NOT_SET', 'FIXED', 'PERCENTAGE', 'MONTHS_OF_RENT'],
276
+ },
277
+ value: {
278
+ type: 'number',
279
+ description: 'Amount for FIXED, fraction (0,1] for PERCENTAGE, factor for MONTHS_OF_RENT',
280
+ },
281
+ },
282
+ required: ['type'],
283
+ };
284
+ export const RenameTodoRequestSchema = {
285
+ type: 'object',
286
+ properties: {
287
+ title: {
288
+ type: 'string',
289
+ },
290
+ },
291
+ required: ['title'],
292
+ };
181
293
  export const RolesRequestSchema = {
182
294
  type: 'object',
183
295
  properties: {
@@ -203,6 +315,9 @@ export const RolesRequestSchema = {
203
315
  'MANAGE_CONTACT',
204
316
  'MANAGE_ANY_CONTACT',
205
317
  'ASSIGN_CONTACT',
318
+ 'MANAGE_BOARD',
319
+ 'MANAGE_DEAL',
320
+ 'DELETE_DEAL',
206
321
  ],
207
322
  },
208
323
  },
@@ -445,17 +560,6 @@ export const RecommendListingRequestSchema = {
445
560
  },
446
561
  required: ['externalListingId', 'externalPropertyId'],
447
562
  };
448
- export const CommentBodyRequestSchema = {
449
- type: 'object',
450
- properties: {
451
- body: {
452
- type: 'string',
453
- maxLength: 4000,
454
- minLength: 0,
455
- },
456
- },
457
- required: ['body'],
458
- };
459
563
  export const PhoneRequestSchema = {
460
564
  type: 'object',
461
565
  properties: {
@@ -519,86 +623,100 @@ export const UpdateContactDetailsRequestSchema = {
519
623
  nullifyFavoriteContactMethod: {
520
624
  type: 'boolean',
521
625
  },
522
- status: {
626
+ },
627
+ };
628
+ export const ReassignMemberRequestSchema = {
629
+ type: 'object',
630
+ properties: {
631
+ memberId: {
523
632
  type: 'string',
524
- enum: [
525
- 'NEW',
526
- 'ON_HOLD',
527
- 'COLD',
528
- 'WARM',
529
- 'HOT',
530
- 'WAITING_PAYMENT',
531
- 'LOST',
532
- 'WON',
533
- ],
633
+ format: 'uuid',
534
634
  },
535
- priority: {
536
- type: 'string',
537
- enum: ['CRITICAL', 'HIGH', 'MEDIUM', 'LOW'],
635
+ },
636
+ required: ['memberId'],
637
+ };
638
+ export const ContactMergeRequestSchema = {
639
+ type: 'object',
640
+ properties: {
641
+ survivorContactId: {
642
+ type: 'integer',
643
+ format: 'int64',
644
+ },
645
+ loserContactId: {
646
+ type: 'integer',
647
+ format: 'int64',
538
648
  },
539
649
  },
650
+ required: ['loserContactId', 'survivorContactId'],
540
651
  };
541
- export const ReopenRequestSchema = {
652
+ export const RenameRequestSchema = {
542
653
  type: 'object',
543
654
  properties: {
544
- status: {
655
+ name: {
545
656
  type: 'string',
546
- enum: [
547
- 'NEW',
548
- 'ON_HOLD',
549
- 'COLD',
550
- 'WARM',
551
- 'HOT',
552
- 'WAITING_PAYMENT',
553
- 'LOST',
554
- 'WON',
555
- ],
556
657
  },
557
658
  },
659
+ required: ['name'],
558
660
  };
559
- export const RecordLostContactRequestSchema = {
661
+ export const ReorderTodoTemplatesRequestSchema = {
560
662
  type: 'object',
561
663
  properties: {
562
- reason: {
664
+ templateIds: {
665
+ type: 'array',
666
+ items: {
667
+ type: 'string',
668
+ format: 'uuid',
669
+ },
670
+ },
671
+ },
672
+ required: ['templateIds'],
673
+ };
674
+ export const RecolorStageRequestSchema = {
675
+ type: 'object',
676
+ properties: {
677
+ color: {
563
678
  type: 'string',
564
- enum: [
565
- 'NOT_WORKING_WITH_AGENTS',
566
- 'NOT_RESPONDING',
567
- 'ALREADY_SOLD',
568
- 'COULD_NOT_NEGOTIATE_PRICE',
569
- 'CHOSE_ANOTHER_AGENCY',
570
- 'CHANGED_PLANS',
571
- 'OUT_OF_BUDGET',
572
- 'SPAM',
573
- 'OTHER',
574
- ],
679
+ example: '#4F46E5',
575
680
  },
576
681
  },
577
- required: ['reason'],
682
+ required: ['color'],
578
683
  };
579
- export const ReassignMemberRequestSchema = {
684
+ export const DeactivateStageRequestSchema = {
580
685
  type: 'object',
581
686
  properties: {
582
- memberId: {
687
+ migrateToStageId: {
583
688
  type: 'string',
584
689
  format: 'uuid',
585
690
  },
586
691
  },
587
- required: ['memberId'],
588
692
  };
589
- export const ContactMergeRequestSchema = {
693
+ export const ReorderStagesRequestSchema = {
590
694
  type: 'object',
591
695
  properties: {
592
- survivorContactId: {
593
- type: 'integer',
594
- format: 'int64',
696
+ stageIds: {
697
+ type: 'array',
698
+ items: {
699
+ type: 'string',
700
+ format: 'uuid',
701
+ },
595
702
  },
596
- loserContactId: {
597
- type: 'integer',
598
- format: 'int64',
703
+ },
704
+ required: ['stageIds'],
705
+ };
706
+ export const SetTaskSettingsRequestSchema = {
707
+ type: 'object',
708
+ properties: {
709
+ defaultBoardId: {
710
+ type: 'string',
711
+ format: 'uuid',
712
+ },
713
+ defaultStageId: {
714
+ type: 'string',
715
+ format: 'uuid',
716
+ description: 'Active stage of the default board; null = entry stage at use time',
599
717
  },
600
718
  },
601
- required: ['loserContactId', 'survivorContactId'],
719
+ required: ['defaultBoardId'],
602
720
  };
603
721
  export const AddressRequestSchema = {
604
722
  type: 'object',
@@ -770,82 +888,177 @@ export const DepositFundsRequestSchema = {
770
888
  },
771
889
  required: ['amount'],
772
890
  };
773
- export const SubscribeRequestSchema = {
891
+ export const ConnectLinkResponseSchema = {
774
892
  type: 'object',
775
893
  properties: {
776
- plan: {
777
- type: 'string',
778
- enum: ['STARTER', 'PRO', 'ENTERPRISE'],
779
- },
780
- billingCycle: {
781
- type: 'string',
782
- enum: ['MONTHLY', 'ANNUAL'],
783
- },
784
- name: {
785
- type: 'string',
786
- },
787
- email: {
894
+ link: {
788
895
  type: 'string',
789
- format: 'email',
790
896
  },
791
- phone: {
897
+ expiresAt: {
792
898
  type: 'string',
899
+ format: 'date-time',
793
900
  },
794
- subdomain: {
901
+ },
902
+ };
903
+ export const IdResponseUUIDSchema = {
904
+ type: 'object',
905
+ properties: {
906
+ id: {
795
907
  type: 'string',
796
- },
797
- address: {
798
- $ref: '#/components/schemas/SubscriptionAddressRequest',
908
+ format: 'uuid',
799
909
  },
800
910
  },
801
- required: [
802
- 'address',
803
- 'billingCycle',
804
- 'email',
805
- 'name',
806
- 'phone',
807
- 'plan',
808
- 'subdomain',
809
- ],
911
+ required: ['id'],
810
912
  };
811
- export const SubscriptionAddressRequestSchema = {
913
+ export const OpenTaskRequestSchema = {
812
914
  type: 'object',
813
915
  properties: {
814
- country: {
916
+ boardId: {
815
917
  type: 'string',
816
- maxLength: 100,
817
- minLength: 0,
918
+ format: 'uuid',
818
919
  },
819
- city: {
920
+ stageId: {
820
921
  type: 'string',
821
- maxLength: 100,
822
- minLength: 0,
922
+ format: 'uuid',
923
+ description: "Target stage; defaults to the board's entry stage",
823
924
  },
824
- district: {
925
+ title: {
825
926
  type: 'string',
826
- maxLength: 100,
827
- minLength: 0,
828
927
  },
829
- subdistrict: {
830
- type: 'string',
831
- maxLength: 100,
832
- minLength: 0,
928
+ contactIds: {
929
+ type: 'array',
930
+ items: {
931
+ type: 'integer',
932
+ format: 'int64',
933
+ },
934
+ maxItems: 20,
935
+ minItems: 0,
833
936
  },
834
- street: {
937
+ ownerId: {
835
938
  type: 'string',
836
- maxLength: 255,
837
- minLength: 0,
939
+ format: 'uuid',
940
+ description: 'Defaults to the acting member',
838
941
  },
839
942
  },
840
- required: ['city', 'country', 'district', 'street', 'subdistrict'],
943
+ required: ['boardId', 'title'],
841
944
  };
842
- export const SubscriptionCheckoutResponseSchema = {
945
+ export const LinkPropertyRequestSchema = {
843
946
  type: 'object',
844
947
  properties: {
845
- checkoutUrl: {
846
- type: 'string',
948
+ contactId: {
949
+ type: 'integer',
950
+ format: 'int64',
847
951
  },
848
- agencyId: {
952
+ propertyId: {
953
+ type: 'integer',
954
+ format: 'int64',
955
+ },
956
+ },
957
+ required: ['contactId', 'propertyId'],
958
+ };
959
+ export const LinkInterestRequestSchema = {
960
+ type: 'object',
961
+ properties: {
962
+ contactId: {
963
+ type: 'integer',
964
+ format: 'int64',
965
+ },
966
+ interestId: {
967
+ type: 'integer',
968
+ format: 'int64',
969
+ },
970
+ },
971
+ required: ['contactId', 'interestId'],
972
+ };
973
+ export const CreateAdHocTodoRequestSchema = {
974
+ type: 'object',
975
+ properties: {
976
+ taskId: {
977
+ type: 'string',
978
+ format: 'uuid',
979
+ },
980
+ title: {
981
+ type: 'string',
982
+ },
983
+ },
984
+ required: ['taskId', 'title'],
985
+ };
986
+ export const SubscribeRequestSchema = {
987
+ type: 'object',
988
+ properties: {
989
+ plan: {
990
+ type: 'string',
991
+ enum: ['STARTER', 'PRO', 'ENTERPRISE'],
992
+ },
993
+ billingCycle: {
994
+ type: 'string',
995
+ enum: ['MONTHLY', 'ANNUAL'],
996
+ },
997
+ name: {
998
+ type: 'string',
999
+ },
1000
+ email: {
1001
+ type: 'string',
1002
+ format: 'email',
1003
+ },
1004
+ phone: {
1005
+ type: 'string',
1006
+ },
1007
+ subdomain: {
1008
+ type: 'string',
1009
+ },
1010
+ address: {
1011
+ $ref: '#/components/schemas/SubscriptionAddressRequest',
1012
+ },
1013
+ },
1014
+ required: [
1015
+ 'address',
1016
+ 'billingCycle',
1017
+ 'email',
1018
+ 'name',
1019
+ 'phone',
1020
+ 'plan',
1021
+ 'subdomain',
1022
+ ],
1023
+ };
1024
+ export const SubscriptionAddressRequestSchema = {
1025
+ type: 'object',
1026
+ properties: {
1027
+ country: {
1028
+ type: 'string',
1029
+ maxLength: 100,
1030
+ minLength: 0,
1031
+ },
1032
+ city: {
1033
+ type: 'string',
1034
+ maxLength: 100,
1035
+ minLength: 0,
1036
+ },
1037
+ district: {
1038
+ type: 'string',
1039
+ maxLength: 100,
1040
+ minLength: 0,
1041
+ },
1042
+ subdistrict: {
1043
+ type: 'string',
1044
+ maxLength: 100,
1045
+ minLength: 0,
1046
+ },
1047
+ street: {
1048
+ type: 'string',
1049
+ maxLength: 255,
1050
+ minLength: 0,
1051
+ },
1052
+ },
1053
+ required: ['city', 'country', 'district', 'street', 'subdistrict'],
1054
+ };
1055
+ export const SubscriptionCheckoutResponseSchema = {
1056
+ type: 'object',
1057
+ properties: {
1058
+ checkoutUrl: {
1059
+ type: 'string',
1060
+ },
1061
+ agencyId: {
849
1062
  type: 'string',
850
1063
  format: 'uuid',
851
1064
  },
@@ -1155,6 +1368,9 @@ export const AgencyPrincipalDtoSchema = {
1155
1368
  'MANAGE_CONTACT',
1156
1369
  'MANAGE_ANY_CONTACT',
1157
1370
  'ASSIGN_CONTACT',
1371
+ 'MANAGE_BOARD',
1372
+ 'MANAGE_DEAL',
1373
+ 'DELETE_DEAL',
1158
1374
  ],
1159
1375
  },
1160
1376
  uniqueItems: true,
@@ -1208,16 +1424,6 @@ export const ProblemDetailSchema = {
1208
1424
  },
1209
1425
  },
1210
1426
  };
1211
- export const IdResponseUUIDSchema = {
1212
- type: 'object',
1213
- properties: {
1214
- id: {
1215
- type: 'string',
1216
- format: 'uuid',
1217
- },
1218
- },
1219
- required: ['id'],
1220
- };
1221
1427
  export const AddDealRequestSchema = {
1222
1428
  discriminator: {
1223
1429
  propertyName: 'type',
@@ -1408,10 +1614,6 @@ export const OnboardClientRequestSchema = {
1408
1614
  type: 'string',
1409
1615
  enum: ['WHATSAPP', 'VIBER', 'PHONE_CALL'],
1410
1616
  },
1411
- priority: {
1412
- type: 'string',
1413
- enum: ['CRITICAL', 'HIGH', 'MEDIUM', 'LOW'],
1414
- },
1415
1617
  },
1416
1618
  required: ['contactInfo', 'contactMethods', 'phoneNumber'],
1417
1619
  };
@@ -1474,6 +1676,66 @@ export const OnboardFromSourceRequestSchema = {
1474
1676
  },
1475
1677
  required: ['phone', 'sourceLink'],
1476
1678
  };
1679
+ export const CreateBoardRequestSchema = {
1680
+ type: 'object',
1681
+ properties: {
1682
+ kind: {
1683
+ type: 'string',
1684
+ enum: ['OWNER', 'SEEKER'],
1685
+ },
1686
+ name: {
1687
+ type: 'string',
1688
+ },
1689
+ stages: {
1690
+ type: 'array',
1691
+ items: {
1692
+ $ref: '#/components/schemas/StageSpecRequest',
1693
+ },
1694
+ maxItems: 30,
1695
+ minItems: 0,
1696
+ },
1697
+ },
1698
+ required: ['name'],
1699
+ };
1700
+ export const StageSpecRequestSchema = {
1701
+ type: 'object',
1702
+ properties: {
1703
+ name: {
1704
+ type: 'string',
1705
+ },
1706
+ color: {
1707
+ type: 'string',
1708
+ example: '#4F46E5',
1709
+ },
1710
+ },
1711
+ required: ['color', 'name'],
1712
+ };
1713
+ export const AddStageRequestSchema = {
1714
+ type: 'object',
1715
+ properties: {
1716
+ name: {
1717
+ type: 'string',
1718
+ },
1719
+ color: {
1720
+ type: 'string',
1721
+ example: '#4F46E5',
1722
+ },
1723
+ },
1724
+ required: ['color', 'name'],
1725
+ };
1726
+ export const AddTodoTemplateRequestSchema = {
1727
+ type: 'object',
1728
+ properties: {
1729
+ title: {
1730
+ type: 'string',
1731
+ },
1732
+ applyToTasksInStage: {
1733
+ type: 'boolean',
1734
+ description: 'Also spawn this template onto the open tasks currently in the stage',
1735
+ },
1736
+ },
1737
+ required: ['applyToTasksInStage', 'title'],
1738
+ };
1477
1739
  export const ProvisionAgencyRequestSchema = {
1478
1740
  type: 'object',
1479
1741
  properties: {
@@ -1556,106 +1818,1066 @@ export const AdminProvisionResponseSchema = {
1556
1818
  },
1557
1819
  },
1558
1820
  };
1559
- export const OrganizationSummaryViewResponseSchema = {
1821
+ export const OrganizationSummaryViewResponseSchema = {
1822
+ type: 'object',
1823
+ properties: {
1824
+ agencyId: {
1825
+ type: 'string',
1826
+ format: 'uuid',
1827
+ },
1828
+ isOwner: {
1829
+ type: 'boolean',
1830
+ },
1831
+ agencyName: {
1832
+ type: 'string',
1833
+ },
1834
+ subdomain: {
1835
+ type: 'string',
1836
+ },
1837
+ roleId: {
1838
+ type: 'integer',
1839
+ format: 'int32',
1840
+ },
1841
+ memberId: {
1842
+ type: 'string',
1843
+ format: 'uuid',
1844
+ },
1845
+ profilePictureUrl: {
1846
+ type: 'string',
1847
+ },
1848
+ roleName: {
1849
+ type: 'string',
1850
+ },
1851
+ permissions: {
1852
+ type: 'array',
1853
+ items: {
1854
+ type: 'string',
1855
+ enum: [
1856
+ 'MANAGE_AGENCY',
1857
+ 'MANAGE_ROLE',
1858
+ 'MANAGE_MEMBER',
1859
+ 'CREATE_DELETE_MEMBER',
1860
+ 'CREATE_CONTACT',
1861
+ 'DELETE_CONTACT',
1862
+ 'MANAGE_CONTACT',
1863
+ 'MANAGE_ANY_CONTACT',
1864
+ 'ASSIGN_CONTACT',
1865
+ 'MANAGE_BOARD',
1866
+ 'MANAGE_DEAL',
1867
+ 'DELETE_DEAL',
1868
+ ],
1869
+ },
1870
+ },
1871
+ status: {
1872
+ type: 'string',
1873
+ enum: ['NEW', 'ACTIVE', 'PAYMENT_FAILED', 'INACTIVE', 'SUSPENDED'],
1874
+ },
1875
+ phone: {
1876
+ type: 'string',
1877
+ },
1878
+ isPhoneVerified: {
1879
+ type: 'boolean',
1880
+ },
1881
+ },
1882
+ required: [
1883
+ 'agencyId',
1884
+ 'agencyName',
1885
+ 'isOwner',
1886
+ 'isPhoneVerified',
1887
+ 'memberId',
1888
+ 'permissions',
1889
+ 'phone',
1890
+ 'roleName',
1891
+ 'status',
1892
+ 'subdomain',
1893
+ ],
1894
+ };
1895
+ export const UserContextViewResponseSchema = {
1896
+ type: 'object',
1897
+ properties: {
1898
+ user: {
1899
+ $ref: '#/components/schemas/UserSummaryViewResponse',
1900
+ },
1901
+ organizations: {
1902
+ type: 'array',
1903
+ items: {
1904
+ $ref: '#/components/schemas/OrganizationSummaryViewResponse',
1905
+ },
1906
+ },
1907
+ },
1908
+ required: ['organizations', 'user'],
1909
+ };
1910
+ export const UserSummaryViewResponseSchema = {
1911
+ type: 'object',
1912
+ properties: {
1913
+ email: {
1914
+ type: 'string',
1915
+ },
1916
+ firstName: {
1917
+ type: 'string',
1918
+ },
1919
+ lastName: {
1920
+ type: 'string',
1921
+ },
1922
+ },
1923
+ required: ['email', 'firstName', 'lastName'],
1924
+ };
1925
+ export const CommentViewSchema = {
1926
+ type: 'object',
1927
+ properties: {
1928
+ id: {
1929
+ type: 'string',
1930
+ format: 'uuid',
1931
+ },
1932
+ contactId: {
1933
+ type: 'integer',
1934
+ format: 'int64',
1935
+ },
1936
+ taskId: {
1937
+ type: 'string',
1938
+ format: 'uuid',
1939
+ },
1940
+ authorId: {
1941
+ type: 'string',
1942
+ format: 'uuid',
1943
+ },
1944
+ authorFirstName: {
1945
+ type: 'string',
1946
+ },
1947
+ authorLastName: {
1948
+ type: 'string',
1949
+ },
1950
+ profilePictureUrl: {
1951
+ type: 'string',
1952
+ },
1953
+ body: {
1954
+ type: 'string',
1955
+ },
1956
+ createdAt: {
1957
+ type: 'string',
1958
+ format: 'date-time',
1959
+ },
1960
+ editedAt: {
1961
+ type: 'string',
1962
+ format: 'date-time',
1963
+ },
1964
+ },
1965
+ required: [
1966
+ 'authorFirstName',
1967
+ 'authorId',
1968
+ 'authorLastName',
1969
+ 'body',
1970
+ 'createdAt',
1971
+ 'id',
1972
+ ],
1973
+ };
1974
+ export const CursorPageCommentViewSchema = {
1975
+ type: 'object',
1976
+ properties: {
1977
+ items: {
1978
+ type: 'array',
1979
+ items: {
1980
+ $ref: '#/components/schemas/CommentView',
1981
+ },
1982
+ },
1983
+ nextCursor: {
1984
+ type: 'string',
1985
+ },
1986
+ hasNext: {
1987
+ type: 'boolean',
1988
+ },
1989
+ },
1990
+ };
1991
+ export const ContactLinkSchema = {
1992
+ type: 'object',
1993
+ properties: {
1994
+ contactId: {
1995
+ type: 'integer',
1996
+ format: 'int64',
1997
+ },
1998
+ primary: {
1999
+ type: 'boolean',
2000
+ },
2001
+ personalDetails: {
2002
+ oneOf: [
2003
+ {
2004
+ $ref: '#/components/schemas/ContactPersonalDetailsRestricted',
2005
+ },
2006
+ {
2007
+ $ref: '#/components/schemas/ContactPersonalDetailsVisible',
2008
+ },
2009
+ ],
2010
+ },
2011
+ contactAssignedTo: {
2012
+ type: 'string',
2013
+ format: 'uuid',
2014
+ },
2015
+ },
2016
+ required: ['contactId', 'personalDetails', 'primary'],
2017
+ };
2018
+ export const ContactPersonalDetailsSchema = {
2019
+ discriminator: {
2020
+ propertyName: 'status',
2021
+ mapping: {
2022
+ VISIBLE: '#/components/schemas/ContactPersonalDetailsVisible',
2023
+ RESTRICTED: '#/components/schemas/ContactPersonalDetailsRestricted',
2024
+ },
2025
+ },
2026
+ required: ['status'],
2027
+ };
2028
+ export const ContactPersonalDetailsRestrictedSchema = {
2029
+ properties: {
2030
+ requires: {
2031
+ type: 'array',
2032
+ items: {
2033
+ type: 'string',
2034
+ enum: [
2035
+ 'MANAGE_AGENCY',
2036
+ 'MANAGE_ROLE',
2037
+ 'MANAGE_MEMBER',
2038
+ 'CREATE_DELETE_MEMBER',
2039
+ 'CREATE_CONTACT',
2040
+ 'DELETE_CONTACT',
2041
+ 'MANAGE_CONTACT',
2042
+ 'MANAGE_ANY_CONTACT',
2043
+ 'ASSIGN_CONTACT',
2044
+ 'MANAGE_BOARD',
2045
+ 'MANAGE_DEAL',
2046
+ 'DELETE_DEAL',
2047
+ ],
2048
+ },
2049
+ uniqueItems: true,
2050
+ },
2051
+ status: {
2052
+ type: 'string',
2053
+ enum: ['RESTRICTED'],
2054
+ },
2055
+ },
2056
+ required: ['status'],
2057
+ };
2058
+ export const ContactPersonalDetailsVisibleSchema = {
2059
+ properties: {
2060
+ phoneNumber: {
2061
+ type: 'string',
2062
+ },
2063
+ fullName: {
2064
+ type: 'string',
2065
+ },
2066
+ email: {
2067
+ type: 'string',
2068
+ },
2069
+ status: {
2070
+ type: 'string',
2071
+ enum: ['VISIBLE'],
2072
+ },
2073
+ },
2074
+ required: ['status'],
2075
+ };
2076
+ export const InterestLinkSchema = {
2077
+ type: 'object',
2078
+ properties: {
2079
+ interestId: {
2080
+ type: 'integer',
2081
+ format: 'int64',
2082
+ },
2083
+ contactId: {
2084
+ type: 'integer',
2085
+ format: 'int64',
2086
+ },
2087
+ title: {
2088
+ type: 'string',
2089
+ },
2090
+ },
2091
+ required: ['contactId', 'interestId'],
2092
+ };
2093
+ export const ParticipantSchema = {
2094
+ type: 'object',
2095
+ properties: {
2096
+ memberId: {
2097
+ type: 'string',
2098
+ format: 'uuid',
2099
+ },
2100
+ firstName: {
2101
+ type: 'string',
2102
+ },
2103
+ lastName: {
2104
+ type: 'string',
2105
+ },
2106
+ photo: {
2107
+ type: 'string',
2108
+ },
2109
+ owner: {
2110
+ type: 'boolean',
2111
+ },
2112
+ },
2113
+ required: ['memberId', 'owner'],
2114
+ };
2115
+ export const PropertyLinkSchema = {
2116
+ type: 'object',
2117
+ properties: {
2118
+ propertyId: {
2119
+ type: 'integer',
2120
+ format: 'int64',
2121
+ },
2122
+ contactId: {
2123
+ type: 'integer',
2124
+ format: 'int64',
2125
+ },
2126
+ title: {
2127
+ type: 'string',
2128
+ },
2129
+ },
2130
+ required: ['contactId', 'propertyId'],
2131
+ };
2132
+ export const TaskDetailResponseSchema = {
2133
+ type: 'object',
2134
+ properties: {
2135
+ taskId: {
2136
+ type: 'string',
2137
+ format: 'uuid',
2138
+ },
2139
+ boardId: {
2140
+ type: 'string',
2141
+ format: 'uuid',
2142
+ },
2143
+ boardName: {
2144
+ type: 'string',
2145
+ },
2146
+ stageId: {
2147
+ type: 'string',
2148
+ format: 'uuid',
2149
+ },
2150
+ stageName: {
2151
+ type: 'string',
2152
+ },
2153
+ stageColor: {
2154
+ type: 'string',
2155
+ },
2156
+ stageEnteredAt: {
2157
+ type: 'string',
2158
+ format: 'date-time',
2159
+ },
2160
+ title: {
2161
+ type: 'string',
2162
+ },
2163
+ description: {
2164
+ type: 'string',
2165
+ },
2166
+ value: {
2167
+ type: 'number',
2168
+ },
2169
+ commissionType: {
2170
+ type: 'string',
2171
+ enum: ['NOT_SET', 'FIXED', 'PERCENTAGE', 'MONTHS_OF_RENT'],
2172
+ },
2173
+ commissionValue: {
2174
+ type: 'number',
2175
+ },
2176
+ expectedCloseDate: {
2177
+ type: 'string',
2178
+ format: 'date',
2179
+ },
2180
+ ownerId: {
2181
+ type: 'string',
2182
+ format: 'uuid',
2183
+ },
2184
+ outcome: {
2185
+ type: 'string',
2186
+ enum: ['WON', 'LOST'],
2187
+ },
2188
+ lostReason: {
2189
+ type: 'string',
2190
+ enum: [
2191
+ 'NOT_WORKING_WITH_AGENTS',
2192
+ 'NOT_RESPONDING',
2193
+ 'ALREADY_SOLD',
2194
+ 'COULD_NOT_NEGOTIATE_PRICE',
2195
+ 'CHOSE_ANOTHER_AGENCY',
2196
+ 'CHANGED_PLANS',
2197
+ 'OUT_OF_BUDGET',
2198
+ 'SPAM',
2199
+ 'OTHER',
2200
+ ],
2201
+ },
2202
+ closedAt: {
2203
+ type: 'string',
2204
+ format: 'date-time',
2205
+ },
2206
+ createdBy: {
2207
+ type: 'string',
2208
+ format: 'uuid',
2209
+ },
2210
+ createdAt: {
2211
+ type: 'string',
2212
+ format: 'date-time',
2213
+ },
2214
+ contacts: {
2215
+ type: 'array',
2216
+ items: {
2217
+ $ref: '#/components/schemas/ContactLink',
2218
+ },
2219
+ },
2220
+ participants: {
2221
+ type: 'array',
2222
+ items: {
2223
+ $ref: '#/components/schemas/Participant',
2224
+ },
2225
+ },
2226
+ interests: {
2227
+ type: 'array',
2228
+ items: {
2229
+ $ref: '#/components/schemas/InterestLink',
2230
+ },
2231
+ },
2232
+ properties: {
2233
+ type: 'array',
2234
+ items: {
2235
+ $ref: '#/components/schemas/PropertyLink',
2236
+ },
2237
+ },
2238
+ todoGroups: {
2239
+ type: 'array',
2240
+ items: {
2241
+ $ref: '#/components/schemas/TodoGroup',
2242
+ },
2243
+ },
2244
+ timeline: {
2245
+ type: 'array',
2246
+ items: {
2247
+ $ref: '#/components/schemas/TimelineEntry',
2248
+ },
2249
+ },
2250
+ },
2251
+ required: [
2252
+ 'boardId',
2253
+ 'boardName',
2254
+ 'commissionType',
2255
+ 'contacts',
2256
+ 'createdAt',
2257
+ 'interests',
2258
+ 'participants',
2259
+ 'properties',
2260
+ 'stageColor',
2261
+ 'stageEnteredAt',
2262
+ 'stageId',
2263
+ 'stageName',
2264
+ 'taskId',
2265
+ 'timeline',
2266
+ 'title',
2267
+ 'todoGroups',
2268
+ ],
2269
+ };
2270
+ export const TimelineEntrySchema = {
2271
+ type: 'object',
2272
+ properties: {
2273
+ fromStageId: {
2274
+ type: 'string',
2275
+ format: 'uuid',
2276
+ },
2277
+ fromStageName: {
2278
+ type: 'string',
2279
+ },
2280
+ toStageId: {
2281
+ type: 'string',
2282
+ format: 'uuid',
2283
+ },
2284
+ toStageName: {
2285
+ type: 'string',
2286
+ },
2287
+ boardChanged: {
2288
+ type: 'boolean',
2289
+ },
2290
+ outcome: {
2291
+ type: 'string',
2292
+ enum: ['WON', 'LOST'],
2293
+ },
2294
+ movedBy: {
2295
+ type: 'string',
2296
+ format: 'uuid',
2297
+ },
2298
+ occurredAt: {
2299
+ type: 'string',
2300
+ format: 'date-time',
2301
+ },
2302
+ },
2303
+ required: ['boardChanged', 'occurredAt'],
2304
+ };
2305
+ export const TodoGroupSchema = {
2306
+ type: 'object',
2307
+ properties: {
2308
+ kind: {
2309
+ type: 'string',
2310
+ enum: ['CURRENT_STAGE', 'LEFTOVER', 'AD_HOC'],
2311
+ },
2312
+ stageId: {
2313
+ type: 'string',
2314
+ format: 'uuid',
2315
+ },
2316
+ stageName: {
2317
+ type: 'string',
2318
+ },
2319
+ todos: {
2320
+ type: 'array',
2321
+ items: {
2322
+ $ref: '#/components/schemas/TodoItem',
2323
+ },
2324
+ },
2325
+ },
2326
+ required: ['kind', 'todos'],
2327
+ };
2328
+ export const TodoItemSchema = {
2329
+ type: 'object',
2330
+ properties: {
2331
+ todoId: {
2332
+ type: 'string',
2333
+ format: 'uuid',
2334
+ },
2335
+ title: {
2336
+ type: 'string',
2337
+ },
2338
+ position: {
2339
+ type: 'integer',
2340
+ format: 'int32',
2341
+ },
2342
+ fromTemplate: {
2343
+ type: 'boolean',
2344
+ },
2345
+ completedAt: {
2346
+ type: 'string',
2347
+ format: 'date-time',
2348
+ },
2349
+ completedBy: {
2350
+ type: 'string',
2351
+ format: 'uuid',
2352
+ },
2353
+ },
2354
+ required: ['fromTemplate', 'position', 'title', 'todoId'],
2355
+ };
2356
+ export const ContactTaskResponseSchema = {
2357
+ type: 'object',
2358
+ properties: {
2359
+ taskId: {
2360
+ type: 'string',
2361
+ format: 'uuid',
2362
+ },
2363
+ title: {
2364
+ type: 'string',
2365
+ },
2366
+ boardId: {
2367
+ type: 'string',
2368
+ format: 'uuid',
2369
+ },
2370
+ boardName: {
2371
+ type: 'string',
2372
+ },
2373
+ stageId: {
2374
+ type: 'string',
2375
+ format: 'uuid',
2376
+ },
2377
+ stageName: {
2378
+ type: 'string',
2379
+ },
2380
+ outcome: {
2381
+ type: 'string',
2382
+ enum: ['WON', 'LOST'],
2383
+ },
2384
+ value: {
2385
+ type: 'number',
2386
+ },
2387
+ primary: {
2388
+ type: 'boolean',
2389
+ },
2390
+ },
2391
+ required: [
2392
+ 'boardId',
2393
+ 'boardName',
2394
+ 'primary',
2395
+ 'stageId',
2396
+ 'stageName',
2397
+ 'taskId',
2398
+ 'title',
2399
+ ],
2400
+ };
2401
+ export const BoardGridResponseSchema = {
2402
+ type: 'object',
2403
+ properties: {
2404
+ boardId: {
2405
+ type: 'string',
2406
+ format: 'uuid',
2407
+ },
2408
+ name: {
2409
+ type: 'string',
2410
+ },
2411
+ kind: {
2412
+ type: 'string',
2413
+ enum: ['OWNER', 'SEEKER'],
2414
+ },
2415
+ archived: {
2416
+ type: 'boolean',
2417
+ },
2418
+ columns: {
2419
+ type: 'array',
2420
+ items: {
2421
+ $ref: '#/components/schemas/Column',
2422
+ },
2423
+ },
2424
+ },
2425
+ required: ['archived', 'boardId', 'columns', 'name'],
2426
+ };
2427
+ export const CardSchema = {
2428
+ type: 'object',
2429
+ properties: {
2430
+ taskId: {
2431
+ type: 'string',
2432
+ format: 'uuid',
2433
+ },
2434
+ title: {
2435
+ type: 'string',
2436
+ },
2437
+ value: {
2438
+ type: 'number',
2439
+ },
2440
+ ownerId: {
2441
+ type: 'string',
2442
+ format: 'uuid',
2443
+ },
2444
+ primaryContactId: {
2445
+ type: 'integer',
2446
+ format: 'int64',
2447
+ },
2448
+ primaryContact: {
2449
+ oneOf: [
2450
+ {
2451
+ $ref: '#/components/schemas/ContactPersonalDetailsRestricted',
2452
+ },
2453
+ {
2454
+ $ref: '#/components/schemas/ContactPersonalDetailsVisible',
2455
+ },
2456
+ ],
2457
+ },
2458
+ contactAssignedTo: {
2459
+ type: 'string',
2460
+ format: 'uuid',
2461
+ },
2462
+ stageEnteredAt: {
2463
+ type: 'string',
2464
+ format: 'date-time',
2465
+ },
2466
+ daysInStage: {
2467
+ type: 'integer',
2468
+ format: 'int64',
2469
+ },
2470
+ openTodos: {
2471
+ type: 'integer',
2472
+ format: 'int64',
2473
+ },
2474
+ totalTodos: {
2475
+ type: 'integer',
2476
+ format: 'int64',
2477
+ },
2478
+ hasLeftoverOpenTodos: {
2479
+ type: 'boolean',
2480
+ },
2481
+ },
2482
+ required: [
2483
+ 'daysInStage',
2484
+ 'hasLeftoverOpenTodos',
2485
+ 'openTodos',
2486
+ 'stageEnteredAt',
2487
+ 'taskId',
2488
+ 'title',
2489
+ 'totalTodos',
2490
+ ],
2491
+ };
2492
+ export const ColumnSchema = {
2493
+ type: 'object',
2494
+ properties: {
2495
+ stageId: {
2496
+ type: 'string',
2497
+ format: 'uuid',
2498
+ },
2499
+ name: {
2500
+ type: 'string',
2501
+ },
2502
+ color: {
2503
+ type: 'string',
2504
+ },
2505
+ position: {
2506
+ type: 'integer',
2507
+ format: 'int32',
2508
+ },
2509
+ totalTasks: {
2510
+ type: 'integer',
2511
+ format: 'int64',
2512
+ },
2513
+ totalValue: {
2514
+ type: 'number',
2515
+ },
2516
+ cards: {
2517
+ $ref: '#/components/schemas/CursorPageCard',
2518
+ },
2519
+ },
2520
+ required: [
2521
+ 'cards',
2522
+ 'color',
2523
+ 'name',
2524
+ 'position',
2525
+ 'stageId',
2526
+ 'totalTasks',
2527
+ 'totalValue',
2528
+ ],
2529
+ };
2530
+ export const CursorPageCardSchema = {
2531
+ type: 'object',
2532
+ properties: {
2533
+ items: {
2534
+ type: 'array',
2535
+ items: {
2536
+ $ref: '#/components/schemas/Card',
2537
+ },
2538
+ },
2539
+ nextCursor: {
2540
+ type: 'string',
2541
+ },
2542
+ hasNext: {
2543
+ type: 'boolean',
2544
+ },
2545
+ },
2546
+ };
2547
+ export const ClosedTaskResponseSchema = {
2548
+ type: 'object',
2549
+ properties: {
2550
+ taskId: {
2551
+ type: 'string',
2552
+ format: 'uuid',
2553
+ },
2554
+ title: {
2555
+ type: 'string',
2556
+ },
2557
+ value: {
2558
+ type: 'number',
2559
+ },
2560
+ ownerId: {
2561
+ type: 'string',
2562
+ format: 'uuid',
2563
+ },
2564
+ primaryContactId: {
2565
+ type: 'integer',
2566
+ format: 'int64',
2567
+ },
2568
+ primaryContact: {
2569
+ oneOf: [
2570
+ {
2571
+ $ref: '#/components/schemas/ContactPersonalDetailsRestricted',
2572
+ },
2573
+ {
2574
+ $ref: '#/components/schemas/ContactPersonalDetailsVisible',
2575
+ },
2576
+ ],
2577
+ },
2578
+ contactAssignedTo: {
2579
+ type: 'string',
2580
+ format: 'uuid',
2581
+ },
2582
+ outcome: {
2583
+ type: 'string',
2584
+ enum: ['WON', 'LOST'],
2585
+ },
2586
+ lostReason: {
2587
+ type: 'string',
2588
+ enum: [
2589
+ 'NOT_WORKING_WITH_AGENTS',
2590
+ 'NOT_RESPONDING',
2591
+ 'ALREADY_SOLD',
2592
+ 'COULD_NOT_NEGOTIATE_PRICE',
2593
+ 'CHOSE_ANOTHER_AGENCY',
2594
+ 'CHANGED_PLANS',
2595
+ 'OUT_OF_BUDGET',
2596
+ 'SPAM',
2597
+ 'OTHER',
2598
+ ],
2599
+ },
2600
+ closedAt: {
2601
+ type: 'string',
2602
+ format: 'date-time',
2603
+ },
2604
+ stageName: {
2605
+ type: 'string',
2606
+ description: 'Stage the task closed from',
2607
+ },
2608
+ },
2609
+ required: ['closedAt', 'outcome', 'stageName', 'taskId', 'title'],
2610
+ };
2611
+ export const PageMetadataSchema = {
2612
+ type: 'object',
2613
+ properties: {
2614
+ size: {
2615
+ type: 'integer',
2616
+ format: 'int64',
2617
+ },
2618
+ number: {
2619
+ type: 'integer',
2620
+ format: 'int64',
2621
+ },
2622
+ totalElements: {
2623
+ type: 'integer',
2624
+ format: 'int64',
2625
+ },
2626
+ totalPages: {
2627
+ type: 'integer',
2628
+ format: 'int64',
2629
+ },
2630
+ },
2631
+ };
2632
+ export const PagedModelClosedTaskResponseSchema = {
2633
+ type: 'object',
2634
+ properties: {
2635
+ content: {
2636
+ type: 'array',
2637
+ items: {
2638
+ $ref: '#/components/schemas/ClosedTaskResponse',
2639
+ },
2640
+ },
2641
+ page: {
2642
+ $ref: '#/components/schemas/PageMetadata',
2643
+ },
2644
+ },
2645
+ };
2646
+ export const BoardWinRateSchema = {
2647
+ type: 'object',
2648
+ properties: {
2649
+ boardId: {
2650
+ type: 'string',
2651
+ format: 'uuid',
2652
+ },
2653
+ name: {
2654
+ type: 'string',
2655
+ },
2656
+ won: {
2657
+ type: 'integer',
2658
+ format: 'int64',
2659
+ },
2660
+ lost: {
2661
+ type: 'integer',
2662
+ format: 'int64',
2663
+ },
2664
+ winRatePct: {
2665
+ type: 'number',
2666
+ format: 'double',
2667
+ },
2668
+ },
2669
+ required: ['boardId', 'lost', 'name', 'winRatePct', 'won'],
2670
+ };
2671
+ export const MemberWinRateSchema = {
2672
+ type: 'object',
2673
+ properties: {
2674
+ memberId: {
2675
+ type: 'string',
2676
+ format: 'uuid',
2677
+ },
2678
+ won: {
2679
+ type: 'integer',
2680
+ format: 'int64',
2681
+ },
2682
+ lost: {
2683
+ type: 'integer',
2684
+ format: 'int64',
2685
+ },
2686
+ winRatePct: {
2687
+ type: 'number',
2688
+ format: 'double',
2689
+ },
2690
+ },
2691
+ required: ['lost', 'memberId', 'winRatePct', 'won'],
2692
+ };
2693
+ export const StatsEnvelopeWinRateStatsSchema = {
2694
+ type: 'object',
2695
+ properties: {
2696
+ period: {
2697
+ type: 'string',
2698
+ },
2699
+ computedAt: {
2700
+ type: 'string',
2701
+ format: 'date-time',
2702
+ },
2703
+ data: {
2704
+ $ref: '#/components/schemas/WinRateStats',
2705
+ },
2706
+ },
2707
+ required: ['computedAt', 'data', 'period'],
2708
+ };
2709
+ export const WinRateStatsSchema = {
2710
+ type: 'object',
2711
+ properties: {
2712
+ won: {
2713
+ type: 'integer',
2714
+ format: 'int64',
2715
+ },
2716
+ lost: {
2717
+ type: 'integer',
2718
+ format: 'int64',
2719
+ },
2720
+ winRatePct: {
2721
+ type: 'number',
2722
+ format: 'double',
2723
+ },
2724
+ boards: {
2725
+ type: 'array',
2726
+ items: {
2727
+ $ref: '#/components/schemas/BoardWinRate',
2728
+ },
2729
+ },
2730
+ members: {
2731
+ type: 'array',
2732
+ items: {
2733
+ $ref: '#/components/schemas/MemberWinRate',
2734
+ },
2735
+ },
2736
+ },
2737
+ required: ['boards', 'lost', 'members', 'winRatePct', 'won'],
2738
+ };
2739
+ export const StageVelocitySchema = {
1560
2740
  type: 'object',
1561
2741
  properties: {
1562
- agencyId: {
2742
+ boardId: {
1563
2743
  type: 'string',
1564
2744
  format: 'uuid',
1565
2745
  },
1566
- isOwner: {
1567
- type: 'boolean',
2746
+ boardName: {
2747
+ type: 'string',
1568
2748
  },
1569
- agencyName: {
2749
+ stageId: {
1570
2750
  type: 'string',
2751
+ format: 'uuid',
1571
2752
  },
1572
- subdomain: {
2753
+ stageName: {
1573
2754
  type: 'string',
1574
2755
  },
1575
- roleId: {
2756
+ position: {
1576
2757
  type: 'integer',
1577
2758
  format: 'int32',
1578
2759
  },
1579
- memberId: {
1580
- type: 'string',
1581
- format: 'uuid',
2760
+ avgDaysInStage: {
2761
+ type: 'number',
2762
+ format: 'double',
1582
2763
  },
1583
- profilePictureUrl: {
2764
+ samples: {
2765
+ type: 'integer',
2766
+ format: 'int64',
2767
+ description: 'Completed stays measured',
2768
+ },
2769
+ },
2770
+ required: [
2771
+ 'avgDaysInStage',
2772
+ 'boardId',
2773
+ 'boardName',
2774
+ 'position',
2775
+ 'samples',
2776
+ 'stageId',
2777
+ 'stageName',
2778
+ ],
2779
+ };
2780
+ export const StatsEnvelopeTaskVelocityStatsSchema = {
2781
+ type: 'object',
2782
+ properties: {
2783
+ period: {
1584
2784
  type: 'string',
1585
2785
  },
1586
- roleName: {
2786
+ computedAt: {
1587
2787
  type: 'string',
2788
+ format: 'date-time',
1588
2789
  },
1589
- permissions: {
2790
+ data: {
2791
+ $ref: '#/components/schemas/TaskVelocityStats',
2792
+ },
2793
+ },
2794
+ required: ['computedAt', 'data', 'period'],
2795
+ };
2796
+ export const TaskVelocityStatsSchema = {
2797
+ type: 'object',
2798
+ properties: {
2799
+ stages: {
1590
2800
  type: 'array',
1591
2801
  items: {
1592
- type: 'string',
1593
- enum: [
1594
- 'MANAGE_AGENCY',
1595
- 'MANAGE_ROLE',
1596
- 'MANAGE_MEMBER',
1597
- 'CREATE_DELETE_MEMBER',
1598
- 'CREATE_CONTACT',
1599
- 'DELETE_CONTACT',
1600
- 'MANAGE_CONTACT',
1601
- 'MANAGE_ANY_CONTACT',
1602
- 'ASSIGN_CONTACT',
1603
- ],
2802
+ $ref: '#/components/schemas/StageVelocity',
1604
2803
  },
1605
2804
  },
1606
- status: {
2805
+ },
2806
+ required: ['stages'],
2807
+ };
2808
+ export const BoardFunnelSchema = {
2809
+ type: 'object',
2810
+ properties: {
2811
+ boardId: {
1607
2812
  type: 'string',
1608
- enum: ['NEW', 'ACTIVE', 'PAYMENT_FAILED', 'INACTIVE', 'SUSPENDED'],
2813
+ format: 'uuid',
1609
2814
  },
1610
- phone: {
2815
+ name: {
1611
2816
  type: 'string',
1612
2817
  },
1613
- isPhoneVerified: {
1614
- type: 'boolean',
2818
+ kind: {
2819
+ type: 'string',
2820
+ },
2821
+ stages: {
2822
+ type: 'array',
2823
+ items: {
2824
+ $ref: '#/components/schemas/StageSlice',
2825
+ },
1615
2826
  },
1616
2827
  },
1617
- required: [
1618
- 'agencyId',
1619
- 'agencyName',
1620
- 'isOwner',
1621
- 'isPhoneVerified',
1622
- 'memberId',
1623
- 'permissions',
1624
- 'phone',
1625
- 'roleName',
1626
- 'status',
1627
- 'subdomain',
1628
- ],
2828
+ required: ['boardId', 'name', 'stages'],
1629
2829
  };
1630
- export const UserContextViewResponseSchema = {
2830
+ export const StageSliceSchema = {
1631
2831
  type: 'object',
1632
2832
  properties: {
1633
- user: {
1634
- $ref: '#/components/schemas/UserSummaryViewResponse',
2833
+ stageId: {
2834
+ type: 'string',
2835
+ format: 'uuid',
1635
2836
  },
1636
- organizations: {
1637
- type: 'array',
1638
- items: {
1639
- $ref: '#/components/schemas/OrganizationSummaryViewResponse',
1640
- },
2837
+ name: {
2838
+ type: 'string',
2839
+ },
2840
+ position: {
2841
+ type: 'integer',
2842
+ format: 'int32',
2843
+ },
2844
+ openTasks: {
2845
+ type: 'integer',
2846
+ format: 'int64',
2847
+ },
2848
+ openValue: {
2849
+ type: 'number',
1641
2850
  },
1642
2851
  },
1643
- required: ['organizations', 'user'],
2852
+ required: ['name', 'openTasks', 'openValue', 'position', 'stageId'],
1644
2853
  };
1645
- export const UserSummaryViewResponseSchema = {
2854
+ export const StatsEnvelopeTaskFunnelStatsSchema = {
1646
2855
  type: 'object',
1647
2856
  properties: {
1648
- email: {
2857
+ period: {
1649
2858
  type: 'string',
1650
2859
  },
1651
- firstName: {
2860
+ computedAt: {
1652
2861
  type: 'string',
2862
+ format: 'date-time',
1653
2863
  },
1654
- lastName: {
1655
- type: 'string',
2864
+ data: {
2865
+ $ref: '#/components/schemas/TaskFunnelStats',
1656
2866
  },
1657
2867
  },
1658
- required: ['email', 'firstName', 'lastName'],
2868
+ required: ['computedAt', 'data', 'period'],
2869
+ };
2870
+ export const TaskFunnelStatsSchema = {
2871
+ type: 'object',
2872
+ properties: {
2873
+ boards: {
2874
+ type: 'array',
2875
+ items: {
2876
+ $ref: '#/components/schemas/BoardFunnel',
2877
+ },
2878
+ },
2879
+ },
2880
+ required: ['boards'],
1659
2881
  };
1660
2882
  export const DealTypePriceSchema = {
1661
2883
  type: 'object',
@@ -1902,14 +3124,6 @@ export const PipelineStatsSchema = {
1902
3124
  type: 'integer',
1903
3125
  format: 'int64',
1904
3126
  },
1905
- won: {
1906
- type: 'integer',
1907
- format: 'int64',
1908
- },
1909
- conversionRatePercent: {
1910
- type: 'number',
1911
- format: 'double',
1912
- },
1913
3127
  unassigned: {
1914
3128
  type: 'integer',
1915
3129
  format: 'int64',
@@ -1920,35 +3134,14 @@ export const PipelineStatsSchema = {
1920
3134
  $ref: '#/components/schemas/TrendPoint',
1921
3135
  },
1922
3136
  },
1923
- status: {
1924
- type: 'array',
1925
- items: {
1926
- $ref: '#/components/schemas/Slice',
1927
- },
1928
- },
1929
3137
  sourceAttribution: {
1930
3138
  type: 'array',
1931
3139
  items: {
1932
3140
  $ref: '#/components/schemas/Slice',
1933
3141
  },
1934
3142
  },
1935
- lostReasons: {
1936
- type: 'array',
1937
- items: {
1938
- $ref: '#/components/schemas/Slice',
1939
- },
1940
- },
1941
3143
  },
1942
- required: [
1943
- 'conversionRatePercent',
1944
- 'lostReasons',
1945
- 'newContactsTrend',
1946
- 'sourceAttribution',
1947
- 'status',
1948
- 'total',
1949
- 'unassigned',
1950
- 'won',
1951
- ],
3144
+ required: ['newContactsTrend', 'sourceAttribution', 'total', 'unassigned'],
1952
3145
  };
1953
3146
  export const StatsEnvelopePipelineStatsSchema = {
1954
3147
  type: 'object',
@@ -2007,17 +3200,16 @@ export const RowSchema = {
2007
3200
  photo: {
2008
3201
  type: 'string',
2009
3202
  },
2010
- contactsAssigned: {
3203
+ tasksWon: {
2011
3204
  type: 'integer',
2012
3205
  format: 'int64',
2013
3206
  },
2014
- converted: {
2015
- type: 'integer',
2016
- format: 'int64',
3207
+ wonValue: {
3208
+ type: 'number',
2017
3209
  },
2018
- conversionRatePct: {
3210
+ commission: {
2019
3211
  type: 'number',
2020
- format: 'double',
3212
+ description: 'Fixed amount, or rate/factor × task value (null-value tasks skipped)',
2021
3213
  },
2022
3214
  recommendationsSent: {
2023
3215
  type: 'integer',
@@ -2033,9 +3225,7 @@ export const RowSchema = {
2033
3225
  },
2034
3226
  },
2035
3227
  required: [
2036
- 'contactsAssigned',
2037
- 'conversionRatePct',
2038
- 'converted',
3228
+ 'commission',
2039
3229
  'firstName',
2040
3230
  'lastName',
2041
3231
  'likeRatePct',
@@ -2043,6 +3233,8 @@ export const RowSchema = {
2043
3233
  'photo',
2044
3234
  'recommendationsRated',
2045
3235
  'recommendationsSent',
3236
+ 'tasksWon',
3237
+ 'wonValue',
2046
3238
  ],
2047
3239
  };
2048
3240
  export const StatsEnvelopeLeaderboardStatsSchema = {
@@ -2238,27 +3430,6 @@ export const StatsEnvelopeDemandStatsSchema = {
2238
3430
  },
2239
3431
  required: ['computedAt', 'data', 'period'],
2240
3432
  };
2241
- export const PageMetadataSchema = {
2242
- type: 'object',
2243
- properties: {
2244
- size: {
2245
- type: 'integer',
2246
- format: 'int64',
2247
- },
2248
- number: {
2249
- type: 'integer',
2250
- format: 'int64',
2251
- },
2252
- totalElements: {
2253
- type: 'integer',
2254
- format: 'int64',
2255
- },
2256
- totalPages: {
2257
- type: 'integer',
2258
- format: 'int64',
2259
- },
2260
- },
2261
- };
2262
3433
  export const PagedModelRoleResponseSchema = {
2263
3434
  type: 'object',
2264
3435
  properties: {
@@ -2306,6 +3477,9 @@ export const RoleResponseSchema = {
2306
3477
  'MANAGE_CONTACT',
2307
3478
  'MANAGE_ANY_CONTACT',
2308
3479
  'ASSIGN_CONTACT',
3480
+ 'MANAGE_BOARD',
3481
+ 'MANAGE_DEAL',
3482
+ 'DELETE_DEAL',
2309
3483
  ],
2310
3484
  },
2311
3485
  },
@@ -2677,7 +3851,7 @@ export const GroupedPermissionsResponseSchema = {
2677
3851
  properties: {
2678
3852
  group: {
2679
3853
  type: 'string',
2680
- enum: ['AGENCY', 'ROLE', 'MEMBER', 'CONTACT'],
3854
+ enum: ['AGENCY', 'ROLE', 'MEMBER', 'CONTACT', 'BOARD', 'DEAL'],
2681
3855
  },
2682
3856
  permissions: {
2683
3857
  type: 'array',
@@ -2703,6 +3877,9 @@ export const PermissionResponseSchema = {
2703
3877
  'MANAGE_CONTACT',
2704
3878
  'MANAGE_ANY_CONTACT',
2705
3879
  'ASSIGN_CONTACT',
3880
+ 'MANAGE_BOARD',
3881
+ 'MANAGE_DEAL',
3882
+ 'DELETE_DEAL',
2706
3883
  ],
2707
3884
  },
2708
3885
  },
@@ -3288,61 +4465,6 @@ export const PropertyPageResponseSchema = {
3288
4465
  'updatedAt',
3289
4466
  ],
3290
4467
  };
3291
- export const ContactPersonalDetailsSchema = {
3292
- discriminator: {
3293
- propertyName: 'status',
3294
- mapping: {
3295
- VISIBLE: '#/components/schemas/ContactPersonalDetailsVisible',
3296
- RESTRICTED: '#/components/schemas/ContactPersonalDetailsRestricted',
3297
- },
3298
- },
3299
- required: ['status'],
3300
- };
3301
- export const ContactPersonalDetailsRestrictedSchema = {
3302
- properties: {
3303
- requires: {
3304
- type: 'array',
3305
- items: {
3306
- type: 'string',
3307
- enum: [
3308
- 'MANAGE_AGENCY',
3309
- 'MANAGE_ROLE',
3310
- 'MANAGE_MEMBER',
3311
- 'CREATE_DELETE_MEMBER',
3312
- 'CREATE_CONTACT',
3313
- 'DELETE_CONTACT',
3314
- 'MANAGE_CONTACT',
3315
- 'MANAGE_ANY_CONTACT',
3316
- 'ASSIGN_CONTACT',
3317
- ],
3318
- },
3319
- uniqueItems: true,
3320
- },
3321
- status: {
3322
- type: 'string',
3323
- enum: ['RESTRICTED'],
3324
- },
3325
- },
3326
- required: ['status'],
3327
- };
3328
- export const ContactPersonalDetailsVisibleSchema = {
3329
- properties: {
3330
- phoneNumber: {
3331
- type: 'string',
3332
- },
3333
- fullName: {
3334
- type: 'string',
3335
- },
3336
- email: {
3337
- type: 'string',
3338
- },
3339
- status: {
3340
- type: 'string',
3341
- enum: ['VISIBLE'],
3342
- },
3343
- },
3344
- required: ['status'],
3345
- };
3346
4468
  export const ListingOwnerContactResponseSchema = {
3347
4469
  type: 'object',
3348
4470
  properties: {
@@ -3557,6 +4679,7 @@ export const NotificationContentSchema = {
3557
4679
  propertyName: 'kind',
3558
4680
  mapping: {
3559
4681
  AGENT_COMMENTED: '#/components/schemas/AgentCommented',
4682
+ TASK_COMMENTED: '#/components/schemas/TaskCommented',
3560
4683
  LISTING_EXPIRED: '#/components/schemas/ListingExpired',
3561
4684
  NEW_SEEKER_RATING: '#/components/schemas/NewSeekerRating',
3562
4685
  NEW_MESSAGE: '#/components/schemas/NewMessage',
@@ -3593,6 +4716,7 @@ export const NotificationViewSchema = {
3593
4716
  type: 'string',
3594
4717
  enum: [
3595
4718
  'AGENT_COMMENTED',
4719
+ 'TASK_COMMENTED',
3596
4720
  'EXTERNAL_LISTING_EXPIRED',
3597
4721
  'LISTING_EXPIRED',
3598
4722
  'NEW_SEEKER_RATING',
@@ -3620,24 +4744,60 @@ export const NotificationViewSchema = {
3620
4744
  {
3621
4745
  $ref: '#/components/schemas/NewSeekerRating',
3622
4746
  },
4747
+ {
4748
+ $ref: '#/components/schemas/TaskCommented',
4749
+ },
3623
4750
  ],
3624
4751
  },
3625
4752
  createdAt: {
3626
4753
  type: 'string',
3627
- format: 'date-time',
4754
+ format: 'date-time',
4755
+ },
4756
+ read: {
4757
+ type: 'boolean',
4758
+ },
4759
+ },
4760
+ required: ['createdAt', 'id', 'payload', 'read', 'seq', 'type'],
4761
+ };
4762
+ export const PropertyIdSchema = {
4763
+ type: 'object',
4764
+ properties: {
4765
+ value: {
4766
+ type: 'integer',
4767
+ format: 'int64',
4768
+ },
4769
+ },
4770
+ };
4771
+ export const TaskCommentedSchema = {
4772
+ properties: {
4773
+ commentId: {
4774
+ $ref: '#/components/schemas/CommentId',
4775
+ },
4776
+ taskId: {
4777
+ $ref: '#/components/schemas/TaskId',
4778
+ },
4779
+ authorId: {
4780
+ $ref: '#/components/schemas/MemberId',
4781
+ },
4782
+ author: {
4783
+ type: 'string',
4784
+ },
4785
+ commentSnippet: {
4786
+ type: 'string',
3628
4787
  },
3629
- read: {
3630
- type: 'boolean',
4788
+ kind: {
4789
+ type: 'string',
4790
+ enum: ['TASK_COMMENTED'],
3631
4791
  },
3632
4792
  },
3633
- required: ['createdAt', 'id', 'payload', 'read', 'seq', 'type'],
4793
+ required: ['kind'],
3634
4794
  };
3635
- export const PropertyIdSchema = {
4795
+ export const TaskIdSchema = {
3636
4796
  type: 'object',
3637
4797
  properties: {
3638
4798
  value: {
3639
- type: 'integer',
3640
- format: 'int64',
4799
+ type: 'string',
4800
+ format: 'uuid',
3641
4801
  },
3642
4802
  },
3643
4803
  };
@@ -4577,69 +5737,6 @@ export const CursorPageMessageViewSchema = {
4577
5737
  },
4578
5738
  },
4579
5739
  };
4580
- export const CommentViewSchema = {
4581
- type: 'object',
4582
- properties: {
4583
- id: {
4584
- type: 'string',
4585
- format: 'uuid',
4586
- },
4587
- contactId: {
4588
- type: 'integer',
4589
- format: 'int64',
4590
- },
4591
- authorId: {
4592
- type: 'string',
4593
- format: 'uuid',
4594
- },
4595
- authorFirstName: {
4596
- type: 'string',
4597
- },
4598
- authorLastName: {
4599
- type: 'string',
4600
- },
4601
- profilePictureUrl: {
4602
- type: 'string',
4603
- },
4604
- body: {
4605
- type: 'string',
4606
- },
4607
- createdAt: {
4608
- type: 'string',
4609
- format: 'date-time',
4610
- },
4611
- editedAt: {
4612
- type: 'string',
4613
- format: 'date-time',
4614
- },
4615
- },
4616
- required: [
4617
- 'authorFirstName',
4618
- 'authorId',
4619
- 'authorLastName',
4620
- 'body',
4621
- 'contactId',
4622
- 'createdAt',
4623
- 'id',
4624
- ],
4625
- };
4626
- export const CursorPageCommentViewSchema = {
4627
- type: 'object',
4628
- properties: {
4629
- items: {
4630
- type: 'array',
4631
- items: {
4632
- $ref: '#/components/schemas/CommentView',
4633
- },
4634
- },
4635
- nextCursor: {
4636
- type: 'string',
4637
- },
4638
- hasNext: {
4639
- type: 'boolean',
4640
- },
4641
- },
4642
- };
4643
5740
  export const ContactGridResponseSchema = {
4644
5741
  type: 'object',
4645
5742
  properties: {
@@ -4657,23 +5754,6 @@ export const ContactGridResponseSchema = {
4657
5754
  title: {
4658
5755
  type: 'string',
4659
5756
  },
4660
- status: {
4661
- type: 'string',
4662
- enum: [
4663
- 'NEW',
4664
- 'ON_HOLD',
4665
- 'COLD',
4666
- 'WARM',
4667
- 'HOT',
4668
- 'WAITING_PAYMENT',
4669
- 'LOST',
4670
- 'WON',
4671
- ],
4672
- },
4673
- priority: {
4674
- type: 'string',
4675
- enum: ['CRITICAL', 'HIGH', 'MEDIUM', 'LOW'],
4676
- },
4677
5757
  personalDetails: {
4678
5758
  oneOf: [
4679
5759
  {
@@ -4725,7 +5805,6 @@ export const ContactGridResponseSchema = {
4725
5805
  'isListing',
4726
5806
  'isSearching',
4727
5807
  'personalDetails',
4728
- 'status',
4729
5808
  'updatedAt',
4730
5809
  ],
4731
5810
  };
@@ -4808,23 +5887,6 @@ export const Client360ResponseSchema = {
4808
5887
  isListing: {
4809
5888
  type: 'boolean',
4810
5889
  },
4811
- priority: {
4812
- type: 'string',
4813
- enum: ['CRITICAL', 'HIGH', 'MEDIUM', 'LOW'],
4814
- },
4815
- status: {
4816
- type: 'string',
4817
- enum: [
4818
- 'NEW',
4819
- 'ON_HOLD',
4820
- 'COLD',
4821
- 'WARM',
4822
- 'HOT',
4823
- 'WAITING_PAYMENT',
4824
- 'LOST',
4825
- 'WON',
4826
- ],
4827
- },
4828
5890
  createdAt: {
4829
5891
  type: 'string',
4830
5892
  format: 'date-time',
@@ -4845,6 +5907,12 @@ export const Client360ResponseSchema = {
4845
5907
  $ref: '#/components/schemas/ContactPropertyResponse',
4846
5908
  },
4847
5909
  },
5910
+ tasks: {
5911
+ type: 'array',
5912
+ items: {
5913
+ $ref: '#/components/schemas/ContactTaskResponse',
5914
+ },
5915
+ },
4848
5916
  },
4849
5917
  required: [
4850
5918
  'agencyId',
@@ -4855,10 +5923,9 @@ export const Client360ResponseSchema = {
4855
5923
  'interests',
4856
5924
  'isListing',
4857
5925
  'isSearching',
4858
- 'priority',
4859
5926
  'properties',
4860
5927
  'source',
4861
- 'status',
5928
+ 'tasks',
4862
5929
  'updatedAt',
4863
5930
  ],
4864
5931
  };
@@ -4905,6 +5972,9 @@ export const ContactInfoRestrictedSchema = {
4905
5972
  'MANAGE_CONTACT',
4906
5973
  'MANAGE_ANY_CONTACT',
4907
5974
  'ASSIGN_CONTACT',
5975
+ 'MANAGE_BOARD',
5976
+ 'MANAGE_DEAL',
5977
+ 'DELETE_DEAL',
4908
5978
  ],
4909
5979
  },
4910
5980
  uniqueItems: true,
@@ -5100,9 +6170,6 @@ export const DuplicateContactInfoSchema = {
5100
6170
  type: 'integer',
5101
6171
  format: 'int64',
5102
6172
  },
5103
- isActive: {
5104
- type: 'boolean',
5105
- },
5106
6173
  firstName: {
5107
6174
  type: 'string',
5108
6175
  },
@@ -5135,7 +6202,7 @@ export const DuplicateContactInfoSchema = {
5135
6202
  $ref: '#/components/schemas/AssignedAgent',
5136
6203
  },
5137
6204
  },
5138
- required: ['contactId', 'isActive', 'phone'],
6205
+ required: ['contactId', 'phone'],
5139
6206
  };
5140
6207
  export const PhoneDuplicateCheckResponseSchema = {
5141
6208
  type: 'object',
@@ -5153,284 +6220,147 @@ export const PhoneDuplicateCheckResponseSchema = {
5153
6220
  },
5154
6221
  required: ['matches', 'policy'],
5155
6222
  };
5156
- export const CardSchema = {
6223
+ export const BoardSummaryResponseSchema = {
5157
6224
  type: 'object',
5158
6225
  properties: {
5159
- contactId: {
5160
- type: 'integer',
5161
- format: 'int64',
5162
- },
5163
- personalDetails: {
5164
- oneOf: [
5165
- {
5166
- $ref: '#/components/schemas/ContactPersonalDetailsRestricted',
5167
- },
5168
- {
5169
- $ref: '#/components/schemas/ContactPersonalDetailsVisible',
5170
- },
5171
- ],
5172
- },
5173
- priority: {
6226
+ boardId: {
5174
6227
  type: 'string',
5175
- enum: ['CRITICAL', 'HIGH', 'MEDIUM', 'LOW'],
6228
+ format: 'uuid',
5176
6229
  },
5177
- status: {
6230
+ kind: {
5178
6231
  type: 'string',
5179
- enum: [
5180
- 'NEW',
5181
- 'ON_HOLD',
5182
- 'COLD',
5183
- 'WARM',
5184
- 'HOT',
5185
- 'WAITING_PAYMENT',
5186
- 'LOST',
5187
- 'WON',
5188
- ],
5189
- },
5190
- assignedTo: {
5191
- $ref: '#/components/schemas/AssignedToResponse',
5192
- },
5193
- totalCommission: {
5194
- type: 'number',
6232
+ enum: ['OWNER', 'SEEKER'],
5195
6233
  },
5196
- updatedAt: {
6234
+ name: {
5197
6235
  type: 'string',
5198
- format: 'date-time',
5199
6236
  },
5200
- preview: {
5201
- oneOf: [
5202
- {
5203
- $ref: '#/components/schemas/InterestPreview',
5204
- },
5205
- {
5206
- $ref: '#/components/schemas/PropertyPreview',
5207
- },
5208
- ],
6237
+ archived: {
6238
+ type: 'boolean',
6239
+ },
6240
+ stages: {
6241
+ type: 'array',
6242
+ items: {
6243
+ $ref: '#/components/schemas/StageSummaryResponse',
6244
+ },
5209
6245
  },
5210
6246
  },
5211
- required: [
5212
- 'contactId',
5213
- 'personalDetails',
5214
- 'priority',
5215
- 'status',
5216
- 'totalCommission',
5217
- 'updatedAt',
5218
- ],
6247
+ required: ['archived', 'boardId', 'name', 'stages'],
5219
6248
  };
5220
- export const ColumnSchema = {
6249
+ export const StageSummaryResponseSchema = {
5221
6250
  type: 'object',
5222
6251
  properties: {
5223
- status: {
6252
+ stageId: {
5224
6253
  type: 'string',
5225
- enum: [
5226
- 'NEW',
5227
- 'ON_HOLD',
5228
- 'COLD',
5229
- 'WARM',
5230
- 'HOT',
5231
- 'WAITING_PAYMENT',
5232
- 'LOST',
5233
- 'WON',
5234
- ],
6254
+ format: 'uuid',
5235
6255
  },
5236
- totalCommission: {
5237
- type: 'number',
6256
+ name: {
6257
+ type: 'string',
5238
6258
  },
5239
- totalContacts: {
5240
- type: 'integer',
5241
- format: 'int64',
6259
+ color: {
6260
+ type: 'string',
5242
6261
  },
5243
- cards: {
5244
- $ref: '#/components/schemas/CursorPageCard',
6262
+ position: {
6263
+ type: 'integer',
6264
+ format: 'int32',
5245
6265
  },
5246
6266
  },
5247
- required: ['cards', 'status', 'totalCommission', 'totalContacts'],
6267
+ required: ['color', 'name', 'position', 'stageId'],
5248
6268
  };
5249
- export const ContactKanbanResponseSchema = {
6269
+ export const BoardResponseSchema = {
5250
6270
  type: 'object',
5251
6271
  properties: {
5252
- columns: {
6272
+ boardId: {
6273
+ type: 'string',
6274
+ format: 'uuid',
6275
+ },
6276
+ kind: {
6277
+ type: 'string',
6278
+ enum: ['OWNER', 'SEEKER'],
6279
+ },
6280
+ name: {
6281
+ type: 'string',
6282
+ },
6283
+ archived: {
6284
+ type: 'boolean',
6285
+ },
6286
+ stages: {
5253
6287
  type: 'array',
5254
6288
  items: {
5255
- $ref: '#/components/schemas/Column',
6289
+ $ref: '#/components/schemas/StageResponse',
5256
6290
  },
5257
6291
  },
6292
+ createdAt: {
6293
+ type: 'string',
6294
+ format: 'date-time',
6295
+ },
5258
6296
  },
5259
- required: ['columns'],
6297
+ required: ['archived', 'boardId', 'createdAt', 'name', 'stages'],
5260
6298
  };
5261
- export const CursorPageCardSchema = {
6299
+ export const StageResponseSchema = {
5262
6300
  type: 'object',
5263
6301
  properties: {
5264
- items: {
5265
- type: 'array',
5266
- items: {
5267
- $ref: '#/components/schemas/Card',
5268
- },
6302
+ stageId: {
6303
+ type: 'string',
6304
+ format: 'uuid',
5269
6305
  },
5270
- nextCursor: {
6306
+ name: {
5271
6307
  type: 'string',
5272
6308
  },
5273
- hasNext: {
5274
- type: 'boolean',
6309
+ color: {
6310
+ type: 'string',
5275
6311
  },
5276
- },
5277
- };
5278
- export const InterestPreviewSchema = {
5279
- allOf: [
5280
- {
5281
- $ref: '#/components/schemas/Preview',
6312
+ position: {
6313
+ type: 'integer',
6314
+ format: 'int32',
5282
6315
  },
5283
- {
5284
- type: 'object',
5285
- properties: {
5286
- interestId: {
5287
- type: 'integer',
5288
- format: 'int64',
5289
- },
5290
- listingType: {
5291
- type: 'string',
5292
- enum: ['SALE', 'RENT', 'DAILY_RENT', 'PLEDGE'],
5293
- },
5294
- propertyTypes: {
5295
- type: 'array',
5296
- items: {
5297
- type: 'string',
5298
- enum: [
5299
- 'HOUSE',
5300
- 'TOWN_HOUSE',
5301
- 'COUNTRY_HOUSE',
5302
- 'VILLA',
5303
- 'COTTAGE',
5304
- 'APARTMENT',
5305
- 'DUPLEX',
5306
- 'TRIPLEX',
5307
- 'SEMI_BASEMENT',
5308
- 'ATTIC',
5309
- 'AGRICULTURAL_LAND',
5310
- 'RESIDENTIAL_LAND',
5311
- 'HOTEL_ROOM',
5312
- 'MOTEL_ROOM',
5313
- 'CO_LIVING_SPACE',
5314
- 'OFFICE',
5315
- 'COMMERCIAL_SPACE',
5316
- 'CO_WORKING_SPACE',
5317
- 'WAREHOUSE',
5318
- 'GARAGE',
5319
- ],
5320
- },
5321
- uniqueItems: true,
5322
- },
5323
- budget: {
5324
- $ref: '#/components/schemas/RangeBigDecimal',
5325
- },
5326
- primaryLocation: {
5327
- $ref: '#/components/schemas/LocationResponse',
5328
- },
5329
- recommendationCount: {
5330
- type: 'integer',
5331
- format: 'int32',
5332
- },
6316
+ active: {
6317
+ type: 'boolean',
6318
+ },
6319
+ todoTemplates: {
6320
+ type: 'array',
6321
+ items: {
6322
+ $ref: '#/components/schemas/TodoTemplateResponse',
5333
6323
  },
5334
6324
  },
5335
- ],
6325
+ },
5336
6326
  required: [
5337
- 'interestId',
5338
- 'listingType',
5339
- 'propertyTypes',
5340
- 'recommendationCount',
6327
+ 'active',
6328
+ 'color',
6329
+ 'name',
6330
+ 'position',
6331
+ 'stageId',
6332
+ 'todoTemplates',
5341
6333
  ],
5342
6334
  };
5343
- export const ListingTypePriceSchema = {
6335
+ export const TodoTemplateResponseSchema = {
5344
6336
  type: 'object',
5345
6337
  properties: {
5346
- listingType: {
6338
+ templateId: {
5347
6339
  type: 'string',
5348
- enum: ['SALE', 'RENT', 'DAILY_RENT', 'PLEDGE'],
6340
+ format: 'uuid',
5349
6341
  },
5350
- price: {
5351
- type: 'number',
6342
+ title: {
6343
+ type: 'string',
5352
6344
  },
5353
- },
5354
- required: ['listingType', 'price'],
5355
- };
5356
- export const PreviewSchema = {
5357
- discriminator: {
5358
- propertyName: 'type',
5359
- mapping: {
5360
- PROPERTY: '#/components/schemas/PropertyPreview',
5361
- INTEREST: '#/components/schemas/InterestPreview',
6345
+ position: {
6346
+ type: 'integer',
6347
+ format: 'int32',
5362
6348
  },
5363
6349
  },
6350
+ required: ['position', 'templateId', 'title'],
6351
+ };
6352
+ export const TaskSettingsResponseSchema = {
6353
+ type: 'object',
5364
6354
  properties: {
5365
- type: {
6355
+ defaultBoardId: {
5366
6356
  type: 'string',
6357
+ format: 'uuid',
5367
6358
  },
5368
- },
5369
- required: ['type'],
5370
- };
5371
- export const PropertyPreviewSchema = {
5372
- allOf: [
5373
- {
5374
- $ref: '#/components/schemas/Preview',
5375
- },
5376
- {
5377
- type: 'object',
5378
- properties: {
5379
- propertyId: {
5380
- type: 'integer',
5381
- format: 'int64',
5382
- },
5383
- propertyType: {
5384
- type: 'string',
5385
- enum: [
5386
- 'HOUSE',
5387
- 'TOWN_HOUSE',
5388
- 'COUNTRY_HOUSE',
5389
- 'VILLA',
5390
- 'COTTAGE',
5391
- 'APARTMENT',
5392
- 'DUPLEX',
5393
- 'TRIPLEX',
5394
- 'SEMI_BASEMENT',
5395
- 'ATTIC',
5396
- 'AGRICULTURAL_LAND',
5397
- 'RESIDENTIAL_LAND',
5398
- 'HOTEL_ROOM',
5399
- 'MOTEL_ROOM',
5400
- 'CO_LIVING_SPACE',
5401
- 'OFFICE',
5402
- 'COMMERCIAL_SPACE',
5403
- 'CO_WORKING_SPACE',
5404
- 'WAREHOUSE',
5405
- 'GARAGE',
5406
- ],
5407
- },
5408
- state: {
5409
- type: 'string',
5410
- enum: [
5411
- 'IN_REGISTRATION',
5412
- 'UNLISTED',
5413
- 'LISTED_INTERNALLY',
5414
- 'LISTED',
5415
- 'CLOSED',
5416
- ],
5417
- },
5418
- title: {
5419
- type: 'string',
5420
- },
5421
- coverUrl: {
5422
- type: 'string',
5423
- },
5424
- listingTypes: {
5425
- type: 'array',
5426
- items: {
5427
- $ref: '#/components/schemas/ListingTypePrice',
5428
- },
5429
- },
5430
- },
6359
+ defaultStageId: {
6360
+ type: 'string',
6361
+ format: 'uuid',
5431
6362
  },
5432
- ],
5433
- required: ['listingTypes', 'propertyId', 'propertyType', 'state'],
6363
+ },
5434
6364
  };
5435
6365
  export const AddressViewResponseSchema = {
5436
6366
  type: 'object',