@contractspec/lib.contracts-integrations 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (240) hide show
  1. package/README.md +3 -0
  2. package/dist/index.d.ts +11 -0
  3. package/dist/index.js +3676 -0
  4. package/dist/integrations/binding.d.ts +14 -0
  5. package/dist/integrations/binding.js +1 -0
  6. package/dist/integrations/connection.d.ts +47 -0
  7. package/dist/integrations/connection.js +1 -0
  8. package/dist/integrations/docs/integrations.docblock.d.ts +2 -0
  9. package/dist/integrations/docs/integrations.docblock.js +110 -0
  10. package/dist/integrations/health.d.ts +17 -0
  11. package/dist/integrations/health.js +73 -0
  12. package/dist/integrations/health.test.d.ts +1 -0
  13. package/dist/integrations/index.d.ts +11 -0
  14. package/dist/integrations/index.js +3264 -0
  15. package/dist/integrations/integrations.capability.d.ts +1 -0
  16. package/dist/integrations/integrations.capability.js +18 -0
  17. package/dist/integrations/integrations.feature.d.ts +5 -0
  18. package/dist/integrations/integrations.feature.js +33 -0
  19. package/dist/integrations/meeting-recorder/contracts/index.d.ts +7 -0
  20. package/dist/integrations/meeting-recorder/contracts/index.js +474 -0
  21. package/dist/integrations/meeting-recorder/contracts/meetings.d.ts +451 -0
  22. package/dist/integrations/meeting-recorder/contracts/meetings.js +219 -0
  23. package/dist/integrations/meeting-recorder/contracts/transcripts.d.ts +166 -0
  24. package/dist/integrations/meeting-recorder/contracts/transcripts.js +287 -0
  25. package/dist/integrations/meeting-recorder/contracts/webhooks.d.ts +85 -0
  26. package/dist/integrations/meeting-recorder/contracts/webhooks.js +172 -0
  27. package/dist/integrations/meeting-recorder/meeting-recorder.capability.d.ts +1 -0
  28. package/dist/integrations/meeting-recorder/meeting-recorder.capability.js +18 -0
  29. package/dist/integrations/meeting-recorder/meeting-recorder.feature.d.ts +5 -0
  30. package/dist/integrations/meeting-recorder/meeting-recorder.feature.js +33 -0
  31. package/dist/integrations/meeting-recorder/models.d.ts +402 -0
  32. package/dist/integrations/meeting-recorder/models.js +122 -0
  33. package/dist/integrations/meeting-recorder/telemetry.d.ts +13 -0
  34. package/dist/integrations/meeting-recorder/telemetry.js +54 -0
  35. package/dist/integrations/openbanking/contracts/accounts.d.ts +282 -0
  36. package/dist/integrations/openbanking/contracts/accounts.js +328 -0
  37. package/dist/integrations/openbanking/contracts/balances.d.ts +158 -0
  38. package/dist/integrations/openbanking/contracts/balances.js +292 -0
  39. package/dist/integrations/openbanking/contracts/index.d.ts +7 -0
  40. package/dist/integrations/openbanking/contracts/index.js +644 -0
  41. package/dist/integrations/openbanking/contracts/transactions.d.ts +206 -0
  42. package/dist/integrations/openbanking/contracts/transactions.js +298 -0
  43. package/dist/integrations/openbanking/guards.d.ts +8 -0
  44. package/dist/integrations/openbanking/guards.js +42 -0
  45. package/dist/integrations/openbanking/guards.test.d.ts +1 -0
  46. package/dist/integrations/openbanking/models.d.ts +223 -0
  47. package/dist/integrations/openbanking/models.js +110 -0
  48. package/dist/integrations/openbanking/openbanking.capability.d.ts +1 -0
  49. package/dist/integrations/openbanking/openbanking.capability.js +18 -0
  50. package/dist/integrations/openbanking/openbanking.feature.d.ts +5 -0
  51. package/dist/integrations/openbanking/openbanking.feature.js +35 -0
  52. package/dist/integrations/openbanking/telemetry.d.ts +12 -0
  53. package/dist/integrations/openbanking/telemetry.js +51 -0
  54. package/dist/integrations/operations.d.ts +430 -0
  55. package/dist/integrations/operations.js +297 -0
  56. package/dist/integrations/operations.test.d.ts +1 -0
  57. package/dist/integrations/providers/analytics-reader.d.ts +103 -0
  58. package/dist/integrations/providers/analytics-reader.js +1 -0
  59. package/dist/integrations/providers/analytics-writer.d.ts +6 -0
  60. package/dist/integrations/providers/analytics-writer.js +1 -0
  61. package/dist/integrations/providers/analytics.d.ts +47 -0
  62. package/dist/integrations/providers/analytics.js +1 -0
  63. package/dist/integrations/providers/calendar.d.ts +75 -0
  64. package/dist/integrations/providers/calendar.js +1 -0
  65. package/dist/integrations/providers/database.d.ts +12 -0
  66. package/dist/integrations/providers/database.js +1 -0
  67. package/dist/integrations/providers/elevenlabs.d.ts +3 -0
  68. package/dist/integrations/providers/elevenlabs.js +86 -0
  69. package/dist/integrations/providers/email.d.ts +83 -0
  70. package/dist/integrations/providers/email.js +1 -0
  71. package/dist/integrations/providers/embedding.d.ts +21 -0
  72. package/dist/integrations/providers/embedding.js +1 -0
  73. package/dist/integrations/providers/fal.d.ts +3 -0
  74. package/dist/integrations/providers/fal.js +112 -0
  75. package/dist/integrations/providers/fathom.d.ts +3 -0
  76. package/dist/integrations/providers/fathom.js +126 -0
  77. package/dist/integrations/providers/fireflies.d.ts +3 -0
  78. package/dist/integrations/providers/fireflies.js +106 -0
  79. package/dist/integrations/providers/gcs-storage.d.ts +3 -0
  80. package/dist/integrations/providers/gcs-storage.js +97 -0
  81. package/dist/integrations/providers/gmail.d.ts +3 -0
  82. package/dist/integrations/providers/gmail.js +109 -0
  83. package/dist/integrations/providers/google-calendar.d.ts +3 -0
  84. package/dist/integrations/providers/google-calendar.js +92 -0
  85. package/dist/integrations/providers/gradium.d.ts +3 -0
  86. package/dist/integrations/providers/gradium.js +110 -0
  87. package/dist/integrations/providers/granola.d.ts +3 -0
  88. package/dist/integrations/providers/granola.js +107 -0
  89. package/dist/integrations/providers/index.d.ts +38 -0
  90. package/dist/integrations/providers/index.js +2094 -0
  91. package/dist/integrations/providers/jira.d.ts +3 -0
  92. package/dist/integrations/providers/jira.js +108 -0
  93. package/dist/integrations/providers/linear.d.ts +3 -0
  94. package/dist/integrations/providers/linear.js +107 -0
  95. package/dist/integrations/providers/llm.d.ts +79 -0
  96. package/dist/integrations/providers/llm.js +1 -0
  97. package/dist/integrations/providers/meeting-recorder.d.ts +129 -0
  98. package/dist/integrations/providers/meeting-recorder.js +1 -0
  99. package/dist/integrations/providers/mistral.d.ts +3 -0
  100. package/dist/integrations/providers/mistral.js +94 -0
  101. package/dist/integrations/providers/notion.d.ts +3 -0
  102. package/dist/integrations/providers/notion.js +113 -0
  103. package/dist/integrations/providers/openbanking.d.ts +125 -0
  104. package/dist/integrations/providers/openbanking.js +1 -0
  105. package/dist/integrations/providers/payments.d.ts +106 -0
  106. package/dist/integrations/providers/payments.js +1 -0
  107. package/dist/integrations/providers/posthog-llm-telemetry.d.ts +51 -0
  108. package/dist/integrations/providers/posthog-llm-telemetry.js +176 -0
  109. package/dist/integrations/providers/posthog.d.ts +3 -0
  110. package/dist/integrations/providers/posthog.js +106 -0
  111. package/dist/integrations/providers/postmark.d.ts +3 -0
  112. package/dist/integrations/providers/postmark.js +98 -0
  113. package/dist/integrations/providers/powens.d.ts +3 -0
  114. package/dist/integrations/providers/powens.js +124 -0
  115. package/dist/integrations/providers/project-management.d.ts +32 -0
  116. package/dist/integrations/providers/project-management.js +1 -0
  117. package/dist/integrations/providers/providers.test.d.ts +1 -0
  118. package/dist/integrations/providers/qdrant.d.ts +3 -0
  119. package/dist/integrations/providers/qdrant.js +101 -0
  120. package/dist/integrations/providers/registry.d.ts +6 -0
  121. package/dist/integrations/providers/registry.js +1878 -0
  122. package/dist/integrations/providers/sms.d.ts +31 -0
  123. package/dist/integrations/providers/sms.js +1 -0
  124. package/dist/integrations/providers/storage.d.ts +57 -0
  125. package/dist/integrations/providers/storage.js +1 -0
  126. package/dist/integrations/providers/stripe.d.ts +3 -0
  127. package/dist/integrations/providers/stripe.js +105 -0
  128. package/dist/integrations/providers/supabase-postgres.d.ts +3 -0
  129. package/dist/integrations/providers/supabase-postgres.js +87 -0
  130. package/dist/integrations/providers/supabase-vector.d.ts +3 -0
  131. package/dist/integrations/providers/supabase-vector.js +107 -0
  132. package/dist/integrations/providers/tldv.d.ts +3 -0
  133. package/dist/integrations/providers/tldv.js +106 -0
  134. package/dist/integrations/providers/twilio-sms.d.ts +3 -0
  135. package/dist/integrations/providers/twilio-sms.js +91 -0
  136. package/dist/integrations/providers/vector-store.d.ts +39 -0
  137. package/dist/integrations/providers/vector-store.js +1 -0
  138. package/dist/integrations/providers/voice.d.ts +31 -0
  139. package/dist/integrations/providers/voice.js +1 -0
  140. package/dist/integrations/runtime.d.ts +95 -0
  141. package/dist/integrations/runtime.js +209 -0
  142. package/dist/integrations/runtime.test.d.ts +1 -0
  143. package/dist/integrations/secrets/aws-secret-manager.d.ts +28 -0
  144. package/dist/integrations/secrets/aws-secret-manager.js +346 -0
  145. package/dist/integrations/secrets/env-secret-provider.d.ts +28 -0
  146. package/dist/integrations/secrets/env-secret-provider.js +159 -0
  147. package/dist/integrations/secrets/gcp-secret-manager.d.ts +29 -0
  148. package/dist/integrations/secrets/gcp-secret-manager.js +347 -0
  149. package/dist/integrations/secrets/index.d.ts +6 -0
  150. package/dist/integrations/secrets/index.js +1129 -0
  151. package/dist/integrations/secrets/manager.d.ts +44 -0
  152. package/dist/integrations/secrets/manager.js +183 -0
  153. package/dist/integrations/secrets/provider.d.ts +49 -0
  154. package/dist/integrations/secrets/provider.js +74 -0
  155. package/dist/integrations/secrets/provider.test.d.ts +1 -0
  156. package/dist/integrations/secrets/scaleway-secret-manager.d.ts +35 -0
  157. package/dist/integrations/secrets/scaleway-secret-manager.js +375 -0
  158. package/dist/integrations/secrets-types.d.ts +14 -0
  159. package/dist/integrations/secrets-types.js +1 -0
  160. package/dist/integrations/spec.d.ts +72 -0
  161. package/dist/integrations/spec.js +22 -0
  162. package/dist/integrations/spec.test.d.ts +1 -0
  163. package/dist/node/index.js +3675 -0
  164. package/dist/node/integrations/binding.js +0 -0
  165. package/dist/node/integrations/connection.js +0 -0
  166. package/dist/node/integrations/docs/integrations.docblock.js +109 -0
  167. package/dist/node/integrations/health.js +72 -0
  168. package/dist/node/integrations/index.js +3263 -0
  169. package/dist/node/integrations/integrations.capability.js +17 -0
  170. package/dist/node/integrations/integrations.feature.js +32 -0
  171. package/dist/node/integrations/meeting-recorder/contracts/index.js +473 -0
  172. package/dist/node/integrations/meeting-recorder/contracts/meetings.js +218 -0
  173. package/dist/node/integrations/meeting-recorder/contracts/transcripts.js +286 -0
  174. package/dist/node/integrations/meeting-recorder/contracts/webhooks.js +171 -0
  175. package/dist/node/integrations/meeting-recorder/meeting-recorder.capability.js +17 -0
  176. package/dist/node/integrations/meeting-recorder/meeting-recorder.feature.js +32 -0
  177. package/dist/node/integrations/meeting-recorder/models.js +121 -0
  178. package/dist/node/integrations/meeting-recorder/telemetry.js +53 -0
  179. package/dist/node/integrations/openbanking/contracts/accounts.js +327 -0
  180. package/dist/node/integrations/openbanking/contracts/balances.js +291 -0
  181. package/dist/node/integrations/openbanking/contracts/index.js +643 -0
  182. package/dist/node/integrations/openbanking/contracts/transactions.js +297 -0
  183. package/dist/node/integrations/openbanking/guards.js +41 -0
  184. package/dist/node/integrations/openbanking/models.js +109 -0
  185. package/dist/node/integrations/openbanking/openbanking.capability.js +17 -0
  186. package/dist/node/integrations/openbanking/openbanking.feature.js +34 -0
  187. package/dist/node/integrations/openbanking/telemetry.js +50 -0
  188. package/dist/node/integrations/operations.js +296 -0
  189. package/dist/node/integrations/providers/analytics-reader.js +0 -0
  190. package/dist/node/integrations/providers/analytics-writer.js +0 -0
  191. package/dist/node/integrations/providers/analytics.js +0 -0
  192. package/dist/node/integrations/providers/calendar.js +0 -0
  193. package/dist/node/integrations/providers/database.js +0 -0
  194. package/dist/node/integrations/providers/elevenlabs.js +85 -0
  195. package/dist/node/integrations/providers/email.js +0 -0
  196. package/dist/node/integrations/providers/embedding.js +0 -0
  197. package/dist/node/integrations/providers/fal.js +111 -0
  198. package/dist/node/integrations/providers/fathom.js +125 -0
  199. package/dist/node/integrations/providers/fireflies.js +105 -0
  200. package/dist/node/integrations/providers/gcs-storage.js +96 -0
  201. package/dist/node/integrations/providers/gmail.js +108 -0
  202. package/dist/node/integrations/providers/google-calendar.js +91 -0
  203. package/dist/node/integrations/providers/gradium.js +109 -0
  204. package/dist/node/integrations/providers/granola.js +106 -0
  205. package/dist/node/integrations/providers/index.js +2093 -0
  206. package/dist/node/integrations/providers/jira.js +107 -0
  207. package/dist/node/integrations/providers/linear.js +106 -0
  208. package/dist/node/integrations/providers/llm.js +0 -0
  209. package/dist/node/integrations/providers/meeting-recorder.js +0 -0
  210. package/dist/node/integrations/providers/mistral.js +93 -0
  211. package/dist/node/integrations/providers/notion.js +112 -0
  212. package/dist/node/integrations/providers/openbanking.js +0 -0
  213. package/dist/node/integrations/providers/payments.js +0 -0
  214. package/dist/node/integrations/providers/posthog-llm-telemetry.js +175 -0
  215. package/dist/node/integrations/providers/posthog.js +105 -0
  216. package/dist/node/integrations/providers/postmark.js +97 -0
  217. package/dist/node/integrations/providers/powens.js +123 -0
  218. package/dist/node/integrations/providers/project-management.js +0 -0
  219. package/dist/node/integrations/providers/qdrant.js +100 -0
  220. package/dist/node/integrations/providers/registry.js +1877 -0
  221. package/dist/node/integrations/providers/sms.js +0 -0
  222. package/dist/node/integrations/providers/storage.js +0 -0
  223. package/dist/node/integrations/providers/stripe.js +104 -0
  224. package/dist/node/integrations/providers/supabase-postgres.js +86 -0
  225. package/dist/node/integrations/providers/supabase-vector.js +106 -0
  226. package/dist/node/integrations/providers/tldv.js +105 -0
  227. package/dist/node/integrations/providers/twilio-sms.js +90 -0
  228. package/dist/node/integrations/providers/vector-store.js +0 -0
  229. package/dist/node/integrations/providers/voice.js +0 -0
  230. package/dist/node/integrations/runtime.js +208 -0
  231. package/dist/node/integrations/secrets/aws-secret-manager.js +345 -0
  232. package/dist/node/integrations/secrets/env-secret-provider.js +158 -0
  233. package/dist/node/integrations/secrets/gcp-secret-manager.js +346 -0
  234. package/dist/node/integrations/secrets/index.js +1128 -0
  235. package/dist/node/integrations/secrets/manager.js +182 -0
  236. package/dist/node/integrations/secrets/provider.js +73 -0
  237. package/dist/node/integrations/secrets/scaleway-secret-manager.js +374 -0
  238. package/dist/node/integrations/secrets-types.js +0 -0
  239. package/dist/node/integrations/spec.js +21 -0
  240. package/package.json +1029 -0
File without changes
File without changes
@@ -0,0 +1,104 @@
1
+ // src/integrations/spec.ts
2
+ import { SpecContractRegistry } from "@contractspec/lib.contracts-spec/registry";
3
+ var integrationKey = (meta) => `${meta.key}.v${meta.version}`;
4
+
5
+ class IntegrationSpecRegistry extends SpecContractRegistry {
6
+ constructor(items) {
7
+ super("integration", items);
8
+ }
9
+ getByCategory(category) {
10
+ return this.list().filter((spec) => spec.meta.category === category);
11
+ }
12
+ }
13
+ function makeIntegrationSpecKey(meta) {
14
+ return integrationKey(meta);
15
+ }
16
+ var defineIntegration = (spec) => spec;
17
+
18
+ // src/integrations/providers/stripe.ts
19
+ import { StabilityEnum } from "@contractspec/lib.contracts-spec/ownership";
20
+ var stripeIntegrationSpec = defineIntegration({
21
+ meta: {
22
+ key: "payments.stripe",
23
+ version: "1.0.0",
24
+ category: "payments",
25
+ title: "Stripe Payments",
26
+ description: "Stripe integration for payment processing, charges, and payouts.",
27
+ domain: "payments",
28
+ owners: ["platform.payments"],
29
+ tags: ["payments", "psp"],
30
+ stability: StabilityEnum.Stable
31
+ },
32
+ supportedModes: ["managed", "byok"],
33
+ capabilities: {
34
+ provides: [{ key: "payments.psp", version: "1.0.0" }],
35
+ requires: [
36
+ {
37
+ key: "platform.webhooks",
38
+ optional: true,
39
+ reason: "Recommended for reliable event ingestion"
40
+ }
41
+ ]
42
+ },
43
+ configSchema: {
44
+ schema: {
45
+ type: "object",
46
+ properties: {
47
+ accountId: {
48
+ type: "string",
49
+ description: "Connected account ID when using Stripe Connect (BYOK)."
50
+ },
51
+ region: {
52
+ type: "string",
53
+ description: "Optional Stripe region or data residency hint."
54
+ }
55
+ }
56
+ },
57
+ example: {
58
+ accountId: "acct_123",
59
+ region: "us-east-1"
60
+ }
61
+ },
62
+ secretSchema: {
63
+ schema: {
64
+ type: "object",
65
+ required: ["apiKey", "webhookSecret"],
66
+ properties: {
67
+ apiKey: {
68
+ type: "string",
69
+ description: "Stripe secret API key (sk_live_... or sk_test_...)."
70
+ },
71
+ webhookSecret: {
72
+ type: "string",
73
+ description: "Signing secret for webhook verification."
74
+ }
75
+ }
76
+ },
77
+ example: {
78
+ apiKey: "sk_live_***",
79
+ webhookSecret: "whsec_***"
80
+ }
81
+ },
82
+ healthCheck: {
83
+ method: "ping",
84
+ timeoutMs: 5000
85
+ },
86
+ docsUrl: "https://stripe.com/docs/api",
87
+ constraints: {
88
+ rateLimit: {
89
+ rpm: 1000,
90
+ rph: 20000
91
+ }
92
+ },
93
+ byokSetup: {
94
+ setupInstructions: "Create a restricted Stripe API key with write access to Charges and provide a webhook signing secret.",
95
+ requiredScopes: ["charges:write", "customers:read"]
96
+ }
97
+ });
98
+ function registerStripeIntegration(registry) {
99
+ return registry.register(stripeIntegrationSpec);
100
+ }
101
+ export {
102
+ stripeIntegrationSpec,
103
+ registerStripeIntegration
104
+ };
@@ -0,0 +1,86 @@
1
+ // src/integrations/spec.ts
2
+ import { SpecContractRegistry } from "@contractspec/lib.contracts-spec/registry";
3
+ var integrationKey = (meta) => `${meta.key}.v${meta.version}`;
4
+
5
+ class IntegrationSpecRegistry extends SpecContractRegistry {
6
+ constructor(items) {
7
+ super("integration", items);
8
+ }
9
+ getByCategory(category) {
10
+ return this.list().filter((spec) => spec.meta.category === category);
11
+ }
12
+ }
13
+ function makeIntegrationSpecKey(meta) {
14
+ return integrationKey(meta);
15
+ }
16
+ var defineIntegration = (spec) => spec;
17
+
18
+ // src/integrations/providers/supabase-postgres.ts
19
+ import { StabilityEnum } from "@contractspec/lib.contracts-spec/ownership";
20
+ var supabasePostgresIntegrationSpec = defineIntegration({
21
+ meta: {
22
+ key: "database.supabase",
23
+ version: "1.0.0",
24
+ category: "database",
25
+ title: "Supabase Postgres",
26
+ description: "Supabase Postgres integration for SQL query execution and transactional workloads.",
27
+ domain: "infrastructure",
28
+ owners: ["platform.infrastructure"],
29
+ tags: ["database", "postgres", "supabase"],
30
+ stability: StabilityEnum.Beta
31
+ },
32
+ supportedModes: ["managed", "byok"],
33
+ capabilities: {
34
+ provides: [{ key: "database.sql", version: "1.0.0" }]
35
+ },
36
+ configSchema: {
37
+ schema: {
38
+ type: "object",
39
+ properties: {
40
+ maxConnections: {
41
+ type: "number",
42
+ description: "Optional connection pool size when opening a Postgres client to Supabase."
43
+ },
44
+ sslMode: {
45
+ type: "string",
46
+ enum: ["require", "allow", "prefer"],
47
+ description: "TLS mode used by the Postgres client."
48
+ }
49
+ }
50
+ },
51
+ example: {
52
+ maxConnections: 10,
53
+ sslMode: "require"
54
+ }
55
+ },
56
+ secretSchema: {
57
+ schema: {
58
+ type: "object",
59
+ required: ["databaseUrl"],
60
+ properties: {
61
+ databaseUrl: {
62
+ type: "string",
63
+ description: "Supabase Postgres connection string (transaction or session pooler endpoint)."
64
+ }
65
+ }
66
+ },
67
+ example: {
68
+ databaseUrl: "postgresql://postgres.[project-ref]:password@aws-0-region.pooler.supabase.com:6543/postgres"
69
+ }
70
+ },
71
+ healthCheck: {
72
+ method: "ping",
73
+ timeoutMs: 5000
74
+ },
75
+ docsUrl: "https://supabase.com/docs/guides/database/connecting-to-postgres",
76
+ byokSetup: {
77
+ setupInstructions: "Create or reuse a Supabase project and provide a Postgres connection string with permissions aligned to your workload."
78
+ }
79
+ });
80
+ function registerSupabasePostgresIntegration(registry) {
81
+ return registry.register(supabasePostgresIntegrationSpec);
82
+ }
83
+ export {
84
+ supabasePostgresIntegrationSpec,
85
+ registerSupabasePostgresIntegration
86
+ };
@@ -0,0 +1,106 @@
1
+ // src/integrations/spec.ts
2
+ import { SpecContractRegistry } from "@contractspec/lib.contracts-spec/registry";
3
+ var integrationKey = (meta) => `${meta.key}.v${meta.version}`;
4
+
5
+ class IntegrationSpecRegistry extends SpecContractRegistry {
6
+ constructor(items) {
7
+ super("integration", items);
8
+ }
9
+ getByCategory(category) {
10
+ return this.list().filter((spec) => spec.meta.category === category);
11
+ }
12
+ }
13
+ function makeIntegrationSpecKey(meta) {
14
+ return integrationKey(meta);
15
+ }
16
+ var defineIntegration = (spec) => spec;
17
+
18
+ // src/integrations/providers/supabase-vector.ts
19
+ import { StabilityEnum } from "@contractspec/lib.contracts-spec/ownership";
20
+ var supabaseVectorIntegrationSpec = defineIntegration({
21
+ meta: {
22
+ key: "vectordb.supabase",
23
+ version: "1.0.0",
24
+ category: "vector-db",
25
+ title: "Supabase Vector Database (pgvector)",
26
+ description: "Supabase integration for embedding storage and vector similarity search using pgvector.",
27
+ domain: "ai",
28
+ owners: ["platform.ai"],
29
+ tags: ["vector-db", "supabase", "pgvector"],
30
+ stability: StabilityEnum.Beta
31
+ },
32
+ supportedModes: ["managed", "byok"],
33
+ capabilities: {
34
+ provides: [
35
+ { key: "vector-db.search", version: "1.0.0" },
36
+ { key: "vector-db.storage", version: "1.0.0" }
37
+ ],
38
+ requires: [
39
+ {
40
+ key: "ai.embeddings",
41
+ optional: true,
42
+ reason: "Required when vectors are generated by a hosted embedding provider."
43
+ }
44
+ ]
45
+ },
46
+ configSchema: {
47
+ schema: {
48
+ type: "object",
49
+ properties: {
50
+ schema: {
51
+ type: "string",
52
+ description: "Schema name containing the pgvector table (default: public)."
53
+ },
54
+ table: {
55
+ type: "string",
56
+ description: "Table used to store vectors and metadata (default: contractspec_vectors)."
57
+ },
58
+ createTableIfMissing: {
59
+ type: "boolean",
60
+ description: "Automatically create pgvector extension and table when first writing vectors."
61
+ },
62
+ distanceMetric: {
63
+ type: "string",
64
+ enum: ["cosine", "l2", "inner_product"],
65
+ description: "Distance metric used for nearest-neighbor search."
66
+ }
67
+ }
68
+ },
69
+ example: {
70
+ schema: "public",
71
+ table: "contractspec_vectors",
72
+ createTableIfMissing: true,
73
+ distanceMetric: "cosine"
74
+ }
75
+ },
76
+ secretSchema: {
77
+ schema: {
78
+ type: "object",
79
+ required: ["databaseUrl"],
80
+ properties: {
81
+ databaseUrl: {
82
+ type: "string",
83
+ description: "Supabase Postgres connection string with privileges to read/write vector rows."
84
+ }
85
+ }
86
+ },
87
+ example: {
88
+ databaseUrl: "postgresql://postgres.[project-ref]:password@aws-0-region.pooler.supabase.com:6543/postgres"
89
+ }
90
+ },
91
+ healthCheck: {
92
+ method: "ping",
93
+ timeoutMs: 5000
94
+ },
95
+ docsUrl: "https://supabase.com/docs/guides/ai/vector-columns",
96
+ byokSetup: {
97
+ setupInstructions: "Create or reuse a Supabase project, enable pgvector, and provide a Postgres connection string with read/write access to the target vector table."
98
+ }
99
+ });
100
+ function registerSupabaseVectorIntegration(registry) {
101
+ return registry.register(supabaseVectorIntegrationSpec);
102
+ }
103
+ export {
104
+ supabaseVectorIntegrationSpec,
105
+ registerSupabaseVectorIntegration
106
+ };
@@ -0,0 +1,105 @@
1
+ // src/integrations/spec.ts
2
+ import { SpecContractRegistry } from "@contractspec/lib.contracts-spec/registry";
3
+ var integrationKey = (meta) => `${meta.key}.v${meta.version}`;
4
+
5
+ class IntegrationSpecRegistry extends SpecContractRegistry {
6
+ constructor(items) {
7
+ super("integration", items);
8
+ }
9
+ getByCategory(category) {
10
+ return this.list().filter((spec) => spec.meta.category === category);
11
+ }
12
+ }
13
+ function makeIntegrationSpecKey(meta) {
14
+ return integrationKey(meta);
15
+ }
16
+ var defineIntegration = (spec) => spec;
17
+
18
+ // src/integrations/providers/tldv.ts
19
+ import { StabilityEnum } from "@contractspec/lib.contracts-spec/ownership";
20
+ var tldvIntegrationSpec = defineIntegration({
21
+ meta: {
22
+ key: "meeting-recorder.tldv",
23
+ version: "1.0.0",
24
+ category: "meeting-recorder",
25
+ title: "tl;dv Meeting Recorder",
26
+ description: "tl;dv Public API for meeting recordings, transcripts, and webhook events.",
27
+ domain: "productivity",
28
+ owners: ["platform.integrations"],
29
+ tags: ["meeting-recorder", "tldv", "transcripts"],
30
+ stability: StabilityEnum.Experimental
31
+ },
32
+ supportedModes: ["byok"],
33
+ capabilities: {
34
+ provides: [
35
+ { key: "meeting-recorder.meetings.read", version: "1.0.0" },
36
+ { key: "meeting-recorder.transcripts.read", version: "1.0.0" },
37
+ { key: "meeting-recorder.webhooks", version: "1.0.0" }
38
+ ]
39
+ },
40
+ configSchema: {
41
+ schema: {
42
+ type: "object",
43
+ properties: {
44
+ baseUrl: {
45
+ type: "string",
46
+ description: "Optional override for the tl;dv API base URL. Defaults to https://pasta.tldv.io/v1alpha1."
47
+ },
48
+ webhookUrl: {
49
+ type: "string",
50
+ description: "Webhook destination URL configured in tl;dv settings (MeetingReady/TranscriptReady)."
51
+ },
52
+ webhookEvents: {
53
+ type: "array",
54
+ items: { type: "string" },
55
+ description: "Webhook triggers to enable (MeetingReady, TranscriptReady)."
56
+ },
57
+ webhookScope: {
58
+ type: "string",
59
+ description: "Webhook scope to configure (user, team, or organization)."
60
+ }
61
+ }
62
+ },
63
+ example: {
64
+ baseUrl: "https://pasta.tldv.io/v1alpha1",
65
+ webhookUrl: "https://example.com/webhooks/tldv",
66
+ webhookEvents: ["MeetingReady", "TranscriptReady"],
67
+ webhookScope: "team"
68
+ }
69
+ },
70
+ secretSchema: {
71
+ schema: {
72
+ type: "object",
73
+ required: ["apiKey"],
74
+ properties: {
75
+ apiKey: {
76
+ type: "string",
77
+ description: "tl;dv API key used in the x-api-key header for API requests."
78
+ },
79
+ webhookSecret: {
80
+ type: "string",
81
+ description: "Optional shared secret for webhook verification if configured in your environment."
82
+ }
83
+ }
84
+ },
85
+ example: {
86
+ apiKey: "tldv-***",
87
+ webhookSecret: "tldv-webhook-secret"
88
+ }
89
+ },
90
+ healthCheck: {
91
+ method: "ping",
92
+ timeoutMs: 6000
93
+ },
94
+ docsUrl: "https://doc.tldv.io/index.html",
95
+ byokSetup: {
96
+ setupInstructions: "Generate a tl;dv API key and optionally configure MeetingReady/TranscriptReady webhooks."
97
+ }
98
+ });
99
+ function registerTldvIntegration(registry) {
100
+ return registry.register(tldvIntegrationSpec);
101
+ }
102
+ export {
103
+ tldvIntegrationSpec,
104
+ registerTldvIntegration
105
+ };
@@ -0,0 +1,90 @@
1
+ // src/integrations/spec.ts
2
+ import { SpecContractRegistry } from "@contractspec/lib.contracts-spec/registry";
3
+ var integrationKey = (meta) => `${meta.key}.v${meta.version}`;
4
+
5
+ class IntegrationSpecRegistry extends SpecContractRegistry {
6
+ constructor(items) {
7
+ super("integration", items);
8
+ }
9
+ getByCategory(category) {
10
+ return this.list().filter((spec) => spec.meta.category === category);
11
+ }
12
+ }
13
+ function makeIntegrationSpecKey(meta) {
14
+ return integrationKey(meta);
15
+ }
16
+ var defineIntegration = (spec) => spec;
17
+
18
+ // src/integrations/providers/twilio-sms.ts
19
+ import { StabilityEnum } from "@contractspec/lib.contracts-spec/ownership";
20
+ var twilioSmsIntegrationSpec = defineIntegration({
21
+ meta: {
22
+ key: "sms.twilio",
23
+ version: "1.0.0",
24
+ category: "sms",
25
+ title: "Twilio Messaging",
26
+ description: "Twilio SMS integration for transactional and notification messaging.",
27
+ domain: "communications",
28
+ owners: ["platform.messaging"],
29
+ tags: ["sms", "messaging"],
30
+ stability: StabilityEnum.Stable
31
+ },
32
+ supportedModes: ["managed", "byok"],
33
+ capabilities: {
34
+ provides: [{ key: "sms.outbound", version: "1.0.0" }]
35
+ },
36
+ configSchema: {
37
+ schema: {
38
+ type: "object",
39
+ properties: {
40
+ fromNumber: {
41
+ type: "string",
42
+ description: "Default Twilio phone number used as sender."
43
+ }
44
+ }
45
+ },
46
+ example: {
47
+ fromNumber: "+15551234567"
48
+ }
49
+ },
50
+ secretSchema: {
51
+ schema: {
52
+ type: "object",
53
+ required: ["accountSid", "authToken"],
54
+ properties: {
55
+ accountSid: {
56
+ type: "string",
57
+ description: "Twilio Account SID."
58
+ },
59
+ authToken: {
60
+ type: "string",
61
+ description: "Twilio Auth Token."
62
+ }
63
+ }
64
+ },
65
+ example: {
66
+ accountSid: "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
67
+ authToken: "auth-token"
68
+ }
69
+ },
70
+ healthCheck: {
71
+ method: "custom",
72
+ timeoutMs: 3000
73
+ },
74
+ docsUrl: "https://www.twilio.com/docs/sms/api",
75
+ constraints: {
76
+ rateLimit: {
77
+ rpm: 200
78
+ }
79
+ },
80
+ byokSetup: {
81
+ setupInstructions: "Provide a Twilio account SID, auth token, and verify the outbound sending numbers used by the integration."
82
+ }
83
+ });
84
+ function registerTwilioSmsIntegration(registry) {
85
+ return registry.register(twilioSmsIntegrationSpec);
86
+ }
87
+ export {
88
+ twilioSmsIntegrationSpec,
89
+ registerTwilioSmsIntegration
90
+ };
File without changes