@contractspec/integration.providers-impls 1.56.1 → 1.58.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/README.md +115 -1
- package/dist/analytics.d.ts +2 -0
- package/dist/analytics.d.ts.map +1 -0
- package/dist/analytics.js +3 -0
- package/dist/calendar.d.ts +1 -7
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +3 -3
- package/dist/database.d.ts +2 -0
- package/dist/database.d.ts.map +1 -0
- package/dist/database.js +3 -0
- package/dist/email.d.ts +1 -7
- package/dist/email.d.ts.map +1 -1
- package/dist/email.js +3 -3
- package/dist/embedding.d.ts +1 -7
- package/dist/embedding.d.ts.map +1 -1
- package/dist/embedding.js +3 -3
- package/dist/impls/elevenlabs-voice.d.ts +14 -18
- package/dist/impls/elevenlabs-voice.d.ts.map +1 -1
- package/dist/impls/elevenlabs-voice.js +98 -88
- package/dist/impls/fal-voice.d.ts +25 -0
- package/dist/impls/fal-voice.d.ts.map +1 -0
- package/dist/impls/fal-voice.js +113 -0
- package/dist/impls/fathom-meeting-recorder.d.ts +38 -0
- package/dist/impls/fathom-meeting-recorder.d.ts.map +1 -0
- package/dist/impls/fathom-meeting-recorder.js +288 -0
- package/dist/impls/fathom-meeting-recorder.mapper.d.ts +5 -0
- package/dist/impls/fathom-meeting-recorder.mapper.d.ts.map +1 -0
- package/dist/impls/fathom-meeting-recorder.mapper.js +106 -0
- package/dist/impls/fathom-meeting-recorder.types.d.ts +20 -0
- package/dist/impls/fathom-meeting-recorder.types.d.ts.map +1 -0
- package/dist/impls/fathom-meeting-recorder.types.js +1 -0
- package/dist/impls/fathom-meeting-recorder.utils.d.ts +11 -0
- package/dist/impls/fathom-meeting-recorder.utils.d.ts.map +1 -0
- package/dist/impls/fathom-meeting-recorder.utils.js +73 -0
- package/dist/impls/fathom-meeting-recorder.webhooks.d.ts +4 -0
- package/dist/impls/fathom-meeting-recorder.webhooks.d.ts.map +1 -0
- package/dist/impls/fathom-meeting-recorder.webhooks.js +30 -0
- package/dist/impls/fireflies-meeting-recorder.d.ts +24 -0
- package/dist/impls/fireflies-meeting-recorder.d.ts.map +1 -0
- package/dist/impls/fireflies-meeting-recorder.js +275 -0
- package/dist/impls/fireflies-meeting-recorder.queries.d.ts +4 -0
- package/dist/impls/fireflies-meeting-recorder.queries.d.ts.map +1 -0
- package/dist/impls/fireflies-meeting-recorder.queries.js +86 -0
- package/dist/impls/fireflies-meeting-recorder.types.d.ts +32 -0
- package/dist/impls/fireflies-meeting-recorder.types.d.ts.map +1 -0
- package/dist/impls/fireflies-meeting-recorder.types.js +1 -0
- package/dist/impls/fireflies-meeting-recorder.utils.d.ts +5 -0
- package/dist/impls/fireflies-meeting-recorder.utils.d.ts.map +1 -0
- package/dist/impls/fireflies-meeting-recorder.utils.js +43 -0
- package/dist/impls/gcs-storage.d.ts +18 -22
- package/dist/impls/gcs-storage.d.ts.map +1 -1
- package/dist/impls/gcs-storage.js +92 -84
- package/dist/impls/gmail-inbound.d.ts +20 -24
- package/dist/impls/gmail-inbound.d.ts.map +1 -1
- package/dist/impls/gmail-inbound.js +212 -185
- package/dist/impls/gmail-outbound.d.ts +12 -16
- package/dist/impls/gmail-outbound.d.ts.map +1 -1
- package/dist/impls/gmail-outbound.js +126 -92
- package/dist/impls/google-calendar.d.ts +17 -21
- package/dist/impls/google-calendar.d.ts.map +1 -1
- package/dist/impls/google-calendar.js +182 -145
- package/dist/impls/gradium-voice.d.ts +24 -0
- package/dist/impls/gradium-voice.d.ts.map +1 -0
- package/dist/impls/gradium-voice.js +91 -0
- package/dist/impls/granola-meeting-recorder.d.ts +34 -0
- package/dist/impls/granola-meeting-recorder.d.ts.map +1 -0
- package/dist/impls/granola-meeting-recorder.js +513 -0
- package/dist/impls/granola-meeting-recorder.mcp.d.ts +25 -0
- package/dist/impls/granola-meeting-recorder.mcp.d.ts.map +1 -0
- package/dist/impls/granola-meeting-recorder.mcp.js +279 -0
- package/dist/impls/granola-meeting-recorder.types.d.ts +61 -0
- package/dist/impls/granola-meeting-recorder.types.d.ts.map +1 -0
- package/dist/impls/granola-meeting-recorder.types.js +1 -0
- package/dist/impls/index.d.ts +28 -15
- package/dist/impls/index.d.ts.map +1 -0
- package/dist/impls/index.js +4659 -16
- package/dist/impls/jira.d.ts +21 -0
- package/dist/impls/jira.d.ts.map +1 -0
- package/dist/impls/jira.js +125 -0
- package/dist/impls/linear.d.ts +20 -0
- package/dist/impls/linear.d.ts.map +1 -0
- package/dist/impls/linear.js +84 -0
- package/dist/impls/mistral-embedding.d.ts +17 -21
- package/dist/impls/mistral-embedding.d.ts.map +1 -1
- package/dist/impls/mistral-embedding.js +41 -39
- package/dist/impls/mistral-llm.d.ts +25 -29
- package/dist/impls/mistral-llm.d.ts.map +1 -1
- package/dist/impls/mistral-llm.js +266 -244
- package/dist/impls/notion.d.ts +23 -0
- package/dist/impls/notion.d.ts.map +1 -0
- package/dist/impls/notion.js +161 -0
- package/dist/impls/posthog-reader.d.ts +22 -0
- package/dist/impls/posthog-reader.d.ts.map +1 -0
- package/dist/impls/posthog-reader.js +160 -0
- package/dist/impls/posthog-utils.d.ts +5 -0
- package/dist/impls/posthog-utils.d.ts.map +1 -0
- package/dist/impls/posthog-utils.js +39 -0
- package/dist/impls/posthog.d.ts +36 -0
- package/dist/impls/posthog.d.ts.map +1 -0
- package/dist/impls/posthog.js +323 -0
- package/dist/impls/postmark-email.d.ts +13 -17
- package/dist/impls/postmark-email.d.ts.map +1 -1
- package/dist/impls/postmark-email.js +55 -50
- package/dist/impls/powens-client.d.ts +111 -114
- package/dist/impls/powens-client.d.ts.map +1 -1
- package/dist/impls/powens-client.js +194 -170
- package/dist/impls/powens-openbanking.d.ts +22 -26
- package/dist/impls/powens-openbanking.d.ts.map +1 -1
- package/dist/impls/powens-openbanking.js +425 -217
- package/dist/impls/provider-factory.d.ts +29 -25
- package/dist/impls/provider-factory.d.ts.map +1 -1
- package/dist/impls/provider-factory.js +4074 -136
- package/dist/impls/qdrant-vector.d.ts +18 -22
- package/dist/impls/qdrant-vector.d.ts.map +1 -1
- package/dist/impls/qdrant-vector.js +76 -69
- package/dist/impls/stripe-payments.d.ts +22 -26
- package/dist/impls/stripe-payments.d.ts.map +1 -1
- package/dist/impls/stripe-payments.js +219 -193
- package/dist/impls/supabase-psql.d.ts +24 -0
- package/dist/impls/supabase-psql.d.ts.map +1 -0
- package/dist/impls/supabase-psql.js +151 -0
- package/dist/impls/supabase-vector.d.ts +32 -0
- package/dist/impls/supabase-vector.d.ts.map +1 -0
- package/dist/impls/supabase-vector.js +324 -0
- package/dist/impls/tldv-meeting-recorder.d.ts +21 -0
- package/dist/impls/tldv-meeting-recorder.d.ts.map +1 -0
- package/dist/impls/tldv-meeting-recorder.js +146 -0
- package/dist/impls/twilio-sms.d.ts +14 -17
- package/dist/impls/twilio-sms.d.ts.map +1 -1
- package/dist/impls/twilio-sms.js +62 -55
- package/dist/index.d.ts +15 -43
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4700 -69
- package/dist/llm.d.ts +1 -7
- package/dist/llm.d.ts.map +1 -1
- package/dist/llm.js +3 -3
- package/dist/meeting-recorder.d.ts +2 -0
- package/dist/meeting-recorder.d.ts.map +1 -0
- package/dist/meeting-recorder.js +3 -0
- package/dist/node/analytics.js +2 -0
- package/dist/node/calendar.js +2 -0
- package/dist/node/database.js +2 -0
- package/dist/node/email.js +2 -0
- package/dist/node/embedding.js +2 -0
- package/dist/node/impls/elevenlabs-voice.js +102 -0
- package/dist/node/impls/fal-voice.js +112 -0
- package/dist/node/impls/fathom-meeting-recorder.js +287 -0
- package/dist/node/impls/fathom-meeting-recorder.mapper.js +105 -0
- package/dist/node/impls/fathom-meeting-recorder.types.js +0 -0
- package/dist/node/impls/fathom-meeting-recorder.utils.js +72 -0
- package/dist/node/impls/fathom-meeting-recorder.webhooks.js +29 -0
- package/dist/node/impls/fireflies-meeting-recorder.js +274 -0
- package/dist/node/impls/fireflies-meeting-recorder.queries.js +85 -0
- package/dist/node/impls/fireflies-meeting-recorder.types.js +0 -0
- package/dist/node/impls/fireflies-meeting-recorder.utils.js +42 -0
- package/dist/node/impls/gcs-storage.js +97 -0
- package/dist/node/impls/gmail-inbound.js +227 -0
- package/dist/node/impls/gmail-outbound.js +139 -0
- package/dist/node/impls/google-calendar.js +191 -0
- package/dist/node/impls/gradium-voice.js +90 -0
- package/dist/node/impls/granola-meeting-recorder.js +512 -0
- package/dist/node/impls/granola-meeting-recorder.mcp.js +278 -0
- package/dist/node/impls/granola-meeting-recorder.types.js +0 -0
- package/dist/node/impls/index.js +4658 -0
- package/dist/node/impls/jira.js +124 -0
- package/dist/node/impls/linear.js +83 -0
- package/dist/node/impls/mistral-embedding.js +43 -0
- package/dist/node/impls/mistral-llm.js +269 -0
- package/dist/node/impls/notion.js +160 -0
- package/dist/node/impls/posthog-reader.js +159 -0
- package/dist/node/impls/posthog-utils.js +38 -0
- package/dist/node/impls/posthog.js +322 -0
- package/dist/node/impls/postmark-email.js +60 -0
- package/dist/node/impls/powens-client.js +195 -0
- package/dist/node/impls/powens-openbanking.js +426 -0
- package/dist/node/impls/provider-factory.js +4080 -0
- package/dist/node/impls/qdrant-vector.js +78 -0
- package/dist/node/impls/stripe-payments.js +228 -0
- package/dist/node/impls/supabase-psql.js +150 -0
- package/dist/node/impls/supabase-vector.js +323 -0
- package/dist/node/impls/tldv-meeting-recorder.js +145 -0
- package/dist/node/impls/twilio-sms.js +65 -0
- package/dist/node/index.js +4699 -0
- package/dist/node/llm.js +2 -0
- package/dist/node/meeting-recorder.js +2 -0
- package/dist/node/openbanking.js +2 -0
- package/dist/node/payments.js +2 -0
- package/dist/node/project-management.js +2 -0
- package/dist/node/runtime.js +0 -0
- package/dist/node/secrets/provider.js +11 -0
- package/dist/node/sms.js +2 -0
- package/dist/node/storage.js +2 -0
- package/dist/node/vector-store.js +2 -0
- package/dist/node/voice.js +2 -0
- package/dist/openbanking.d.ts +1 -7
- package/dist/openbanking.d.ts.map +1 -1
- package/dist/openbanking.js +3 -3
- package/dist/payments.d.ts +1 -7
- package/dist/payments.d.ts.map +1 -1
- package/dist/payments.js +3 -3
- package/dist/project-management.d.ts +2 -0
- package/dist/project-management.d.ts.map +1 -0
- package/dist/project-management.js +3 -0
- package/dist/runtime.d.ts +2 -2
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +1 -0
- package/dist/secrets/provider.d.ts +3 -2
- package/dist/secrets/provider.d.ts.map +1 -0
- package/dist/secrets/provider.js +12 -3
- package/dist/sms.d.ts +1 -7
- package/dist/sms.d.ts.map +1 -1
- package/dist/sms.js +3 -3
- package/dist/storage.d.ts +1 -7
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +3 -3
- package/dist/vector-store.d.ts +1 -7
- package/dist/vector-store.d.ts.map +1 -1
- package/dist/vector-store.js +3 -3
- package/dist/voice.d.ts +1 -7
- package/dist/voice.d.ts.map +1 -1
- package/dist/voice.js +3 -3
- package/package.json +419 -76
- package/dist/_virtual/rolldown_runtime.js +0 -36
- package/dist/impls/elevenlabs-voice.js.map +0 -1
- package/dist/impls/gcs-storage.js.map +0 -1
- package/dist/impls/gmail-inbound.js.map +0 -1
- package/dist/impls/gmail-outbound.js.map +0 -1
- package/dist/impls/google-calendar.js.map +0 -1
- package/dist/impls/mistral-embedding.js.map +0 -1
- package/dist/impls/mistral-llm.js.map +0 -1
- package/dist/impls/postmark-email.js.map +0 -1
- package/dist/impls/powens-client.js.map +0 -1
- package/dist/impls/powens-openbanking.js.map +0 -1
- package/dist/impls/provider-factory.js.map +0 -1
- package/dist/impls/qdrant-vector.js.map +0 -1
- package/dist/impls/stripe-payments.js.map +0 -1
- package/dist/impls/twilio-sms.js.map +0 -1
- package/dist/index.js.map +0 -1
package/README.md
CHANGED
|
@@ -2,19 +2,133 @@
|
|
|
2
2
|
|
|
3
3
|
Website: https://contractspec.io/
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
SDK-backed implementations of ContractSpec integration provider interfaces.
|
|
7
6
|
|
|
8
7
|
Depends on:
|
|
8
|
+
|
|
9
9
|
- `@contractspec/lib.contracts` for provider interface types and IntegrationSpec declarations
|
|
10
10
|
- `@contractspec/integration.runtime` for secret/guard helpers (when needed)
|
|
11
11
|
|
|
12
|
+
## PostHog analytics
|
|
13
|
+
|
|
14
|
+
This package ships a PostHog analytics provider:
|
|
15
|
+
|
|
16
|
+
- `analytics.posthog` via `PosthogAnalyticsProvider`
|
|
17
|
+
|
|
18
|
+
Connection config example:
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"host": "https://app.posthog.com",
|
|
23
|
+
"projectId": "12345",
|
|
24
|
+
"mcpUrl": "https://your-mcp-endpoint"
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Secret payload example (`secretRef` target value):
|
|
29
|
+
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"personalApiKey": "phx_personal_api_key",
|
|
33
|
+
"projectApiKey": "phc_project_api_key"
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Factory usage:
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
import { IntegrationProviderFactory } from "@contractspec/integration.providers-impls/impls/provider-factory";
|
|
41
|
+
|
|
42
|
+
const factory = new IntegrationProviderFactory();
|
|
43
|
+
const analytics = await factory.createAnalyticsProvider(context); // key: analytics.posthog
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Supabase integrations
|
|
47
|
+
|
|
48
|
+
This package now ships two Supabase providers:
|
|
49
|
+
|
|
50
|
+
- `vectordb.supabase` via `SupabaseVectorProvider`
|
|
51
|
+
- `database.supabase` via `SupabasePostgresProvider`
|
|
52
|
+
|
|
53
|
+
Both providers are available through `IntegrationProviderFactory` and can also be instantiated directly.
|
|
54
|
+
|
|
55
|
+
### 1) Connection shapes
|
|
56
|
+
|
|
57
|
+
#### Vector store (`vectordb.supabase`)
|
|
58
|
+
|
|
59
|
+
`IntegrationConnection.config` example:
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"schema": "public",
|
|
64
|
+
"table": "contractspec_vectors",
|
|
65
|
+
"createTableIfMissing": true,
|
|
66
|
+
"distanceMetric": "cosine",
|
|
67
|
+
"maxConnections": 5,
|
|
68
|
+
"sslMode": "require"
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Secret payload example (`secretRef` target value):
|
|
73
|
+
|
|
74
|
+
```json
|
|
75
|
+
{
|
|
76
|
+
"databaseUrl": "postgresql://postgres.<project-ref>:<password>@aws-0-<region>.pooler.supabase.com:6543/postgres"
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
#### Database (`database.supabase`)
|
|
81
|
+
|
|
82
|
+
`IntegrationConnection.config` example:
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"maxConnections": 10,
|
|
87
|
+
"sslMode": "require"
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Secret payload example (`secretRef` target value):
|
|
92
|
+
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"databaseUrl": "postgresql://postgres.<project-ref>:<password>@aws-0-<region>.pooler.supabase.com:6543/postgres"
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### 2) Factory usage
|
|
12
100
|
|
|
101
|
+
```ts
|
|
102
|
+
import { IntegrationProviderFactory } from "@contractspec/integration.providers-impls/impls/provider-factory";
|
|
13
103
|
|
|
104
|
+
const factory = new IntegrationProviderFactory();
|
|
14
105
|
|
|
106
|
+
const vectorProvider = await factory.createVectorStoreProvider(vectorContext); // key: vectordb.supabase
|
|
107
|
+
const dbProvider = await factory.createDatabaseProvider(databaseContext); // key: database.supabase
|
|
108
|
+
```
|
|
15
109
|
|
|
110
|
+
### 3) Direct provider usage
|
|
16
111
|
|
|
112
|
+
```ts
|
|
113
|
+
import { SupabaseVectorProvider } from "@contractspec/integration.providers-impls/impls/supabase-vector";
|
|
114
|
+
import { SupabasePostgresProvider } from "@contractspec/integration.providers-impls/impls/supabase-psql";
|
|
17
115
|
|
|
116
|
+
const vector = new SupabaseVectorProvider({
|
|
117
|
+
connectionString: process.env.SUPABASE_DATABASE_URL,
|
|
118
|
+
schema: "public",
|
|
119
|
+
table: "contractspec_vectors",
|
|
120
|
+
distanceMetric: "cosine",
|
|
121
|
+
});
|
|
18
122
|
|
|
123
|
+
const database = new SupabasePostgresProvider({
|
|
124
|
+
connectionString: process.env.SUPABASE_DATABASE_URL,
|
|
125
|
+
maxConnections: 10,
|
|
126
|
+
sslMode: "require",
|
|
127
|
+
});
|
|
128
|
+
```
|
|
19
129
|
|
|
130
|
+
### 4) Notes
|
|
20
131
|
|
|
132
|
+
- `SupabaseVectorProvider` creates `vector` extension/table/indexes automatically when `createTableIfMissing=true`.
|
|
133
|
+
- `SupabaseVectorProvider` maps scores from pgvector distances (`cosine`, `l2`, `inner_product`) to `VectorSearchResult.score`.
|
|
134
|
+
- `SupabasePostgresProvider` supports `$1`, `$2`, ... placeholders, transactions, and clean connection shutdown through `close()`.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../src/analytics.ts"],"names":[],"mappings":"AAAA,cAAc,8DAA8D,CAAC"}
|
package/dist/calendar.d.ts
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
|
|
3
|
-
//#region src/calendar.d.ts
|
|
4
|
-
|
|
5
|
-
import * as import__contractspec_lib_contracts_integrations_providers_calendar from "@contractspec/lib.contracts/integrations/providers/calendar";
|
|
6
|
-
//#endregion
|
|
7
|
-
export { import__contractspec_lib_contracts_integrations_providers_calendar as calendar_d_exports };
|
|
1
|
+
export * from '@contractspec/lib.contracts/integrations/providers/calendar';
|
|
8
2
|
//# sourceMappingURL=calendar.d.ts.map
|
package/dist/calendar.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.d.ts","
|
|
1
|
+
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../src/calendar.ts"],"names":[],"mappings":"AAAA,cAAc,6DAA6D,CAAC"}
|
package/dist/calendar.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export * from "@contractspec/lib.contracts/integrations/providers/calendar"
|
|
1
|
+
// @bun
|
|
2
|
+
// src/calendar.ts
|
|
3
|
+
export * from "@contractspec/lib.contracts/integrations/providers/calendar";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../src/database.ts"],"names":[],"mappings":"AAAA,cAAc,6DAA6D,CAAC"}
|
package/dist/database.js
ADDED
package/dist/email.d.ts
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
|
|
3
|
-
//#region src/email.d.ts
|
|
4
|
-
|
|
5
|
-
import * as import__contractspec_lib_contracts_integrations_providers_email from "@contractspec/lib.contracts/integrations/providers/email";
|
|
6
|
-
//#endregion
|
|
7
|
-
export { import__contractspec_lib_contracts_integrations_providers_email as email_d_exports };
|
|
1
|
+
export * from '@contractspec/lib.contracts/integrations/providers/email';
|
|
8
2
|
//# sourceMappingURL=email.d.ts.map
|
package/dist/email.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.d.ts","
|
|
1
|
+
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../src/email.ts"],"names":[],"mappings":"AAAA,cAAc,0DAA0D,CAAC"}
|
package/dist/email.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export * from "@contractspec/lib.contracts/integrations/providers/email"
|
|
1
|
+
// @bun
|
|
2
|
+
// src/email.ts
|
|
3
|
+
export * from "@contractspec/lib.contracts/integrations/providers/email";
|
package/dist/embedding.d.ts
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
|
|
3
|
-
//#region src/embedding.d.ts
|
|
4
|
-
|
|
5
|
-
import * as import__contractspec_lib_contracts_integrations_providers_embedding from "@contractspec/lib.contracts/integrations/providers/embedding";
|
|
6
|
-
//#endregion
|
|
7
|
-
export { import__contractspec_lib_contracts_integrations_providers_embedding as embedding_d_exports };
|
|
1
|
+
export * from '@contractspec/lib.contracts/integrations/providers/embedding';
|
|
8
2
|
//# sourceMappingURL=embedding.d.ts.map
|
package/dist/embedding.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embedding.d.ts","
|
|
1
|
+
{"version":3,"file":"embedding.d.ts","sourceRoot":"","sources":["../src/embedding.ts"],"names":[],"mappings":"AAAA,cAAc,8DAA8D,CAAC"}
|
package/dist/embedding.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export * from "@contractspec/lib.contracts/integrations/providers/embedding"
|
|
1
|
+
// @bun
|
|
2
|
+
// src/embedding.ts
|
|
3
|
+
export * from "@contractspec/lib.contracts/integrations/providers/embedding";
|
|
@@ -1,21 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
modelId?: string;
|
|
9
|
-
client?: ElevenLabsClient;
|
|
1
|
+
import { ElevenLabsClient } from '@elevenlabs/elevenlabs-js';
|
|
2
|
+
import type { Voice, VoiceProvider, VoiceSynthesisInput, VoiceSynthesisResult } from '../voice';
|
|
3
|
+
export interface ElevenLabsVoiceProviderOptions {
|
|
4
|
+
apiKey: string;
|
|
5
|
+
defaultVoiceId?: string;
|
|
6
|
+
modelId?: string;
|
|
7
|
+
client?: ElevenLabsClient;
|
|
10
8
|
}
|
|
11
|
-
declare class ElevenLabsVoiceProvider implements
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
export declare class ElevenLabsVoiceProvider implements VoiceProvider {
|
|
10
|
+
private readonly client;
|
|
11
|
+
private readonly defaultVoiceId?;
|
|
12
|
+
private readonly modelId?;
|
|
13
|
+
constructor(options: ElevenLabsVoiceProviderOptions);
|
|
14
|
+
listVoices(): Promise<Voice[]>;
|
|
15
|
+
synthesize(input: VoiceSynthesisInput): Promise<VoiceSynthesisResult>;
|
|
18
16
|
}
|
|
19
|
-
//#endregion
|
|
20
|
-
export { ElevenLabsVoiceProvider, ElevenLabsVoiceProviderOptions };
|
|
21
17
|
//# sourceMappingURL=elevenlabs-voice.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elevenlabs-voice.d.ts","
|
|
1
|
+
{"version":3,"file":"elevenlabs-voice.d.ts","sourceRoot":"","sources":["../../src/impls/elevenlabs-voice.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,KAAK,EACV,KAAK,EACL,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,8BAA8B;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B;AA4BD,qBAAa,uBAAwB,YAAW,aAAa;IAC3D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmB;IAC1C,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAS;IACzC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAS;gBAEtB,OAAO,EAAE,8BAA8B;IAU7C,UAAU,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;IAkB9B,UAAU,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC;CA4C5E"}
|
|
@@ -1,93 +1,103 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/impls/elevenlabs-voice.ts
|
|
1
3
|
import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
ogg: "mp3_44100_128",
|
|
8
|
-
pcm: "pcm_16000"
|
|
9
|
-
};
|
|
10
|
-
const SAMPLE_RATE = {
|
|
11
|
-
mp3_22050_32: 22050,
|
|
12
|
-
mp3_44100_32: 44100,
|
|
13
|
-
mp3_44100_64: 44100,
|
|
14
|
-
mp3_44100_96: 44100,
|
|
15
|
-
mp3_44100_128: 44100,
|
|
16
|
-
mp3_44100_192: 44100,
|
|
17
|
-
pcm_16000: 16e3,
|
|
18
|
-
pcm_22050: 22050,
|
|
19
|
-
pcm_24000: 24e3,
|
|
20
|
-
pcm_44100: 44100,
|
|
21
|
-
ulaw_8000: 8e3
|
|
4
|
+
var FORMAT_MAP = {
|
|
5
|
+
mp3: "mp3_44100_128",
|
|
6
|
+
wav: "pcm_44100",
|
|
7
|
+
ogg: "mp3_44100_128",
|
|
8
|
+
pcm: "pcm_16000"
|
|
22
9
|
};
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
name: voice.name ?? "",
|
|
36
|
-
description: voice.description ?? void 0,
|
|
37
|
-
language: voice.labels?.language ?? void 0,
|
|
38
|
-
metadata: {
|
|
39
|
-
category: voice.category ?? "",
|
|
40
|
-
...voice.previewUrl ? { previewUrl: voice.previewUrl } : {},
|
|
41
|
-
...(() => {
|
|
42
|
-
const { language, ...rest } = voice.labels ?? {};
|
|
43
|
-
return rest;
|
|
44
|
-
})()
|
|
45
|
-
}
|
|
46
|
-
}));
|
|
47
|
-
}
|
|
48
|
-
async synthesize(input) {
|
|
49
|
-
const voiceId = input.voiceId ?? this.defaultVoiceId;
|
|
50
|
-
if (!voiceId) throw new Error("Voice ID is required for ElevenLabs synthesis.");
|
|
51
|
-
const formatKey = input.format ?? "mp3";
|
|
52
|
-
const outputFormat = FORMAT_MAP[formatKey] ?? FORMAT_MAP.mp3;
|
|
53
|
-
const sampleRate = input.sampleRateHz ?? SAMPLE_RATE[outputFormat] ?? SAMPLE_RATE.mp3_44100_128 ?? 44100;
|
|
54
|
-
const voiceSettings = input.stability != null || input.similarityBoost != null || input.style != null ? {
|
|
55
|
-
...input.stability != null ? { stability: input.stability } : {},
|
|
56
|
-
...input.similarityBoost != null ? { similarityBoost: input.similarityBoost } : {},
|
|
57
|
-
...input.style != null ? { style: input.style } : {}
|
|
58
|
-
} : void 0;
|
|
59
|
-
return {
|
|
60
|
-
audio: await readWebStream(await this.client.textToSpeech.convert(voiceId, {
|
|
61
|
-
text: input.text,
|
|
62
|
-
modelId: this.modelId,
|
|
63
|
-
outputFormat,
|
|
64
|
-
voiceSettings
|
|
65
|
-
})),
|
|
66
|
-
format: formatKey,
|
|
67
|
-
sampleRateHz: sampleRate,
|
|
68
|
-
durationSeconds: void 0,
|
|
69
|
-
url: void 0
|
|
70
|
-
};
|
|
71
|
-
}
|
|
10
|
+
var SAMPLE_RATE = {
|
|
11
|
+
mp3_22050_32: 22050,
|
|
12
|
+
mp3_44100_32: 44100,
|
|
13
|
+
mp3_44100_64: 44100,
|
|
14
|
+
mp3_44100_96: 44100,
|
|
15
|
+
mp3_44100_128: 44100,
|
|
16
|
+
mp3_44100_192: 44100,
|
|
17
|
+
pcm_16000: 16000,
|
|
18
|
+
pcm_22050: 22050,
|
|
19
|
+
pcm_24000: 24000,
|
|
20
|
+
pcm_44100: 44100,
|
|
21
|
+
ulaw_8000: 8000
|
|
72
22
|
};
|
|
23
|
+
|
|
24
|
+
class ElevenLabsVoiceProvider {
|
|
25
|
+
client;
|
|
26
|
+
defaultVoiceId;
|
|
27
|
+
modelId;
|
|
28
|
+
constructor(options) {
|
|
29
|
+
this.client = options.client ?? new ElevenLabsClient({
|
|
30
|
+
apiKey: options.apiKey
|
|
31
|
+
});
|
|
32
|
+
this.defaultVoiceId = options.defaultVoiceId;
|
|
33
|
+
this.modelId = options.modelId;
|
|
34
|
+
}
|
|
35
|
+
async listVoices() {
|
|
36
|
+
const response = await this.client.voices.getAll();
|
|
37
|
+
return (response.voices ?? []).map((voice) => ({
|
|
38
|
+
id: voice.voiceId ?? "",
|
|
39
|
+
name: voice.name ?? "",
|
|
40
|
+
description: voice.description ?? undefined,
|
|
41
|
+
language: voice.labels?.language ?? undefined,
|
|
42
|
+
metadata: {
|
|
43
|
+
category: voice.category ?? "",
|
|
44
|
+
...voice.previewUrl ? { previewUrl: voice.previewUrl } : {},
|
|
45
|
+
...(() => {
|
|
46
|
+
const { language, ...rest } = voice.labels ?? {};
|
|
47
|
+
return rest;
|
|
48
|
+
})()
|
|
49
|
+
}
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
async synthesize(input) {
|
|
53
|
+
const voiceId = input.voiceId ?? this.defaultVoiceId;
|
|
54
|
+
if (!voiceId) {
|
|
55
|
+
throw new Error("Voice ID is required for ElevenLabs synthesis.");
|
|
56
|
+
}
|
|
57
|
+
const formatKey = input.format ?? "mp3";
|
|
58
|
+
const outputFormat = FORMAT_MAP[formatKey] ?? FORMAT_MAP.mp3;
|
|
59
|
+
const sampleRate = input.sampleRateHz ?? SAMPLE_RATE[outputFormat] ?? SAMPLE_RATE.mp3_44100_128 ?? 44100;
|
|
60
|
+
const voiceSettings = input.stability != null || input.similarityBoost != null || input.style != null ? {
|
|
61
|
+
...input.stability != null ? { stability: input.stability } : {},
|
|
62
|
+
...input.similarityBoost != null ? { similarityBoost: input.similarityBoost } : {},
|
|
63
|
+
...input.style != null ? { style: input.style } : {}
|
|
64
|
+
} : undefined;
|
|
65
|
+
const stream = await this.client.textToSpeech.convert(voiceId, {
|
|
66
|
+
text: input.text,
|
|
67
|
+
modelId: this.modelId,
|
|
68
|
+
outputFormat,
|
|
69
|
+
voiceSettings
|
|
70
|
+
});
|
|
71
|
+
const audio = await readWebStream(stream);
|
|
72
|
+
return {
|
|
73
|
+
audio,
|
|
74
|
+
format: formatKey,
|
|
75
|
+
sampleRateHz: sampleRate,
|
|
76
|
+
durationSeconds: undefined,
|
|
77
|
+
url: undefined
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
}
|
|
73
81
|
async function readWebStream(stream) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
82
|
+
const reader = stream.getReader();
|
|
83
|
+
const chunks = [];
|
|
84
|
+
while (true) {
|
|
85
|
+
const { done, value } = await reader.read();
|
|
86
|
+
if (done)
|
|
87
|
+
break;
|
|
88
|
+
if (value) {
|
|
89
|
+
chunks.push(value);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
const length = chunks.reduce((total, chunk) => total + chunk.length, 0);
|
|
93
|
+
const result = new Uint8Array(length);
|
|
94
|
+
let offset = 0;
|
|
95
|
+
for (const chunk of chunks) {
|
|
96
|
+
result.set(chunk, offset);
|
|
97
|
+
offset += chunk.length;
|
|
98
|
+
}
|
|
99
|
+
return result;
|
|
89
100
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
//# sourceMappingURL=elevenlabs-voice.js.map
|
|
101
|
+
export {
|
|
102
|
+
ElevenLabsVoiceProvider
|
|
103
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { FalClient } from '@fal-ai/client';
|
|
2
|
+
import type { Voice, VoiceProvider, VoiceSynthesisInput, VoiceSynthesisResult } from '../voice';
|
|
3
|
+
export interface FalVoiceProviderOptions {
|
|
4
|
+
apiKey: string;
|
|
5
|
+
modelId?: string;
|
|
6
|
+
defaultVoiceUrl?: string;
|
|
7
|
+
defaultExaggeration?: number;
|
|
8
|
+
defaultTemperature?: number;
|
|
9
|
+
defaultCfg?: number;
|
|
10
|
+
pollIntervalMs?: number;
|
|
11
|
+
client?: FalClient;
|
|
12
|
+
}
|
|
13
|
+
export declare class FalVoiceProvider implements VoiceProvider {
|
|
14
|
+
private readonly client;
|
|
15
|
+
private readonly modelId;
|
|
16
|
+
private readonly defaultVoiceUrl?;
|
|
17
|
+
private readonly defaultExaggeration?;
|
|
18
|
+
private readonly defaultTemperature?;
|
|
19
|
+
private readonly defaultCfg?;
|
|
20
|
+
private readonly pollIntervalMs?;
|
|
21
|
+
constructor(options: FalVoiceProviderOptions);
|
|
22
|
+
listVoices(): Promise<Voice[]>;
|
|
23
|
+
synthesize(input: VoiceSynthesisInput): Promise<VoiceSynthesisResult>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=fal-voice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fal-voice.d.ts","sourceRoot":"","sources":["../../src/impls/fal-voice.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,KAAK,EACV,KAAK,EACL,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,UAAU,CAAC;AAUlB,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,qBAAa,gBAAiB,YAAW,aAAa;IACpD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAY;IACnC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAS;IAC1C,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAS;IAC9C,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAS;IAC7C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAS;gBAE7B,OAAO,EAAE,uBAAuB;IActC,UAAU,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;IA8B9B,UAAU,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC;CA0C5E"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/impls/fal-voice.ts
|
|
3
|
+
import { createFalClient } from "@fal-ai/client";
|
|
4
|
+
var DEFAULT_MODEL_ID = "fal-ai/chatterbox/text-to-speech";
|
|
5
|
+
|
|
6
|
+
class FalVoiceProvider {
|
|
7
|
+
client;
|
|
8
|
+
modelId;
|
|
9
|
+
defaultVoiceUrl;
|
|
10
|
+
defaultExaggeration;
|
|
11
|
+
defaultTemperature;
|
|
12
|
+
defaultCfg;
|
|
13
|
+
pollIntervalMs;
|
|
14
|
+
constructor(options) {
|
|
15
|
+
this.client = options.client ?? createFalClient({
|
|
16
|
+
credentials: options.apiKey
|
|
17
|
+
});
|
|
18
|
+
this.modelId = options.modelId ?? DEFAULT_MODEL_ID;
|
|
19
|
+
this.defaultVoiceUrl = options.defaultVoiceUrl;
|
|
20
|
+
this.defaultExaggeration = options.defaultExaggeration;
|
|
21
|
+
this.defaultTemperature = options.defaultTemperature;
|
|
22
|
+
this.defaultCfg = options.defaultCfg;
|
|
23
|
+
this.pollIntervalMs = options.pollIntervalMs;
|
|
24
|
+
}
|
|
25
|
+
async listVoices() {
|
|
26
|
+
const voices = [
|
|
27
|
+
{
|
|
28
|
+
id: "default",
|
|
29
|
+
name: "Default Chatterbox Voice",
|
|
30
|
+
description: "Uses the default model voice (or configured default reference audio URL).",
|
|
31
|
+
metadata: {
|
|
32
|
+
modelId: this.modelId
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
];
|
|
36
|
+
if (this.defaultVoiceUrl) {
|
|
37
|
+
voices.push({
|
|
38
|
+
id: this.defaultVoiceUrl,
|
|
39
|
+
name: "Configured Reference Voice",
|
|
40
|
+
description: "Reference voice configured at provider setup and used when voiceId is default.",
|
|
41
|
+
previewUrl: this.defaultVoiceUrl,
|
|
42
|
+
metadata: {
|
|
43
|
+
modelId: this.modelId,
|
|
44
|
+
source: "config.defaultVoiceUrl"
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
return voices;
|
|
49
|
+
}
|
|
50
|
+
async synthesize(input) {
|
|
51
|
+
const referenceVoiceUrl = resolveVoiceUrl(input.voiceId, this.defaultVoiceUrl);
|
|
52
|
+
const result = await this.client.subscribe(this.modelId, {
|
|
53
|
+
input: {
|
|
54
|
+
text: input.text,
|
|
55
|
+
...referenceVoiceUrl ? { audio_url: referenceVoiceUrl } : {},
|
|
56
|
+
...this.defaultExaggeration != null ? { exaggeration: this.defaultExaggeration } : {},
|
|
57
|
+
...this.defaultTemperature != null ? { temperature: this.defaultTemperature } : {},
|
|
58
|
+
...this.defaultCfg != null ? { cfg: this.defaultCfg } : {}
|
|
59
|
+
},
|
|
60
|
+
pollInterval: this.pollIntervalMs
|
|
61
|
+
});
|
|
62
|
+
const audioUrl = extractAudioUrl(result.data);
|
|
63
|
+
if (!audioUrl) {
|
|
64
|
+
throw new Error("Fal synthesis completed without an audio URL in response.");
|
|
65
|
+
}
|
|
66
|
+
const response = await fetch(audioUrl);
|
|
67
|
+
if (!response.ok) {
|
|
68
|
+
throw new Error(`Fal audio download failed (${response.status}).`);
|
|
69
|
+
}
|
|
70
|
+
const audio = new Uint8Array(await response.arrayBuffer());
|
|
71
|
+
return {
|
|
72
|
+
audio,
|
|
73
|
+
format: input.format ?? inferFormatFromUrl(audioUrl) ?? "wav",
|
|
74
|
+
sampleRateHz: input.sampleRateHz ?? 24000,
|
|
75
|
+
durationSeconds: undefined,
|
|
76
|
+
url: audioUrl
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
function resolveVoiceUrl(voiceId, defaultVoiceUrl) {
|
|
81
|
+
if (!voiceId || voiceId === "default")
|
|
82
|
+
return defaultVoiceUrl;
|
|
83
|
+
if (isHttpUrl(voiceId))
|
|
84
|
+
return voiceId;
|
|
85
|
+
throw new Error('Fal voiceId must be "default" or a public reference audio URL.');
|
|
86
|
+
}
|
|
87
|
+
function extractAudioUrl(output) {
|
|
88
|
+
if (output.audio?.url)
|
|
89
|
+
return output.audio.url;
|
|
90
|
+
if (typeof output.audio_url === "string")
|
|
91
|
+
return output.audio_url;
|
|
92
|
+
if (typeof output.url === "string")
|
|
93
|
+
return output.url;
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
function inferFormatFromUrl(url) {
|
|
97
|
+
const normalized = url.toLowerCase();
|
|
98
|
+
if (normalized.endsWith(".wav"))
|
|
99
|
+
return "wav";
|
|
100
|
+
if (normalized.endsWith(".mp3"))
|
|
101
|
+
return "mp3";
|
|
102
|
+
if (normalized.endsWith(".ogg") || normalized.endsWith(".opus"))
|
|
103
|
+
return "ogg";
|
|
104
|
+
if (normalized.endsWith(".pcm"))
|
|
105
|
+
return "pcm";
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
function isHttpUrl(value) {
|
|
109
|
+
return value.startsWith("https://") || value.startsWith("http://");
|
|
110
|
+
}
|
|
111
|
+
export {
|
|
112
|
+
FalVoiceProvider
|
|
113
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Fathom } from 'fathom-typescript';
|
|
2
|
+
import type { MeetingRecord, MeetingRecorderGetMeetingParams, MeetingRecorderGetTranscriptParams, MeetingRecorderListMeetingsParams, MeetingRecorderListMeetingsResult, MeetingRecorderProvider, MeetingRecorderWebhookEvent, MeetingRecorderWebhookRegistration, MeetingRecorderWebhookRequest, MeetingTranscriptRecord } from '../meeting-recorder';
|
|
3
|
+
export interface FathomMeetingRecorderProviderOptions {
|
|
4
|
+
apiKey: string;
|
|
5
|
+
baseUrl?: string;
|
|
6
|
+
includeTranscript?: boolean;
|
|
7
|
+
includeSummary?: boolean;
|
|
8
|
+
includeActionItems?: boolean;
|
|
9
|
+
includeCrmMatches?: boolean;
|
|
10
|
+
triggeredFor?: string[];
|
|
11
|
+
webhookSecret?: string;
|
|
12
|
+
maxPages?: number;
|
|
13
|
+
client?: Fathom;
|
|
14
|
+
}
|
|
15
|
+
export declare class FathomMeetingRecorderProvider implements MeetingRecorderProvider {
|
|
16
|
+
private readonly client;
|
|
17
|
+
private readonly apiKey;
|
|
18
|
+
private readonly baseUrl;
|
|
19
|
+
private readonly includeTranscript;
|
|
20
|
+
private readonly includeSummary;
|
|
21
|
+
private readonly includeActionItems;
|
|
22
|
+
private readonly includeCrmMatches;
|
|
23
|
+
private readonly triggeredFor?;
|
|
24
|
+
private readonly webhookSecret?;
|
|
25
|
+
private readonly maxPages;
|
|
26
|
+
constructor(options: FathomMeetingRecorderProviderOptions);
|
|
27
|
+
listMeetings(params: MeetingRecorderListMeetingsParams): Promise<MeetingRecorderListMeetingsResult>;
|
|
28
|
+
getMeeting(params: MeetingRecorderGetMeetingParams): Promise<MeetingRecord>;
|
|
29
|
+
getTranscript(params: MeetingRecorderGetTranscriptParams): Promise<MeetingTranscriptRecord>;
|
|
30
|
+
parseWebhook(request: MeetingRecorderWebhookRequest): Promise<MeetingRecorderWebhookEvent>;
|
|
31
|
+
verifyWebhook(request: MeetingRecorderWebhookRequest): Promise<boolean>;
|
|
32
|
+
registerWebhook(registration: MeetingRecorderWebhookRegistration): Promise<{
|
|
33
|
+
id: string;
|
|
34
|
+
secret?: string;
|
|
35
|
+
}>;
|
|
36
|
+
private request;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=fathom-meeting-recorder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fathom-meeting-recorder.d.ts","sourceRoot":"","sources":["../../src/impls/fathom-meeting-recorder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAG3C,OAAO,KAAK,EACV,aAAa,EACb,+BAA+B,EAC/B,kCAAkC,EAClC,iCAAiC,EACjC,iCAAiC,EACjC,uBAAuB,EACvB,2BAA2B,EAC3B,kCAAkC,EAClC,6BAA6B,EAC7B,uBAAuB,EACxB,MAAM,qBAAqB,CAAC;AAkB7B,MAAM,WAAW,oCAAoC;IACnD,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAID,qBAAa,6BAA8B,YAAW,uBAAuB;IAC3E,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAU;IAC5C,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAU;IACzC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAU;IAC7C,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAU;IAC5C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAW;IACzC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAS;IACxC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;gBAEtB,OAAO,EAAE,oCAAoC;IAoBnD,YAAY,CAChB,MAAM,EAAE,iCAAiC,GACxC,OAAO,CAAC,iCAAiC,CAAC;IA8BvC,UAAU,CACd,MAAM,EAAE,+BAA+B,GACtC,OAAO,CAAC,aAAa,CAAC;IAwBnB,aAAa,CACjB,MAAM,EAAE,kCAAkC,GACzC,OAAO,CAAC,uBAAuB,CAAC;IA0B7B,YAAY,CAChB,OAAO,EAAE,6BAA6B,GACrC,OAAO,CAAC,2BAA2B,CAAC;IAuBjC,aAAa,CACjB,OAAO,EAAE,6BAA6B,GACrC,OAAO,CAAC,OAAO,CAAC;IAYb,eAAe,CACnB,YAAY,EAAE,kCAAkC,GAC/C,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;YAiB7B,OAAO;CAatB"}
|