@rubytech/create-maxy-code 0.1.37 → 0.1.38

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.
Files changed (233) hide show
  1. package/package.json +1 -1
  2. package/payload/platform/package-lock.json +752 -512
  3. package/payload/platform/plugins/loop/PLUGIN.md +11 -0
  4. package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts.map +1 -1
  5. package/payload/platform/services/claude-session-manager/dist/pty-spawner.js +10 -4
  6. package/payload/platform/services/claude-session-manager/dist/pty-spawner.js.map +1 -1
  7. package/payload/platform/services/claude-session-manager/dist/tool-surface.d.ts +4 -1
  8. package/payload/platform/services/claude-session-manager/dist/tool-surface.d.ts.map +1 -1
  9. package/payload/platform/services/claude-session-manager/dist/tool-surface.js +4 -1
  10. package/payload/platform/services/claude-session-manager/dist/tool-surface.js.map +1 -1
  11. package/payload/premium-plugins/real-agent/plugins/loop/PLUGIN.md +11 -0
  12. package/dist/__tests__/onboarding-state-readback.test.js +0 -61
  13. package/dist/onboarding-readback.js +0 -27
  14. package/payload/platform/lib/anthropic-key/dist/index.d.ts +0 -22
  15. package/payload/platform/lib/anthropic-key/dist/index.d.ts.map +0 -1
  16. package/payload/platform/lib/anthropic-key/dist/index.js +0 -232
  17. package/payload/platform/lib/anthropic-key/dist/index.js.map +0 -1
  18. package/payload/platform/plugins/admin/mcp/dist/lib/onboarding.d.ts +0 -39
  19. package/payload/platform/plugins/admin/mcp/dist/lib/onboarding.d.ts.map +0 -1
  20. package/payload/platform/plugins/admin/mcp/dist/lib/onboarding.js +0 -249
  21. package/payload/platform/plugins/admin/mcp/dist/lib/onboarding.js.map +0 -1
  22. package/payload/platform/plugins/real-agency/plugins/.claude-plugin/marketplace.json +0 -13
  23. package/payload/platform/plugins/real-agency/plugins/loop/.claude-plugin/plugin.json +0 -17
  24. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/index.d.ts +0 -2
  25. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/index.d.ts.map +0 -1
  26. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/index.js +0 -293
  27. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/index.js.map +0 -1
  28. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/crypto.d.ts +0 -10
  29. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/crypto.d.ts.map +0 -1
  30. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/crypto.js +0 -88
  31. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/crypto.js.map +0 -1
  32. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/loop-api.d.ts +0 -82
  33. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/loop-api.d.ts.map +0 -1
  34. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/loop-api.js +0 -427
  35. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/loop-api.js.map +0 -1
  36. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/neo4j.d.ts +0 -5
  37. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/neo4j.d.ts.map +0 -1
  38. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/neo4j.js +0 -40
  39. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/neo4j.js.map +0 -1
  40. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/customer-preferences.d.ts +0 -10
  41. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/customer-preferences.d.ts.map +0 -1
  42. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/customer-preferences.js +0 -24
  43. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/customer-preferences.js.map +0 -1
  44. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/feedback.d.ts +0 -16
  45. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/feedback.d.ts.map +0 -1
  46. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/feedback.js +0 -35
  47. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/feedback.js.map +0 -1
  48. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-deregister.d.ts +0 -5
  49. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-deregister.d.ts.map +0 -1
  50. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-deregister.js +0 -19
  51. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-deregister.js.map +0 -1
  52. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-list.d.ts +0 -4
  53. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-list.d.ts.map +0 -1
  54. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-list.js +0 -14
  55. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-list.js.map +0 -1
  56. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-register.d.ts +0 -9
  57. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-register.d.ts.map +0 -1
  58. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-register.js +0 -60
  59. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-register.js.map +0 -1
  60. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-enquiry.d.ts +0 -13
  61. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-enquiry.d.ts.map +0 -1
  62. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-enquiry.js +0 -41
  63. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-enquiry.js.map +0 -1
  64. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-batch.d.ts +0 -9
  65. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-batch.d.ts.map +0 -1
  66. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-batch.js +0 -16
  67. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-batch.js.map +0 -1
  68. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-request.d.ts +0 -15
  69. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-request.d.ts.map +0 -1
  70. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-request.js +0 -11
  71. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-request.js.map +0 -1
  72. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match.d.ts +0 -10
  73. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match.d.ts.map +0 -1
  74. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match.js +0 -39
  75. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match.js.map +0 -1
  76. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-detail.d.ts +0 -9
  77. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-detail.d.ts.map +0 -1
  78. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-detail.js +0 -125
  79. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-detail.js.map +0 -1
  80. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-search.d.ts +0 -18
  81. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-search.d.ts.map +0 -1
  82. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-search.js +0 -87
  83. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-search.js.map +0 -1
  84. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-detail.d.ts +0 -10
  85. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-detail.d.ts.map +0 -1
  86. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-detail.js +0 -82
  87. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-detail.js.map +0 -1
  88. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-listed.d.ts +0 -12
  89. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-listed.d.ts.map +0 -1
  90. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-listed.js +0 -32
  91. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-listed.js.map +0 -1
  92. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-request.d.ts +0 -15
  93. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-request.d.ts.map +0 -1
  94. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-request.js +0 -11
  95. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-request.js.map +0 -1
  96. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-search.d.ts +0 -16
  97. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-search.d.ts.map +0 -1
  98. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-search.js +0 -41
  99. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-search.js.map +0 -1
  100. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/supplier.d.ts +0 -13
  101. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/supplier.d.ts.map +0 -1
  102. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/supplier.js +0 -49
  103. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/supplier.js.map +0 -1
  104. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-availability.d.ts +0 -7
  105. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-availability.d.ts.map +0 -1
  106. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-availability.js +0 -19
  107. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-availability.js.map +0 -1
  108. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-info.d.ts +0 -5
  109. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-info.d.ts.map +0 -1
  110. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-info.js +0 -32
  111. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-info.js.map +0 -1
  112. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-create.d.ts +0 -14
  113. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-create.d.ts.map +0 -1
  114. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-create.js +0 -11
  115. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-create.js.map +0 -1
  116. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-detail.d.ts +0 -9
  117. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-detail.d.ts.map +0 -1
  118. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-detail.js +0 -85
  119. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-detail.js.map +0 -1
  120. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-search.d.ts +0 -13
  121. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-search.d.ts.map +0 -1
  122. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-search.js +0 -44
  123. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-search.js.map +0 -1
  124. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-update.d.ts +0 -14
  125. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-update.d.ts.map +0 -1
  126. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-update.js +0 -18
  127. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-update.js.map +0 -1
  128. package/payload/premium-plugins/real-agency/plugins/.claude-plugin/marketplace.json +0 -13
  129. package/payload/premium-plugins/real-agency/plugins/loop/.claude-plugin/plugin.json +0 -17
  130. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/index.d.ts +0 -2
  131. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/index.d.ts.map +0 -1
  132. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/index.js +0 -293
  133. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/index.js.map +0 -1
  134. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/crypto.d.ts +0 -10
  135. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/crypto.d.ts.map +0 -1
  136. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/crypto.js +0 -88
  137. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/crypto.js.map +0 -1
  138. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/loop-api.d.ts +0 -82
  139. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/loop-api.d.ts.map +0 -1
  140. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/loop-api.js +0 -427
  141. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/loop-api.js.map +0 -1
  142. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/neo4j.d.ts +0 -5
  143. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/neo4j.d.ts.map +0 -1
  144. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/neo4j.js +0 -40
  145. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/neo4j.js.map +0 -1
  146. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/customer-preferences.d.ts +0 -10
  147. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/customer-preferences.d.ts.map +0 -1
  148. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/customer-preferences.js +0 -24
  149. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/customer-preferences.js.map +0 -1
  150. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/feedback.d.ts +0 -16
  151. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/feedback.d.ts.map +0 -1
  152. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/feedback.js +0 -35
  153. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/feedback.js.map +0 -1
  154. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-deregister.d.ts +0 -5
  155. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-deregister.d.ts.map +0 -1
  156. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-deregister.js +0 -19
  157. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-deregister.js.map +0 -1
  158. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-list.d.ts +0 -4
  159. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-list.d.ts.map +0 -1
  160. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-list.js +0 -14
  161. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-list.js.map +0 -1
  162. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-register.d.ts +0 -9
  163. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-register.d.ts.map +0 -1
  164. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-register.js +0 -60
  165. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-register.js.map +0 -1
  166. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-enquiry.d.ts +0 -13
  167. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-enquiry.d.ts.map +0 -1
  168. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-enquiry.js +0 -41
  169. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-enquiry.js.map +0 -1
  170. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-batch.d.ts +0 -9
  171. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-batch.d.ts.map +0 -1
  172. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-batch.js +0 -16
  173. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-batch.js.map +0 -1
  174. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-request.d.ts +0 -15
  175. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-request.d.ts.map +0 -1
  176. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-request.js +0 -11
  177. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-request.js.map +0 -1
  178. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match.d.ts +0 -10
  179. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match.d.ts.map +0 -1
  180. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match.js +0 -39
  181. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match.js.map +0 -1
  182. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/people-detail.d.ts +0 -9
  183. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/people-detail.d.ts.map +0 -1
  184. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/people-detail.js +0 -125
  185. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/people-detail.js.map +0 -1
  186. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/people-search.d.ts +0 -18
  187. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/people-search.d.ts.map +0 -1
  188. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/people-search.js +0 -87
  189. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/people-search.js.map +0 -1
  190. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-detail.d.ts +0 -10
  191. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-detail.d.ts.map +0 -1
  192. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-detail.js +0 -82
  193. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-detail.js.map +0 -1
  194. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-listed.d.ts +0 -12
  195. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-listed.d.ts.map +0 -1
  196. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-listed.js +0 -32
  197. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-listed.js.map +0 -1
  198. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-request.d.ts +0 -15
  199. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-request.d.ts.map +0 -1
  200. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-request.js +0 -11
  201. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-request.js.map +0 -1
  202. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-search.d.ts +0 -16
  203. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-search.d.ts.map +0 -1
  204. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-search.js +0 -41
  205. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-search.js.map +0 -1
  206. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/supplier.d.ts +0 -13
  207. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/supplier.d.ts.map +0 -1
  208. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/supplier.js +0 -49
  209. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/supplier.js.map +0 -1
  210. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/team-availability.d.ts +0 -7
  211. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/team-availability.d.ts.map +0 -1
  212. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/team-availability.js +0 -19
  213. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/team-availability.js.map +0 -1
  214. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/team-info.d.ts +0 -5
  215. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/team-info.d.ts.map +0 -1
  216. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/team-info.js +0 -32
  217. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/team-info.js.map +0 -1
  218. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-create.d.ts +0 -14
  219. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-create.d.ts.map +0 -1
  220. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-create.js +0 -11
  221. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-create.js.map +0 -1
  222. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-detail.d.ts +0 -9
  223. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-detail.d.ts.map +0 -1
  224. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-detail.js +0 -85
  225. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-detail.js.map +0 -1
  226. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-search.d.ts +0 -13
  227. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-search.d.ts.map +0 -1
  228. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-search.js +0 -44
  229. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-search.js.map +0 -1
  230. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-update.d.ts +0 -14
  231. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-update.d.ts.map +0 -1
  232. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-update.js +0 -18
  233. package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-update.js.map +0 -1
@@ -1,125 +0,0 @@
1
- import { aggregateAcrossTeams, formatAggregationResult, loopGet, } from "../lib/loop-api.js";
2
- export async function peopleDetail(params) {
3
- const { accountId, personId, role, teamName } = params;
4
- const result = await aggregateAcrossTeams(accountId, "people", "loop-people-detail", async (apiKey, team) => {
5
- const basePath = role ? `/people/${role}` : "/people";
6
- const path = `${basePath}/${personId}`;
7
- const data = await loopGet(apiKey, path, "loop-people-detail", team);
8
- if (data && typeof data === "object" && !Array.isArray(data)) {
9
- return [data];
10
- }
11
- return [];
12
- }, { teamName });
13
- return formatAggregationResult(result, (record) => formatDetailRecord(record, role), "person details");
14
- }
15
- function formatDetailRecord(record, role) {
16
- if (role === "buyers") {
17
- const p = record;
18
- const lines = [`**${p.buyerGroupName ?? "Unknown"}** [ID: ${p.id}]`];
19
- if (p.maxPrice != null)
20
- lines.push(`Max price: £${p.maxPrice.toLocaleString("en-GB")}`);
21
- if (p.minBeds)
22
- lines.push(`Min beds: ${p.minBeds}`);
23
- if (p.position && p.position !== "none")
24
- lines.push(`Position: ${p.position}`);
25
- if (p.sellingPosition)
26
- lines.push(`Selling position: ${p.sellingPosition}`);
27
- if (p.purchaseReason)
28
- lines.push(`Purchase reason: ${p.purchaseReason}`);
29
- if (p.financiallyVerified)
30
- lines.push(`Financially verified: ${p.financiallyVerified}`);
31
- if (p.mortgageOffered)
32
- lines.push(`Mortgage: ${p.mortgageOffered}`);
33
- if (p.requirementNotes)
34
- lines.push(`Requirements: ${p.requirementNotes}`);
35
- if (p.propertyTypes?.length)
36
- lines.push(`Property types: ${p.propertyTypes.join(", ")}`);
37
- if (p.searchAreas?.length)
38
- lines.push(`Search areas: ${p.searchAreas.join(", ")}`);
39
- if (p.viewings?.length)
40
- lines.push(`Viewings: ${p.viewings.length}`);
41
- if (p.offers?.length)
42
- lines.push(`Offers: ${p.offers.length}`);
43
- if (p.people?.length) {
44
- lines.push(`\n**Contacts (${p.people.length}):**`);
45
- for (const person of p.people) {
46
- const name = [person.firstName, person.lastName].filter(Boolean).join(" ");
47
- const phone = person.primaryPhone ?? "";
48
- const email = person.primaryEmail ?? "";
49
- const contact = [phone, email].filter(Boolean).join(" | ");
50
- lines.push(` - ${name} [ID: ${person.id}]${contact ? ` — ${contact}` : ""}`);
51
- }
52
- }
53
- return lines.join("\n");
54
- }
55
- if (role === "sellers" || role === "landlords") {
56
- const p = record;
57
- const lines = [`**${p.sellerGroupName ?? "Unknown"}** [ID: ${p.id}]`];
58
- if (p.property) {
59
- const prop = p.property;
60
- if (prop.propertyAddress)
61
- lines.push(`Property: ${prop.propertyAddress}`);
62
- if (prop.price != null)
63
- lines.push(`Price: £${Number(prop.price).toLocaleString("en-GB")}`);
64
- if (prop.status)
65
- lines.push(`Status: ${prop.status}`);
66
- if (prop.propertyType)
67
- lines.push(`Type: ${prop.propertyType}`);
68
- if (prop.propertyId || prop.id)
69
- lines.push(`Property ID: ${prop.propertyId ?? prop.id}`);
70
- }
71
- if (p.people?.length) {
72
- lines.push(`\n**Contacts (${p.people.length}):**`);
73
- for (const person of p.people) {
74
- const name = [person.firstName, person.lastName].filter(Boolean).join(" ");
75
- const phone = person.primaryPhone ?? "";
76
- const email = person.primaryEmail ?? "";
77
- const contact = [phone, email].filter(Boolean).join(" | ");
78
- lines.push(` - ${name} [ID: ${person.id}]${contact ? ` — ${contact}` : ""}`);
79
- }
80
- }
81
- return lines.join("\n");
82
- }
83
- // Generic /people/{id} — PersonDetail schema
84
- const p = record;
85
- const title = p.title?.trim() ? `${p.title.trim()} ` : "";
86
- const name = [p.firstName, p.lastName].filter(Boolean).join(" ") || "Unknown";
87
- const lines = [`**${title}${name}** [ID: ${p.id}]`];
88
- if (p.primaryEmail)
89
- lines.push(`Email: ${p.primaryEmail}`);
90
- if (p.primaryPhone)
91
- lines.push(`Phone: ${p.primaryPhone}`);
92
- if (p.dateCreated)
93
- lines.push(`Created: ${p.dateCreated.split("T")[0]}`);
94
- // Build address from components
95
- const addrParts = [
96
- p.houseSecondaryNameOrNumber,
97
- p.houseNameOrNumber,
98
- p.street,
99
- p.locality,
100
- p.town,
101
- p.postcode,
102
- ].filter(Boolean);
103
- if (addrParts.length)
104
- lines.push(`Address: ${addrParts.join(", ")}`);
105
- if (p.contactNotes)
106
- lines.push(`Notes: ${p.contactNotes}`);
107
- if (p.buyerProfiles?.length) {
108
- lines.push(`\n**Buyer profiles (${p.buyerProfiles.length}):**`);
109
- for (const bp of p.buyerProfiles) {
110
- const bpName = bp.buyerGroupName ?? `Buyer ${bp.id}`;
111
- const price = bp.maxPrice != null ? ` max £${bp.maxPrice.toLocaleString("en-GB")}` : "";
112
- lines.push(` - ${bpName} [ID: ${bp.id}]${price}`);
113
- }
114
- }
115
- if (p.sellerProfiles?.length) {
116
- lines.push(`\n**Seller profiles (${p.sellerProfiles.length}):**`);
117
- for (const sp of p.sellerProfiles) {
118
- const spName = sp.sellerGroupName ?? `Seller ${sp.id}`;
119
- const addr = sp.propertyAddress ? ` — ${sp.propertyAddress}` : "";
120
- lines.push(` - ${spName} [ID: ${sp.id}]${addr}`);
121
- }
122
- }
123
- return lines.join("\n");
124
- }
125
- //# sourceMappingURL=people-detail.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"people-detail.js","sourceRoot":"","sources":["../../src/tools/people-detail.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,OAAO,GACR,MAAM,oBAAoB,CAAC;AAgH5B,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,MAKlC;IACC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;IAEvD,MAAM,MAAM,GAAG,MAAM,oBAAoB,CACvC,SAAS,EACT,QAAQ,EACR,oBAAoB,EACpB,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE;QACrB,MAAM,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;QACtD,MAAM,IAAI,GAAG,GAAG,QAAQ,IAAI,QAAQ,EAAE,CAAC;QACvC,MAAM,IAAI,GAAG,MAAM,OAAO,CAA0B,MAAM,EAAE,IAAI,EAAE,oBAAoB,EAAE,IAAI,CAAC,CAAC;QAC9F,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YAC7D,OAAO,CAAC,IAAI,CAAC,CAAC;QAChB,CAAC;QACD,OAAO,EAAE,CAAC;IACZ,CAAC,EACD,EAAE,QAAQ,EAAE,CACb,CAAC;IAEF,OAAO,uBAAuB,CAC5B,MAAM,EACN,CAAC,MAAM,EAAE,EAAE,CAAC,kBAAkB,CAAC,MAAM,EAAE,IAAI,CAAC,EAC5C,gBAAgB,CACjB,CAAC;AACJ,CAAC;AAED,SAAS,kBAAkB,CAAC,MAA+B,EAAE,IAAiB;IAC5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C,cAAc,EAAE,MAAM,EAAE,CAAC;QAC7B,KAAK,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC,cAAc,CAAC,MAAM,MAAM,CAAC,CAAC;QAClE,KAAK,MAAM,EAAE,IAAI,CAAC,CAAC,cAAc,EAAE,CAAC;YAClC,MAAM,MAAM,GAAG,EAAE,CAAC,eAAe,IAAI,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC;YACvD,MAAM,IAAI,GAAG,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAClE,KAAK,CAAC,IAAI,CAAC,OAAO,MAAM,SAAS,EAAE,CAAC,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;QACpD,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
@@ -1,18 +0,0 @@
1
- type PeopleRole = "buyers" | "sellers" | "renters" | "landlords";
2
- export declare function peopleSearch(params: {
3
- accountId: string;
4
- role?: PeopleRole;
5
- searchTerm?: string;
6
- maxPrice?: number;
7
- minBeds?: number;
8
- searchAreas?: string;
9
- propertyTypes?: string;
10
- startDate?: string;
11
- endDate?: string;
12
- minPrice?: number;
13
- maxRent?: number;
14
- teamName?: string;
15
- limit?: number;
16
- }): Promise<string>;
17
- export {};
18
- //# sourceMappingURL=people-search.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"people-search.d.ts","sourceRoot":"","sources":["../../src/tools/people-search.ts"],"names":[],"mappings":"AAwEA,KAAK,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,CAAC;AAEjE,wBAAsB,YAAY,CAAC,MAAM,EAAE;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CAsDlB"}
@@ -1,87 +0,0 @@
1
- import { aggregateAcrossTeams, formatAggregationResult, loopGet, } from "../lib/loop-api.js";
2
- export async function peopleSearch(params) {
3
- const { accountId, role, searchTerm, maxPrice, minBeds, searchAreas, propertyTypes, startDate, endDate, minPrice, maxRent, teamName, limit, } = params;
4
- // Role-specific endpoints return different schemas — use a generic record
5
- // type for aggregation, then cast per-role in the formatter.
6
- const result = await aggregateAcrossTeams(accountId, "people", "loop-people-search", async (apiKey, team) => {
7
- const qp = [];
8
- if (searchTerm)
9
- qp.push(`SearchTerm=${encodeURIComponent(searchTerm)}`);
10
- if (role === "buyers") {
11
- if (maxPrice != null)
12
- qp.push(`MaxPrice=${maxPrice}`);
13
- if (minBeds != null)
14
- qp.push(`MinBeds=${minBeds}`);
15
- if (searchAreas)
16
- qp.push(`SearchAreas=${encodeURIComponent(searchAreas)}`);
17
- if (propertyTypes)
18
- qp.push(`PropertyTypes=${encodeURIComponent(propertyTypes)}`);
19
- }
20
- else if (role === "sellers" || role === "landlords") {
21
- if (startDate)
22
- qp.push(`StartDate=${encodeURIComponent(startDate)}`);
23
- if (endDate)
24
- qp.push(`EndDate=${encodeURIComponent(endDate)}`);
25
- if (minPrice != null)
26
- qp.push(`MinPrice=${minPrice}`);
27
- if (maxPrice != null)
28
- qp.push(`MaxPrice=${maxPrice}`);
29
- }
30
- else if (role === "renters") {
31
- if (maxRent != null)
32
- qp.push(`MaxRent=${maxRent}`);
33
- if (minBeds != null)
34
- qp.push(`MinBeds=${minBeds}`);
35
- if (searchAreas)
36
- qp.push(`SearchAreas=${encodeURIComponent(searchAreas)}`);
37
- if (propertyTypes)
38
- qp.push(`PropertyTypes=${encodeURIComponent(propertyTypes)}`);
39
- }
40
- else {
41
- // Generic /people endpoint
42
- if (startDate)
43
- qp.push(`StartDate=${encodeURIComponent(startDate)}`);
44
- if (endDate)
45
- qp.push(`EndDate=${encodeURIComponent(endDate)}`);
46
- }
47
- const query = qp.length > 0 ? `?${qp.join("&")}` : "";
48
- const basePath = role ? `/people/${role}` : "/people";
49
- const path = `${basePath}${query}`;
50
- const data = await loopGet(apiKey, path, "loop-people-search", team);
51
- return Array.isArray(data) ? data : [];
52
- }, { teamName, limitPerTeam: limit ?? 50, limitTotal: limit ?? 200 });
53
- const entityName = role ?? "people";
54
- return formatAggregationResult(result, (record) => formatPersonRecord(record, role), entityName);
55
- }
56
- function formatPersonRecord(record, role) {
57
- if (role === "buyers") {
58
- const p = record;
59
- const name = p.buyerGroupName ?? "Unknown";
60
- const id = p.id != null ? ` [ID: ${p.id}]` : "";
61
- const price = p.maxPrice != null ? ` — max £${p.maxPrice.toLocaleString("en-GB")}` : "";
62
- const beds = p.minBeds ? ` ${p.minBeds}+ beds` : "";
63
- const position = p.position && p.position !== "none" ? ` (${p.position})` : "";
64
- const viewings = p.viewingCount ? ` | ${p.viewingCount} viewing${p.viewingCount !== 1 ? "s" : ""}` : "";
65
- const offers = p.offerCount ? ` | ${p.offerCount} offer${p.offerCount !== 1 ? "s" : ""}` : "";
66
- return `- ${name}${id}${price}${beds}${position}${viewings}${offers}`;
67
- }
68
- if (role === "sellers" || role === "landlords") {
69
- const p = record;
70
- const name = p.sellerGroupName ?? "Unknown";
71
- const id = p.id != null ? ` [ID: ${p.id}]` : "";
72
- const addr = p.propertyAddress ? ` — ${p.propertyAddress}` : "";
73
- const price = p.price != null ? ` £${p.price.toLocaleString("en-GB")}` : "";
74
- const status = p.propertyStatus ? ` [${p.propertyStatus}]` : "";
75
- const viewings = p.viewingCount ? ` | ${p.viewingCount} viewing${p.viewingCount !== 1 ? "s" : ""}` : "";
76
- const offers = p.offerCount ? ` | ${p.offerCount} offer${p.offerCount !== 1 ? "s" : ""}` : "";
77
- return `- ${name}${id}${addr}${price}${status}${viewings}${offers}`;
78
- }
79
- // Generic /people or /people/renters — uses PersonSummary schema
80
- const p = record;
81
- const name = [p.firstName, p.lastName].filter(Boolean).join(" ") || "Unknown";
82
- const id = p.id != null ? ` [ID: ${p.id}]` : "";
83
- const contact = p.primaryEmail ?? p.primaryPhone ?? "";
84
- const title = p.title?.trim() ? `${p.title.trim()} ` : "";
85
- return `- ${title}${name}${id}${contact ? ` <${contact}>` : ""}`;
86
- }
87
- //# sourceMappingURL=people-search.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"people-search.js","sourceRoot":"","sources":["../../src/tools/people-search.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,OAAO,GACR,MAAM,oBAAoB,CAAC;AAsE5B,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,MAiBlC;IACC,MAAM,EACJ,SAAS,EAAE,IAAI,EAAE,UAAU,EAC3B,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,aAAa,EAC7C,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EACrC,QAAQ,EAAE,KAAK,GAChB,GAAG,MAAM,CAAC;IAEX,0EAA0E;IAC1E,6DAA6D;IAC7D,MAAM,MAAM,GAAG,MAAM,oBAAoB,CACvC,SAAS,EACT,QAAQ,EACR,oBAAoB,EACpB,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE;QACrB,MAAM,EAAE,GAAa,EAAE,CAAC;QACxB,IAAI,UAAU;YAAE,EAAE,CAAC,IAAI,CAAC,cAAc,kBAAkB,CAAC,UAAU,CAAC,EAAE,CAAC,CA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AM,EAAE,CAAC;IACtE,CAAC;IAED,iEAAiE;IACjE,MAAM,CAAC,GAAG,MAAsC,CAAC;IACjD,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC;IAC9E,MAAM,EAAE,GAAG,CAAC,CAAC,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAChD,MAAM,OAAO,GAAG,CAAC,CAAC,YAAY,IAAI,CAAC,CAAC,YAAY,IAAI,EAAE,CAAC;IACvD,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAC1D,OAAO,KAAK,KAAK,GAAG,IAAI,GAAG,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AACnE,CAAC"}
@@ -1,10 +0,0 @@
1
- type Department = "sales" | "lettings";
2
- export declare function propertyDetail(params: {
3
- accountId: string;
4
- propertyId: number;
5
- department: Department;
6
- previewHash?: number;
7
- teamName?: string;
8
- }): Promise<string>;
9
- export {};
10
- //# sourceMappingURL=property-detail.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"property-detail.d.ts","sourceRoot":"","sources":["../../src/tools/property-detail.ts"],"names":[],"mappings":"AA0DA,KAAK,UAAU,GAAG,OAAO,GAAG,UAAU,CAAC;AAEvC,wBAAsB,cAAc,CAAC,MAAM,EAAE;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,UAAU,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,OAAO,CAAC,MAAM,CAAC,CA8ElB"}
@@ -1,82 +0,0 @@
1
- import { aggregateAcrossTeams, formatAggregationResult, loopGet, } from "../lib/loop-api.js";
2
- export async function propertyDetail(params) {
3
- const { accountId, propertyId, department, previewHash, teamName } = params;
4
- const result = await aggregateAcrossTeams(accountId, "properties", "loop-property-detail", async (apiKey, team) => {
5
- const path = previewHash
6
- ? `/property/residential/${department}/${propertyId}/preview/${previewHash}`
7
- : `/property/residential/${department}/${propertyId}`;
8
- const data = await loopGet(apiKey, path, "loop-property-detail", team);
9
- if (data && typeof data === "object" && !Array.isArray(data)) {
10
- return [data];
11
- }
12
- return [];
13
- }, { teamName });
14
- return formatAggregationResult(result, (p) => {
15
- // Build display address from components
16
- const addr = p.address_DisplayAddress
17
- ?? ([
18
- p.address_HouseSecondaryNameOrNumber,
19
- p.address_HouseNameOrNumber,
20
- p.address_Street,
21
- p.address_Town,
22
- p.address_Postcode,
23
- ].filter(Boolean).join(", ") || "Unknown address");
24
- const lines = [`**${addr}** [ID: ${p.id}]`];
25
- if (p.price != null) {
26
- const qualifier = p.priceQualifier && p.priceQualifier !== "none" ? ` (${p.priceQualifier})` : "";
27
- lines.push(`Price: £${p.price.toLocaleString("en-GB")}${qualifier}`);
28
- }
29
- if (p.status)
30
- lines.push(`Status: ${p.status}`);
31
- if (p.propertyType)
32
- lines.push(`Type: ${p.propertyType}`);
33
- if (p.bedrooms != null)
34
- lines.push(`Bedrooms: ${p.bedrooms}`);
35
- if (p.bathrooms != null)
36
- lines.push(`Bathrooms: ${p.bathrooms}`);
37
- if (p.receptionRooms != null)
38
- lines.push(`Reception rooms: ${p.receptionRooms}`);
39
- if (p.floorArea)
40
- lines.push(`Floor area: ${p.floorArea} sq ft`);
41
- if (p.tenure && p.tenure !== "None")
42
- lines.push(`Tenure: ${p.tenure}`);
43
- if (p.councilTaxBand)
44
- lines.push(`Council Tax: Band ${p.councilTaxBand}`);
45
- if (p.parking)
46
- lines.push(`Parking: ${p.parking}`);
47
- if (p.outsideSpace)
48
- lines.push(`Outside: ${p.outsideSpace}`);
49
- if (p.serviceCharge)
50
- lines.push(`Service charge: £${p.serviceCharge}`);
51
- if (p.groundRent)
52
- lines.push(`Ground rent: £${p.groundRent}`);
53
- // Key dates
54
- const dates = [];
55
- if (p.dateInstructed)
56
- dates.push(`Instructed: ${p.dateInstructed.split("T")[0]}`);
57
- if (p.dateLaunched)
58
- dates.push(`Launched: ${p.dateLaunched.split("T")[0]}`);
59
- if (p.dateExchanged)
60
- dates.push(`Exchanged: ${p.dateExchanged.split("T")[0]}`);
61
- if (p.dateCompleted)
62
- dates.push(`Completed: ${p.dateCompleted.split("T")[0]}`);
63
- if (p.dateWithdrawn)
64
- dates.push(`Withdrawn: ${p.dateWithdrawn.split("T")[0]}`);
65
- if (dates.length)
66
- lines.push(dates.join(" | "));
67
- if (p.features?.length) {
68
- lines.push(`Features: ${p.features.join(", ")}`);
69
- }
70
- if (p.images?.length) {
71
- lines.push(`Images: ${p.images.length} photo${p.images.length !== 1 ? "s" : ""}`);
72
- }
73
- // Short description — strip HTML tags for readability
74
- if (p.shortDescription) {
75
- const clean = p.shortDescription.replace(/<[^>]+>/g, "").trim();
76
- if (clean)
77
- lines.push(`\n${clean}`);
78
- }
79
- return lines.join("\n");
80
- }, "property details");
81
- }
82
- //# sourceMappingURL=property-detail.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"property-detail.js","sourceRoot":"","sources":["../../src/tools/property-detail.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,OAAO,GACR,MAAM,oBAAoB,CAAC;AAwD5B,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,MAMpC;IACC,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;IAE5E,MAAM,M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CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACnD,CAAC;QAED,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;YACrB,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,MAAM,SAAS,CAAC,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACpF,CAAC;QAED,sDAAsD;QACtD,IAAI,CAAC,CAAC,gBAAgB,EAAE,CAAC;YACvB,MAAM,KAAK,GAAG,CAAC,CAAC,gBAAgB,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;YAChE,IAAI,KAAK;gBAAE,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC;QACtC,CAAC;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC,EACD,kBAAkB,CACnB,CAAC;AACJ,CAAC"}
@@ -1,12 +0,0 @@
1
- type Department = "sales" | "lettings" | "both";
2
- type Channel = "rightmove" | "onTheMarket" | "zoopla" | "website";
3
- export declare function propertyListed(params: {
4
- accountId: string;
5
- channel: Channel;
6
- department?: Department;
7
- includeSold?: boolean;
8
- teamName?: string;
9
- limit?: number;
10
- }): Promise<string>;
11
- export {};
12
- //# sourceMappingURL=property-listed.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"property-listed.d.ts","sourceRoot":"","sources":["../../src/tools/property-listed.ts"],"names":[],"mappings":"AAkCA,KAAK,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC;AAChD,KAAK,OAAO,GAAG,WAAW,GAAG,aAAa,GAAG,QAAQ,GAAG,SAAS,CAAC;AAElE,wBAAsB,cAAc,CAAC,MAAM,EAAE;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CA2ClB"}
@@ -1,32 +0,0 @@
1
- import { aggregateAcrossTeams, formatAggregationResult, loopGet, } from "../lib/loop-api.js";
2
- export async function propertyListed(params) {
3
- const { accountId, channel, department = "both", includeSold = false, teamName, limit } = params;
4
- const result = await aggregateAcrossTeams(accountId, "properties", "loop-property-listed", async (apiKey, team) => {
5
- const all = [];
6
- const depts = department === "both" ? ["sales", "lettings"] : [department];
7
- for (const dept of depts) {
8
- const path = `/property/residential/${dept}/listed/${channel}`;
9
- const data = await loopGet(apiKey, path, "loop-property-listed", team);
10
- if (Array.isArray(data))
11
- all.push(...data);
12
- }
13
- if (includeSold) {
14
- const soldPath = `/property/residential/sold/${channel}`;
15
- const soldData = await loopGet(apiKey, soldPath, "loop-property-listed", team);
16
- if (Array.isArray(soldData))
17
- all.push(...soldData);
18
- }
19
- return all;
20
- }, { teamName, limitPerTeam: limit ?? 50, limitTotal: limit ?? 200 });
21
- return formatAggregationResult(result, (p) => {
22
- const addr = p.displayAddress ?? p.propertyAddress ?? "Unknown address";
23
- const id = p.propertyId != null ? ` [ID: ${p.propertyId}]` : "";
24
- const price = p.price ? ` — £${p.price.toLocaleString("en-GB")}` : "";
25
- const beds = p.bedrooms ? ` ${p.bedrooms}bed` : "";
26
- const propType = p.propertyType ? ` (${p.propertyType})` : "";
27
- const status = p.status ? ` [${p.status}]` : "";
28
- const photos = p.images?.length ? ` ${p.images.length} photo${p.images.length !== 1 ? "s" : ""}` : "";
29
- return `- ${addr}${id}${price}${beds}${propType}${status}${photos}`;
30
- }, `${channel} listings`);
31
- }
32
- //# sourceMappingURL=property-listed.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file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AG,KAAK,GAAG,IAAI,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC;IACtE,CAAC,EACD,GAAG,OAAO,WAAW,CACtB,CAAC;AACJ,CAAC"}
@@ -1,15 +0,0 @@
1
- type Department = "sales" | "lettings";
2
- type RequestAction = "viewing" | "call-back" | "information";
3
- export declare function propertyRequest(params: {
4
- accountId: string;
5
- teamName: string;
6
- propertyId: number;
7
- department: Department;
8
- action: RequestAction;
9
- name?: string;
10
- email?: string;
11
- phone?: string;
12
- message?: string;
13
- }): Promise<string>;
14
- export {};
15
- //# sourceMappingURL=property-request.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"property-request.d.ts","sourceRoot":"","sources":["../../src/tools/property-request.ts"],"names":[],"mappings":"AAEA,KAAK,UAAU,GAAG,OAAO,GAAG,UAAU,CAAC;AACvC,KAAK,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,aAAa,CAAC;AAY7D,wBAAsB,eAAe,CAAC,MAAM,EAAE;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,aAAa,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,OAAO,CAAC,MAAM,CAAC,CAgBlB"}
@@ -1,11 +0,0 @@
1
- import { loopPost, withTeamKey } from "../lib/loop-api.js";
2
- export async function propertyRequest(params) {
3
- const { accountId, teamName, propertyId, department, action, ...body } = params;
4
- const result = await withTeamKey(accountId, teamName, "properties", "loop-property-request", async (apiKey) => {
5
- const path = `/property/residential/${department}/${propertyId}/${action}`;
6
- return loopPost(apiKey, path, body, "loop-property-request", teamName);
7
- });
8
- const actionLabel = action === "call-back" ? "callback" : action;
9
- return `${actionLabel} request submitted for property ${propertyId} (${department}) via team "${teamName}".`;
10
- }
11
- //# sourceMappingURL=property-request.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"property-request.js","sourceRoot":"","sources":["../../src/tools/property-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAe3D,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,MAUrC;IACC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;IAEhF,MAAM,MAAM,GAAG,MAAM,WAAW,CAC9B,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,uBAAuB,EACvB,KAAK,EAAE,MAAM,EAAE,EAAE;QACf,MAAM,IAAI,GAAG,yBAAyB,UAAU,IAAI,UAAU,IAAI,MAAM,EAAE,CAAC;QAC3E,OAAO,QAAQ,CAAsB,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,uBAAuB,EAAE,QAAQ,CAAC,CAAC;IAC9F,CAAC,CACF,CAAC;IAEF,MAAM,WAAW,GAAG,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC;IACjE,OAAO,GAAG,WAAW,mCAAmC,UAAU,KAAK,UAAU,eAAe,QAAQ,IAAI,CAAC;AAC/G,CAAC"}
@@ -1,16 +0,0 @@
1
- type Department = "sales" | "lettings" | "both";
2
- export declare function propertySearch(params: {
3
- accountId: string;
4
- department?: Department;
5
- searchTerm?: string;
6
- minPrice?: number;
7
- maxPrice?: number;
8
- minBedrooms?: number;
9
- maxBedrooms?: number;
10
- propertyStatuses?: string;
11
- propertyTypes?: string;
12
- teamName?: string;
13
- limit?: number;
14
- }): Promise<string>;
15
- export {};
16
- //# sourceMappingURL=property-search.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"property-search.d.ts","sourceRoot":"","sources":["../../src/tools/property-search.ts"],"names":[],"mappings":"AA4BA,KAAK,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC;AAEhD,wBAAsB,cAAc,CAAC,MAAM,EAAE;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CAiDlB"}
@@ -1,41 +0,0 @@
1
- import { aggregateAcrossTeams, formatAggregationResult, loopGet, } from "../lib/loop-api.js";
2
- export async function propertySearch(params) {
3
- const { accountId, department = "both", searchTerm, minPrice, maxPrice, minBedrooms, maxBedrooms, propertyStatuses, propertyTypes, teamName, limit, } = params;
4
- const result = await aggregateAcrossTeams(accountId, "properties", "loop-property-search", async (apiKey, team) => {
5
- const depts = department === "both" ? ["sales", "lettings"] : [department];
6
- const all = [];
7
- for (const dept of depts) {
8
- const qp = [];
9
- if (searchTerm)
10
- qp.push(`SearchTerm=${encodeURIComponent(searchTerm)}`);
11
- if (minPrice != null)
12
- qp.push(`MinPrice=${minPrice}`);
13
- if (maxPrice != null)
14
- qp.push(`MaxPrice=${maxPrice}`);
15
- if (minBedrooms != null)
16
- qp.push(`MinBedrooms=${minBedrooms}`);
17
- if (maxBedrooms != null)
18
- qp.push(`MaxBedrooms=${maxBedrooms}`);
19
- if (propertyStatuses)
20
- qp.push(`PropertyStatuses=${encodeURIComponent(propertyStatuses)}`);
21
- if (propertyTypes)
22
- qp.push(`PropertyTypes=${encodeURIComponent(propertyTypes)}`);
23
- const query = qp.length > 0 ? `?${qp.join("&")}` : "";
24
- const path = `/property/residential/${dept}${query}`;
25
- const data = await loopGet(apiKey, path, "loop-property-search", team);
26
- if (Array.isArray(data))
27
- all.push(...data);
28
- }
29
- return all;
30
- }, { teamName, limitPerTeam: limit ?? 50, limitTotal: limit ?? 200 });
31
- return formatAggregationResult(result, (p) => {
32
- const id = p.id != null ? ` [ID: ${p.id}]` : "";
33
- const price = p.price ? ` — £${p.price.toLocaleString("en-GB")}` : "";
34
- const beds = p.bedrooms ? ` ${p.bedrooms}bed` : "";
35
- const status = p.status ? ` [${p.status}]` : "";
36
- const propType = p.propertyType ? ` (${p.propertyType})` : "";
37
- const offers = p.offerCount ? ` ${p.offerCount} offer${p.offerCount !== 1 ? "s" : ""}` : "";
38
- return `- ${p.propertyAddress ?? "Unknown address"}${id}${price}${beds}${propType}${status}${offers}`;
39
- }, "properties");
40
- }
41
- //# sourceMappingURL=property-search.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"property-search.js","sourceRoot":"","sources":["../../src/tools/property-search.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,OAAO,GACR,MAAM,oBAAoB,CAAC;AA0B5B,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,MAYpC;IACC,MAAM,EACJ,SAAS,EAAE,UAAU,GAAG,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAC9D,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,aAAa,EACzD,QAAQ,EAAE,KAAK,GAChB,GAAG,MAAM,CAAC;IAEX,MAAM,MAAM,GAAG,MAAM,oBAAoB,CACvC,SAAS,EACT,YAAY,EACZ,sBAAsB,EACtB,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE;QACrB,MAAM,KAAK,GACT,UAAU,KAAK,MAAM,CAAC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IAAI,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC;IACxG,CAAC,EACD,YAAY,CACb,CAAC;AACJ,CAAC"}
@@ -1,13 +0,0 @@
1
- type SupplierAction = "maintenance-jobs" | "maintenance-complete" | "maintenance-quotes" | "maintenance-submit-quote" | "board-jobs" | "board-complete";
2
- export declare function supplier(params: {
3
- accountId: string;
4
- teamName: string;
5
- action: SupplierAction;
6
- code: string;
7
- jobId?: number;
8
- quoteId?: number;
9
- quoteData?: Record<string, unknown>;
10
- completionData?: Record<string, unknown>;
11
- }): Promise<string>;
12
- export {};
13
- //# sourceMappingURL=supplier.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"supplier.d.ts","sourceRoot":"","sources":["../../src/tools/supplier.ts"],"names":[],"mappings":"AAEA,KAAK,cAAc,GACf,kBAAkB,GAClB,sBAAsB,GACtB,oBAAoB,GACpB,0BAA0B,GAC1B,YAAY,GACZ,gBAAgB,CAAC;AAoBrB,wBAAsB,QAAQ,CAAC,MAAM,EAAE;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,cAAc,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEpC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC1C,GAAG,OAAO,CAAC,MAAM,CAAC,CAyFlB"}
@@ -1,49 +0,0 @@
1
- import { loopGet, loopPost, loopPut, withTeamKey } from "../lib/loop-api.js";
2
- export async function supplier(params) {
3
- const { accountId, teamName, action, code } = params;
4
- // jobId is required for all actions except maintenance-submit-quote
5
- const jobId = params.jobId;
6
- if (action !== "maintenance-submit-quote" && jobId == null) {
7
- throw new Error(`jobId is required for action "${action}".`);
8
- }
9
- if (action === "maintenance-jobs") {
10
- const result = await withTeamKey(accountId, teamName, "supplier", "loop-supplier", async (apiKey) => {
11
- return loopGet(apiKey, `/supplier/maintenance/${encodeURIComponent(code)}/${jobId}/job-list`, "loop-supplier", teamName);
12
- });
13
- return JSON.stringify(result, null, 2);
14
- }
15
- if (action === "maintenance-complete") {
16
- await withTeamKey(accountId, teamName, "supplier", "loop-supplier", async (apiKey) => {
17
- return loopPost(apiKey, `/supplier/maintenance/${encodeURIComponent(code)}/${jobId}/complete`, {}, "loop-supplier", teamName);
18
- });
19
- return `Maintenance job ${jobId} marked complete via team "${teamName}".`;
20
- }
21
- if (action === "maintenance-quotes") {
22
- const result = await withTeamKey(accountId, teamName, "supplier", "loop-supplier", async (apiKey) => {
23
- return loopGet(apiKey, `/supplier/maintenance/${encodeURIComponent(code)}/${jobId}/quote-list`, "loop-supplier", teamName);
24
- });
25
- return JSON.stringify(result, null, 2);
26
- }
27
- if (action === "maintenance-submit-quote") {
28
- if (!params.quoteId)
29
- throw new Error("quoteId is required for maintenance-submit-quote.");
30
- await withTeamKey(accountId, teamName, "supplier", "loop-supplier", async (apiKey) => {
31
- return loopPut(apiKey, `/supplier/maintenance/${encodeURIComponent(code)}/${params.quoteId}/quote-for-job`, params.quoteData ?? {}, "loop-supplier", teamName);
32
- });
33
- return `Quote ${params.quoteId} submitted via team "${teamName}".`;
34
- }
35
- if (action === "board-jobs") {
36
- const result = await withTeamKey(accountId, teamName, "supplier", "loop-supplier", async (apiKey) => {
37
- return loopGet(apiKey, `/supplier/board-contractor/${encodeURIComponent(code)}/${jobId}/job-list`, "loop-supplier", teamName);
38
- });
39
- return JSON.stringify(result, null, 2);
40
- }
41
- if (action === "board-complete") {
42
- await withTeamKey(accountId, teamName, "supplier", "loop-supplier", async (apiKey) => {
43
- return loopPost(apiKey, `/supplier/board-contractor/${encodeURIComponent(code)}/${jobId}/complete`, params.completionData ?? {}, "loop-supplier", teamName);
44
- });
45
- return `Board contractor job ${jobId} marked complete via team "${teamName}".`;
46
- }
47
- throw new Error(`Unknown supplier action: ${action}`);
48
- }
49
- //# sourceMappingURL=supplier.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"supplier.js","sourceRoot":"","sources":["../../src/tools/supplier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AA4B7E,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,MAW9B;IACC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;IAErD,oEAAoE;IACpE,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;IAC3B,IAAI,MAAM,KAAK,0BAA0B,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;QAC3D,MAAM,IAAI,KAAK,CAAC,iCAAiC,MAAM,IAAI,CAAC,CAAC;IAC/D,CAAC;IAED,IAAI,MAAM,KAAK,kBAAkB,EAAE,CAAC;QAClC,MAAM,MAAM,GAAG,MAAM,WAAW,CAC9B,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,EAChD,KAAK,EAAE,MAAM,EAAE,EAAE;YACf,OAAO,OAAO,CACZ,MAAM,EAAE,yBAAyB,kBAAkB,CAAC,IAAI,CAAC,IAAI,KAAK,WAAW,EAC7E,eAAe,EAAE,QAAQ,CAC1B,CAAC;QACJ,CAAC,CACF,CAAC;QACF,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACzC,CAAC;IAED,IAAI,MAAM,KAAK,sBAAsB,EAAE,CAAC;QACtC,MAAM,WAAW,CACf,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,EAChD,KAAK,EAAE,MAAM,EAAE,EAAE;YACf,OAAO,QAAQ,CACb,MAAM,EAAE,yBAAyB,kBAAkB,CAAC,I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