@lssm/example.pocket-family-office 0.0.0-canary-20251217080011 → 1.41.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/package.json +22 -23
- package/dist/blueprint.d.ts +0 -7
- package/dist/blueprint.js +0 -200
- package/dist/connections/samples.d.ts +0 -7
- package/dist/connections/samples.js +0 -226
- package/dist/contracts/index.d.ts +0 -118
- package/dist/contracts/index.js +0 -270
- package/dist/index.d.ts +0 -16
- package/dist/index.js +0 -18
- package/dist/knowledge/sources.sample.d.ts +0 -6
- package/dist/knowledge/sources.sample.js +0 -49
- package/dist/libs/contracts/dist/integrations/index.js +0 -18
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +0 -228
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +0 -159
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +0 -3
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +0 -210
- package/dist/libs/contracts/dist/integrations/openbanking/models.js +0 -242
- package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +0 -25
- package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +0 -52
- package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +0 -75
- package/dist/libs/contracts/dist/integrations/providers/gmail.js +0 -87
- package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +0 -66
- package/dist/libs/contracts/dist/integrations/providers/index.js +0 -11
- package/dist/libs/contracts/dist/integrations/providers/mistral.js +0 -68
- package/dist/libs/contracts/dist/integrations/providers/postmark.js +0 -68
- package/dist/libs/contracts/dist/integrations/providers/powens.js +0 -116
- package/dist/libs/contracts/dist/integrations/providers/qdrant.js +0 -73
- package/dist/libs/contracts/dist/integrations/providers/registry.js +0 -10
- package/dist/libs/contracts/dist/integrations/providers/stripe.js +0 -83
- package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +0 -61
- package/dist/libs/contracts/dist/ownership.js +0 -38
- package/dist/libs/contracts/dist/schema/dist/EnumType.js +0 -2
- package/dist/libs/contracts/dist/schema/dist/FieldType.js +0 -49
- package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +0 -236
- package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +0 -34
- package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +0 -1
- package/dist/libs/contracts/dist/schema/dist/entity/index.js +0 -2
- package/dist/libs/contracts/dist/schema/dist/entity/types.js +0 -1
- package/dist/libs/contracts/dist/schema/dist/index.js +0 -6
- package/dist/libs/contracts/dist/spec.js +0 -34
- package/dist/pocket-family-office.feature.d.ts +0 -11
- package/dist/pocket-family-office.feature.js +0 -46
- package/dist/telemetry.d.ts +0 -7
- package/dist/telemetry.js +0 -170
- package/dist/tenant.sample.d.ts +0 -6
- package/dist/tenant.sample.js +0 -89
- package/dist/workflows/generate-financial-summary.d.ts +0 -6
- package/dist/workflows/generate-financial-summary.js +0 -60
- package/dist/workflows/generate-openbanking-overview.d.ts +0 -6
- package/dist/workflows/generate-openbanking-overview.js +0 -57
- package/dist/workflows/index.d.ts +0 -9
- package/dist/workflows/index.js +0 -10
- package/dist/workflows/ingest-email-threads.d.ts +0 -6
- package/dist/workflows/ingest-email-threads.js +0 -52
- package/dist/workflows/process-uploaded-document.d.ts +0 -6
- package/dist/workflows/process-uploaded-document.js +0 -50
- package/dist/workflows/refresh-openbanking-balances.d.ts +0 -6
- package/dist/workflows/refresh-openbanking-balances.js +0 -66
- package/dist/workflows/sync-openbanking-accounts.d.ts +0 -6
- package/dist/workflows/sync-openbanking-accounts.js +0 -66
- package/dist/workflows/sync-openbanking-transactions.d.ts +0 -6
- package/dist/workflows/sync-openbanking-transactions.js +0 -66
- package/dist/workflows/upcoming-payments-reminder.d.ts +0 -6
- package/dist/workflows/upcoming-payments-reminder.js +0 -55
package/dist/contracts/index.js
DELETED
|
@@ -1,270 +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 };
|
package/dist/index.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { pocketFamilyOfficeBlueprint, registerPocketFamilyOfficeBlueprint } from "./blueprint.js";
|
|
2
|
-
import { getPocketFamilyOfficeConnection, pocketFamilyOfficeConnections } from "./connections/samples.js";
|
|
3
|
-
import { FinancialSummaryInput, FinancialSummaryOutput, OpenBankingOverviewInput, OpenBankingOverviewOutput, PaymentReminderInput, PaymentReminderOutput, SummaryDispatchInput, SummaryDispatchOutput, SyncEmailThreadsInput, SyncEmailThreadsOutput, UploadDocumentInput, UploadDocumentOutput, dispatchFinancialSummaryContract, generateFinancialSummaryContract, generateOpenBankingOverviewContract, pocketFamilyOfficeContracts, schedulePaymentReminderContract, syncEmailThreadsContract, uploadDocumentContract } from "./contracts/index.js";
|
|
4
|
-
import { pocketFamilyOfficeTenantSample } from "./tenant.sample.js";
|
|
5
|
-
import { pocketFamilyOfficeKnowledgeSources } from "./knowledge/sources.sample.js";
|
|
6
|
-
import { processUploadedDocumentWorkflow } from "./workflows/process-uploaded-document.js";
|
|
7
|
-
import { upcomingPaymentsReminderWorkflow } from "./workflows/upcoming-payments-reminder.js";
|
|
8
|
-
import { generateFinancialSummaryWorkflow } from "./workflows/generate-financial-summary.js";
|
|
9
|
-
import { ingestEmailThreadsWorkflow } from "./workflows/ingest-email-threads.js";
|
|
10
|
-
import { syncOpenBankingAccountsWorkflow } from "./workflows/sync-openbanking-accounts.js";
|
|
11
|
-
import { syncOpenBankingTransactionsWorkflow } from "./workflows/sync-openbanking-transactions.js";
|
|
12
|
-
import { refreshOpenBankingBalancesWorkflow } from "./workflows/refresh-openbanking-balances.js";
|
|
13
|
-
import { generateOpenBankingOverviewWorkflow } from "./workflows/generate-openbanking-overview.js";
|
|
14
|
-
import { OPENBANKING_SENSITIVE_FIELDS, pocketFamilyOfficeTelemetry } from "./telemetry.js";
|
|
15
|
-
import { PocketFamilyOfficeFeature } from "./pocket-family-office.feature.js";
|
|
16
|
-
export { FinancialSummaryInput, FinancialSummaryOutput, OPENBANKING_SENSITIVE_FIELDS, OpenBankingOverviewInput, OpenBankingOverviewOutput, PaymentReminderInput, PaymentReminderOutput, PocketFamilyOfficeFeature, SummaryDispatchInput, SummaryDispatchOutput, SyncEmailThreadsInput, SyncEmailThreadsOutput, UploadDocumentInput, UploadDocumentOutput, dispatchFinancialSummaryContract, generateFinancialSummaryContract, generateFinancialSummaryWorkflow, generateOpenBankingOverviewContract, generateOpenBankingOverviewWorkflow, getPocketFamilyOfficeConnection, ingestEmailThreadsWorkflow, pocketFamilyOfficeBlueprint, pocketFamilyOfficeConnections, pocketFamilyOfficeContracts, pocketFamilyOfficeKnowledgeSources, pocketFamilyOfficeTelemetry, pocketFamilyOfficeTenantSample, processUploadedDocumentWorkflow, refreshOpenBankingBalancesWorkflow, registerPocketFamilyOfficeBlueprint, schedulePaymentReminderContract, syncEmailThreadsContract, syncOpenBankingAccountsWorkflow, syncOpenBankingTransactionsWorkflow, upcomingPaymentsReminderWorkflow, uploadDocumentContract };
|
package/dist/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { pocketFamilyOfficeBlueprint, registerPocketFamilyOfficeBlueprint } from "./blueprint.js";
|
|
2
|
-
import { pocketFamilyOfficeTenantSample } from "./tenant.sample.js";
|
|
3
|
-
import { getPocketFamilyOfficeConnection, pocketFamilyOfficeConnections } from "./connections/samples.js";
|
|
4
|
-
import { pocketFamilyOfficeKnowledgeSources } from "./knowledge/sources.sample.js";
|
|
5
|
-
import { dispatchFinancialSummaryContract, generateFinancialSummaryContract, generateOpenBankingOverviewContract, pocketFamilyOfficeContracts, schedulePaymentReminderContract, syncEmailThreadsContract, uploadDocumentContract } from "./contracts/index.js";
|
|
6
|
-
import { processUploadedDocumentWorkflow } from "./workflows/process-uploaded-document.js";
|
|
7
|
-
import { upcomingPaymentsReminderWorkflow } from "./workflows/upcoming-payments-reminder.js";
|
|
8
|
-
import { generateFinancialSummaryWorkflow } from "./workflows/generate-financial-summary.js";
|
|
9
|
-
import { ingestEmailThreadsWorkflow } from "./workflows/ingest-email-threads.js";
|
|
10
|
-
import { syncOpenBankingAccountsWorkflow } from "./workflows/sync-openbanking-accounts.js";
|
|
11
|
-
import { syncOpenBankingTransactionsWorkflow } from "./workflows/sync-openbanking-transactions.js";
|
|
12
|
-
import { refreshOpenBankingBalancesWorkflow } from "./workflows/refresh-openbanking-balances.js";
|
|
13
|
-
import { generateOpenBankingOverviewWorkflow } from "./workflows/generate-openbanking-overview.js";
|
|
14
|
-
import "./workflows/index.js";
|
|
15
|
-
import { OPENBANKING_SENSITIVE_FIELDS, pocketFamilyOfficeTelemetry } from "./telemetry.js";
|
|
16
|
-
import { PocketFamilyOfficeFeature } from "./pocket-family-office.feature.js";
|
|
17
|
-
|
|
18
|
-
export { OPENBANKING_SENSITIVE_FIELDS, PocketFamilyOfficeFeature, dispatchFinancialSummaryContract, generateFinancialSummaryContract, generateFinancialSummaryWorkflow, generateOpenBankingOverviewContract, generateOpenBankingOverviewWorkflow, getPocketFamilyOfficeConnection, ingestEmailThreadsWorkflow, pocketFamilyOfficeBlueprint, pocketFamilyOfficeConnections, pocketFamilyOfficeContracts, pocketFamilyOfficeKnowledgeSources, pocketFamilyOfficeTelemetry, pocketFamilyOfficeTenantSample, processUploadedDocumentWorkflow, refreshOpenBankingBalancesWorkflow, registerPocketFamilyOfficeBlueprint, schedulePaymentReminderContract, syncEmailThreadsContract, syncOpenBankingAccountsWorkflow, syncOpenBankingTransactionsWorkflow, upcomingPaymentsReminderWorkflow, uploadDocumentContract };
|
|
@@ -1,49 +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 };
|
|
@@ -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";
|
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
import { ScalarTypeEnum } from "../../../schema/dist/ScalarTypeEnum.js";
|
|
2
|
-
import { SchemaModel } from "../../../schema/dist/SchemaModel.js";
|
|
3
|
-
import "../../../schema/dist/index.js";
|
|
4
|
-
import { BankAccountRecord } from "../models.js";
|
|
5
|
-
import { OPENBANKING_TELEMETRY_EVENTS } from "../telemetry.js";
|
|
6
|
-
import { defineCommand, defineQuery } from "../../../spec.js";
|
|
7
|
-
|
|
8
|
-
//#region ../../libs/contracts/dist/integrations/openbanking/contracts/accounts.js
|
|
9
|
-
const OpenBankingListAccountsInput = new SchemaModel({
|
|
10
|
-
name: "OpenBankingListAccountsInput",
|
|
11
|
-
description: "Parameters for listing bank accounts through the open banking provider.",
|
|
12
|
-
fields: {
|
|
13
|
-
tenantId: {
|
|
14
|
-
type: ScalarTypeEnum.ID(),
|
|
15
|
-
isOptional: false
|
|
16
|
-
},
|
|
17
|
-
userId: {
|
|
18
|
-
type: ScalarTypeEnum.ID(),
|
|
19
|
-
isOptional: false
|
|
20
|
-
},
|
|
21
|
-
connectionId: {
|
|
22
|
-
type: ScalarTypeEnum.ID(),
|
|
23
|
-
isOptional: true
|
|
24
|
-
},
|
|
25
|
-
includeBalances: {
|
|
26
|
-
type: ScalarTypeEnum.Boolean(),
|
|
27
|
-
isOptional: true
|
|
28
|
-
},
|
|
29
|
-
institutionId: {
|
|
30
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
31
|
-
isOptional: true
|
|
32
|
-
},
|
|
33
|
-
cursor: {
|
|
34
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
35
|
-
isOptional: true
|
|
36
|
-
},
|
|
37
|
-
pageSize: {
|
|
38
|
-
type: ScalarTypeEnum.Int_unsecure(),
|
|
39
|
-
isOptional: true
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
const OpenBankingListAccountsOutput = new SchemaModel({
|
|
44
|
-
name: "OpenBankingListAccountsOutput",
|
|
45
|
-
description: "Paginated list of bank accounts available to the tenant and user.",
|
|
46
|
-
fields: {
|
|
47
|
-
accounts: {
|
|
48
|
-
type: BankAccountRecord,
|
|
49
|
-
isOptional: false,
|
|
50
|
-
isArray: true
|
|
51
|
-
},
|
|
52
|
-
nextCursor: {
|
|
53
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
54
|
-
isOptional: true
|
|
55
|
-
},
|
|
56
|
-
hasMore: {
|
|
57
|
-
type: ScalarTypeEnum.Boolean(),
|
|
58
|
-
isOptional: true
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
const OpenBankingGetAccountInput = new SchemaModel({
|
|
63
|
-
name: "OpenBankingGetAccountInput",
|
|
64
|
-
description: "Parameters for retrieving a specific bank account.",
|
|
65
|
-
fields: {
|
|
66
|
-
tenantId: {
|
|
67
|
-
type: ScalarTypeEnum.ID(),
|
|
68
|
-
isOptional: false
|
|
69
|
-
},
|
|
70
|
-
accountId: {
|
|
71
|
-
type: ScalarTypeEnum.ID(),
|
|
72
|
-
isOptional: false
|
|
73
|
-
},
|
|
74
|
-
includeBalances: {
|
|
75
|
-
type: ScalarTypeEnum.Boolean(),
|
|
76
|
-
isOptional: true
|
|
77
|
-
},
|
|
78
|
-
includeLatestTransactions: {
|
|
79
|
-
type: ScalarTypeEnum.Boolean(),
|
|
80
|
-
isOptional: true
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
const OpenBankingSyncAccountsInput = new SchemaModel({
|
|
85
|
-
name: "OpenBankingSyncAccountsInput",
|
|
86
|
-
description: "Command payload to trigger an account synchronisation against the open banking provider.",
|
|
87
|
-
fields: {
|
|
88
|
-
tenantId: {
|
|
89
|
-
type: ScalarTypeEnum.ID(),
|
|
90
|
-
isOptional: false
|
|
91
|
-
},
|
|
92
|
-
userId: {
|
|
93
|
-
type: ScalarTypeEnum.ID(),
|
|
94
|
-
isOptional: true
|
|
95
|
-
},
|
|
96
|
-
connectionId: {
|
|
97
|
-
type: ScalarTypeEnum.ID(),
|
|
98
|
-
isOptional: false
|
|
99
|
-
},
|
|
100
|
-
accountIds: {
|
|
101
|
-
type: ScalarTypeEnum.ID(),
|
|
102
|
-
isArray: true,
|
|
103
|
-
isOptional: true
|
|
104
|
-
},
|
|
105
|
-
forceFullRefresh: {
|
|
106
|
-
type: ScalarTypeEnum.Boolean(),
|
|
107
|
-
isOptional: true
|
|
108
|
-
},
|
|
109
|
-
triggerWorkflows: {
|
|
110
|
-
type: ScalarTypeEnum.Boolean(),
|
|
111
|
-
isOptional: true
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
const OpenBankingSyncAccountsOutput = new SchemaModel({
|
|
116
|
-
name: "OpenBankingSyncAccountsOutput",
|
|
117
|
-
description: "Result of a bank account synchronisation run.",
|
|
118
|
-
fields: {
|
|
119
|
-
synced: {
|
|
120
|
-
type: ScalarTypeEnum.Int_unsecure(),
|
|
121
|
-
isOptional: false
|
|
122
|
-
},
|
|
123
|
-
failed: {
|
|
124
|
-
type: ScalarTypeEnum.Int_unsecure(),
|
|
125
|
-
isOptional: false
|
|
126
|
-
},
|
|
127
|
-
errors: {
|
|
128
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
129
|
-
isArray: true,
|
|
130
|
-
isOptional: true
|
|
131
|
-
},
|
|
132
|
-
nextSyncSuggestedAt: {
|
|
133
|
-
type: ScalarTypeEnum.DateTime(),
|
|
134
|
-
isOptional: true
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
const OpenBankingListAccounts = defineQuery({
|
|
139
|
-
meta: {
|
|
140
|
-
name: "openbanking.accounts.list",
|
|
141
|
-
version: 1,
|
|
142
|
-
description: "List bank accounts available to a tenant/user via Powens Open Banking.",
|
|
143
|
-
goal: "Provide downstream workflows with the set of accounts accessible via the configured open banking connection.",
|
|
144
|
-
context: "Used by Pocket Family Office dashboards and sync workflows to enumerate bank accounts prior to syncing balances or transactions.",
|
|
145
|
-
owners: ["platform.finance"],
|
|
146
|
-
tags: [
|
|
147
|
-
"open-banking",
|
|
148
|
-
"powens",
|
|
149
|
-
"accounts"
|
|
150
|
-
],
|
|
151
|
-
stability: "experimental"
|
|
152
|
-
},
|
|
153
|
-
io: {
|
|
154
|
-
input: OpenBankingListAccountsInput,
|
|
155
|
-
output: OpenBankingListAccountsOutput
|
|
156
|
-
},
|
|
157
|
-
policy: { auth: "user" }
|
|
158
|
-
});
|
|
159
|
-
const OpenBankingGetAccount = defineQuery({
|
|
160
|
-
meta: {
|
|
161
|
-
name: "openbanking.accounts.get",
|
|
162
|
-
version: 1,
|
|
163
|
-
description: "Retrieve the canonical bank account record for the given account identifier.",
|
|
164
|
-
goal: "Allow user-facing experiences and automations to display up-to-date account metadata.",
|
|
165
|
-
context: "Invoked by UI surfaces and workflow automation steps that require detailed metadata for a specific bank account.",
|
|
166
|
-
owners: ["platform.finance"],
|
|
167
|
-
tags: [
|
|
168
|
-
"open-banking",
|
|
169
|
-
"powens",
|
|
170
|
-
"accounts"
|
|
171
|
-
],
|
|
172
|
-
stability: "experimental"
|
|
173
|
-
},
|
|
174
|
-
io: {
|
|
175
|
-
input: OpenBankingGetAccountInput,
|
|
176
|
-
output: BankAccountRecord
|
|
177
|
-
},
|
|
178
|
-
policy: { auth: "user" }
|
|
179
|
-
});
|
|
180
|
-
const OpenBankingSyncAccounts = defineCommand({
|
|
181
|
-
meta: {
|
|
182
|
-
name: "openbanking.accounts.sync",
|
|
183
|
-
version: 1,
|
|
184
|
-
description: "Initiate a synchronisation run to refresh bank account metadata from Powens.",
|
|
185
|
-
goal: "Keep canonical bank account records aligned with the external open banking provider.",
|
|
186
|
-
context: "Triggered by scheduled workflows or manual operator actions to reconcile account metadata prior to transaction/balance syncs.",
|
|
187
|
-
owners: ["platform.finance"],
|
|
188
|
-
tags: [
|
|
189
|
-
"open-banking",
|
|
190
|
-
"powens",
|
|
191
|
-
"accounts"
|
|
192
|
-
],
|
|
193
|
-
stability: "experimental"
|
|
194
|
-
},
|
|
195
|
-
io: {
|
|
196
|
-
input: OpenBankingSyncAccountsInput,
|
|
197
|
-
output: OpenBankingSyncAccountsOutput
|
|
198
|
-
},
|
|
199
|
-
policy: { auth: "admin" },
|
|
200
|
-
telemetry: {
|
|
201
|
-
success: {
|
|
202
|
-
event: { name: OPENBANKING_TELEMETRY_EVENTS.accountsSynced },
|
|
203
|
-
properties: ({ input, output }) => {
|
|
204
|
-
const payload = input;
|
|
205
|
-
const result = output;
|
|
206
|
-
return {
|
|
207
|
-
tenantId: payload?.tenantId,
|
|
208
|
-
connectionId: payload?.connectionId,
|
|
209
|
-
synced: result?.synced,
|
|
210
|
-
failed: result?.failed
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
},
|
|
214
|
-
failure: {
|
|
215
|
-
event: { name: OPENBANKING_TELEMETRY_EVENTS.accountsSyncFailed },
|
|
216
|
-
properties: ({ input, error }) => {
|
|
217
|
-
const payload = input;
|
|
218
|
-
return {
|
|
219
|
-
tenantId: payload?.tenantId,
|
|
220
|
-
connectionId: payload?.connectionId,
|
|
221
|
-
error: error instanceof Error ? error.message : String(error ?? "unknown")
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
});
|
|
227
|
-
|
|
228
|
-
//#endregion
|