@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.
- package/README.md +3 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +3676 -0
- package/dist/integrations/binding.d.ts +14 -0
- package/dist/integrations/binding.js +1 -0
- package/dist/integrations/connection.d.ts +47 -0
- package/dist/integrations/connection.js +1 -0
- package/dist/integrations/docs/integrations.docblock.d.ts +2 -0
- package/dist/integrations/docs/integrations.docblock.js +110 -0
- package/dist/integrations/health.d.ts +17 -0
- package/dist/integrations/health.js +73 -0
- package/dist/integrations/health.test.d.ts +1 -0
- package/dist/integrations/index.d.ts +11 -0
- package/dist/integrations/index.js +3264 -0
- package/dist/integrations/integrations.capability.d.ts +1 -0
- package/dist/integrations/integrations.capability.js +18 -0
- package/dist/integrations/integrations.feature.d.ts +5 -0
- package/dist/integrations/integrations.feature.js +33 -0
- package/dist/integrations/meeting-recorder/contracts/index.d.ts +7 -0
- package/dist/integrations/meeting-recorder/contracts/index.js +474 -0
- package/dist/integrations/meeting-recorder/contracts/meetings.d.ts +451 -0
- package/dist/integrations/meeting-recorder/contracts/meetings.js +219 -0
- package/dist/integrations/meeting-recorder/contracts/transcripts.d.ts +166 -0
- package/dist/integrations/meeting-recorder/contracts/transcripts.js +287 -0
- package/dist/integrations/meeting-recorder/contracts/webhooks.d.ts +85 -0
- package/dist/integrations/meeting-recorder/contracts/webhooks.js +172 -0
- package/dist/integrations/meeting-recorder/meeting-recorder.capability.d.ts +1 -0
- package/dist/integrations/meeting-recorder/meeting-recorder.capability.js +18 -0
- package/dist/integrations/meeting-recorder/meeting-recorder.feature.d.ts +5 -0
- package/dist/integrations/meeting-recorder/meeting-recorder.feature.js +33 -0
- package/dist/integrations/meeting-recorder/models.d.ts +402 -0
- package/dist/integrations/meeting-recorder/models.js +122 -0
- package/dist/integrations/meeting-recorder/telemetry.d.ts +13 -0
- package/dist/integrations/meeting-recorder/telemetry.js +54 -0
- package/dist/integrations/openbanking/contracts/accounts.d.ts +282 -0
- package/dist/integrations/openbanking/contracts/accounts.js +328 -0
- package/dist/integrations/openbanking/contracts/balances.d.ts +158 -0
- package/dist/integrations/openbanking/contracts/balances.js +292 -0
- package/dist/integrations/openbanking/contracts/index.d.ts +7 -0
- package/dist/integrations/openbanking/contracts/index.js +644 -0
- package/dist/integrations/openbanking/contracts/transactions.d.ts +206 -0
- package/dist/integrations/openbanking/contracts/transactions.js +298 -0
- package/dist/integrations/openbanking/guards.d.ts +8 -0
- package/dist/integrations/openbanking/guards.js +42 -0
- package/dist/integrations/openbanking/guards.test.d.ts +1 -0
- package/dist/integrations/openbanking/models.d.ts +223 -0
- package/dist/integrations/openbanking/models.js +110 -0
- package/dist/integrations/openbanking/openbanking.capability.d.ts +1 -0
- package/dist/integrations/openbanking/openbanking.capability.js +18 -0
- package/dist/integrations/openbanking/openbanking.feature.d.ts +5 -0
- package/dist/integrations/openbanking/openbanking.feature.js +35 -0
- package/dist/integrations/openbanking/telemetry.d.ts +12 -0
- package/dist/integrations/openbanking/telemetry.js +51 -0
- package/dist/integrations/operations.d.ts +430 -0
- package/dist/integrations/operations.js +297 -0
- package/dist/integrations/operations.test.d.ts +1 -0
- package/dist/integrations/providers/analytics-reader.d.ts +103 -0
- package/dist/integrations/providers/analytics-reader.js +1 -0
- package/dist/integrations/providers/analytics-writer.d.ts +6 -0
- package/dist/integrations/providers/analytics-writer.js +1 -0
- package/dist/integrations/providers/analytics.d.ts +47 -0
- package/dist/integrations/providers/analytics.js +1 -0
- package/dist/integrations/providers/calendar.d.ts +75 -0
- package/dist/integrations/providers/calendar.js +1 -0
- package/dist/integrations/providers/database.d.ts +12 -0
- package/dist/integrations/providers/database.js +1 -0
- package/dist/integrations/providers/elevenlabs.d.ts +3 -0
- package/dist/integrations/providers/elevenlabs.js +86 -0
- package/dist/integrations/providers/email.d.ts +83 -0
- package/dist/integrations/providers/email.js +1 -0
- package/dist/integrations/providers/embedding.d.ts +21 -0
- package/dist/integrations/providers/embedding.js +1 -0
- package/dist/integrations/providers/fal.d.ts +3 -0
- package/dist/integrations/providers/fal.js +112 -0
- package/dist/integrations/providers/fathom.d.ts +3 -0
- package/dist/integrations/providers/fathom.js +126 -0
- package/dist/integrations/providers/fireflies.d.ts +3 -0
- package/dist/integrations/providers/fireflies.js +106 -0
- package/dist/integrations/providers/gcs-storage.d.ts +3 -0
- package/dist/integrations/providers/gcs-storage.js +97 -0
- package/dist/integrations/providers/gmail.d.ts +3 -0
- package/dist/integrations/providers/gmail.js +109 -0
- package/dist/integrations/providers/google-calendar.d.ts +3 -0
- package/dist/integrations/providers/google-calendar.js +92 -0
- package/dist/integrations/providers/gradium.d.ts +3 -0
- package/dist/integrations/providers/gradium.js +110 -0
- package/dist/integrations/providers/granola.d.ts +3 -0
- package/dist/integrations/providers/granola.js +107 -0
- package/dist/integrations/providers/index.d.ts +38 -0
- package/dist/integrations/providers/index.js +2094 -0
- package/dist/integrations/providers/jira.d.ts +3 -0
- package/dist/integrations/providers/jira.js +108 -0
- package/dist/integrations/providers/linear.d.ts +3 -0
- package/dist/integrations/providers/linear.js +107 -0
- package/dist/integrations/providers/llm.d.ts +79 -0
- package/dist/integrations/providers/llm.js +1 -0
- package/dist/integrations/providers/meeting-recorder.d.ts +129 -0
- package/dist/integrations/providers/meeting-recorder.js +1 -0
- package/dist/integrations/providers/mistral.d.ts +3 -0
- package/dist/integrations/providers/mistral.js +94 -0
- package/dist/integrations/providers/notion.d.ts +3 -0
- package/dist/integrations/providers/notion.js +113 -0
- package/dist/integrations/providers/openbanking.d.ts +125 -0
- package/dist/integrations/providers/openbanking.js +1 -0
- package/dist/integrations/providers/payments.d.ts +106 -0
- package/dist/integrations/providers/payments.js +1 -0
- package/dist/integrations/providers/posthog-llm-telemetry.d.ts +51 -0
- package/dist/integrations/providers/posthog-llm-telemetry.js +176 -0
- package/dist/integrations/providers/posthog.d.ts +3 -0
- package/dist/integrations/providers/posthog.js +106 -0
- package/dist/integrations/providers/postmark.d.ts +3 -0
- package/dist/integrations/providers/postmark.js +98 -0
- package/dist/integrations/providers/powens.d.ts +3 -0
- package/dist/integrations/providers/powens.js +124 -0
- package/dist/integrations/providers/project-management.d.ts +32 -0
- package/dist/integrations/providers/project-management.js +1 -0
- package/dist/integrations/providers/providers.test.d.ts +1 -0
- package/dist/integrations/providers/qdrant.d.ts +3 -0
- package/dist/integrations/providers/qdrant.js +101 -0
- package/dist/integrations/providers/registry.d.ts +6 -0
- package/dist/integrations/providers/registry.js +1878 -0
- package/dist/integrations/providers/sms.d.ts +31 -0
- package/dist/integrations/providers/sms.js +1 -0
- package/dist/integrations/providers/storage.d.ts +57 -0
- package/dist/integrations/providers/storage.js +1 -0
- package/dist/integrations/providers/stripe.d.ts +3 -0
- package/dist/integrations/providers/stripe.js +105 -0
- package/dist/integrations/providers/supabase-postgres.d.ts +3 -0
- package/dist/integrations/providers/supabase-postgres.js +87 -0
- package/dist/integrations/providers/supabase-vector.d.ts +3 -0
- package/dist/integrations/providers/supabase-vector.js +107 -0
- package/dist/integrations/providers/tldv.d.ts +3 -0
- package/dist/integrations/providers/tldv.js +106 -0
- package/dist/integrations/providers/twilio-sms.d.ts +3 -0
- package/dist/integrations/providers/twilio-sms.js +91 -0
- package/dist/integrations/providers/vector-store.d.ts +39 -0
- package/dist/integrations/providers/vector-store.js +1 -0
- package/dist/integrations/providers/voice.d.ts +31 -0
- package/dist/integrations/providers/voice.js +1 -0
- package/dist/integrations/runtime.d.ts +95 -0
- package/dist/integrations/runtime.js +209 -0
- package/dist/integrations/runtime.test.d.ts +1 -0
- package/dist/integrations/secrets/aws-secret-manager.d.ts +28 -0
- package/dist/integrations/secrets/aws-secret-manager.js +346 -0
- package/dist/integrations/secrets/env-secret-provider.d.ts +28 -0
- package/dist/integrations/secrets/env-secret-provider.js +159 -0
- package/dist/integrations/secrets/gcp-secret-manager.d.ts +29 -0
- package/dist/integrations/secrets/gcp-secret-manager.js +347 -0
- package/dist/integrations/secrets/index.d.ts +6 -0
- package/dist/integrations/secrets/index.js +1129 -0
- package/dist/integrations/secrets/manager.d.ts +44 -0
- package/dist/integrations/secrets/manager.js +183 -0
- package/dist/integrations/secrets/provider.d.ts +49 -0
- package/dist/integrations/secrets/provider.js +74 -0
- package/dist/integrations/secrets/provider.test.d.ts +1 -0
- package/dist/integrations/secrets/scaleway-secret-manager.d.ts +35 -0
- package/dist/integrations/secrets/scaleway-secret-manager.js +375 -0
- package/dist/integrations/secrets-types.d.ts +14 -0
- package/dist/integrations/secrets-types.js +1 -0
- package/dist/integrations/spec.d.ts +72 -0
- package/dist/integrations/spec.js +22 -0
- package/dist/integrations/spec.test.d.ts +1 -0
- package/dist/node/index.js +3675 -0
- package/dist/node/integrations/binding.js +0 -0
- package/dist/node/integrations/connection.js +0 -0
- package/dist/node/integrations/docs/integrations.docblock.js +109 -0
- package/dist/node/integrations/health.js +72 -0
- package/dist/node/integrations/index.js +3263 -0
- package/dist/node/integrations/integrations.capability.js +17 -0
- package/dist/node/integrations/integrations.feature.js +32 -0
- package/dist/node/integrations/meeting-recorder/contracts/index.js +473 -0
- package/dist/node/integrations/meeting-recorder/contracts/meetings.js +218 -0
- package/dist/node/integrations/meeting-recorder/contracts/transcripts.js +286 -0
- package/dist/node/integrations/meeting-recorder/contracts/webhooks.js +171 -0
- package/dist/node/integrations/meeting-recorder/meeting-recorder.capability.js +17 -0
- package/dist/node/integrations/meeting-recorder/meeting-recorder.feature.js +32 -0
- package/dist/node/integrations/meeting-recorder/models.js +121 -0
- package/dist/node/integrations/meeting-recorder/telemetry.js +53 -0
- package/dist/node/integrations/openbanking/contracts/accounts.js +327 -0
- package/dist/node/integrations/openbanking/contracts/balances.js +291 -0
- package/dist/node/integrations/openbanking/contracts/index.js +643 -0
- package/dist/node/integrations/openbanking/contracts/transactions.js +297 -0
- package/dist/node/integrations/openbanking/guards.js +41 -0
- package/dist/node/integrations/openbanking/models.js +109 -0
- package/dist/node/integrations/openbanking/openbanking.capability.js +17 -0
- package/dist/node/integrations/openbanking/openbanking.feature.js +34 -0
- package/dist/node/integrations/openbanking/telemetry.js +50 -0
- package/dist/node/integrations/operations.js +296 -0
- package/dist/node/integrations/providers/analytics-reader.js +0 -0
- package/dist/node/integrations/providers/analytics-writer.js +0 -0
- package/dist/node/integrations/providers/analytics.js +0 -0
- package/dist/node/integrations/providers/calendar.js +0 -0
- package/dist/node/integrations/providers/database.js +0 -0
- package/dist/node/integrations/providers/elevenlabs.js +85 -0
- package/dist/node/integrations/providers/email.js +0 -0
- package/dist/node/integrations/providers/embedding.js +0 -0
- package/dist/node/integrations/providers/fal.js +111 -0
- package/dist/node/integrations/providers/fathom.js +125 -0
- package/dist/node/integrations/providers/fireflies.js +105 -0
- package/dist/node/integrations/providers/gcs-storage.js +96 -0
- package/dist/node/integrations/providers/gmail.js +108 -0
- package/dist/node/integrations/providers/google-calendar.js +91 -0
- package/dist/node/integrations/providers/gradium.js +109 -0
- package/dist/node/integrations/providers/granola.js +106 -0
- package/dist/node/integrations/providers/index.js +2093 -0
- package/dist/node/integrations/providers/jira.js +107 -0
- package/dist/node/integrations/providers/linear.js +106 -0
- package/dist/node/integrations/providers/llm.js +0 -0
- package/dist/node/integrations/providers/meeting-recorder.js +0 -0
- package/dist/node/integrations/providers/mistral.js +93 -0
- package/dist/node/integrations/providers/notion.js +112 -0
- package/dist/node/integrations/providers/openbanking.js +0 -0
- package/dist/node/integrations/providers/payments.js +0 -0
- package/dist/node/integrations/providers/posthog-llm-telemetry.js +175 -0
- package/dist/node/integrations/providers/posthog.js +105 -0
- package/dist/node/integrations/providers/postmark.js +97 -0
- package/dist/node/integrations/providers/powens.js +123 -0
- package/dist/node/integrations/providers/project-management.js +0 -0
- package/dist/node/integrations/providers/qdrant.js +100 -0
- package/dist/node/integrations/providers/registry.js +1877 -0
- package/dist/node/integrations/providers/sms.js +0 -0
- package/dist/node/integrations/providers/storage.js +0 -0
- package/dist/node/integrations/providers/stripe.js +104 -0
- package/dist/node/integrations/providers/supabase-postgres.js +86 -0
- package/dist/node/integrations/providers/supabase-vector.js +106 -0
- package/dist/node/integrations/providers/tldv.js +105 -0
- package/dist/node/integrations/providers/twilio-sms.js +90 -0
- package/dist/node/integrations/providers/vector-store.js +0 -0
- package/dist/node/integrations/providers/voice.js +0 -0
- package/dist/node/integrations/runtime.js +208 -0
- package/dist/node/integrations/secrets/aws-secret-manager.js +345 -0
- package/dist/node/integrations/secrets/env-secret-provider.js +158 -0
- package/dist/node/integrations/secrets/gcp-secret-manager.js +346 -0
- package/dist/node/integrations/secrets/index.js +1128 -0
- package/dist/node/integrations/secrets/manager.js +182 -0
- package/dist/node/integrations/secrets/provider.js +73 -0
- package/dist/node/integrations/secrets/scaleway-secret-manager.js +374 -0
- package/dist/node/integrations/secrets-types.js +0 -0
- package/dist/node/integrations/spec.js +21 -0
- package/package.json +1029 -0
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/integrations/operations.ts
|
|
3
|
+
import { ScalarTypeEnum, SchemaModel } from "@contractspec/lib.schema";
|
|
4
|
+
import {
|
|
5
|
+
defineCommand,
|
|
6
|
+
defineQuery
|
|
7
|
+
} from "@contractspec/lib.contracts-spec/operations";
|
|
8
|
+
var IntegrationConnectionRecord = new SchemaModel({
|
|
9
|
+
name: "IntegrationConnectionRecord",
|
|
10
|
+
fields: {
|
|
11
|
+
id: { type: ScalarTypeEnum.ID(), isOptional: false },
|
|
12
|
+
tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },
|
|
13
|
+
integrationKey: {
|
|
14
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
15
|
+
isOptional: false
|
|
16
|
+
},
|
|
17
|
+
integrationVersion: {
|
|
18
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
19
|
+
isOptional: false
|
|
20
|
+
},
|
|
21
|
+
label: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
22
|
+
ownershipMode: {
|
|
23
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
24
|
+
isOptional: false
|
|
25
|
+
},
|
|
26
|
+
externalAccountId: {
|
|
27
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
28
|
+
isOptional: true
|
|
29
|
+
},
|
|
30
|
+
secretProvider: {
|
|
31
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
32
|
+
isOptional: false
|
|
33
|
+
},
|
|
34
|
+
secretRef: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
35
|
+
status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
36
|
+
environment: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
37
|
+
healthStatus: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
38
|
+
healthCheckedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
|
|
39
|
+
healthLatencyMs: {
|
|
40
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
41
|
+
isOptional: true
|
|
42
|
+
},
|
|
43
|
+
healthErrorCode: {
|
|
44
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
45
|
+
isOptional: true
|
|
46
|
+
},
|
|
47
|
+
healthErrorMessage: {
|
|
48
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
49
|
+
isOptional: true
|
|
50
|
+
},
|
|
51
|
+
usageRequestCount: {
|
|
52
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
53
|
+
isOptional: true
|
|
54
|
+
},
|
|
55
|
+
usageSuccessCount: {
|
|
56
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
57
|
+
isOptional: true
|
|
58
|
+
},
|
|
59
|
+
usageErrorCount: {
|
|
60
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
61
|
+
isOptional: true
|
|
62
|
+
},
|
|
63
|
+
usageLastUsedAt: {
|
|
64
|
+
type: ScalarTypeEnum.DateTime(),
|
|
65
|
+
isOptional: true
|
|
66
|
+
},
|
|
67
|
+
usageLastErrorAt: {
|
|
68
|
+
type: ScalarTypeEnum.DateTime(),
|
|
69
|
+
isOptional: true
|
|
70
|
+
},
|
|
71
|
+
usageLastErrorCode: {
|
|
72
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
73
|
+
isOptional: true
|
|
74
|
+
},
|
|
75
|
+
createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
|
|
76
|
+
updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true }
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
var CreateIntegrationConnectionInput = new SchemaModel({
|
|
80
|
+
name: "CreateIntegrationConnectionInput",
|
|
81
|
+
fields: {
|
|
82
|
+
tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },
|
|
83
|
+
integrationKey: {
|
|
84
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
85
|
+
isOptional: false
|
|
86
|
+
},
|
|
87
|
+
integrationVersion: {
|
|
88
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
89
|
+
isOptional: false
|
|
90
|
+
},
|
|
91
|
+
label: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
92
|
+
ownershipMode: {
|
|
93
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
94
|
+
isOptional: false
|
|
95
|
+
},
|
|
96
|
+
externalAccountId: {
|
|
97
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
98
|
+
isOptional: true
|
|
99
|
+
},
|
|
100
|
+
secretProvider: {
|
|
101
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
102
|
+
isOptional: false
|
|
103
|
+
},
|
|
104
|
+
secretRef: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
105
|
+
environment: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
106
|
+
config: { type: ScalarTypeEnum.JSONObject(), isOptional: false }
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
var UpdateIntegrationConnectionInput = new SchemaModel({
|
|
110
|
+
name: "UpdateIntegrationConnectionInput",
|
|
111
|
+
fields: {
|
|
112
|
+
connectionId: { type: ScalarTypeEnum.ID(), isOptional: false },
|
|
113
|
+
label: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
114
|
+
status: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
115
|
+
ownershipMode: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
116
|
+
externalAccountId: {
|
|
117
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
118
|
+
isOptional: true
|
|
119
|
+
},
|
|
120
|
+
secretProvider: {
|
|
121
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
122
|
+
isOptional: true
|
|
123
|
+
},
|
|
124
|
+
secretRef: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
125
|
+
config: { type: ScalarTypeEnum.JSONObject(), isOptional: true }
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
var DeleteIntegrationConnectionInput = new SchemaModel({
|
|
129
|
+
name: "DeleteIntegrationConnectionInput",
|
|
130
|
+
fields: {
|
|
131
|
+
connectionId: { type: ScalarTypeEnum.ID(), isOptional: false }
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
var ListIntegrationConnectionsInput = new SchemaModel({
|
|
135
|
+
name: "ListIntegrationConnectionsInput",
|
|
136
|
+
fields: {
|
|
137
|
+
tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },
|
|
138
|
+
category: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
139
|
+
status: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
var ListIntegrationConnectionsOutput = new SchemaModel({
|
|
143
|
+
name: "ListIntegrationConnectionsOutput",
|
|
144
|
+
fields: {
|
|
145
|
+
connections: {
|
|
146
|
+
type: IntegrationConnectionRecord,
|
|
147
|
+
isOptional: false,
|
|
148
|
+
isArray: true
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
var TestIntegrationConnectionInput = new SchemaModel({
|
|
153
|
+
name: "TestIntegrationConnectionInput",
|
|
154
|
+
fields: {
|
|
155
|
+
connectionId: { type: ScalarTypeEnum.ID(), isOptional: false }
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
var TestIntegrationConnectionOutput = new SchemaModel({
|
|
159
|
+
name: "TestIntegrationConnectionOutput",
|
|
160
|
+
fields: {
|
|
161
|
+
success: { type: ScalarTypeEnum.Boolean(), isOptional: false },
|
|
162
|
+
status: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
163
|
+
latencyMs: { type: ScalarTypeEnum.Float_unsecure(), isOptional: true },
|
|
164
|
+
error: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
165
|
+
errorCode: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
var DeleteIntegrationConnectionOutput = new SchemaModel({
|
|
169
|
+
name: "DeleteIntegrationConnectionOutput",
|
|
170
|
+
fields: {
|
|
171
|
+
success: { type: ScalarTypeEnum.Boolean(), isOptional: false }
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
var CreateIntegrationConnection = defineCommand({
|
|
175
|
+
meta: {
|
|
176
|
+
key: "integrations.connection.create",
|
|
177
|
+
title: "Create Integration Connection",
|
|
178
|
+
version: "1.0.0",
|
|
179
|
+
description: "Create a new integration connection for a tenant.",
|
|
180
|
+
goal: "Provision a tenant-scoped connection to an external provider.",
|
|
181
|
+
context: "Used by Ops or the App Studio to configure external integrations such as Stripe or Qdrant.",
|
|
182
|
+
owners: ["@platform.integrations"],
|
|
183
|
+
tags: ["integration", "connections"],
|
|
184
|
+
stability: "experimental"
|
|
185
|
+
},
|
|
186
|
+
io: {
|
|
187
|
+
input: CreateIntegrationConnectionInput,
|
|
188
|
+
output: IntegrationConnectionRecord
|
|
189
|
+
},
|
|
190
|
+
policy: {
|
|
191
|
+
auth: "admin",
|
|
192
|
+
policies: [{ key: "platform.integration.manage", version: "1.0.0" }]
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
var UpdateIntegrationConnection = defineCommand({
|
|
196
|
+
meta: {
|
|
197
|
+
key: "integrations.connection.update",
|
|
198
|
+
title: "Update Integration Connection",
|
|
199
|
+
version: "1.0.0",
|
|
200
|
+
description: "Update metadata or credentials for an integration connection.",
|
|
201
|
+
goal: "Allow secure rotation of credentials and metadata adjustments.",
|
|
202
|
+
context: "Supports rotating API keys, toggling status, or updating labels for tenant integrations.",
|
|
203
|
+
owners: ["@platform.integrations"],
|
|
204
|
+
tags: ["integration", "connections"],
|
|
205
|
+
stability: "experimental"
|
|
206
|
+
},
|
|
207
|
+
io: {
|
|
208
|
+
input: UpdateIntegrationConnectionInput,
|
|
209
|
+
output: IntegrationConnectionRecord
|
|
210
|
+
},
|
|
211
|
+
policy: {
|
|
212
|
+
auth: "admin",
|
|
213
|
+
policies: [{ key: "platform.integration.manage", version: "1.0.0" }]
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
var DeleteIntegrationConnection = defineCommand({
|
|
217
|
+
meta: {
|
|
218
|
+
key: "integrations.connection.delete",
|
|
219
|
+
title: "Delete Integration Connection",
|
|
220
|
+
version: "1.0.0",
|
|
221
|
+
description: "Delete an integration connection for a tenant.",
|
|
222
|
+
goal: "Safely remove credentials and disable connector usage.",
|
|
223
|
+
context: "Ensures connections are de-provisioned when no longer needed or breached.",
|
|
224
|
+
owners: ["@platform.integrations"],
|
|
225
|
+
tags: ["integration", "connections"],
|
|
226
|
+
stability: "experimental"
|
|
227
|
+
},
|
|
228
|
+
io: {
|
|
229
|
+
input: DeleteIntegrationConnectionInput,
|
|
230
|
+
output: DeleteIntegrationConnectionOutput
|
|
231
|
+
},
|
|
232
|
+
policy: {
|
|
233
|
+
auth: "admin",
|
|
234
|
+
policies: [{ key: "platform.integration.manage", version: "1.0.0" }]
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
var ListIntegrationConnections = defineQuery({
|
|
238
|
+
meta: {
|
|
239
|
+
key: "integrations.connection.list",
|
|
240
|
+
title: "List Integration Connections",
|
|
241
|
+
version: "1.0.0",
|
|
242
|
+
description: "List integration connections for a tenant.",
|
|
243
|
+
goal: "Provide visibility into configured integrations and their status.",
|
|
244
|
+
context: "Used by the App Studio and Ops flows to show bindings and health.",
|
|
245
|
+
owners: ["@platform.integrations"],
|
|
246
|
+
tags: ["integration", "connections"],
|
|
247
|
+
stability: "experimental"
|
|
248
|
+
},
|
|
249
|
+
io: {
|
|
250
|
+
input: ListIntegrationConnectionsInput,
|
|
251
|
+
output: ListIntegrationConnectionsOutput
|
|
252
|
+
},
|
|
253
|
+
policy: {
|
|
254
|
+
auth: "admin",
|
|
255
|
+
policies: [{ key: "platform.integration.read", version: "1.0.0" }]
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
var TestIntegrationConnection = defineCommand({
|
|
259
|
+
meta: {
|
|
260
|
+
key: "integrations.connection.test",
|
|
261
|
+
title: "Test Integration Connection",
|
|
262
|
+
version: "1.0.0",
|
|
263
|
+
description: "Run a health check against a configured integration connection.",
|
|
264
|
+
goal: "Validate credentials and connectivity for external providers.",
|
|
265
|
+
context: "Triggered manually or by background monitors to confirm provider availability.",
|
|
266
|
+
owners: ["@platform.integrations"],
|
|
267
|
+
tags: ["integration", "connections"],
|
|
268
|
+
stability: "experimental"
|
|
269
|
+
},
|
|
270
|
+
io: {
|
|
271
|
+
input: TestIntegrationConnectionInput,
|
|
272
|
+
output: TestIntegrationConnectionOutput
|
|
273
|
+
},
|
|
274
|
+
policy: {
|
|
275
|
+
auth: "admin",
|
|
276
|
+
policies: [{ key: "platform.integration.manage", version: "1.0.0" }]
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
var integrationContracts = {
|
|
280
|
+
CreateIntegrationConnection,
|
|
281
|
+
UpdateIntegrationConnection,
|
|
282
|
+
DeleteIntegrationConnection,
|
|
283
|
+
ListIntegrationConnections,
|
|
284
|
+
TestIntegrationConnection
|
|
285
|
+
};
|
|
286
|
+
function registerIntegrationContracts(registry) {
|
|
287
|
+
return registry.register(CreateIntegrationConnection).register(UpdateIntegrationConnection).register(DeleteIntegrationConnection).register(ListIntegrationConnections).register(TestIntegrationConnection);
|
|
288
|
+
}
|
|
289
|
+
export {
|
|
290
|
+
registerIntegrationContracts,
|
|
291
|
+
integrationContracts,
|
|
292
|
+
UpdateIntegrationConnection,
|
|
293
|
+
TestIntegrationConnection,
|
|
294
|
+
ListIntegrationConnections,
|
|
295
|
+
DeleteIntegrationConnection,
|
|
296
|
+
CreateIntegrationConnection
|
|
297
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type { AnalyticsQueryInput, AnalyticsQueryResult } from './analytics';
|
|
2
|
+
export type AnalyticsPropertyFilter = Record<string, string | number | boolean | null>;
|
|
3
|
+
export interface DateRangeInput {
|
|
4
|
+
from?: string | Date;
|
|
5
|
+
to?: string | Date;
|
|
6
|
+
timezone?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface PaginationInput {
|
|
9
|
+
limit?: number;
|
|
10
|
+
offset?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface GetEventsInput extends PaginationInput {
|
|
13
|
+
projectId?: string | number;
|
|
14
|
+
event?: string;
|
|
15
|
+
events?: string[];
|
|
16
|
+
distinctId?: string;
|
|
17
|
+
properties?: AnalyticsPropertyFilter;
|
|
18
|
+
dateRange?: DateRangeInput;
|
|
19
|
+
orderBy?: 'timestamp' | '-timestamp';
|
|
20
|
+
}
|
|
21
|
+
export interface GetPersonsInput extends PaginationInput {
|
|
22
|
+
projectId?: string | number;
|
|
23
|
+
cohortId?: string | number;
|
|
24
|
+
properties?: AnalyticsPropertyFilter;
|
|
25
|
+
search?: string;
|
|
26
|
+
}
|
|
27
|
+
export type AnalyticsInsightType = 'TRENDS' | 'FUNNELS' | 'RETENTION' | 'PATHS' | 'STICKINESS' | 'LIFECYCLE' | 'SESSIONS' | 'CUSTOM';
|
|
28
|
+
export interface GetInsightsInput extends PaginationInput {
|
|
29
|
+
projectId?: string | number;
|
|
30
|
+
insightType?: AnalyticsInsightType;
|
|
31
|
+
}
|
|
32
|
+
export interface GetInsightResultInput {
|
|
33
|
+
projectId?: string | number;
|
|
34
|
+
insightId: string | number;
|
|
35
|
+
}
|
|
36
|
+
export interface GetCohortsInput extends PaginationInput {
|
|
37
|
+
projectId?: string | number;
|
|
38
|
+
}
|
|
39
|
+
export interface GetFeatureFlagsInput extends PaginationInput {
|
|
40
|
+
projectId?: string | number;
|
|
41
|
+
active?: boolean;
|
|
42
|
+
}
|
|
43
|
+
export interface GetAnnotationsInput extends PaginationInput {
|
|
44
|
+
projectId?: string | number;
|
|
45
|
+
dateRange?: DateRangeInput;
|
|
46
|
+
}
|
|
47
|
+
export interface AnalyticsEvent {
|
|
48
|
+
id?: string | number;
|
|
49
|
+
event: string;
|
|
50
|
+
distinctId: string;
|
|
51
|
+
properties?: Record<string, unknown>;
|
|
52
|
+
timestamp: string;
|
|
53
|
+
}
|
|
54
|
+
export interface AnalyticsPerson {
|
|
55
|
+
id?: string | number;
|
|
56
|
+
distinctId?: string;
|
|
57
|
+
properties?: Record<string, unknown>;
|
|
58
|
+
createdAt?: string;
|
|
59
|
+
}
|
|
60
|
+
export interface AnalyticsInsight {
|
|
61
|
+
id?: string | number;
|
|
62
|
+
name?: string;
|
|
63
|
+
type?: AnalyticsInsightType | string;
|
|
64
|
+
filters?: Record<string, unknown>;
|
|
65
|
+
result?: unknown;
|
|
66
|
+
}
|
|
67
|
+
export interface AnalyticsCohort {
|
|
68
|
+
id?: string | number;
|
|
69
|
+
name?: string;
|
|
70
|
+
groups?: unknown;
|
|
71
|
+
count?: number;
|
|
72
|
+
}
|
|
73
|
+
export interface AnalyticsFeatureFlag {
|
|
74
|
+
id?: string | number;
|
|
75
|
+
key?: string;
|
|
76
|
+
name?: string;
|
|
77
|
+
active?: boolean;
|
|
78
|
+
filters?: Record<string, unknown>;
|
|
79
|
+
rolloutPercentage?: number;
|
|
80
|
+
}
|
|
81
|
+
export interface AnalyticsAnnotation {
|
|
82
|
+
id?: string | number;
|
|
83
|
+
content?: string;
|
|
84
|
+
dateMarker?: string;
|
|
85
|
+
scope?: string;
|
|
86
|
+
createdAt?: string;
|
|
87
|
+
}
|
|
88
|
+
export interface PaginatedResponse<T> {
|
|
89
|
+
count: number;
|
|
90
|
+
next?: string | null;
|
|
91
|
+
previous?: string | null;
|
|
92
|
+
results: T[];
|
|
93
|
+
}
|
|
94
|
+
export interface AnalyticsReader {
|
|
95
|
+
queryHogQL?(input: AnalyticsQueryInput): Promise<AnalyticsQueryResult>;
|
|
96
|
+
getEvents?(input: GetEventsInput): Promise<PaginatedResponse<AnalyticsEvent>>;
|
|
97
|
+
getPersons?(input: GetPersonsInput): Promise<PaginatedResponse<AnalyticsPerson>>;
|
|
98
|
+
getInsights?(input: GetInsightsInput): Promise<PaginatedResponse<AnalyticsInsight>>;
|
|
99
|
+
getInsightResult?(input: GetInsightResultInput): Promise<AnalyticsInsight>;
|
|
100
|
+
getCohorts?(input: GetCohortsInput): Promise<PaginatedResponse<AnalyticsCohort>>;
|
|
101
|
+
getFeatureFlags?(input: GetFeatureFlagsInput): Promise<PaginatedResponse<AnalyticsFeatureFlag>>;
|
|
102
|
+
getAnnotations?(input: GetAnnotationsInput): Promise<PaginatedResponse<AnalyticsAnnotation>>;
|
|
103
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// @bun
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AnalyticsEventInput, AnalyticsIdentifyInput, AnalyticsMcpToolCall } from './analytics';
|
|
2
|
+
export interface AnalyticsWriter {
|
|
3
|
+
capture(event: AnalyticsEventInput): Promise<void>;
|
|
4
|
+
identify?(input: AnalyticsIdentifyInput): Promise<void>;
|
|
5
|
+
callMcpTool?(call: AnalyticsMcpToolCall): Promise<unknown>;
|
|
6
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// @bun
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { AnalyticsReader } from './analytics-reader';
|
|
2
|
+
import type { AnalyticsWriter } from './analytics-writer';
|
|
3
|
+
export type AnalyticsRequestMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
4
|
+
export interface AnalyticsRequest {
|
|
5
|
+
method: AnalyticsRequestMethod;
|
|
6
|
+
path: string;
|
|
7
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
8
|
+
body?: unknown;
|
|
9
|
+
headers?: Record<string, string>;
|
|
10
|
+
}
|
|
11
|
+
export interface AnalyticsResponse<T = unknown> {
|
|
12
|
+
status: number;
|
|
13
|
+
data: T;
|
|
14
|
+
headers?: Record<string, string>;
|
|
15
|
+
}
|
|
16
|
+
export interface AnalyticsEventInput {
|
|
17
|
+
distinctId: string;
|
|
18
|
+
event: string;
|
|
19
|
+
properties?: Record<string, unknown>;
|
|
20
|
+
timestamp?: Date;
|
|
21
|
+
groups?: Record<string, string>;
|
|
22
|
+
}
|
|
23
|
+
export interface AnalyticsIdentifyInput {
|
|
24
|
+
distinctId: string;
|
|
25
|
+
properties?: Record<string, unknown>;
|
|
26
|
+
setOnce?: Record<string, unknown>;
|
|
27
|
+
}
|
|
28
|
+
export interface AnalyticsQueryInput {
|
|
29
|
+
query: string;
|
|
30
|
+
values?: Record<string, unknown>;
|
|
31
|
+
}
|
|
32
|
+
export interface AnalyticsQueryResult {
|
|
33
|
+
results: unknown;
|
|
34
|
+
columns?: string[];
|
|
35
|
+
types?: string[];
|
|
36
|
+
hogql?: string;
|
|
37
|
+
timings?: unknown;
|
|
38
|
+
}
|
|
39
|
+
export interface AnalyticsMcpToolCall {
|
|
40
|
+
name: string;
|
|
41
|
+
arguments?: Record<string, unknown>;
|
|
42
|
+
}
|
|
43
|
+
export type AnalyticsProvider = AnalyticsWriter & AnalyticsReader & {
|
|
44
|
+
request<T = unknown>(request: AnalyticsRequest): Promise<AnalyticsResponse<T>>;
|
|
45
|
+
};
|
|
46
|
+
export * from './analytics-reader';
|
|
47
|
+
export * from './analytics-writer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// @bun
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export interface CalendarAttendee {
|
|
2
|
+
email: string;
|
|
3
|
+
name?: string;
|
|
4
|
+
optional?: boolean;
|
|
5
|
+
responseStatus?: 'needsAction' | 'declined' | 'tentative' | 'accepted';
|
|
6
|
+
}
|
|
7
|
+
export interface CalendarReminder {
|
|
8
|
+
method: 'email' | 'popup';
|
|
9
|
+
minutesBeforeStart: number;
|
|
10
|
+
}
|
|
11
|
+
export interface CalendarEvent {
|
|
12
|
+
id: string;
|
|
13
|
+
calendarId: string;
|
|
14
|
+
title: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
location?: string;
|
|
17
|
+
start: Date;
|
|
18
|
+
end: Date;
|
|
19
|
+
allDay?: boolean;
|
|
20
|
+
attendees?: CalendarAttendee[];
|
|
21
|
+
reminders?: CalendarReminder[];
|
|
22
|
+
conferenceLink?: string;
|
|
23
|
+
metadata?: Record<string, string>;
|
|
24
|
+
createdAt?: Date;
|
|
25
|
+
updatedAt?: Date;
|
|
26
|
+
}
|
|
27
|
+
export interface CalendarEventInput {
|
|
28
|
+
calendarId: string;
|
|
29
|
+
title: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
location?: string;
|
|
32
|
+
start: Date;
|
|
33
|
+
end: Date;
|
|
34
|
+
allDay?: boolean;
|
|
35
|
+
attendees?: CalendarAttendee[];
|
|
36
|
+
reminders?: CalendarReminder[];
|
|
37
|
+
conference?: {
|
|
38
|
+
create: boolean;
|
|
39
|
+
type?: 'google_meet' | 'zoom' | 'custom';
|
|
40
|
+
};
|
|
41
|
+
metadata?: Record<string, string>;
|
|
42
|
+
}
|
|
43
|
+
export interface CalendarEventUpdateInput {
|
|
44
|
+
title?: string;
|
|
45
|
+
description?: string;
|
|
46
|
+
location?: string;
|
|
47
|
+
start?: Date;
|
|
48
|
+
end?: Date;
|
|
49
|
+
allDay?: boolean;
|
|
50
|
+
attendees?: CalendarAttendee[];
|
|
51
|
+
reminders?: CalendarReminder[];
|
|
52
|
+
conference?: {
|
|
53
|
+
create?: boolean;
|
|
54
|
+
type?: 'google_meet' | 'zoom' | 'custom';
|
|
55
|
+
};
|
|
56
|
+
metadata?: Record<string, string>;
|
|
57
|
+
}
|
|
58
|
+
export interface CalendarListEventsQuery {
|
|
59
|
+
calendarId: string;
|
|
60
|
+
timeMin?: Date;
|
|
61
|
+
timeMax?: Date;
|
|
62
|
+
maxResults?: number;
|
|
63
|
+
pageToken?: string;
|
|
64
|
+
includeCancelled?: boolean;
|
|
65
|
+
}
|
|
66
|
+
export interface CalendarListEventsResult {
|
|
67
|
+
events: CalendarEvent[];
|
|
68
|
+
nextPageToken?: string;
|
|
69
|
+
}
|
|
70
|
+
export interface CalendarProvider {
|
|
71
|
+
listEvents(query: CalendarListEventsQuery): Promise<CalendarListEventsResult>;
|
|
72
|
+
createEvent(input: CalendarEventInput): Promise<CalendarEvent>;
|
|
73
|
+
updateEvent(calendarId: string, eventId: string, input: CalendarEventUpdateInput): Promise<CalendarEvent>;
|
|
74
|
+
deleteEvent(calendarId: string, eventId: string): Promise<void>;
|
|
75
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// @bun
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type DatabaseStatementParam = string | number | boolean | bigint | Date | Uint8Array | null | Record<string, unknown> | readonly unknown[];
|
|
2
|
+
export type DatabaseRow = Record<string, unknown>;
|
|
3
|
+
export interface DatabaseQueryResult<TRow extends DatabaseRow = DatabaseRow> {
|
|
4
|
+
rows: TRow[];
|
|
5
|
+
rowCount: number;
|
|
6
|
+
}
|
|
7
|
+
export interface DatabaseProvider {
|
|
8
|
+
query<TRow extends DatabaseRow = DatabaseRow>(statement: string, params?: readonly DatabaseStatementParam[]): Promise<DatabaseQueryResult<TRow>>;
|
|
9
|
+
execute(statement: string, params?: readonly DatabaseStatementParam[]): Promise<void>;
|
|
10
|
+
transaction<T>(run: (database: DatabaseProvider) => Promise<T>): Promise<T>;
|
|
11
|
+
close(): Promise<void>;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// @bun
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/integrations/spec.ts
|
|
3
|
+
import { SpecContractRegistry } from "@contractspec/lib.contracts-spec/registry";
|
|
4
|
+
var integrationKey = (meta) => `${meta.key}.v${meta.version}`;
|
|
5
|
+
|
|
6
|
+
class IntegrationSpecRegistry extends SpecContractRegistry {
|
|
7
|
+
constructor(items) {
|
|
8
|
+
super("integration", items);
|
|
9
|
+
}
|
|
10
|
+
getByCategory(category) {
|
|
11
|
+
return this.list().filter((spec) => spec.meta.category === category);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
function makeIntegrationSpecKey(meta) {
|
|
15
|
+
return integrationKey(meta);
|
|
16
|
+
}
|
|
17
|
+
var defineIntegration = (spec) => spec;
|
|
18
|
+
|
|
19
|
+
// src/integrations/providers/elevenlabs.ts
|
|
20
|
+
import { StabilityEnum } from "@contractspec/lib.contracts-spec/ownership";
|
|
21
|
+
var elevenLabsIntegrationSpec = defineIntegration({
|
|
22
|
+
meta: {
|
|
23
|
+
key: "ai-voice.elevenlabs",
|
|
24
|
+
version: "1.0.0",
|
|
25
|
+
category: "ai-voice",
|
|
26
|
+
title: "ElevenLabs Text-to-Speech",
|
|
27
|
+
description: "ElevenLabs integration for neural voice synthesis and voice catalog access.",
|
|
28
|
+
domain: "ai",
|
|
29
|
+
owners: ["platform.ai"],
|
|
30
|
+
tags: ["voice", "tts"],
|
|
31
|
+
stability: StabilityEnum.Beta
|
|
32
|
+
},
|
|
33
|
+
supportedModes: ["managed", "byok"],
|
|
34
|
+
capabilities: {
|
|
35
|
+
provides: [{ key: "ai.voice.synthesis", version: "1.0.0" }]
|
|
36
|
+
},
|
|
37
|
+
configSchema: {
|
|
38
|
+
schema: {
|
|
39
|
+
type: "object",
|
|
40
|
+
properties: {
|
|
41
|
+
defaultVoiceId: {
|
|
42
|
+
type: "string",
|
|
43
|
+
description: "Optional default voice identifier for synthesis requests."
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
example: {
|
|
48
|
+
defaultVoiceId: "pNInz6obpgDQGcFmaJgB"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
secretSchema: {
|
|
52
|
+
schema: {
|
|
53
|
+
type: "object",
|
|
54
|
+
required: ["apiKey"],
|
|
55
|
+
properties: {
|
|
56
|
+
apiKey: {
|
|
57
|
+
type: "string",
|
|
58
|
+
description: "ElevenLabs API key with text-to-speech permissions."
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
example: {
|
|
63
|
+
apiKey: "eleven-***"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
healthCheck: {
|
|
67
|
+
method: "custom",
|
|
68
|
+
timeoutMs: 4000
|
|
69
|
+
},
|
|
70
|
+
docsUrl: "https://elevenlabs.io/docs/api-reference/text-to-speech",
|
|
71
|
+
constraints: {
|
|
72
|
+
rateLimit: {
|
|
73
|
+
rpm: 120
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
byokSetup: {
|
|
77
|
+
setupInstructions: "Create an ElevenLabs API key and ensure the desired voices are accessible to the key scope."
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
function registerElevenLabsIntegration(registry) {
|
|
81
|
+
return registry.register(elevenLabsIntegrationSpec);
|
|
82
|
+
}
|
|
83
|
+
export {
|
|
84
|
+
registerElevenLabsIntegration,
|
|
85
|
+
elevenLabsIntegrationSpec
|
|
86
|
+
};
|