@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,17 @@
1
+ // src/integrations/integrations.capability.ts
2
+ import { defineCapability } from "@contractspec/lib.contracts-spec/capabilities";
3
+ import { StabilityEnum } from "@contractspec/lib.contracts-spec/ownership";
4
+ var IntegrationsCapability = defineCapability({
5
+ meta: {
6
+ key: "integrations",
7
+ version: "1.0.0",
8
+ kind: "integration",
9
+ stability: StabilityEnum.Experimental,
10
+ description: "Core integrations capability for third-party connections",
11
+ owners: ["@platform.core"],
12
+ tags: ["integrations", "platform"]
13
+ }
14
+ });
15
+ export {
16
+ IntegrationsCapability
17
+ };
@@ -0,0 +1,32 @@
1
+ // src/integrations/integrations.feature.ts
2
+ import { defineFeature } from "@contractspec/lib.contracts-spec/features";
3
+ var IntegrationsFeature = defineFeature({
4
+ meta: {
5
+ key: "platform.integrations",
6
+ version: "1.0.0",
7
+ title: "Platform Integrations",
8
+ description: "Manage integration connections to external providers (e.g., Stripe, Qdrant)",
9
+ domain: "platform",
10
+ owners: ["@platform.integrations"],
11
+ tags: ["integrations", "connections", "platform"],
12
+ stability: "experimental"
13
+ },
14
+ operations: [
15
+ { key: "integrations.connection.create", version: "1.0.0" },
16
+ { key: "integrations.connection.update", version: "1.0.0" },
17
+ { key: "integrations.connection.delete", version: "1.0.0" },
18
+ { key: "integrations.connection.list", version: "1.0.0" },
19
+ { key: "integrations.connection.test", version: "1.0.0" }
20
+ ],
21
+ events: [],
22
+ presentations: [],
23
+ opToPresentation: [],
24
+ presentationsTargets: [],
25
+ capabilities: {
26
+ provides: [{ key: "integrations", version: "1.0.0" }],
27
+ requires: [{ key: "identity", version: "1.0.0" }]
28
+ }
29
+ });
30
+ export {
31
+ IntegrationsFeature
32
+ };
@@ -0,0 +1,473 @@
1
+ // src/integrations/meeting-recorder/models.ts
2
+ import { ScalarTypeEnum, SchemaModel } from "@contractspec/lib.schema";
3
+ var MeetingParticipantRecord = new SchemaModel({
4
+ name: "MeetingParticipantRecord",
5
+ description: "Canonical participant entry for meetings and transcripts from recorder providers.",
6
+ fields: {
7
+ id: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
8
+ externalId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
9
+ name: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
10
+ email: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
11
+ role: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
12
+ isExternal: { type: ScalarTypeEnum.Boolean(), isOptional: true },
13
+ metadata: { type: ScalarTypeEnum.JSONObject(), isOptional: true }
14
+ }
15
+ });
16
+ var MeetingTranscriptSegmentRecord = new SchemaModel({
17
+ name: "MeetingTranscriptSegmentRecord",
18
+ description: "A single transcript segment with speaker attribution.",
19
+ fields: {
20
+ index: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
21
+ speakerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
22
+ speakerName: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
23
+ speakerEmail: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
24
+ text: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
25
+ startTimeMs: { type: ScalarTypeEnum.Float_unsecure(), isOptional: true },
26
+ endTimeMs: { type: ScalarTypeEnum.Float_unsecure(), isOptional: true },
27
+ startTime: { type: ScalarTypeEnum.DateTime(), isOptional: true },
28
+ endTime: { type: ScalarTypeEnum.DateTime(), isOptional: true },
29
+ confidence: { type: ScalarTypeEnum.Float_unsecure(), isOptional: true },
30
+ metadata: { type: ScalarTypeEnum.JSONObject(), isOptional: true }
31
+ }
32
+ });
33
+ var MeetingRecord = new SchemaModel({
34
+ name: "MeetingRecord",
35
+ description: "Canonical meeting metadata synced from meeting recorder providers.",
36
+ fields: {
37
+ id: { type: ScalarTypeEnum.ID(), isOptional: false },
38
+ tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },
39
+ connectionId: { type: ScalarTypeEnum.ID(), isOptional: false },
40
+ externalId: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
41
+ title: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
42
+ summary: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
43
+ organizer: { type: MeetingParticipantRecord, isOptional: true },
44
+ invitees: {
45
+ type: MeetingParticipantRecord,
46
+ isArray: true,
47
+ isOptional: true
48
+ },
49
+ participants: {
50
+ type: MeetingParticipantRecord,
51
+ isArray: true,
52
+ isOptional: true
53
+ },
54
+ scheduledStartAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
55
+ scheduledEndAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
56
+ recordingStartAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
57
+ recordingEndAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
58
+ durationSeconds: {
59
+ type: ScalarTypeEnum.Float_unsecure(),
60
+ isOptional: true
61
+ },
62
+ meetingUrl: { type: ScalarTypeEnum.URL(), isOptional: true },
63
+ recordingUrl: { type: ScalarTypeEnum.URL(), isOptional: true },
64
+ shareUrl: { type: ScalarTypeEnum.URL(), isOptional: true },
65
+ sourcePlatform: {
66
+ type: ScalarTypeEnum.String_unsecure(),
67
+ isOptional: true
68
+ },
69
+ language: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
70
+ transcriptAvailable: { type: ScalarTypeEnum.Boolean(), isOptional: true },
71
+ createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
72
+ updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
73
+ metadata: { type: ScalarTypeEnum.JSONObject(), isOptional: true }
74
+ }
75
+ });
76
+ var MeetingTranscriptRecord = new SchemaModel({
77
+ name: "MeetingTranscriptRecord",
78
+ description: "Canonical transcript payload for a recorded meeting.",
79
+ fields: {
80
+ id: { type: ScalarTypeEnum.ID(), isOptional: false },
81
+ meetingId: { type: ScalarTypeEnum.ID(), isOptional: false },
82
+ tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },
83
+ connectionId: { type: ScalarTypeEnum.ID(), isOptional: false },
84
+ externalId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
85
+ format: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
86
+ text: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
87
+ segments: {
88
+ type: MeetingTranscriptSegmentRecord,
89
+ isArray: true,
90
+ isOptional: true
91
+ },
92
+ language: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
93
+ sourceUrl: { type: ScalarTypeEnum.URL(), isOptional: true },
94
+ generatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
95
+ metadata: { type: ScalarTypeEnum.JSONObject(), isOptional: true },
96
+ raw: { type: ScalarTypeEnum.JSON(), isOptional: true }
97
+ }
98
+ });
99
+ var MeetingRecorderWebhookEventRecord = new SchemaModel({
100
+ name: "MeetingRecorderWebhookEventRecord",
101
+ description: "Normalized webhook event from a meeting recorder provider.",
102
+ fields: {
103
+ id: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
104
+ providerKey: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
105
+ eventType: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
106
+ meetingId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
107
+ transcriptId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
108
+ recordingId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
109
+ receivedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
110
+ verified: { type: ScalarTypeEnum.Boolean(), isOptional: true },
111
+ payload: { type: ScalarTypeEnum.JSON(), isOptional: true },
112
+ metadata: { type: ScalarTypeEnum.JSONObject(), isOptional: true }
113
+ }
114
+ });
115
+
116
+ // src/integrations/meeting-recorder/contracts/meetings.ts
117
+ import { ScalarTypeEnum as ScalarTypeEnum2, SchemaModel as SchemaModel2 } from "@contractspec/lib.schema";
118
+ import {
119
+ defineQuery
120
+ } from "@contractspec/lib.contracts-spec/operations";
121
+ var MeetingRecorderListMeetingsInput = new SchemaModel2({
122
+ name: "MeetingRecorderListMeetingsInput",
123
+ description: "Parameters for listing meetings from a meeting recorder provider.",
124
+ fields: {
125
+ tenantId: { type: ScalarTypeEnum2.ID(), isOptional: false },
126
+ connectionId: { type: ScalarTypeEnum2.ID(), isOptional: true },
127
+ from: { type: ScalarTypeEnum2.DateTime(), isOptional: true },
128
+ to: { type: ScalarTypeEnum2.DateTime(), isOptional: true },
129
+ cursor: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
130
+ pageSize: { type: ScalarTypeEnum2.Int_unsecure(), isOptional: true },
131
+ query: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
132
+ organizerEmail: {
133
+ type: ScalarTypeEnum2.String_unsecure(),
134
+ isOptional: true
135
+ },
136
+ participantEmail: {
137
+ type: ScalarTypeEnum2.String_unsecure(),
138
+ isOptional: true
139
+ },
140
+ includeTranscript: { type: ScalarTypeEnum2.Boolean(), isOptional: true },
141
+ includeSummary: { type: ScalarTypeEnum2.Boolean(), isOptional: true }
142
+ }
143
+ });
144
+ var MeetingRecorderListMeetingsOutput = new SchemaModel2({
145
+ name: "MeetingRecorderListMeetingsOutput",
146
+ description: "Paginated list of meetings for a recorder provider.",
147
+ fields: {
148
+ meetings: {
149
+ type: MeetingRecord,
150
+ isOptional: false,
151
+ isArray: true
152
+ },
153
+ nextCursor: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
154
+ hasMore: { type: ScalarTypeEnum2.Boolean(), isOptional: true }
155
+ }
156
+ });
157
+ var MeetingRecorderGetMeetingInput = new SchemaModel2({
158
+ name: "MeetingRecorderGetMeetingInput",
159
+ description: "Parameters for retrieving a single meeting record.",
160
+ fields: {
161
+ tenantId: { type: ScalarTypeEnum2.ID(), isOptional: false },
162
+ meetingId: { type: ScalarTypeEnum2.ID(), isOptional: false },
163
+ connectionId: { type: ScalarTypeEnum2.ID(), isOptional: true },
164
+ includeTranscript: { type: ScalarTypeEnum2.Boolean(), isOptional: true },
165
+ includeSummary: { type: ScalarTypeEnum2.Boolean(), isOptional: true }
166
+ }
167
+ });
168
+ var MeetingRecorderListMeetings = defineQuery({
169
+ meta: {
170
+ key: "meeting-recorder.meetings.list",
171
+ version: "1.0.0",
172
+ description: "List meetings recorded by the configured meeting provider.",
173
+ goal: "Provide downstream workflows with recent meetings and metadata.",
174
+ context: "Used by integration hubs and sync workflows to enumerate meetings before pulling transcripts.",
175
+ owners: ["@platform.integrations"],
176
+ tags: ["meeting-recorder", "meetings", "transcripts"],
177
+ stability: "experimental"
178
+ },
179
+ io: {
180
+ input: MeetingRecorderListMeetingsInput,
181
+ output: MeetingRecorderListMeetingsOutput
182
+ },
183
+ policy: {
184
+ auth: "user"
185
+ }
186
+ });
187
+ var MeetingRecorderGetMeeting = defineQuery({
188
+ meta: {
189
+ key: "meeting-recorder.meetings.get",
190
+ version: "1.0.0",
191
+ description: "Retrieve metadata for a single meeting recording.",
192
+ goal: "Allow downstream experiences to display detailed meeting metadata.",
193
+ context: "Used when drilling into a specific meeting from a transcript or integration dashboard.",
194
+ owners: ["@platform.integrations"],
195
+ tags: ["meeting-recorder", "meetings"],
196
+ stability: "experimental"
197
+ },
198
+ io: {
199
+ input: MeetingRecorderGetMeetingInput,
200
+ output: MeetingRecord
201
+ },
202
+ policy: {
203
+ auth: "user"
204
+ }
205
+ });
206
+ var meetingRecorderMeetingContracts = {
207
+ MeetingRecorderListMeetings,
208
+ MeetingRecorderGetMeeting
209
+ };
210
+ function registerMeetingRecorderMeetingContracts(registry) {
211
+ return registry.register(MeetingRecorderListMeetings).register(MeetingRecorderGetMeeting);
212
+ }
213
+
214
+ // src/integrations/meeting-recorder/telemetry.ts
215
+ var MEETING_RECORDER_PII_FIELDS = [
216
+ "email",
217
+ "organizerEmail",
218
+ "participantEmail",
219
+ "participants",
220
+ "invitees",
221
+ "attendees",
222
+ "speakerName",
223
+ "speakerEmail",
224
+ "name",
225
+ "phone",
226
+ "phoneNumber",
227
+ "displayName"
228
+ ];
229
+ var MEETING_RECORDER_TELEMETRY_EVENTS = {
230
+ meetingsSynced: "meeting-recorder.meetings.synced",
231
+ meetingsSyncFailed: "meeting-recorder.meetings.sync_failed",
232
+ transcriptsFetched: "meeting-recorder.transcripts.fetched",
233
+ transcriptsFetchFailed: "meeting-recorder.transcripts.fetch_failed",
234
+ transcriptsSynced: "meeting-recorder.transcripts.synced",
235
+ transcriptsSyncFailed: "meeting-recorder.transcripts.sync_failed",
236
+ webhookReceived: "meeting-recorder.webhooks.received",
237
+ webhookRejected: "meeting-recorder.webhooks.rejected"
238
+ };
239
+ function redactMeetingRecorderTelemetryPayload(payload) {
240
+ const redacted = {};
241
+ for (const [key, value] of Object.entries(payload)) {
242
+ if (MEETING_RECORDER_PII_FIELDS.includes(key)) {
243
+ redacted[key] = maskValue(value);
244
+ } else if (Array.isArray(value)) {
245
+ redacted[key] = value.map((item) => typeof item === "object" && item !== null ? redactMeetingRecorderTelemetryPayload(item) : item);
246
+ } else if (typeof value === "object" && value !== null) {
247
+ redacted[key] = redactMeetingRecorderTelemetryPayload(value);
248
+ } else {
249
+ redacted[key] = value;
250
+ }
251
+ }
252
+ return redacted;
253
+ }
254
+ function maskValue(value) {
255
+ if (value == null)
256
+ return "";
257
+ const str = String(value);
258
+ if (str.length <= 4)
259
+ return "*".repeat(str.length);
260
+ return `${"*".repeat(Math.max(str.length - 4, 0))}${str.slice(-4)}`;
261
+ }
262
+
263
+ // src/integrations/meeting-recorder/contracts/transcripts.ts
264
+ import { ScalarTypeEnum as ScalarTypeEnum3, SchemaModel as SchemaModel3 } from "@contractspec/lib.schema";
265
+ import {
266
+ defineCommand,
267
+ defineQuery as defineQuery2
268
+ } from "@contractspec/lib.contracts-spec/operations";
269
+ var MeetingRecorderGetTranscriptInput = new SchemaModel3({
270
+ name: "MeetingRecorderGetTranscriptInput",
271
+ description: "Parameters for fetching a meeting transcript.",
272
+ fields: {
273
+ tenantId: { type: ScalarTypeEnum3.ID(), isOptional: false },
274
+ meetingId: { type: ScalarTypeEnum3.ID(), isOptional: false },
275
+ connectionId: { type: ScalarTypeEnum3.ID(), isOptional: true },
276
+ includeSegments: { type: ScalarTypeEnum3.Boolean(), isOptional: true },
277
+ format: { type: ScalarTypeEnum3.String_unsecure(), isOptional: true }
278
+ }
279
+ });
280
+ var MeetingRecorderSyncTranscriptInput = new SchemaModel3({
281
+ name: "MeetingRecorderSyncTranscriptInput",
282
+ description: "Command payload to synchronise meeting transcripts.",
283
+ fields: {
284
+ tenantId: { type: ScalarTypeEnum3.ID(), isOptional: false },
285
+ meetingId: { type: ScalarTypeEnum3.ID(), isOptional: false },
286
+ connectionId: { type: ScalarTypeEnum3.ID(), isOptional: true },
287
+ forceRefresh: { type: ScalarTypeEnum3.Boolean(), isOptional: true },
288
+ triggerWebhooks: { type: ScalarTypeEnum3.Boolean(), isOptional: true }
289
+ }
290
+ });
291
+ var MeetingRecorderSyncTranscriptOutput = new SchemaModel3({
292
+ name: "MeetingRecorderSyncTranscriptOutput",
293
+ description: "Result of a transcript synchronisation run.",
294
+ fields: {
295
+ synced: { type: ScalarTypeEnum3.Int_unsecure(), isOptional: false },
296
+ failed: { type: ScalarTypeEnum3.Int_unsecure(), isOptional: false },
297
+ errors: {
298
+ type: ScalarTypeEnum3.String_unsecure(),
299
+ isArray: true,
300
+ isOptional: true
301
+ },
302
+ nextSyncSuggestedAt: {
303
+ type: ScalarTypeEnum3.DateTime(),
304
+ isOptional: true
305
+ }
306
+ }
307
+ });
308
+ var MeetingRecorderGetTranscript = defineQuery2({
309
+ meta: {
310
+ key: "meeting-recorder.transcripts.get",
311
+ version: "1.0.0",
312
+ description: "Fetch the transcript for a specific meeting recording.",
313
+ goal: "Expose meeting transcripts for downstream knowledge and analytics flows.",
314
+ context: "Used by agents and dashboards to access the transcript for a selected meeting.",
315
+ owners: ["@platform.integrations"],
316
+ tags: ["meeting-recorder", "transcripts"],
317
+ stability: "experimental"
318
+ },
319
+ io: {
320
+ input: MeetingRecorderGetTranscriptInput,
321
+ output: MeetingTranscriptRecord
322
+ },
323
+ policy: {
324
+ auth: "user"
325
+ }
326
+ });
327
+ var MeetingRecorderSyncTranscript = defineCommand({
328
+ meta: {
329
+ key: "meeting-recorder.transcripts.sync",
330
+ version: "1.0.0",
331
+ description: "Trigger a transcript sync from the meeting recorder provider.",
332
+ goal: "Keep canonical transcripts aligned with external meeting providers.",
333
+ context: "Invoked by scheduled jobs or webhooks when new transcripts are ready.",
334
+ owners: ["@platform.integrations"],
335
+ tags: ["meeting-recorder", "transcripts", "sync"],
336
+ stability: "experimental"
337
+ },
338
+ io: {
339
+ input: MeetingRecorderSyncTranscriptInput,
340
+ output: MeetingRecorderSyncTranscriptOutput
341
+ },
342
+ policy: {
343
+ auth: "admin"
344
+ },
345
+ telemetry: {
346
+ success: {
347
+ event: { key: MEETING_RECORDER_TELEMETRY_EVENTS.transcriptsSynced },
348
+ properties: ({ input, output }) => {
349
+ const payload = input;
350
+ const result = output;
351
+ return {
352
+ tenantId: payload?.tenantId,
353
+ meetingId: payload?.meetingId,
354
+ synced: result?.synced,
355
+ failed: result?.failed
356
+ };
357
+ }
358
+ },
359
+ failure: {
360
+ event: { key: MEETING_RECORDER_TELEMETRY_EVENTS.transcriptsSyncFailed },
361
+ properties: ({ input, error }) => {
362
+ const payload = input;
363
+ return {
364
+ tenantId: payload?.tenantId,
365
+ meetingId: payload?.meetingId,
366
+ error: error instanceof Error ? error.message : String(error ?? "unknown")
367
+ };
368
+ }
369
+ }
370
+ }
371
+ });
372
+ var meetingRecorderTranscriptContracts = {
373
+ MeetingRecorderGetTranscript,
374
+ MeetingRecorderSyncTranscript
375
+ };
376
+ function registerMeetingRecorderTranscriptContracts(registry) {
377
+ return registry.register(MeetingRecorderGetTranscript).register(MeetingRecorderSyncTranscript);
378
+ }
379
+
380
+ // src/integrations/meeting-recorder/contracts/webhooks.ts
381
+ import { ScalarTypeEnum as ScalarTypeEnum4, SchemaModel as SchemaModel4 } from "@contractspec/lib.schema";
382
+ import {
383
+ defineCommand as defineCommand2
384
+ } from "@contractspec/lib.contracts-spec/operations";
385
+ var MeetingRecorderWebhookIngestInput = new SchemaModel4({
386
+ name: "MeetingRecorderWebhookIngestInput",
387
+ description: "Payload for ingesting a meeting recorder webhook event.",
388
+ fields: {
389
+ tenantId: { type: ScalarTypeEnum4.ID(), isOptional: false },
390
+ providerKey: { type: ScalarTypeEnum4.String_unsecure(), isOptional: false },
391
+ connectionId: { type: ScalarTypeEnum4.ID(), isOptional: true },
392
+ webhookId: { type: ScalarTypeEnum4.String_unsecure(), isOptional: true },
393
+ headers: { type: ScalarTypeEnum4.JSON(), isOptional: true },
394
+ payload: { type: ScalarTypeEnum4.JSON(), isOptional: false },
395
+ receivedAt: { type: ScalarTypeEnum4.DateTime(), isOptional: true }
396
+ }
397
+ });
398
+ var MeetingRecorderWebhookIngestOutput = new SchemaModel4({
399
+ name: "MeetingRecorderWebhookIngestOutput",
400
+ description: "Result of processing a meeting recorder webhook.",
401
+ fields: {
402
+ accepted: { type: ScalarTypeEnum4.Boolean(), isOptional: false },
403
+ event: { type: MeetingRecorderWebhookEventRecord, isOptional: true }
404
+ }
405
+ });
406
+ var MeetingRecorderWebhookIngest = defineCommand2({
407
+ meta: {
408
+ key: "meeting-recorder.webhooks.ingest",
409
+ version: "1.0.0",
410
+ description: "Ingest a webhook from a meeting recorder provider.",
411
+ goal: "Trigger transcript syncs or downstream workflows without polling.",
412
+ context: "Used by webhook handlers to validate and normalize provider webhook events.",
413
+ owners: ["@platform.integrations"],
414
+ tags: ["meeting-recorder", "webhooks", "transcripts"],
415
+ stability: "experimental"
416
+ },
417
+ io: {
418
+ input: MeetingRecorderWebhookIngestInput,
419
+ output: MeetingRecorderWebhookIngestOutput
420
+ },
421
+ policy: {
422
+ auth: "admin"
423
+ }
424
+ });
425
+ var meetingRecorderWebhookContracts = {
426
+ MeetingRecorderWebhookIngest
427
+ };
428
+ function registerMeetingRecorderWebhookContracts(registry) {
429
+ return registry.register(MeetingRecorderWebhookIngest);
430
+ }
431
+
432
+ // src/integrations/meeting-recorder/meeting-recorder.feature.ts
433
+ import { defineFeature } from "@contractspec/lib.contracts-spec/features";
434
+ var MeetingRecorderFeature = defineFeature({
435
+ meta: {
436
+ key: "meeting-recorder",
437
+ version: "1.0.0",
438
+ title: "Meeting Recorder Integration",
439
+ description: "Meeting metadata, transcript retrieval, and webhook ingestion for meeting recorder providers.",
440
+ domain: "integrations",
441
+ owners: ["@platform.integrations"],
442
+ tags: ["meeting-recorder", "transcripts", "integrations"],
443
+ stability: "experimental"
444
+ },
445
+ operations: [
446
+ { key: "meeting-recorder.meetings.list", version: "1.0.0" },
447
+ { key: "meeting-recorder.meetings.get", version: "1.0.0" },
448
+ { key: "meeting-recorder.transcripts.get", version: "1.0.0" },
449
+ { key: "meeting-recorder.transcripts.sync", version: "1.0.0" },
450
+ { key: "meeting-recorder.webhooks.ingest", version: "1.0.0" }
451
+ ],
452
+ events: [],
453
+ presentations: [],
454
+ opToPresentation: [],
455
+ presentationsTargets: [],
456
+ capabilities: {
457
+ provides: [{ key: "meeting-recorder", version: "1.0.0" }],
458
+ requires: [{ key: "identity", version: "1.0.0" }]
459
+ }
460
+ });
461
+ // src/integrations/meeting-recorder/contracts/index.ts
462
+ function registerMeetingRecorderContracts(registry) {
463
+ return registerMeetingRecorderWebhookContracts(registerMeetingRecorderTranscriptContracts(registerMeetingRecorderMeetingContracts(registry)));
464
+ }
465
+ export {
466
+ registerMeetingRecorderContracts,
467
+ MeetingRecorderWebhookIngest,
468
+ MeetingRecorderSyncTranscript,
469
+ MeetingRecorderListMeetings,
470
+ MeetingRecorderGetTranscript,
471
+ MeetingRecorderGetMeeting,
472
+ MeetingRecorderFeature
473
+ };