@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,125 @@
|
|
|
1
|
+
export type OpenBankingAccountOwnership = 'individual' | 'joint' | 'business' | 'unknown';
|
|
2
|
+
export interface OpenBankingAccountSummary {
|
|
3
|
+
id: string;
|
|
4
|
+
externalId: string;
|
|
5
|
+
tenantId: string;
|
|
6
|
+
connectionId: string;
|
|
7
|
+
userId?: string;
|
|
8
|
+
displayName: string;
|
|
9
|
+
institutionId: string;
|
|
10
|
+
institutionName: string;
|
|
11
|
+
institutionLogoUrl?: string;
|
|
12
|
+
accountType: string;
|
|
13
|
+
iban?: string;
|
|
14
|
+
bic?: string;
|
|
15
|
+
currency: string;
|
|
16
|
+
accountNumberMasked?: string;
|
|
17
|
+
ownership?: OpenBankingAccountOwnership;
|
|
18
|
+
status?: 'active' | 'inactive' | 'closed' | 'suspended';
|
|
19
|
+
lastSyncedAt?: string;
|
|
20
|
+
metadata?: Record<string, unknown>;
|
|
21
|
+
}
|
|
22
|
+
export interface OpenBankingAccountDetails extends OpenBankingAccountSummary {
|
|
23
|
+
productCode?: string;
|
|
24
|
+
openedAt?: string;
|
|
25
|
+
closedAt?: string;
|
|
26
|
+
availableBalance?: number;
|
|
27
|
+
currentBalance?: number;
|
|
28
|
+
creditLimit?: number;
|
|
29
|
+
customFields?: Record<string, unknown>;
|
|
30
|
+
}
|
|
31
|
+
export interface OpenBankingTransaction {
|
|
32
|
+
id: string;
|
|
33
|
+
externalId: string;
|
|
34
|
+
tenantId: string;
|
|
35
|
+
accountId: string;
|
|
36
|
+
connectionId: string;
|
|
37
|
+
amount: number;
|
|
38
|
+
currency: string;
|
|
39
|
+
direction: 'debit' | 'credit';
|
|
40
|
+
description?: string;
|
|
41
|
+
bookingDate?: string;
|
|
42
|
+
valueDate?: string;
|
|
43
|
+
postedAt?: string;
|
|
44
|
+
category?: string;
|
|
45
|
+
rawCategory?: string;
|
|
46
|
+
merchantName?: string;
|
|
47
|
+
merchantCategoryCode?: string;
|
|
48
|
+
counterpartyName?: string;
|
|
49
|
+
counterpartyAccount?: string;
|
|
50
|
+
reference?: string;
|
|
51
|
+
status?: 'pending' | 'booked' | 'cancelled';
|
|
52
|
+
metadata?: Record<string, unknown>;
|
|
53
|
+
}
|
|
54
|
+
export type OpenBankingBalanceType = 'current' | 'available' | 'authorised' | 'uncleared' | 'credit' | (string & {});
|
|
55
|
+
export interface OpenBankingAccountBalance {
|
|
56
|
+
accountId: string;
|
|
57
|
+
connectionId: string;
|
|
58
|
+
tenantId: string;
|
|
59
|
+
type: OpenBankingBalanceType;
|
|
60
|
+
currency: string;
|
|
61
|
+
amount: number;
|
|
62
|
+
lastUpdatedAt: string;
|
|
63
|
+
metadata?: Record<string, unknown>;
|
|
64
|
+
}
|
|
65
|
+
export interface OpenBankingConnectionStatus {
|
|
66
|
+
connectionId: string;
|
|
67
|
+
tenantId: string;
|
|
68
|
+
status: 'healthy' | 'degraded' | 'error' | 'disconnected';
|
|
69
|
+
lastCheckedAt?: string;
|
|
70
|
+
errorCode?: string;
|
|
71
|
+
errorMessage?: string;
|
|
72
|
+
details?: Record<string, unknown>;
|
|
73
|
+
}
|
|
74
|
+
export interface OpenBankingListAccountsParams {
|
|
75
|
+
tenantId: string;
|
|
76
|
+
connectionId: string;
|
|
77
|
+
userId?: string;
|
|
78
|
+
cursor?: string;
|
|
79
|
+
pageSize?: number;
|
|
80
|
+
includeBalances?: boolean;
|
|
81
|
+
institutionId?: string;
|
|
82
|
+
}
|
|
83
|
+
export interface OpenBankingListAccountsResult {
|
|
84
|
+
accounts: OpenBankingAccountSummary[];
|
|
85
|
+
nextCursor?: string;
|
|
86
|
+
hasMore?: boolean;
|
|
87
|
+
}
|
|
88
|
+
export interface OpenBankingGetAccountDetailsParams {
|
|
89
|
+
tenantId: string;
|
|
90
|
+
accountId: string;
|
|
91
|
+
connectionId: string;
|
|
92
|
+
includeBalances?: boolean;
|
|
93
|
+
}
|
|
94
|
+
export interface OpenBankingListTransactionsParams {
|
|
95
|
+
tenantId: string;
|
|
96
|
+
accountId: string;
|
|
97
|
+
connectionId: string;
|
|
98
|
+
from?: string;
|
|
99
|
+
to?: string;
|
|
100
|
+
cursor?: string;
|
|
101
|
+
pageSize?: number;
|
|
102
|
+
includePending?: boolean;
|
|
103
|
+
}
|
|
104
|
+
export interface OpenBankingListTransactionsResult {
|
|
105
|
+
transactions: OpenBankingTransaction[];
|
|
106
|
+
nextCursor?: string;
|
|
107
|
+
hasMore?: boolean;
|
|
108
|
+
}
|
|
109
|
+
export interface OpenBankingGetBalancesParams {
|
|
110
|
+
tenantId: string;
|
|
111
|
+
accountId: string;
|
|
112
|
+
connectionId: string;
|
|
113
|
+
balanceTypes?: OpenBankingBalanceType[];
|
|
114
|
+
}
|
|
115
|
+
export interface OpenBankingGetConnectionStatusParams {
|
|
116
|
+
tenantId: string;
|
|
117
|
+
connectionId: string;
|
|
118
|
+
}
|
|
119
|
+
export interface OpenBankingProvider {
|
|
120
|
+
listAccounts(params: OpenBankingListAccountsParams): Promise<OpenBankingListAccountsResult>;
|
|
121
|
+
getAccountDetails(params: OpenBankingGetAccountDetailsParams): Promise<OpenBankingAccountDetails>;
|
|
122
|
+
listTransactions(params: OpenBankingListTransactionsParams): Promise<OpenBankingListTransactionsResult>;
|
|
123
|
+
getBalances(params: OpenBankingGetBalancesParams): Promise<OpenBankingAccountBalance[]>;
|
|
124
|
+
getConnectionStatus(params: OpenBankingGetConnectionStatusParams): Promise<OpenBankingConnectionStatus>;
|
|
125
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// @bun
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
export interface Money {
|
|
2
|
+
/** Amount denominated in the smallest currency unit (e.g., cents). */
|
|
3
|
+
amount: number;
|
|
4
|
+
currency: string;
|
|
5
|
+
}
|
|
6
|
+
export type PaymentIntentStatus = 'requires_payment_method' | 'requires_confirmation' | 'requires_action' | 'processing' | 'succeeded' | 'canceled';
|
|
7
|
+
export interface PaymentCustomer {
|
|
8
|
+
id: string;
|
|
9
|
+
email?: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
metadata?: Record<string, string>;
|
|
12
|
+
createdAt?: Date;
|
|
13
|
+
updatedAt?: Date;
|
|
14
|
+
}
|
|
15
|
+
export interface CreateCustomerInput {
|
|
16
|
+
email?: string;
|
|
17
|
+
name?: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
metadata?: Record<string, string>;
|
|
20
|
+
}
|
|
21
|
+
export interface PaymentIntent {
|
|
22
|
+
id: string;
|
|
23
|
+
amount: Money;
|
|
24
|
+
status: PaymentIntentStatus;
|
|
25
|
+
customerId?: string;
|
|
26
|
+
clientSecret?: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
metadata?: Record<string, string>;
|
|
29
|
+
createdAt?: Date;
|
|
30
|
+
updatedAt?: Date;
|
|
31
|
+
}
|
|
32
|
+
export interface CreatePaymentIntentInput {
|
|
33
|
+
amount: Money;
|
|
34
|
+
customerId?: string;
|
|
35
|
+
confirmationMethod?: 'automatic' | 'manual';
|
|
36
|
+
captureMethod?: 'automatic' | 'manual';
|
|
37
|
+
description?: string;
|
|
38
|
+
metadata?: Record<string, string>;
|
|
39
|
+
statementDescriptor?: string;
|
|
40
|
+
returnUrl?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface CapturePaymentInput {
|
|
43
|
+
amount?: Money;
|
|
44
|
+
receiptEmail?: string;
|
|
45
|
+
metadata?: Record<string, string>;
|
|
46
|
+
}
|
|
47
|
+
export interface PaymentRefund {
|
|
48
|
+
id: string;
|
|
49
|
+
paymentIntentId: string;
|
|
50
|
+
amount: Money;
|
|
51
|
+
status: 'pending' | 'succeeded' | 'failed' | 'canceled';
|
|
52
|
+
reason?: string;
|
|
53
|
+
metadata?: Record<string, string>;
|
|
54
|
+
createdAt?: Date;
|
|
55
|
+
}
|
|
56
|
+
export interface RefundPaymentInput {
|
|
57
|
+
paymentIntentId: string;
|
|
58
|
+
amount?: Money;
|
|
59
|
+
reason?: string;
|
|
60
|
+
metadata?: Record<string, string>;
|
|
61
|
+
}
|
|
62
|
+
export interface PaymentInvoice {
|
|
63
|
+
id: string;
|
|
64
|
+
number?: string;
|
|
65
|
+
status: 'draft' | 'open' | 'paid' | 'uncollectible' | 'void' | 'deleted';
|
|
66
|
+
amountDue: Money;
|
|
67
|
+
amountPaid?: Money;
|
|
68
|
+
customerId?: string;
|
|
69
|
+
dueDate?: Date;
|
|
70
|
+
hostedInvoiceUrl?: string;
|
|
71
|
+
metadata?: Record<string, string>;
|
|
72
|
+
createdAt?: Date;
|
|
73
|
+
updatedAt?: Date;
|
|
74
|
+
}
|
|
75
|
+
export interface ListInvoicesQuery {
|
|
76
|
+
customerId?: string;
|
|
77
|
+
status?: PaymentInvoice['status'][];
|
|
78
|
+
limit?: number;
|
|
79
|
+
startingAfter?: string;
|
|
80
|
+
}
|
|
81
|
+
export interface PaymentTransaction {
|
|
82
|
+
id: string;
|
|
83
|
+
paymentIntentId?: string;
|
|
84
|
+
amount: Money;
|
|
85
|
+
type: 'capture' | 'refund' | 'payout';
|
|
86
|
+
status: 'pending' | 'succeeded' | 'failed';
|
|
87
|
+
description?: string;
|
|
88
|
+
createdAt: Date;
|
|
89
|
+
metadata?: Record<string, string>;
|
|
90
|
+
}
|
|
91
|
+
export interface ListTransactionsQuery {
|
|
92
|
+
customerId?: string;
|
|
93
|
+
paymentIntentId?: string;
|
|
94
|
+
limit?: number;
|
|
95
|
+
startingAfter?: string;
|
|
96
|
+
}
|
|
97
|
+
export interface PaymentsProvider {
|
|
98
|
+
createCustomer(input: CreateCustomerInput): Promise<PaymentCustomer>;
|
|
99
|
+
getCustomer(customerId: string): Promise<PaymentCustomer | null>;
|
|
100
|
+
createPaymentIntent(input: CreatePaymentIntentInput): Promise<PaymentIntent>;
|
|
101
|
+
capturePayment(paymentIntentId: string, input?: CapturePaymentInput): Promise<PaymentIntent>;
|
|
102
|
+
cancelPaymentIntent(paymentIntentId: string): Promise<PaymentIntent>;
|
|
103
|
+
refundPayment(input: RefundPaymentInput): Promise<PaymentRefund>;
|
|
104
|
+
listInvoices(query?: ListInvoicesQuery): Promise<PaymentInvoice[]>;
|
|
105
|
+
listTransactions(query?: ListTransactionsQuery): Promise<PaymentTransaction[]>;
|
|
106
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// @bun
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { TelemetrySpec } from '@contractspec/lib.contracts-spec/telemetry/spec';
|
|
2
|
+
/**
|
|
3
|
+
* PostHog LLM Analytics telemetry spec.
|
|
4
|
+
*
|
|
5
|
+
* Defines the telemetry events captured by the @posthog/ai integration
|
|
6
|
+
* for LLM observability. Events are captured via withTracing() model wrapping
|
|
7
|
+
* or the PostHogTelemetryCollector bridge.
|
|
8
|
+
*
|
|
9
|
+
* PostHog Evaluations (Relevance, Helpfulness, Hallucination, Toxicity,
|
|
10
|
+
* Jailbreak, and custom prompts) run server-side on these events.
|
|
11
|
+
* No client-side code is needed beyond capturing $ai_generation events.
|
|
12
|
+
*/
|
|
13
|
+
export declare const posthogLLMTelemetrySpec: TelemetrySpec;
|
|
14
|
+
/**
|
|
15
|
+
* PostHog LLM Analytics PII fields that may appear in generation events.
|
|
16
|
+
* These should be redacted when privacyMode is enabled.
|
|
17
|
+
*/
|
|
18
|
+
export declare const POSTHOG_LLM_PII_FIELDS: readonly ["$ai_input", "$ai_output_choices"];
|
|
19
|
+
/**
|
|
20
|
+
* PostHog LLM Analytics telemetry event name constants.
|
|
21
|
+
*/
|
|
22
|
+
export declare const POSTHOG_LLM_TELEMETRY_EVENTS: {
|
|
23
|
+
/** Captured for every LLM generation call */
|
|
24
|
+
readonly generation: "$ai_generation";
|
|
25
|
+
/** Captured for LLM trace spans */
|
|
26
|
+
readonly span: "$ai_span";
|
|
27
|
+
/** Captured for LLM evaluation results (server-side) */
|
|
28
|
+
readonly evaluation: "$ai_evaluation";
|
|
29
|
+
};
|
|
30
|
+
export type PostHogLLMTelemetryEvent = (typeof POSTHOG_LLM_TELEMETRY_EVENTS)[keyof typeof POSTHOG_LLM_TELEMETRY_EVENTS];
|
|
31
|
+
/**
|
|
32
|
+
* Built-in PostHog evaluation templates.
|
|
33
|
+
* These are configured in PostHog UI under LLM Analytics > Evaluations.
|
|
34
|
+
*/
|
|
35
|
+
export declare const POSTHOG_EVALUATION_TEMPLATES: {
|
|
36
|
+
/** Whether the output addresses the user's input */
|
|
37
|
+
readonly relevance: "relevance";
|
|
38
|
+
/** Whether the response is useful and actionable */
|
|
39
|
+
readonly helpfulness: "helpfulness";
|
|
40
|
+
/** Attempts to bypass safety guardrails */
|
|
41
|
+
readonly jailbreak: "jailbreak";
|
|
42
|
+
/** Made-up facts or unsupported claims */
|
|
43
|
+
readonly hallucination: "hallucination";
|
|
44
|
+
/** Harmful, offensive, or inappropriate content */
|
|
45
|
+
readonly toxicity: "toxicity";
|
|
46
|
+
};
|
|
47
|
+
export type PostHogEvaluationTemplate = (typeof POSTHOG_EVALUATION_TEMPLATES)[keyof typeof POSTHOG_EVALUATION_TEMPLATES];
|
|
48
|
+
/**
|
|
49
|
+
* Redact PII fields from PostHog LLM telemetry payload.
|
|
50
|
+
*/
|
|
51
|
+
export declare function redactPostHogLLMTelemetryPayload<T extends Record<string, unknown>>(payload: T): T;
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/integrations/providers/posthog-llm-telemetry.ts
|
|
3
|
+
import { StabilityEnum } from "@contractspec/lib.contracts-spec/ownership";
|
|
4
|
+
var posthogLLMTelemetrySpec = {
|
|
5
|
+
meta: {
|
|
6
|
+
key: "analytics.posthog.llm",
|
|
7
|
+
version: "1.0.0",
|
|
8
|
+
title: "PostHog LLM Analytics Telemetry",
|
|
9
|
+
description: "Telemetry events for PostHog LLM Analytics: generation tracing, token usage, and evaluation-ready metadata.",
|
|
10
|
+
domain: "analytics",
|
|
11
|
+
owners: ["@platform.integrations"],
|
|
12
|
+
tags: ["analytics", "posthog", "llm", "ai", "telemetry"],
|
|
13
|
+
stability: StabilityEnum.Beta
|
|
14
|
+
},
|
|
15
|
+
events: [
|
|
16
|
+
{
|
|
17
|
+
key: "posthog.llm.generation",
|
|
18
|
+
version: "1.0.0",
|
|
19
|
+
semantics: {
|
|
20
|
+
who: "AI agent or LLM consumer",
|
|
21
|
+
what: "Captures an LLM generation call with full observability metadata",
|
|
22
|
+
why: "Enable LLM performance monitoring, cost tracking, and automated quality evaluations via PostHog"
|
|
23
|
+
},
|
|
24
|
+
properties: {
|
|
25
|
+
$ai_model: {
|
|
26
|
+
type: "string",
|
|
27
|
+
required: true,
|
|
28
|
+
description: "The LLM model identifier (e.g., gpt-4o, claude-sonnet-4-20250514)"
|
|
29
|
+
},
|
|
30
|
+
$ai_provider: {
|
|
31
|
+
type: "string",
|
|
32
|
+
required: true,
|
|
33
|
+
description: "The LLM provider (e.g., openai, anthropic, contractspec)"
|
|
34
|
+
},
|
|
35
|
+
$ai_latency: {
|
|
36
|
+
type: "number",
|
|
37
|
+
required: false,
|
|
38
|
+
description: "LLM call latency in seconds"
|
|
39
|
+
},
|
|
40
|
+
$ai_input_tokens: {
|
|
41
|
+
type: "number",
|
|
42
|
+
required: false,
|
|
43
|
+
description: "Number of input/prompt tokens consumed"
|
|
44
|
+
},
|
|
45
|
+
$ai_output_tokens: {
|
|
46
|
+
type: "number",
|
|
47
|
+
required: false,
|
|
48
|
+
description: "Number of output/completion tokens generated"
|
|
49
|
+
},
|
|
50
|
+
$ai_total_cost_usd: {
|
|
51
|
+
type: "number",
|
|
52
|
+
required: false,
|
|
53
|
+
description: "Total cost in USD (input + output)"
|
|
54
|
+
},
|
|
55
|
+
$ai_is_error: {
|
|
56
|
+
type: "boolean",
|
|
57
|
+
required: false,
|
|
58
|
+
description: "Whether the generation resulted in an error"
|
|
59
|
+
},
|
|
60
|
+
$ai_trace_id: {
|
|
61
|
+
type: "string",
|
|
62
|
+
required: false,
|
|
63
|
+
description: "Trace ID for grouping related generations"
|
|
64
|
+
},
|
|
65
|
+
$ai_stream: {
|
|
66
|
+
type: "boolean",
|
|
67
|
+
required: false,
|
|
68
|
+
description: "Whether the response was streamed"
|
|
69
|
+
},
|
|
70
|
+
$ai_time_to_first_token: {
|
|
71
|
+
type: "number",
|
|
72
|
+
required: false,
|
|
73
|
+
description: "Time to first token in seconds (streaming only)"
|
|
74
|
+
},
|
|
75
|
+
$ai_tools: {
|
|
76
|
+
type: "json",
|
|
77
|
+
required: false,
|
|
78
|
+
description: "Tools/functions available to the LLM"
|
|
79
|
+
},
|
|
80
|
+
$ai_input: {
|
|
81
|
+
type: "json",
|
|
82
|
+
required: false,
|
|
83
|
+
pii: true,
|
|
84
|
+
redact: true,
|
|
85
|
+
description: "Messages sent to the LLM (may contain PII)"
|
|
86
|
+
},
|
|
87
|
+
$ai_output_choices: {
|
|
88
|
+
type: "json",
|
|
89
|
+
required: false,
|
|
90
|
+
pii: true,
|
|
91
|
+
redact: true,
|
|
92
|
+
description: "Response choices from the LLM (may contain PII)"
|
|
93
|
+
},
|
|
94
|
+
contractspec_operation: {
|
|
95
|
+
type: "string",
|
|
96
|
+
required: false,
|
|
97
|
+
description: "ContractSpec operation name"
|
|
98
|
+
},
|
|
99
|
+
contractspec_version: {
|
|
100
|
+
type: "string",
|
|
101
|
+
required: false,
|
|
102
|
+
description: "ContractSpec operation version"
|
|
103
|
+
},
|
|
104
|
+
contractspec_agent_id: {
|
|
105
|
+
type: "string",
|
|
106
|
+
required: false,
|
|
107
|
+
description: "ContractSpec agent identifier"
|
|
108
|
+
},
|
|
109
|
+
contractspec_finish_reason: {
|
|
110
|
+
type: "string",
|
|
111
|
+
required: false,
|
|
112
|
+
description: "AI SDK finish reason (stop, tool-calls, error, etc.)"
|
|
113
|
+
},
|
|
114
|
+
contractspec_tool_count: {
|
|
115
|
+
type: "number",
|
|
116
|
+
required: false,
|
|
117
|
+
description: "Number of tool calls made in this step"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
privacy: "internal",
|
|
121
|
+
tags: ["llm", "generation", "posthog"]
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
config: {
|
|
125
|
+
defaultRetentionDays: 90,
|
|
126
|
+
defaultSamplingRate: 1,
|
|
127
|
+
providers: [
|
|
128
|
+
{
|
|
129
|
+
type: "posthog",
|
|
130
|
+
config: {
|
|
131
|
+
eventName: "$ai_generation",
|
|
132
|
+
enableEvaluations: true,
|
|
133
|
+
evaluationTemplates: [
|
|
134
|
+
"relevance",
|
|
135
|
+
"helpfulness",
|
|
136
|
+
"jailbreak",
|
|
137
|
+
"hallucination",
|
|
138
|
+
"toxicity"
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
var POSTHOG_LLM_PII_FIELDS = [
|
|
146
|
+
"$ai_input",
|
|
147
|
+
"$ai_output_choices"
|
|
148
|
+
];
|
|
149
|
+
var POSTHOG_LLM_TELEMETRY_EVENTS = {
|
|
150
|
+
generation: "$ai_generation",
|
|
151
|
+
span: "$ai_span",
|
|
152
|
+
evaluation: "$ai_evaluation"
|
|
153
|
+
};
|
|
154
|
+
var POSTHOG_EVALUATION_TEMPLATES = {
|
|
155
|
+
relevance: "relevance",
|
|
156
|
+
helpfulness: "helpfulness",
|
|
157
|
+
jailbreak: "jailbreak",
|
|
158
|
+
hallucination: "hallucination",
|
|
159
|
+
toxicity: "toxicity"
|
|
160
|
+
};
|
|
161
|
+
function redactPostHogLLMTelemetryPayload(payload) {
|
|
162
|
+
const redacted = { ...payload };
|
|
163
|
+
for (const field of POSTHOG_LLM_PII_FIELDS) {
|
|
164
|
+
if (field in redacted) {
|
|
165
|
+
redacted[field] = "[REDACTED]";
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return redacted;
|
|
169
|
+
}
|
|
170
|
+
export {
|
|
171
|
+
redactPostHogLLMTelemetryPayload,
|
|
172
|
+
posthogLLMTelemetrySpec,
|
|
173
|
+
POSTHOG_LLM_TELEMETRY_EVENTS,
|
|
174
|
+
POSTHOG_LLM_PII_FIELDS,
|
|
175
|
+
POSTHOG_EVALUATION_TEMPLATES
|
|
176
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
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/posthog.ts
|
|
20
|
+
import { StabilityEnum } from "@contractspec/lib.contracts-spec/ownership";
|
|
21
|
+
var posthogIntegrationSpec = defineIntegration({
|
|
22
|
+
meta: {
|
|
23
|
+
key: "analytics.posthog",
|
|
24
|
+
version: "1.1.0",
|
|
25
|
+
category: "analytics",
|
|
26
|
+
title: "PostHog",
|
|
27
|
+
description: "PostHog integration for product analytics, feature flags, HogQL queries, and LLM analytics with evaluations.",
|
|
28
|
+
domain: "analytics",
|
|
29
|
+
owners: ["@platform.integrations"],
|
|
30
|
+
tags: ["analytics", "posthog", "llm", "ai"],
|
|
31
|
+
stability: StabilityEnum.Beta
|
|
32
|
+
},
|
|
33
|
+
supportedModes: ["managed", "byok"],
|
|
34
|
+
capabilities: {
|
|
35
|
+
provides: [
|
|
36
|
+
{ key: "analytics.events", version: "1.0.0" },
|
|
37
|
+
{ key: "analytics.feature-flags", version: "1.0.0" },
|
|
38
|
+
{ key: "analytics.query", version: "1.0.0" },
|
|
39
|
+
{ key: "analytics.events.read", version: "1.0.0" },
|
|
40
|
+
{ key: "analytics.persons", version: "1.0.0" },
|
|
41
|
+
{ key: "analytics.insights", version: "1.0.0" },
|
|
42
|
+
{ key: "analytics.cohorts", version: "1.0.0" },
|
|
43
|
+
{ key: "analytics.annotations", version: "1.0.0" },
|
|
44
|
+
{ key: "analytics.llm-tracing", version: "1.0.0" },
|
|
45
|
+
{ key: "analytics.llm-evaluations", version: "1.0.0" }
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
configSchema: {
|
|
49
|
+
schema: {
|
|
50
|
+
type: "object",
|
|
51
|
+
properties: {
|
|
52
|
+
host: {
|
|
53
|
+
type: "string",
|
|
54
|
+
description: "PostHog host (e.g., https://app.posthog.com or self-hosted URL)."
|
|
55
|
+
},
|
|
56
|
+
projectId: {
|
|
57
|
+
type: "string",
|
|
58
|
+
description: "PostHog project ID for API queries."
|
|
59
|
+
},
|
|
60
|
+
mcpUrl: {
|
|
61
|
+
type: "string",
|
|
62
|
+
description: "Optional MCP endpoint URL for PostHog tools."
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
example: {
|
|
67
|
+
host: "https://app.posthog.com",
|
|
68
|
+
projectId: "12345"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
secretSchema: {
|
|
72
|
+
schema: {
|
|
73
|
+
type: "object",
|
|
74
|
+
required: ["personalApiKey"],
|
|
75
|
+
properties: {
|
|
76
|
+
personalApiKey: {
|
|
77
|
+
type: "string",
|
|
78
|
+
description: "PostHog personal API key (required for API reads/writes)."
|
|
79
|
+
},
|
|
80
|
+
projectApiKey: {
|
|
81
|
+
type: "string",
|
|
82
|
+
description: "PostHog project API key (required for capture/ingest events)."
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
example: {
|
|
87
|
+
personalApiKey: "phx_personal_api_key",
|
|
88
|
+
projectApiKey: "phc_project_api_key"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
healthCheck: {
|
|
92
|
+
method: "custom",
|
|
93
|
+
timeoutMs: 5000
|
|
94
|
+
},
|
|
95
|
+
docsUrl: "https://posthog.com/docs",
|
|
96
|
+
byokSetup: {
|
|
97
|
+
setupInstructions: "Generate a PostHog personal API key for read/write operations and a project API key for event capture."
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
function registerPosthogIntegration(registry) {
|
|
101
|
+
return registry.register(posthogIntegrationSpec);
|
|
102
|
+
}
|
|
103
|
+
export {
|
|
104
|
+
registerPosthogIntegration,
|
|
105
|
+
posthogIntegrationSpec
|
|
106
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
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/postmark.ts
|
|
20
|
+
import { StabilityEnum } from "@contractspec/lib.contracts-spec/ownership";
|
|
21
|
+
var postmarkIntegrationSpec = defineIntegration({
|
|
22
|
+
meta: {
|
|
23
|
+
key: "email.postmark",
|
|
24
|
+
version: "1.0.0",
|
|
25
|
+
category: "email",
|
|
26
|
+
title: "Postmark Transactional Email",
|
|
27
|
+
description: "Postmark integration for transactional email delivery.",
|
|
28
|
+
domain: "communications",
|
|
29
|
+
owners: ["platform.messaging"],
|
|
30
|
+
tags: ["email", "transactional"],
|
|
31
|
+
stability: StabilityEnum.Stable
|
|
32
|
+
},
|
|
33
|
+
supportedModes: ["managed", "byok"],
|
|
34
|
+
capabilities: {
|
|
35
|
+
provides: [{ key: "email.transactional", version: "1.0.0" }],
|
|
36
|
+
requires: [
|
|
37
|
+
{
|
|
38
|
+
key: "platform.webhooks",
|
|
39
|
+
optional: true,
|
|
40
|
+
reason: "Optional for inbound bounce handling"
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
configSchema: {
|
|
45
|
+
schema: {
|
|
46
|
+
type: "object",
|
|
47
|
+
properties: {
|
|
48
|
+
messageStream: {
|
|
49
|
+
type: "string",
|
|
50
|
+
description: "Optional message stream identifier (e.g., transactional)."
|
|
51
|
+
},
|
|
52
|
+
fromEmail: {
|
|
53
|
+
type: "string",
|
|
54
|
+
description: "Default From address used for outbound messages."
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
example: {
|
|
59
|
+
messageStream: "outbound",
|
|
60
|
+
fromEmail: "notifications@example.com"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
secretSchema: {
|
|
64
|
+
schema: {
|
|
65
|
+
type: "object",
|
|
66
|
+
required: ["serverToken"],
|
|
67
|
+
properties: {
|
|
68
|
+
serverToken: {
|
|
69
|
+
type: "string",
|
|
70
|
+
description: "Server token for the Postmark account."
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
example: {
|
|
75
|
+
serverToken: "server-***"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
healthCheck: {
|
|
79
|
+
method: "ping",
|
|
80
|
+
timeoutMs: 3000
|
|
81
|
+
},
|
|
82
|
+
docsUrl: "https://postmarkapp.com/developer",
|
|
83
|
+
constraints: {
|
|
84
|
+
rateLimit: {
|
|
85
|
+
rpm: 500
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
byokSetup: {
|
|
89
|
+
setupInstructions: "Create a Postmark server token with outbound send permissions and configure allowed from addresses."
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
function registerPostmarkIntegration(registry) {
|
|
93
|
+
return registry.register(postmarkIntegrationSpec);
|
|
94
|
+
}
|
|
95
|
+
export {
|
|
96
|
+
registerPostmarkIntegration,
|
|
97
|
+
postmarkIntegrationSpec
|
|
98
|
+
};
|