@plotday/twister 0.34.0 → 0.35.0

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 (109) hide show
  1. package/dist/common/calendar.d.ts +20 -90
  2. package/dist/common/calendar.d.ts.map +1 -1
  3. package/dist/common/documents.d.ts +26 -39
  4. package/dist/common/documents.d.ts.map +1 -1
  5. package/dist/common/messaging.d.ts +21 -40
  6. package/dist/common/messaging.d.ts.map +1 -1
  7. package/dist/common/projects.d.ts +27 -51
  8. package/dist/common/projects.d.ts.map +1 -1
  9. package/dist/docs/assets/hierarchy.js +1 -1
  10. package/dist/docs/assets/navigation.js +1 -1
  11. package/dist/docs/assets/search.js +1 -1
  12. package/dist/docs/classes/tool.ITool.html +1 -1
  13. package/dist/docs/classes/tool.Tool.html +24 -20
  14. package/dist/docs/classes/tools_ai.AI.html +1 -1
  15. package/dist/docs/classes/tools_callbacks.Callbacks.html +1 -1
  16. package/dist/docs/classes/tools_integrations.Integrations.html +33 -26
  17. package/dist/docs/classes/tools_network.Network.html +1 -1
  18. package/dist/docs/classes/tools_plot.Plot.html +3 -3
  19. package/dist/docs/classes/tools_store.Store.html +10 -4
  20. package/dist/docs/classes/tools_tasks.Tasks.html +1 -1
  21. package/dist/docs/classes/tools_twists.Twists.html +1 -1
  22. package/dist/docs/enums/plot.ActorType.html +4 -4
  23. package/dist/docs/enums/tools_integrations.AuthProvider.html +11 -11
  24. package/dist/docs/hierarchy.html +1 -1
  25. package/dist/docs/modules/common_calendar.html +1 -1
  26. package/dist/docs/modules/index.html +1 -1
  27. package/dist/docs/modules/plot.html +1 -1
  28. package/dist/docs/modules/tool.html +1 -1
  29. package/dist/docs/modules/tools_integrations.html +1 -1
  30. package/dist/docs/types/common_calendar.Calendar.html +5 -5
  31. package/dist/docs/types/common_calendar.CalendarTool.html +17 -43
  32. package/dist/docs/types/common_calendar.SyncOptions.html +3 -3
  33. package/dist/docs/types/plot.Activity.html +1 -1
  34. package/dist/docs/types/plot.ActivityFilter.html +3 -0
  35. package/dist/docs/types/plot.ActivityOccurrence.html +7 -7
  36. package/dist/docs/types/plot.ActivityOccurrenceUpdate.html +1 -1
  37. package/dist/docs/types/plot.ActivityUpdate.html +3 -31
  38. package/dist/docs/types/plot.ActivityWithNotes.html +1 -1
  39. package/dist/docs/types/plot.Actor.html +5 -5
  40. package/dist/docs/types/plot.ContentType.html +1 -1
  41. package/dist/docs/types/plot.NewActivity.html +1 -1
  42. package/dist/docs/types/plot.NewActivityOccurrence.html +1 -1
  43. package/dist/docs/types/plot.NewActivityWithNotes.html +1 -1
  44. package/dist/docs/types/plot.NewActor.html +1 -1
  45. package/dist/docs/types/plot.NewContact.html +5 -5
  46. package/dist/docs/types/plot.NewNote.html +1 -1
  47. package/dist/docs/types/plot.Note.html +1 -1
  48. package/dist/docs/types/plot.NoteUpdate.html +1 -1
  49. package/dist/docs/types/plot.PickPriorityConfig.html +2 -2
  50. package/dist/docs/types/tool.SyncToolOptions.html +9 -0
  51. package/dist/docs/types/tools_integrations.AuthToken.html +4 -4
  52. package/dist/docs/types/tools_integrations.Authorization.html +4 -4
  53. package/dist/docs/types/tools_integrations.IntegrationOptions.html +4 -0
  54. package/dist/docs/types/tools_integrations.IntegrationProviderConfig.html +13 -0
  55. package/dist/docs/types/tools_integrations.Syncable.html +7 -0
  56. package/dist/llm-docs/common/calendar.d.ts +1 -1
  57. package/dist/llm-docs/common/calendar.d.ts.map +1 -1
  58. package/dist/llm-docs/common/calendar.js +1 -1
  59. package/dist/llm-docs/common/calendar.js.map +1 -1
  60. package/dist/llm-docs/common/documents.d.ts +1 -1
  61. package/dist/llm-docs/common/documents.d.ts.map +1 -1
  62. package/dist/llm-docs/common/documents.js +1 -1
  63. package/dist/llm-docs/common/documents.js.map +1 -1
  64. package/dist/llm-docs/common/messaging.d.ts +1 -1
  65. package/dist/llm-docs/common/messaging.d.ts.map +1 -1
  66. package/dist/llm-docs/common/messaging.js +1 -1
  67. package/dist/llm-docs/common/messaging.js.map +1 -1
  68. package/dist/llm-docs/common/projects.d.ts +1 -1
  69. package/dist/llm-docs/common/projects.d.ts.map +1 -1
  70. package/dist/llm-docs/common/projects.js +1 -1
  71. package/dist/llm-docs/common/projects.js.map +1 -1
  72. package/dist/llm-docs/plot.d.ts +1 -1
  73. package/dist/llm-docs/plot.d.ts.map +1 -1
  74. package/dist/llm-docs/plot.js +1 -1
  75. package/dist/llm-docs/plot.js.map +1 -1
  76. package/dist/llm-docs/tool.d.ts +1 -1
  77. package/dist/llm-docs/tool.d.ts.map +1 -1
  78. package/dist/llm-docs/tool.js +1 -1
  79. package/dist/llm-docs/tool.js.map +1 -1
  80. package/dist/llm-docs/tools/integrations.d.ts +1 -1
  81. package/dist/llm-docs/tools/integrations.d.ts.map +1 -1
  82. package/dist/llm-docs/tools/integrations.js +1 -1
  83. package/dist/llm-docs/tools/integrations.js.map +1 -1
  84. package/dist/llm-docs/tools/plot.d.ts +1 -1
  85. package/dist/llm-docs/tools/plot.d.ts.map +1 -1
  86. package/dist/llm-docs/tools/plot.js +1 -1
  87. package/dist/llm-docs/tools/plot.js.map +1 -1
  88. package/dist/llm-docs/tools/store.d.ts +1 -1
  89. package/dist/llm-docs/tools/store.d.ts.map +1 -1
  90. package/dist/llm-docs/tools/store.js +1 -1
  91. package/dist/llm-docs/tools/store.js.map +1 -1
  92. package/dist/plot.d.ts +32 -13
  93. package/dist/plot.d.ts.map +1 -1
  94. package/dist/plot.js.map +1 -1
  95. package/dist/tool.d.ts +22 -1
  96. package/dist/tool.d.ts.map +1 -1
  97. package/dist/tool.js +9 -0
  98. package/dist/tool.js.map +1 -1
  99. package/dist/tools/integrations.d.ts +86 -46
  100. package/dist/tools/integrations.d.ts.map +1 -1
  101. package/dist/tools/integrations.js +36 -21
  102. package/dist/tools/integrations.js.map +1 -1
  103. package/dist/tools/plot.d.ts +3 -1
  104. package/dist/tools/plot.d.ts.map +1 -1
  105. package/dist/tools/store.d.ts +10 -0
  106. package/dist/tools/store.d.ts.map +1 -1
  107. package/dist/tools/store.js.map +1 -1
  108. package/package.json +1 -1
  109. package/dist/docs/types/common_calendar.CalendarAuth.html +0 -7
@@ -1,10 +1,10 @@
1
1
  <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Authorization | Creating Plot Twists</title><link rel="icon" href="../assets/favicon.svg" type="image/svg+xml"/><meta name="description" content="Documentation for Creating Plot Twists"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="/" class="title">Creating Plot Twists</a><div id="tsd-toolbar-links"><a href="https://plot.day">Plot</a><a href="https://github.com/plotday/plot">GitHub</a><a href="https://www.npmjs.com/package/@plotday/twister">NPM</a></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/tools_integrations.html">tools/integrations</a></li><li><a href="" aria-current="page">Authorization</a></li></ul><h1>Type Alias Authorization</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Represents a completed authorization from an OAuth flow.</p>
2
2
  <p>Contains the provider, granted scopes, and the actor (contact) that was authorized.
3
3
  Tokens are looked up by (provider, actorId) rather than a random ID.</p>
4
- </div></section><div class="tsd-signature"><span class="tsd-signature-keyword">type</span> <span class="tsd-kind-type-alias">Authorization</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-symbol">{</span><br/>    <a class="tsd-kind-property" href="#provider">provider</a><span class="tsd-signature-symbol">:</span> <a href="../enums/tools_integrations.AuthProvider.html" class="tsd-signature-type tsd-kind-enum">AuthProvider</a><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#scopes">scopes</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#actor">actor</a><span class="tsd-signature-symbol">:</span> <a href="plot.Actor.html" class="tsd-signature-type tsd-kind-type-alias">Actor</a><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/tools/integrations.ts#L116">tools/integrations.ts:116</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h5 class="tsd-index-heading uppercase">Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="#provider" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>provider</span></a>
4
+ </div></section><div class="tsd-signature"><span class="tsd-signature-keyword">type</span> <span class="tsd-kind-type-alias">Authorization</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-symbol">{</span><br/>    <a class="tsd-kind-property" href="#provider">provider</a><span class="tsd-signature-symbol">:</span> <a href="../enums/tools_integrations.AuthProvider.html" class="tsd-signature-type tsd-kind-enum">AuthProvider</a><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#scopes">scopes</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#actor">actor</a><span class="tsd-signature-symbol">:</span> <a href="plot.Actor.html" class="tsd-signature-type tsd-kind-type-alias">Actor</a><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/tools/integrations.ts#L165">tools/integrations.ts:165</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h5 class="tsd-index-heading uppercase">Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="#provider" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>provider</span></a>
5
5
  <a href="#scopes" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>scopes</span></a>
6
6
  <a href="#actor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>actor</span></a>
7
7
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Properties</h2></summary><section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="provider"><span>provider</span><a href="#provider" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">provider</span><span class="tsd-signature-symbol">:</span> <a href="../enums/tools_integrations.AuthProvider.html" class="tsd-signature-type tsd-kind-enum">AuthProvider</a></div><div class="tsd-comment tsd-typography"><p>The OAuth provider this authorization is for</p>
8
- </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/tools/integrations.ts#L118">tools/integrations.ts:118</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="scopes"><span>scopes</span><a href="#scopes" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">scopes</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div><div class="tsd-comment tsd-typography"><p>Array of OAuth scopes this authorization covers</p>
9
- </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/tools/integrations.ts#L120">tools/integrations.ts:120</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="actor"><span>actor</span><a href="#actor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">actor</span><span class="tsd-signature-symbol">:</span> <a href="plot.Actor.html" class="tsd-signature-type tsd-kind-type-alias">Actor</a></div><div class="tsd-comment tsd-typography"><p>The external account that was authorized (e.g., the Google account)</p>
10
- </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/tools/integrations.ts#L122">tools/integrations.ts:122</a></li></ul></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#provider"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>provider</span></a><a href="#scopes"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>scopes</span></a><a href="#actor"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>actor</span></a></div></details></div></details></div><div class="site-menu"><nav id="tsd-sidebar-links" class="tsd-navigation"><a href="https://plot.day" class="tsd-nav-link">Plot</a><a href="https://github.com/plotday/plot" class="tsd-nav-link">GitHub</a><a href="https://www.npmjs.com/package/@plotday/twister" class="tsd-nav-link">NPM</a></nav><nav class="tsd-navigation"><a href="../modules.html">Creating Plot Twists</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
8
+ </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/tools/integrations.ts#L167">tools/integrations.ts:167</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="scopes"><span>scopes</span><a href="#scopes" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">scopes</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div><div class="tsd-comment tsd-typography"><p>Array of OAuth scopes this authorization covers</p>
9
+ </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/tools/integrations.ts#L169">tools/integrations.ts:169</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="actor"><span>actor</span><a href="#actor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">actor</span><span class="tsd-signature-symbol">:</span> <a href="plot.Actor.html" class="tsd-signature-type tsd-kind-type-alias">Actor</a></div><div class="tsd-comment tsd-typography"><p>The external account that was authorized (e.g., the Google account)</p>
10
+ </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/tools/integrations.ts#L171">tools/integrations.ts:171</a></li></ul></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#provider"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>provider</span></a><a href="#scopes"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>scopes</span></a><a href="#actor"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>actor</span></a></div></details></div></details></div><div class="site-menu"><nav id="tsd-sidebar-links" class="tsd-navigation"><a href="https://plot.day" class="tsd-nav-link">Plot</a><a href="https://github.com/plotday/plot" class="tsd-nav-link">GitHub</a><a href="https://www.npmjs.com/package/@plotday/twister" class="tsd-nav-link">NPM</a></nav><nav class="tsd-navigation"><a href="../modules.html">Creating Plot Twists</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -0,0 +1,4 @@
1
+ <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>IntegrationOptions | Creating Plot Twists</title><link rel="icon" href="../assets/favicon.svg" type="image/svg+xml"/><meta name="description" content="Documentation for Creating Plot Twists"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="/" class="title">Creating Plot Twists</a><div id="tsd-toolbar-links"><a href="https://plot.day">Plot</a><a href="https://github.com/plotday/plot">GitHub</a><a href="https://www.npmjs.com/package/@plotday/twister">NPM</a></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/tools_integrations.html">tools/integrations</a></li><li><a href="" aria-current="page">IntegrationOptions</a></li></ul><h1>Type Alias IntegrationOptions</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Options passed to Integrations in the build() method.</p>
2
+ </div></section><div class="tsd-signature"><span class="tsd-signature-keyword">type</span> <span class="tsd-kind-type-alias">IntegrationOptions</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-symbol">{</span><br/>    <a class="tsd-kind-property" href="#providers">providers</a><span class="tsd-signature-symbol">:</span> <a href="tools_integrations.IntegrationProviderConfig.html" class="tsd-signature-type tsd-kind-type-alias">IntegrationProviderConfig</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/tools/integrations.ts#L35">tools/integrations.ts:35</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h5 class="tsd-index-heading uppercase">Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="#providers" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>providers</span></a>
3
+ </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Properties</h2></summary><section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="providers"><span>providers</span><a href="#providers" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">providers</span><span class="tsd-signature-symbol">:</span> <a href="tools_integrations.IntegrationProviderConfig.html" class="tsd-signature-type tsd-kind-type-alias">IntegrationProviderConfig</a><span class="tsd-signature-symbol">[]</span></div><div class="tsd-comment tsd-typography"><p>Provider configurations with lifecycle callbacks</p>
4
+ </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/tools/integrations.ts#L37">tools/integrations.ts:37</a></li></ul></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#providers"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>providers</span></a></div></details></div></details></div><div class="site-menu"><nav id="tsd-sidebar-links" class="tsd-navigation"><a href="https://plot.day" class="tsd-nav-link">Plot</a><a href="https://github.com/plotday/plot" class="tsd-nav-link">GitHub</a><a href="https://www.npmjs.com/package/@plotday/twister" class="tsd-nav-link">NPM</a></nav><nav class="tsd-navigation"><a href="../modules.html">Creating Plot Twists</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>IntegrationProviderConfig | Creating Plot Twists</title><link rel="icon" href="../assets/favicon.svg" type="image/svg+xml"/><meta name="description" content="Documentation for Creating Plot Twists"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="/" class="title">Creating Plot Twists</a><div id="tsd-toolbar-links"><a href="https://plot.day">Plot</a><a href="https://github.com/plotday/plot">GitHub</a><a href="https://www.npmjs.com/package/@plotday/twister">NPM</a></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/tools_integrations.html">tools/integrations</a></li><li><a href="" aria-current="page">IntegrationProviderConfig</a></li></ul><h1>Type Alias IntegrationProviderConfig</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Configuration for an OAuth provider in a tool's build options.
2
+ Declares the provider, scopes, and lifecycle callbacks.</p>
3
+ </div></section><div class="tsd-signature"><span class="tsd-signature-keyword">type</span> <span class="tsd-kind-type-alias">IntegrationProviderConfig</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-symbol">{</span><br/>    <a class="tsd-kind-property" href="#provider">provider</a><span class="tsd-signature-symbol">:</span> <a href="../enums/tools_integrations.AuthProvider.html" class="tsd-signature-type tsd-kind-enum">AuthProvider</a><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#scopes">scopes</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#getsyncables">getSyncables</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">auth</span><span class="tsd-signature-symbol">:</span> <a href="tools_integrations.Authorization.html" class="tsd-signature-type tsd-kind-type-alias">Authorization</a><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">token</span><span class="tsd-signature-symbol">:</span> <a href="tools_integrations.AuthToken.html" class="tsd-signature-type tsd-kind-type-alias">AuthToken</a><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="tools_integrations.Syncable.html" class="tsd-signature-type tsd-kind-type-alias">Syncable</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#onsyncenabled">onSyncEnabled</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">syncable</span><span class="tsd-signature-symbol">:</span> <a href="tools_integrations.Syncable.html" class="tsd-signature-type tsd-kind-type-alias">Syncable</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#onsyncdisabled">onSyncDisabled</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">syncable</span><span class="tsd-signature-symbol">:</span> <a href="tools_integrations.Syncable.html" class="tsd-signature-type tsd-kind-type-alias">Syncable</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/tools/integrations.ts#L19">tools/integrations.ts:19</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h5 class="tsd-index-heading uppercase">Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="#provider" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>provider</span></a>
4
+ <a href="#scopes" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>scopes</span></a>
5
+ <a href="#getsyncables" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>get<wbr/>Syncables</span></a>
6
+ <a href="#onsyncenabled" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>on<wbr/>Sync<wbr/>Enabled</span></a>
7
+ <a href="#onsyncdisabled" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>on<wbr/>Sync<wbr/>Disabled</span></a>
8
+ </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Properties</h2></summary><section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="provider"><span>provider</span><a href="#provider" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">provider</span><span class="tsd-signature-symbol">:</span> <a href="../enums/tools_integrations.AuthProvider.html" class="tsd-signature-type tsd-kind-enum">AuthProvider</a></div><div class="tsd-comment tsd-typography"><p>The OAuth provider</p>
9
+ </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/tools/integrations.ts#L21">tools/integrations.ts:21</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="scopes"><span>scopes</span><a href="#scopes" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">scopes</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div><div class="tsd-comment tsd-typography"><p>OAuth scopes to request</p>
10
+ </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/tools/integrations.ts#L23">tools/integrations.ts:23</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getsyncables"><span>get<wbr/>Syncables</span><a href="#getsyncables" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">getSyncables</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">auth</span><span class="tsd-signature-symbol">:</span> <a href="tools_integrations.Authorization.html" class="tsd-signature-type tsd-kind-type-alias">Authorization</a><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">token</span><span class="tsd-signature-symbol">:</span> <a href="tools_integrations.AuthToken.html" class="tsd-signature-type tsd-kind-type-alias">AuthToken</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="tools_integrations.Syncable.html" class="tsd-signature-type tsd-kind-type-alias">Syncable</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Returns available syncables for the authorized actor. Must not use Plot tool.</p>
11
+ </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/tools/integrations.ts#L25">tools/integrations.ts:25</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="onsyncenabled"><span>on<wbr/>Sync<wbr/>Enabled</span><a href="#onsyncenabled" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">onSyncEnabled</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">syncable</span><span class="tsd-signature-symbol">:</span> <a href="tools_integrations.Syncable.html" class="tsd-signature-type tsd-kind-type-alias">Syncable</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Called when a syncable resource is enabled for syncing</p>
12
+ </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/tools/integrations.ts#L27">tools/integrations.ts:27</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="onsyncdisabled"><span>on<wbr/>Sync<wbr/>Disabled</span><a href="#onsyncdisabled" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">onSyncDisabled</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">syncable</span><span class="tsd-signature-symbol">:</span> <a href="tools_integrations.Syncable.html" class="tsd-signature-type tsd-kind-type-alias">Syncable</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Called when a syncable resource is disabled</p>
13
+ </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/tools/integrations.ts#L29">tools/integrations.ts:29</a></li></ul></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#provider"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>provider</span></a><a href="#scopes"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>scopes</span></a><a href="#getsyncables"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>get<wbr/>Syncables</span></a><a href="#onsyncenabled"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>on<wbr/>Sync<wbr/>Enabled</span></a><a href="#onsyncdisabled"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>on<wbr/>Sync<wbr/>Disabled</span></a></div></details></div></details></div><div class="site-menu"><nav id="tsd-sidebar-links" class="tsd-navigation"><a href="https://plot.day" class="tsd-nav-link">Plot</a><a href="https://github.com/plotday/plot" class="tsd-nav-link">GitHub</a><a href="https://www.npmjs.com/package/@plotday/twister" class="tsd-nav-link">NPM</a></nav><nav class="tsd-navigation"><a href="../modules.html">Creating Plot Twists</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -0,0 +1,7 @@
1
+ <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Syncable | Creating Plot Twists</title><link rel="icon" href="../assets/favicon.svg" type="image/svg+xml"/><meta name="description" content="Documentation for Creating Plot Twists"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="/" class="title">Creating Plot Twists</a><div id="tsd-toolbar-links"><a href="https://plot.day">Plot</a><a href="https://github.com/plotday/plot">GitHub</a><a href="https://www.npmjs.com/package/@plotday/twister">NPM</a></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/tools_integrations.html">tools/integrations</a></li><li><a href="" aria-current="page">Syncable</a></li></ul><h1>Type Alias Syncable</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>A resource that can be synced (e.g., a calendar, project, channel).
2
+ Returned by getSyncables() and managed by users in the twist setup/edit modal.</p>
3
+ </div></section><div class="tsd-signature"><span class="tsd-signature-keyword">type</span> <span class="tsd-kind-type-alias">Syncable</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-symbol">{</span><br/>    <a class="tsd-kind-property" href="#id">id</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#title">title</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/tools/integrations.ts#L8">tools/integrations.ts:8</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h5 class="tsd-index-heading uppercase">Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="#id" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>id</span></a>
4
+ <a href="#title" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>title</span></a>
5
+ </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Properties</h2></summary><section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="id"><span>id</span><a href="#id" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">id</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>External ID shared across users (e.g., Google calendar ID)</p>
6
+ </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/tools/integrations.ts#L10">tools/integrations.ts:10</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="title"><span>title</span><a href="#title" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">title</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>Display name shown in the UI</p>
7
+ </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/tools/integrations.ts#L12">tools/integrations.ts:12</a></li></ul></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#id"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>id</span></a><a href="#title"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>title</span></a></div></details></div></details></div><div class="site-menu"><nav id="tsd-sidebar-links" class="tsd-navigation"><a href="https://plot.day" class="tsd-nav-link">Plot</a><a href="https://github.com/plotday/plot" class="tsd-nav-link">GitHub</a><a href="https://www.npmjs.com/package/@plotday/twister" class="tsd-nav-link">NPM</a></nav><nav class="tsd-navigation"><a href="../modules.html">Creating Plot Twists</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -4,6 +4,6 @@
4
4
  * This file is auto-generated during build. Do not edit manually.
5
5
  * Generated from: prebuild.ts
6
6
  */
7
- declare const _default: "import type { ActivityLink, NewActivityWithNotes, Serializable } from \"../index\";\n\n/**\n * Represents successful calendar authorization.\n *\n * Returned by calendar tools when authorization completes successfully.\n * The auth token is an opaque identifier that can be used for subsequent\n * calendar operations.\n */\nexport type CalendarAuth = {\n /** Opaque token for calendar operations */\n authToken: string;\n};\n\n/**\n * Represents a calendar from an external calendar service.\n *\n * Contains metadata about a specific calendar that can be synced\n * with Plot. Different calendar providers may have additional\n * provider-specific properties.\n */\nexport type Calendar = {\n /** Unique identifier for the calendar within the provider */\n id: string;\n /** Human-readable name of the calendar */\n name: string;\n /** Optional description or additional details about the calendar */\n description: string | null;\n /** Whether this is the user's primary/default calendar */\n primary: boolean;\n};\n\n/**\n * Configuration options for calendar synchronization.\n *\n * Controls the time range and other parameters for calendar sync operations.\n * Used to limit sync scope and optimize performance.\n */\nexport type SyncOptions = {\n /**\n * Earliest date to sync events from (inclusive).\n * - If undefined: defaults to 2 years in the past\n * - If null: syncs all history from the beginning of time\n * - If Date: syncs from the specified date\n */\n timeMin?: Date | null;\n /**\n * Latest date to sync events to (exclusive).\n * - If undefined: no limit (syncs all future events)\n * - If null: no limit (syncs all future events)\n * - If Date: syncs up to but not including the specified date\n *\n * Use cases:\n * - Daily digest: Set to end of today\n * - Week view: Set to end of current week\n * - Performance: Limit initial sync range\n */\n timeMax?: Date | null;\n};\n\n/**\n * Base interface for calendar integration tools.\n *\n * Defines the standard operations that all calendar tools must implement\n * to integrate with external calendar services like Google Calendar,\n * Outlook Calendar, etc.\n *\n * **Architecture: Tools Build, Twists Save**\n *\n * Calendar tools follow Plot's core architectural principle:\n * - **Tools**: Fetch external data and transform it into Plot format (NewActivity objects)\n * - **Twists**: Receive the data and decide what to do with it (create, update, filter, etc.)\n *\n * This separation allows:\n * - Tools to be reusable across different twists with different behaviors\n * - Twists to have full control over what gets saved and how\n * - Easier testing of tools in isolation\n *\n * **Implementation Pattern:**\n * 1. Request an ActivityLink for authorization\n * 2. Create an Activity with the ActivityLink to prompt user (via twist)\n * 3. Receive a CalendarAuth in the specified callback\n * 4. Fetch list of available calendars\n * 5. Start sync for selected calendars\n * 6. **Tool builds NewActivity objects** and passes them to the twist via callback\n * 7. **Twist decides** whether to save using createActivity/updateActivity\n *\n * **Tool Implementation Rules:**\n * - **DO** build Activity/Note objects from external data\n * - **DO** pass them to the twist via the callback\n * - **DON'T** call plot.createActivity/updateActivity directly\n * - **DON'T** save anything to Plot database\n *\n * **Recommended Data Sync Strategy:**\n * Use Activity.source and Note.key for automatic upserts without manual ID tracking.\n * See SYNC_STRATEGIES.md for detailed patterns and when to use alternative approaches.\n *\n * @example\n * ```typescript\n * // Typical calendar integration flow using source/key upserts\n * class MyCalendarTwist extends Twist {\n * private googleCalendar: GoogleCalendar;\n *\n * async activate() {\n * // Step 1: Request authorization\n * const authLink = await this.googleCalendar.requestAuth(\"onAuthComplete\");\n * await this.plot.createActivity({\n * type: ActivityType.Action,\n * title: \"Connect Google Calendar\",\n * links: [authLink],\n * });\n * }\n *\n * async onAuthComplete(auth: CalendarAuth) {\n * // Step 2: Get available calendars\n * const calendars = await this.googleCalendar.getCalendars(auth.authToken);\n *\n * // Step 3: Start sync for primary calendar\n * const primaryCalendar = calendars.find(c => c.primary);\n * if (primaryCalendar) {\n * await this.googleCalendar.startSync(\n * {\n * authToken: auth.authToken,\n * calendarId: primaryCalendar.id\n * },\n * this.onCalendarEvent, // Callback receives data from tool\n * { initialSync: true }\n * );\n * }\n * }\n *\n * async onCalendarEvent(\n * activity: NewActivityWithNotes,\n * syncMeta: { initialSync: boolean }\n * ) {\n * // Step 4: Twist decides what to do with the data\n * // Tool built the NewActivity, twist saves it\n * await this.plot.createActivity(activity);\n * }\n * }\n * ```\n */\nexport type CalendarTool = {\n /**\n * Initiates the authorization flow for the calendar service.\n *\n * @param callback - Function receiving (auth, ...extraArgs) when auth completes\n * @param extraArgs - Additional arguments to pass to the callback (type-checked)\n * @returns Promise resolving to an ActivityLink to initiate the auth flow\n */\n requestAuth<\n TArgs extends Serializable[],\n TCallback extends (auth: CalendarAuth, ...args: TArgs) => any\n >(\n callback: TCallback,\n ...extraArgs: TArgs\n ): Promise<ActivityLink>;\n\n /**\n * Retrieves the list of calendars accessible to the authenticated user.\n *\n * Returns metadata for all calendars the user has access to, including\n * their primary calendar and any shared calendars. This list can be\n * presented to users for calendar selection.\n *\n * @param authToken - Authorization token from successful auth flow\n * @returns Promise resolving to array of available calendars\n * @throws When the auth token is invalid or expired\n */\n getCalendars(authToken: string): Promise<Calendar[]>;\n\n /**\n * Begins synchronizing events from a specific calendar.\n *\n * Sets up real-time sync for the specified calendar, including initial\n * event import and ongoing change notifications. The callback function\n * will be invoked for each synced event.\n *\n * **Recommended Implementation** (Strategy 2 - Upsert via Source/Key):\n * - Set Activity.source to the event's canonical URL (e.g., event.htmlLink)\n * - Use Note.key for event details (description, attendees, etc.) to enable upserts\n * - No manual ID tracking needed - Plot handles deduplication automatically\n * - Send NewActivityWithNotes for all events (creates new or updates existing)\n * - Set activity.unread = false for initial sync, omit for incremental updates\n *\n * **Alternative** (Strategy 3 - Advanced cases):\n * - Use Uuid.Generate() and store ID mappings when creating multiple activities per event\n * - See SYNC_STRATEGIES.md for when this is appropriate\n *\n * @param options - Sync configuration options\n * @param options.authToken - Authorization token for calendar access\n * @param options.calendarId - ID of the calendar to sync\n * @param options.timeMin - Earliest date to sync events from (inclusive)\n * @param options.timeMax - Latest date to sync events to (exclusive)\n * @param callback - Function receiving (activity, ...extraArgs) for each synced event\n * @param extraArgs - Additional arguments to pass to the callback (type-checked, no functions allowed)\n * @returns Promise that resolves when sync setup is complete\n * @throws When auth token is invalid or calendar doesn't exist\n */\n startSync<\n TArgs extends Serializable[],\n TCallback extends (activity: NewActivityWithNotes, ...args: TArgs) => any\n >(\n options: {\n authToken: string;\n calendarId: string;\n } & SyncOptions,\n callback: TCallback,\n ...extraArgs: TArgs\n ): Promise<void>;\n\n /**\n * Stops synchronizing events from a specific calendar.\n *\n * Disables real-time sync and cleans up any webhooks or polling\n * mechanisms for the specified calendar. No further events will\n * be synced after this call.\n *\n * @param authToken - Authorization token for calendar access\n * @param calendarId - ID of the calendar to stop syncing\n * @returns Promise that resolves when sync is stopped\n */\n stopSync(authToken: string, calendarId: string): Promise<void>;\n};\n";
7
+ declare const _default: "import type { NewActivityWithNotes, Serializable } from \"../index\";\n\n/**\n * Represents a calendar from an external calendar service.\n *\n * Contains metadata about a specific calendar that can be synced\n * with Plot. Different calendar providers may have additional\n * provider-specific properties.\n */\nexport type Calendar = {\n /** Unique identifier for the calendar within the provider */\n id: string;\n /** Human-readable name of the calendar */\n name: string;\n /** Optional description or additional details about the calendar */\n description: string | null;\n /** Whether this is the user's primary/default calendar */\n primary: boolean;\n};\n\n/**\n * Configuration options for calendar synchronization.\n *\n * Controls the time range and other parameters for calendar sync operations.\n * Used to limit sync scope and optimize performance.\n */\nexport type SyncOptions = {\n /**\n * Earliest date to sync events from (inclusive).\n * - If undefined: defaults to 2 years in the past\n * - If null: syncs all history from the beginning of time\n * - If Date: syncs from the specified date\n */\n timeMin?: Date | null;\n /**\n * Latest date to sync events to (exclusive).\n * - If undefined: no limit (syncs all future events)\n * - If null: no limit (syncs all future events)\n * - If Date: syncs up to but not including the specified date\n *\n * Use cases:\n * - Daily digest: Set to end of today\n * - Week view: Set to end of current week\n * - Performance: Limit initial sync range\n */\n timeMax?: Date | null;\n};\n\n/**\n * Base interface for calendar integration tools.\n *\n * Defines the standard operations that all calendar tools must implement\n * to integrate with external calendar services like Google Calendar,\n * Outlook Calendar, etc.\n *\n * **Architecture: Tools Build, Twists Save**\n *\n * Calendar tools follow Plot's core architectural principle:\n * - **Tools**: Fetch external data and transform it into Plot format (NewActivity objects)\n * - **Twists**: Receive the data and decide what to do with it (create, update, filter, etc.)\n *\n * This separation allows:\n * - Tools to be reusable across different twists with different behaviors\n * - Twists to have full control over what gets saved and how\n * - Easier testing of tools in isolation\n *\n * **Implementation Pattern:**\n * 1. Authorization is handled via the twist edit modal (Integrations provider config)\n * 2. Tool declares providers and lifecycle callbacks in build()\n * 3. onAuthorized lists available calendars and calls setSyncables()\n * 4. User enables calendars in the modal \u2192 onSyncEnabled fires\n * 5. **Tool builds NewActivity objects** and passes them to the twist via callback\n * 6. **Twist decides** whether to save using createActivity/updateActivity\n *\n * **Tool Implementation Rules:**\n * - **DO** build Activity/Note objects from external data\n * - **DO** pass them to the twist via the callback\n * - **DON'T** call plot.createActivity/updateActivity directly\n * - **DON'T** save anything to Plot database\n *\n * **Recommended Data Sync Strategy:**\n * Use Activity.source and Note.key for automatic upserts without manual ID tracking.\n * See SYNC_STRATEGIES.md for detailed patterns and when to use alternative approaches.\n *\n * @example\n * ```typescript\n * class MyCalendarTwist extends Twist {\n * build(build: ToolBuilder) {\n * return {\n * googleCalendar: build(GoogleCalendar),\n * plot: build(Plot, { activity: { access: ActivityAccess.Create } }),\n * };\n * }\n *\n * // Auth and calendar selection handled in the twist edit modal.\n * // Events are delivered via the startSync callback.\n * }\n * ```\n */\nexport type CalendarTool = {\n /**\n * Retrieves the list of calendars accessible to the authenticated user.\n *\n * @param calendarId - A calendar ID to use for auth lookup\n * @returns Promise resolving to array of available calendars\n * @throws When no valid authorization is available\n */\n getCalendars(calendarId: string): Promise<Calendar[]>;\n\n /**\n * Begins synchronizing events from a specific calendar.\n *\n * Sets up real-time sync for the specified calendar, including initial\n * event import and ongoing change notifications. The callback function\n * will be invoked for each synced event.\n *\n * Auth is obtained automatically via integrations.get(provider, calendarId).\n *\n * @param options - Sync configuration options\n * @param options.calendarId - ID of the calendar to sync\n * @param options.timeMin - Earliest date to sync events from (inclusive)\n * @param options.timeMax - Latest date to sync events to (exclusive)\n * @param callback - Function receiving (activity, ...extraArgs) for each synced event\n * @param extraArgs - Additional arguments to pass to the callback (type-checked, no functions allowed)\n * @returns Promise that resolves when sync setup is complete\n * @throws When no valid authorization or calendar doesn't exist\n */\n startSync<\n TArgs extends Serializable[],\n TCallback extends (activity: NewActivityWithNotes, ...args: TArgs) => any\n >(\n options: {\n calendarId: string;\n } & SyncOptions,\n callback: TCallback,\n ...extraArgs: TArgs\n ): Promise<void>;\n\n /**\n * Stops synchronizing events from a specific calendar.\n *\n * @param calendarId - ID of the calendar to stop syncing\n * @returns Promise that resolves when sync is stopped\n */\n stopSync(calendarId: string): Promise<void>;\n};\n";
8
8
  export default _default;
9
9
  //# sourceMappingURL=calendar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../src/llm-docs/common/calendar.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;wBAEY,y+QAAy+Q;AAAx/Q,wBAAy/Q"}
1
+ {"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../src/llm-docs/common/calendar.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;wBAEY,+9KAA09K;AAAz+K,wBAA0+K"}
@@ -4,5 +4,5 @@
4
4
  * This file is auto-generated during build. Do not edit manually.
5
5
  * Generated from: prebuild.ts
6
6
  */
7
- export default "import type { ActivityLink, NewActivityWithNotes, Serializable } from \"../index\";\n\n/**\n * Represents successful calendar authorization.\n *\n * Returned by calendar tools when authorization completes successfully.\n * The auth token is an opaque identifier that can be used for subsequent\n * calendar operations.\n */\nexport type CalendarAuth = {\n /** Opaque token for calendar operations */\n authToken: string;\n};\n\n/**\n * Represents a calendar from an external calendar service.\n *\n * Contains metadata about a specific calendar that can be synced\n * with Plot. Different calendar providers may have additional\n * provider-specific properties.\n */\nexport type Calendar = {\n /** Unique identifier for the calendar within the provider */\n id: string;\n /** Human-readable name of the calendar */\n name: string;\n /** Optional description or additional details about the calendar */\n description: string | null;\n /** Whether this is the user's primary/default calendar */\n primary: boolean;\n};\n\n/**\n * Configuration options for calendar synchronization.\n *\n * Controls the time range and other parameters for calendar sync operations.\n * Used to limit sync scope and optimize performance.\n */\nexport type SyncOptions = {\n /**\n * Earliest date to sync events from (inclusive).\n * - If undefined: defaults to 2 years in the past\n * - If null: syncs all history from the beginning of time\n * - If Date: syncs from the specified date\n */\n timeMin?: Date | null;\n /**\n * Latest date to sync events to (exclusive).\n * - If undefined: no limit (syncs all future events)\n * - If null: no limit (syncs all future events)\n * - If Date: syncs up to but not including the specified date\n *\n * Use cases:\n * - Daily digest: Set to end of today\n * - Week view: Set to end of current week\n * - Performance: Limit initial sync range\n */\n timeMax?: Date | null;\n};\n\n/**\n * Base interface for calendar integration tools.\n *\n * Defines the standard operations that all calendar tools must implement\n * to integrate with external calendar services like Google Calendar,\n * Outlook Calendar, etc.\n *\n * **Architecture: Tools Build, Twists Save**\n *\n * Calendar tools follow Plot's core architectural principle:\n * - **Tools**: Fetch external data and transform it into Plot format (NewActivity objects)\n * - **Twists**: Receive the data and decide what to do with it (create, update, filter, etc.)\n *\n * This separation allows:\n * - Tools to be reusable across different twists with different behaviors\n * - Twists to have full control over what gets saved and how\n * - Easier testing of tools in isolation\n *\n * **Implementation Pattern:**\n * 1. Request an ActivityLink for authorization\n * 2. Create an Activity with the ActivityLink to prompt user (via twist)\n * 3. Receive a CalendarAuth in the specified callback\n * 4. Fetch list of available calendars\n * 5. Start sync for selected calendars\n * 6. **Tool builds NewActivity objects** and passes them to the twist via callback\n * 7. **Twist decides** whether to save using createActivity/updateActivity\n *\n * **Tool Implementation Rules:**\n * - **DO** build Activity/Note objects from external data\n * - **DO** pass them to the twist via the callback\n * - **DON'T** call plot.createActivity/updateActivity directly\n * - **DON'T** save anything to Plot database\n *\n * **Recommended Data Sync Strategy:**\n * Use Activity.source and Note.key for automatic upserts without manual ID tracking.\n * See SYNC_STRATEGIES.md for detailed patterns and when to use alternative approaches.\n *\n * @example\n * ```typescript\n * // Typical calendar integration flow using source/key upserts\n * class MyCalendarTwist extends Twist {\n * private googleCalendar: GoogleCalendar;\n *\n * async activate() {\n * // Step 1: Request authorization\n * const authLink = await this.googleCalendar.requestAuth(\"onAuthComplete\");\n * await this.plot.createActivity({\n * type: ActivityType.Action,\n * title: \"Connect Google Calendar\",\n * links: [authLink],\n * });\n * }\n *\n * async onAuthComplete(auth: CalendarAuth) {\n * // Step 2: Get available calendars\n * const calendars = await this.googleCalendar.getCalendars(auth.authToken);\n *\n * // Step 3: Start sync for primary calendar\n * const primaryCalendar = calendars.find(c => c.primary);\n * if (primaryCalendar) {\n * await this.googleCalendar.startSync(\n * {\n * authToken: auth.authToken,\n * calendarId: primaryCalendar.id\n * },\n * this.onCalendarEvent, // Callback receives data from tool\n * { initialSync: true }\n * );\n * }\n * }\n *\n * async onCalendarEvent(\n * activity: NewActivityWithNotes,\n * syncMeta: { initialSync: boolean }\n * ) {\n * // Step 4: Twist decides what to do with the data\n * // Tool built the NewActivity, twist saves it\n * await this.plot.createActivity(activity);\n * }\n * }\n * ```\n */\nexport type CalendarTool = {\n /**\n * Initiates the authorization flow for the calendar service.\n *\n * @param callback - Function receiving (auth, ...extraArgs) when auth completes\n * @param extraArgs - Additional arguments to pass to the callback (type-checked)\n * @returns Promise resolving to an ActivityLink to initiate the auth flow\n */\n requestAuth<\n TArgs extends Serializable[],\n TCallback extends (auth: CalendarAuth, ...args: TArgs) => any\n >(\n callback: TCallback,\n ...extraArgs: TArgs\n ): Promise<ActivityLink>;\n\n /**\n * Retrieves the list of calendars accessible to the authenticated user.\n *\n * Returns metadata for all calendars the user has access to, including\n * their primary calendar and any shared calendars. This list can be\n * presented to users for calendar selection.\n *\n * @param authToken - Authorization token from successful auth flow\n * @returns Promise resolving to array of available calendars\n * @throws When the auth token is invalid or expired\n */\n getCalendars(authToken: string): Promise<Calendar[]>;\n\n /**\n * Begins synchronizing events from a specific calendar.\n *\n * Sets up real-time sync for the specified calendar, including initial\n * event import and ongoing change notifications. The callback function\n * will be invoked for each synced event.\n *\n * **Recommended Implementation** (Strategy 2 - Upsert via Source/Key):\n * - Set Activity.source to the event's canonical URL (e.g., event.htmlLink)\n * - Use Note.key for event details (description, attendees, etc.) to enable upserts\n * - No manual ID tracking needed - Plot handles deduplication automatically\n * - Send NewActivityWithNotes for all events (creates new or updates existing)\n * - Set activity.unread = false for initial sync, omit for incremental updates\n *\n * **Alternative** (Strategy 3 - Advanced cases):\n * - Use Uuid.Generate() and store ID mappings when creating multiple activities per event\n * - See SYNC_STRATEGIES.md for when this is appropriate\n *\n * @param options - Sync configuration options\n * @param options.authToken - Authorization token for calendar access\n * @param options.calendarId - ID of the calendar to sync\n * @param options.timeMin - Earliest date to sync events from (inclusive)\n * @param options.timeMax - Latest date to sync events to (exclusive)\n * @param callback - Function receiving (activity, ...extraArgs) for each synced event\n * @param extraArgs - Additional arguments to pass to the callback (type-checked, no functions allowed)\n * @returns Promise that resolves when sync setup is complete\n * @throws When auth token is invalid or calendar doesn't exist\n */\n startSync<\n TArgs extends Serializable[],\n TCallback extends (activity: NewActivityWithNotes, ...args: TArgs) => any\n >(\n options: {\n authToken: string;\n calendarId: string;\n } & SyncOptions,\n callback: TCallback,\n ...extraArgs: TArgs\n ): Promise<void>;\n\n /**\n * Stops synchronizing events from a specific calendar.\n *\n * Disables real-time sync and cleans up any webhooks or polling\n * mechanisms for the specified calendar. No further events will\n * be synced after this call.\n *\n * @param authToken - Authorization token for calendar access\n * @param calendarId - ID of the calendar to stop syncing\n * @returns Promise that resolves when sync is stopped\n */\n stopSync(authToken: string, calendarId: string): Promise<void>;\n};\n";
7
+ export default "import type { NewActivityWithNotes, Serializable } from \"../index\";\n\n/**\n * Represents a calendar from an external calendar service.\n *\n * Contains metadata about a specific calendar that can be synced\n * with Plot. Different calendar providers may have additional\n * provider-specific properties.\n */\nexport type Calendar = {\n /** Unique identifier for the calendar within the provider */\n id: string;\n /** Human-readable name of the calendar */\n name: string;\n /** Optional description or additional details about the calendar */\n description: string | null;\n /** Whether this is the user's primary/default calendar */\n primary: boolean;\n};\n\n/**\n * Configuration options for calendar synchronization.\n *\n * Controls the time range and other parameters for calendar sync operations.\n * Used to limit sync scope and optimize performance.\n */\nexport type SyncOptions = {\n /**\n * Earliest date to sync events from (inclusive).\n * - If undefined: defaults to 2 years in the past\n * - If null: syncs all history from the beginning of time\n * - If Date: syncs from the specified date\n */\n timeMin?: Date | null;\n /**\n * Latest date to sync events to (exclusive).\n * - If undefined: no limit (syncs all future events)\n * - If null: no limit (syncs all future events)\n * - If Date: syncs up to but not including the specified date\n *\n * Use cases:\n * - Daily digest: Set to end of today\n * - Week view: Set to end of current week\n * - Performance: Limit initial sync range\n */\n timeMax?: Date | null;\n};\n\n/**\n * Base interface for calendar integration tools.\n *\n * Defines the standard operations that all calendar tools must implement\n * to integrate with external calendar services like Google Calendar,\n * Outlook Calendar, etc.\n *\n * **Architecture: Tools Build, Twists Save**\n *\n * Calendar tools follow Plot's core architectural principle:\n * - **Tools**: Fetch external data and transform it into Plot format (NewActivity objects)\n * - **Twists**: Receive the data and decide what to do with it (create, update, filter, etc.)\n *\n * This separation allows:\n * - Tools to be reusable across different twists with different behaviors\n * - Twists to have full control over what gets saved and how\n * - Easier testing of tools in isolation\n *\n * **Implementation Pattern:**\n * 1. Authorization is handled via the twist edit modal (Integrations provider config)\n * 2. Tool declares providers and lifecycle callbacks in build()\n * 3. onAuthorized lists available calendars and calls setSyncables()\n * 4. User enables calendars in the modal onSyncEnabled fires\n * 5. **Tool builds NewActivity objects** and passes them to the twist via callback\n * 6. **Twist decides** whether to save using createActivity/updateActivity\n *\n * **Tool Implementation Rules:**\n * - **DO** build Activity/Note objects from external data\n * - **DO** pass them to the twist via the callback\n * - **DON'T** call plot.createActivity/updateActivity directly\n * - **DON'T** save anything to Plot database\n *\n * **Recommended Data Sync Strategy:**\n * Use Activity.source and Note.key for automatic upserts without manual ID tracking.\n * See SYNC_STRATEGIES.md for detailed patterns and when to use alternative approaches.\n *\n * @example\n * ```typescript\n * class MyCalendarTwist extends Twist {\n * build(build: ToolBuilder) {\n * return {\n * googleCalendar: build(GoogleCalendar),\n * plot: build(Plot, { activity: { access: ActivityAccess.Create } }),\n * };\n * }\n *\n * // Auth and calendar selection handled in the twist edit modal.\n * // Events are delivered via the startSync callback.\n * }\n * ```\n */\nexport type CalendarTool = {\n /**\n * Retrieves the list of calendars accessible to the authenticated user.\n *\n * @param calendarId - A calendar ID to use for auth lookup\n * @returns Promise resolving to array of available calendars\n * @throws When no valid authorization is available\n */\n getCalendars(calendarId: string): Promise<Calendar[]>;\n\n /**\n * Begins synchronizing events from a specific calendar.\n *\n * Sets up real-time sync for the specified calendar, including initial\n * event import and ongoing change notifications. The callback function\n * will be invoked for each synced event.\n *\n * Auth is obtained automatically via integrations.get(provider, calendarId).\n *\n * @param options - Sync configuration options\n * @param options.calendarId - ID of the calendar to sync\n * @param options.timeMin - Earliest date to sync events from (inclusive)\n * @param options.timeMax - Latest date to sync events to (exclusive)\n * @param callback - Function receiving (activity, ...extraArgs) for each synced event\n * @param extraArgs - Additional arguments to pass to the callback (type-checked, no functions allowed)\n * @returns Promise that resolves when sync setup is complete\n * @throws When no valid authorization or calendar doesn't exist\n */\n startSync<\n TArgs extends Serializable[],\n TCallback extends (activity: NewActivityWithNotes, ...args: TArgs) => any\n >(\n options: {\n calendarId: string;\n } & SyncOptions,\n callback: TCallback,\n ...extraArgs: TArgs\n ): Promise<void>;\n\n /**\n * Stops synchronizing events from a specific calendar.\n *\n * @param calendarId - ID of the calendar to stop syncing\n * @returns Promise that resolves when sync is stopped\n */\n stopSync(calendarId: string): Promise<void>;\n};\n";
8
8
  //# sourceMappingURL=calendar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"calendar.js","sourceRoot":"","sources":["../../../src/llm-docs/common/calendar.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAe,y+QAAy+Q,CAAC"}
1
+ {"version":3,"file":"calendar.js","sourceRoot":"","sources":["../../../src/llm-docs/common/calendar.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAe,09KAA09K,CAAC"}
@@ -4,6 +4,6 @@
4
4
  * This file is auto-generated during build. Do not edit manually.
5
5
  * Generated from: prebuild.ts
6
6
  */
7
- declare const _default: "import type {\n ActivityLink,\n ActivityMeta,\n NewActivityWithNotes,\n Serializable,\n} from \"../index\";\n\n/**\n * Represents a successful document service authorization.\n *\n * Returned by document tools when authorization completes successfully.\n * The auth token is an opaque identifier that can be used for subsequent\n * document operations.\n */\nexport type DocumentAuth = {\n /** Opaque token for document operations */\n authToken: string;\n};\n\n/**\n * Represents a folder from an external document service.\n *\n * Contains metadata about a specific folder that can be synced\n * with Plot. Different document providers may have additional\n * provider-specific properties.\n */\nexport type DocumentFolder = {\n /** Unique identifier for the folder within the provider */\n id: string;\n /** Human-readable name of the folder */\n name: string;\n /** Optional description or additional details about the folder */\n description: string | null;\n /** Whether this is a root-level folder (e.g., \"My Drive\" in Google Drive) */\n root: boolean;\n};\n\n/**\n * Configuration options for document synchronization.\n *\n * Controls the time range and other parameters for document sync operations.\n * Used to limit sync scope and optimize performance.\n */\nexport type DocumentSyncOptions = {\n /** Earliest date to sync documents from (inclusive) */\n timeMin?: Date;\n};\n\n/**\n * Base interface for document service integration tools.\n *\n * All synced documents are converted to ActivityWithNotes objects.\n * Each document becomes an Activity with Notes for the description and comments.\n *\n * **Recommended Data Sync Strategy:**\n * Use Activity.source and Note.key for automatic upserts.\n *\n * - Set `Activity.source` to `\"{provider}:file:{fileId}\"` (e.g., `\"google-drive:file:abc123\"`)\n * - Use `Note.key` for document details:\n * - key: `\"summary\"` for the document description or metadata summary\n * - key: `\"comment-{commentId}\"` for individual comments (unique per comment)\n * - key: `\"reply-{commentId}-{replyId}\"` for comment replies\n * - No manual ID tracking needed - Plot handles deduplication automatically\n * - Send NewActivityWithNotes for all documents (creates new or updates existing)\n * - Set `activity.unread = false` for initial sync, omit for incremental updates\n */\nexport type DocumentTool = {\n /**\n * Initiates the authorization flow for the document service.\n *\n * @param callback - Function receiving (auth, ...extraArgs) when auth completes\n * @param extraArgs - Additional arguments to pass to the callback (type-checked)\n * @returns Promise resolving to an ActivityLink to initiate the auth flow\n */\n requestAuth<\n TArgs extends Serializable[],\n TCallback extends (auth: DocumentAuth, ...args: TArgs) => any\n >(\n callback: TCallback,\n ...extraArgs: TArgs\n ): Promise<ActivityLink>;\n\n /**\n * Retrieves the list of folders accessible to the user.\n *\n * @param authToken - Authorization token from successful auth flow\n * @returns Promise resolving to array of available folders\n */\n getFolders(authToken: string): Promise<DocumentFolder[]>;\n\n /**\n * Begins synchronizing documents from a specific folder.\n *\n * Documents are converted to NewActivityWithNotes objects.\n *\n * **Recommended Implementation:**\n * - Set Activity.source to `\"{provider}:file:{fileId}\"`\n * - Use Note.key for document details:\n * - key: \"summary\" for description (upserts on changes)\n * - key: \"comment-{commentId}\" for individual comments (unique per comment)\n * - key: \"reply-{commentId}-{replyId}\" for comment replies\n * - Send NewActivityWithNotes for all documents (creates new or updates existing)\n * - Set activity.unread = false for initial sync, omit for incremental updates\n *\n * @param options - Sync configuration options\n * @param options.authToken - Authorization token for access\n * @param options.folderId - ID of the folder to sync\n * @param options.timeMin - Earliest date to sync documents from (inclusive)\n * @param callback - Function receiving (activity, ...extraArgs) for each synced document\n * @param extraArgs - Additional arguments to pass to the callback (type-checked, no functions allowed)\n * @returns Promise that resolves when sync setup is complete\n */\n startSync<\n TArgs extends Serializable[],\n TCallback extends (activity: NewActivityWithNotes, ...args: TArgs) => any\n >(\n options: {\n authToken: string;\n folderId: string;\n } & DocumentSyncOptions,\n callback: TCallback,\n ...extraArgs: TArgs\n ): Promise<void>;\n\n /**\n * Stops synchronizing documents from a specific folder.\n *\n * @param authToken - Authorization token for access\n * @param folderId - ID of the folder to stop syncing\n * @returns Promise that resolves when sync is stopped\n */\n stopSync(authToken: string, folderId: string): Promise<void>;\n\n /**\n * Adds a comment to a document.\n *\n * Optional method for bidirectional sync. When implemented, allows Plot to\n * sync notes added to activities back as comments on the external document.\n *\n * The tool should extract its own ID from meta (e.g., fileId).\n *\n * @param authToken - Authorization token for access\n * @param meta - Activity metadata containing the tool's document identifier\n * @param body - The comment text content\n * @param noteId - Optional Plot note ID for deduplication\n * @returns The external comment key (e.g. \"comment-123\") for dedup, or void\n */\n addDocumentComment?(\n authToken: string,\n meta: ActivityMeta,\n body: string,\n noteId?: string,\n ): Promise<string | void>;\n\n /**\n * Adds a reply to an existing comment thread on a document.\n *\n * @param authToken - Authorization token for access\n * @param meta - Activity metadata containing the tool's document identifier\n * @param commentId - The external comment ID to reply to\n * @param body - The reply text content\n * @param noteId - Optional Plot note ID for deduplication\n * @returns The external reply key (e.g. \"reply-123-456\") for dedup, or void\n */\n addDocumentReply?(\n authToken: string,\n meta: ActivityMeta,\n commentId: string,\n body: string,\n noteId?: string,\n ): Promise<string | void>;\n};\n";
7
+ declare const _default: "import type {\n ActivityMeta,\n NewActivityWithNotes,\n Serializable,\n} from \"../index\";\n\n/**\n * Represents a folder from an external document service.\n *\n * Contains metadata about a specific folder that can be synced\n * with Plot. Different document providers may have additional\n * provider-specific properties.\n */\nexport type DocumentFolder = {\n /** Unique identifier for the folder within the provider */\n id: string;\n /** Human-readable name of the folder */\n name: string;\n /** Optional description or additional details about the folder */\n description: string | null;\n /** Whether this is a root-level folder (e.g., \"My Drive\" in Google Drive) */\n root: boolean;\n};\n\n/**\n * Configuration options for document synchronization.\n *\n * Controls the time range and other parameters for document sync operations.\n * Used to limit sync scope and optimize performance.\n */\nexport type DocumentSyncOptions = {\n /** Earliest date to sync documents from (inclusive) */\n timeMin?: Date;\n};\n\n/**\n * Base interface for document service integration tools.\n *\n * All synced documents are converted to ActivityWithNotes objects.\n * Each document becomes an Activity with Notes for the description and comments.\n *\n * **Architecture: Tools Build, Twists Save**\n *\n * Document tools follow Plot's core architectural principle:\n * - **Tools**: Fetch external data and transform it into Plot format (NewActivity objects)\n * - **Twists**: Receive the data and decide what to do with it (create, update, filter, etc.)\n *\n * **Implementation Pattern:**\n * 1. Authorization is handled via the twist edit modal (Integrations provider config)\n * 2. Tool declares providers and lifecycle callbacks in build()\n * 3. onAuthorized lists available folders and calls setSyncables()\n * 4. User enables folders in the modal \u2192 onSyncEnabled fires\n * 5. **Tool builds NewActivity objects** and passes them to the twist via callback\n * 6. **Twist decides** whether to save using createActivity/updateActivity\n *\n * **Recommended Data Sync Strategy:**\n * Use Activity.source and Note.key for automatic upserts.\n *\n * - Set `Activity.source` to `\"{provider}:file:{fileId}\"` (e.g., `\"google-drive:file:abc123\"`)\n * - Use `Note.key` for document details:\n * - key: `\"summary\"` for the document description or metadata summary\n * - key: `\"comment-{commentId}\"` for individual comments (unique per comment)\n * - key: `\"reply-{commentId}-{replyId}\"` for comment replies\n * - No manual ID tracking needed - Plot handles deduplication automatically\n * - Send NewActivityWithNotes for all documents (creates new or updates existing)\n * - Set `activity.unread = false` for initial sync, omit for incremental updates\n */\nexport type DocumentTool = {\n /**\n * Retrieves the list of folders accessible to the user.\n *\n * @param folderId - A folder ID to use for auth lookup\n * @returns Promise resolving to array of available folders\n */\n getFolders(folderId: string): Promise<DocumentFolder[]>;\n\n /**\n * Begins synchronizing documents from a specific folder.\n *\n * Documents are converted to NewActivityWithNotes objects.\n *\n * Auth is obtained automatically via integrations.get(provider, folderId).\n *\n * @param options - Sync configuration options\n * @param options.folderId - ID of the folder to sync\n * @param options.timeMin - Earliest date to sync documents from (inclusive)\n * @param callback - Function receiving (activity, ...extraArgs) for each synced document\n * @param extraArgs - Additional arguments to pass to the callback (type-checked, no functions allowed)\n * @returns Promise that resolves when sync setup is complete\n */\n startSync<\n TArgs extends Serializable[],\n TCallback extends (activity: NewActivityWithNotes, ...args: TArgs) => any\n >(\n options: {\n folderId: string;\n } & DocumentSyncOptions,\n callback: TCallback,\n ...extraArgs: TArgs\n ): Promise<void>;\n\n /**\n * Stops synchronizing documents from a specific folder.\n *\n * @param folderId - ID of the folder to stop syncing\n * @returns Promise that resolves when sync is stopped\n */\n stopSync(folderId: string): Promise<void>;\n\n /**\n * Adds a comment to a document.\n *\n * Optional method for bidirectional sync. When implemented, allows Plot to\n * sync notes added to activities back as comments on the external document.\n *\n * Auth is obtained automatically. The tool should extract its own ID\n * from meta (e.g., fileId).\n *\n * @param meta - Activity metadata containing the tool's document identifier\n * @param body - The comment text content\n * @param noteId - Optional Plot note ID for deduplication\n * @returns The external comment key (e.g. \"comment-123\") for dedup, or void\n */\n addDocumentComment?(\n meta: ActivityMeta,\n body: string,\n noteId?: string,\n ): Promise<string | void>;\n\n /**\n * Adds a reply to an existing comment thread on a document.\n *\n * Auth is obtained automatically. The tool should extract its own ID\n * from meta (e.g., fileId).\n *\n * @param meta - Activity metadata containing the tool's document identifier\n * @param commentId - The external comment ID to reply to\n * @param body - The reply text content\n * @param noteId - Optional Plot note ID for deduplication\n * @returns The external reply key (e.g. \"reply-123-456\") for dedup, or void\n */\n addDocumentReply?(\n meta: ActivityMeta,\n commentId: string,\n body: string,\n noteId?: string,\n ): Promise<string | void>;\n};\n";
8
8
  export default _default;
9
9
  //# sourceMappingURL=documents.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"documents.d.ts","sourceRoot":"","sources":["../../../src/llm-docs/common/documents.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;wBAEY,6xMAA6xM;AAA5yM,wBAA6yM"}
1
+ {"version":3,"file":"documents.d.ts","sourceRoot":"","sources":["../../../src/llm-docs/common/documents.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;wBAEY,gjLAA2iL;AAA1jL,wBAA2jL"}
@@ -4,5 +4,5 @@
4
4
  * This file is auto-generated during build. Do not edit manually.
5
5
  * Generated from: prebuild.ts
6
6
  */
7
- export default "import type {\n ActivityLink,\n ActivityMeta,\n NewActivityWithNotes,\n Serializable,\n} from \"../index\";\n\n/**\n * Represents a successful document service authorization.\n *\n * Returned by document tools when authorization completes successfully.\n * The auth token is an opaque identifier that can be used for subsequent\n * document operations.\n */\nexport type DocumentAuth = {\n /** Opaque token for document operations */\n authToken: string;\n};\n\n/**\n * Represents a folder from an external document service.\n *\n * Contains metadata about a specific folder that can be synced\n * with Plot. Different document providers may have additional\n * provider-specific properties.\n */\nexport type DocumentFolder = {\n /** Unique identifier for the folder within the provider */\n id: string;\n /** Human-readable name of the folder */\n name: string;\n /** Optional description or additional details about the folder */\n description: string | null;\n /** Whether this is a root-level folder (e.g., \"My Drive\" in Google Drive) */\n root: boolean;\n};\n\n/**\n * Configuration options for document synchronization.\n *\n * Controls the time range and other parameters for document sync operations.\n * Used to limit sync scope and optimize performance.\n */\nexport type DocumentSyncOptions = {\n /** Earliest date to sync documents from (inclusive) */\n timeMin?: Date;\n};\n\n/**\n * Base interface for document service integration tools.\n *\n * All synced documents are converted to ActivityWithNotes objects.\n * Each document becomes an Activity with Notes for the description and comments.\n *\n * **Recommended Data Sync Strategy:**\n * Use Activity.source and Note.key for automatic upserts.\n *\n * - Set `Activity.source` to `\"{provider}:file:{fileId}\"` (e.g., `\"google-drive:file:abc123\"`)\n * - Use `Note.key` for document details:\n * - key: `\"summary\"` for the document description or metadata summary\n * - key: `\"comment-{commentId}\"` for individual comments (unique per comment)\n * - key: `\"reply-{commentId}-{replyId}\"` for comment replies\n * - No manual ID tracking needed - Plot handles deduplication automatically\n * - Send NewActivityWithNotes for all documents (creates new or updates existing)\n * - Set `activity.unread = false` for initial sync, omit for incremental updates\n */\nexport type DocumentTool = {\n /**\n * Initiates the authorization flow for the document service.\n *\n * @param callback - Function receiving (auth, ...extraArgs) when auth completes\n * @param extraArgs - Additional arguments to pass to the callback (type-checked)\n * @returns Promise resolving to an ActivityLink to initiate the auth flow\n */\n requestAuth<\n TArgs extends Serializable[],\n TCallback extends (auth: DocumentAuth, ...args: TArgs) => any\n >(\n callback: TCallback,\n ...extraArgs: TArgs\n ): Promise<ActivityLink>;\n\n /**\n * Retrieves the list of folders accessible to the user.\n *\n * @param authToken - Authorization token from successful auth flow\n * @returns Promise resolving to array of available folders\n */\n getFolders(authToken: string): Promise<DocumentFolder[]>;\n\n /**\n * Begins synchronizing documents from a specific folder.\n *\n * Documents are converted to NewActivityWithNotes objects.\n *\n * **Recommended Implementation:**\n * - Set Activity.source to `\"{provider}:file:{fileId}\"`\n * - Use Note.key for document details:\n * - key: \"summary\" for description (upserts on changes)\n * - key: \"comment-{commentId}\" for individual comments (unique per comment)\n * - key: \"reply-{commentId}-{replyId}\" for comment replies\n * - Send NewActivityWithNotes for all documents (creates new or updates existing)\n * - Set activity.unread = false for initial sync, omit for incremental updates\n *\n * @param options - Sync configuration options\n * @param options.authToken - Authorization token for access\n * @param options.folderId - ID of the folder to sync\n * @param options.timeMin - Earliest date to sync documents from (inclusive)\n * @param callback - Function receiving (activity, ...extraArgs) for each synced document\n * @param extraArgs - Additional arguments to pass to the callback (type-checked, no functions allowed)\n * @returns Promise that resolves when sync setup is complete\n */\n startSync<\n TArgs extends Serializable[],\n TCallback extends (activity: NewActivityWithNotes, ...args: TArgs) => any\n >(\n options: {\n authToken: string;\n folderId: string;\n } & DocumentSyncOptions,\n callback: TCallback,\n ...extraArgs: TArgs\n ): Promise<void>;\n\n /**\n * Stops synchronizing documents from a specific folder.\n *\n * @param authToken - Authorization token for access\n * @param folderId - ID of the folder to stop syncing\n * @returns Promise that resolves when sync is stopped\n */\n stopSync(authToken: string, folderId: string): Promise<void>;\n\n /**\n * Adds a comment to a document.\n *\n * Optional method for bidirectional sync. When implemented, allows Plot to\n * sync notes added to activities back as comments on the external document.\n *\n * The tool should extract its own ID from meta (e.g., fileId).\n *\n * @param authToken - Authorization token for access\n * @param meta - Activity metadata containing the tool's document identifier\n * @param body - The comment text content\n * @param noteId - Optional Plot note ID for deduplication\n * @returns The external comment key (e.g. \"comment-123\") for dedup, or void\n */\n addDocumentComment?(\n authToken: string,\n meta: ActivityMeta,\n body: string,\n noteId?: string,\n ): Promise<string | void>;\n\n /**\n * Adds a reply to an existing comment thread on a document.\n *\n * @param authToken - Authorization token for access\n * @param meta - Activity metadata containing the tool's document identifier\n * @param commentId - The external comment ID to reply to\n * @param body - The reply text content\n * @param noteId - Optional Plot note ID for deduplication\n * @returns The external reply key (e.g. \"reply-123-456\") for dedup, or void\n */\n addDocumentReply?(\n authToken: string,\n meta: ActivityMeta,\n commentId: string,\n body: string,\n noteId?: string,\n ): Promise<string | void>;\n};\n";
7
+ export default "import type {\n ActivityMeta,\n NewActivityWithNotes,\n Serializable,\n} from \"../index\";\n\n/**\n * Represents a folder from an external document service.\n *\n * Contains metadata about a specific folder that can be synced\n * with Plot. Different document providers may have additional\n * provider-specific properties.\n */\nexport type DocumentFolder = {\n /** Unique identifier for the folder within the provider */\n id: string;\n /** Human-readable name of the folder */\n name: string;\n /** Optional description or additional details about the folder */\n description: string | null;\n /** Whether this is a root-level folder (e.g., \"My Drive\" in Google Drive) */\n root: boolean;\n};\n\n/**\n * Configuration options for document synchronization.\n *\n * Controls the time range and other parameters for document sync operations.\n * Used to limit sync scope and optimize performance.\n */\nexport type DocumentSyncOptions = {\n /** Earliest date to sync documents from (inclusive) */\n timeMin?: Date;\n};\n\n/**\n * Base interface for document service integration tools.\n *\n * All synced documents are converted to ActivityWithNotes objects.\n * Each document becomes an Activity with Notes for the description and comments.\n *\n * **Architecture: Tools Build, Twists Save**\n *\n * Document tools follow Plot's core architectural principle:\n * - **Tools**: Fetch external data and transform it into Plot format (NewActivity objects)\n * - **Twists**: Receive the data and decide what to do with it (create, update, filter, etc.)\n *\n * **Implementation Pattern:**\n * 1. Authorization is handled via the twist edit modal (Integrations provider config)\n * 2. Tool declares providers and lifecycle callbacks in build()\n * 3. onAuthorized lists available folders and calls setSyncables()\n * 4. User enables folders in the modal → onSyncEnabled fires\n * 5. **Tool builds NewActivity objects** and passes them to the twist via callback\n * 6. **Twist decides** whether to save using createActivity/updateActivity\n *\n * **Recommended Data Sync Strategy:**\n * Use Activity.source and Note.key for automatic upserts.\n *\n * - Set `Activity.source` to `\"{provider}:file:{fileId}\"` (e.g., `\"google-drive:file:abc123\"`)\n * - Use `Note.key` for document details:\n * - key: `\"summary\"` for the document description or metadata summary\n * - key: `\"comment-{commentId}\"` for individual comments (unique per comment)\n * - key: `\"reply-{commentId}-{replyId}\"` for comment replies\n * - No manual ID tracking needed - Plot handles deduplication automatically\n * - Send NewActivityWithNotes for all documents (creates new or updates existing)\n * - Set `activity.unread = false` for initial sync, omit for incremental updates\n */\nexport type DocumentTool = {\n /**\n * Retrieves the list of folders accessible to the user.\n *\n * @param folderId - A folder ID to use for auth lookup\n * @returns Promise resolving to array of available folders\n */\n getFolders(folderId: string): Promise<DocumentFolder[]>;\n\n /**\n * Begins synchronizing documents from a specific folder.\n *\n * Documents are converted to NewActivityWithNotes objects.\n *\n * Auth is obtained automatically via integrations.get(provider, folderId).\n *\n * @param options - Sync configuration options\n * @param options.folderId - ID of the folder to sync\n * @param options.timeMin - Earliest date to sync documents from (inclusive)\n * @param callback - Function receiving (activity, ...extraArgs) for each synced document\n * @param extraArgs - Additional arguments to pass to the callback (type-checked, no functions allowed)\n * @returns Promise that resolves when sync setup is complete\n */\n startSync<\n TArgs extends Serializable[],\n TCallback extends (activity: NewActivityWithNotes, ...args: TArgs) => any\n >(\n options: {\n folderId: string;\n } & DocumentSyncOptions,\n callback: TCallback,\n ...extraArgs: TArgs\n ): Promise<void>;\n\n /**\n * Stops synchronizing documents from a specific folder.\n *\n * @param folderId - ID of the folder to stop syncing\n * @returns Promise that resolves when sync is stopped\n */\n stopSync(folderId: string): Promise<void>;\n\n /**\n * Adds a comment to a document.\n *\n * Optional method for bidirectional sync. When implemented, allows Plot to\n * sync notes added to activities back as comments on the external document.\n *\n * Auth is obtained automatically. The tool should extract its own ID\n * from meta (e.g., fileId).\n *\n * @param meta - Activity metadata containing the tool's document identifier\n * @param body - The comment text content\n * @param noteId - Optional Plot note ID for deduplication\n * @returns The external comment key (e.g. \"comment-123\") for dedup, or void\n */\n addDocumentComment?(\n meta: ActivityMeta,\n body: string,\n noteId?: string,\n ): Promise<string | void>;\n\n /**\n * Adds a reply to an existing comment thread on a document.\n *\n * Auth is obtained automatically. The tool should extract its own ID\n * from meta (e.g., fileId).\n *\n * @param meta - Activity metadata containing the tool's document identifier\n * @param commentId - The external comment ID to reply to\n * @param body - The reply text content\n * @param noteId - Optional Plot note ID for deduplication\n * @returns The external reply key (e.g. \"reply-123-456\") for dedup, or void\n */\n addDocumentReply?(\n meta: ActivityMeta,\n commentId: string,\n body: string,\n noteId?: string,\n ): Promise<string | void>;\n};\n";
8
8
  //# sourceMappingURL=documents.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"documents.js","sourceRoot":"","sources":["../../../src/llm-docs/common/documents.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAe,6xMAA6xM,CAAC"}
1
+ {"version":3,"file":"documents.js","sourceRoot":"","sources":["../../../src/llm-docs/common/documents.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAe,2iLAA2iL,CAAC"}
@@ -4,6 +4,6 @@
4
4
  * This file is auto-generated during build. Do not edit manually.
5
5
  * Generated from: prebuild.ts
6
6
  */
7
- declare const _default: "import type { ActivityLink, NewActivityWithNotes, Serializable } from \"../index\";\n\n/**\n * Represents a successful messaging service authorization.\n *\n * Returned by messaging tools when authorization completes successfully.\n * The auth token is an opaque identifier that can be used for subsequent\n * messaging operations.\n */\nexport type MessagingAuth = {\n /** Opaque token for messaging operations */\n authToken: string;\n};\n\n/**\n * Represents a channel from an external messaging service.\n *\n * Contains metadata about a specific channel that can be synced\n * with Plot.\n */\nexport type MessageChannel = {\n /** Unique identifier for the channel within the provider */\n id: string;\n /** Human-readable name of the channel (e.g., \"Inbox\", \"#general\", \"My Team Thread\") */\n name: string;\n /** Optional description or additional details about the channel */\n description: string | null;\n /** Whether this is the user's primary/default channel (e.g. email inbox) */\n primary: boolean;\n};\n\n/**\n * Configuration options for messaging synchronization.\n *\n * Controls the time range and other parameters for messaging sync operations.\n * Used to limit sync scope and optimize performance.\n */\nexport type MessageSyncOptions = {\n /** Earliest date to sync events from (inclusive) */\n timeMin?: Date;\n};\n\n/**\n * Base interface for email and chat integration tools.\n *\n * All synced messages/emails are converted to ActivityWithNotes objects.\n * Each email thread or chat conversation becomes an Activity with Notes for each message.\n *\n * **Recommended Data Sync Strategy:**\n * Use Activity.source (thread URL or ID) and Note.key (message ID) for automatic upserts.\n * See SYNC_STRATEGIES.md for detailed patterns.\n */\nexport type MessagingTool = {\n /**\n * Initiates the authorization flow for the service.\n *\n * @param callback - Function receiving (auth, ...extraArgs) when auth completes\n * @param extraArgs - Additional arguments to pass to the callback (type-checked)\n * @returns Promise resolving to an ActivityLink to initiate the auth flow\n */\n requestAuth<\n TArgs extends Serializable[],\n TCallback extends (auth: MessagingAuth, ...args: TArgs) => any\n >(\n callback: TCallback,\n ...extraArgs: TArgs\n ): Promise<ActivityLink>;\n\n /**\n * Retrieves the list of conversation channels (inboxes, channels) accessible to the user.\n *\n * @param authToken - Authorization token from successful auth flow\n * @returns Promise resolving to array of available conversation channels\n */\n getChannels(authToken: string): Promise<MessageChannel[]>;\n\n /**\n * Begins synchronizing messages from a specific channel.\n *\n * Email threads and chat conversations are converted to NewActivityWithNotes objects.\n *\n * **Recommended Implementation** (Strategy 2 - Upsert via Source/Key):\n * - Set Activity.source to the thread/conversation URL or stable ID (e.g., \"slack:{channelId}:{threadTs}\")\n * - Use Note.key for individual messages (e.g., \"message-{messageId}\")\n * - Each message becomes a separate note with unique key for upserts\n * - No manual ID tracking needed - Plot handles deduplication automatically\n * - Send NewActivityWithNotes for all threads (creates new or updates existing)\n * - Set activity.unread = false for initial sync, omit for incremental updates\n *\n * **Alternative** (Strategy 3 - Advanced cases):\n * - Use Uuid.Generate() and store ID mappings when creating multiple activities per thread\n * - See SYNC_STRATEGIES.md for when this is appropriate\n *\n * @param options - Sync configuration options\n * @param options.authToken - Authorization token for access\n * @param options.channelId - ID of the channel (e.g., channel, inbox) to sync\n * @param options.timeMin - Earliest date to sync events from (inclusive)\n * @param callback - Function receiving (thread, ...extraArgs) for each synced conversation\n * @param extraArgs - Additional arguments to pass to the callback (type-checked, no functions allowed)\n * @returns Promise that resolves when sync setup is complete\n */\n startSync<\n TArgs extends Serializable[],\n TCallback extends (thread: NewActivityWithNotes, ...args: TArgs) => any\n >(\n options: {\n authToken: string;\n channelId: string;\n } & MessageSyncOptions,\n callback: TCallback,\n ...extraArgs: TArgs\n ): Promise<void>;\n\n /**\n * Stops synchronizing messages from a specific channel.\n *\n * @param authToken - Authorization token for access\n * @param channelId - ID of the channel to stop syncing\n * @returns Promise that resolves when sync is stopped\n */\n stopSync(authToken: string, channelId: string): Promise<void>;\n};\n";
7
+ declare const _default: "import type { NewActivityWithNotes, Serializable } from \"../index\";\n\n/**\n * Represents a channel from an external messaging service.\n *\n * Contains metadata about a specific channel that can be synced\n * with Plot. Different messaging providers may have additional\n * provider-specific properties.\n */\nexport type MessageChannel = {\n /** Unique identifier for the channel within the provider */\n id: string;\n /** Human-readable name of the channel (e.g., \"Inbox\", \"#general\", \"My Team Thread\") */\n name: string;\n /** Optional description or additional details about the channel */\n description: string | null;\n /** Whether this is the user's primary/default channel (e.g. email inbox) */\n primary: boolean;\n};\n\n/**\n * Configuration options for messaging synchronization.\n *\n * Controls the time range and other parameters for messaging sync operations.\n * Used to limit sync scope and optimize performance.\n */\nexport type MessageSyncOptions = {\n /** Earliest date to sync events from (inclusive) */\n timeMin?: Date;\n};\n\n/**\n * Base interface for email and chat integration tools.\n *\n * All synced messages/emails are converted to ActivityWithNotes objects.\n * Each email thread or chat conversation becomes an Activity with Notes for each message.\n *\n * **Architecture: Tools Build, Twists Save**\n *\n * Messaging tools follow Plot's core architectural principle:\n * - **Tools**: Fetch external data and transform it into Plot format (NewActivity objects)\n * - **Twists**: Receive the data and decide what to do with it (create, update, filter, etc.)\n *\n * **Implementation Pattern:**\n * 1. Authorization is handled via the twist edit modal (Integrations provider config)\n * 2. Tool declares providers and lifecycle callbacks in build()\n * 3. onAuthorized lists available channels and calls setSyncables()\n * 4. User enables channels in the modal \u2192 onSyncEnabled fires\n * 5. **Tool builds NewActivity objects** and passes them to the twist via callback\n * 6. **Twist decides** whether to save using createActivity/updateActivity\n *\n * **Recommended Data Sync Strategy:**\n * Use Activity.source (thread URL or ID) and Note.key (message ID) for automatic upserts.\n * See SYNC_STRATEGIES.md for detailed patterns.\n */\nexport type MessagingTool = {\n /**\n * Retrieves the list of conversation channels (inboxes, channels) accessible to the user.\n *\n * @param channelId - A channel ID to use for auth lookup\n * @returns Promise resolving to array of available conversation channels\n */\n getChannels(channelId: string): Promise<MessageChannel[]>;\n\n /**\n * Begins synchronizing messages from a specific channel.\n *\n * Auth is obtained automatically via integrations.get(provider, channelId).\n *\n * @param options - Sync configuration options\n * @param options.channelId - ID of the channel (e.g., channel, inbox) to sync\n * @param options.timeMin - Earliest date to sync events from (inclusive)\n * @param callback - Function receiving (thread, ...extraArgs) for each synced conversation\n * @param extraArgs - Additional arguments to pass to the callback (type-checked, no functions allowed)\n * @returns Promise that resolves when sync setup is complete\n */\n startSync<\n TArgs extends Serializable[],\n TCallback extends (thread: NewActivityWithNotes, ...args: TArgs) => any\n >(\n options: {\n channelId: string;\n } & MessageSyncOptions,\n callback: TCallback,\n ...extraArgs: TArgs\n ): Promise<void>;\n\n /**\n * Stops synchronizing messages from a specific channel.\n *\n * @param channelId - ID of the channel to stop syncing\n * @returns Promise that resolves when sync is stopped\n */\n stopSync(channelId: string): Promise<void>;\n};\n";
8
8
  export default _default;
9
9
  //# sourceMappingURL=messaging.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"messaging.d.ts","sourceRoot":"","sources":["../../../src/llm-docs/common/messaging.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;wBAEY,mtJAAmtJ;AAAluJ,wBAAmuJ"}
1
+ {"version":3,"file":"messaging.d.ts","sourceRoot":"","sources":["../../../src/llm-docs/common/messaging.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;wBAEY,kuHAA6tH;AAA5uH,wBAA6uH"}
@@ -4,5 +4,5 @@
4
4
  * This file is auto-generated during build. Do not edit manually.
5
5
  * Generated from: prebuild.ts
6
6
  */
7
- export default "import type { ActivityLink, NewActivityWithNotes, Serializable } from \"../index\";\n\n/**\n * Represents a successful messaging service authorization.\n *\n * Returned by messaging tools when authorization completes successfully.\n * The auth token is an opaque identifier that can be used for subsequent\n * messaging operations.\n */\nexport type MessagingAuth = {\n /** Opaque token for messaging operations */\n authToken: string;\n};\n\n/**\n * Represents a channel from an external messaging service.\n *\n * Contains metadata about a specific channel that can be synced\n * with Plot.\n */\nexport type MessageChannel = {\n /** Unique identifier for the channel within the provider */\n id: string;\n /** Human-readable name of the channel (e.g., \"Inbox\", \"#general\", \"My Team Thread\") */\n name: string;\n /** Optional description or additional details about the channel */\n description: string | null;\n /** Whether this is the user's primary/default channel (e.g. email inbox) */\n primary: boolean;\n};\n\n/**\n * Configuration options for messaging synchronization.\n *\n * Controls the time range and other parameters for messaging sync operations.\n * Used to limit sync scope and optimize performance.\n */\nexport type MessageSyncOptions = {\n /** Earliest date to sync events from (inclusive) */\n timeMin?: Date;\n};\n\n/**\n * Base interface for email and chat integration tools.\n *\n * All synced messages/emails are converted to ActivityWithNotes objects.\n * Each email thread or chat conversation becomes an Activity with Notes for each message.\n *\n * **Recommended Data Sync Strategy:**\n * Use Activity.source (thread URL or ID) and Note.key (message ID) for automatic upserts.\n * See SYNC_STRATEGIES.md for detailed patterns.\n */\nexport type MessagingTool = {\n /**\n * Initiates the authorization flow for the service.\n *\n * @param callback - Function receiving (auth, ...extraArgs) when auth completes\n * @param extraArgs - Additional arguments to pass to the callback (type-checked)\n * @returns Promise resolving to an ActivityLink to initiate the auth flow\n */\n requestAuth<\n TArgs extends Serializable[],\n TCallback extends (auth: MessagingAuth, ...args: TArgs) => any\n >(\n callback: TCallback,\n ...extraArgs: TArgs\n ): Promise<ActivityLink>;\n\n /**\n * Retrieves the list of conversation channels (inboxes, channels) accessible to the user.\n *\n * @param authToken - Authorization token from successful auth flow\n * @returns Promise resolving to array of available conversation channels\n */\n getChannels(authToken: string): Promise<MessageChannel[]>;\n\n /**\n * Begins synchronizing messages from a specific channel.\n *\n * Email threads and chat conversations are converted to NewActivityWithNotes objects.\n *\n * **Recommended Implementation** (Strategy 2 - Upsert via Source/Key):\n * - Set Activity.source to the thread/conversation URL or stable ID (e.g., \"slack:{channelId}:{threadTs}\")\n * - Use Note.key for individual messages (e.g., \"message-{messageId}\")\n * - Each message becomes a separate note with unique key for upserts\n * - No manual ID tracking needed - Plot handles deduplication automatically\n * - Send NewActivityWithNotes for all threads (creates new or updates existing)\n * - Set activity.unread = false for initial sync, omit for incremental updates\n *\n * **Alternative** (Strategy 3 - Advanced cases):\n * - Use Uuid.Generate() and store ID mappings when creating multiple activities per thread\n * - See SYNC_STRATEGIES.md for when this is appropriate\n *\n * @param options - Sync configuration options\n * @param options.authToken - Authorization token for access\n * @param options.channelId - ID of the channel (e.g., channel, inbox) to sync\n * @param options.timeMin - Earliest date to sync events from (inclusive)\n * @param callback - Function receiving (thread, ...extraArgs) for each synced conversation\n * @param extraArgs - Additional arguments to pass to the callback (type-checked, no functions allowed)\n * @returns Promise that resolves when sync setup is complete\n */\n startSync<\n TArgs extends Serializable[],\n TCallback extends (thread: NewActivityWithNotes, ...args: TArgs) => any\n >(\n options: {\n authToken: string;\n channelId: string;\n } & MessageSyncOptions,\n callback: TCallback,\n ...extraArgs: TArgs\n ): Promise<void>;\n\n /**\n * Stops synchronizing messages from a specific channel.\n *\n * @param authToken - Authorization token for access\n * @param channelId - ID of the channel to stop syncing\n * @returns Promise that resolves when sync is stopped\n */\n stopSync(authToken: string, channelId: string): Promise<void>;\n};\n";
7
+ export default "import type { NewActivityWithNotes, Serializable } from \"../index\";\n\n/**\n * Represents a channel from an external messaging service.\n *\n * Contains metadata about a specific channel that can be synced\n * with Plot. Different messaging providers may have additional\n * provider-specific properties.\n */\nexport type MessageChannel = {\n /** Unique identifier for the channel within the provider */\n id: string;\n /** Human-readable name of the channel (e.g., \"Inbox\", \"#general\", \"My Team Thread\") */\n name: string;\n /** Optional description or additional details about the channel */\n description: string | null;\n /** Whether this is the user's primary/default channel (e.g. email inbox) */\n primary: boolean;\n};\n\n/**\n * Configuration options for messaging synchronization.\n *\n * Controls the time range and other parameters for messaging sync operations.\n * Used to limit sync scope and optimize performance.\n */\nexport type MessageSyncOptions = {\n /** Earliest date to sync events from (inclusive) */\n timeMin?: Date;\n};\n\n/**\n * Base interface for email and chat integration tools.\n *\n * All synced messages/emails are converted to ActivityWithNotes objects.\n * Each email thread or chat conversation becomes an Activity with Notes for each message.\n *\n * **Architecture: Tools Build, Twists Save**\n *\n * Messaging tools follow Plot's core architectural principle:\n * - **Tools**: Fetch external data and transform it into Plot format (NewActivity objects)\n * - **Twists**: Receive the data and decide what to do with it (create, update, filter, etc.)\n *\n * **Implementation Pattern:**\n * 1. Authorization is handled via the twist edit modal (Integrations provider config)\n * 2. Tool declares providers and lifecycle callbacks in build()\n * 3. onAuthorized lists available channels and calls setSyncables()\n * 4. User enables channels in the modal onSyncEnabled fires\n * 5. **Tool builds NewActivity objects** and passes them to the twist via callback\n * 6. **Twist decides** whether to save using createActivity/updateActivity\n *\n * **Recommended Data Sync Strategy:**\n * Use Activity.source (thread URL or ID) and Note.key (message ID) for automatic upserts.\n * See SYNC_STRATEGIES.md for detailed patterns.\n */\nexport type MessagingTool = {\n /**\n * Retrieves the list of conversation channels (inboxes, channels) accessible to the user.\n *\n * @param channelId - A channel ID to use for auth lookup\n * @returns Promise resolving to array of available conversation channels\n */\n getChannels(channelId: string): Promise<MessageChannel[]>;\n\n /**\n * Begins synchronizing messages from a specific channel.\n *\n * Auth is obtained automatically via integrations.get(provider, channelId).\n *\n * @param options - Sync configuration options\n * @param options.channelId - ID of the channel (e.g., channel, inbox) to sync\n * @param options.timeMin - Earliest date to sync events from (inclusive)\n * @param callback - Function receiving (thread, ...extraArgs) for each synced conversation\n * @param extraArgs - Additional arguments to pass to the callback (type-checked, no functions allowed)\n * @returns Promise that resolves when sync setup is complete\n */\n startSync<\n TArgs extends Serializable[],\n TCallback extends (thread: NewActivityWithNotes, ...args: TArgs) => any\n >(\n options: {\n channelId: string;\n } & MessageSyncOptions,\n callback: TCallback,\n ...extraArgs: TArgs\n ): Promise<void>;\n\n /**\n * Stops synchronizing messages from a specific channel.\n *\n * @param channelId - ID of the channel to stop syncing\n * @returns Promise that resolves when sync is stopped\n */\n stopSync(channelId: string): Promise<void>;\n};\n";
8
8
  //# sourceMappingURL=messaging.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"messaging.js","sourceRoot":"","sources":["../../../src/llm-docs/common/messaging.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAe,mtJAAmtJ,CAAC"}
1
+ {"version":3,"file":"messaging.js","sourceRoot":"","sources":["../../../src/llm-docs/common/messaging.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAe,6tHAA6tH,CAAC"}
@@ -4,6 +4,6 @@
4
4
  * This file is auto-generated during build. Do not edit manually.
5
5
  * Generated from: prebuild.ts
6
6
  */
7
- declare const _default: "import type {\n Activity,\n ActivityLink,\n ActivityMeta,\n NewActivityWithNotes,\n Serializable,\n} from \"../index\";\n\n/**\n * Represents a successful project management service authorization.\n *\n * Returned by project management tools when authorization completes successfully.\n * The auth token is an opaque identifier that can be used for subsequent\n * project operations.\n */\nexport type ProjectAuth = {\n /** Opaque token for project management operations */\n authToken: string;\n};\n\n/**\n * Represents a project from an external project management service.\n *\n * Contains metadata about a specific project/board/workspace that can be synced\n * with Plot.\n */\nexport type Project = {\n /** Unique identifier for the project within the provider */\n id: string;\n /** Human-readable name of the project (e.g., \"Q1 Roadmap\", \"Engineering\") */\n name: string;\n /** Optional description or additional details about the project */\n description: string | null;\n /** Optional project key/abbreviation (e.g., \"PROJ\" in Jira, \"ENG\" in Linear) */\n key: string | null;\n};\n\n/**\n * Configuration options for project synchronization.\n *\n * Controls the time range and other parameters for project sync operations.\n * Used to limit sync scope and optimize performance.\n */\nexport type ProjectSyncOptions = {\n /** Earliest date to sync issues from (inclusive) */\n timeMin?: Date;\n};\n\n/**\n * Base interface for project management integration tools.\n *\n * All synced issues/tasks are converted to ActivityWithNotes objects.\n * Each issue becomes an Activity with Notes for the description and comments.\n *\n * **Recommended Data Sync Strategy:**\n * Use Activity.source (issue URL) and Note.key for automatic upserts.\n * See SYNC_STRATEGIES.md for detailed patterns.\n */\nexport type ProjectTool = {\n /**\n * Initiates the authorization flow for the service.\n *\n * @param callback - Function receiving (auth, ...extraArgs) when auth completes\n * @param extraArgs - Additional arguments to pass to the callback (type-checked)\n * @returns Promise resolving to an ActivityLink to initiate the auth flow\n */\n requestAuth<\n TArgs extends Serializable[],\n TCallback extends (auth: ProjectAuth, ...args: TArgs) => any\n >(\n callback: TCallback,\n ...extraArgs: TArgs\n ): Promise<ActivityLink>;\n\n /**\n * Retrieves the list of projects accessible to the user.\n *\n * @param authToken - Authorization token from successful auth flow\n * @returns Promise resolving to array of available projects\n */\n getProjects(authToken: string): Promise<Project[]>;\n\n /**\n * Begins synchronizing issues from a specific project.\n *\n * Issues and tasks are converted to NewActivityWithNotes objects.\n *\n * **Recommended Implementation** (Strategy 2 - Upsert via Source/Key):\n * - Set Activity.source to the issue's canonical URL (e.g., Linear issue URL, Jira issue URL)\n * - Use Note.key for issue details:\n * - key: \"description\" for issue description (upserts on changes)\n * - key: \"metadata\" for status, priority, assignee, etc.\n * - key: \"comment-{commentId}\" for individual comments (unique per comment)\n * - No manual ID tracking needed - Plot handles deduplication automatically\n * - Send NewActivityWithNotes for all issues (creates new or updates existing)\n * - Set activity.unread = false for initial sync, omit for incremental updates\n *\n * **Alternative** (Strategy 3 - Advanced cases):\n * - Use Uuid.Generate() and store ID mappings when creating multiple activities per issue\n * - See SYNC_STRATEGIES.md for when this is appropriate\n *\n * @param options - Sync configuration options\n * @param options.authToken - Authorization token for access\n * @param options.projectId - ID of the project to sync\n * @param options.timeMin - Earliest date to sync issues from (inclusive)\n * @param callback - Function receiving (activity, ...extraArgs) for each synced issue\n * @param extraArgs - Additional arguments to pass to the callback (type-checked, no functions allowed)\n * @returns Promise that resolves when sync setup is complete\n */\n startSync<\n TArgs extends Serializable[],\n TCallback extends (activity: NewActivityWithNotes, ...args: TArgs) => any\n >(\n options: {\n authToken: string;\n projectId: string;\n } & ProjectSyncOptions,\n callback: TCallback,\n ...extraArgs: TArgs\n ): Promise<void>;\n\n /**\n * Stops synchronizing issues from a specific project.\n *\n * @param authToken - Authorization token for access\n * @param projectId - ID of the project to stop syncing\n * @returns Promise that resolves when sync is stopped\n */\n stopSync(authToken: string, projectId: string): Promise<void>;\n\n /**\n * Updates an issue/task with new values.\n *\n * Optional method for bidirectional sync. When implemented, allows Plot to\n * sync activity updates back to the external service.\n *\n * Uses the combination of start and done to determine workflow state:\n * - done set \u2192 Completed/Done state\n * - done null + start set \u2192 In Progress/Active state\n * - done null + start null \u2192 Backlog/Todo state\n *\n * @param authToken - Authorization token for access\n * @param activity - The updated activity\n * @returns Promise that resolves when the update is synced\n */\n updateIssue?(authToken: string, activity: Activity): Promise<void>;\n\n /**\n * Adds a comment to an issue/task.\n *\n * Optional method for bidirectional sync. When implemented, allows Plot to\n * sync notes added to activities back as comments on the external service.\n *\n * The tool should extract its own ID from meta (e.g., linearId, taskGid, issueKey).\n *\n * @param authToken - Authorization token for access\n * @param meta - Activity metadata containing the tool's issue/task identifier\n * @param body - The comment text content\n * @param noteId - Optional Plot note ID, used by tools that support comment metadata (e.g. Jira)\n * @returns The external comment key (e.g. \"comment-123\") for dedup, or void\n */\n addIssueComment?(\n authToken: string,\n meta: ActivityMeta,\n body: string,\n noteId?: string,\n ): Promise<string | void>;\n};\n";
7
+ declare const _default: "import type {\n Activity,\n ActivityMeta,\n NewActivityWithNotes,\n Serializable,\n} from \"../index\";\n\n/**\n * Represents a project from an external project management service.\n *\n * Contains metadata about a specific project/board/workspace that can be synced\n * with Plot. Different project providers may have additional\n * provider-specific properties.\n */\nexport type Project = {\n /** Unique identifier for the project within the provider */\n id: string;\n /** Human-readable name of the project (e.g., \"Q1 Roadmap\", \"Engineering\") */\n name: string;\n /** Optional description or additional details about the project */\n description: string | null;\n /** Optional project key/abbreviation (e.g., \"PROJ\" in Jira, \"ENG\" in Linear) */\n key: string | null;\n};\n\n/**\n * Configuration options for project synchronization.\n *\n * Controls the time range and other parameters for project sync operations.\n * Used to limit sync scope and optimize performance.\n */\nexport type ProjectSyncOptions = {\n /** Earliest date to sync issues from (inclusive) */\n timeMin?: Date;\n};\n\n/**\n * Base interface for project management integration tools.\n *\n * All synced issues/tasks are converted to ActivityWithNotes objects.\n * Each issue becomes an Activity with Notes for the description and comments.\n *\n * **Architecture: Tools Build, Twists Save**\n *\n * Project tools follow Plot's core architectural principle:\n * - **Tools**: Fetch external data and transform it into Plot format (NewActivity objects)\n * - **Twists**: Receive the data and decide what to do with it (create, update, filter, etc.)\n *\n * **Implementation Pattern:**\n * 1. Authorization is handled via the twist edit modal (Integrations provider config)\n * 2. Tool declares providers and lifecycle callbacks in build()\n * 3. onAuthorized lists available projects and calls setSyncables()\n * 4. User enables projects in the modal \u2192 onSyncEnabled fires\n * 5. **Tool builds NewActivity objects** and passes them to the twist via callback\n * 6. **Twist decides** whether to save using createActivity/updateActivity\n *\n * **Recommended Data Sync Strategy:**\n * Use Activity.source (issue URL) and Note.key for automatic upserts.\n * See SYNC_STRATEGIES.md for detailed patterns.\n */\nexport type ProjectTool = {\n /**\n * Retrieves the list of projects accessible to the user.\n *\n * @param projectId - A project ID to use for auth lookup\n * @returns Promise resolving to array of available projects\n */\n getProjects(projectId: string): Promise<Project[]>;\n\n /**\n * Begins synchronizing issues from a specific project.\n *\n * Auth is obtained automatically via integrations.get(provider, projectId).\n *\n * @param options - Sync configuration options\n * @param options.projectId - ID of the project to sync\n * @param options.timeMin - Earliest date to sync issues from (inclusive)\n * @param callback - Function receiving (activity, ...extraArgs) for each synced issue\n * @param extraArgs - Additional arguments to pass to the callback (type-checked, no functions allowed)\n * @returns Promise that resolves when sync setup is complete\n */\n startSync<\n TArgs extends Serializable[],\n TCallback extends (activity: NewActivityWithNotes, ...args: TArgs) => any\n >(\n options: {\n projectId: string;\n } & ProjectSyncOptions,\n callback: TCallback,\n ...extraArgs: TArgs\n ): Promise<void>;\n\n /**\n * Stops synchronizing issues from a specific project.\n *\n * @param projectId - ID of the project to stop syncing\n * @returns Promise that resolves when sync is stopped\n */\n stopSync(projectId: string): Promise<void>;\n\n /**\n * Updates an issue/task with new values.\n *\n * Optional method for bidirectional sync. When implemented, allows Plot to\n * sync activity updates back to the external service.\n *\n * Auth is obtained automatically via integrations.get(provider, projectId)\n * using the projectId from activity.meta.\n *\n * @param activity - The updated activity\n * @returns Promise that resolves when the update is synced\n */\n updateIssue?(activity: Activity): Promise<void>;\n\n /**\n * Adds a comment to an issue/task.\n *\n * Optional method for bidirectional sync. When implemented, allows Plot to\n * sync notes added to activities back as comments on the external service.\n *\n * Auth is obtained automatically. The tool should extract its own ID\n * from meta (e.g., linearId, taskGid, issueKey).\n *\n * @param meta - Activity metadata containing the tool's issue/task identifier\n * @param body - The comment text content\n * @param noteId - Optional Plot note ID, used by tools that support comment metadata (e.g. Jira)\n * @returns The external comment key (e.g. \"comment-123\") for dedup, or void\n */\n addIssueComment?(\n meta: ActivityMeta,\n body: string,\n noteId?: string,\n ): Promise<string | void>;\n};\n";
8
8
  export default _default;
9
9
  //# sourceMappingURL=projects.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../../src/llm-docs/common/projects.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;wBAEY,guMAAitM;AAAhuM,wBAAiuM"}
1
+ {"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../../src/llm-docs/common/projects.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;wBAEY,i6JAA45J;AAA36J,wBAA46J"}