patchwork-os 0.2.0-beta.1 → 0.2.0-beta.10.canary.95
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/README.bridge.md +14 -14
- package/README.md +201 -34
- package/deploy/README.md +1 -1
- package/deploy/bootstrap-vps.sh +14 -9
- package/deploy/deploy-dashboard.sh +25 -1
- package/deploy/macos/README.md +153 -0
- package/deploy/macos/com.patchwork.bridge.plist.template +54 -0
- package/deploy/macos/com.patchwork.tunnel.plist.template +76 -0
- package/deploy/macos/install-mac-bridge.sh +244 -0
- package/deploy/macos/uninstall-mac-bridge.sh +22 -0
- package/dist/activityLog.d.ts +6 -0
- package/dist/activityLog.js +63 -26
- package/dist/activityLog.js.map +1 -1
- package/dist/adapters/claude.js +22 -16
- package/dist/adapters/claude.js.map +1 -1
- package/dist/adapters/gemini.js +15 -11
- package/dist/adapters/gemini.js.map +1 -1
- package/dist/adapters/openai.js +9 -9
- package/dist/adapters/openai.js.map +1 -1
- package/dist/ajv2020.d.ts +25 -0
- package/dist/ajv2020.js +33 -0
- package/dist/ajv2020.js.map +1 -0
- package/dist/analyticsAggregator.js +1 -1
- package/dist/analyticsAggregator.js.map +1 -1
- package/dist/analyticsConfig.d.ts +29 -0
- package/dist/analyticsConfig.js +102 -0
- package/dist/analyticsConfig.js.map +1 -0
- package/dist/analyticsPrefs.d.ts +38 -2
- package/dist/analyticsPrefs.js +148 -23
- package/dist/analyticsPrefs.js.map +1 -1
- package/dist/analyticsSend.d.ts +17 -1
- package/dist/analyticsSend.js +67 -5
- package/dist/analyticsSend.js.map +1 -1
- package/dist/approvalHttp.d.ts +14 -0
- package/dist/approvalHttp.js +212 -9
- package/dist/approvalHttp.js.map +1 -1
- package/dist/approvalInsights.js +13 -5
- package/dist/approvalInsights.js.map +1 -1
- package/dist/approvalQueue.d.ts +97 -3
- package/dist/approvalQueue.js +193 -19
- package/dist/approvalQueue.js.map +1 -1
- package/dist/approvalSignals.js +19 -11
- package/dist/approvalSignals.js.map +1 -1
- package/dist/automation.d.ts +35 -10
- package/dist/automation.js +133 -37
- package/dist/automation.js.map +1 -1
- package/dist/automationSuggestions.js +10 -8
- package/dist/automationSuggestions.js.map +1 -1
- package/dist/bridge.d.ts +2 -0
- package/dist/bridge.js +202 -25
- package/dist/bridge.js.map +1 -1
- package/dist/bridgeLockDiscovery.d.ts +27 -1
- package/dist/bridgeLockDiscovery.js +38 -11
- package/dist/bridgeLockDiscovery.js.map +1 -1
- package/dist/bridgeToken.js +3 -2
- package/dist/bridgeToken.js.map +1 -1
- package/dist/claudeDriver.js +23 -8
- package/dist/claudeDriver.js.map +1 -1
- package/dist/claudeOrchestrator.d.ts +1 -1
- package/dist/claudeOrchestrator.js +87 -44
- package/dist/claudeOrchestrator.js.map +1 -1
- package/dist/commands/analytics.d.ts +8 -0
- package/dist/commands/analytics.js +134 -0
- package/dist/commands/analytics.js.map +1 -0
- package/dist/commands/auditEnv.d.ts +36 -0
- package/dist/commands/auditEnv.js +202 -0
- package/dist/commands/auditEnv.js.map +1 -0
- package/dist/commands/dashboard.js +8 -1
- package/dist/commands/dashboard.js.map +1 -1
- package/dist/commands/doctor.d.ts +35 -0
- package/dist/commands/doctor.js +51 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/install.js +3 -0
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/launchd.js +15 -16
- package/dist/commands/launchd.js.map +1 -1
- package/dist/commands/patchworkInit.d.ts +5 -0
- package/dist/commands/patchworkInit.js +89 -7
- package/dist/commands/patchworkInit.js.map +1 -1
- package/dist/commands/recipe.d.ts +110 -0
- package/dist/commands/recipe.js +512 -9
- package/dist/commands/recipe.js.map +1 -1
- package/dist/commands/recipeInstall.js +11 -4
- package/dist/commands/recipeInstall.js.map +1 -1
- package/dist/commands/shadowScan.d.ts +34 -0
- package/dist/commands/shadowScan.js +142 -0
- package/dist/commands/shadowScan.js.map +1 -0
- package/dist/commands/task.js +2 -2
- package/dist/commands/task.js.map +1 -1
- package/dist/commands/tools.d.ts +20 -1
- package/dist/commands/tools.js +112 -3
- package/dist/commands/tools.js.map +1 -1
- package/dist/commands/tracesImport.js +21 -4
- package/dist/commands/tracesImport.js.map +1 -1
- package/dist/commitIssueLinkLog.d.ts +16 -0
- package/dist/commitIssueLinkLog.js +110 -24
- package/dist/commitIssueLinkLog.js.map +1 -1
- package/dist/companions/registry.js +15 -7
- package/dist/companions/registry.js.map +1 -1
- package/dist/config.d.ts +47 -3
- package/dist/config.js +111 -21
- package/dist/config.js.map +1 -1
- package/dist/connectorRoutes.js +866 -57
- package/dist/connectorRoutes.js.map +1 -1
- package/dist/connectors/airtable.d.ts +230 -0
- package/dist/connectors/airtable.js +700 -0
- package/dist/connectors/airtable.js.map +1 -0
- package/dist/connectors/asana.js +13 -9
- package/dist/connectors/asana.js.map +1 -1
- package/dist/connectors/baseConnector.js +25 -3
- package/dist/connectors/baseConnector.js.map +1 -1
- package/dist/connectors/caldiy.d.ts +137 -0
- package/dist/connectors/caldiy.js +424 -0
- package/dist/connectors/caldiy.js.map +1 -0
- package/dist/connectors/circleci.d.ts +162 -0
- package/dist/connectors/circleci.js +576 -0
- package/dist/connectors/circleci.js.map +1 -0
- package/dist/connectors/cloudflare.d.ts +132 -0
- package/dist/connectors/cloudflare.js +622 -0
- package/dist/connectors/cloudflare.js.map +1 -0
- package/dist/connectors/confluence.js +35 -0
- package/dist/connectors/confluence.js.map +1 -1
- package/dist/connectors/connectorRedirectUri.d.ts +30 -0
- package/dist/connectors/connectorRedirectUri.js +38 -0
- package/dist/connectors/connectorRedirectUri.js.map +1 -0
- package/dist/connectors/connectorRegistry.d.ts +63 -0
- package/dist/connectors/connectorRegistry.js +354 -0
- package/dist/connectors/connectorRegistry.js.map +1 -0
- package/dist/connectors/datadog.js +33 -4
- package/dist/connectors/datadog.js.map +1 -1
- package/dist/connectors/discord.js +14 -10
- package/dist/connectors/discord.js.map +1 -1
- package/dist/connectors/elasticsearch.d.ts +141 -0
- package/dist/connectors/elasticsearch.js +601 -0
- package/dist/connectors/elasticsearch.js.map +1 -0
- package/dist/connectors/figma.d.ts +130 -0
- package/dist/connectors/figma.js +387 -0
- package/dist/connectors/figma.js.map +1 -0
- package/dist/connectors/github.d.ts +17 -0
- package/dist/connectors/github.js +53 -2
- package/dist/connectors/github.js.map +1 -1
- package/dist/connectors/gitlab.js +12 -6
- package/dist/connectors/gitlab.js.map +1 -1
- package/dist/connectors/gmail.js +72 -21
- package/dist/connectors/gmail.js.map +1 -1
- package/dist/connectors/googleCalendar.js +8 -8
- package/dist/connectors/googleCalendar.js.map +1 -1
- package/dist/connectors/googleDocs.d.ts +103 -0
- package/dist/connectors/googleDocs.js +409 -0
- package/dist/connectors/googleDocs.js.map +1 -0
- package/dist/connectors/googleDrive.d.ts +12 -0
- package/dist/connectors/googleDrive.js +35 -8
- package/dist/connectors/googleDrive.js.map +1 -1
- package/dist/connectors/grafana.d.ts +133 -0
- package/dist/connectors/grafana.js +478 -0
- package/dist/connectors/grafana.js.map +1 -0
- package/dist/connectors/jira.d.ts +25 -0
- package/dist/connectors/jira.js +227 -1
- package/dist/connectors/jira.js.map +1 -1
- package/dist/connectors/linear.js +1 -1
- package/dist/connectors/linear.js.map +1 -1
- package/dist/connectors/mcpOAuth.js +78 -16
- package/dist/connectors/mcpOAuth.js.map +1 -1
- package/dist/connectors/monday.d.ts +217 -0
- package/dist/connectors/monday.js +655 -0
- package/dist/connectors/monday.js.map +1 -0
- package/dist/connectors/mongodb.d.ts +139 -0
- package/dist/connectors/mongodb.js +455 -0
- package/dist/connectors/mongodb.js.map +1 -0
- package/dist/connectors/oauthStateStore.d.ts +20 -0
- package/dist/connectors/oauthStateStore.js +94 -4
- package/dist/connectors/oauthStateStore.js.map +1 -1
- package/dist/connectors/obsidian.d.ts +83 -0
- package/dist/connectors/obsidian.js +441 -0
- package/dist/connectors/obsidian.js.map +1 -0
- package/dist/connectors/paystack.d.ts +159 -0
- package/dist/connectors/paystack.js +607 -0
- package/dist/connectors/paystack.js.map +1 -0
- package/dist/connectors/pipedrive.d.ts +189 -0
- package/dist/connectors/pipedrive.js +559 -0
- package/dist/connectors/pipedrive.js.map +1 -0
- package/dist/connectors/postgres.d.ts +127 -0
- package/dist/connectors/postgres.js +512 -0
- package/dist/connectors/postgres.js.map +1 -0
- package/dist/connectors/posthog.d.ts +119 -0
- package/dist/connectors/posthog.js +479 -0
- package/dist/connectors/posthog.js.map +1 -0
- package/dist/connectors/redis.d.ts +140 -0
- package/dist/connectors/redis.js +571 -0
- package/dist/connectors/redis.js.map +1 -0
- package/dist/connectors/resend.d.ts +131 -0
- package/dist/connectors/resend.js +529 -0
- package/dist/connectors/resend.js.map +1 -0
- package/dist/connectors/salesforce.d.ts +136 -0
- package/dist/connectors/salesforce.js +603 -0
- package/dist/connectors/salesforce.js.map +1 -0
- package/dist/connectors/secrets.d.ts +51 -0
- package/dist/connectors/secrets.js +102 -0
- package/dist/connectors/secrets.js.map +1 -0
- package/dist/connectors/sendgrid.d.ts +102 -0
- package/dist/connectors/sendgrid.js +423 -0
- package/dist/connectors/sendgrid.js.map +1 -0
- package/dist/connectors/shopify.d.ts +145 -0
- package/dist/connectors/shopify.js +502 -0
- package/dist/connectors/shopify.js.map +1 -0
- package/dist/connectors/slack.d.ts +1 -1
- package/dist/connectors/slack.js +61 -9
- package/dist/connectors/slack.js.map +1 -1
- package/dist/connectors/snowflake.d.ts +119 -0
- package/dist/connectors/snowflake.js +615 -0
- package/dist/connectors/snowflake.js.map +1 -0
- package/dist/connectors/supabase.d.ts +92 -0
- package/dist/connectors/supabase.js +630 -0
- package/dist/connectors/supabase.js.map +1 -0
- package/dist/connectors/todoist.d.ts +117 -0
- package/dist/connectors/todoist.js +485 -0
- package/dist/connectors/todoist.js.map +1 -0
- package/dist/connectors/tokenStorage.js +56 -14
- package/dist/connectors/tokenStorage.js.map +1 -1
- package/dist/connectors/twilio.d.ts +118 -0
- package/dist/connectors/twilio.js +475 -0
- package/dist/connectors/twilio.js.map +1 -0
- package/dist/connectors/vercel.d.ts +110 -0
- package/dist/connectors/vercel.js +479 -0
- package/dist/connectors/vercel.js.map +1 -0
- package/dist/connectors/webflow.d.ts +118 -0
- package/dist/connectors/webflow.js +393 -0
- package/dist/connectors/webflow.js.map +1 -0
- package/dist/connectors/woocommerce.d.ts +220 -0
- package/dist/connectors/woocommerce.js +464 -0
- package/dist/connectors/woocommerce.js.map +1 -0
- package/dist/crypto.js +7 -2
- package/dist/crypto.js.map +1 -1
- package/dist/decisionReplay.js +15 -6
- package/dist/decisionReplay.js.map +1 -1
- package/dist/decisionTraceLog.d.ts +28 -0
- package/dist/decisionTraceLog.js +156 -29
- package/dist/decisionTraceLog.js.map +1 -1
- package/dist/drivers/claude/api.js +5 -4
- package/dist/drivers/claude/api.js.map +1 -1
- package/dist/drivers/claude/envSanitizer.d.ts +0 -6
- package/dist/drivers/claude/envSanitizer.js +17 -2
- package/dist/drivers/claude/envSanitizer.js.map +1 -1
- package/dist/drivers/claude/streamParser.js +5 -4
- package/dist/drivers/claude/streamParser.js.map +1 -1
- package/dist/drivers/claude/subprocess.js +22 -3
- package/dist/drivers/claude/subprocess.js.map +1 -1
- package/dist/drivers/gemini/index.d.ts +22 -0
- package/dist/drivers/gemini/index.js +256 -129
- package/dist/drivers/gemini/index.js.map +1 -1
- package/dist/drivers/local/index.d.ts +17 -0
- package/dist/drivers/local/index.js +99 -0
- package/dist/drivers/local/index.js.map +1 -1
- package/dist/drivers/openai/index.js +30 -2
- package/dist/drivers/openai/index.js.map +1 -1
- package/dist/extensionClient.d.ts +37 -4
- package/dist/extensionClient.js +58 -16
- package/dist/extensionClient.js.map +1 -1
- package/dist/featureFlags.d.ts +91 -0
- package/dist/featureFlags.js +174 -3
- package/dist/featureFlags.js.map +1 -1
- package/dist/fileLock.js +21 -12
- package/dist/fileLock.js.map +1 -1
- package/dist/fileLockSync.d.ts +67 -0
- package/dist/fileLockSync.js +126 -0
- package/dist/fileLockSync.js.map +1 -0
- package/dist/fp/activityAnalytics.js +26 -12
- package/dist/fp/activityAnalytics.js.map +1 -1
- package/dist/fp/automationInterpreter.d.ts +15 -1
- package/dist/fp/automationInterpreter.js +217 -82
- package/dist/fp/automationInterpreter.js.map +1 -1
- package/dist/fp/automationProgram.d.ts +30 -0
- package/dist/fp/automationProgram.js.map +1 -1
- package/dist/fp/automationState.d.ts +24 -5
- package/dist/fp/automationState.js +56 -9
- package/dist/fp/automationState.js.map +1 -1
- package/dist/fp/automationUtils.js +1 -1
- package/dist/fp/automationUtils.js.map +1 -1
- package/dist/fp/commandDescription.js +7 -1
- package/dist/fp/commandDescription.js.map +1 -1
- package/dist/fp/extensionSnapshot.js +8 -2
- package/dist/fp/extensionSnapshot.js.map +1 -1
- package/dist/fp/interpreterContext.d.ts +66 -1
- package/dist/fp/interpreterContext.js +91 -1
- package/dist/fp/interpreterContext.js.map +1 -1
- package/dist/fp/policyParser.js +29 -1
- package/dist/fp/policyParser.js.map +1 -1
- package/dist/fsWatchWithFallback.d.ts +36 -0
- package/dist/fsWatchWithFallback.js +128 -0
- package/dist/fsWatchWithFallback.js.map +1 -0
- package/dist/haltPushDispatch.d.ts +33 -0
- package/dist/haltPushDispatch.js +103 -0
- package/dist/haltPushDispatch.js.map +1 -0
- package/dist/httpBodyValidation.d.ts +41 -0
- package/dist/httpBodyValidation.js +45 -0
- package/dist/httpBodyValidation.js.map +1 -0
- package/dist/inboxRoutes.d.ts +22 -0
- package/dist/inboxRoutes.js +61 -1
- package/dist/inboxRoutes.js.map +1 -1
- package/dist/index.js +1053 -76
- package/dist/index.js.map +1 -1
- package/dist/installGuard.js +6 -2
- package/dist/installGuard.js.map +1 -1
- package/dist/lockfile.js +31 -4
- package/dist/lockfile.js.map +1 -1
- package/dist/oauth.d.ts +9 -0
- package/dist/oauth.js +33 -0
- package/dist/oauth.js.map +1 -1
- package/dist/oauthRoutes.d.ts +1 -1
- package/dist/oauthRoutes.js +5 -3
- package/dist/oauthRoutes.js.map +1 -1
- package/dist/orchestrator/childBridgeRegistry.js +29 -11
- package/dist/orchestrator/childBridgeRegistry.js.map +1 -1
- package/dist/patchworkConfig.d.ts +44 -1
- package/dist/patchworkConfig.js +28 -3
- package/dist/patchworkConfig.js.map +1 -1
- package/dist/pluginLoader.js +10 -1
- package/dist/pluginLoader.js.map +1 -1
- package/dist/pluginWatcher.js +12 -14
- package/dist/pluginWatcher.js.map +1 -1
- package/dist/preToolUseHook.js +3 -2
- package/dist/preToolUseHook.js.map +1 -1
- package/dist/processTree.d.ts +34 -0
- package/dist/processTree.js +105 -0
- package/dist/processTree.js.map +1 -0
- package/dist/prompts.js +3 -3
- package/dist/prompts.js.map +1 -1
- package/dist/recipeOrchestration.d.ts +9 -0
- package/dist/recipeOrchestration.js +341 -24
- package/dist/recipeOrchestration.js.map +1 -1
- package/dist/recipeRoutes.d.ts +58 -2
- package/dist/recipeRoutes.js +744 -115
- package/dist/recipeRoutes.js.map +1 -1
- package/dist/recipes/RecipeOrchestrator.d.ts +2 -0
- package/dist/recipes/RecipeOrchestrator.js +6 -1
- package/dist/recipes/RecipeOrchestrator.js.map +1 -1
- package/dist/recipes/agentExecutor.d.ts +25 -5
- package/dist/recipes/agentExecutor.js.map +1 -1
- package/dist/recipes/chainedRunner.d.ts +2 -0
- package/dist/recipes/chainedRunner.js +142 -5
- package/dist/recipes/chainedRunner.js.map +1 -1
- package/dist/recipes/connectorPreflight.d.ts +66 -0
- package/dist/recipes/connectorPreflight.js +169 -0
- package/dist/recipes/connectorPreflight.js.map +1 -0
- package/dist/recipes/dependencyGraph.js +13 -5
- package/dist/recipes/dependencyGraph.js.map +1 -1
- package/dist/recipes/githubInstallSource.d.ts +128 -0
- package/dist/recipes/githubInstallSource.js +206 -0
- package/dist/recipes/githubInstallSource.js.map +1 -0
- package/dist/recipes/haltCategory.d.ts +119 -0
- package/dist/recipes/haltCategory.js +188 -0
- package/dist/recipes/haltCategory.js.map +1 -0
- package/dist/recipes/idempotencyKey.d.ts +134 -0
- package/dist/recipes/idempotencyKey.js +322 -0
- package/dist/recipes/idempotencyKey.js.map +1 -0
- package/dist/recipes/installer.js +48 -2
- package/dist/recipes/installer.js.map +1 -1
- package/dist/recipes/judgeSummary.d.ts +50 -0
- package/dist/recipes/judgeSummary.js +47 -0
- package/dist/recipes/judgeSummary.js.map +1 -0
- package/dist/recipes/judgeVerdict.d.ts +48 -0
- package/dist/recipes/judgeVerdict.js +174 -0
- package/dist/recipes/judgeVerdict.js.map +1 -0
- package/dist/recipes/migrations/index.d.ts +9 -0
- package/dist/recipes/migrations/index.js +133 -0
- package/dist/recipes/migrations/index.js.map +1 -1
- package/dist/recipes/names.d.ts +20 -0
- package/dist/recipes/names.js +25 -0
- package/dist/recipes/names.js.map +1 -1
- package/dist/recipes/parser.js +88 -5
- package/dist/recipes/parser.js.map +1 -1
- package/dist/recipes/replayRun.js +1 -1
- package/dist/recipes/replayRun.js.map +1 -1
- package/dist/recipes/runBudget.d.ts +70 -0
- package/dist/recipes/runBudget.js +109 -0
- package/dist/recipes/runBudget.js.map +1 -0
- package/dist/recipes/scheduler.d.ts +30 -0
- package/dist/recipes/scheduler.js +69 -19
- package/dist/recipes/scheduler.js.map +1 -1
- package/dist/recipes/schema.d.ts +36 -0
- package/dist/recipes/schemaGenerator.js +103 -5
- package/dist/recipes/schemaGenerator.js.map +1 -1
- package/dist/recipes/stepObservation.js +9 -0
- package/dist/recipes/stepObservation.js.map +1 -1
- package/dist/recipes/toolRegistry.js +20 -3
- package/dist/recipes/toolRegistry.js.map +1 -1
- package/dist/recipes/tools/fanOut.d.ts +20 -0
- package/dist/recipes/tools/fanOut.js +199 -0
- package/dist/recipes/tools/fanOut.js.map +1 -0
- package/dist/recipes/tools/file.js +5 -2
- package/dist/recipes/tools/file.js.map +1 -1
- package/dist/recipes/tools/github.d.ts +1 -1
- package/dist/recipes/tools/github.js +75 -1
- package/dist/recipes/tools/github.js.map +1 -1
- package/dist/recipes/tools/gmail.js +27 -5
- package/dist/recipes/tools/gmail.js.map +1 -1
- package/dist/recipes/tools/googleDrive.js +64 -0
- package/dist/recipes/tools/googleDrive.js.map +1 -1
- package/dist/recipes/tools/http.d.ts +10 -0
- package/dist/recipes/tools/http.js +176 -0
- package/dist/recipes/tools/http.js.map +1 -0
- package/dist/recipes/tools/index.d.ts +2 -0
- package/dist/recipes/tools/index.js +2 -0
- package/dist/recipes/tools/index.js.map +1 -1
- package/dist/recipes/tools/slack.js +1 -1
- package/dist/recipes/validation.d.ts +17 -0
- package/dist/recipes/validation.js +29 -11
- package/dist/recipes/validation.js.map +1 -1
- package/dist/recipes/workspaceRoot.d.ts +37 -0
- package/dist/recipes/workspaceRoot.js +73 -0
- package/dist/recipes/workspaceRoot.js.map +1 -0
- package/dist/recipes/yamlPositions.d.ts +56 -0
- package/dist/recipes/yamlPositions.js +183 -0
- package/dist/recipes/yamlPositions.js.map +1 -0
- package/dist/recipes/yamlRunner.d.ts +182 -8
- package/dist/recipes/yamlRunner.js +877 -217
- package/dist/recipes/yamlRunner.js.map +1 -1
- package/dist/recipesHttp.d.ts +19 -3
- package/dist/recipesHttp.js +67 -11
- package/dist/recipesHttp.js.map +1 -1
- package/dist/resources.js +21 -13
- package/dist/resources.js.map +1 -1
- package/dist/runLog.d.ts +58 -5
- package/dist/runLog.js +98 -21
- package/dist/runLog.js.map +1 -1
- package/dist/sanitizeParsedJson.d.ts +39 -0
- package/dist/sanitizeParsedJson.js +55 -0
- package/dist/sanitizeParsedJson.js.map +1 -0
- package/dist/schemas/recipe.v1.json +885 -196
- package/dist/server.d.ts +160 -3
- package/dist/server.js +1099 -122
- package/dist/server.js.map +1 -1
- package/dist/sessionCheckpoint.d.ts +8 -0
- package/dist/sessionCheckpoint.js +33 -3
- package/dist/sessionCheckpoint.js.map +1 -1
- package/dist/ssrfGuard.d.ts +16 -0
- package/dist/ssrfGuard.js +87 -4
- package/dist/ssrfGuard.js.map +1 -1
- package/dist/streamableHttp.d.ts +9 -4
- package/dist/streamableHttp.js +76 -20
- package/dist/streamableHttp.js.map +1 -1
- package/dist/telemetry.js +19 -12
- package/dist/telemetry.js.map +1 -1
- package/dist/testing/shadowRun.d.ts +52 -0
- package/dist/testing/shadowRun.js +71 -0
- package/dist/testing/shadowRun.js.map +1 -0
- package/dist/tools/batchLsp.d.ts +3 -0
- package/dist/tools/bridgeDoctor.d.ts +11 -0
- package/dist/tools/bridgeDoctor.js +48 -2
- package/dist/tools/bridgeDoctor.js.map +1 -1
- package/dist/tools/bridgeStatus.d.ts +0 -12
- package/dist/tools/bridgeStatus.js +2 -28
- package/dist/tools/bridgeStatus.js.map +1 -1
- package/dist/tools/cancelClaudeTask.d.ts +1 -0
- package/dist/tools/clipboard.d.ts +2 -0
- package/dist/tools/closeTabs.d.ts +1 -0
- package/dist/tools/codeLens.d.ts +1 -0
- package/dist/tools/createIssueFromAIComment.d.ts +1 -0
- package/dist/tools/ctxGetTaskContext.d.ts +9 -0
- package/dist/tools/ctxGetTaskContext.js +50 -2
- package/dist/tools/ctxGetTaskContext.js.map +1 -1
- package/dist/tools/ctxQueryTraces.js +32 -24
- package/dist/tools/ctxQueryTraces.js.map +1 -1
- package/dist/tools/ctxSaveTrace.d.ts +1 -0
- package/dist/tools/debug.d.ts +4 -0
- package/dist/tools/decorations.d.ts +2 -0
- package/dist/tools/detectUnusedCode.js +9 -7
- package/dist/tools/detectUnusedCode.js.map +1 -1
- package/dist/tools/documentLinks.d.ts +1 -0
- package/dist/tools/editText.d.ts +1 -0
- package/dist/tools/editText.js +2 -1
- package/dist/tools/editText.js.map +1 -1
- package/dist/tools/enrichCommit.d.ts +1 -0
- package/dist/tools/enrichStackTrace.js +11 -5
- package/dist/tools/enrichStackTrace.js.map +1 -1
- package/dist/tools/explainDiagnostic.d.ts +1 -0
- package/dist/tools/explainSymbol.d.ts +1 -0
- package/dist/tools/fileOperations.d.ts +3 -0
- package/dist/tools/fileOperations.js +2 -1
- package/dist/tools/fileOperations.js.map +1 -1
- package/dist/tools/fileWatcher.d.ts +2 -0
- package/dist/tools/fileWatcher.js +8 -2
- package/dist/tools/fileWatcher.js.map +1 -1
- package/dist/tools/findFiles.d.ts +1 -0
- package/dist/tools/fixAllLintErrors.d.ts +1 -0
- package/dist/tools/fixAllLintErrors.js +10 -5
- package/dist/tools/fixAllLintErrors.js.map +1 -1
- package/dist/tools/foldingRanges.d.ts +1 -0
- package/dist/tools/formatDocument.d.ts +1 -0
- package/dist/tools/formatDocument.js +10 -5
- package/dist/tools/formatDocument.js.map +1 -1
- package/dist/tools/generateTests.d.ts +1 -0
- package/dist/tools/getAIComments.d.ts +1 -0
- package/dist/tools/getAnalyticsReport.js +5 -1
- package/dist/tools/getAnalyticsReport.js.map +1 -1
- package/dist/tools/getBufferContent.d.ts +1 -0
- package/dist/tools/getChangeImpact.d.ts +1 -0
- package/dist/tools/getChangeImpact.js +23 -14
- package/dist/tools/getChangeImpact.js.map +1 -1
- package/dist/tools/getClaudeTaskStatus.d.ts +1 -0
- package/dist/tools/getCodeCoverage.d.ts +1 -0
- package/dist/tools/getCodeCoverage.js +32 -14
- package/dist/tools/getCodeCoverage.js.map +1 -1
- package/dist/tools/getCommitsForIssue.d.ts +1 -0
- package/dist/tools/getDebugState.d.ts +1 -0
- package/dist/tools/getDiagnostics.js +32 -29
- package/dist/tools/getDiagnostics.js.map +1 -1
- package/dist/tools/getDiffFromHandoff.js +8 -2
- package/dist/tools/getDiffFromHandoff.js.map +1 -1
- package/dist/tools/getDocumentSymbols.d.ts +1 -0
- package/dist/tools/getGitHotspots.d.ts +1 -0
- package/dist/tools/getImportedSignatures.d.ts +1 -0
- package/dist/tools/getImportedSignatures.js +18 -14
- package/dist/tools/getImportedSignatures.js.map +1 -1
- package/dist/tools/getPRTemplate.d.ts +1 -0
- package/dist/tools/getProjectContext.js +23 -10
- package/dist/tools/getProjectContext.js.map +1 -1
- package/dist/tools/getSymbolHistory.d.ts +1 -0
- package/dist/tools/getToolCapabilities.d.ts +10 -5
- package/dist/tools/getToolCapabilities.js +79 -202
- package/dist/tools/getToolCapabilities.js.map +1 -1
- package/dist/tools/getTypeSignature.d.ts +1 -0
- package/dist/tools/getWorkspaceSettings.d.ts +1 -0
- package/dist/tools/gitWrite.d.ts +11 -0
- package/dist/tools/github/actions.d.ts +2 -0
- package/dist/tools/github/composite.d.ts +3 -0
- package/dist/tools/github/issues.d.ts +4 -0
- package/dist/tools/github/pr.d.ts +7 -0
- package/dist/tools/handoffNote.d.ts +1 -0
- package/dist/tools/handoffNote.js +2 -1
- package/dist/tools/handoffNote.js.map +1 -1
- package/dist/tools/headless/lspClient.js +3 -0
- package/dist/tools/headless/lspClient.js.map +1 -1
- package/dist/tools/hoverAtCursor.d.ts +1 -0
- package/dist/tools/httpClient.d.ts +2 -0
- package/dist/tools/httpClient.js +38 -71
- package/dist/tools/httpClient.js.map +1 -1
- package/dist/tools/inlayHints.d.ts +1 -0
- package/dist/tools/launchQuickTask.d.ts +1 -0
- package/dist/tools/listClaudeTasks.d.ts +1 -0
- package/dist/tools/listClaudeTasks.js +10 -8
- package/dist/tools/listClaudeTasks.js.map +1 -1
- package/dist/tools/listTerminals.d.ts +1 -0
- package/dist/tools/lsp.d.ts +15 -0
- package/dist/tools/lsp.js +17 -0
- package/dist/tools/lsp.js.map +1 -1
- package/dist/tools/navigateToSymbolByName.d.ts +1 -0
- package/dist/tools/openDiff.d.ts +1 -0
- package/dist/tools/openDiff.js +4 -1
- package/dist/tools/openDiff.js.map +1 -1
- package/dist/tools/openFile.d.ts +1 -0
- package/dist/tools/openFile.js +4 -1
- package/dist/tools/openFile.js.map +1 -1
- package/dist/tools/openInBrowser.js +6 -1
- package/dist/tools/openInBrowser.js.map +1 -1
- package/dist/tools/organizeImports.d.ts +1 -0
- package/dist/tools/organizeImports.js +5 -3
- package/dist/tools/organizeImports.js.map +1 -1
- package/dist/tools/performanceReport.js +5 -3
- package/dist/tools/performanceReport.js.map +1 -1
- package/dist/tools/planPersistence.d.ts +3 -0
- package/dist/tools/planPersistence.js +4 -1
- package/dist/tools/planPersistence.js.map +1 -1
- package/dist/tools/previewEdit.d.ts +1 -0
- package/dist/tools/previewEdit.js +15 -4
- package/dist/tools/previewEdit.js.map +1 -1
- package/dist/tools/recentTracesDigest.js +54 -11
- package/dist/tools/recentTracesDigest.js.map +1 -1
- package/dist/tools/refactorAnalyze.d.ts +1 -0
- package/dist/tools/refactorExtractFunction.js +4 -1
- package/dist/tools/refactorExtractFunction.js.map +1 -1
- package/dist/tools/refactorPreview.d.ts +1 -0
- package/dist/tools/refactorPreview.js +10 -2
- package/dist/tools/refactorPreview.js.map +1 -1
- package/dist/tools/replaceBlock.d.ts +1 -0
- package/dist/tools/replaceBlock.js +2 -1
- package/dist/tools/replaceBlock.js.map +1 -1
- package/dist/tools/resumeClaudeTask.d.ts +1 -0
- package/dist/tools/runClaudeTask.d.ts +1 -0
- package/dist/tools/runTests.js +15 -4
- package/dist/tools/runTests.js.map +1 -1
- package/dist/tools/screenshot.d.ts +1 -0
- package/dist/tools/screenshotAndAnnotate.js +6 -2
- package/dist/tools/screenshotAndAnnotate.js.map +1 -1
- package/dist/tools/searchAndReplace.d.ts +1 -0
- package/dist/tools/searchAndReplace.js +17 -7
- package/dist/tools/searchAndReplace.js.map +1 -1
- package/dist/tools/searchTools.js +20 -19
- package/dist/tools/searchTools.js.map +1 -1
- package/dist/tools/searchWorkspace.d.ts +1 -0
- package/dist/tools/selectionRanges.d.ts +1 -0
- package/dist/tools/semanticTokens.d.ts +1 -0
- package/dist/tools/signatureHelp.d.ts +1 -0
- package/dist/tools/spawnWorkspace.js +15 -7
- package/dist/tools/spawnWorkspace.js.map +1 -1
- package/dist/tools/terminal.d.ts +6 -0
- package/dist/tools/testRunners/pytest.js +6 -2
- package/dist/tools/testRunners/pytest.js.map +1 -1
- package/dist/tools/testRunners/vitestJest.js +3 -1
- package/dist/tools/testRunners/vitestJest.js.map +1 -1
- package/dist/tools/testTraceToSource.d.ts +1 -0
- package/dist/tools/transaction.d.ts +4 -0
- package/dist/tools/transaction.js +4 -1
- package/dist/tools/transaction.js.map +1 -1
- package/dist/tools/typeHierarchy.d.ts +1 -0
- package/dist/tools/utils.d.ts +18 -0
- package/dist/tools/utils.js +103 -18
- package/dist/tools/utils.js.map +1 -1
- package/dist/tools/vscodeCommands.d.ts +2 -0
- package/dist/tools/vscodeTasks.d.ts +2 -0
- package/dist/tools/workspaceSettings.d.ts +1 -0
- package/dist/transport.d.ts +3 -1
- package/dist/transport.js +103 -52
- package/dist/transport.js.map +1 -1
- package/dist/winShim.d.ts +34 -0
- package/dist/winShim.js +94 -0
- package/dist/winShim.js.map +1 -0
- package/dist/wireHaltPushDispatch.d.ts +38 -0
- package/dist/wireHaltPushDispatch.js +71 -0
- package/dist/wireHaltPushDispatch.js.map +1 -0
- package/dist/writeFileAtomic.d.ts +23 -0
- package/dist/writeFileAtomic.js +121 -0
- package/dist/writeFileAtomic.js.map +1 -0
- package/package.json +23 -7
- package/scripts/postinstall.mjs +42 -2
- package/scripts/smoke/run-all.mjs +213 -0
- package/scripts/start-all.mjs +572 -0
- package/scripts/start-all.ps1 +209 -0
- package/scripts/start-all.sh +73 -17
- package/scripts/start-orchestrator.ps1 +158 -0
- package/scripts/start-remote.mjs +122 -0
- package/templates/automation-policies/recipe-authoring.json +1 -1
- package/templates/automation-policies/security-first.json +1 -1
- package/templates/automation-policies/strict-lint.json +1 -1
- package/templates/automation-policies/test-driven.json +1 -1
- package/templates/automation-policy.example.json +1 -1
- package/templates/co.patchwork-os.bridge.plist +2 -2
- package/templates/recipes/approval-queue-ui-test.yaml +1 -1
- package/templates/recipes/ctx-loop-test.yaml +1 -1
- package/templates/recipes/fix-errors-on-save.yaml +71 -0
- package/templates/recipes/morning-brief.yaml +5 -2
- package/templates/recipes/project-health-check.yaml +4 -1
- package/templates/recipes/sentry-to-linear.yaml +72 -38
- package/templates/recipes/webhook/apple-watch-health-log.yaml +145 -0
- package/templates/recipes/webhook/customer-escalation.yaml +8 -9
- package/templates/recipes/webhook/meeting-prep.yaml +11 -5
- package/dist/commands/marketplace.d.ts +0 -16
- package/dist/commands/marketplace.js +0 -32
- package/dist/commands/marketplace.js.map +0 -1
- package/dist/recipes/legacyRecipeCompat.d.ts +0 -10
- package/dist/recipes/legacyRecipeCompat.js +0 -131
- package/dist/recipes/legacyRecipeCompat.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sendgrid.js","sourceRoot":"","sources":["../../src/connectors/sendgrid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAEL,aAAa,GAGd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AA4C3B,MAAM,QAAQ,GAAG,0BAA0B,CAAC;AAE5C,0EAA0E;AAC1E,MAAM,QAAQ,GAAG,4BAA4B,CAAC;AAE9C,SAAS,YAAY,CAAC,CAAU;IAC9B,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACnD,CAAC;AAED,MAAM,OAAO,iBAAkB,SAAQ,aAAa;IACzC,YAAY,GAAG,UAAU,CAAC;IAC3B,MAAM,GAA0B,IAAI,CAAC;IAEnC,cAAc;QACtB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;QAC5B,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CACb,oFAAoF,CACrF,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,OAAO;YACL,KAAK,EAAE,MAAM,CAAC,MAAM;YACpB,MAAM,EAAE,CAAC,WAAW,CAAC;SACtB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,WAAW;QACf,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,KA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GAAG;YAC5B,WAAW,EAAE,kBAAkB;YAC/B,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,CACrE;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO;YACL,MAAM,EAAE,GAAG;YACX,WAAW,EAAE,kBAAkB;YAC/B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;gBACnB,EAAE,EAAE,KAAK;gBACT,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;aACxD,CAAC;SACH,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,wBAAwB;IACtC,WAAW,EAAE,CAAC;IACd,sBAAsB,EAAE,CAAC;IACzB,OAAO;QACL,MAAM,EAAE,GAAG;QACX,WAAW,EAAE,kBAAkB;QAC/B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;KACnC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shopify connector — read-only access to Shopify Admin data via the Admin REST API 2024-07.
|
|
3
|
+
*
|
|
4
|
+
* Auth: header `X-Shopify-Access-Token: <token>` where tokens are per-shop Admin API
|
|
5
|
+
* access tokens generated via Shopify's "Custom App" feature (start with `shpat_`).
|
|
6
|
+
* - Env vars: SHOPIFY_ACCESS_TOKEN + SHOPIFY_SHOP_DOMAIN
|
|
7
|
+
* - Stored: getSecretJsonSync("shopify") → ShopifyTokens
|
|
8
|
+
*
|
|
9
|
+
* Tools: getShop, listProducts, getProduct, listOrders, getOrder,
|
|
10
|
+
* listCustomers, getCustomer, listInventoryLevels
|
|
11
|
+
*
|
|
12
|
+
* Extends BaseConnector for unified auth, retry, rate-limit, error handling.
|
|
13
|
+
*/
|
|
14
|
+
import { type AuthContext, BaseConnector, type ConnectorError, type ConnectorStatus } from "./baseConnector.js";
|
|
15
|
+
export interface ShopifyTokens {
|
|
16
|
+
accessToken: string;
|
|
17
|
+
shopDomain: string;
|
|
18
|
+
shopName?: string;
|
|
19
|
+
planName?: string;
|
|
20
|
+
connected_at: string;
|
|
21
|
+
}
|
|
22
|
+
export interface ShopifyShop {
|
|
23
|
+
id: number;
|
|
24
|
+
name: string;
|
|
25
|
+
email: string;
|
|
26
|
+
domain: string;
|
|
27
|
+
myshopify_domain: string;
|
|
28
|
+
plan_name?: string;
|
|
29
|
+
country_code?: string;
|
|
30
|
+
currency?: string;
|
|
31
|
+
timezone?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface ShopifyProduct {
|
|
34
|
+
id: number;
|
|
35
|
+
title: string;
|
|
36
|
+
body_html: string | null;
|
|
37
|
+
vendor: string;
|
|
38
|
+
product_type: string;
|
|
39
|
+
status: string;
|
|
40
|
+
created_at: string;
|
|
41
|
+
updated_at: string;
|
|
42
|
+
tags: string;
|
|
43
|
+
variants?: unknown[];
|
|
44
|
+
}
|
|
45
|
+
export interface ShopifyOrder {
|
|
46
|
+
id: number;
|
|
47
|
+
order_number: number;
|
|
48
|
+
name: string;
|
|
49
|
+
email: string | null;
|
|
50
|
+
financial_status: string | null;
|
|
51
|
+
fulfillment_status: string | null;
|
|
52
|
+
total_price: string;
|
|
53
|
+
subtotal_price: string;
|
|
54
|
+
currency: string;
|
|
55
|
+
created_at: string;
|
|
56
|
+
updated_at: string;
|
|
57
|
+
customer?: ShopifyCustomer | null;
|
|
58
|
+
}
|
|
59
|
+
export interface ShopifyCustomer {
|
|
60
|
+
id: number;
|
|
61
|
+
email: string | null;
|
|
62
|
+
first_name: string | null;
|
|
63
|
+
last_name: string | null;
|
|
64
|
+
phone: string | null;
|
|
65
|
+
orders_count?: number;
|
|
66
|
+
total_spent?: string;
|
|
67
|
+
state?: string;
|
|
68
|
+
created_at: string;
|
|
69
|
+
updated_at: string;
|
|
70
|
+
}
|
|
71
|
+
export interface ShopifyInventoryLevel {
|
|
72
|
+
inventory_item_id: number;
|
|
73
|
+
location_id: number;
|
|
74
|
+
available: number | null;
|
|
75
|
+
updated_at: string;
|
|
76
|
+
}
|
|
77
|
+
export interface ShopifyListResult<T> {
|
|
78
|
+
data: T[];
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Best-effort validation of a Shopify shop domain. We accept anything that ends in
|
|
82
|
+
* `.myshopify.com` and looks vaguely like a domain (lowercase letters, digits, hyphens,
|
|
83
|
+
* at least one non-empty subdomain). This is a defense-in-depth check; the real
|
|
84
|
+
* authority is the connect handler that validates against Shopify itself.
|
|
85
|
+
*/
|
|
86
|
+
export declare function isValidShopDomain(domain: string): boolean;
|
|
87
|
+
export declare class ShopifyConnector extends BaseConnector {
|
|
88
|
+
readonly providerName = "shopify";
|
|
89
|
+
private tokens;
|
|
90
|
+
protected getOAuthConfig(): null;
|
|
91
|
+
authenticate(): Promise<AuthContext>;
|
|
92
|
+
healthCheck(): Promise<{
|
|
93
|
+
ok: boolean;
|
|
94
|
+
error?: ConnectorError;
|
|
95
|
+
}>;
|
|
96
|
+
normalizeError(error: unknown): ConnectorError;
|
|
97
|
+
getStatus(): ConnectorStatus;
|
|
98
|
+
getShop(): Promise<ShopifyShop>;
|
|
99
|
+
listProducts(params?: {
|
|
100
|
+
limit?: number;
|
|
101
|
+
status?: string;
|
|
102
|
+
vendor?: string;
|
|
103
|
+
productType?: string;
|
|
104
|
+
}): Promise<ShopifyListResult<ShopifyProduct>>;
|
|
105
|
+
getProduct(productId: string | number): Promise<ShopifyProduct>;
|
|
106
|
+
listOrders(params?: {
|
|
107
|
+
limit?: number;
|
|
108
|
+
status?: string;
|
|
109
|
+
financialStatus?: string;
|
|
110
|
+
fulfillmentStatus?: string;
|
|
111
|
+
}): Promise<ShopifyListResult<ShopifyOrder>>;
|
|
112
|
+
getOrder(orderId: string | number): Promise<ShopifyOrder>;
|
|
113
|
+
listCustomers(params?: {
|
|
114
|
+
limit?: number;
|
|
115
|
+
query?: string;
|
|
116
|
+
}): Promise<ShopifyListResult<ShopifyCustomer>>;
|
|
117
|
+
getCustomer(customerId: string | number): Promise<ShopifyCustomer>;
|
|
118
|
+
listInventoryLevels(locationId: string | number, params?: {
|
|
119
|
+
limit?: number;
|
|
120
|
+
}): Promise<ShopifyListResult<ShopifyInventoryLevel>>;
|
|
121
|
+
private buildHeaders;
|
|
122
|
+
private requireBaseUrl;
|
|
123
|
+
}
|
|
124
|
+
export declare function loadTokens(): ShopifyTokens | null;
|
|
125
|
+
export declare function saveTokens(tokens: ShopifyTokens): void;
|
|
126
|
+
export declare function clearTokens(): void;
|
|
127
|
+
export declare function getShopifyConnector(): ShopifyConnector;
|
|
128
|
+
export { getShopifyConnector as shopify };
|
|
129
|
+
export interface ConnectorHandlerResult {
|
|
130
|
+
status: number;
|
|
131
|
+
body: string;
|
|
132
|
+
contentType?: string;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* POST /connections/shopify/connect { accessToken, shopDomain }
|
|
136
|
+
*/
|
|
137
|
+
export declare function handleShopifyConnect(body: string): Promise<ConnectorHandlerResult>;
|
|
138
|
+
/**
|
|
139
|
+
* POST /connections/shopify/test
|
|
140
|
+
*/
|
|
141
|
+
export declare function handleShopifyTest(): Promise<ConnectorHandlerResult>;
|
|
142
|
+
/**
|
|
143
|
+
* DELETE /connections/shopify
|
|
144
|
+
*/
|
|
145
|
+
export declare function handleShopifyDisconnect(): Promise<ConnectorHandlerResult>;
|
|
@@ -0,0 +1,502 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shopify connector — read-only access to Shopify Admin data via the Admin REST API 2024-07.
|
|
3
|
+
*
|
|
4
|
+
* Auth: header `X-Shopify-Access-Token: <token>` where tokens are per-shop Admin API
|
|
5
|
+
* access tokens generated via Shopify's "Custom App" feature (start with `shpat_`).
|
|
6
|
+
* - Env vars: SHOPIFY_ACCESS_TOKEN + SHOPIFY_SHOP_DOMAIN
|
|
7
|
+
* - Stored: getSecretJsonSync("shopify") → ShopifyTokens
|
|
8
|
+
*
|
|
9
|
+
* Tools: getShop, listProducts, getProduct, listOrders, getOrder,
|
|
10
|
+
* listCustomers, getCustomer, listInventoryLevels
|
|
11
|
+
*
|
|
12
|
+
* Extends BaseConnector for unified auth, retry, rate-limit, error handling.
|
|
13
|
+
*/
|
|
14
|
+
import { BaseConnector, } from "./baseConnector.js";
|
|
15
|
+
import { deleteSecretJsonSync, getSecretJsonSync, storeSecretJsonSync, } from "./tokenStorage.js";
|
|
16
|
+
const API_VERSION = "2024-07";
|
|
17
|
+
const SHOPIFY_HARD_LIMIT = 250;
|
|
18
|
+
function buildBaseUrl(shopDomain) {
|
|
19
|
+
return `https://${shopDomain}/admin/api/${API_VERSION}`;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Best-effort validation of a Shopify shop domain. We accept anything that ends in
|
|
23
|
+
* `.myshopify.com` and looks vaguely like a domain (lowercase letters, digits, hyphens,
|
|
24
|
+
* at least one non-empty subdomain). This is a defense-in-depth check; the real
|
|
25
|
+
* authority is the connect handler that validates against Shopify itself.
|
|
26
|
+
*/
|
|
27
|
+
export function isValidShopDomain(domain) {
|
|
28
|
+
if (typeof domain !== "string")
|
|
29
|
+
return false;
|
|
30
|
+
if (!domain.endsWith(".myshopify.com"))
|
|
31
|
+
return false;
|
|
32
|
+
const sub = domain.slice(0, -".myshopify.com".length);
|
|
33
|
+
if (!sub)
|
|
34
|
+
return false;
|
|
35
|
+
return /^[a-z0-9][a-z0-9-]*$/.test(sub);
|
|
36
|
+
}
|
|
37
|
+
function clampLimit(limit, fallback) {
|
|
38
|
+
if (limit === undefined || limit === null)
|
|
39
|
+
return fallback;
|
|
40
|
+
if (!Number.isFinite(limit) || limit <= 0)
|
|
41
|
+
return fallback;
|
|
42
|
+
return Math.min(Math.floor(limit), SHOPIFY_HARD_LIMIT);
|
|
43
|
+
}
|
|
44
|
+
export class ShopifyConnector extends BaseConnector {
|
|
45
|
+
providerName = "shopify";
|
|
46
|
+
tokens = null;
|
|
47
|
+
getOAuthConfig() {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
async authenticate() {
|
|
51
|
+
const tokens = loadTokens();
|
|
52
|
+
if (!tokens) {
|
|
53
|
+
throw new Error("Shopify not connected. Run: patchwork-os connect shopify or set SHOPIFY_ACCESS_TOKEN + SHOPIFY_SHOP_DOMAIN");
|
|
54
|
+
}
|
|
55
|
+
this.tokens = tokens;
|
|
56
|
+
return {
|
|
57
|
+
token: tokens.accessToken,
|
|
58
|
+
scopes: ["read"],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
async healthCheck() {
|
|
62
|
+
try {
|
|
63
|
+
const result = await this.apiCall(async () => {
|
|
64
|
+
const base = this.requireBaseUrl();
|
|
65
|
+
const res = await fetch(`${base}/shop.json`, {
|
|
66
|
+
headers: this.buildHeaders(),
|
|
67
|
+
});
|
|
68
|
+
if (!res.ok)
|
|
69
|
+
throw res;
|
|
70
|
+
return res.json();
|
|
71
|
+
});
|
|
72
|
+
if ("error" in result)
|
|
73
|
+
return { ok: false, error: result.error };
|
|
74
|
+
return { ok: true };
|
|
75
|
+
}
|
|
76
|
+
catch (err) {
|
|
77
|
+
return { ok: false, error: this.normalizeError(err) };
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
normalizeError(error) {
|
|
81
|
+
if (error instanceof Response) {
|
|
82
|
+
const s = error.status;
|
|
83
|
+
if (s === 401)
|
|
84
|
+
return {
|
|
85
|
+
code: "auth_expired",
|
|
86
|
+
message: "Shopify authentication expired — reconnect",
|
|
87
|
+
retryable: false,
|
|
88
|
+
suggestedAction: "patchwork-os connect shopify",
|
|
89
|
+
};
|
|
90
|
+
if (s === 402)
|
|
91
|
+
return {
|
|
92
|
+
code: "provider_error",
|
|
93
|
+
message: "Shopify shop is frozen — billing issue on the merchant account",
|
|
94
|
+
retryable: false,
|
|
95
|
+
suggestedAction: "Merchant must resolve billing in the Shopify admin dashboard",
|
|
96
|
+
};
|
|
97
|
+
if (s === 403)
|
|
98
|
+
return {
|
|
99
|
+
code: "permission_denied",
|
|
100
|
+
message: "Insufficient Shopify permissions for this resource",
|
|
101
|
+
retryable: false,
|
|
102
|
+
};
|
|
103
|
+
if (s === 404)
|
|
104
|
+
return {
|
|
105
|
+
code: "not_found",
|
|
106
|
+
message: "Shopify resource not found",
|
|
107
|
+
retryable: false,
|
|
108
|
+
};
|
|
109
|
+
if (s === 423)
|
|
110
|
+
return {
|
|
111
|
+
code: "provider_error",
|
|
112
|
+
message: "Shopify shop is locked",
|
|
113
|
+
retryable: false,
|
|
114
|
+
};
|
|
115
|
+
if (s === 429)
|
|
116
|
+
return {
|
|
117
|
+
code: "rate_limited",
|
|
118
|
+
message: "Shopify API rate limit exceeded",
|
|
119
|
+
retryable: true,
|
|
120
|
+
suggestedAction: "Wait and retry",
|
|
121
|
+
};
|
|
122
|
+
return {
|
|
123
|
+
code: "provider_error",
|
|
124
|
+
message: `Shopify API error: HTTP ${s}`,
|
|
125
|
+
retryable: s >= 500,
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
if (error instanceof Error) {
|
|
129
|
+
if (error.message.includes("ENOTFOUND") ||
|
|
130
|
+
error.message.includes("ECONNREFUSED")) {
|
|
131
|
+
return {
|
|
132
|
+
code: "network_error",
|
|
133
|
+
message: `Cannot connect to Shopify: ${error.message}`,
|
|
134
|
+
retryable: true,
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return {
|
|
139
|
+
code: "provider_error",
|
|
140
|
+
message: error instanceof Error ? error.message : String(error),
|
|
141
|
+
retryable: false,
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
getStatus() {
|
|
145
|
+
const tokens = loadTokens();
|
|
146
|
+
return {
|
|
147
|
+
id: "shopify",
|
|
148
|
+
status: tokens ? "connected" : "disconnected",
|
|
149
|
+
lastSync: tokens?.connected_at,
|
|
150
|
+
workspace: tokens?.shopName
|
|
151
|
+
? `${tokens.shopName} (${tokens.shopDomain})`
|
|
152
|
+
: tokens?.shopDomain,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
// ── API Methods ────────────────────────────────────────────────────────────
|
|
156
|
+
async getShop() {
|
|
157
|
+
const result = await this.apiCall(async () => {
|
|
158
|
+
const base = this.requireBaseUrl();
|
|
159
|
+
const res = await fetch(`${base}/shop.json`, {
|
|
160
|
+
headers: this.buildHeaders(),
|
|
161
|
+
});
|
|
162
|
+
if (!res.ok)
|
|
163
|
+
throw res;
|
|
164
|
+
return res.json();
|
|
165
|
+
});
|
|
166
|
+
if ("error" in result)
|
|
167
|
+
throw new Error(result.error.message);
|
|
168
|
+
return result.data.shop;
|
|
169
|
+
}
|
|
170
|
+
async listProducts(params = {}) {
|
|
171
|
+
const result = await this.apiCall(async () => {
|
|
172
|
+
const base = this.requireBaseUrl();
|
|
173
|
+
const qs = new URLSearchParams();
|
|
174
|
+
qs.set("limit", String(clampLimit(params.limit, 50)));
|
|
175
|
+
if (params.status)
|
|
176
|
+
qs.set("status", params.status);
|
|
177
|
+
if (params.vendor)
|
|
178
|
+
qs.set("vendor", params.vendor);
|
|
179
|
+
if (params.productType)
|
|
180
|
+
qs.set("product_type", params.productType);
|
|
181
|
+
const res = await fetch(`${base}/products.json?${qs}`, {
|
|
182
|
+
headers: this.buildHeaders(),
|
|
183
|
+
});
|
|
184
|
+
if (!res.ok)
|
|
185
|
+
throw res;
|
|
186
|
+
return res.json();
|
|
187
|
+
});
|
|
188
|
+
if ("error" in result)
|
|
189
|
+
throw new Error(result.error.message);
|
|
190
|
+
return { data: result.data.products };
|
|
191
|
+
}
|
|
192
|
+
async getProduct(productId) {
|
|
193
|
+
const result = await this.apiCall(async () => {
|
|
194
|
+
const base = this.requireBaseUrl();
|
|
195
|
+
const res = await fetch(`${base}/products/${productId}.json`, {
|
|
196
|
+
headers: this.buildHeaders(),
|
|
197
|
+
});
|
|
198
|
+
if (!res.ok)
|
|
199
|
+
throw res;
|
|
200
|
+
return res.json();
|
|
201
|
+
});
|
|
202
|
+
if ("error" in result)
|
|
203
|
+
throw new Error(result.error.message);
|
|
204
|
+
return result.data.product;
|
|
205
|
+
}
|
|
206
|
+
async listOrders(params = {}) {
|
|
207
|
+
const result = await this.apiCall(async () => {
|
|
208
|
+
const base = this.requireBaseUrl();
|
|
209
|
+
const qs = new URLSearchParams();
|
|
210
|
+
qs.set("limit", String(clampLimit(params.limit, 50)));
|
|
211
|
+
qs.set("status", params.status ?? "any");
|
|
212
|
+
if (params.financialStatus)
|
|
213
|
+
qs.set("financial_status", params.financialStatus);
|
|
214
|
+
if (params.fulfillmentStatus)
|
|
215
|
+
qs.set("fulfillment_status", params.fulfillmentStatus);
|
|
216
|
+
const res = await fetch(`${base}/orders.json?${qs}`, {
|
|
217
|
+
headers: this.buildHeaders(),
|
|
218
|
+
});
|
|
219
|
+
if (!res.ok)
|
|
220
|
+
throw res;
|
|
221
|
+
return res.json();
|
|
222
|
+
});
|
|
223
|
+
if ("error" in result)
|
|
224
|
+
throw new Error(result.error.message);
|
|
225
|
+
return { data: result.data.orders };
|
|
226
|
+
}
|
|
227
|
+
async getOrder(orderId) {
|
|
228
|
+
const result = await this.apiCall(async () => {
|
|
229
|
+
const base = this.requireBaseUrl();
|
|
230
|
+
const res = await fetch(`${base}/orders/${orderId}.json`, {
|
|
231
|
+
headers: this.buildHeaders(),
|
|
232
|
+
});
|
|
233
|
+
if (!res.ok)
|
|
234
|
+
throw res;
|
|
235
|
+
return res.json();
|
|
236
|
+
});
|
|
237
|
+
if ("error" in result)
|
|
238
|
+
throw new Error(result.error.message);
|
|
239
|
+
return result.data.order;
|
|
240
|
+
}
|
|
241
|
+
async listCustomers(params = {}) {
|
|
242
|
+
const result = await this.apiCall(async () => {
|
|
243
|
+
const base = this.requireBaseUrl();
|
|
244
|
+
const qs = new URLSearchParams();
|
|
245
|
+
qs.set("limit", String(clampLimit(params.limit, 50)));
|
|
246
|
+
const path = params.query
|
|
247
|
+
? `/customers/search.json?${(() => {
|
|
248
|
+
qs.set("query", params.query);
|
|
249
|
+
return qs.toString();
|
|
250
|
+
})()}`
|
|
251
|
+
: `/customers.json?${qs}`;
|
|
252
|
+
const res = await fetch(`${base}${path}`, {
|
|
253
|
+
headers: this.buildHeaders(),
|
|
254
|
+
});
|
|
255
|
+
if (!res.ok)
|
|
256
|
+
throw res;
|
|
257
|
+
return res.json();
|
|
258
|
+
});
|
|
259
|
+
if ("error" in result)
|
|
260
|
+
throw new Error(result.error.message);
|
|
261
|
+
return {
|
|
262
|
+
data: result.data.customers,
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
async getCustomer(customerId) {
|
|
266
|
+
const result = await this.apiCall(async () => {
|
|
267
|
+
const base = this.requireBaseUrl();
|
|
268
|
+
const res = await fetch(`${base}/customers/${customerId}.json`, {
|
|
269
|
+
headers: this.buildHeaders(),
|
|
270
|
+
});
|
|
271
|
+
if (!res.ok)
|
|
272
|
+
throw res;
|
|
273
|
+
return res.json();
|
|
274
|
+
});
|
|
275
|
+
if ("error" in result)
|
|
276
|
+
throw new Error(result.error.message);
|
|
277
|
+
return result.data.customer;
|
|
278
|
+
}
|
|
279
|
+
async listInventoryLevels(locationId, params = {}) {
|
|
280
|
+
const result = await this.apiCall(async () => {
|
|
281
|
+
const base = this.requireBaseUrl();
|
|
282
|
+
const qs = new URLSearchParams();
|
|
283
|
+
qs.set("location_ids", String(locationId));
|
|
284
|
+
qs.set("limit", String(clampLimit(params.limit, 50)));
|
|
285
|
+
const res = await fetch(`${base}/inventory_levels.json?${qs}`, {
|
|
286
|
+
headers: this.buildHeaders(),
|
|
287
|
+
});
|
|
288
|
+
if (!res.ok)
|
|
289
|
+
throw res;
|
|
290
|
+
return res.json();
|
|
291
|
+
});
|
|
292
|
+
if ("error" in result)
|
|
293
|
+
throw new Error(result.error.message);
|
|
294
|
+
return {
|
|
295
|
+
data: result.data
|
|
296
|
+
.inventory_levels,
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
// ── Helpers ────────────────────────────────────────────────────────────────
|
|
300
|
+
buildHeaders() {
|
|
301
|
+
const token = this.tokens?.accessToken ?? "";
|
|
302
|
+
return {
|
|
303
|
+
"X-Shopify-Access-Token": token,
|
|
304
|
+
Accept: "application/json",
|
|
305
|
+
"Content-Type": "application/json",
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
requireBaseUrl() {
|
|
309
|
+
const domain = this.tokens?.shopDomain;
|
|
310
|
+
if (!domain) {
|
|
311
|
+
throw new Error("Shopify shopDomain missing — call authenticate() before making API requests");
|
|
312
|
+
}
|
|
313
|
+
return buildBaseUrl(domain);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
// ── Token persistence ────────────────────────────────────────────────────────
|
|
317
|
+
export function loadTokens() {
|
|
318
|
+
const envToken = process.env.SHOPIFY_ACCESS_TOKEN;
|
|
319
|
+
const envDomain = process.env.SHOPIFY_SHOP_DOMAIN;
|
|
320
|
+
if (envToken && envDomain) {
|
|
321
|
+
return {
|
|
322
|
+
accessToken: envToken,
|
|
323
|
+
shopDomain: envDomain,
|
|
324
|
+
connected_at: new Date().toISOString(),
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
return getSecretJsonSync("shopify");
|
|
328
|
+
}
|
|
329
|
+
export function saveTokens(tokens) {
|
|
330
|
+
storeSecretJsonSync("shopify", tokens);
|
|
331
|
+
}
|
|
332
|
+
export function clearTokens() {
|
|
333
|
+
try {
|
|
334
|
+
deleteSecretJsonSync("shopify");
|
|
335
|
+
}
|
|
336
|
+
catch {
|
|
337
|
+
// ignore
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
// ── Singleton instance ───────────────────────────────────────────────────────
|
|
341
|
+
let _instance = null;
|
|
342
|
+
function resetShopifyConnector() {
|
|
343
|
+
_instance = null;
|
|
344
|
+
}
|
|
345
|
+
export function getShopifyConnector() {
|
|
346
|
+
if (!_instance) {
|
|
347
|
+
_instance = new ShopifyConnector();
|
|
348
|
+
}
|
|
349
|
+
return _instance;
|
|
350
|
+
}
|
|
351
|
+
export { getShopifyConnector as shopify };
|
|
352
|
+
/**
|
|
353
|
+
* POST /connections/shopify/connect { accessToken, shopDomain }
|
|
354
|
+
*/
|
|
355
|
+
export async function handleShopifyConnect(body) {
|
|
356
|
+
let accessToken;
|
|
357
|
+
let shopDomain;
|
|
358
|
+
try {
|
|
359
|
+
const parsed = JSON.parse(body);
|
|
360
|
+
if (typeof parsed.accessToken !== "string" || !parsed.accessToken) {
|
|
361
|
+
return {
|
|
362
|
+
status: 400,
|
|
363
|
+
contentType: "application/json",
|
|
364
|
+
body: JSON.stringify({ ok: false, error: "accessToken is required" }),
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
if (typeof parsed.shopDomain !== "string" || !parsed.shopDomain) {
|
|
368
|
+
return {
|
|
369
|
+
status: 400,
|
|
370
|
+
contentType: "application/json",
|
|
371
|
+
body: JSON.stringify({ ok: false, error: "shopDomain is required" }),
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
accessToken = parsed.accessToken;
|
|
375
|
+
shopDomain = parsed.shopDomain.trim().toLowerCase();
|
|
376
|
+
}
|
|
377
|
+
catch {
|
|
378
|
+
return {
|
|
379
|
+
status: 400,
|
|
380
|
+
contentType: "application/json",
|
|
381
|
+
body: JSON.stringify({ ok: false, error: "Invalid JSON body" }),
|
|
382
|
+
};
|
|
383
|
+
}
|
|
384
|
+
if (!isValidShopDomain(shopDomain)) {
|
|
385
|
+
return {
|
|
386
|
+
status: 400,
|
|
387
|
+
contentType: "application/json",
|
|
388
|
+
body: JSON.stringify({
|
|
389
|
+
ok: false,
|
|
390
|
+
error: "shopDomain must be a valid Shopify permanent domain (e.g. acme-store.myshopify.com)",
|
|
391
|
+
}),
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
try {
|
|
395
|
+
const res = await fetch(`${buildBaseUrl(shopDomain)}/shop.json`, {
|
|
396
|
+
headers: {
|
|
397
|
+
"X-Shopify-Access-Token": accessToken,
|
|
398
|
+
Accept: "application/json",
|
|
399
|
+
},
|
|
400
|
+
});
|
|
401
|
+
if (!res.ok) {
|
|
402
|
+
return {
|
|
403
|
+
status: 401,
|
|
404
|
+
contentType: "application/json",
|
|
405
|
+
body: JSON.stringify({
|
|
406
|
+
ok: false,
|
|
407
|
+
error: `Credentials rejected by Shopify (HTTP ${res.status}) — check accessToken + shopDomain`,
|
|
408
|
+
}),
|
|
409
|
+
};
|
|
410
|
+
}
|
|
411
|
+
const payload = (await res.json());
|
|
412
|
+
const shop = payload.shop ?? {};
|
|
413
|
+
if (typeof shop.myshopify_domain === "string" &&
|
|
414
|
+
shop.myshopify_domain.toLowerCase() !== shopDomain) {
|
|
415
|
+
return {
|
|
416
|
+
status: 400,
|
|
417
|
+
contentType: "application/json",
|
|
418
|
+
body: JSON.stringify({
|
|
419
|
+
ok: false,
|
|
420
|
+
error: `shopDomain mismatch: token belongs to ${shop.myshopify_domain}, not ${shopDomain}`,
|
|
421
|
+
}),
|
|
422
|
+
};
|
|
423
|
+
}
|
|
424
|
+
const shopName = typeof shop.name === "string" ? shop.name : undefined;
|
|
425
|
+
const planName = typeof shop.plan_name === "string" ? shop.plan_name : undefined;
|
|
426
|
+
const tokens = {
|
|
427
|
+
accessToken,
|
|
428
|
+
shopDomain,
|
|
429
|
+
shopName,
|
|
430
|
+
planName,
|
|
431
|
+
connected_at: new Date().toISOString(),
|
|
432
|
+
};
|
|
433
|
+
saveTokens(tokens);
|
|
434
|
+
resetShopifyConnector();
|
|
435
|
+
return {
|
|
436
|
+
status: 200,
|
|
437
|
+
contentType: "application/json",
|
|
438
|
+
body: JSON.stringify({
|
|
439
|
+
ok: true,
|
|
440
|
+
shopDomain,
|
|
441
|
+
shopName,
|
|
442
|
+
planName,
|
|
443
|
+
connectedAt: tokens.connected_at,
|
|
444
|
+
}),
|
|
445
|
+
};
|
|
446
|
+
}
|
|
447
|
+
catch (err) {
|
|
448
|
+
return {
|
|
449
|
+
status: 500,
|
|
450
|
+
contentType: "application/json",
|
|
451
|
+
body: JSON.stringify({
|
|
452
|
+
ok: false,
|
|
453
|
+
error: err instanceof Error ? err.message : String(err),
|
|
454
|
+
}),
|
|
455
|
+
};
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* POST /connections/shopify/test
|
|
460
|
+
*/
|
|
461
|
+
export async function handleShopifyTest() {
|
|
462
|
+
const tokens = loadTokens();
|
|
463
|
+
if (!tokens) {
|
|
464
|
+
return {
|
|
465
|
+
status: 400,
|
|
466
|
+
contentType: "application/json",
|
|
467
|
+
body: JSON.stringify({ ok: false, error: "Shopify not connected" }),
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
try {
|
|
471
|
+
const connector = getShopifyConnector();
|
|
472
|
+
const check = await connector.healthCheck();
|
|
473
|
+
return {
|
|
474
|
+
status: check.ok ? 200 : 401,
|
|
475
|
+
contentType: "application/json",
|
|
476
|
+
body: JSON.stringify(check.ok ? { ok: true } : { ok: false, error: check.error?.message }),
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
catch (err) {
|
|
480
|
+
return {
|
|
481
|
+
status: 500,
|
|
482
|
+
contentType: "application/json",
|
|
483
|
+
body: JSON.stringify({
|
|
484
|
+
ok: false,
|
|
485
|
+
error: err instanceof Error ? err.message : String(err),
|
|
486
|
+
}),
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* DELETE /connections/shopify
|
|
492
|
+
*/
|
|
493
|
+
export async function handleShopifyDisconnect() {
|
|
494
|
+
clearTokens();
|
|
495
|
+
resetShopifyConnector();
|
|
496
|
+
return {
|
|
497
|
+
status: 200,
|
|
498
|
+
contentType: "application/json",
|
|
499
|
+
body: JSON.stringify({ ok: true }),
|
|
500
|
+
};
|
|
501
|
+
}
|
|
502
|
+
//# sourceMappingURL=shopify.js.map
|