@lssm/example.pocket-family-office 0.0.0-canary-20251220002821 → 0.0.0-canary-20251220021406
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/dist/blueprint.d.ts +4 -7
- package/dist/blueprint.d.ts.map +1 -1
- package/dist/connections/samples.d.ts +3 -7
- package/dist/connections/samples.d.ts.map +1 -1
- package/dist/contracts/index.d.ts +491 -118
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/index.d.ts +9 -16
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +89 -17
- package/dist/knowledge/sources.sample.d.ts +2 -6
- package/dist/knowledge/sources.sample.d.ts.map +1 -1
- package/dist/pocket-family-office.feature.d.ts +7 -7
- package/dist/pocket-family-office.feature.d.ts.map +1 -1
- package/dist/telemetry.d.ts +3 -7
- package/dist/telemetry.d.ts.map +1 -1
- package/dist/tenant.sample.d.ts +2 -6
- package/dist/tenant.sample.d.ts.map +1 -1
- package/dist/tests/pocket-family-office.test.d.ts +2 -0
- package/dist/tests/pocket-family-office.test.d.ts.map +1 -0
- package/dist/workflows/generate-financial-summary.d.ts +2 -6
- package/dist/workflows/generate-financial-summary.d.ts.map +1 -1
- package/dist/workflows/generate-openbanking-overview.d.ts +2 -6
- package/dist/workflows/generate-openbanking-overview.d.ts.map +1 -1
- package/dist/workflows/index.d.ts +9 -9
- package/dist/workflows/index.d.ts.map +1 -0
- package/dist/workflows/ingest-email-threads.d.ts +2 -6
- package/dist/workflows/ingest-email-threads.d.ts.map +1 -1
- package/dist/workflows/process-uploaded-document.d.ts +2 -6
- package/dist/workflows/process-uploaded-document.d.ts.map +1 -1
- package/dist/workflows/refresh-openbanking-balances.d.ts +2 -6
- package/dist/workflows/refresh-openbanking-balances.d.ts.map +1 -1
- package/dist/workflows/sync-openbanking-accounts.d.ts +2 -6
- package/dist/workflows/sync-openbanking-accounts.d.ts.map +1 -1
- package/dist/workflows/sync-openbanking-transactions.d.ts +2 -6
- package/dist/workflows/sync-openbanking-transactions.d.ts.map +1 -1
- package/dist/workflows/upcoming-payments-reminder.d.ts +2 -6
- package/dist/workflows/upcoming-payments-reminder.d.ts.map +1 -1
- package/package.json +12 -11
- package/dist/blueprint.js +0 -201
- package/dist/blueprint.js.map +0 -1
- package/dist/connections/samples.js +0 -227
- package/dist/connections/samples.js.map +0 -1
- package/dist/contracts/index.js +0 -271
- package/dist/contracts/index.js.map +0 -1
- package/dist/knowledge/sources.sample.js +0 -50
- package/dist/knowledge/sources.sample.js.map +0 -1
- package/dist/libs/contracts/dist/integrations/index.js +0 -18
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +0 -227
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js.map +0 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +0 -158
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js.map +0 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +0 -3
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +0 -209
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js.map +0 -1
- package/dist/libs/contracts/dist/integrations/openbanking/models.js +0 -241
- package/dist/libs/contracts/dist/integrations/openbanking/models.js.map +0 -1
- package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +0 -26
- package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js.map +0 -1
- package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +0 -53
- package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js.map +0 -1
- package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +0 -76
- package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js.map +0 -1
- package/dist/libs/contracts/dist/integrations/providers/gmail.js +0 -88
- package/dist/libs/contracts/dist/integrations/providers/gmail.js.map +0 -1
- package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +0 -67
- package/dist/libs/contracts/dist/integrations/providers/google-calendar.js.map +0 -1
- package/dist/libs/contracts/dist/integrations/providers/index.js +0 -11
- package/dist/libs/contracts/dist/integrations/providers/mistral.js +0 -69
- package/dist/libs/contracts/dist/integrations/providers/mistral.js.map +0 -1
- package/dist/libs/contracts/dist/integrations/providers/postmark.js +0 -69
- package/dist/libs/contracts/dist/integrations/providers/postmark.js.map +0 -1
- package/dist/libs/contracts/dist/integrations/providers/powens.js +0 -117
- package/dist/libs/contracts/dist/integrations/providers/powens.js.map +0 -1
- package/dist/libs/contracts/dist/integrations/providers/qdrant.js +0 -74
- package/dist/libs/contracts/dist/integrations/providers/qdrant.js.map +0 -1
- package/dist/libs/contracts/dist/integrations/providers/registry.js +0 -10
- package/dist/libs/contracts/dist/integrations/providers/stripe.js +0 -84
- package/dist/libs/contracts/dist/integrations/providers/stripe.js.map +0 -1
- package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +0 -62
- package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js.map +0 -1
- package/dist/libs/contracts/dist/ownership.js +0 -38
- package/dist/libs/contracts/dist/ownership.js.map +0 -1
- package/dist/libs/contracts/dist/schema/dist/index.js +0 -3873
- package/dist/libs/contracts/dist/schema/dist/index.js.map +0 -1
- package/dist/libs/contracts/dist/spec.js +0 -35
- package/dist/libs/contracts/dist/spec.js.map +0 -1
- package/dist/pocket-family-office.feature.js +0 -47
- package/dist/pocket-family-office.feature.js.map +0 -1
- package/dist/telemetry.js +0 -171
- package/dist/telemetry.js.map +0 -1
- package/dist/tenant.sample.js +0 -90
- package/dist/tenant.sample.js.map +0 -1
- package/dist/workflows/generate-financial-summary.js +0 -61
- package/dist/workflows/generate-financial-summary.js.map +0 -1
- package/dist/workflows/generate-openbanking-overview.js +0 -58
- package/dist/workflows/generate-openbanking-overview.js.map +0 -1
- package/dist/workflows/index.js +0 -10
- package/dist/workflows/ingest-email-threads.js +0 -53
- package/dist/workflows/ingest-email-threads.js.map +0 -1
- package/dist/workflows/process-uploaded-document.js +0 -51
- package/dist/workflows/process-uploaded-document.js.map +0 -1
- package/dist/workflows/refresh-openbanking-balances.js +0 -67
- package/dist/workflows/refresh-openbanking-balances.js.map +0 -1
- package/dist/workflows/sync-openbanking-accounts.js +0 -67
- package/dist/workflows/sync-openbanking-accounts.js.map +0 -1
- package/dist/workflows/sync-openbanking-transactions.js +0 -67
- package/dist/workflows/sync-openbanking-transactions.js.map +0 -1
- package/dist/workflows/upcoming-payments-reminder.js +0 -56
- package/dist/workflows/upcoming-payments-reminder.js.map +0 -1
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
//#region src/connections/samples.ts
|
|
2
|
-
const now = /* @__PURE__ */ new Date();
|
|
3
|
-
const baseMeta = {
|
|
4
|
-
tenantId: "tenant.family-office",
|
|
5
|
-
createdAt: now,
|
|
6
|
-
updatedAt: now
|
|
7
|
-
};
|
|
8
|
-
const pocketFamilyOfficeConnections = [
|
|
9
|
-
{
|
|
10
|
-
meta: {
|
|
11
|
-
...baseMeta,
|
|
12
|
-
id: "conn-mistral-primary",
|
|
13
|
-
integrationKey: "ai-llm.mistral",
|
|
14
|
-
integrationVersion: 1,
|
|
15
|
-
label: "Mistral Primary"
|
|
16
|
-
},
|
|
17
|
-
ownershipMode: "managed",
|
|
18
|
-
config: {
|
|
19
|
-
model: "mistral-large-latest",
|
|
20
|
-
embeddingModel: "mistral-embed"
|
|
21
|
-
},
|
|
22
|
-
secretProvider: "gcp-secret-manager",
|
|
23
|
-
secretRef: "gcp://projects/pfo-hackathon/secrets/mistral-api-key/versions/latest",
|
|
24
|
-
status: "connected",
|
|
25
|
-
health: {
|
|
26
|
-
status: "connected",
|
|
27
|
-
checkedAt: now,
|
|
28
|
-
latencyMs: 180
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
meta: {
|
|
33
|
-
...baseMeta,
|
|
34
|
-
id: "conn-qdrant-finance",
|
|
35
|
-
integrationKey: "vectordb.qdrant",
|
|
36
|
-
integrationVersion: 1,
|
|
37
|
-
label: "Qdrant Finance Cluster"
|
|
38
|
-
},
|
|
39
|
-
ownershipMode: "managed",
|
|
40
|
-
config: {
|
|
41
|
-
apiUrl: "https://qdrant.pfo.internal",
|
|
42
|
-
collectionPrefix: "tenant-family-office"
|
|
43
|
-
},
|
|
44
|
-
secretProvider: "gcp-secret-manager",
|
|
45
|
-
secretRef: "gcp://projects/pfo-hackathon/secrets/qdrant-api-key/versions/latest",
|
|
46
|
-
status: "connected",
|
|
47
|
-
health: {
|
|
48
|
-
status: "connected",
|
|
49
|
-
checkedAt: now,
|
|
50
|
-
latencyMs: 95
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
meta: {
|
|
55
|
-
...baseMeta,
|
|
56
|
-
id: "conn-gcs-documents",
|
|
57
|
-
integrationKey: "storage.gcs",
|
|
58
|
-
integrationVersion: 1,
|
|
59
|
-
label: "GCS Documents Bucket"
|
|
60
|
-
},
|
|
61
|
-
ownershipMode: "managed",
|
|
62
|
-
config: {
|
|
63
|
-
bucket: "pfo-uploads",
|
|
64
|
-
prefix: "financial-docs/"
|
|
65
|
-
},
|
|
66
|
-
secretProvider: "gcp-secret-manager",
|
|
67
|
-
secretRef: "gcp://projects/pfo-hackathon/secrets/gcs-service-account/versions/latest",
|
|
68
|
-
status: "connected",
|
|
69
|
-
health: {
|
|
70
|
-
status: "connected",
|
|
71
|
-
checkedAt: now,
|
|
72
|
-
latencyMs: 60
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
meta: {
|
|
77
|
-
...baseMeta,
|
|
78
|
-
id: "conn-gmail-threads",
|
|
79
|
-
integrationKey: "email.gmail",
|
|
80
|
-
integrationVersion: 1,
|
|
81
|
-
label: "Gmail Household Threads"
|
|
82
|
-
},
|
|
83
|
-
ownershipMode: "byok",
|
|
84
|
-
config: {
|
|
85
|
-
labelIds: ["FINANCE", "INBOX"],
|
|
86
|
-
includeSpamTrash: false
|
|
87
|
-
},
|
|
88
|
-
secretProvider: "gcp-secret-manager",
|
|
89
|
-
secretRef: "gcp://projects/pfo-hackathon/secrets/gmail-refresh-token/versions/latest",
|
|
90
|
-
status: "connected",
|
|
91
|
-
health: {
|
|
92
|
-
status: "connected",
|
|
93
|
-
checkedAt: now,
|
|
94
|
-
latencyMs: 320
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
meta: {
|
|
99
|
-
...baseMeta,
|
|
100
|
-
id: "conn-postmark-outbound",
|
|
101
|
-
integrationKey: "email.postmark",
|
|
102
|
-
integrationVersion: 1,
|
|
103
|
-
label: "Postmark Transactional"
|
|
104
|
-
},
|
|
105
|
-
ownershipMode: "managed",
|
|
106
|
-
config: {
|
|
107
|
-
messageStream: "outbound",
|
|
108
|
-
fromEmail: "family.office@pfo.dev"
|
|
109
|
-
},
|
|
110
|
-
secretProvider: "gcp-secret-manager",
|
|
111
|
-
secretRef: "gcp://projects/pfo-hackathon/secrets/postmark-server-token/versions/latest",
|
|
112
|
-
status: "connected",
|
|
113
|
-
health: {
|
|
114
|
-
status: "connected",
|
|
115
|
-
checkedAt: now,
|
|
116
|
-
latencyMs: 210
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
meta: {
|
|
121
|
-
...baseMeta,
|
|
122
|
-
id: "conn-google-calendar",
|
|
123
|
-
integrationKey: "calendar.google",
|
|
124
|
-
integrationVersion: 1,
|
|
125
|
-
label: "Household Calendar"
|
|
126
|
-
},
|
|
127
|
-
ownershipMode: "managed",
|
|
128
|
-
config: { calendarId: "primary" },
|
|
129
|
-
secretProvider: "gcp-secret-manager",
|
|
130
|
-
secretRef: "gcp://projects/pfo-hackathon/secrets/google-calendar-service-account/versions/latest",
|
|
131
|
-
status: "connected",
|
|
132
|
-
health: {
|
|
133
|
-
status: "connected",
|
|
134
|
-
checkedAt: now,
|
|
135
|
-
latencyMs: 140
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
meta: {
|
|
140
|
-
...baseMeta,
|
|
141
|
-
id: "conn-elevenlabs-voice",
|
|
142
|
-
integrationKey: "ai-voice.elevenlabs",
|
|
143
|
-
integrationVersion: 1,
|
|
144
|
-
label: "ElevenLabs Voice"
|
|
145
|
-
},
|
|
146
|
-
ownershipMode: "byok",
|
|
147
|
-
config: { defaultVoiceId: "pNInz6obpgDQGcFmaJgB" },
|
|
148
|
-
secretProvider: "gcp-secret-manager",
|
|
149
|
-
secretRef: "gcp://projects/pfo-hackathon/secrets/elevenlabs-api-key/versions/latest",
|
|
150
|
-
status: "connected",
|
|
151
|
-
health: {
|
|
152
|
-
status: "connected",
|
|
153
|
-
checkedAt: now,
|
|
154
|
-
latencyMs: 250
|
|
155
|
-
}
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
meta: {
|
|
159
|
-
...baseMeta,
|
|
160
|
-
id: "conn-twilio-sms",
|
|
161
|
-
integrationKey: "sms.twilio",
|
|
162
|
-
integrationVersion: 1,
|
|
163
|
-
label: "Twilio SMS"
|
|
164
|
-
},
|
|
165
|
-
ownershipMode: "managed",
|
|
166
|
-
config: { fromNumber: "+15552340000" },
|
|
167
|
-
secretProvider: "gcp-secret-manager",
|
|
168
|
-
secretRef: "gcp://projects/pfo-hackathon/secrets/twilio-auth-token/versions/latest",
|
|
169
|
-
status: "connected",
|
|
170
|
-
health: {
|
|
171
|
-
status: "connected",
|
|
172
|
-
checkedAt: now,
|
|
173
|
-
latencyMs: 180
|
|
174
|
-
}
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
meta: {
|
|
178
|
-
...baseMeta,
|
|
179
|
-
id: "conn-stripe-recurring",
|
|
180
|
-
integrationKey: "payments.stripe",
|
|
181
|
-
integrationVersion: 1,
|
|
182
|
-
label: "Stripe Recurring Billing"
|
|
183
|
-
},
|
|
184
|
-
ownershipMode: "managed",
|
|
185
|
-
config: {
|
|
186
|
-
accountId: "acct_1PFOHACKATHON",
|
|
187
|
-
region: "eu-west-1"
|
|
188
|
-
},
|
|
189
|
-
secretProvider: "gcp-secret-manager",
|
|
190
|
-
secretRef: "gcp://projects/pfo-hackathon/secrets/stripe-secret-key/versions/latest",
|
|
191
|
-
status: "connected",
|
|
192
|
-
health: {
|
|
193
|
-
status: "connected",
|
|
194
|
-
checkedAt: now,
|
|
195
|
-
latencyMs: 220
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
meta: {
|
|
200
|
-
...baseMeta,
|
|
201
|
-
id: "conn-powens-primary",
|
|
202
|
-
integrationKey: "openbanking.powens",
|
|
203
|
-
integrationVersion: 1,
|
|
204
|
-
label: "Powens Open Banking"
|
|
205
|
-
},
|
|
206
|
-
ownershipMode: "byok",
|
|
207
|
-
config: {
|
|
208
|
-
environment: "sandbox",
|
|
209
|
-
baseUrl: "https://api-sandbox.powens.com/v2"
|
|
210
|
-
},
|
|
211
|
-
secretProvider: "gcp-secret-manager",
|
|
212
|
-
secretRef: "gcp://projects/pfo-hackathon/secrets/powens-credentials/versions/latest",
|
|
213
|
-
status: "connected",
|
|
214
|
-
health: {
|
|
215
|
-
status: "connected",
|
|
216
|
-
checkedAt: now,
|
|
217
|
-
latencyMs: 410
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
];
|
|
221
|
-
function getPocketFamilyOfficeConnection(connectionId) {
|
|
222
|
-
return pocketFamilyOfficeConnections.find((connection) => connection.meta.id === connectionId);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
//#endregion
|
|
226
|
-
export { getPocketFamilyOfficeConnection, pocketFamilyOfficeConnections };
|
|
227
|
-
//# sourceMappingURL=samples.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"samples.js","names":["pocketFamilyOfficeConnections: IntegrationConnection[]"],"sources":["../../src/connections/samples.ts"],"sourcesContent":["import type { IntegrationConnection } from '@lssm/lib.contracts/integrations/connection';\n\nconst now = new Date();\n\nconst baseMeta = {\n tenantId: 'tenant.family-office',\n createdAt: now,\n updatedAt: now,\n} as const;\n\nexport const pocketFamilyOfficeConnections: IntegrationConnection[] = [\n {\n meta: {\n ...baseMeta,\n id: 'conn-mistral-primary',\n integrationKey: 'ai-llm.mistral',\n integrationVersion: 1,\n label: 'Mistral Primary',\n },\n ownershipMode: 'managed',\n config: {\n model: 'mistral-large-latest',\n embeddingModel: 'mistral-embed',\n },\n secretProvider: 'gcp-secret-manager',\n secretRef:\n 'gcp://projects/pfo-hackathon/secrets/mistral-api-key/versions/latest',\n status: 'connected',\n health: {\n status: 'connected',\n checkedAt: now,\n latencyMs: 180,\n },\n },\n {\n meta: {\n ...baseMeta,\n id: 'conn-qdrant-finance',\n integrationKey: 'vectordb.qdrant',\n integrationVersion: 1,\n label: 'Qdrant Finance Cluster',\n },\n ownershipMode: 'managed',\n config: {\n apiUrl: 'https://qdrant.pfo.internal',\n collectionPrefix: 'tenant-family-office',\n },\n secretProvider: 'gcp-secret-manager',\n secretRef:\n 'gcp://projects/pfo-hackathon/secrets/qdrant-api-key/versions/latest',\n status: 'connected',\n health: { status: 'connected', checkedAt: now, latencyMs: 95 },\n },\n {\n meta: {\n ...baseMeta,\n id: 'conn-gcs-documents',\n integrationKey: 'storage.gcs',\n integrationVersion: 1,\n label: 'GCS Documents Bucket',\n },\n ownershipMode: 'managed',\n config: {\n bucket: 'pfo-uploads',\n prefix: 'financial-docs/',\n },\n secretProvider: 'gcp-secret-manager',\n secretRef:\n 'gcp://projects/pfo-hackathon/secrets/gcs-service-account/versions/latest',\n status: 'connected',\n health: { status: 'connected', checkedAt: now, latencyMs: 60 },\n },\n {\n meta: {\n ...baseMeta,\n id: 'conn-gmail-threads',\n integrationKey: 'email.gmail',\n integrationVersion: 1,\n label: 'Gmail Household Threads',\n },\n ownershipMode: 'byok',\n config: {\n labelIds: ['FINANCE', 'INBOX'],\n includeSpamTrash: false,\n },\n secretProvider: 'gcp-secret-manager',\n secretRef:\n 'gcp://projects/pfo-hackathon/secrets/gmail-refresh-token/versions/latest',\n status: 'connected',\n health: { status: 'connected', checkedAt: now, latencyMs: 320 },\n },\n {\n meta: {\n ...baseMeta,\n id: 'conn-postmark-outbound',\n integrationKey: 'email.postmark',\n integrationVersion: 1,\n label: 'Postmark Transactional',\n },\n ownershipMode: 'managed',\n config: {\n messageStream: 'outbound',\n fromEmail: 'family.office@pfo.dev',\n },\n secretProvider: 'gcp-secret-manager',\n secretRef:\n 'gcp://projects/pfo-hackathon/secrets/postmark-server-token/versions/latest',\n status: 'connected',\n health: { status: 'connected', checkedAt: now, latencyMs: 210 },\n },\n {\n meta: {\n ...baseMeta,\n id: 'conn-google-calendar',\n integrationKey: 'calendar.google',\n integrationVersion: 1,\n label: 'Household Calendar',\n },\n ownershipMode: 'managed',\n config: {\n calendarId: 'primary',\n },\n secretProvider: 'gcp-secret-manager',\n secretRef:\n 'gcp://projects/pfo-hackathon/secrets/google-calendar-service-account/versions/latest',\n status: 'connected',\n health: { status: 'connected', checkedAt: now, latencyMs: 140 },\n },\n {\n meta: {\n ...baseMeta,\n id: 'conn-elevenlabs-voice',\n integrationKey: 'ai-voice.elevenlabs',\n integrationVersion: 1,\n label: 'ElevenLabs Voice',\n },\n ownershipMode: 'byok',\n config: {\n defaultVoiceId: 'pNInz6obpgDQGcFmaJgB',\n },\n secretProvider: 'gcp-secret-manager',\n secretRef:\n 'gcp://projects/pfo-hackathon/secrets/elevenlabs-api-key/versions/latest',\n status: 'connected',\n health: { status: 'connected', checkedAt: now, latencyMs: 250 },\n },\n {\n meta: {\n ...baseMeta,\n id: 'conn-twilio-sms',\n integrationKey: 'sms.twilio',\n integrationVersion: 1,\n label: 'Twilio SMS',\n },\n ownershipMode: 'managed',\n config: {\n fromNumber: '+15552340000',\n },\n secretProvider: 'gcp-secret-manager',\n secretRef:\n 'gcp://projects/pfo-hackathon/secrets/twilio-auth-token/versions/latest',\n status: 'connected',\n health: { status: 'connected', checkedAt: now, latencyMs: 180 },\n },\n {\n meta: {\n ...baseMeta,\n id: 'conn-stripe-recurring',\n integrationKey: 'payments.stripe',\n integrationVersion: 1,\n label: 'Stripe Recurring Billing',\n },\n ownershipMode: 'managed',\n config: {\n accountId: 'acct_1PFOHACKATHON',\n region: 'eu-west-1',\n },\n secretProvider: 'gcp-secret-manager',\n secretRef:\n 'gcp://projects/pfo-hackathon/secrets/stripe-secret-key/versions/latest',\n status: 'connected',\n health: { status: 'connected', checkedAt: now, latencyMs: 220 },\n },\n {\n meta: {\n ...baseMeta,\n id: 'conn-powens-primary',\n integrationKey: 'openbanking.powens',\n integrationVersion: 1,\n label: 'Powens Open Banking',\n },\n ownershipMode: 'byok',\n config: {\n environment: 'sandbox',\n baseUrl: 'https://api-sandbox.powens.com/v2',\n },\n secretProvider: 'gcp-secret-manager',\n secretRef:\n 'gcp://projects/pfo-hackathon/secrets/powens-credentials/versions/latest',\n status: 'connected',\n health: { status: 'connected', checkedAt: now, latencyMs: 410 },\n },\n];\n\nexport function getPocketFamilyOfficeConnection(\n connectionId: string\n): IntegrationConnection | undefined {\n return pocketFamilyOfficeConnections.find(\n (connection) => connection.meta.id === connectionId\n );\n}\n"],"mappings":";AAEA,MAAM,sBAAM,IAAI,MAAM;AAEtB,MAAM,WAAW;CACf,UAAU;CACV,WAAW;CACX,WAAW;CACZ;AAED,MAAaA,gCAAyD;CACpE;EACE,MAAM;GACJ,GAAG;GACH,IAAI;GACJ,gBAAgB;GAChB,oBAAoB;GACpB,OAAO;GACR;EACD,eAAe;EACf,QAAQ;GACN,OAAO;GACP,gBAAgB;GACjB;EACD,gBAAgB;EAChB,WACE;EACF,QAAQ;EACR,QAAQ;GACN,QAAQ;GACR,WAAW;GACX,WAAW;GACZ;EACF;CACD;EACE,MAAM;GACJ,GAAG;GACH,IAAI;GACJ,gBAAgB;GAChB,oBAAoB;GACpB,OAAO;GACR;EACD,eAAe;EACf,QAAQ;GACN,QAAQ;GACR,kBAAkB;GACnB;EACD,gBAAgB;EAChB,WACE;EACF,QAAQ;EACR,QAAQ;GAAE,QAAQ;GAAa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,IAAI;GACJ,gBAAgB;GAChB,oBAAoB;GACpB,OAAO;GACR;EACD,eAAe;EACf,QAAQ,EACN,YAAY,gBACb;EACD,gBAAgB;EAChB,WACE;EACF,QAAQ;EACR,QAAQ;GAAE,QAAQ;GAAa,WAAW;GAAK,WAAW;GAAK;EAChE;CACD;EACE,MAAM;GACJ,GAAG;GACH,IAAI;GACJ,gBAAgB;GAChB,oBAAoB;GACpB,OAAO;GACR;EACD,eAAe;EACf,QAAQ;GACN,WAAW;GACX,QAAQ;GACT;EACD,gBAAgB;EAChB,WACE;EACF,QAAQ;EACR,QAAQ;GAAE,QAAQ;GAAa,WAAW;GAAK,WAAW;GAAK;EAChE;CACD;EACE,MAAM;GACJ,GAAG;GACH,IAAI;GACJ,gBAAgB;GAChB,oBAAoB;GACpB,OAAO;GACR;EACD,eAAe;EACf,QAAQ;GACN,aAAa;GACb,SAAS;GACV;EACD,gBAAgB;EAChB,WACE;EACF,QAAQ;EACR,QAAQ;GAAE,QAAQ;GAAa,WAAW;GAAK,WAAW;GAAK;EAChE;CACF;AAED,SAAgB,gCACd,cACmC;AACnC,QAAO,8BAA8B,MAClC,eAAe,WAAW,KAAK,OAAO,aACxC"}
|
package/dist/contracts/index.js
DELETED
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
import { OwnersEnum, StabilityEnum, TagsEnum } from "../libs/contracts/dist/ownership.js";
|
|
2
|
-
import { OPENBANKING_TELEMETRY_EVENTS } from "../libs/contracts/dist/integrations/openbanking/telemetry.js";
|
|
3
|
-
import "../libs/contracts/dist/integrations/index.js";
|
|
4
|
-
import * as z from "zod";
|
|
5
|
-
|
|
6
|
-
//#region src/contracts/index.ts
|
|
7
|
-
const UploadDocumentInput = z.object({
|
|
8
|
-
bucket: z.string().min(1),
|
|
9
|
-
objectKey: z.string().min(1),
|
|
10
|
-
mimeType: z.string().min(1),
|
|
11
|
-
bytes: z.number().int().nonnegative(),
|
|
12
|
-
tags: z.array(z.string()).default([]),
|
|
13
|
-
uploadedAt: z.coerce.date(),
|
|
14
|
-
source: z.enum([
|
|
15
|
-
"upload",
|
|
16
|
-
"email",
|
|
17
|
-
"sync"
|
|
18
|
-
]).default("upload")
|
|
19
|
-
});
|
|
20
|
-
const UploadDocumentOutput = z.object({
|
|
21
|
-
documentId: z.string(),
|
|
22
|
-
ingestionJobId: z.string()
|
|
23
|
-
});
|
|
24
|
-
const uploadDocumentContract = {
|
|
25
|
-
meta: {
|
|
26
|
-
name: "pfo.documents.upload",
|
|
27
|
-
version: 1,
|
|
28
|
-
kind: "command",
|
|
29
|
-
title: "Upload Financial Document",
|
|
30
|
-
description: "Stores an object in tenant storage and schedules ingestion into the knowledge base.",
|
|
31
|
-
domain: "finance",
|
|
32
|
-
owners: [OwnersEnum.PlatformFinance],
|
|
33
|
-
tags: [
|
|
34
|
-
"documents",
|
|
35
|
-
"ingestion",
|
|
36
|
-
TagsEnum.Guide
|
|
37
|
-
],
|
|
38
|
-
stability: StabilityEnum.Experimental
|
|
39
|
-
},
|
|
40
|
-
io: {
|
|
41
|
-
input: UploadDocumentInput,
|
|
42
|
-
output: UploadDocumentOutput
|
|
43
|
-
},
|
|
44
|
-
policy: {
|
|
45
|
-
auth: { scopes: ["documents:ingest"] },
|
|
46
|
-
rateLimit: {
|
|
47
|
-
points: 30,
|
|
48
|
-
windowSeconds: 60
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
telemetry: { events: [{
|
|
52
|
-
name: "pfo.documents.uploaded",
|
|
53
|
-
description: "Document queued for ingestion"
|
|
54
|
-
}] }
|
|
55
|
-
};
|
|
56
|
-
const PaymentReminderInput = z.object({
|
|
57
|
-
billId: z.string(),
|
|
58
|
-
recipientEmail: z.string().email(),
|
|
59
|
-
recipientPhone: z.string().optional(),
|
|
60
|
-
dueDate: z.coerce.date(),
|
|
61
|
-
amountCents: z.number().int().nonnegative(),
|
|
62
|
-
currency: z.string().length(3),
|
|
63
|
-
channel: z.enum([
|
|
64
|
-
"email",
|
|
65
|
-
"sms",
|
|
66
|
-
"both"
|
|
67
|
-
]).default("email"),
|
|
68
|
-
memo: z.string().max(280).optional()
|
|
69
|
-
});
|
|
70
|
-
const PaymentReminderOutput = z.object({
|
|
71
|
-
reminderId: z.string(),
|
|
72
|
-
scheduledAt: z.coerce.date()
|
|
73
|
-
});
|
|
74
|
-
const schedulePaymentReminderContract = {
|
|
75
|
-
meta: {
|
|
76
|
-
name: "pfo.reminders.schedule-payment",
|
|
77
|
-
version: 1,
|
|
78
|
-
kind: "command",
|
|
79
|
-
title: "Schedule Payment Reminder",
|
|
80
|
-
description: "Queues outbound email/SMS reminders for upcoming bills and adds an optional calendar hold.",
|
|
81
|
-
domain: "finance",
|
|
82
|
-
owners: [OwnersEnum.PlatformFinance],
|
|
83
|
-
tags: [
|
|
84
|
-
"payments",
|
|
85
|
-
"reminders",
|
|
86
|
-
TagsEnum.Automation
|
|
87
|
-
],
|
|
88
|
-
stability: StabilityEnum.Beta
|
|
89
|
-
},
|
|
90
|
-
io: {
|
|
91
|
-
input: PaymentReminderInput,
|
|
92
|
-
output: PaymentReminderOutput
|
|
93
|
-
},
|
|
94
|
-
policy: { auth: { scopes: ["reminders:write"] } },
|
|
95
|
-
telemetry: { events: [{
|
|
96
|
-
name: "pfo.reminders.scheduled",
|
|
97
|
-
description: "Reminder scheduled for delivery"
|
|
98
|
-
}] }
|
|
99
|
-
};
|
|
100
|
-
const FinancialSummaryInput = z.object({
|
|
101
|
-
period: z.enum([
|
|
102
|
-
"7d",
|
|
103
|
-
"30d",
|
|
104
|
-
"90d"
|
|
105
|
-
]).default("30d"),
|
|
106
|
-
includeVoiceSummary: z.boolean().default(false)
|
|
107
|
-
});
|
|
108
|
-
const FinancialSummaryOutput = z.object({
|
|
109
|
-
summaryId: z.string(),
|
|
110
|
-
generatedAt: z.coerce.date(),
|
|
111
|
-
markdown: z.string(),
|
|
112
|
-
highlights: z.array(z.object({
|
|
113
|
-
label: z.string(),
|
|
114
|
-
value: z.string()
|
|
115
|
-
})),
|
|
116
|
-
cashflowDelta: z.number()
|
|
117
|
-
});
|
|
118
|
-
const generateFinancialSummaryContract = {
|
|
119
|
-
meta: {
|
|
120
|
-
name: "pfo.summary.generate",
|
|
121
|
-
version: 1,
|
|
122
|
-
kind: "query",
|
|
123
|
-
title: "Generate Financial Summary",
|
|
124
|
-
description: "Runs RAG over financial documents and email threads to provide a natural-language summary with key metrics.",
|
|
125
|
-
domain: "finance",
|
|
126
|
-
owners: [OwnersEnum.PlatformFinance],
|
|
127
|
-
tags: [
|
|
128
|
-
"summary",
|
|
129
|
-
"ai",
|
|
130
|
-
TagsEnum.Automation
|
|
131
|
-
],
|
|
132
|
-
stability: StabilityEnum.Beta
|
|
133
|
-
},
|
|
134
|
-
io: {
|
|
135
|
-
input: FinancialSummaryInput,
|
|
136
|
-
output: FinancialSummaryOutput
|
|
137
|
-
},
|
|
138
|
-
telemetry: { events: [{
|
|
139
|
-
name: "pfo.summary.generated",
|
|
140
|
-
description: "Financial summary generated for a tenant"
|
|
141
|
-
}] }
|
|
142
|
-
};
|
|
143
|
-
const SyncEmailThreadsInput = z.object({
|
|
144
|
-
labelIds: z.array(z.string()).default(["INBOX"]),
|
|
145
|
-
maxThreads: z.number().int().positive().max(500).default(50),
|
|
146
|
-
syncSinceMinutes: z.number().int().positive().default(1440)
|
|
147
|
-
});
|
|
148
|
-
const SyncEmailThreadsOutput = z.object({
|
|
149
|
-
syncedThreads: z.number().int().nonnegative(),
|
|
150
|
-
lastMessageAt: z.coerce.date().optional()
|
|
151
|
-
});
|
|
152
|
-
const syncEmailThreadsContract = {
|
|
153
|
-
meta: {
|
|
154
|
-
name: "pfo.email.sync-threads",
|
|
155
|
-
version: 1,
|
|
156
|
-
kind: "command",
|
|
157
|
-
title: "Sync Gmail Threads",
|
|
158
|
-
description: "Triggers ingestion of Gmail threads into the operational knowledge space.",
|
|
159
|
-
domain: "communications",
|
|
160
|
-
owners: [OwnersEnum.PlatformMessaging],
|
|
161
|
-
tags: [
|
|
162
|
-
"gmail",
|
|
163
|
-
"knowledge",
|
|
164
|
-
TagsEnum.Automation
|
|
165
|
-
],
|
|
166
|
-
stability: StabilityEnum.Beta
|
|
167
|
-
},
|
|
168
|
-
io: {
|
|
169
|
-
input: SyncEmailThreadsInput,
|
|
170
|
-
output: SyncEmailThreadsOutput
|
|
171
|
-
},
|
|
172
|
-
telemetry: { events: [{
|
|
173
|
-
name: "pfo.email.synced",
|
|
174
|
-
description: "Gmail threads synced into knowledge base"
|
|
175
|
-
}] }
|
|
176
|
-
};
|
|
177
|
-
const SummaryDispatchInput = z.object({
|
|
178
|
-
summaryId: z.string(),
|
|
179
|
-
recipientEmail: z.string().email(),
|
|
180
|
-
recipientName: z.string().optional(),
|
|
181
|
-
includeVoice: z.boolean().default(false),
|
|
182
|
-
voiceRecipient: z.string().optional()
|
|
183
|
-
});
|
|
184
|
-
const SummaryDispatchOutput = z.object({
|
|
185
|
-
dispatchId: z.string(),
|
|
186
|
-
emailSent: z.boolean(),
|
|
187
|
-
voiceUrl: z.string().optional()
|
|
188
|
-
});
|
|
189
|
-
const dispatchFinancialSummaryContract = {
|
|
190
|
-
meta: {
|
|
191
|
-
name: "pfo.summary.dispatch",
|
|
192
|
-
version: 1,
|
|
193
|
-
kind: "command",
|
|
194
|
-
title: "Dispatch Financial Summary",
|
|
195
|
-
description: "Delivers the generated summary via email and optionally synthesises a voice note.",
|
|
196
|
-
domain: "finance",
|
|
197
|
-
owners: [OwnersEnum.PlatformMessaging],
|
|
198
|
-
tags: [
|
|
199
|
-
"summary",
|
|
200
|
-
"communications",
|
|
201
|
-
TagsEnum.Automation
|
|
202
|
-
],
|
|
203
|
-
stability: StabilityEnum.Experimental
|
|
204
|
-
},
|
|
205
|
-
io: {
|
|
206
|
-
input: SummaryDispatchInput,
|
|
207
|
-
output: SummaryDispatchOutput
|
|
208
|
-
},
|
|
209
|
-
policy: { auth: { scopes: ["summary:dispatch"] } },
|
|
210
|
-
telemetry: { events: [{
|
|
211
|
-
name: "pfo.summary.dispatched",
|
|
212
|
-
description: "Financial summary delivered to designated recipients"
|
|
213
|
-
}] }
|
|
214
|
-
};
|
|
215
|
-
const OpenBankingOverviewInput = z.object({
|
|
216
|
-
tenantId: z.string().min(1),
|
|
217
|
-
accountIds: z.array(z.string().min(1)).optional(),
|
|
218
|
-
period: z.enum([
|
|
219
|
-
"week",
|
|
220
|
-
"month",
|
|
221
|
-
"quarter"
|
|
222
|
-
]).default("month"),
|
|
223
|
-
asOf: z.coerce.date().optional(),
|
|
224
|
-
includeCategories: z.boolean().default(true),
|
|
225
|
-
includeCashflowTrend: z.boolean().default(true)
|
|
226
|
-
});
|
|
227
|
-
const OpenBankingOverviewOutput = z.object({
|
|
228
|
-
knowledgeEntryId: z.string(),
|
|
229
|
-
periodStart: z.coerce.date(),
|
|
230
|
-
periodEnd: z.coerce.date(),
|
|
231
|
-
generatedAt: z.coerce.date(),
|
|
232
|
-
summaryPath: z.string().optional()
|
|
233
|
-
});
|
|
234
|
-
const generateOpenBankingOverviewContract = {
|
|
235
|
-
meta: {
|
|
236
|
-
name: "pfo.openbanking.generate-overview",
|
|
237
|
-
version: 1,
|
|
238
|
-
kind: "command",
|
|
239
|
-
title: "Generate Open Banking Overview",
|
|
240
|
-
description: "Aggregates balances and transactions into a derived financial overview stored in the knowledge layer.",
|
|
241
|
-
domain: "finance",
|
|
242
|
-
owners: [OwnersEnum.PlatformFinance],
|
|
243
|
-
tags: [
|
|
244
|
-
"open-banking",
|
|
245
|
-
"summary",
|
|
246
|
-
TagsEnum.Automation
|
|
247
|
-
],
|
|
248
|
-
stability: StabilityEnum.Experimental
|
|
249
|
-
},
|
|
250
|
-
io: {
|
|
251
|
-
input: OpenBankingOverviewInput,
|
|
252
|
-
output: OpenBankingOverviewOutput
|
|
253
|
-
},
|
|
254
|
-
policy: { auth: { scopes: ["openbanking:derive"] } },
|
|
255
|
-
telemetry: { events: [{
|
|
256
|
-
name: OPENBANKING_TELEMETRY_EVENTS.overviewGenerated,
|
|
257
|
-
description: "Derived financial overview generated from Powens banking data."
|
|
258
|
-
}] }
|
|
259
|
-
};
|
|
260
|
-
const pocketFamilyOfficeContracts = {
|
|
261
|
-
"pfo.documents.upload": uploadDocumentContract,
|
|
262
|
-
"pfo.reminders.schedule-payment": schedulePaymentReminderContract,
|
|
263
|
-
"pfo.summary.generate": generateFinancialSummaryContract,
|
|
264
|
-
"pfo.summary.dispatch": dispatchFinancialSummaryContract,
|
|
265
|
-
"pfo.email.sync-threads": syncEmailThreadsContract,
|
|
266
|
-
"pfo.openbanking.generate-overview": generateOpenBankingOverviewContract
|
|
267
|
-
};
|
|
268
|
-
|
|
269
|
-
//#endregion
|
|
270
|
-
export { dispatchFinancialSummaryContract, generateFinancialSummaryContract, generateOpenBankingOverviewContract, pocketFamilyOfficeContracts, schedulePaymentReminderContract, syncEmailThreadsContract, uploadDocumentContract };
|
|
271
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["uploadDocumentContract: ContractSpec<\n UploadDocumentInput,\n UploadDocumentOutput\n>","schedulePaymentReminderContract: ContractSpec<\n PaymentReminderInput,\n PaymentReminderOutput\n>","generateFinancialSummaryContract: ContractSpec<\n FinancialSummaryInput,\n FinancialSummaryOutput\n>","syncEmailThreadsContract: ContractSpec<\n SyncEmailThreadsInput,\n SyncEmailThreadsOutput\n>","dispatchFinancialSummaryContract: ContractSpec<\n SummaryDispatchInput,\n SummaryDispatchOutput\n>","generateOpenBankingOverviewContract: ContractSpec<\n OpenBankingOverviewInput,\n OpenBankingOverviewOutput\n>","pocketFamilyOfficeContracts: Record<\n string,\n ContractSpec<any, any>\n>"],"sources":["../../src/contracts/index.ts"],"sourcesContent":["import * as z from 'zod';\nimport type { ContractSpec } from '@lssm/lib.contracts/spec';\nimport {\n OwnersEnum,\n StabilityEnum,\n TagsEnum,\n} from '@lssm/lib.contracts/ownership';\nimport { OPENBANKING_TELEMETRY_EVENTS } from '@lssm/lib.contracts/integrations';\n\nconst UploadDocumentInput = z.object({\n bucket: z.string().min(1),\n objectKey: z.string().min(1),\n mimeType: z.string().min(1),\n bytes: z.number().int().nonnegative(),\n tags: z.array(z.string()).default([]),\n uploadedAt: z.coerce.date(),\n source: z.enum(['upload', 'email', 'sync']).default('upload'),\n});\n\nconst UploadDocumentOutput = z.object({\n documentId: z.string(),\n ingestionJobId: z.string(),\n});\n\nexport type UploadDocumentInput = z.infer<typeof UploadDocumentInput>;\nexport type UploadDocumentOutput = z.infer<typeof UploadDocumentOutput>;\n\nexport const uploadDocumentContract: ContractSpec<\n UploadDocumentInput,\n UploadDocumentOutput\n> = {\n meta: {\n name: 'pfo.documents.upload',\n version: 1,\n kind: 'command',\n title: 'Upload Financial Document',\n description:\n 'Stores an object in tenant storage and schedules ingestion into the knowledge base.',\n domain: 'finance',\n owners: [OwnersEnum.PlatformFinance],\n tags: ['documents', 'ingestion', TagsEnum.Guide],\n stability: StabilityEnum.Experimental,\n },\n io: {\n input: UploadDocumentInput,\n output: UploadDocumentOutput,\n },\n policy: {\n auth: {\n scopes: ['documents:ingest'],\n },\n rateLimit: {\n points: 30,\n windowSeconds: 60,\n },\n },\n telemetry: {\n events: [\n {\n name: 'pfo.documents.uploaded',\n description: 'Document queued for ingestion',\n },\n ],\n },\n};\n\nconst PaymentReminderInput = z.object({\n billId: z.string(),\n recipientEmail: z.string().email(),\n recipientPhone: z.string().optional(),\n dueDate: z.coerce.date(),\n amountCents: z.number().int().nonnegative(),\n currency: z.string().length(3),\n channel: z.enum(['email', 'sms', 'both']).default('email'),\n memo: z.string().max(280).optional(),\n});\n\nconst PaymentReminderOutput = z.object({\n reminderId: z.string(),\n scheduledAt: z.coerce.date(),\n});\n\nexport type PaymentReminderInput = z.infer<typeof PaymentReminderInput>;\nexport type PaymentReminderOutput = z.infer<typeof PaymentReminderOutput>;\n\nexport const schedulePaymentReminderContract: ContractSpec<\n PaymentReminderInput,\n PaymentReminderOutput\n> = {\n meta: {\n name: 'pfo.reminders.schedule-payment',\n version: 1,\n kind: 'command',\n title: 'Schedule Payment Reminder',\n description:\n 'Queues outbound email/SMS reminders for upcoming bills and adds an optional calendar hold.',\n domain: 'finance',\n owners: [OwnersEnum.PlatformFinance],\n tags: ['payments', 'reminders', TagsEnum.Automation],\n stability: StabilityEnum.Beta,\n },\n io: {\n input: PaymentReminderInput,\n output: PaymentReminderOutput,\n },\n policy: {\n auth: {\n scopes: ['reminders:write'],\n },\n },\n telemetry: {\n events: [\n {\n name: 'pfo.reminders.scheduled',\n description: 'Reminder scheduled for delivery',\n },\n ],\n },\n};\n\nconst FinancialSummaryInput = z.object({\n period: z.enum(['7d', '30d', '90d']).default('30d'),\n includeVoiceSummary: z.boolean().default(false),\n});\n\nconst FinancialSummaryOutput = z.object({\n summaryId: z.string(),\n generatedAt: z.coerce.date(),\n markdown: z.string(),\n highlights: z.array(\n z.object({\n label: z.string(),\n value: z.string(),\n })\n ),\n cashflowDelta: z.number(),\n});\n\nexport type FinancialSummaryInput = z.infer<typeof FinancialSummaryInput>;\nexport type FinancialSummaryOutput = z.infer<typeof FinancialSummaryOutput>;\n\nexport const generateFinancialSummaryContract: ContractSpec<\n FinancialSummaryInput,\n FinancialSummaryOutput\n> = {\n meta: {\n name: 'pfo.summary.generate',\n version: 1,\n kind: 'query',\n title: 'Generate Financial Summary',\n description:\n 'Runs RAG over financial documents and email threads to provide a natural-language summary with key metrics.',\n domain: 'finance',\n owners: [OwnersEnum.PlatformFinance],\n tags: ['summary', 'ai', TagsEnum.Automation],\n stability: StabilityEnum.Beta,\n },\n io: {\n input: FinancialSummaryInput,\n output: FinancialSummaryOutput,\n },\n telemetry: {\n events: [\n {\n name: 'pfo.summary.generated',\n description: 'Financial summary generated for a tenant',\n },\n ],\n },\n};\n\nconst SyncEmailThreadsInput = z.object({\n labelIds: z.array(z.string()).default(['INBOX']),\n maxThreads: z.number().int().positive().max(500).default(50),\n syncSinceMinutes: z\n .number()\n .int()\n .positive()\n .default(60 * 24),\n});\n\nconst SyncEmailThreadsOutput = z.object({\n syncedThreads: z.number().int().nonnegative(),\n lastMessageAt: z.coerce.date().optional(),\n});\n\nexport type SyncEmailThreadsInput = z.infer<typeof SyncEmailThreadsInput>;\nexport type SyncEmailThreadsOutput = z.infer<typeof SyncEmailThreadsOutput>;\n\nexport const syncEmailThreadsContract: ContractSpec<\n SyncEmailThreadsInput,\n SyncEmailThreadsOutput\n> = {\n meta: {\n name: 'pfo.email.sync-threads',\n version: 1,\n kind: 'command',\n title: 'Sync Gmail Threads',\n description:\n 'Triggers ingestion of Gmail threads into the operational knowledge space.',\n domain: 'communications',\n owners: [OwnersEnum.PlatformMessaging],\n tags: ['gmail', 'knowledge', TagsEnum.Automation],\n stability: StabilityEnum.Beta,\n },\n io: {\n input: SyncEmailThreadsInput,\n output: SyncEmailThreadsOutput,\n },\n telemetry: {\n events: [\n {\n name: 'pfo.email.synced',\n description: 'Gmail threads synced into knowledge base',\n },\n ],\n },\n};\n\nconst SummaryDispatchInput = z.object({\n summaryId: z.string(),\n recipientEmail: z.string().email(),\n recipientName: z.string().optional(),\n includeVoice: z.boolean().default(false),\n voiceRecipient: z.string().optional(),\n});\n\nconst SummaryDispatchOutput = z.object({\n dispatchId: z.string(),\n emailSent: z.boolean(),\n voiceUrl: z.string().optional(),\n});\n\nexport type SummaryDispatchInput = z.infer<typeof SummaryDispatchInput>;\nexport type SummaryDispatchOutput = z.infer<typeof SummaryDispatchOutput>;\n\nexport const dispatchFinancialSummaryContract: ContractSpec<\n SummaryDispatchInput,\n SummaryDispatchOutput\n> = {\n meta: {\n name: 'pfo.summary.dispatch',\n version: 1,\n kind: 'command',\n title: 'Dispatch Financial Summary',\n description:\n 'Delivers the generated summary via email and optionally synthesises a voice note.',\n domain: 'finance',\n owners: [OwnersEnum.PlatformMessaging],\n tags: ['summary', 'communications', TagsEnum.Automation],\n stability: StabilityEnum.Experimental,\n },\n io: {\n input: SummaryDispatchInput,\n output: SummaryDispatchOutput,\n },\n policy: {\n auth: {\n scopes: ['summary:dispatch'],\n },\n },\n telemetry: {\n events: [\n {\n name: 'pfo.summary.dispatched',\n description: 'Financial summary delivered to designated recipients',\n },\n ],\n },\n};\n\nconst OpenBankingOverviewInput = z.object({\n tenantId: z.string().min(1),\n accountIds: z.array(z.string().min(1)).optional(),\n period: z.enum(['week', 'month', 'quarter']).default('month'),\n asOf: z.coerce.date().optional(),\n includeCategories: z.boolean().default(true),\n includeCashflowTrend: z.boolean().default(true),\n});\n\nconst OpenBankingOverviewOutput = z.object({\n knowledgeEntryId: z.string(),\n periodStart: z.coerce.date(),\n periodEnd: z.coerce.date(),\n generatedAt: z.coerce.date(),\n summaryPath: z.string().optional(),\n});\n\nexport type OpenBankingOverviewInput = z.infer<typeof OpenBankingOverviewInput>;\nexport type OpenBankingOverviewOutput = z.infer<\n typeof OpenBankingOverviewOutput\n>;\n\nexport const generateOpenBankingOverviewContract: ContractSpec<\n OpenBankingOverviewInput,\n OpenBankingOverviewOutput\n> = {\n meta: {\n name: 'pfo.openbanking.generate-overview',\n version: 1,\n kind: 'command',\n title: 'Generate Open Banking Overview',\n description:\n 'Aggregates balances and transactions into a derived financial overview stored in the knowledge layer.',\n domain: 'finance',\n owners: [OwnersEnum.PlatformFinance],\n tags: ['open-banking', 'summary', TagsEnum.Automation],\n stability: StabilityEnum.Experimental,\n },\n io: {\n input: OpenBankingOverviewInput,\n output: OpenBankingOverviewOutput,\n },\n policy: {\n auth: {\n scopes: ['openbanking:derive'],\n },\n },\n telemetry: {\n events: [\n {\n name: OPENBANKING_TELEMETRY_EVENTS.overviewGenerated,\n description:\n 'Derived financial overview generated from Powens banking data.',\n },\n ],\n },\n};\n\nexport const pocketFamilyOfficeContracts: Record<\n string,\n ContractSpec<any, any>\n> = {\n 'pfo.documents.upload': uploadDocumentContract,\n 'pfo.reminders.schedule-payment': schedulePaymentReminderContract,\n 'pfo.summary.generate': generateFinancialSummaryContract,\n 'pfo.summary.dispatch': dispatchFinancialSummaryContract,\n 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W,EACT,QAAQ,CACN;EACE,MAAM,6BAA6B;EACnC,aACE;EACH,CACF,EACF;CACF;AAED,MAAaC,8BAGT;CACF,wBAAwB;CACxB,kCAAkC;CAClC,wBAAwB;CACxB,wBAAwB;CACxB,0BAA0B;CAC1B,qCAAqC;CACtC"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
//#region src/knowledge/sources.sample.ts
|
|
2
|
-
const now = /* @__PURE__ */ new Date();
|
|
3
|
-
const pocketFamilyOfficeKnowledgeSources = [{
|
|
4
|
-
meta: {
|
|
5
|
-
id: "source-financial-uploads",
|
|
6
|
-
tenantId: "tenant.family-office",
|
|
7
|
-
spaceKey: "knowledge.financial-docs",
|
|
8
|
-
spaceVersion: 1,
|
|
9
|
-
label: "Uploaded Financial Documents",
|
|
10
|
-
sourceType: "file_upload",
|
|
11
|
-
createdAt: now,
|
|
12
|
-
updatedAt: now
|
|
13
|
-
},
|
|
14
|
-
config: {
|
|
15
|
-
bucket: "pfo-uploads",
|
|
16
|
-
prefix: "financial-docs/"
|
|
17
|
-
},
|
|
18
|
-
syncSchedule: {
|
|
19
|
-
enabled: true,
|
|
20
|
-
intervalMs: 900 * 1e3
|
|
21
|
-
},
|
|
22
|
-
lastSync: {
|
|
23
|
-
timestamp: now,
|
|
24
|
-
success: true
|
|
25
|
-
}
|
|
26
|
-
}, {
|
|
27
|
-
meta: {
|
|
28
|
-
id: "source-gmail-threads",
|
|
29
|
-
tenantId: "tenant.family-office",
|
|
30
|
-
spaceKey: "knowledge.email-threads",
|
|
31
|
-
spaceVersion: 1,
|
|
32
|
-
label: "Household Gmail Threads",
|
|
33
|
-
sourceType: "email",
|
|
34
|
-
createdAt: now,
|
|
35
|
-
updatedAt: now
|
|
36
|
-
},
|
|
37
|
-
config: { labelIds: ["INBOX", "FINANCE"] },
|
|
38
|
-
syncSchedule: {
|
|
39
|
-
enabled: true,
|
|
40
|
-
intervalMs: 300 * 1e3
|
|
41
|
-
},
|
|
42
|
-
lastSync: {
|
|
43
|
-
timestamp: now,
|
|
44
|
-
success: true
|
|
45
|
-
}
|
|
46
|
-
}];
|
|
47
|
-
|
|
48
|
-
//#endregion
|
|
49
|
-
export { pocketFamilyOfficeKnowledgeSources };
|
|
50
|
-
//# sourceMappingURL=sources.sample.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sources.sample.js","names":["pocketFamilyOfficeKnowledgeSources: KnowledgeSourceConfig[]"],"sources":["../../src/knowledge/sources.sample.ts"],"sourcesContent":["import type { KnowledgeSourceConfig } from '@lssm/lib.contracts/knowledge/source';\n\nconst now = new Date();\n\nexport const pocketFamilyOfficeKnowledgeSources: KnowledgeSourceConfig[] = [\n {\n meta: {\n id: 'source-financial-uploads',\n tenantId: 'tenant.family-office',\n spaceKey: 'knowledge.financial-docs',\n spaceVersion: 1,\n label: 'Uploaded Financial Documents',\n sourceType: 'file_upload',\n createdAt: now,\n updatedAt: now,\n },\n config: {\n bucket: 'pfo-uploads',\n prefix: 'financial-docs/',\n },\n syncSchedule: {\n enabled: true,\n intervalMs: 15 * 60 * 1000,\n },\n lastSync: {\n timestamp: now,\n success: true,\n },\n },\n {\n meta: {\n id: 'source-gmail-threads',\n tenantId: 'tenant.family-office',\n spaceKey: 'knowledge.email-threads',\n spaceVersion: 1,\n label: 'Household Gmail Threads',\n sourceType: 'email',\n createdAt: now,\n updatedAt: now,\n },\n config: {\n labelIds: ['INBOX', 'FINANCE'],\n },\n syncSchedule: {\n enabled: true,\n intervalMs: 5 * 60 * 1000,\n },\n lastSync: {\n timestamp: now,\n success: true,\n },\n },\n];\n"],"mappings":";AAEA,MAAM,sBAAM,IAAI,MAAM;AAEtB,MAAaA,qCAA8D,CACzE;CACE,MAAM;EACJ,IAAI;EACJ,UAAU;EACV,UAAU;EACV,cAAc;EACd,OAAO;EACP,YAAY;EACZ,WAAW;EACX,WAAW;EACZ;CACD,QAAQ;EACN,QAAQ;EACR,QAAQ;EACT;CACD,cAAc;EACZ,SAAS;EACT,YAAY,MAAU;EACvB;CACD,UAAU;EACR,WAAW;EACX,SAAS;EACV;CACF,EACD;CACE,MAAM;EACJ,IAAI;EACJ,UAAU;EACV,UAAU;EACV,cAAc;EACd,OAAO;EACP,YAAY;EACZ,WAAW;EACX,WAAW;EACZ;CACD,QAAQ,EACN,UAAU,CAAC,SAAS,UAAU,EAC/B;CACD,cAAc;EACZ,SAAS;EACT,YAAY,MAAS;EACtB;CACD,UAAU;EACR,WAAW;EACX,SAAS;EACV;CACF,CACF"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import "./providers/stripe.js";
|
|
2
|
-
import "./providers/postmark.js";
|
|
3
|
-
import "./providers/qdrant.js";
|
|
4
|
-
import "./providers/mistral.js";
|
|
5
|
-
import "./providers/elevenlabs.js";
|
|
6
|
-
import "./providers/gmail.js";
|
|
7
|
-
import "./providers/google-calendar.js";
|
|
8
|
-
import "./providers/twilio-sms.js";
|
|
9
|
-
import "./providers/gcs-storage.js";
|
|
10
|
-
import "./providers/powens.js";
|
|
11
|
-
import "./providers/registry.js";
|
|
12
|
-
import "./providers/index.js";
|
|
13
|
-
import { AccountBalanceRecord, BankAccountRecord, BankTransactionRecord } from "./openbanking/models.js";
|
|
14
|
-
import { OPENBANKING_PII_FIELDS, OPENBANKING_TELEMETRY_EVENTS } from "./openbanking/telemetry.js";
|
|
15
|
-
import "./openbanking/contracts/accounts.js";
|
|
16
|
-
import "./openbanking/contracts/transactions.js";
|
|
17
|
-
import "./openbanking/contracts/balances.js";
|
|
18
|
-
import "./openbanking/contracts/index.js";
|