terse-cli 0.2.16 → 0.3.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.
- package/dist/_tmp_create_project.d.ts +2 -0
- package/dist/_tmp_create_project.d.ts.map +1 -0
- package/dist/_tmp_create_project.js +17 -0
- package/dist/_tmp_create_project.js.map +1 -0
- package/dist/_tmp_delete_agent.d.ts +2 -0
- package/dist/_tmp_delete_agent.d.ts.map +1 -0
- package/dist/_tmp_delete_agent.js +14 -0
- package/dist/_tmp_delete_agent.js.map +1 -0
- package/dist/_tmp_manual_trigger.d.ts +2 -0
- package/dist/_tmp_manual_trigger.d.ts.map +1 -0
- package/dist/_tmp_manual_trigger.js +17 -0
- package/dist/_tmp_manual_trigger.js.map +1 -0
- package/dist/_tmp_patch_active.d.ts +2 -0
- package/dist/_tmp_patch_active.d.ts.map +1 -0
- package/dist/_tmp_patch_active.js +21 -0
- package/dist/_tmp_patch_active.js.map +1 -0
- package/dist/codegen.d.ts +15 -0
- package/dist/codegen.d.ts.map +1 -1
- package/dist/codegen.js +466 -81
- package/dist/codegen.js.map +1 -1
- package/dist/commands/deployTheme.d.ts +28 -0
- package/dist/commands/deployTheme.d.ts.map +1 -0
- package/dist/commands/deployTheme.js +68 -0
- package/dist/commands/deployTheme.js.map +1 -0
- package/dist/commands/dev.d.ts +3 -0
- package/dist/commands/dev.d.ts.map +1 -0
- package/dist/commands/dev.js +47 -0
- package/dist/commands/dev.js.map +1 -0
- package/dist/commands/fsExec.d.ts +8 -0
- package/dist/commands/fsExec.d.ts.map +1 -0
- package/dist/commands/fsExec.js +46 -0
- package/dist/commands/fsExec.js.map +1 -0
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/generate.js +36 -267
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/serve.d.ts +1 -0
- package/dist/commands/serve.d.ts.map +1 -0
- package/dist/commands/serve.js +2 -0
- package/dist/commands/serve.js.map +1 -0
- package/dist/commands/terseCliTheme.d.ts +28 -0
- package/dist/commands/terseCliTheme.d.ts.map +1 -0
- package/dist/commands/terseCliTheme.js +68 -0
- package/dist/commands/terseCliTheme.js.map +1 -0
- package/dist/commands/tool.d.ts +6 -0
- package/dist/commands/tool.d.ts.map +1 -0
- package/dist/commands/tool.js +34 -0
- package/dist/commands/tool.js.map +1 -0
- package/dist/commands/toolRun.js +1 -1
- package/dist/commands/toolRun.js.map +1 -1
- package/dist/data/standardSlackEmoji.d.ts +2 -0
- package/dist/data/standardSlackEmoji.d.ts.map +1 -0
- package/dist/data/standardSlackEmoji.js +1978 -0
- package/dist/data/standardSlackEmoji.js.map +1 -0
- package/dist/data/standardSlackEmoji.json +1974 -0
- package/dist/deploy.d.ts +2 -1
- package/dist/deploy.d.ts.map +1 -1
- package/dist/deploy.js +61 -38
- package/dist/deploy.js.map +1 -1
- package/dist/generate.d.ts +2 -1
- package/dist/generate.d.ts.map +1 -1
- package/dist/generate.js +67 -69
- package/dist/generate.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/init.d.ts +2 -1
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +45 -96
- package/dist/init.js.map +1 -1
- package/dist/integrate.d.ts +1 -0
- package/dist/integrate.d.ts.map +1 -1
- package/dist/integrate.js +191 -11
- package/dist/integrate.js.map +1 -1
- package/dist/nonInteractive.d.ts +4 -2
- package/dist/nonInteractive.d.ts.map +1 -1
- package/dist/nonInteractive.js +5 -2
- package/dist/nonInteractive.js.map +1 -1
- package/dist/perf.d.ts +9 -0
- package/dist/perf.d.ts.map +1 -0
- package/dist/perf.js +59 -0
- package/dist/perf.js.map +1 -0
- package/dist/providers/LanguageProvider.d.ts +6 -2
- package/dist/providers/LanguageProvider.d.ts.map +1 -1
- package/dist/providers/codegen.test.d.ts +2 -0
- package/dist/providers/codegen.test.d.ts.map +1 -0
- package/dist/providers/codegen.test.js +45 -0
- package/dist/providers/codegen.test.js.map +1 -0
- package/dist/providers/codegenTypes.d.ts +16 -134
- package/dist/providers/codegenTypes.d.ts.map +1 -1
- package/dist/providers/python/PythonProvider.js +1 -0
- package/dist/providers/python/PythonProvider.js.map +1 -1
- package/dist/providers/python/PythonProvider.test.d.ts +2 -0
- package/dist/providers/python/PythonProvider.test.d.ts.map +1 -0
- package/dist/providers/python/PythonProvider.test.js +169 -0
- package/dist/providers/python/PythonProvider.test.js.map +1 -0
- package/dist/providers/typescript/TypeScriptProvider.d.ts +2 -2
- package/dist/providers/typescript/TypeScriptProvider.d.ts.map +1 -1
- package/dist/providers/typescript/TypeScriptProvider.js +53 -4
- package/dist/providers/typescript/TypeScriptProvider.js.map +1 -1
- package/dist/providers/typescript/attioProjection.d.ts +50 -0
- package/dist/providers/typescript/attioProjection.d.ts.map +1 -0
- package/dist/providers/typescript/attioProjection.js +358 -0
- package/dist/providers/typescript/attioProjection.js.map +1 -0
- package/dist/providers/typescript/modules/IntegrationModule.d.ts +82 -0
- package/dist/providers/typescript/modules/IntegrationModule.d.ts.map +1 -0
- package/dist/providers/typescript/modules/IntegrationModule.js +184 -0
- package/dist/providers/typescript/modules/IntegrationModule.js.map +1 -0
- package/dist/providers/typescript/modules/attio/AttioModule.d.ts +55 -0
- package/dist/providers/typescript/modules/attio/AttioModule.d.ts.map +1 -0
- package/dist/providers/typescript/modules/attio/AttioModule.js +163 -0
- package/dist/providers/typescript/modules/attio/AttioModule.js.map +1 -0
- package/dist/providers/typescript/modules/attio/attioProjection.d.ts +50 -0
- package/dist/providers/typescript/modules/attio/attioProjection.d.ts.map +1 -0
- package/dist/providers/typescript/modules/attio/attioProjection.js +358 -0
- package/dist/providers/typescript/modules/attio/attioProjection.js.map +1 -0
- package/dist/providers/typescript/modules/attio/attioToolMethods.d.ts +4 -0
- package/dist/providers/typescript/modules/attio/attioToolMethods.d.ts.map +1 -0
- package/dist/providers/typescript/modules/attio/attioToolMethods.js +295 -0
- package/dist/providers/typescript/modules/attio/attioToolMethods.js.map +1 -0
- package/dist/providers/typescript/modules/attio/attioTypes.d.ts +36 -0
- package/dist/providers/typescript/modules/attio/attioTypes.d.ts.map +1 -0
- package/dist/providers/typescript/modules/attio/attioTypes.js +2 -0
- package/dist/providers/typescript/modules/attio/attioTypes.js.map +1 -0
- package/dist/providers/typescript/modules/datadog/DatadogModule.d.ts +25 -0
- package/dist/providers/typescript/modules/datadog/DatadogModule.d.ts.map +1 -0
- package/dist/providers/typescript/modules/datadog/DatadogModule.js +33 -0
- package/dist/providers/typescript/modules/datadog/DatadogModule.js.map +1 -0
- package/dist/providers/typescript/modules/github/GithubModule.d.ts +44 -0
- package/dist/providers/typescript/modules/github/GithubModule.d.ts.map +1 -0
- package/dist/providers/typescript/modules/github/GithubModule.js +111 -0
- package/dist/providers/typescript/modules/github/GithubModule.js.map +1 -0
- package/dist/providers/typescript/modules/gmail/GmailModule.d.ts +17 -0
- package/dist/providers/typescript/modules/gmail/GmailModule.d.ts.map +1 -0
- package/dist/providers/typescript/modules/gmail/GmailModule.js +30 -0
- package/dist/providers/typescript/modules/gmail/GmailModule.js.map +1 -0
- package/dist/providers/typescript/modules/hey_reach/HeyReachModule.d.ts +25 -0
- package/dist/providers/typescript/modules/hey_reach/HeyReachModule.d.ts.map +1 -0
- package/dist/providers/typescript/modules/hey_reach/HeyReachModule.js +33 -0
- package/dist/providers/typescript/modules/hey_reach/HeyReachModule.js.map +1 -0
- package/dist/providers/typescript/modules/launchdarkly/LaunchDarklyModule.d.ts +26 -0
- package/dist/providers/typescript/modules/launchdarkly/LaunchDarklyModule.d.ts.map +1 -0
- package/dist/providers/typescript/modules/launchdarkly/LaunchDarklyModule.js +34 -0
- package/dist/providers/typescript/modules/launchdarkly/LaunchDarklyModule.js.map +1 -0
- package/dist/providers/typescript/modules/linear/LinearModule.d.ts +35 -0
- package/dist/providers/typescript/modules/linear/LinearModule.d.ts.map +1 -0
- package/dist/providers/typescript/modules/linear/LinearModule.js +48 -0
- package/dist/providers/typescript/modules/linear/LinearModule.js.map +1 -0
- package/dist/providers/typescript/modules/moduleHelpers.d.ts +23 -0
- package/dist/providers/typescript/modules/moduleHelpers.d.ts.map +1 -0
- package/dist/providers/typescript/modules/moduleHelpers.js +74 -0
- package/dist/providers/typescript/modules/moduleHelpers.js.map +1 -0
- package/dist/providers/typescript/modules/notion/NotionModule.d.ts +33 -0
- package/dist/providers/typescript/modules/notion/NotionModule.d.ts.map +1 -0
- package/dist/providers/typescript/modules/notion/NotionModule.js +44 -0
- package/dist/providers/typescript/modules/notion/NotionModule.js.map +1 -0
- package/dist/providers/typescript/modules/posthog/PosthogModule.d.ts +30 -0
- package/dist/providers/typescript/modules/posthog/PosthogModule.d.ts.map +1 -0
- package/dist/providers/typescript/modules/posthog/PosthogModule.js +60 -0
- package/dist/providers/typescript/modules/posthog/PosthogModule.js.map +1 -0
- package/dist/providers/typescript/modules/registry.d.ts +11 -0
- package/dist/providers/typescript/modules/registry.d.ts.map +1 -0
- package/dist/providers/typescript/modules/registry.js +37 -0
- package/dist/providers/typescript/modules/registry.js.map +1 -0
- package/dist/providers/typescript/modules/resend/ResendModule.d.ts +32 -0
- package/dist/providers/typescript/modules/resend/ResendModule.d.ts.map +1 -0
- package/dist/providers/typescript/modules/resend/ResendModule.js +71 -0
- package/dist/providers/typescript/modules/resend/ResendModule.js.map +1 -0
- package/dist/providers/typescript/modules/slack/SlackModule.d.ts +32 -0
- package/dist/providers/typescript/modules/slack/SlackModule.d.ts.map +1 -0
- package/dist/providers/typescript/modules/slack/SlackModule.js +51 -0
- package/dist/providers/typescript/modules/slack/SlackModule.js.map +1 -0
- package/dist/providers/typescript/modules/snowflake/SnowflakeModule.d.ts +20 -0
- package/dist/providers/typescript/modules/snowflake/SnowflakeModule.d.ts.map +1 -0
- package/dist/providers/typescript/modules/snowflake/SnowflakeModule.js +27 -0
- package/dist/providers/typescript/modules/snowflake/SnowflakeModule.js.map +1 -0
- package/dist/providers/typescript/modules/templateRenderer.d.ts +17 -0
- package/dist/providers/typescript/modules/templateRenderer.d.ts.map +1 -0
- package/dist/providers/typescript/modules/templateRenderer.js +64 -0
- package/dist/providers/typescript/modules/templateRenderer.js.map +1 -0
- package/dist/providers/typescript/modules/terse/TerseModule.d.ts +20 -0
- package/dist/providers/typescript/modules/terse/TerseModule.d.ts.map +1 -0
- package/dist/providers/typescript/modules/terse/TerseModule.js +61 -0
- package/dist/providers/typescript/modules/terse/TerseModule.js.map +1 -0
- package/dist/providers/typescript/modules/workos/WorkOSModule.d.ts +17 -0
- package/dist/providers/typescript/modules/workos/WorkOSModule.d.ts.map +1 -0
- package/dist/providers/typescript/modules/workos/WorkOSModule.js +30 -0
- package/dist/providers/typescript/modules/workos/WorkOSModule.js.map +1 -0
- package/dist/providers/typescript/prepareCodegenData.test.d.ts +2 -0
- package/dist/providers/typescript/prepareCodegenData.test.d.ts.map +1 -0
- package/dist/providers/typescript/prepareCodegenData.test.js +54 -0
- package/dist/providers/typescript/prepareCodegenData.test.js.map +1 -0
- package/dist/providers/typescript/projectedTypes.d.ts +11 -0
- package/dist/providers/typescript/projectedTypes.d.ts.map +1 -0
- package/dist/providers/typescript/projectedTypes.js +53 -0
- package/dist/providers/typescript/projectedTypes.js.map +1 -0
- package/dist/providers/typescript/projectionPrinter.d.ts +26 -0
- package/dist/providers/typescript/projectionPrinter.d.ts.map +1 -0
- package/dist/providers/typescript/projectionPrinter.js +110 -0
- package/dist/providers/typescript/projectionPrinter.js.map +1 -0
- package/dist/providers/typescript/replayLogDedupe.d.ts +6 -0
- package/dist/providers/typescript/replayLogDedupe.d.ts.map +1 -0
- package/dist/providers/typescript/replayLogDedupe.js +156 -0
- package/dist/providers/typescript/replayLogDedupe.js.map +1 -0
- package/dist/providers/typescript/templateEngine.d.ts +8 -2
- package/dist/providers/typescript/templateEngine.d.ts.map +1 -1
- package/dist/providers/typescript/templateEngine.js +241 -29
- package/dist/providers/typescript/templateEngine.js.map +1 -1
- package/dist/providers/typescript/triggerPayloads.d.ts +7 -0
- package/dist/providers/typescript/triggerPayloads.d.ts.map +1 -0
- package/dist/providers/typescript/triggerPayloads.js +60 -0
- package/dist/providers/typescript/triggerPayloads.js.map +1 -0
- package/dist/providers/typescript/triggerTypeDeclarations.d.ts +7 -0
- package/dist/providers/typescript/triggerTypeDeclarations.d.ts.map +1 -0
- package/dist/providers/typescript/triggerTypeDeclarations.js +42 -0
- package/dist/providers/typescript/triggerTypeDeclarations.js.map +1 -0
- package/dist/providers/typescript/triggerTypeRegistry.d.ts +7 -0
- package/dist/providers/typescript/triggerTypeRegistry.d.ts.map +1 -0
- package/dist/providers/typescript/triggerTypeRegistry.js +198 -0
- package/dist/providers/typescript/triggerTypeRegistry.js.map +1 -0
- package/dist/providers/typescript/typePrinter.d.ts +23 -0
- package/dist/providers/typescript/typePrinter.d.ts.map +1 -0
- package/dist/providers/typescript/typePrinter.js +123 -0
- package/dist/providers/typescript/typePrinter.js.map +1 -0
- package/dist/run.d.ts +2 -11
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +42 -153
- package/dist/run.js.map +1 -1
- package/dist/sampleEventId.d.ts +0 -4
- package/dist/sampleEventId.d.ts.map +1 -1
- package/dist/sampleEventId.js +0 -4
- package/dist/sampleEventId.js.map +1 -1
- package/dist/shared/ApiRoutes.d.ts +19 -0
- package/dist/shared/ApiRoutes.d.ts.map +1 -1
- package/dist/shared/ApiRoutes.js +17 -1
- package/dist/shared/ApiRoutes.js.map +1 -1
- package/dist/shared/Configs.d.ts +24 -2
- package/dist/shared/Configs.d.ts.map +1 -1
- package/dist/shared/Configs.js +32 -2
- package/dist/shared/Configs.js.map +1 -1
- package/dist/shared/Integrations.d.ts +18 -1
- package/dist/shared/Integrations.d.ts.map +1 -1
- package/dist/shared/Integrations.js +10 -1
- package/dist/shared/Integrations.js.map +1 -1
- package/dist/shared/InvalidationKeys.d.ts +1 -0
- package/dist/shared/InvalidationKeys.d.ts.map +1 -1
- package/dist/shared/InvalidationKeys.js +3 -0
- package/dist/shared/InvalidationKeys.js.map +1 -1
- package/dist/shared/ModelEvents.d.ts +9 -0
- package/dist/shared/ModelEvents.d.ts.map +1 -1
- package/dist/shared/ModelEvents.js +15 -0
- package/dist/shared/ModelEvents.js.map +1 -1
- package/dist/shared/ToolDisplayUtils.d.ts.map +1 -1
- package/dist/shared/ToolDisplayUtils.js +107 -11
- package/dist/shared/ToolDisplayUtils.js.map +1 -1
- package/dist/shared/types.d.ts +1013 -108
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/shared/types.js.map +1 -1
- package/dist/test.d.ts +2 -1
- package/dist/test.d.ts.map +1 -1
- package/dist/test.js +43 -23
- package/dist/test.js.map +1 -1
- package/dist/triggerParseDetail.d.ts +8 -0
- package/dist/triggerParseDetail.d.ts.map +1 -0
- package/dist/triggerParseDetail.js +30 -0
- package/dist/triggerParseDetail.js.map +1 -0
- package/dist/util.d.ts +2 -3
- package/dist/util.d.ts.map +1 -1
- package/dist/util.js +3 -3
- package/dist/util.js.map +1 -1
- package/package.json +7 -5
- package/src/providers/typescript/modules/attio/attio.schemas.hbs +150 -0
- package/src/providers/typescript/modules/attio/attio.tools.hbs +192 -0
- package/src/providers/typescript/modules/attio/attio.triggers.hbs +130 -0
- package/src/providers/typescript/modules/datadog/datadog.tools.hbs +16 -0
- package/src/providers/typescript/modules/github/github.tools.hbs +68 -0
- package/src/providers/typescript/modules/github/github.triggers.hbs +40 -0
- package/src/providers/typescript/modules/gmail/gmail.tools.hbs +17 -0
- package/src/providers/typescript/modules/gmail/gmail.triggers.hbs +16 -0
- package/src/providers/typescript/modules/hey_reach/hey_reach.tools.hbs +9 -0
- package/src/providers/typescript/modules/hey_reach/hey_reach.triggers.hbs +56 -0
- package/src/providers/typescript/modules/launchdarkly/launchdarkly.tools.hbs +16 -0
- package/src/providers/typescript/modules/linear/linear.tools.hbs +23 -0
- package/src/providers/typescript/modules/linear/linear.triggers.hbs +24 -0
- package/src/providers/typescript/modules/notion/notion.tools.hbs +20 -0
- package/src/providers/typescript/modules/posthog/posthog.tools.hbs +28 -0
- package/{templates/typescript/codegen/partials/resend-section.hbs → src/providers/typescript/modules/resend/resend.tools.hbs} +17 -5
- package/src/providers/typescript/modules/slack/slack.tools.hbs +18 -0
- package/src/providers/typescript/modules/slack/slack.triggers.hbs +28 -0
- package/src/providers/typescript/modules/snowflake/snowflake.tools.hbs +12 -0
- package/src/providers/typescript/modules/terse/terse.tools.hbs +22 -0
- package/src/providers/typescript/modules/terse/terse.triggers.hbs +33 -0
- package/src/providers/typescript/modules/workos/workos.tools.hbs +12 -0
- package/src/providers/typescript/modules/workos/workos.triggers.hbs +64 -0
- package/templates/typescript/codegen/.impeccable/hook.cache.json +1 -0
- package/templates/typescript/codegen/common.hbs +6 -0
- package/templates/typescript/codegen/partials/tools-slice.hbs +18 -0
- package/templates/typescript/codegen/root.hbs +72 -0
- package/templates/typescript/codegen/sdk-primitives.hbs +42 -0
- package/dist/jsonOutput.d.ts +0 -19
- package/dist/jsonOutput.d.ts.map +0 -1
- package/dist/jsonOutput.js +0 -25
- package/dist/jsonOutput.js.map +0 -1
- package/dist/providers/typescript/parkSignals.d.ts +0 -7
- package/dist/providers/typescript/parkSignals.d.ts.map +0 -1
- package/dist/providers/typescript/parkSignals.js +0 -45
- package/dist/providers/typescript/parkSignals.js.map +0 -1
- package/dist/replay.d.ts +0 -3
- package/dist/replay.d.ts.map +0 -1
- package/dist/replay.js +0 -20
- package/dist/replay.js.map +0 -1
- package/dist/testRelay.d.ts +0 -6
- package/dist/testRelay.d.ts.map +0 -1
- package/dist/testRelay.js +0 -91
- package/dist/testRelay.js.map +0 -1
- package/dist/urls.d.ts +0 -3
- package/dist/urls.d.ts.map +0 -1
- package/dist/urls.js +0 -27
- package/dist/urls.js.map +0 -1
- package/templates/typescript/codegen/generated.hbs +0 -15
- package/templates/typescript/codegen/partials/attio-section.hbs +0 -86
- package/templates/typescript/codegen/partials/datadog-section.hbs +0 -3
- package/templates/typescript/codegen/partials/github-section.hbs +0 -30
- package/templates/typescript/codegen/partials/header.hbs +0 -17
- package/templates/typescript/codegen/partials/hey-reach-section.hbs +0 -3
- package/templates/typescript/codegen/partials/launchdarkly-section.hbs +0 -3
- package/templates/typescript/codegen/partials/linear-section.hbs +0 -5
- package/templates/typescript/codegen/partials/notion-section.hbs +0 -5
- package/templates/typescript/codegen/partials/posthog-section.hbs +0 -15
- package/templates/typescript/codegen/partials/skills-section.hbs +0 -105
- package/templates/typescript/codegen/partials/slack-section.hbs +0 -5
- package/templates/typescript/codegen/partials/tools-section.hbs +0 -94
- package/templates/typescript/codegen/partials/triggers-section.hbs +0 -353
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import { ToolDefinitions } from "terse-types";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { escapeString } from "../moduleHelpers.js";
|
|
4
|
+
import { ATTIO_RESOURCE_METHOD_SPECS, attioMethodParamsTypeName, attioOutputTypeName } from "./attioProjection.js";
|
|
5
|
+
export function buildAttioToolMethods(integrationId, tool) {
|
|
6
|
+
switch (tool.name) {
|
|
7
|
+
case "attio_read_records":
|
|
8
|
+
case "attio_create_record":
|
|
9
|
+
case "attio_update_record":
|
|
10
|
+
case "attio_upsert_record":
|
|
11
|
+
case "attio_delete_record":
|
|
12
|
+
return buildAttioRecordsMethods(integrationId, tool);
|
|
13
|
+
case "attio_read_lists":
|
|
14
|
+
case "attio_create_list":
|
|
15
|
+
case "attio_update_list":
|
|
16
|
+
case "attio_read_list_entries":
|
|
17
|
+
case "attio_add_list_entry":
|
|
18
|
+
case "attio_upsert_list_entry":
|
|
19
|
+
case "attio_update_list_entry":
|
|
20
|
+
case "attio_remove_list_entry":
|
|
21
|
+
return buildAttioListsMethods(integrationId, tool);
|
|
22
|
+
default: {
|
|
23
|
+
const specs = ATTIO_RESOURCE_METHOD_SPECS[tool.name];
|
|
24
|
+
return specs ? buildAttioResourceMethods(integrationId, tool, specs) : null;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function buildAttioRecordsMethods(integrationId, tool) {
|
|
29
|
+
const id = escapeString(integrationId);
|
|
30
|
+
const toolName = tool.name;
|
|
31
|
+
const call = (requestExpr) => `TerseAgent.executeTool<${attioOutputTypeName(toolName)}>("${toolName}", { integrationId: "${id}", request: ${requestExpr} })`;
|
|
32
|
+
const objectSlug = "objectSlug: __normalizeAttioObjectSlug(params.object)";
|
|
33
|
+
switch (toolName) {
|
|
34
|
+
case "attio_read_records":
|
|
35
|
+
return [
|
|
36
|
+
{
|
|
37
|
+
description: attioActionDescription(toolName, "query"),
|
|
38
|
+
generatedSignature: "queryRecords<TObject extends GeneratedAttioObject>(params: AttioQueryRecordsParams<TObject>): Promise<AttioQueryRecordsResult<TObject>>",
|
|
39
|
+
runtimeLines: [
|
|
40
|
+
"queryRecords: <TObject extends GeneratedAttioObject>(params: AttioQueryRecordsParams<TObject>) =>",
|
|
41
|
+
` ${call(`{ action: "query", ${objectSlug}, filter: __serializeAttioFilter(params.filter), limit: params.limit ?? null, offset: params.offset ?? null }`)}.then(result => __enhanceAttioQueryResult(params.object, result)),`
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
description: attioActionDescription(toolName, "search"),
|
|
46
|
+
generatedSignature: "searchRecords<TObject extends GeneratedAttioObject>(params: AttioSearchRecordsParams<TObject>): Promise<AttioSearchRecordsResult>",
|
|
47
|
+
runtimeLines: [
|
|
48
|
+
"searchRecords: <TObject extends GeneratedAttioObject>(params: AttioSearchRecordsParams<TObject>) =>",
|
|
49
|
+
` ${call(`{ action: "search", ${objectSlug}, query: params.query, limit: params.limit ?? null }`)}.then(result => __enhanceAttioSearchResult(result)),`
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
description: attioActionDescription(toolName, "get"),
|
|
54
|
+
generatedSignature: "getRecord<TObject extends GeneratedAttioObject>(params: AttioGetRecordParams<TObject>): Promise<AttioSingleRecordResult<TObject>>",
|
|
55
|
+
runtimeLines: [
|
|
56
|
+
"getRecord: <TObject extends GeneratedAttioObject>(params: AttioGetRecordParams<TObject>) =>",
|
|
57
|
+
` ${call(`{ action: "get", ${objectSlug}, recordId: params.recordId }`)}.then(result => __enhanceAttioSingleRecordResult(params.object, result)),`
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
description: attioActionDescription(toolName, "get_attribute_history"),
|
|
62
|
+
generatedSignature: "getAttributeHistory<TObject extends GeneratedAttioObject, TAttr extends AttioAttributeSlug<TObject>>(params: AttioGetAttributeHistoryParams<TObject> & { attribute: TAttr }): Promise<AttioAttributeHistoryResult<__AttioSingleValue<NonNullable<AttioRecordValuesFor<TObject>[TAttr & keyof AttioRecordValuesFor<TObject>]>>>>",
|
|
63
|
+
runtimeLines: [
|
|
64
|
+
"getAttributeHistory: <TObject extends GeneratedAttioObject, TAttr extends AttioAttributeSlug<TObject>>(params: AttioGetAttributeHistoryParams<TObject> & { attribute: TAttr }) =>",
|
|
65
|
+
` ${call(`{ action: "get_attribute_history", ${objectSlug}, recordId: params.recordId, attributeSlug: params.attribute, limit: params.limit ?? null, offset: params.offset ?? null }`)}.then(result => __enhanceAttioHistoryResult<__AttioSingleValue<NonNullable<AttioRecordValuesFor<TObject>[TAttr & keyof AttioRecordValuesFor<TObject>]>>>(result)),`
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
];
|
|
69
|
+
case "attio_create_record":
|
|
70
|
+
return [
|
|
71
|
+
{
|
|
72
|
+
description: tool.description || undefined,
|
|
73
|
+
generatedSignature: "createRecord<TObject extends GeneratedAttioObject>(params: AttioCreateRecordParams<TObject>): Promise<AttioSingleRecordResult<TObject>>",
|
|
74
|
+
runtimeLines: [
|
|
75
|
+
"createRecord: <TObject extends GeneratedAttioObject>(params: AttioCreateRecordParams<TObject>) =>",
|
|
76
|
+
` ${call(`{ ${objectSlug}, values: JSON.stringify(params.values) }`)}.then(result => __enhanceAttioSingleRecordResult(params.object, result)),`
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
];
|
|
80
|
+
case "attio_update_record":
|
|
81
|
+
return [
|
|
82
|
+
{
|
|
83
|
+
description: tool.description || undefined,
|
|
84
|
+
generatedSignature: "updateRecord<TObject extends GeneratedAttioObject>(params: AttioUpdateRecordParams<TObject>): Promise<AttioSingleRecordResult<TObject>>",
|
|
85
|
+
runtimeLines: [
|
|
86
|
+
"updateRecord: <TObject extends GeneratedAttioObject>(params: AttioUpdateRecordParams<TObject>) =>",
|
|
87
|
+
` ${call(`{ ${objectSlug}, recordId: params.recordId, values: JSON.stringify(params.values), multiselectMode: params.multiselectMode ?? null }`)}.then(result => __enhanceAttioSingleRecordResult(params.object, result)),`
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
];
|
|
91
|
+
case "attio_upsert_record":
|
|
92
|
+
return [
|
|
93
|
+
{
|
|
94
|
+
description: tool.description || undefined,
|
|
95
|
+
generatedSignature: "upsertRecord<TObject extends GeneratedAttioObject>(params: AttioUpsertRecordParams<TObject>): Promise<AttioUpsertRecordResult<TObject>>",
|
|
96
|
+
runtimeLines: [
|
|
97
|
+
"upsertRecord: <TObject extends GeneratedAttioObject>(params: AttioUpsertRecordParams<TObject>) =>",
|
|
98
|
+
` ${call(`{ ${objectSlug}, matchingAttribute: params.matchingAttribute, records: __serializeAttioRecords(params.records) }`)}.then(result => __enhanceAttioUpsertResult(params.object, result)),`
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
];
|
|
102
|
+
case "attio_delete_record":
|
|
103
|
+
return [
|
|
104
|
+
{
|
|
105
|
+
description: tool.description || undefined,
|
|
106
|
+
generatedSignature: "deleteRecord<TObject extends GeneratedAttioObject>(params: AttioDeleteRecordParams<TObject>): Promise<void>",
|
|
107
|
+
runtimeLines: [
|
|
108
|
+
"deleteRecord: <TObject extends GeneratedAttioObject>(params: AttioDeleteRecordParams<TObject>) =>",
|
|
109
|
+
` ${call(`{ ${objectSlug}, recordId: params.recordId }`)}.then(() => undefined),`
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
];
|
|
113
|
+
default:
|
|
114
|
+
return [];
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
// Method TSDoc is single-sourced: single-op tools inherit the tool description, action-mapped
|
|
118
|
+
// methods inherit the zod action literal's description.
|
|
119
|
+
function attioActionDescription(toolName, action) {
|
|
120
|
+
if (!isKnownToolName(toolName))
|
|
121
|
+
return undefined;
|
|
122
|
+
const parsed = attioRequestUnionJsonSchema.safeParse(z.toJSONSchema(ToolDefinitions[toolName].inputSchema));
|
|
123
|
+
if (!parsed.success)
|
|
124
|
+
return undefined;
|
|
125
|
+
const request = parsed.data.properties.request;
|
|
126
|
+
for (const branch of request.oneOf ?? request.anyOf ?? []) {
|
|
127
|
+
const actionBranch = attioActionBranchJsonSchema.safeParse(branch);
|
|
128
|
+
if (actionBranch.success && actionBranch.data.properties.action.const === action) {
|
|
129
|
+
return actionBranch.data.properties.action.description;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return undefined;
|
|
133
|
+
}
|
|
134
|
+
function isKnownToolName(name) {
|
|
135
|
+
return name in ToolDefinitions;
|
|
136
|
+
}
|
|
137
|
+
const attioRequestUnionJsonSchema = z.object({
|
|
138
|
+
properties: z.object({ request: z.object({ oneOf: z.array(z.unknown()).optional(), anyOf: z.array(z.unknown()).optional() }) })
|
|
139
|
+
});
|
|
140
|
+
const attioActionBranchJsonSchema = z.object({
|
|
141
|
+
properties: z.object({ action: z.object({ const: z.string(), description: z.string().optional() }) })
|
|
142
|
+
});
|
|
143
|
+
// Each method narrows the wire result to its action's payload at runtime: singles unwrap to the bare
|
|
144
|
+
// entity (throwing if absent), lists rebuild a { items, count, nextCursor? } wrapper, deletes resolve void.
|
|
145
|
+
function attioResultParts(toolName, result) {
|
|
146
|
+
const base = attioOutputTypeName(toolName);
|
|
147
|
+
switch (result.kind) {
|
|
148
|
+
case "single":
|
|
149
|
+
return {
|
|
150
|
+
resultType: `NonNullable<${base}["${result.key}"]>`,
|
|
151
|
+
thenExpr: `.then(result => __requireAttioPayload(result.${result.key}, "${result.what ?? result.key}"))`
|
|
152
|
+
};
|
|
153
|
+
case "singleWithCursor":
|
|
154
|
+
return {
|
|
155
|
+
resultType: `{ ${result.key}: NonNullable<${base}["${result.key}"]>; nextCursor: string | null }`,
|
|
156
|
+
thenExpr: `.then(result => ({ ${result.key}: __requireAttioPayload(result.${result.key}, "${result.what ?? result.key}"), nextCursor: result.nextCursor ?? null }))`
|
|
157
|
+
};
|
|
158
|
+
case "list": {
|
|
159
|
+
const cursorType = result.cursor ? "; nextCursor: string | null" : "";
|
|
160
|
+
const cursorValue = result.cursor ? ", nextCursor: result.nextCursor ?? null" : "";
|
|
161
|
+
return {
|
|
162
|
+
resultType: `{ ${result.key}: NonNullable<${base}["${result.key}"]>; count: number${cursorType} }`,
|
|
163
|
+
thenExpr: `.then(result => ({ ${result.key}: result.${result.key} ?? [], count: (result.${result.key} ?? []).length${cursorValue} }))`
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
case "void":
|
|
167
|
+
return { resultType: "void", thenExpr: ".then(() => undefined)" };
|
|
168
|
+
default:
|
|
169
|
+
throw result;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
function buildAttioResourceMethods(integrationId, tool, specs) {
|
|
173
|
+
const id = escapeString(integrationId);
|
|
174
|
+
const toolName = tool.name;
|
|
175
|
+
return specs.map(spec => {
|
|
176
|
+
const paramsType = attioMethodParamsTypeName(spec.methodName);
|
|
177
|
+
const requestExpr = spec.action ? `{ action: "${spec.action}", ...params }` : "params";
|
|
178
|
+
const { resultType, thenExpr } = attioResultParts(toolName, spec.result);
|
|
179
|
+
return {
|
|
180
|
+
description: spec.action ? attioActionDescription(toolName, spec.action) : tool.description || undefined,
|
|
181
|
+
generatedSignature: `${spec.methodName}(${spec.emptyParams ? `params?: ${paramsType}` : `params: ${paramsType}`}): Promise<${resultType}>`,
|
|
182
|
+
runtimeLines: [
|
|
183
|
+
`${spec.methodName}: (params: ${paramsType}${spec.emptyParams ? " = {}" : ""}) =>`,
|
|
184
|
+
` TerseAgent.executeTool<${attioOutputTypeName(toolName)}>("${toolName}", { integrationId: "${id}", request: ${requestExpr} })${thenExpr},`
|
|
185
|
+
]
|
|
186
|
+
};
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
function buildAttioListsMethods(integrationId, tool) {
|
|
190
|
+
const id = escapeString(integrationId);
|
|
191
|
+
const toolName = tool.name;
|
|
192
|
+
const call = (requestExpr) => `TerseAgent.executeTool<${attioOutputTypeName(toolName)}>("${toolName}", { integrationId: "${id}", request: ${requestExpr} })`;
|
|
193
|
+
const listKey = "listIdOrSlug: __normalizeAttioObjectSlug(params.list)";
|
|
194
|
+
const listParam = "list: GeneratedAttioList | string";
|
|
195
|
+
switch (toolName) {
|
|
196
|
+
case "attio_read_lists":
|
|
197
|
+
return [
|
|
198
|
+
{
|
|
199
|
+
description: attioActionDescription(toolName, "list"),
|
|
200
|
+
generatedSignature: 'listLists(): Promise<{ lists: NonNullable<AttioListsResult["lists"]>; count: number }>',
|
|
201
|
+
runtimeLines: ["listLists: () =>", ` ${call('{ action: "list" }')}.then(result => ({ lists: result.lists ?? [], count: (result.lists ?? []).length })),`]
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
description: attioActionDescription(toolName, "get"),
|
|
205
|
+
generatedSignature: `getList(params: { ${listParam} }): Promise<NonNullable<AttioListsResult["list"]>>`,
|
|
206
|
+
runtimeLines: [`getList: (params: { ${listParam} }) =>`, ` ${call(`{ action: "get", ${listKey} }`)}.then(result => __requireAttioPayload(result.list, "list")),`]
|
|
207
|
+
}
|
|
208
|
+
];
|
|
209
|
+
case "attio_create_list":
|
|
210
|
+
return [
|
|
211
|
+
{
|
|
212
|
+
description: tool.description || undefined,
|
|
213
|
+
generatedSignature: `createList(params: ${attioMethodParamsTypeName("createList")}): Promise<NonNullable<AttioListsResult["list"]>>`,
|
|
214
|
+
runtimeLines: [`createList: (params: ${attioMethodParamsTypeName("createList")}) =>`, ` ${call("params")}.then(result => __requireAttioPayload(result.list, "list")),`]
|
|
215
|
+
}
|
|
216
|
+
];
|
|
217
|
+
case "attio_update_list":
|
|
218
|
+
return [
|
|
219
|
+
{
|
|
220
|
+
description: tool.description || undefined,
|
|
221
|
+
generatedSignature: `updateList(params: { ${listParam}; name: string }): Promise<NonNullable<AttioListsResult["list"]>>`,
|
|
222
|
+
runtimeLines: [
|
|
223
|
+
`updateList: (params: { ${listParam}; name: string }) =>`,
|
|
224
|
+
` ${call(`{ ${listKey}, name: params.name }`)}.then(result => __requireAttioPayload(result.list, "list")),`
|
|
225
|
+
]
|
|
226
|
+
}
|
|
227
|
+
];
|
|
228
|
+
case "attio_read_list_entries":
|
|
229
|
+
return [
|
|
230
|
+
{
|
|
231
|
+
description: attioActionDescription(toolName, "query_entries"),
|
|
232
|
+
generatedSignature: "queryListEntries<TList extends GeneratedAttioList | string>(params: { list: TList; filter?: AttioEntryFilterFor<TList> | null; parentRecordId?: string | null; parentObjectSlug?: string; limit?: number | null; offset?: number | null }): Promise<AttioListEntriesResult<TList>>",
|
|
233
|
+
runtimeLines: [
|
|
234
|
+
"queryListEntries: <TList extends GeneratedAttioList | string>(params: { list: TList; filter?: AttioEntryFilterFor<TList> | null; parentRecordId?: string | null; parentObjectSlug?: string; limit?: number | null; offset?: number | null }) =>",
|
|
235
|
+
` ${call('{ action: "query_entries", listIdOrSlug: __normalizeAttioObjectSlug(params.list), filter: __serializeAttioFilter(params.filter), parentRecordId: params.parentRecordId ?? null, parentObjectSlug: params.parentRecordId ? __requireAttioListParentObject(params.list, params.parentObjectSlug) : null, limit: params.limit ?? null, offset: params.offset ?? null }')}.then(result => __enhanceAttioListEntriesResult(params.list, result)),`
|
|
236
|
+
]
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
description: attioActionDescription(toolName, "get_entry"),
|
|
240
|
+
generatedSignature: "getListEntry<TList extends GeneratedAttioList | string>(params: { list: TList; entryId: string }): Promise<AttioListEntryResult<TList>>",
|
|
241
|
+
runtimeLines: [
|
|
242
|
+
"getListEntry: <TList extends GeneratedAttioList | string>(params: { list: TList; entryId: string }) =>",
|
|
243
|
+
` ${call('{ action: "get_entry", listIdOrSlug: __normalizeAttioObjectSlug(params.list), entryId: params.entryId }')}.then(result => __enhanceAttioListEntryResult(params.list, result)),`
|
|
244
|
+
]
|
|
245
|
+
}
|
|
246
|
+
];
|
|
247
|
+
case "attio_add_list_entry":
|
|
248
|
+
return [
|
|
249
|
+
{
|
|
250
|
+
description: tool.description || undefined,
|
|
251
|
+
generatedSignature: "addListEntry<TList extends GeneratedAttioList | string>(params: { list: TList; parentRecordId: string; parentObjectSlug?: string; entryValues?: AttioEntryValuesFor<TList> | null }): Promise<AttioListEntryResult<TList>>",
|
|
252
|
+
runtimeLines: [
|
|
253
|
+
"addListEntry: <TList extends GeneratedAttioList | string>(params: { list: TList; parentRecordId: string; parentObjectSlug?: string; entryValues?: AttioEntryValuesFor<TList> | null }) =>",
|
|
254
|
+
` ${call("{ listIdOrSlug: __normalizeAttioObjectSlug(params.list), parentObjectSlug: __requireAttioListParentObject(params.list, params.parentObjectSlug), parentRecordId: params.parentRecordId, entryValues: __serializeAttioValues(params.entryValues) }")}.then(result => __enhanceAttioListEntryResult(params.list, result)),`
|
|
255
|
+
]
|
|
256
|
+
}
|
|
257
|
+
];
|
|
258
|
+
case "attio_upsert_list_entry":
|
|
259
|
+
return [
|
|
260
|
+
{
|
|
261
|
+
description: tool.description || undefined,
|
|
262
|
+
generatedSignature: "upsertListEntry<TList extends GeneratedAttioList | string>(params: { list: TList; parentRecordId: string; parentObjectSlug?: string; entryValues?: AttioEntryValuesFor<TList> | null }): Promise<AttioListEntryResult<TList>>",
|
|
263
|
+
runtimeLines: [
|
|
264
|
+
"upsertListEntry: <TList extends GeneratedAttioList | string>(params: { list: TList; parentRecordId: string; parentObjectSlug?: string; entryValues?: AttioEntryValuesFor<TList> | null }) =>",
|
|
265
|
+
` ${call("{ listIdOrSlug: __normalizeAttioObjectSlug(params.list), parentObjectSlug: __requireAttioListParentObject(params.list, params.parentObjectSlug), parentRecordId: params.parentRecordId, entryValues: __serializeAttioValues(params.entryValues) }")}.then(result => __enhanceAttioListEntryResult(params.list, result)),`
|
|
266
|
+
]
|
|
267
|
+
}
|
|
268
|
+
];
|
|
269
|
+
case "attio_update_list_entry":
|
|
270
|
+
return [
|
|
271
|
+
{
|
|
272
|
+
description: tool.description || undefined,
|
|
273
|
+
generatedSignature: 'updateListEntry<TList extends GeneratedAttioList | string>(params: { list: TList; entryId: string; entryValues: Partial<AttioEntryValuesFor<TList>>; multiselectMode?: "overwrite" | "append" | null }): Promise<AttioListEntryResult<TList>>',
|
|
274
|
+
runtimeLines: [
|
|
275
|
+
'updateListEntry: <TList extends GeneratedAttioList | string>(params: { list: TList; entryId: string; entryValues: Partial<AttioEntryValuesFor<TList>>; multiselectMode?: "overwrite" | "append" | null }) =>',
|
|
276
|
+
` ${call("{ listIdOrSlug: __normalizeAttioObjectSlug(params.list), entryId: params.entryId, entryValues: __serializeAttioValues(params.entryValues), multiselectMode: params.multiselectMode ?? null }")}.then(result => __enhanceAttioListEntryResult(params.list, result)),`
|
|
277
|
+
]
|
|
278
|
+
}
|
|
279
|
+
];
|
|
280
|
+
case "attio_remove_list_entry":
|
|
281
|
+
return [
|
|
282
|
+
{
|
|
283
|
+
description: tool.description || undefined,
|
|
284
|
+
generatedSignature: `removeListEntry(params: { ${listParam}; entryId: string }): Promise<void>`,
|
|
285
|
+
runtimeLines: [
|
|
286
|
+
`removeListEntry: (params: { ${listParam}; entryId: string }) =>`,
|
|
287
|
+
` ${call("{ listIdOrSlug: __normalizeAttioObjectSlug(params.list), entryId: params.entryId }")}.then(() => undefined),`
|
|
288
|
+
]
|
|
289
|
+
}
|
|
290
|
+
];
|
|
291
|
+
default:
|
|
292
|
+
return [];
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
//# sourceMappingURL=attioToolMethods.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attioToolMethods.js","sourceRoot":"","sources":["../../../../../src/providers/typescript/modules/attio/attioToolMethods.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAElD,OAAO,EAAE,2BAA2B,EAAsD,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAEtK,MAAM,UAAU,qBAAqB,CAAC,aAAqB,EAAE,IAAoB;IAC7E,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;QAChB,KAAK,oBAAoB,CAAC;QAC1B,KAAK,qBAAqB,CAAC;QAC3B,KAAK,qBAAqB,CAAC;QAC3B,KAAK,qBAAqB,CAAC;QAC3B,KAAK,qBAAqB;YACtB,OAAO,wBAAwB,CAAC,aAAa,EAAE,IAAI,CAAC,CAAA;QACxD,KAAK,kBAAkB,CAAC;QACxB,KAAK,mBAAmB,CAAC;QACzB,KAAK,mBAAmB,CAAC;QACzB,KAAK,yBAAyB,CAAC;QAC/B,KAAK,sBAAsB,CAAC;QAC5B,KAAK,yBAAyB,CAAC;QAC/B,KAAK,yBAAyB,CAAC;QAC/B,KAAK,yBAAyB;YAC1B,OAAO,sBAAsB,CAAC,aAAa,EAAE,IAAI,CAAC,CAAA;QACtD,OAAO,CAAC,CAAC,CAAC;YACN,MAAM,KAAK,GAAG,2BAA2B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YACpD,OAAO,KAAK,CAAC,CAAC,CAAC,yBAAyB,CAAC,aAAa,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;QAC/E,CAAC;IACL,CAAC;AACL,CAAC;AAED,SAAS,wBAAwB,CAAC,aAAqB,EAAE,IAAoB;IACzE,MAAM,EAAE,GAAG,YAAY,CAAC,aAAa,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AA;QACL,KAAK,yBAAyB;YAC1B,OAAO;gBACH;oBACI,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,SAAS;oBAC1C,kBAAkB,EAAE,6BAA6B,SAAS,qCAAqC;oBAC/F,YAAY,EAAE;wBACV,+BAA+B,SAAS,yBAAyB;wBACjE,OAAO,IAAI,CAAC,oFAAoF,CAAC,yBAAyB;qBAC7H;iBACJ;aACJ,CAAA;QACL;YACI,OAAO,EAAE,CAAA;IACjB,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface AttioAttributeData {
|
|
2
|
+
api_slug?: string;
|
|
3
|
+
title?: string;
|
|
4
|
+
type?: string;
|
|
5
|
+
is_required?: boolean;
|
|
6
|
+
is_unique?: boolean;
|
|
7
|
+
is_multiselect?: boolean;
|
|
8
|
+
options?: string[];
|
|
9
|
+
}
|
|
10
|
+
export interface AttioObjectData {
|
|
11
|
+
id: {
|
|
12
|
+
workspace_id: string;
|
|
13
|
+
object_id: string;
|
|
14
|
+
};
|
|
15
|
+
api_slug: string;
|
|
16
|
+
singular_noun: string;
|
|
17
|
+
plural_noun?: string;
|
|
18
|
+
attributes?: AttioAttributeData[];
|
|
19
|
+
}
|
|
20
|
+
export interface AttioListData {
|
|
21
|
+
id: {
|
|
22
|
+
workspace_id?: string;
|
|
23
|
+
list_id: string;
|
|
24
|
+
};
|
|
25
|
+
api_slug: string;
|
|
26
|
+
name: string;
|
|
27
|
+
parent_object?: string[] | string;
|
|
28
|
+
attributes?: AttioAttributeData[];
|
|
29
|
+
}
|
|
30
|
+
export interface AttioInstanceData {
|
|
31
|
+
id: string;
|
|
32
|
+
displayName: string;
|
|
33
|
+
objects: AttioObjectData[];
|
|
34
|
+
lists: AttioListData[];
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=attioTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attioTypes.d.ts","sourceRoot":"","sources":["../../../../../src/providers/typescript/modules/attio/attioTypes.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CACrB;AAED,MAAM,WAAW,eAAe;IAC5B,EAAE,EAAE;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/C,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,kBAAkB,EAAE,CAAA;CACpC;AAED,MAAM,WAAW,aAAa;IAC1B,EAAE,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;IAC9C,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAA;IACjC,UAAU,CAAC,EAAE,kBAAkB,EAAE,CAAA;CACpC;AAED,MAAM,WAAW,iBAAiB;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,eAAe,EAAE,CAAA;IAC1B,KAAK,EAAE,aAAa,EAAE,CAAA;CACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attioTypes.js","sourceRoot":"","sources":["../../../../../src/providers/typescript/modules/attio/attioTypes.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IntegrationType } from "terse-types";
|
|
2
|
+
import { IntegrationModule, type ModuleRenderInput } from "../IntegrationModule.js";
|
|
3
|
+
import { type ResourceClassContext } from "../moduleHelpers.js";
|
|
4
|
+
export declare class DatadogModule extends IntegrationModule<DatadogInstanceData, DatadogSectionContext> {
|
|
5
|
+
readonly type = IntegrationType.DATADOG;
|
|
6
|
+
readonly summaryLabel = "Datadog";
|
|
7
|
+
protected readonly sectionImports: string[];
|
|
8
|
+
fetchInstances(apiKey: string): Promise<DatadogInstanceData[]>;
|
|
9
|
+
instanceId(instance: DatadogInstanceData): string;
|
|
10
|
+
protected get skillsAggregateLines(): readonly string[];
|
|
11
|
+
protected prepareSection(input: ModuleRenderInput<DatadogInstanceData>): DatadogSectionContext;
|
|
12
|
+
}
|
|
13
|
+
export interface DatadogInstanceData {
|
|
14
|
+
id: string;
|
|
15
|
+
displayName: string;
|
|
16
|
+
indexes: Array<{
|
|
17
|
+
name: string;
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
20
|
+
export interface DatadogSectionContext {
|
|
21
|
+
id: string;
|
|
22
|
+
skillToolType: string;
|
|
23
|
+
indexClass: ResourceClassContext;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=DatadogModule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatadogModule.d.ts","sourceRoot":"","sources":["../../../../../src/providers/typescript/modules/datadog/DatadogModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,eAAe,EAAE,MAAM,aAAa,CAAA;AAGxD,OAAO,EAAE,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AACnF,OAAO,EAAE,KAAK,oBAAoB,EAAiD,MAAM,qBAAqB,CAAA;AAE9G,qBAAa,aAAc,SAAQ,iBAAiB,CAAC,mBAAmB,EAAE,qBAAqB,CAAC;IAC5F,QAAQ,CAAC,IAAI,2BAA0B;IACvC,QAAQ,CAAC,YAAY,aAAY;IACjC,SAAS,CAAC,QAAQ,CAAC,cAAc,WAAkC;IAE7D,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC;IAYpE,UAAU,CAAC,QAAQ,EAAE,mBAAmB,GAAG,MAAM;IAIjD,SAAS,KAAK,oBAAoB,IAAI,SAAS,MAAM,EAAE,CAEtD;IAED,SAAS,CAAC,cAAc,CAAC,KAAK,EAAE,iBAAiB,CAAC,mBAAmB,CAAC,GAAG,qBAAqB;CAQjG;AAED,MAAM,WAAW,mBAAmB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CACnC;AAED,MAAM,WAAW,qBAAqB;IAClC,EAAE,EAAE,MAAM,CAAA;IACV,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,EAAE,oBAAoB,CAAA;CACnC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ApiRoutes, IntegrationType } from "terse-types";
|
|
2
|
+
import { fetchWithAuth } from "../../../../api.js";
|
|
3
|
+
import { IntegrationModule } from "../IntegrationModule.js";
|
|
4
|
+
import { buildResourceClassContext, buildSkillToolType } from "../moduleHelpers.js";
|
|
5
|
+
export class DatadogModule extends IntegrationModule {
|
|
6
|
+
type = IntegrationType.DATADOG;
|
|
7
|
+
summaryLabel = "Datadog";
|
|
8
|
+
sectionImports = ["DatadogConfig", "TypedSkill"];
|
|
9
|
+
async fetchInstances(apiKey) {
|
|
10
|
+
const instances = await fetchWithAuth(ApiRoutes.DATADOG.INTEGRATIONS, apiKey);
|
|
11
|
+
return Promise.all(instances.map(async (inst) => {
|
|
12
|
+
const resp = await fetchWithAuth(`${ApiRoutes.DATADOG.INDEXES}?integrationId=${encodeURIComponent(inst.id)}`, apiKey).catch(() => ({
|
|
13
|
+
indexes: []
|
|
14
|
+
}));
|
|
15
|
+
return { id: inst.id, displayName: inst.region || inst.id, indexes: resp.indexes || [] };
|
|
16
|
+
}));
|
|
17
|
+
}
|
|
18
|
+
instanceId(instance) {
|
|
19
|
+
return instance.id;
|
|
20
|
+
}
|
|
21
|
+
get skillsAggregateLines() {
|
|
22
|
+
return [" /** Datadog — search and analyze logs, optionally scoped to specific indexes */", " datadog: datadogSkill,"];
|
|
23
|
+
}
|
|
24
|
+
prepareSection(input) {
|
|
25
|
+
const inst = this.requireInstance(input);
|
|
26
|
+
return {
|
|
27
|
+
id: inst.id,
|
|
28
|
+
skillToolType: buildSkillToolType(input.tools),
|
|
29
|
+
indexClass: buildResourceClassContext("DatadogIndex", [{ classField: "name", type: "string", sourceField: "name" }], "name", inst.indexes)
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=DatadogModule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatadogModule.js","sourceRoot":"","sources":["../../../../../src/providers/typescript/modules/datadog/DatadogModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,iBAAiB,EAA0B,MAAM,yBAAyB,CAAA;AACnF,OAAO,EAA6B,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAE9G,MAAM,OAAO,aAAc,SAAQ,iBAA6D;IACnF,IAAI,GAAG,eAAe,CAAC,OAAO,CAAA;IAC9B,YAAY,GAAG,SAAS,CAAA;IACd,cAAc,GAAG,CAAC,eAAe,EAAE,YAAY,CAAC,CAAA;IAEnE,KAAK,CAAC,cAAc,CAAC,MAAc;QAC/B,MAAM,SAAS,GAAG,MAAM,aAAa,CAAuB,SAAS,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,CAAA;QACnG,OAAO,OAAO,CAAC,GAAG,CACd,SAAS,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,EAAgC,EAAE;YACvD,MAAM,IAAI,GAAG,MAAM,aAAa,CAAuC,GAAG,SAAS,CAAC,OAAO,CAAC,OAAO,kBAAkB,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;gBACrK,OAAO,EAAE,EAAE;aACd,CAAC,CAAC,CAAA;YACH,OAAO,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,WAAW,EAAE,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,EAAE,EAAE,CAAA;QAC5F,CAAC,CAAC,CACL,CAAA;IACL,CAAC;IAED,UAAU,CAAC,QAA6B;QACpC,OAAO,QAAQ,CAAC,EAAE,CAAA;IACtB,CAAC;IAED,IAAc,oBAAoB;QAC9B,OAAO,CAAC,qFAAqF,EAAE,4BAA4B,CAAC,CAAA;IAChI,CAAC;IAES,cAAc,CAAC,KAA6C;QAClE,MAAM,IAAI,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAA;QACxC,OAAO;YACH,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,aAAa,EAAE,kBAAkB,CAAC,KAAK,CAAC,KAAK,CAAC;YAC9C,UAAU,EAAE,yBAAyB,CAAC,cAAc,EAAE,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC;SAC7I,CAAA;IACL,CAAC;CACJ"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { GithubIntegration, ToolDefinition } from "terse-types";
|
|
2
|
+
import { IntegrationType } from "terse-types";
|
|
3
|
+
import { IntegrationModule, type ModuleRenderInput, type ToolFileContext } from "../IntegrationModule.js";
|
|
4
|
+
export declare class GithubModule extends IntegrationModule<GitHubInstanceData, GitHubSectionContext> {
|
|
5
|
+
readonly type = IntegrationType.GITHUB;
|
|
6
|
+
readonly summaryLabel = "GitHub";
|
|
7
|
+
protected readonly sectionImports: string[];
|
|
8
|
+
fetchInstances(apiKey: string): Promise<GitHubInstanceData[]>;
|
|
9
|
+
instanceId(instance: GitHubInstanceData): string;
|
|
10
|
+
protected get triggersAggregateLines(): readonly string[];
|
|
11
|
+
protected get skillsAggregateLines(): readonly string[];
|
|
12
|
+
protected prepareSection(input: ModuleRenderInput<GitHubInstanceData>): GitHubSectionContext;
|
|
13
|
+
protected normalizeParamsExpression(tool: ToolDefinition): string;
|
|
14
|
+
protected extraTemplateContext(input: ModuleRenderInput<GitHubInstanceData>, toolFile: ToolFileContext | undefined): Record<string, unknown>;
|
|
15
|
+
}
|
|
16
|
+
interface GitHubRepo {
|
|
17
|
+
id: number;
|
|
18
|
+
name: string;
|
|
19
|
+
owner: string;
|
|
20
|
+
fullName?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface GitHubInstanceData {
|
|
23
|
+
integration: GithubIntegration;
|
|
24
|
+
repositories: GitHubRepo[];
|
|
25
|
+
}
|
|
26
|
+
export interface GitHubSectionContext {
|
|
27
|
+
id: string;
|
|
28
|
+
skillToolType: string;
|
|
29
|
+
owners: Array<{
|
|
30
|
+
name: string;
|
|
31
|
+
staticName: string;
|
|
32
|
+
}>;
|
|
33
|
+
repoGroups: Array<{
|
|
34
|
+
ownerStaticName: string;
|
|
35
|
+
repos: Array<{
|
|
36
|
+
id: number;
|
|
37
|
+
name: string;
|
|
38
|
+
fullName: string;
|
|
39
|
+
staticName: string;
|
|
40
|
+
}>;
|
|
41
|
+
}>;
|
|
42
|
+
}
|
|
43
|
+
export {};
|
|
44
|
+
//# sourceMappingURL=GithubModule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GithubModule.d.ts","sourceRoot":"","sources":["../../../../../src/providers/typescript/modules/github/Github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AW,oBAAoB;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACnD,UAAU,EAAE,KAAK,CAAC;QACd,eAAe,EAAE,MAAM,CAAA;QACvB,KAAK,EAAE,KAAK,CAAC;YACT,EAAE,EAAE,MAAM,CAAA;YACV,IAAI,EAAE,MAAM,CAAA;YACZ,QAAQ,EAAE,MAAM,CAAA;YAChB,UAAU,EAAE,MAAM,CAAA;SACrB,CAAC,CAAA;KACL,CAAC,CAAA;CACL"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { ApiRoutes, IntegrationType } from "terse-types";
|
|
2
|
+
import { fetchWithAuth } from "../../../../api.js";
|
|
3
|
+
import { IntegrationModule } from "../IntegrationModule.js";
|
|
4
|
+
import { buildSkillToolType, toGeneratedIdentifier } from "../moduleHelpers.js";
|
|
5
|
+
export class GithubModule extends IntegrationModule {
|
|
6
|
+
type = IntegrationType.GITHUB;
|
|
7
|
+
summaryLabel = "GitHub";
|
|
8
|
+
sectionImports = ["GitHubConfig", "GitHubEventType", "TypedTrigger", "TypedSkill"];
|
|
9
|
+
async fetchInstances(apiKey) {
|
|
10
|
+
const instances = await fetchWithAuth(ApiRoutes.GITHUB.INTEGRATIONS, apiKey);
|
|
11
|
+
return Promise.all(instances.map(async (inst) => {
|
|
12
|
+
const data = await fetchWithAuth(`${ApiRoutes.GITHUB.GET_REPOSITORIES_FOR_INTEGRATION}?installation_id=${encodeURIComponent(inst.installation_id)}`, apiKey).catch(() => ({ repositories: [] }));
|
|
13
|
+
return { integration: inst, repositories: data.repositories || [] };
|
|
14
|
+
}));
|
|
15
|
+
}
|
|
16
|
+
instanceId(instance) {
|
|
17
|
+
return instance.integration.id;
|
|
18
|
+
}
|
|
19
|
+
get triggersAggregateLines() {
|
|
20
|
+
return [" github: githubTriggers,"];
|
|
21
|
+
}
|
|
22
|
+
get skillsAggregateLines() {
|
|
23
|
+
return [" /** GitHub — read code and pull requests from the given repositories */", " github: githubSkill,"];
|
|
24
|
+
}
|
|
25
|
+
prepareSection(input) {
|
|
26
|
+
const inst = this.requireInstance(input);
|
|
27
|
+
const skillToolType = buildSkillToolType(input.tools);
|
|
28
|
+
const repositoriesWithFullName = inst.repositories.map(repo => {
|
|
29
|
+
const owner = repo.owner || "UnknownOwner";
|
|
30
|
+
const fullName = repo.owner && repo.name ? `${repo.owner}/${repo.name}` : repo.name;
|
|
31
|
+
return { ...repo, owner, fullName };
|
|
32
|
+
});
|
|
33
|
+
const ownerEntries = new Map();
|
|
34
|
+
const usedOwnerNames = new Set();
|
|
35
|
+
for (const repo of repositoriesWithFullName) {
|
|
36
|
+
if (!ownerEntries.has(repo.owner)) {
|
|
37
|
+
let ownerStaticName = toGeneratedIdentifier(repo.owner, "UnknownOwner");
|
|
38
|
+
while (usedOwnerNames.has(ownerStaticName))
|
|
39
|
+
ownerStaticName += "_";
|
|
40
|
+
usedOwnerNames.add(ownerStaticName);
|
|
41
|
+
ownerEntries.set(repo.owner, { staticName: ownerStaticName, repos: [] });
|
|
42
|
+
}
|
|
43
|
+
ownerEntries.get(repo.owner).repos.push(repo);
|
|
44
|
+
}
|
|
45
|
+
const owners = Array.from(ownerEntries.entries()).map(([name, data]) => ({
|
|
46
|
+
name,
|
|
47
|
+
staticName: data.staticName
|
|
48
|
+
}));
|
|
49
|
+
const repoGroups = Array.from(ownerEntries.values()).map(group => {
|
|
50
|
+
const usedRepoNames = new Set();
|
|
51
|
+
return {
|
|
52
|
+
ownerStaticName: group.staticName,
|
|
53
|
+
repos: group.repos.map(repo => {
|
|
54
|
+
let staticName = toGeneratedIdentifier(repo.name, "Repos");
|
|
55
|
+
while (usedRepoNames.has(staticName))
|
|
56
|
+
staticName += "_";
|
|
57
|
+
usedRepoNames.add(staticName);
|
|
58
|
+
return {
|
|
59
|
+
id: repo.id,
|
|
60
|
+
name: repo.name,
|
|
61
|
+
fullName: repo.fullName,
|
|
62
|
+
staticName
|
|
63
|
+
};
|
|
64
|
+
})
|
|
65
|
+
};
|
|
66
|
+
});
|
|
67
|
+
return {
|
|
68
|
+
id: inst.integration.id,
|
|
69
|
+
skillToolType,
|
|
70
|
+
owners,
|
|
71
|
+
repoGroups
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
normalizeParamsExpression(tool) {
|
|
75
|
+
switch (tool.name) {
|
|
76
|
+
case "readGitHubFile":
|
|
77
|
+
case "listGitHubPullRequests":
|
|
78
|
+
case "listGitHubDirectory":
|
|
79
|
+
case "listGitHubCommits":
|
|
80
|
+
case "summarizeGitHubPullRequestDiff":
|
|
81
|
+
return "{ ...params, repository: __normalizeGitHubRepos((params).repository) }";
|
|
82
|
+
case "searchGitHubCode":
|
|
83
|
+
case "grepGitHubCode":
|
|
84
|
+
return "{ ...params, repositoryNames: __normalizeGitHubReposNames((params).repositoryNames) }";
|
|
85
|
+
default:
|
|
86
|
+
return "params";
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
extraTemplateContext(input, toolFile) {
|
|
90
|
+
return { repoMappings: toolFile ? buildRepoMappings(input.instances) : [] };
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function buildRepoMappings(instances) {
|
|
94
|
+
const githubRepoFullNames = Array.from(new Set(instances.flatMap(inst => inst.repositories.map(repo => (repo.owner && repo.name ? `${repo.owner}/${repo.name}` : repo.name).trim()).filter(Boolean))));
|
|
95
|
+
const nameToFullName = new Map();
|
|
96
|
+
const ambiguousNames = new Set();
|
|
97
|
+
for (const fullName of githubRepoFullNames) {
|
|
98
|
+
const [, repoName = fullName] = fullName.split("/", 2);
|
|
99
|
+
if (nameToFullName.has(repoName) && nameToFullName.get(repoName) !== fullName) {
|
|
100
|
+
ambiguousNames.add(repoName);
|
|
101
|
+
nameToFullName.delete(repoName);
|
|
102
|
+
}
|
|
103
|
+
else if (!ambiguousNames.has(repoName)) {
|
|
104
|
+
nameToFullName.set(repoName, fullName);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return Array.from(nameToFullName.entries())
|
|
108
|
+
.sort((a, b) => a[0].localeCompare(b[0]))
|
|
109
|
+
.map(([name, fullName]) => ({ name, fullName }));
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=GithubModule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GithubModule.js","sourceRoot":"","sources":["../../../../../src/providers/typescript/modules/github/GithubModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,iBAAiB,EAAgD,MAAM,yBAAyB,CAAA;AACzG,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAE/E,MAAM,OAAO,YAAa,SAAQ,iBAA2D;IAChF,IAAI,GAAG,eAAe,CAAC,MAAM,CAAA;IAC7B,YAAY,GAAG,QAAQ,CAAA;IACb,cAAc,GAAG,CAAC,cAAc,EAAE,iBAAiB,EAAE,cAAc,EAAE,YAAY,CAAC,CAAA;IAErG,KAAK,CAAC,cAAc,CAAC,MAAc;QAC/B,MAAM,SAAS,GAAG,MAAM,aAAa,CAAsB,SAAS,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAA;QACjG,OAAO,OAAO,CAAC,GAAG,CACd,SAAS,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,EAA+B,EAAE;YACtD,MAAM,IAAI,GAAG,MAAM,aAAa,CAC5B,GAAG,SAAS,CAAC,MAAM,CAAC,gCAAgC,oBAAoB,kBAAkB,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,EAClH,MAAM,CACT,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,YAAY,EAAE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AAC,CACjK,CAAA;IAED,MAAM,cAAc,GAAG,IAAI,GAAG,EAAkB,CAAA;IAChD,MAAM,cAAc,GAAG,IAAI,GAAG,EAAU,CAAA;IACxC,KAAK,MAAM,QAAQ,IAAI,mBAAmB,EAAE,CAAC;QACzC,MAAM,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;QACtD,IAAI,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,QAAQ,EAAE,CAAC;YAC5E,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;YAC5B,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;QACnC,CAAC;aAAM,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;YACvC,cAAc,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;QAC1C,CAAC;IACL,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;SACtC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SACxC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAA;AACxD,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IntegrationType } from "terse-types";
|
|
2
|
+
import { type IntegrationInstanceData, IntegrationModule, type ModuleRenderInput } from "../IntegrationModule.js";
|
|
3
|
+
export declare class GmailModule extends IntegrationModule<IntegrationInstanceData, GmailSectionContext> {
|
|
4
|
+
readonly type = IntegrationType.GMAIL;
|
|
5
|
+
readonly summaryLabel = "Gmail";
|
|
6
|
+
protected readonly sectionImports: string[];
|
|
7
|
+
fetchInstances(apiKey: string): Promise<IntegrationInstanceData[]>;
|
|
8
|
+
instanceId(instance: IntegrationInstanceData): string;
|
|
9
|
+
protected get triggersAggregateLines(): readonly string[];
|
|
10
|
+
protected get skillsAggregateLines(): readonly string[];
|
|
11
|
+
protected prepareSection(input: ModuleRenderInput<IntegrationInstanceData>): GmailSectionContext;
|
|
12
|
+
}
|
|
13
|
+
export interface GmailSectionContext {
|
|
14
|
+
id: string;
|
|
15
|
+
skillToolType: string;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=GmailModule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GmailModule.d.ts","sourceRoot":"","sources":["../../../../../src/providers/typescript/modules/gmail/GmailModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,eAAe,EAAE,MAAM,aAAa,CAAA;AAGxD,OAAO,EAAE,KAAK,uBAAuB,EAAE,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAGjH,qBAAa,WAAY,SAAQ,iBAAiB,CAAC,uBAAuB,EAAE,mBAAmB,CAAC;IAC5F,QAAQ,CAAC,IAAI,yBAAwB;IACrC,QAAQ,CAAC,YAAY,WAAU;IAC/B,SAAS,CAAC,QAAQ,CAAC,cAAc,WAAiH;IAE5I,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,EAAE,CAAC;IAKxE,UAAU,CAAC,QAAQ,EAAE,uBAAuB,GAAG,MAAM;IAIrD,SAAS,KAAK,sBAAsB,IAAI,SAAS,MAAM,EAAE,CAExD;IAED,SAAS,KAAK,oBAAoB,IAAI,SAAS,MAAM,EAAE,CAEtD;IAED,SAAS,CAAC,cAAc,CAAC,KAAK,EAAE,iBAAiB,CAAC,uBAAuB,CAAC,GAAG,mBAAmB;CAOnG;AAED,MAAM,WAAW,mBAAmB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,aAAa,EAAE,MAAM,CAAA;CACxB"}
|