@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/telemetry.js
DELETED
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import { OwnersEnum, StabilityEnum, TagsEnum } from "./libs/contracts/dist/ownership.js";
|
|
2
|
-
import { OPENBANKING_PII_FIELDS, OPENBANKING_TELEMETRY_EVENTS } from "./libs/contracts/dist/integrations/openbanking/telemetry.js";
|
|
3
|
-
import "./libs/contracts/dist/integrations/index.js";
|
|
4
|
-
|
|
5
|
-
//#region src/telemetry.ts
|
|
6
|
-
const commonProperties = {
|
|
7
|
-
tenantId: {
|
|
8
|
-
type: "string",
|
|
9
|
-
required: true,
|
|
10
|
-
description: "Tenant identifier for multi-tenant isolation."
|
|
11
|
-
},
|
|
12
|
-
appId: {
|
|
13
|
-
type: "string",
|
|
14
|
-
required: true,
|
|
15
|
-
description: "Application identifier associated with the event."
|
|
16
|
-
},
|
|
17
|
-
blueprint: {
|
|
18
|
-
type: "string",
|
|
19
|
-
required: true,
|
|
20
|
-
description: "Blueprint name@version emitting the telemetry."
|
|
21
|
-
},
|
|
22
|
-
configVersion: {
|
|
23
|
-
type: "number",
|
|
24
|
-
required: true,
|
|
25
|
-
description: "Resolved app config version when the event was generated."
|
|
26
|
-
},
|
|
27
|
-
slotId: {
|
|
28
|
-
type: "string",
|
|
29
|
-
required: true,
|
|
30
|
-
description: "Integration slot identifier (e.g., primaryOpenBanking)."
|
|
31
|
-
},
|
|
32
|
-
connectionId: {
|
|
33
|
-
type: "string",
|
|
34
|
-
required: true,
|
|
35
|
-
description: "Integration connection ID used for the sync."
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
function piiSafeString(description) {
|
|
39
|
-
return {
|
|
40
|
-
type: "string",
|
|
41
|
-
description,
|
|
42
|
-
pii: false
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
const pocketFamilyOfficeTelemetry = {
|
|
46
|
-
meta: {
|
|
47
|
-
name: "pfo.telemetry",
|
|
48
|
-
version: 1,
|
|
49
|
-
title: "Pocket Family Office Telemetry",
|
|
50
|
-
description: "Operational telemetry for Pocket Family Office workflows, including Powens open banking syncs.",
|
|
51
|
-
domain: "finance",
|
|
52
|
-
owners: [OwnersEnum.PlatformFinance],
|
|
53
|
-
tags: ["open-banking", TagsEnum.Automation],
|
|
54
|
-
stability: StabilityEnum.Experimental
|
|
55
|
-
},
|
|
56
|
-
config: {
|
|
57
|
-
defaultRetentionDays: 180,
|
|
58
|
-
defaultSamplingRate: 1
|
|
59
|
-
},
|
|
60
|
-
events: [
|
|
61
|
-
{
|
|
62
|
-
name: OPENBANKING_TELEMETRY_EVENTS.accountsSynced,
|
|
63
|
-
version: 1,
|
|
64
|
-
semantics: {
|
|
65
|
-
what: "Open banking account synchronisation completed.",
|
|
66
|
-
why: "Refresh canonical account metadata for reporting and workflows."
|
|
67
|
-
},
|
|
68
|
-
privacy: "internal",
|
|
69
|
-
properties: {
|
|
70
|
-
...commonProperties,
|
|
71
|
-
syncedCount: {
|
|
72
|
-
type: "number",
|
|
73
|
-
description: "Number of accounts synced successfully."
|
|
74
|
-
},
|
|
75
|
-
failedCount: {
|
|
76
|
-
type: "number",
|
|
77
|
-
description: "Number of accounts that failed to sync."
|
|
78
|
-
},
|
|
79
|
-
durationMs: {
|
|
80
|
-
type: "number",
|
|
81
|
-
description: "Duration of the sync job in milliseconds."
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
name: OPENBANKING_TELEMETRY_EVENTS.transactionsSynced,
|
|
87
|
-
version: 1,
|
|
88
|
-
semantics: {
|
|
89
|
-
what: "Open banking transaction synchronisation completed.",
|
|
90
|
-
why: "Keep canonical transaction ledger in sync for analytics."
|
|
91
|
-
},
|
|
92
|
-
privacy: "internal",
|
|
93
|
-
properties: {
|
|
94
|
-
...commonProperties,
|
|
95
|
-
accountId: {
|
|
96
|
-
type: "string",
|
|
97
|
-
description: "Bank account identifier used during the sync.",
|
|
98
|
-
pii: false
|
|
99
|
-
},
|
|
100
|
-
syncedCount: {
|
|
101
|
-
type: "number",
|
|
102
|
-
description: "Number of transactions synced successfully."
|
|
103
|
-
},
|
|
104
|
-
failedCount: {
|
|
105
|
-
type: "number",
|
|
106
|
-
description: "Number of transactions that failed to sync."
|
|
107
|
-
},
|
|
108
|
-
from: {
|
|
109
|
-
type: "timestamp",
|
|
110
|
-
description: "Start timestamp for the sync window."
|
|
111
|
-
},
|
|
112
|
-
to: {
|
|
113
|
-
type: "timestamp",
|
|
114
|
-
description: "End timestamp for the sync window."
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
name: OPENBANKING_TELEMETRY_EVENTS.balancesRefreshed,
|
|
120
|
-
version: 1,
|
|
121
|
-
semantics: {
|
|
122
|
-
what: "Open banking balances refreshed.",
|
|
123
|
-
why: "Provide accurate cash position for dashboards and alerts."
|
|
124
|
-
},
|
|
125
|
-
privacy: "internal",
|
|
126
|
-
properties: {
|
|
127
|
-
...commonProperties,
|
|
128
|
-
accountId: piiSafeString("Bank account identifier."),
|
|
129
|
-
balanceTypes: {
|
|
130
|
-
type: "json",
|
|
131
|
-
description: "Balance types included in the refresh."
|
|
132
|
-
},
|
|
133
|
-
refreshedAt: {
|
|
134
|
-
type: "timestamp",
|
|
135
|
-
description: "Timestamp when balances were refreshed."
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
name: OPENBANKING_TELEMETRY_EVENTS.overviewGenerated,
|
|
141
|
-
version: 1,
|
|
142
|
-
semantics: {
|
|
143
|
-
what: "Derived financial overview generated.",
|
|
144
|
-
why: "Persist cashflow and category summaries into knowledge space."
|
|
145
|
-
},
|
|
146
|
-
privacy: "internal",
|
|
147
|
-
properties: {
|
|
148
|
-
...commonProperties,
|
|
149
|
-
knowledgeEntryId: piiSafeString("Identifier of the knowledge document containing the overview."),
|
|
150
|
-
period: {
|
|
151
|
-
type: "string",
|
|
152
|
-
description: "Aggregation period used (week, month, quarter)."
|
|
153
|
-
},
|
|
154
|
-
periodStart: {
|
|
155
|
-
type: "timestamp",
|
|
156
|
-
description: "Start timestamp for the aggregation window."
|
|
157
|
-
},
|
|
158
|
-
periodEnd: {
|
|
159
|
-
type: "timestamp",
|
|
160
|
-
description: "End timestamp for the aggregation window."
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
tags: ["knowledge", "analytics"]
|
|
164
|
-
}
|
|
165
|
-
]
|
|
166
|
-
};
|
|
167
|
-
const OPENBANKING_SENSITIVE_FIELDS = OPENBANKING_PII_FIELDS;
|
|
168
|
-
|
|
169
|
-
//#endregion
|
|
170
|
-
export { OPENBANKING_SENSITIVE_FIELDS, pocketFamilyOfficeTelemetry };
|
package/dist/tenant.sample.d.ts
DELETED
package/dist/tenant.sample.js
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
//#region src/tenant.sample.ts
|
|
2
|
-
const pocketFamilyOfficeTenantSample = {
|
|
3
|
-
meta: {
|
|
4
|
-
id: "tenant-pfo-sample",
|
|
5
|
-
tenantId: "tenant.family-office",
|
|
6
|
-
appId: "pocket-family-office",
|
|
7
|
-
blueprintName: "pocket-family-office.app",
|
|
8
|
-
blueprintVersion: 1,
|
|
9
|
-
environment: "production",
|
|
10
|
-
version: 1,
|
|
11
|
-
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
12
|
-
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
13
|
-
},
|
|
14
|
-
featureFlags: [{
|
|
15
|
-
key: "voice-summaries",
|
|
16
|
-
enabled: true,
|
|
17
|
-
description: "Enable spoken ElevenLabs summaries for daily briefings."
|
|
18
|
-
}],
|
|
19
|
-
integrations: [
|
|
20
|
-
{
|
|
21
|
-
slotId: "primaryLLM",
|
|
22
|
-
connectionId: "conn-mistral-primary"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
slotId: "primaryVectorDb",
|
|
26
|
-
connectionId: "conn-qdrant-finance"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
slotId: "primaryStorage",
|
|
30
|
-
connectionId: "conn-gcs-documents"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
slotId: "primaryOpenBanking",
|
|
34
|
-
connectionId: "conn-powens-primary"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
slotId: "emailInbound",
|
|
38
|
-
connectionId: "conn-gmail-threads"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
slotId: "emailOutbound",
|
|
42
|
-
connectionId: "conn-postmark-outbound"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
slotId: "calendarScheduling",
|
|
46
|
-
connectionId: "conn-google-calendar"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
slotId: "voicePlayback",
|
|
50
|
-
connectionId: "conn-elevenlabs-voice"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
slotId: "smsNotifications",
|
|
54
|
-
connectionId: "conn-twilio-sms"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
slotId: "paymentsProcessing",
|
|
58
|
-
connectionId: "conn-stripe-recurring"
|
|
59
|
-
}
|
|
60
|
-
],
|
|
61
|
-
knowledge: [
|
|
62
|
-
{
|
|
63
|
-
spaceKey: "knowledge.financial-docs",
|
|
64
|
-
scope: { workflows: ["pfo.workflow.process-uploaded-document", "pfo.workflow.generate-financial-summary"] }
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
spaceKey: "knowledge.email-threads",
|
|
68
|
-
scope: { workflows: ["pfo.workflow.ingest-email-threads"] }
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
spaceKey: "knowledge.financial-overview",
|
|
72
|
-
scope: { workflows: [
|
|
73
|
-
"pfo.workflow.sync-openbanking-transactions",
|
|
74
|
-
"pfo.workflow.refresh-openbanking-balances",
|
|
75
|
-
"pfo.workflow.generate-financial-summary",
|
|
76
|
-
"pfo.workflow.generate-openbanking-overview"
|
|
77
|
-
] },
|
|
78
|
-
required: false
|
|
79
|
-
}
|
|
80
|
-
],
|
|
81
|
-
locales: {
|
|
82
|
-
defaultLocale: "en",
|
|
83
|
-
enabledLocales: ["en"]
|
|
84
|
-
},
|
|
85
|
-
notes: "Sample tenant configuration for hackathon demos. Replace connection IDs with tenant-specific bindings when provisioning."
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
//#endregion
|
|
89
|
-
export { pocketFamilyOfficeTenantSample };
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { OwnersEnum, StabilityEnum, TagsEnum } from "../libs/contracts/dist/ownership.js";
|
|
2
|
-
|
|
3
|
-
//#region src/workflows/generate-financial-summary.ts
|
|
4
|
-
const generateFinancialSummaryWorkflow = {
|
|
5
|
-
meta: {
|
|
6
|
-
name: "pfo.workflow.generate-financial-summary",
|
|
7
|
-
version: 1,
|
|
8
|
-
title: "Generate Financial Summary",
|
|
9
|
-
description: "Retrieves the latest financial signals, generates an AI summary, and optionally distributes it by voice or email.",
|
|
10
|
-
domain: "finance",
|
|
11
|
-
owners: [OwnersEnum.PlatformFinance],
|
|
12
|
-
tags: [
|
|
13
|
-
"summary",
|
|
14
|
-
"ai",
|
|
15
|
-
TagsEnum.Automation
|
|
16
|
-
],
|
|
17
|
-
stability: StabilityEnum.Beta
|
|
18
|
-
},
|
|
19
|
-
definition: {
|
|
20
|
-
entryStepId: "summarise",
|
|
21
|
-
steps: [{
|
|
22
|
-
id: "summarise",
|
|
23
|
-
type: "automation",
|
|
24
|
-
label: "Generate Summary",
|
|
25
|
-
description: "Run retrieval augmented generation over the knowledge base to produce a household summary.",
|
|
26
|
-
action: { operation: {
|
|
27
|
-
name: "pfo.summary.generate",
|
|
28
|
-
version: 1
|
|
29
|
-
} },
|
|
30
|
-
requiredIntegrations: ["primaryLLM", "primaryVectorDb"],
|
|
31
|
-
retry: {
|
|
32
|
-
maxAttempts: 3,
|
|
33
|
-
backoff: "exponential",
|
|
34
|
-
delayMs: 750
|
|
35
|
-
}
|
|
36
|
-
}, {
|
|
37
|
-
id: "distribute",
|
|
38
|
-
type: "automation",
|
|
39
|
-
label: "Distribute Summary",
|
|
40
|
-
description: "Send the generated summary via email and optionally synthesise a voice note.",
|
|
41
|
-
action: { operation: {
|
|
42
|
-
name: "pfo.summary.dispatch",
|
|
43
|
-
version: 1
|
|
44
|
-
} },
|
|
45
|
-
requiredIntegrations: ["emailOutbound"],
|
|
46
|
-
retry: {
|
|
47
|
-
maxAttempts: 2,
|
|
48
|
-
backoff: "linear",
|
|
49
|
-
delayMs: 500
|
|
50
|
-
}
|
|
51
|
-
}],
|
|
52
|
-
transitions: [{
|
|
53
|
-
from: "summarise",
|
|
54
|
-
to: "distribute"
|
|
55
|
-
}]
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
//#endregion
|
|
60
|
-
export { generateFinancialSummaryWorkflow };
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { OwnersEnum, StabilityEnum, TagsEnum } from "../libs/contracts/dist/ownership.js";
|
|
2
|
-
|
|
3
|
-
//#region src/workflows/generate-openbanking-overview.ts
|
|
4
|
-
const OPEN_BANKING_CAPABILITIES = [
|
|
5
|
-
{
|
|
6
|
-
key: "openbanking.accounts.read",
|
|
7
|
-
version: 1
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
key: "openbanking.transactions.read",
|
|
11
|
-
version: 1
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
key: "openbanking.balances.read",
|
|
15
|
-
version: 1
|
|
16
|
-
}
|
|
17
|
-
];
|
|
18
|
-
const generateOpenBankingOverviewWorkflow = {
|
|
19
|
-
meta: {
|
|
20
|
-
name: "pfo.workflow.generate-openbanking-overview",
|
|
21
|
-
version: 1,
|
|
22
|
-
title: "Generate Open Banking Overview",
|
|
23
|
-
description: "Produces a derived financial overview and stores it in the operational knowledge space.",
|
|
24
|
-
domain: "finance",
|
|
25
|
-
owners: [OwnersEnum.PlatformFinance],
|
|
26
|
-
tags: [
|
|
27
|
-
"open-banking",
|
|
28
|
-
"summary",
|
|
29
|
-
TagsEnum.Automation
|
|
30
|
-
],
|
|
31
|
-
stability: StabilityEnum.Experimental
|
|
32
|
-
},
|
|
33
|
-
definition: {
|
|
34
|
-
entryStepId: "generate-overview",
|
|
35
|
-
steps: [{
|
|
36
|
-
id: "generate-overview",
|
|
37
|
-
type: "automation",
|
|
38
|
-
label: "Generate Overview",
|
|
39
|
-
description: "Aggregate balances, cashflow, and category breakdowns into a knowledge entry.",
|
|
40
|
-
action: { operation: {
|
|
41
|
-
name: "pfo.openbanking.generate-overview",
|
|
42
|
-
version: 1
|
|
43
|
-
} },
|
|
44
|
-
requiredIntegrations: ["primaryOpenBanking"],
|
|
45
|
-
requiredCapabilities: OPEN_BANKING_CAPABILITIES,
|
|
46
|
-
retry: {
|
|
47
|
-
maxAttempts: 3,
|
|
48
|
-
backoff: "exponential",
|
|
49
|
-
delayMs: 1500
|
|
50
|
-
}
|
|
51
|
-
}],
|
|
52
|
-
transitions: []
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
//#endregion
|
|
57
|
-
export { generateOpenBankingOverviewWorkflow };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { processUploadedDocumentWorkflow } from "./process-uploaded-document.js";
|
|
2
|
-
import { upcomingPaymentsReminderWorkflow } from "./upcoming-payments-reminder.js";
|
|
3
|
-
import { generateFinancialSummaryWorkflow } from "./generate-financial-summary.js";
|
|
4
|
-
import { ingestEmailThreadsWorkflow } from "./ingest-email-threads.js";
|
|
5
|
-
import { syncOpenBankingAccountsWorkflow } from "./sync-openbanking-accounts.js";
|
|
6
|
-
import { syncOpenBankingTransactionsWorkflow } from "./sync-openbanking-transactions.js";
|
|
7
|
-
import { refreshOpenBankingBalancesWorkflow } from "./refresh-openbanking-balances.js";
|
|
8
|
-
import { generateOpenBankingOverviewWorkflow } from "./generate-openbanking-overview.js";
|
|
9
|
-
export { generateFinancialSummaryWorkflow, generateOpenBankingOverviewWorkflow, ingestEmailThreadsWorkflow, processUploadedDocumentWorkflow, refreshOpenBankingBalancesWorkflow, syncOpenBankingAccountsWorkflow, syncOpenBankingTransactionsWorkflow, upcomingPaymentsReminderWorkflow };
|
package/dist/workflows/index.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { processUploadedDocumentWorkflow } from "./process-uploaded-document.js";
|
|
2
|
-
import { upcomingPaymentsReminderWorkflow } from "./upcoming-payments-reminder.js";
|
|
3
|
-
import { generateFinancialSummaryWorkflow } from "./generate-financial-summary.js";
|
|
4
|
-
import { ingestEmailThreadsWorkflow } from "./ingest-email-threads.js";
|
|
5
|
-
import { syncOpenBankingAccountsWorkflow } from "./sync-openbanking-accounts.js";
|
|
6
|
-
import { syncOpenBankingTransactionsWorkflow } from "./sync-openbanking-transactions.js";
|
|
7
|
-
import { refreshOpenBankingBalancesWorkflow } from "./refresh-openbanking-balances.js";
|
|
8
|
-
import { generateOpenBankingOverviewWorkflow } from "./generate-openbanking-overview.js";
|
|
9
|
-
|
|
10
|
-
export { generateFinancialSummaryWorkflow, generateOpenBankingOverviewWorkflow, ingestEmailThreadsWorkflow, processUploadedDocumentWorkflow, refreshOpenBankingBalancesWorkflow, syncOpenBankingAccountsWorkflow, syncOpenBankingTransactionsWorkflow, upcomingPaymentsReminderWorkflow };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { OwnersEnum, StabilityEnum, TagsEnum } from "../libs/contracts/dist/ownership.js";
|
|
2
|
-
|
|
3
|
-
//#region src/workflows/ingest-email-threads.ts
|
|
4
|
-
const ingestEmailThreadsWorkflow = {
|
|
5
|
-
meta: {
|
|
6
|
-
name: "pfo.workflow.ingest-email-threads",
|
|
7
|
-
version: 1,
|
|
8
|
-
title: "Ingest Email Threads",
|
|
9
|
-
description: "Synchronises Gmail threads tagged with finance labels and indexes them into operational knowledge spaces.",
|
|
10
|
-
domain: "communications",
|
|
11
|
-
owners: [OwnersEnum.PlatformMessaging],
|
|
12
|
-
tags: [
|
|
13
|
-
"gmail",
|
|
14
|
-
"knowledge",
|
|
15
|
-
TagsEnum.Automation
|
|
16
|
-
],
|
|
17
|
-
stability: StabilityEnum.Experimental
|
|
18
|
-
},
|
|
19
|
-
definition: {
|
|
20
|
-
entryStepId: "sync",
|
|
21
|
-
steps: [{
|
|
22
|
-
id: "sync",
|
|
23
|
-
type: "automation",
|
|
24
|
-
label: "Sync Gmail Threads",
|
|
25
|
-
description: "Fetches Gmail threads and transforms them into knowledge fragments before vector indexing.",
|
|
26
|
-
action: { operation: {
|
|
27
|
-
name: "pfo.email.sync-threads",
|
|
28
|
-
version: 1
|
|
29
|
-
} },
|
|
30
|
-
requiredIntegrations: ["emailInbound", "primaryVectorDb"],
|
|
31
|
-
retry: {
|
|
32
|
-
maxAttempts: 3,
|
|
33
|
-
backoff: "exponential",
|
|
34
|
-
delayMs: 1e3
|
|
35
|
-
}
|
|
36
|
-
}, {
|
|
37
|
-
id: "triage",
|
|
38
|
-
type: "human",
|
|
39
|
-
label: "Triage Exceptions",
|
|
40
|
-
description: "Operators can resolve sync failures or tag important threads for follow-up."
|
|
41
|
-
}],
|
|
42
|
-
transitions: [{
|
|
43
|
-
from: "sync",
|
|
44
|
-
to: "triage",
|
|
45
|
-
condition: "output?.syncedThreads === 0",
|
|
46
|
-
label: "No new threads"
|
|
47
|
-
}]
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
//#endregion
|
|
52
|
-
export { ingestEmailThreadsWorkflow };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { OwnersEnum, StabilityEnum, TagsEnum } from "../libs/contracts/dist/ownership.js";
|
|
2
|
-
|
|
3
|
-
//#region src/workflows/process-uploaded-document.ts
|
|
4
|
-
const processUploadedDocumentWorkflow = {
|
|
5
|
-
meta: {
|
|
6
|
-
name: "pfo.workflow.process-uploaded-document",
|
|
7
|
-
version: 1,
|
|
8
|
-
title: "Process Uploaded Document",
|
|
9
|
-
description: "Stores an uploaded invoice/contract, queues ingestion, and records any follow-up reminders.",
|
|
10
|
-
domain: "finance",
|
|
11
|
-
owners: [OwnersEnum.PlatformFinance],
|
|
12
|
-
tags: [
|
|
13
|
-
"documents",
|
|
14
|
-
"ingestion",
|
|
15
|
-
TagsEnum.Automation
|
|
16
|
-
],
|
|
17
|
-
stability: StabilityEnum.Experimental
|
|
18
|
-
},
|
|
19
|
-
definition: {
|
|
20
|
-
entryStepId: "store",
|
|
21
|
-
steps: [{
|
|
22
|
-
id: "store",
|
|
23
|
-
type: "automation",
|
|
24
|
-
label: "Store and Queue Ingestion",
|
|
25
|
-
description: "Persist the document to storage and enqueue the knowledge ingestion pipeline.",
|
|
26
|
-
action: { operation: {
|
|
27
|
-
name: "pfo.documents.upload",
|
|
28
|
-
version: 1
|
|
29
|
-
} },
|
|
30
|
-
requiredIntegrations: ["primaryStorage", "primaryVectorDb"],
|
|
31
|
-
retry: {
|
|
32
|
-
maxAttempts: 3,
|
|
33
|
-
backoff: "exponential",
|
|
34
|
-
delayMs: 500
|
|
35
|
-
}
|
|
36
|
-
}, {
|
|
37
|
-
id: "review",
|
|
38
|
-
type: "human",
|
|
39
|
-
label: "Optional Human Classification",
|
|
40
|
-
description: "Finance lead can categorise the document while ingestion completes."
|
|
41
|
-
}],
|
|
42
|
-
transitions: [{
|
|
43
|
-
from: "store",
|
|
44
|
-
to: "review"
|
|
45
|
-
}]
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
//#endregion
|
|
50
|
-
export { processUploadedDocumentWorkflow };
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { OwnersEnum, StabilityEnum, TagsEnum } from "../libs/contracts/dist/ownership.js";
|
|
2
|
-
|
|
3
|
-
//#region src/workflows/refresh-openbanking-balances.ts
|
|
4
|
-
const BALANCE_CAPABILITY = {
|
|
5
|
-
key: "openbanking.balances.read",
|
|
6
|
-
version: 1
|
|
7
|
-
};
|
|
8
|
-
const refreshOpenBankingBalancesWorkflow = {
|
|
9
|
-
meta: {
|
|
10
|
-
name: "pfo.workflow.refresh-openbanking-balances",
|
|
11
|
-
version: 1,
|
|
12
|
-
title: "Refresh Open Banking Balances",
|
|
13
|
-
description: "Refreshes balances for synced accounts to surface the latest cash positions in dashboards.",
|
|
14
|
-
domain: "finance",
|
|
15
|
-
owners: [OwnersEnum.PlatformFinance],
|
|
16
|
-
tags: [
|
|
17
|
-
"open-banking",
|
|
18
|
-
"powens",
|
|
19
|
-
TagsEnum.Automation
|
|
20
|
-
],
|
|
21
|
-
stability: StabilityEnum.Experimental
|
|
22
|
-
},
|
|
23
|
-
definition: {
|
|
24
|
-
entryStepId: "refresh-balances",
|
|
25
|
-
steps: [{
|
|
26
|
-
id: "refresh-balances",
|
|
27
|
-
type: "automation",
|
|
28
|
-
label: "Refresh Balances",
|
|
29
|
-
description: "Trigger the Powens provider to obtain current and available balances.",
|
|
30
|
-
action: { operation: {
|
|
31
|
-
name: "openbanking.balances.refresh",
|
|
32
|
-
version: 1
|
|
33
|
-
} },
|
|
34
|
-
requiredIntegrations: ["primaryOpenBanking"],
|
|
35
|
-
requiredCapabilities: [BALANCE_CAPABILITY],
|
|
36
|
-
retry: {
|
|
37
|
-
maxAttempts: 3,
|
|
38
|
-
backoff: "exponential",
|
|
39
|
-
delayMs: 1e3
|
|
40
|
-
}
|
|
41
|
-
}, {
|
|
42
|
-
id: "fetch-balances",
|
|
43
|
-
type: "automation",
|
|
44
|
-
label: "Fetch Balances",
|
|
45
|
-
description: "Load the canonical balance snapshots for downstream workflows and dashboards.",
|
|
46
|
-
action: { operation: {
|
|
47
|
-
name: "openbanking.balances.get",
|
|
48
|
-
version: 1
|
|
49
|
-
} },
|
|
50
|
-
requiredIntegrations: ["primaryOpenBanking"],
|
|
51
|
-
requiredCapabilities: [BALANCE_CAPABILITY],
|
|
52
|
-
retry: {
|
|
53
|
-
maxAttempts: 2,
|
|
54
|
-
backoff: "linear",
|
|
55
|
-
delayMs: 750
|
|
56
|
-
}
|
|
57
|
-
}],
|
|
58
|
-
transitions: [{
|
|
59
|
-
from: "refresh-balances",
|
|
60
|
-
to: "fetch-balances"
|
|
61
|
-
}]
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
//#endregion
|
|
66
|
-
export { refreshOpenBankingBalancesWorkflow };
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { OwnersEnum, StabilityEnum, TagsEnum } from "../libs/contracts/dist/ownership.js";
|
|
2
|
-
|
|
3
|
-
//#region src/workflows/sync-openbanking-accounts.ts
|
|
4
|
-
const ACCOUNT_CAPABILITY = {
|
|
5
|
-
key: "openbanking.accounts.read",
|
|
6
|
-
version: 1
|
|
7
|
-
};
|
|
8
|
-
const syncOpenBankingAccountsWorkflow = {
|
|
9
|
-
meta: {
|
|
10
|
-
name: "pfo.workflow.sync-openbanking-accounts",
|
|
11
|
-
version: 1,
|
|
12
|
-
title: "Synchronise Open Banking Accounts",
|
|
13
|
-
description: "Validates Powens connectivity and synchronises bank account metadata into the canonical ledger.",
|
|
14
|
-
domain: "finance",
|
|
15
|
-
owners: [OwnersEnum.PlatformFinance],
|
|
16
|
-
tags: [
|
|
17
|
-
"open-banking",
|
|
18
|
-
"powens",
|
|
19
|
-
TagsEnum.Automation
|
|
20
|
-
],
|
|
21
|
-
stability: StabilityEnum.Experimental
|
|
22
|
-
},
|
|
23
|
-
definition: {
|
|
24
|
-
entryStepId: "sync-accounts",
|
|
25
|
-
steps: [{
|
|
26
|
-
id: "sync-accounts",
|
|
27
|
-
type: "automation",
|
|
28
|
-
label: "Sync Accounts",
|
|
29
|
-
description: "Refresh linked bank accounts via Powens and upsert canonical BankAccount records.",
|
|
30
|
-
action: { operation: {
|
|
31
|
-
name: "openbanking.accounts.sync",
|
|
32
|
-
version: 1
|
|
33
|
-
} },
|
|
34
|
-
requiredIntegrations: ["primaryOpenBanking"],
|
|
35
|
-
requiredCapabilities: [ACCOUNT_CAPABILITY],
|
|
36
|
-
retry: {
|
|
37
|
-
maxAttempts: 3,
|
|
38
|
-
backoff: "exponential",
|
|
39
|
-
delayMs: 1e3
|
|
40
|
-
}
|
|
41
|
-
}, {
|
|
42
|
-
id: "fetch-accounts",
|
|
43
|
-
type: "automation",
|
|
44
|
-
label: "Fetch Accounts",
|
|
45
|
-
description: "Retrieve the latest canonical account snapshot for downstream consumers.",
|
|
46
|
-
action: { operation: {
|
|
47
|
-
name: "openbanking.accounts.list",
|
|
48
|
-
version: 1
|
|
49
|
-
} },
|
|
50
|
-
requiredIntegrations: ["primaryOpenBanking"],
|
|
51
|
-
requiredCapabilities: [ACCOUNT_CAPABILITY],
|
|
52
|
-
retry: {
|
|
53
|
-
maxAttempts: 2,
|
|
54
|
-
backoff: "linear",
|
|
55
|
-
delayMs: 750
|
|
56
|
-
}
|
|
57
|
-
}],
|
|
58
|
-
transitions: [{
|
|
59
|
-
from: "sync-accounts",
|
|
60
|
-
to: "fetch-accounts"
|
|
61
|
-
}]
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
//#endregion
|
|
66
|
-
export { syncOpenBankingAccountsWorkflow };
|