@contractspec/integration.providers-impls 3.0.0 → 3.1.1
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.md +59 -9
- package/dist/impls/async-event-queue.js +2 -0
- package/dist/impls/composio-fallback-resolver.d.ts +34 -0
- package/dist/impls/composio-fallback-resolver.js +580 -0
- package/dist/impls/composio-mcp.d.ts +22 -0
- package/dist/impls/composio-mcp.js +164 -0
- package/dist/impls/composio-proxies.d.ts +60 -0
- package/dist/impls/composio-proxies.js +311 -0
- package/dist/impls/composio-sdk.d.ts +25 -0
- package/dist/impls/composio-sdk.js +78 -0
- package/dist/impls/composio-types.d.ts +43 -0
- package/dist/impls/composio-types.js +54 -0
- package/dist/impls/elevenlabs-voice.js +2 -0
- package/dist/impls/fal-voice.js +2 -0
- package/dist/impls/fathom-meeting-recorder.js +2 -0
- package/dist/impls/fathom-meeting-recorder.mapper.js +2 -0
- package/dist/impls/fathom-meeting-recorder.utils.js +2 -0
- package/dist/impls/fathom-meeting-recorder.webhooks.js +2 -0
- package/dist/impls/fireflies-meeting-recorder.js +2 -0
- package/dist/impls/fireflies-meeting-recorder.queries.js +2 -0
- package/dist/impls/fireflies-meeting-recorder.utils.js +2 -0
- package/dist/impls/gcs-storage.js +2 -0
- package/dist/impls/gmail-inbound.js +2 -0
- package/dist/impls/gmail-outbound.js +2 -0
- package/dist/impls/google-calendar.js +2 -0
- package/dist/impls/gradium-voice.js +2 -0
- package/dist/impls/granola-meeting-recorder.js +2 -0
- package/dist/impls/granola-meeting-recorder.mcp.js +2 -0
- package/dist/impls/health/base-health-provider.js +2 -0
- package/dist/impls/health/hybrid-health-providers.js +2 -0
- package/dist/impls/health/official-health-providers.js +2 -0
- package/dist/impls/health/provider-normalizers.js +2 -0
- package/dist/impls/health/providers.js +2 -0
- package/dist/impls/health-provider-factory.js +2 -0
- package/dist/impls/index.d.ts +5 -0
- package/dist/impls/index.js +657 -0
- package/dist/impls/jira.js +2 -0
- package/dist/impls/linear.js +2 -0
- package/dist/impls/messaging-github.js +2 -0
- package/dist/impls/messaging-slack.js +2 -0
- package/dist/impls/messaging-whatsapp-meta.js +2 -0
- package/dist/impls/messaging-whatsapp-twilio.js +2 -0
- package/dist/impls/mistral-conversational.js +2 -0
- package/dist/impls/mistral-conversational.session.js +2 -0
- package/dist/impls/mistral-embedding.js +2 -0
- package/dist/impls/mistral-llm.js +2 -0
- package/dist/impls/mistral-stt.js +2 -0
- package/dist/impls/notion.js +2 -0
- package/dist/impls/posthog-reader.js +2 -0
- package/dist/impls/posthog-utils.js +2 -0
- package/dist/impls/posthog.js +2 -0
- package/dist/impls/postmark-email.js +2 -0
- package/dist/impls/powens-client.js +2 -0
- package/dist/impls/powens-openbanking.js +2 -0
- package/dist/impls/provider-factory.d.ts +24 -0
- package/dist/impls/provider-factory.js +70 -0
- package/dist/impls/qdrant-vector.js +2 -0
- package/dist/impls/stripe-payments.js +2 -0
- package/dist/impls/supabase-psql.js +2 -0
- package/dist/impls/supabase-vector.js +2 -0
- package/dist/impls/tldv-meeting-recorder.js +2 -0
- package/dist/impls/twilio-sms.js +2 -0
- package/dist/index.js +657 -0
- package/dist/node/impls/async-event-queue.js +3 -0
- package/dist/node/impls/composio-fallback-resolver.js +580 -0
- package/dist/node/impls/composio-mcp.js +164 -0
- package/dist/node/impls/composio-proxies.js +311 -0
- package/dist/node/impls/composio-sdk.js +78 -0
- package/dist/node/impls/composio-types.js +54 -0
- package/dist/node/impls/elevenlabs-voice.js +3 -0
- package/dist/node/impls/fal-voice.js +3 -0
- package/dist/node/impls/fathom-meeting-recorder.js +3 -0
- package/dist/node/impls/fathom-meeting-recorder.mapper.js +3 -0
- package/dist/node/impls/fathom-meeting-recorder.utils.js +3 -0
- package/dist/node/impls/fathom-meeting-recorder.webhooks.js +3 -0
- package/dist/node/impls/fireflies-meeting-recorder.js +3 -0
- package/dist/node/impls/fireflies-meeting-recorder.queries.js +3 -0
- package/dist/node/impls/fireflies-meeting-recorder.utils.js +3 -0
- package/dist/node/impls/gcs-storage.js +3 -0
- package/dist/node/impls/gmail-inbound.js +3 -0
- package/dist/node/impls/gmail-outbound.js +3 -0
- package/dist/node/impls/google-calendar.js +3 -0
- package/dist/node/impls/gradium-voice.js +3 -0
- package/dist/node/impls/granola-meeting-recorder.js +3 -0
- package/dist/node/impls/granola-meeting-recorder.mcp.js +3 -0
- package/dist/node/impls/health/base-health-provider.js +3 -0
- package/dist/node/impls/health/hybrid-health-providers.js +3 -0
- package/dist/node/impls/health/official-health-providers.js +3 -0
- package/dist/node/impls/health/provider-normalizers.js +3 -0
- package/dist/node/impls/health/providers.js +3 -0
- package/dist/node/impls/health-provider-factory.js +3 -0
- package/dist/node/impls/index.js +658 -0
- package/dist/node/impls/jira.js +3 -0
- package/dist/node/impls/linear.js +3 -0
- package/dist/node/impls/messaging-github.js +3 -0
- package/dist/node/impls/messaging-slack.js +3 -0
- package/dist/node/impls/messaging-whatsapp-meta.js +3 -0
- package/dist/node/impls/messaging-whatsapp-twilio.js +3 -0
- package/dist/node/impls/mistral-conversational.js +3 -0
- package/dist/node/impls/mistral-conversational.session.js +3 -0
- package/dist/node/impls/mistral-embedding.js +3 -0
- package/dist/node/impls/mistral-llm.js +3 -0
- package/dist/node/impls/mistral-stt.js +3 -0
- package/dist/node/impls/notion.js +3 -0
- package/dist/node/impls/posthog-reader.js +3 -0
- package/dist/node/impls/posthog-utils.js +3 -0
- package/dist/node/impls/posthog.js +3 -0
- package/dist/node/impls/postmark-email.js +3 -0
- package/dist/node/impls/powens-client.js +3 -0
- package/dist/node/impls/powens-openbanking.js +3 -0
- package/dist/node/impls/provider-factory.js +71 -0
- package/dist/node/impls/qdrant-vector.js +3 -0
- package/dist/node/impls/stripe-payments.js +3 -0
- package/dist/node/impls/supabase-psql.js +3 -0
- package/dist/node/impls/supabase-vector.js +3 -0
- package/dist/node/impls/tldv-meeting-recorder.js +3 -0
- package/dist/node/impls/twilio-sms.js +3 -0
- package/dist/node/index.js +658 -0
- package/dist/node/secrets/provider.js +3 -0
- package/dist/secrets/provider.js +2 -0
- package/package.json +71 -10
package/dist/node/impls/jira.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
3
|
+
|
|
1
4
|
// src/impls/async-event-queue.ts
|
|
2
5
|
class AsyncEventQueue {
|
|
3
6
|
values = [];
|
|
@@ -5856,9 +5859,29 @@ async function safeReadError4(response) {
|
|
|
5856
5859
|
|
|
5857
5860
|
// src/impls/provider-factory.ts
|
|
5858
5861
|
import { Buffer as Buffer6 } from "node:buffer";
|
|
5862
|
+
import { resolveIntegrationRequestContext } from "@contractspec/lib.contracts-integrations/integrations/runtime";
|
|
5863
|
+
import { buildAuthHeaders } from "@contractspec/lib.contracts-integrations/integrations/auth-helpers";
|
|
5864
|
+
import { findAuthConfig } from "@contractspec/lib.contracts-integrations/integrations/auth";
|
|
5859
5865
|
var SECRET_CACHE = new Map;
|
|
5860
5866
|
|
|
5861
5867
|
class IntegrationProviderFactory {
|
|
5868
|
+
composioFallback;
|
|
5869
|
+
constructor(options) {
|
|
5870
|
+
this.composioFallback = options?.composioFallback;
|
|
5871
|
+
}
|
|
5872
|
+
async resolveProviderContext(context) {
|
|
5873
|
+
const secrets = await this.loadSecrets(context);
|
|
5874
|
+
const { transport, authMethod, apiVersion } = resolveIntegrationRequestContext(context.spec, context.connection);
|
|
5875
|
+
let authHeaders = {};
|
|
5876
|
+
if (authMethod && context.spec.supportedAuthMethods) {
|
|
5877
|
+
const authConfig = findAuthConfig(context.spec.supportedAuthMethods, authMethod);
|
|
5878
|
+
if (authConfig) {
|
|
5879
|
+
const stringSecrets = Object.fromEntries(Object.entries(secrets).filter(([, v]) => typeof v === "string").map(([k, v]) => [k, v]));
|
|
5880
|
+
authHeaders = buildAuthHeaders(authConfig, stringSecrets);
|
|
5881
|
+
}
|
|
5882
|
+
}
|
|
5883
|
+
return { transport, authMethod, apiVersion, authHeaders, secrets };
|
|
5884
|
+
}
|
|
5862
5885
|
async createPaymentsProvider(context) {
|
|
5863
5886
|
const secrets = await this.loadSecrets(context);
|
|
5864
5887
|
switch (context.spec.meta.key) {
|
|
@@ -5867,6 +5890,9 @@ class IntegrationProviderFactory {
|
|
|
5867
5890
|
apiKey: requireSecret(secrets, "apiKey", "Stripe API key is required")
|
|
5868
5891
|
});
|
|
5869
5892
|
default:
|
|
5893
|
+
if (this.composioFallback?.canHandle(context.spec.meta.key)) {
|
|
5894
|
+
return this.composioFallback.createPaymentsProxy(context);
|
|
5895
|
+
}
|
|
5870
5896
|
throw new Error(`Unsupported payments integration: ${context.spec.meta.key}`);
|
|
5871
5897
|
}
|
|
5872
5898
|
}
|
|
@@ -5880,6 +5906,9 @@ class IntegrationProviderFactory {
|
|
|
5880
5906
|
messageStream: context.config.messageStream
|
|
5881
5907
|
});
|
|
5882
5908
|
default:
|
|
5909
|
+
if (this.composioFallback?.canHandle(context.spec.meta.key)) {
|
|
5910
|
+
return this.composioFallback.createEmailProxy(context);
|
|
5911
|
+
}
|
|
5883
5912
|
throw new Error(`Unsupported email integration: ${context.spec.meta.key}`);
|
|
5884
5913
|
}
|
|
5885
5914
|
}
|
|
@@ -5893,6 +5922,9 @@ class IntegrationProviderFactory {
|
|
|
5893
5922
|
fromNumber: context.config.fromNumber
|
|
5894
5923
|
});
|
|
5895
5924
|
default:
|
|
5925
|
+
if (this.composioFallback?.canHandle(context.spec.meta.key)) {
|
|
5926
|
+
return this.composioFallback.createMessagingProxy(context);
|
|
5927
|
+
}
|
|
5896
5928
|
throw new Error(`Unsupported SMS integration: ${context.spec.meta.key}`);
|
|
5897
5929
|
}
|
|
5898
5930
|
}
|
|
@@ -5926,6 +5958,9 @@ class IntegrationProviderFactory {
|
|
|
5926
5958
|
fromNumber: config?.fromNumber
|
|
5927
5959
|
});
|
|
5928
5960
|
default:
|
|
5961
|
+
if (this.composioFallback?.canHandle(context.spec.meta.key)) {
|
|
5962
|
+
return this.composioFallback.createMessagingProxy(context);
|
|
5963
|
+
}
|
|
5929
5964
|
throw new Error(`Unsupported messaging integration: ${context.spec.meta.key}`);
|
|
5930
5965
|
}
|
|
5931
5966
|
}
|
|
@@ -5949,6 +5984,9 @@ class IntegrationProviderFactory {
|
|
|
5949
5984
|
sslMode: config?.sslMode
|
|
5950
5985
|
});
|
|
5951
5986
|
default:
|
|
5987
|
+
if (this.composioFallback?.canHandle(context.spec.meta.key)) {
|
|
5988
|
+
return this.composioFallback.createGenericProxy(context);
|
|
5989
|
+
}
|
|
5952
5990
|
throw new Error(`Unsupported vector store integration: ${context.spec.meta.key}`);
|
|
5953
5991
|
}
|
|
5954
5992
|
}
|
|
@@ -5965,6 +6003,9 @@ class IntegrationProviderFactory {
|
|
|
5965
6003
|
personalApiKey: requireSecret(secrets, "personalApiKey", "PostHog personalApiKey is required")
|
|
5966
6004
|
});
|
|
5967
6005
|
default:
|
|
6006
|
+
if (this.composioFallback?.canHandle(context.spec.meta.key)) {
|
|
6007
|
+
return this.composioFallback.createGenericProxy(context);
|
|
6008
|
+
}
|
|
5968
6009
|
throw new Error(`Unsupported analytics integration: ${context.spec.meta.key}`);
|
|
5969
6010
|
}
|
|
5970
6011
|
}
|
|
@@ -5979,6 +6020,9 @@ class IntegrationProviderFactory {
|
|
|
5979
6020
|
sslMode: config?.sslMode
|
|
5980
6021
|
});
|
|
5981
6022
|
default:
|
|
6023
|
+
if (this.composioFallback?.canHandle(context.spec.meta.key)) {
|
|
6024
|
+
return this.composioFallback.createGenericProxy(context);
|
|
6025
|
+
}
|
|
5982
6026
|
throw new Error(`Unsupported database integration: ${context.spec.meta.key}`);
|
|
5983
6027
|
}
|
|
5984
6028
|
}
|
|
@@ -5992,6 +6036,9 @@ class IntegrationProviderFactory {
|
|
|
5992
6036
|
clientOptions: secrets.type === "service_account" ? { credentials: secrets } : undefined
|
|
5993
6037
|
});
|
|
5994
6038
|
default:
|
|
6039
|
+
if (this.composioFallback?.canHandle(context.spec.meta.key)) {
|
|
6040
|
+
return this.composioFallback.createGenericProxy(context);
|
|
6041
|
+
}
|
|
5995
6042
|
throw new Error(`Unsupported storage integration: ${context.spec.meta.key}`);
|
|
5996
6043
|
}
|
|
5997
6044
|
}
|
|
@@ -6024,6 +6071,9 @@ class IntegrationProviderFactory {
|
|
|
6024
6071
|
pollIntervalMs: config?.pollIntervalMs
|
|
6025
6072
|
});
|
|
6026
6073
|
default:
|
|
6074
|
+
if (this.composioFallback?.canHandle(context.spec.meta.key)) {
|
|
6075
|
+
return this.composioFallback.createGenericProxy(context);
|
|
6076
|
+
}
|
|
6027
6077
|
throw new Error(`Unsupported voice integration: ${context.spec.meta.key}`);
|
|
6028
6078
|
}
|
|
6029
6079
|
}
|
|
@@ -6039,6 +6089,9 @@ class IntegrationProviderFactory {
|
|
|
6039
6089
|
serverURL: config?.serverURL
|
|
6040
6090
|
});
|
|
6041
6091
|
default:
|
|
6092
|
+
if (this.composioFallback?.canHandle(context.spec.meta.key)) {
|
|
6093
|
+
return this.composioFallback.createGenericProxy(context);
|
|
6094
|
+
}
|
|
6042
6095
|
throw new Error(`Unsupported STT integration: ${context.spec.meta.key}`);
|
|
6043
6096
|
}
|
|
6044
6097
|
}
|
|
@@ -6059,6 +6112,9 @@ class IntegrationProviderFactory {
|
|
|
6059
6112
|
}
|
|
6060
6113
|
});
|
|
6061
6114
|
default:
|
|
6115
|
+
if (this.composioFallback?.canHandle(context.spec.meta.key)) {
|
|
6116
|
+
return this.composioFallback.createGenericProxy(context);
|
|
6117
|
+
}
|
|
6062
6118
|
throw new Error(`Unsupported conversational integration: ${context.spec.meta.key}`);
|
|
6063
6119
|
}
|
|
6064
6120
|
}
|
|
@@ -6099,6 +6155,9 @@ class IntegrationProviderFactory {
|
|
|
6099
6155
|
descriptionProperty: config?.descriptionProperty
|
|
6100
6156
|
});
|
|
6101
6157
|
default:
|
|
6158
|
+
if (this.composioFallback?.canHandle(context.spec.meta.key)) {
|
|
6159
|
+
return this.composioFallback.createProjectManagementProxy(context);
|
|
6160
|
+
}
|
|
6102
6161
|
throw new Error(`Unsupported project management integration: ${context.spec.meta.key}`);
|
|
6103
6162
|
}
|
|
6104
6163
|
}
|
|
@@ -6147,6 +6206,9 @@ class IntegrationProviderFactory {
|
|
|
6147
6206
|
webhookSecret: secrets.webhookSecret
|
|
6148
6207
|
});
|
|
6149
6208
|
default:
|
|
6209
|
+
if (this.composioFallback?.canHandle(context.spec.meta.key)) {
|
|
6210
|
+
return this.composioFallback.createGenericProxy(context);
|
|
6211
|
+
}
|
|
6150
6212
|
throw new Error(`Unsupported meeting recorder integration: ${context.spec.meta.key}`);
|
|
6151
6213
|
}
|
|
6152
6214
|
}
|
|
@@ -6159,6 +6221,9 @@ class IntegrationProviderFactory {
|
|
|
6159
6221
|
defaultModel: context.config.model
|
|
6160
6222
|
});
|
|
6161
6223
|
default:
|
|
6224
|
+
if (this.composioFallback?.canHandle(context.spec.meta.key)) {
|
|
6225
|
+
return this.composioFallback.createGenericProxy(context);
|
|
6226
|
+
}
|
|
6162
6227
|
throw new Error(`Unsupported LLM integration: ${context.spec.meta.key}`);
|
|
6163
6228
|
}
|
|
6164
6229
|
}
|
|
@@ -6171,6 +6236,9 @@ class IntegrationProviderFactory {
|
|
|
6171
6236
|
defaultModel: context.config.embeddingModel
|
|
6172
6237
|
});
|
|
6173
6238
|
default:
|
|
6239
|
+
if (this.composioFallback?.canHandle(context.spec.meta.key)) {
|
|
6240
|
+
return this.composioFallback.createGenericProxy(context);
|
|
6241
|
+
}
|
|
6174
6242
|
throw new Error(`Unsupported embeddings integration: ${context.spec.meta.key}`);
|
|
6175
6243
|
}
|
|
6176
6244
|
}
|
|
@@ -6192,6 +6260,9 @@ class IntegrationProviderFactory {
|
|
|
6192
6260
|
});
|
|
6193
6261
|
}
|
|
6194
6262
|
default:
|
|
6263
|
+
if (this.composioFallback?.canHandle(context.spec.meta.key)) {
|
|
6264
|
+
return this.composioFallback.createGenericProxy(context);
|
|
6265
|
+
}
|
|
6195
6266
|
throw new Error(`Unsupported open banking integration: ${context.spec.meta.key}`);
|
|
6196
6267
|
}
|
|
6197
6268
|
}
|