@homespot-sdk/core 0.0.360 → 0.0.361

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.
@@ -1170,15 +1170,20 @@ export const OauthConnectionResponseSchema = {
1170
1170
  type: 'boolean',
1171
1171
  description: 'Like and comment counts on a post',
1172
1172
  },
1173
+ canReadInsights: {
1174
+ type: 'boolean',
1175
+ description: 'Views and reach of a post. Facebook reports them only for Pages with 100 or more likes',
1176
+ },
1173
1177
  reconnectRequired: {
1174
1178
  type: 'boolean',
1175
- description: 'The token is dead, or the grant lacks a scope the connect flow asks for — re-running the connect flow is what fixes it',
1179
+ description: 'The token is dead, or the grant lacks a scope the connect flow asks for (insights aside: without them canReadInsights is false and nothing else) — re-running the connect flow is what fixes it',
1176
1180
  },
1177
1181
  },
1178
1182
  required: [
1179
1183
  'agencyId',
1180
1184
  'canPublish',
1181
1185
  'canReadComments',
1186
+ 'canReadInsights',
1182
1187
  'canReadStats',
1183
1188
  'canReply',
1184
1189
  'createdAt',
@@ -1788,6 +1793,122 @@ export const SocialPostViewSchema = {
1788
1793
  'status',
1789
1794
  ],
1790
1795
  };
1796
+ export const MemberPeekResponseSchema = {
1797
+ type: 'object',
1798
+ properties: {
1799
+ memberId: {
1800
+ type: 'string',
1801
+ format: 'uuid',
1802
+ },
1803
+ firstName: {
1804
+ type: 'string',
1805
+ },
1806
+ lastName: {
1807
+ type: 'string',
1808
+ },
1809
+ photo: {
1810
+ type: 'string',
1811
+ },
1812
+ phone: {
1813
+ type: 'string',
1814
+ },
1815
+ email: {
1816
+ type: 'string',
1817
+ },
1818
+ },
1819
+ required: ['email', 'firstName', 'lastName', 'memberId'],
1820
+ };
1821
+ export const SocialCommentAuthorSchema = {
1822
+ type: 'object',
1823
+ properties: {
1824
+ name: {
1825
+ type: 'string',
1826
+ },
1827
+ username: {
1828
+ type: 'string',
1829
+ },
1830
+ },
1831
+ };
1832
+ export const SocialCommentResponseSchema = {
1833
+ type: 'object',
1834
+ properties: {
1835
+ commentId: {
1836
+ type: 'string',
1837
+ format: 'uuid',
1838
+ },
1839
+ author: {
1840
+ $ref: '#/components/schemas/SocialCommentAuthor',
1841
+ description: "Who wrote it, as far as Facebook / Instagram say; null on the agency's own comments, and when Meta does not say",
1842
+ },
1843
+ text: {
1844
+ type: 'string',
1845
+ description: 'Null on a sticker or a photo on its own, and once the comment is REMOVED',
1846
+ },
1847
+ commentedAt: {
1848
+ type: 'string',
1849
+ format: 'date-time',
1850
+ description: 'When it was written; for a reply sent from HomeSpot, when it was sent',
1851
+ },
1852
+ state: {
1853
+ type: 'string',
1854
+ enum: ['VISIBLE', 'HIDDEN', 'REMOVED'],
1855
+ },
1856
+ edited: {
1857
+ type: 'boolean',
1858
+ description: 'Changed by its author after it was written',
1859
+ },
1860
+ own: {
1861
+ type: 'boolean',
1862
+ description: "Written by the agency: shown as the agency's reply",
1863
+ },
1864
+ sentBy: {
1865
+ $ref: '#/components/schemas/SocialCommentSender',
1866
+ description: 'Own comments only',
1867
+ },
1868
+ delivery: {
1869
+ type: 'string',
1870
+ description: 'Own comments only: PENDING while HomeSpot gets it onto Facebook / Instagram, SENT once there, FAILED if Meta refused it',
1871
+ enum: ['PENDING', 'SENT', 'FAILED'],
1872
+ },
1873
+ failureReason: {
1874
+ type: 'string',
1875
+ description: 'Why it FAILED; retrying sends it again as it is',
1876
+ enum: [
1877
+ 'COMMENT_DELETED',
1878
+ 'RECONNECT_REQUIRED',
1879
+ 'PERMISSION_MISSING',
1880
+ 'RATE_LIMITED',
1881
+ 'UNKNOWN',
1882
+ ],
1883
+ },
1884
+ },
1885
+ required: ['commentId', 'commentedAt', 'edited', 'own', 'state'],
1886
+ };
1887
+ export const SocialCommentSenderSchema = {
1888
+ type: 'object',
1889
+ properties: {
1890
+ type: {
1891
+ type: 'string',
1892
+ enum: ['AGENT', 'AI', 'PAGE'],
1893
+ },
1894
+ member: {
1895
+ $ref: '#/components/schemas/MemberPeekResponse',
1896
+ description: 'AGENT only; also once they have left the agency',
1897
+ },
1898
+ },
1899
+ required: ['type'],
1900
+ };
1901
+ export const ReplyToSocialCommentRequestSchema = {
1902
+ type: 'object',
1903
+ properties: {
1904
+ text: {
1905
+ type: 'string',
1906
+ description: "Posted exactly as written; how long it may be is the channel's rule",
1907
+ minLength: 1,
1908
+ },
1909
+ },
1910
+ required: ['text'],
1911
+ };
1791
1912
  export const CloseListingRequestSchema = {
1792
1913
  type: 'object',
1793
1914
  properties: {
@@ -2353,31 +2474,6 @@ export const CursorPageCommentViewSchema = {
2353
2474
  },
2354
2475
  },
2355
2476
  };
2356
- export const MemberPeekResponseSchema = {
2357
- type: 'object',
2358
- properties: {
2359
- memberId: {
2360
- type: 'string',
2361
- format: 'uuid',
2362
- },
2363
- firstName: {
2364
- type: 'string',
2365
- },
2366
- lastName: {
2367
- type: 'string',
2368
- },
2369
- photo: {
2370
- type: 'string',
2371
- },
2372
- phone: {
2373
- type: 'string',
2374
- },
2375
- email: {
2376
- type: 'string',
2377
- },
2378
- },
2379
- required: ['email', 'firstName', 'lastName', 'memberId'],
2380
- };
2381
2477
  export const ContactLinkSchema = {
2382
2478
  type: 'object',
2383
2479
  properties: {
@@ -4797,6 +4893,11 @@ export const PropertyListingResponseSchema = {
4797
4893
  $ref: '#/components/schemas/SocialPostResponse',
4798
4894
  },
4799
4895
  },
4896
+ unansweredComments: {
4897
+ type: 'integer',
4898
+ format: 'int32',
4899
+ description: "Comment threads waiting for an answer from the agency, across the listing's posts",
4900
+ },
4800
4901
  createdAt: {
4801
4902
  type: 'string',
4802
4903
  format: 'date-time',
@@ -4817,6 +4918,7 @@ export const PropertyListingResponseSchema = {
4817
4918
  'price',
4818
4919
  'publicId',
4819
4920
  'socialPosts',
4921
+ 'unansweredComments',
4820
4922
  ],
4821
4923
  };
4822
4924
  export const PropertyPageResponseSchema = {
@@ -4956,10 +5058,22 @@ export const SocialPostResponseSchema = {
4956
5058
  },
4957
5059
  stats: {
4958
5060
  $ref: '#/components/schemas/SocialPostStats',
4959
- description: "The post's public counts as last read from Facebook / Instagram; null until the first read",
5061
+ description: "The post's numbers as last read from Facebook / Instagram; null until the first read",
5062
+ },
5063
+ unansweredComments: {
5064
+ type: 'integer',
5065
+ format: 'int32',
5066
+ description: 'Comment threads under the post waiting for an answer from the agency; 0 unless PUBLISHED',
4960
5067
  },
4961
5068
  },
4962
- required: ['caption', 'channel', 'createdBy', 'postId', 'status'],
5069
+ required: [
5070
+ 'caption',
5071
+ 'channel',
5072
+ 'createdBy',
5073
+ 'postId',
5074
+ 'status',
5075
+ 'unansweredComments',
5076
+ ],
4963
5077
  };
4964
5078
  export const SocialPostStatsSchema = {
4965
5079
  type: 'object',
@@ -4967,22 +5081,34 @@ export const SocialPostStatsSchema = {
4967
5081
  likes: {
4968
5082
  type: 'integer',
4969
5083
  format: 'int32',
5084
+ description: 'On Facebook all reactions, as Facebook shows them under the post',
4970
5085
  },
4971
5086
  comments: {
4972
5087
  type: 'integer',
4973
5088
  format: 'int32',
5089
+ description: 'Replies included',
4974
5090
  },
4975
5091
  shares: {
4976
5092
  type: 'integer',
4977
5093
  format: 'int32',
4978
5094
  },
5095
+ views: {
5096
+ type: 'integer',
5097
+ format: 'int32',
5098
+ description: 'How many times the post was seen',
5099
+ },
5100
+ reach: {
5101
+ type: 'integer',
5102
+ format: 'int32',
5103
+ description: 'How many people saw the post',
5104
+ },
4979
5105
  fetchedAt: {
4980
5106
  type: 'string',
4981
5107
  format: 'date-time',
4982
- description: 'When the counts were read — show how old they are',
5108
+ description: "When the numbers were read — show how old they are. Likes and comments are read every 15 minutes on the post's first day, then less often; Meta updates views and reach about once a day",
4983
5109
  },
4984
5110
  },
4985
- required: ['comments', 'fetchedAt', 'likes', 'shares'],
5111
+ required: ['fetchedAt'],
4986
5112
  };
4987
5113
  export const ListingOwnerContactResponseSchema = {
4988
5114
  type: 'object',
@@ -5266,6 +5392,7 @@ export const NotificationContentSchema = {
5266
5392
  SUBSCRIPTION_PAYMENT_REVERSED: '#/components/schemas/SubscriptionPaymentReversed',
5267
5393
  CHANNEL_REAUTH_REQUIRED: '#/components/schemas/ChannelReauthRequired',
5268
5394
  SOCIAL_POST_FAILED: '#/components/schemas/SocialPostFailed',
5395
+ SOCIAL_POST_COMMENTED: '#/components/schemas/SocialPostCommented',
5269
5396
  },
5270
5397
  },
5271
5398
  required: ['kind'],
@@ -5311,6 +5438,7 @@ export const NotificationViewSchema = {
5311
5438
  'SUBSCRIPTION_PAYMENT_REVERSED',
5312
5439
  'CHANNEL_REAUTH_REQUIRED',
5313
5440
  'SOCIAL_POST_FAILED',
5441
+ 'SOCIAL_POST_COMMENTED',
5314
5442
  ],
5315
5443
  },
5316
5444
  targetId: {
@@ -5339,6 +5467,9 @@ export const NotificationViewSchema = {
5339
5467
  {
5340
5468
  $ref: '#/components/schemas/NewSeekerRating',
5341
5469
  },
5470
+ {
5471
+ $ref: '#/components/schemas/SocialPostCommented',
5472
+ },
5342
5473
  {
5343
5474
  $ref: '#/components/schemas/SocialPostFailed',
5344
5475
  },
@@ -5359,6 +5490,11 @@ export const NotificationViewSchema = {
5359
5490
  },
5360
5491
  ],
5361
5492
  },
5493
+ count: {
5494
+ type: 'integer',
5495
+ format: 'int32',
5496
+ description: 'How many times this came while unread; the payload is the latest. For SOCIAL_POST_COMMENTED: the new comments on the post since its notification was last read. Starts again at 1 once read',
5497
+ },
5362
5498
  createdAt: {
5363
5499
  type: 'string',
5364
5500
  format: 'date-time',
@@ -5367,7 +5503,7 @@ export const NotificationViewSchema = {
5367
5503
  type: 'boolean',
5368
5504
  },
5369
5505
  },
5370
- required: ['createdAt', 'id', 'payload', 'read', 'seq', 'type'],
5506
+ required: ['count', 'createdAt', 'id', 'payload', 'read', 'seq', 'type'],
5371
5507
  };
5372
5508
  export const PropertyIdSchema = {
5373
5509
  type: 'object',
@@ -5378,6 +5514,53 @@ export const PropertyIdSchema = {
5378
5514
  },
5379
5515
  },
5380
5516
  };
5517
+ export const SocialCommentIdSchema = {
5518
+ type: 'object',
5519
+ properties: {
5520
+ value: {
5521
+ type: 'string',
5522
+ format: 'uuid',
5523
+ },
5524
+ },
5525
+ };
5526
+ export const SocialPostCommentedSchema = {
5527
+ properties: {
5528
+ postId: {
5529
+ $ref: '#/components/schemas/SocialPostId',
5530
+ },
5531
+ commentId: {
5532
+ $ref: '#/components/schemas/SocialCommentId',
5533
+ },
5534
+ contactId: {
5535
+ $ref: '#/components/schemas/ContactId',
5536
+ },
5537
+ propertyId: {
5538
+ $ref: '#/components/schemas/PropertyId',
5539
+ },
5540
+ listingId: {
5541
+ type: 'integer',
5542
+ format: 'int64',
5543
+ },
5544
+ propertyTitle: {
5545
+ type: 'string',
5546
+ },
5547
+ channel: {
5548
+ type: 'string',
5549
+ enum: ['FACEBOOK', 'INSTAGRAM'],
5550
+ },
5551
+ author: {
5552
+ type: 'string',
5553
+ },
5554
+ commentSnippet: {
5555
+ type: 'string',
5556
+ },
5557
+ kind: {
5558
+ type: 'string',
5559
+ enum: ['SOCIAL_POST_COMMENTED'],
5560
+ },
5561
+ },
5562
+ required: ['kind'],
5563
+ };
5381
5564
  export const SocialPostFailedSchema = {
5382
5565
  properties: {
5383
5566
  postId: {
@@ -6593,6 +6776,74 @@ export const ComposerPreviewSchema = {
6593
6776
  },
6594
6777
  required: ['access', 'caption', 'channel', 'limits', 'photos', 'ratios'],
6595
6778
  };
6779
+ export const CursorPageSocialCommentThreadResponseSchema = {
6780
+ type: 'object',
6781
+ properties: {
6782
+ items: {
6783
+ type: 'array',
6784
+ items: {
6785
+ $ref: '#/components/schemas/SocialCommentThreadResponse',
6786
+ },
6787
+ },
6788
+ nextCursor: {
6789
+ type: 'string',
6790
+ },
6791
+ hasNext: {
6792
+ type: 'boolean',
6793
+ },
6794
+ },
6795
+ };
6796
+ export const SocialCommentPostSchema = {
6797
+ type: 'object',
6798
+ properties: {
6799
+ postId: {
6800
+ type: 'string',
6801
+ format: 'uuid',
6802
+ },
6803
+ channel: {
6804
+ type: 'string',
6805
+ enum: ['FACEBOOK', 'INSTAGRAM'],
6806
+ },
6807
+ status: {
6808
+ type: 'string',
6809
+ description: 'PUBLISHED, or REMOVED once gone from Facebook / Instagram: its comments stay, and can no longer be answered',
6810
+ enum: ['PUBLISHING', 'PUBLISHED', 'FAILED', 'REMOVED'],
6811
+ },
6812
+ permalink: {
6813
+ type: 'string',
6814
+ },
6815
+ publishedAt: {
6816
+ type: 'string',
6817
+ format: 'date-time',
6818
+ },
6819
+ },
6820
+ required: ['channel', 'permalink', 'postId', 'publishedAt', 'status'],
6821
+ };
6822
+ export const SocialCommentThreadResponseSchema = {
6823
+ type: 'object',
6824
+ properties: {
6825
+ post: {
6826
+ $ref: '#/components/schemas/SocialCommentPost',
6827
+ description: 'The post the thread is under',
6828
+ },
6829
+ comment: {
6830
+ $ref: '#/components/schemas/SocialCommentResponse',
6831
+ description: 'The comment that started the thread',
6832
+ },
6833
+ replies: {
6834
+ type: 'array',
6835
+ description: 'Oldest first, one level deep as Facebook and Instagram show it: a reply to a reply is listed here too',
6836
+ items: {
6837
+ $ref: '#/components/schemas/SocialCommentResponse',
6838
+ },
6839
+ },
6840
+ answered: {
6841
+ type: 'boolean',
6842
+ description: "False while the thread's latest comment from someone else has no reply from the agency after it. Hidden and removed comments need no answer, and a FAILED reply is none",
6843
+ },
6844
+ },
6845
+ required: ['answered', 'comment', 'post', 'replies'],
6846
+ };
6596
6847
  export const ContactGridResponseSchema = {
6597
6848
  type: 'object',
6598
6849
  properties: {