@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
@@ -0,0 +1,296 @@
1
+ // src/integrations/operations.ts
2
+ import { ScalarTypeEnum, SchemaModel } from "@contractspec/lib.schema";
3
+ import {
4
+ defineCommand,
5
+ defineQuery
6
+ } from "@contractspec/lib.contracts-spec/operations";
7
+ var IntegrationConnectionRecord = new SchemaModel({
8
+ name: "IntegrationConnectionRecord",
9
+ fields: {
10
+ id: { type: ScalarTypeEnum.ID(), isOptional: false },
11
+ tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },
12
+ integrationKey: {
13
+ type: ScalarTypeEnum.NonEmptyString(),
14
+ isOptional: false
15
+ },
16
+ integrationVersion: {
17
+ type: ScalarTypeEnum.Int_unsecure(),
18
+ isOptional: false
19
+ },
20
+ label: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
21
+ ownershipMode: {
22
+ type: ScalarTypeEnum.String_unsecure(),
23
+ isOptional: false
24
+ },
25
+ externalAccountId: {
26
+ type: ScalarTypeEnum.String_unsecure(),
27
+ isOptional: true
28
+ },
29
+ secretProvider: {
30
+ type: ScalarTypeEnum.String_unsecure(),
31
+ isOptional: false
32
+ },
33
+ secretRef: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
34
+ status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
35
+ environment: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
36
+ healthStatus: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
37
+ healthCheckedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
38
+ healthLatencyMs: {
39
+ type: ScalarTypeEnum.Float_unsecure(),
40
+ isOptional: true
41
+ },
42
+ healthErrorCode: {
43
+ type: ScalarTypeEnum.String_unsecure(),
44
+ isOptional: true
45
+ },
46
+ healthErrorMessage: {
47
+ type: ScalarTypeEnum.String_unsecure(),
48
+ isOptional: true
49
+ },
50
+ usageRequestCount: {
51
+ type: ScalarTypeEnum.Int_unsecure(),
52
+ isOptional: true
53
+ },
54
+ usageSuccessCount: {
55
+ type: ScalarTypeEnum.Int_unsecure(),
56
+ isOptional: true
57
+ },
58
+ usageErrorCount: {
59
+ type: ScalarTypeEnum.Int_unsecure(),
60
+ isOptional: true
61
+ },
62
+ usageLastUsedAt: {
63
+ type: ScalarTypeEnum.DateTime(),
64
+ isOptional: true
65
+ },
66
+ usageLastErrorAt: {
67
+ type: ScalarTypeEnum.DateTime(),
68
+ isOptional: true
69
+ },
70
+ usageLastErrorCode: {
71
+ type: ScalarTypeEnum.String_unsecure(),
72
+ isOptional: true
73
+ },
74
+ createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
75
+ updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true }
76
+ }
77
+ });
78
+ var CreateIntegrationConnectionInput = new SchemaModel({
79
+ name: "CreateIntegrationConnectionInput",
80
+ fields: {
81
+ tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },
82
+ integrationKey: {
83
+ type: ScalarTypeEnum.NonEmptyString(),
84
+ isOptional: false
85
+ },
86
+ integrationVersion: {
87
+ type: ScalarTypeEnum.Int_unsecure(),
88
+ isOptional: false
89
+ },
90
+ label: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
91
+ ownershipMode: {
92
+ type: ScalarTypeEnum.String_unsecure(),
93
+ isOptional: false
94
+ },
95
+ externalAccountId: {
96
+ type: ScalarTypeEnum.String_unsecure(),
97
+ isOptional: true
98
+ },
99
+ secretProvider: {
100
+ type: ScalarTypeEnum.String_unsecure(),
101
+ isOptional: false
102
+ },
103
+ secretRef: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
104
+ environment: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
105
+ config: { type: ScalarTypeEnum.JSONObject(), isOptional: false }
106
+ }
107
+ });
108
+ var UpdateIntegrationConnectionInput = new SchemaModel({
109
+ name: "UpdateIntegrationConnectionInput",
110
+ fields: {
111
+ connectionId: { type: ScalarTypeEnum.ID(), isOptional: false },
112
+ label: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
113
+ status: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
114
+ ownershipMode: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
115
+ externalAccountId: {
116
+ type: ScalarTypeEnum.String_unsecure(),
117
+ isOptional: true
118
+ },
119
+ secretProvider: {
120
+ type: ScalarTypeEnum.String_unsecure(),
121
+ isOptional: true
122
+ },
123
+ secretRef: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
124
+ config: { type: ScalarTypeEnum.JSONObject(), isOptional: true }
125
+ }
126
+ });
127
+ var DeleteIntegrationConnectionInput = new SchemaModel({
128
+ name: "DeleteIntegrationConnectionInput",
129
+ fields: {
130
+ connectionId: { type: ScalarTypeEnum.ID(), isOptional: false }
131
+ }
132
+ });
133
+ var ListIntegrationConnectionsInput = new SchemaModel({
134
+ name: "ListIntegrationConnectionsInput",
135
+ fields: {
136
+ tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },
137
+ category: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
138
+ status: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
139
+ }
140
+ });
141
+ var ListIntegrationConnectionsOutput = new SchemaModel({
142
+ name: "ListIntegrationConnectionsOutput",
143
+ fields: {
144
+ connections: {
145
+ type: IntegrationConnectionRecord,
146
+ isOptional: false,
147
+ isArray: true
148
+ }
149
+ }
150
+ });
151
+ var TestIntegrationConnectionInput = new SchemaModel({
152
+ name: "TestIntegrationConnectionInput",
153
+ fields: {
154
+ connectionId: { type: ScalarTypeEnum.ID(), isOptional: false }
155
+ }
156
+ });
157
+ var TestIntegrationConnectionOutput = new SchemaModel({
158
+ name: "TestIntegrationConnectionOutput",
159
+ fields: {
160
+ success: { type: ScalarTypeEnum.Boolean(), isOptional: false },
161
+ status: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
162
+ latencyMs: { type: ScalarTypeEnum.Float_unsecure(), isOptional: true },
163
+ error: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
164
+ errorCode: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
165
+ }
166
+ });
167
+ var DeleteIntegrationConnectionOutput = new SchemaModel({
168
+ name: "DeleteIntegrationConnectionOutput",
169
+ fields: {
170
+ success: { type: ScalarTypeEnum.Boolean(), isOptional: false }
171
+ }
172
+ });
173
+ var CreateIntegrationConnection = defineCommand({
174
+ meta: {
175
+ key: "integrations.connection.create",
176
+ title: "Create Integration Connection",
177
+ version: "1.0.0",
178
+ description: "Create a new integration connection for a tenant.",
179
+ goal: "Provision a tenant-scoped connection to an external provider.",
180
+ context: "Used by Ops or the App Studio to configure external integrations such as Stripe or Qdrant.",
181
+ owners: ["@platform.integrations"],
182
+ tags: ["integration", "connections"],
183
+ stability: "experimental"
184
+ },
185
+ io: {
186
+ input: CreateIntegrationConnectionInput,
187
+ output: IntegrationConnectionRecord
188
+ },
189
+ policy: {
190
+ auth: "admin",
191
+ policies: [{ key: "platform.integration.manage", version: "1.0.0" }]
192
+ }
193
+ });
194
+ var UpdateIntegrationConnection = defineCommand({
195
+ meta: {
196
+ key: "integrations.connection.update",
197
+ title: "Update Integration Connection",
198
+ version: "1.0.0",
199
+ description: "Update metadata or credentials for an integration connection.",
200
+ goal: "Allow secure rotation of credentials and metadata adjustments.",
201
+ context: "Supports rotating API keys, toggling status, or updating labels for tenant integrations.",
202
+ owners: ["@platform.integrations"],
203
+ tags: ["integration", "connections"],
204
+ stability: "experimental"
205
+ },
206
+ io: {
207
+ input: UpdateIntegrationConnectionInput,
208
+ output: IntegrationConnectionRecord
209
+ },
210
+ policy: {
211
+ auth: "admin",
212
+ policies: [{ key: "platform.integration.manage", version: "1.0.0" }]
213
+ }
214
+ });
215
+ var DeleteIntegrationConnection = defineCommand({
216
+ meta: {
217
+ key: "integrations.connection.delete",
218
+ title: "Delete Integration Connection",
219
+ version: "1.0.0",
220
+ description: "Delete an integration connection for a tenant.",
221
+ goal: "Safely remove credentials and disable connector usage.",
222
+ context: "Ensures connections are de-provisioned when no longer needed or breached.",
223
+ owners: ["@platform.integrations"],
224
+ tags: ["integration", "connections"],
225
+ stability: "experimental"
226
+ },
227
+ io: {
228
+ input: DeleteIntegrationConnectionInput,
229
+ output: DeleteIntegrationConnectionOutput
230
+ },
231
+ policy: {
232
+ auth: "admin",
233
+ policies: [{ key: "platform.integration.manage", version: "1.0.0" }]
234
+ }
235
+ });
236
+ var ListIntegrationConnections = defineQuery({
237
+ meta: {
238
+ key: "integrations.connection.list",
239
+ title: "List Integration Connections",
240
+ version: "1.0.0",
241
+ description: "List integration connections for a tenant.",
242
+ goal: "Provide visibility into configured integrations and their status.",
243
+ context: "Used by the App Studio and Ops flows to show bindings and health.",
244
+ owners: ["@platform.integrations"],
245
+ tags: ["integration", "connections"],
246
+ stability: "experimental"
247
+ },
248
+ io: {
249
+ input: ListIntegrationConnectionsInput,
250
+ output: ListIntegrationConnectionsOutput
251
+ },
252
+ policy: {
253
+ auth: "admin",
254
+ policies: [{ key: "platform.integration.read", version: "1.0.0" }]
255
+ }
256
+ });
257
+ var TestIntegrationConnection = defineCommand({
258
+ meta: {
259
+ key: "integrations.connection.test",
260
+ title: "Test Integration Connection",
261
+ version: "1.0.0",
262
+ description: "Run a health check against a configured integration connection.",
263
+ goal: "Validate credentials and connectivity for external providers.",
264
+ context: "Triggered manually or by background monitors to confirm provider availability.",
265
+ owners: ["@platform.integrations"],
266
+ tags: ["integration", "connections"],
267
+ stability: "experimental"
268
+ },
269
+ io: {
270
+ input: TestIntegrationConnectionInput,
271
+ output: TestIntegrationConnectionOutput
272
+ },
273
+ policy: {
274
+ auth: "admin",
275
+ policies: [{ key: "platform.integration.manage", version: "1.0.0" }]
276
+ }
277
+ });
278
+ var integrationContracts = {
279
+ CreateIntegrationConnection,
280
+ UpdateIntegrationConnection,
281
+ DeleteIntegrationConnection,
282
+ ListIntegrationConnections,
283
+ TestIntegrationConnection
284
+ };
285
+ function registerIntegrationContracts(registry) {
286
+ return registry.register(CreateIntegrationConnection).register(UpdateIntegrationConnection).register(DeleteIntegrationConnection).register(ListIntegrationConnections).register(TestIntegrationConnection);
287
+ }
288
+ export {
289
+ registerIntegrationContracts,
290
+ integrationContracts,
291
+ UpdateIntegrationConnection,
292
+ TestIntegrationConnection,
293
+ ListIntegrationConnections,
294
+ DeleteIntegrationConnection,
295
+ CreateIntegrationConnection
296
+ };
File without changes
File without changes
File without changes
@@ -0,0 +1,85 @@
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/elevenlabs.ts
19
+ import { StabilityEnum } from "@contractspec/lib.contracts-spec/ownership";
20
+ var elevenLabsIntegrationSpec = defineIntegration({
21
+ meta: {
22
+ key: "ai-voice.elevenlabs",
23
+ version: "1.0.0",
24
+ category: "ai-voice",
25
+ title: "ElevenLabs Text-to-Speech",
26
+ description: "ElevenLabs integration for neural voice synthesis and voice catalog access.",
27
+ domain: "ai",
28
+ owners: ["platform.ai"],
29
+ tags: ["voice", "tts"],
30
+ stability: StabilityEnum.Beta
31
+ },
32
+ supportedModes: ["managed", "byok"],
33
+ capabilities: {
34
+ provides: [{ key: "ai.voice.synthesis", version: "1.0.0" }]
35
+ },
36
+ configSchema: {
37
+ schema: {
38
+ type: "object",
39
+ properties: {
40
+ defaultVoiceId: {
41
+ type: "string",
42
+ description: "Optional default voice identifier for synthesis requests."
43
+ }
44
+ }
45
+ },
46
+ example: {
47
+ defaultVoiceId: "pNInz6obpgDQGcFmaJgB"
48
+ }
49
+ },
50
+ secretSchema: {
51
+ schema: {
52
+ type: "object",
53
+ required: ["apiKey"],
54
+ properties: {
55
+ apiKey: {
56
+ type: "string",
57
+ description: "ElevenLabs API key with text-to-speech permissions."
58
+ }
59
+ }
60
+ },
61
+ example: {
62
+ apiKey: "eleven-***"
63
+ }
64
+ },
65
+ healthCheck: {
66
+ method: "custom",
67
+ timeoutMs: 4000
68
+ },
69
+ docsUrl: "https://elevenlabs.io/docs/api-reference/text-to-speech",
70
+ constraints: {
71
+ rateLimit: {
72
+ rpm: 120
73
+ }
74
+ },
75
+ byokSetup: {
76
+ setupInstructions: "Create an ElevenLabs API key and ensure the desired voices are accessible to the key scope."
77
+ }
78
+ });
79
+ function registerElevenLabsIntegration(registry) {
80
+ return registry.register(elevenLabsIntegrationSpec);
81
+ }
82
+ export {
83
+ registerElevenLabsIntegration,
84
+ elevenLabsIntegrationSpec
85
+ };
File without changes
File without changes
@@ -0,0 +1,111 @@
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/fal.ts
19
+ import { StabilityEnum } from "@contractspec/lib.contracts-spec/ownership";
20
+ var falIntegrationSpec = defineIntegration({
21
+ meta: {
22
+ key: "ai-voice.fal",
23
+ version: "1.0.0",
24
+ category: "ai-voice",
25
+ title: "Fal Chatterbox Text-to-Speech",
26
+ description: "Fal integration for voice synthesis using Chatterbox text-to-speech models.",
27
+ domain: "ai",
28
+ owners: ["platform.ai"],
29
+ tags: ["voice", "tts", "chatterbox"],
30
+ stability: StabilityEnum.Experimental
31
+ },
32
+ supportedModes: ["byok"],
33
+ capabilities: {
34
+ provides: [{ key: "ai.voice.synthesis", version: "1.0.0" }]
35
+ },
36
+ configSchema: {
37
+ schema: {
38
+ type: "object",
39
+ properties: {
40
+ modelId: {
41
+ type: "string",
42
+ description: "Fal model endpoint identifier (e.g. fal-ai/chatterbox/text-to-speech)."
43
+ },
44
+ defaultVoiceUrl: {
45
+ type: "string",
46
+ description: "Optional reference audio URL used as default voice conditioning input."
47
+ },
48
+ defaultExaggeration: {
49
+ type: "number",
50
+ minimum: 0,
51
+ maximum: 1,
52
+ description: "Optional default exaggeration value for speech output."
53
+ },
54
+ defaultTemperature: {
55
+ type: "number",
56
+ minimum: 0.05,
57
+ maximum: 2,
58
+ description: "Optional default temperature for synthesis requests."
59
+ },
60
+ defaultCfg: {
61
+ type: "number",
62
+ minimum: 0.1,
63
+ maximum: 1,
64
+ description: "Optional default cfg value for synthesis requests."
65
+ },
66
+ pollIntervalMs: {
67
+ type: "number",
68
+ description: "Optional queue polling interval in milliseconds."
69
+ }
70
+ }
71
+ },
72
+ example: {
73
+ modelId: "fal-ai/chatterbox/text-to-speech",
74
+ defaultVoiceUrl: "https://storage.googleapis.com/chatterbox-demo-samples/prompts/male_rickmorty.mp3",
75
+ defaultExaggeration: 0.25,
76
+ defaultTemperature: 0.7,
77
+ defaultCfg: 0.5,
78
+ pollIntervalMs: 1000
79
+ }
80
+ },
81
+ secretSchema: {
82
+ schema: {
83
+ type: "object",
84
+ required: ["apiKey"],
85
+ properties: {
86
+ apiKey: {
87
+ type: "string",
88
+ description: "Fal API key (FAL_KEY)."
89
+ }
90
+ }
91
+ },
92
+ example: {
93
+ apiKey: "key-id:key-secret"
94
+ }
95
+ },
96
+ healthCheck: {
97
+ method: "custom",
98
+ timeoutMs: 7000
99
+ },
100
+ docsUrl: "https://fal.ai/models/fal-ai/chatterbox/text-to-speech/api",
101
+ byokSetup: {
102
+ setupInstructions: "Create a Fal API key and configure the desired voice model endpoint before connecting tenants."
103
+ }
104
+ });
105
+ function registerFalIntegration(registry) {
106
+ return registry.register(falIntegrationSpec);
107
+ }
108
+ export {
109
+ registerFalIntegration,
110
+ falIntegrationSpec
111
+ };
@@ -0,0 +1,125 @@
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/fathom.ts
19
+ import { StabilityEnum } from "@contractspec/lib.contracts-spec/ownership";
20
+ var fathomIntegrationSpec = defineIntegration({
21
+ meta: {
22
+ key: "meeting-recorder.fathom",
23
+ version: "1.0.0",
24
+ category: "meeting-recorder",
25
+ title: "Fathom Meeting Recorder",
26
+ description: "Fathom External API for meetings, transcripts, and webhook events.",
27
+ domain: "productivity",
28
+ owners: ["platform.integrations"],
29
+ tags: ["meeting-recorder", "fathom", "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 Fathom API base URL. Defaults to https://api.fathom.ai/external/v1."
47
+ },
48
+ webhookUrl: {
49
+ type: "string",
50
+ description: "Webhook destination URL used when registering Fathom webhooks."
51
+ },
52
+ includeTranscript: {
53
+ type: "boolean",
54
+ description: "Include transcript data in Fathom webhook payloads."
55
+ },
56
+ includeSummary: {
57
+ type: "boolean",
58
+ description: "Include summary data in Fathom webhook payloads."
59
+ },
60
+ includeActionItems: {
61
+ type: "boolean",
62
+ description: "Include action items in Fathom webhook payloads."
63
+ },
64
+ includeCrmMatches: {
65
+ type: "boolean",
66
+ description: "Include CRM matches in Fathom webhook payloads."
67
+ },
68
+ triggeredFor: {
69
+ type: "array",
70
+ items: { type: "string" },
71
+ description: "Recording scopes to trigger webhooks for (e.g., my_recordings)."
72
+ }
73
+ }
74
+ },
75
+ example: {
76
+ baseUrl: "https://api.fathom.ai/external/v1",
77
+ webhookUrl: "https://example.com/webhooks/fathom",
78
+ includeTranscript: true,
79
+ includeSummary: true,
80
+ includeActionItems: false,
81
+ includeCrmMatches: false,
82
+ triggeredFor: ["my_recordings"]
83
+ }
84
+ },
85
+ secretSchema: {
86
+ schema: {
87
+ type: "object",
88
+ required: ["apiKey"],
89
+ properties: {
90
+ apiKey: {
91
+ type: "string",
92
+ description: "Fathom API key used in the X-Api-Key header."
93
+ },
94
+ webhookSecret: {
95
+ type: "string",
96
+ description: "Optional webhook secret used to verify Fathom webhook signatures."
97
+ }
98
+ }
99
+ },
100
+ example: {
101
+ apiKey: "fathom-***",
102
+ webhookSecret: "whsec_***"
103
+ }
104
+ },
105
+ healthCheck: {
106
+ method: "list",
107
+ timeoutMs: 8000
108
+ },
109
+ docsUrl: "https://developers.fathom.ai/",
110
+ constraints: {
111
+ rateLimit: {
112
+ rpm: 60
113
+ }
114
+ },
115
+ byokSetup: {
116
+ setupInstructions: "Generate an API key in Fathom settings and optionally configure webhooks for meeting content readiness."
117
+ }
118
+ });
119
+ function registerFathomIntegration(registry) {
120
+ return registry.register(fathomIntegrationSpec);
121
+ }
122
+ export {
123
+ registerFathomIntegration,
124
+ fathomIntegrationSpec
125
+ };