@contractspec/example.pocket-family-office 3.7.17 → 3.7.19
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.js +1 -197
- package/dist/browser/blueprint.js +1 -197
- package/dist/browser/connections/samples.js +1 -197
- package/dist/browser/docs/index.js +3 -48
- package/dist/browser/docs/pocket-family-office.docblock.js +3 -48
- package/dist/browser/example.js +1 -42
- package/dist/browser/index.js +4 -1660
- package/dist/browser/knowledge/sources.sample.js +1 -70
- package/dist/browser/operations/index.js +1 -314
- package/dist/browser/pocket-family-office.capability.js +1 -19
- package/dist/browser/pocket-family-office.feature.js +2 -86
- package/dist/browser/telemetry.js +1 -176
- package/dist/browser/tenant.sample.js +1 -71
- package/dist/browser/workflows/generate-financial-summary.js +1 -58
- package/dist/browser/workflows/generate-openbanking-overview.js +1 -52
- package/dist/browser/workflows/index.js +1 -467
- package/dist/browser/workflows/ingest-email-threads.js +1 -56
- package/dist/browser/workflows/process-uploaded-document.js +1 -54
- package/dist/browser/workflows/refresh-openbanking-balances.js +1 -64
- package/dist/browser/workflows/sync-openbanking-accounts.js +1 -64
- package/dist/browser/workflows/sync-openbanking-transactions.js +1 -64
- package/dist/browser/workflows/upcoming-payments-reminder.js +1 -62
- package/dist/connections/samples.js +1 -197
- package/dist/docs/index.js +3 -48
- package/dist/docs/pocket-family-office.docblock.js +3 -48
- package/dist/example.js +1 -42
- package/dist/index.js +4 -1660
- package/dist/knowledge/sources.sample.js +1 -70
- package/dist/node/blueprint.js +1 -197
- package/dist/node/connections/samples.js +1 -197
- package/dist/node/docs/index.js +3 -48
- package/dist/node/docs/pocket-family-office.docblock.js +3 -48
- package/dist/node/example.js +1 -42
- package/dist/node/index.js +4 -1660
- package/dist/node/knowledge/sources.sample.js +1 -70
- package/dist/node/operations/index.js +1 -314
- package/dist/node/pocket-family-office.capability.js +1 -19
- package/dist/node/pocket-family-office.feature.js +2 -86
- package/dist/node/telemetry.js +1 -176
- package/dist/node/tenant.sample.js +1 -71
- package/dist/node/workflows/generate-financial-summary.js +1 -58
- package/dist/node/workflows/generate-openbanking-overview.js +1 -52
- package/dist/node/workflows/index.js +1 -467
- package/dist/node/workflows/ingest-email-threads.js +1 -56
- package/dist/node/workflows/process-uploaded-document.js +1 -54
- package/dist/node/workflows/refresh-openbanking-balances.js +1 -64
- package/dist/node/workflows/sync-openbanking-accounts.js +1 -64
- package/dist/node/workflows/sync-openbanking-transactions.js +1 -64
- package/dist/node/workflows/upcoming-payments-reminder.js +1 -62
- package/dist/operations/index.js +1 -314
- package/dist/pocket-family-office.capability.js +1 -19
- package/dist/pocket-family-office.feature.js +2 -86
- package/dist/telemetry.js +1 -176
- package/dist/tenant.sample.js +1 -71
- package/dist/workflows/generate-financial-summary.js +1 -58
- package/dist/workflows/generate-openbanking-overview.js +1 -52
- package/dist/workflows/index.js +1 -467
- package/dist/workflows/ingest-email-threads.js +1 -56
- package/dist/workflows/process-uploaded-document.js +1 -54
- package/dist/workflows/refresh-openbanking-balances.js +1 -64
- package/dist/workflows/sync-openbanking-accounts.js +1 -64
- package/dist/workflows/sync-openbanking-transactions.js +1 -64
- package/dist/workflows/upcoming-payments-reminder.js +1 -62
- package/package.json +7 -7
package/dist/workflows/index.js
CHANGED
|
@@ -1,468 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
// src/workflows/generate-financial-summary.ts
|
|
3
|
-
import {
|
|
4
|
-
OwnersEnum,
|
|
5
|
-
StabilityEnum,
|
|
6
|
-
TagsEnum
|
|
7
|
-
} from "@contractspec/lib.contracts-spec";
|
|
8
|
-
import { defineWorkflow } from "@contractspec/lib.contracts-spec/workflow/spec";
|
|
9
|
-
var generateFinancialSummaryWorkflow = defineWorkflow({
|
|
10
|
-
meta: {
|
|
11
|
-
key: "pfo.workflow.generate-financial-summary",
|
|
12
|
-
version: "1.0.0",
|
|
13
|
-
title: "Generate Financial Summary",
|
|
14
|
-
description: "Retrieves the latest financial signals, generates an AI summary, and optionally distributes it by voice or email.",
|
|
15
|
-
domain: "finance",
|
|
16
|
-
owners: [OwnersEnum.PlatformFinance],
|
|
17
|
-
tags: ["summary", "ai", TagsEnum.Automation],
|
|
18
|
-
stability: StabilityEnum.Beta
|
|
19
|
-
},
|
|
20
|
-
definition: {
|
|
21
|
-
entryStepId: "summarise",
|
|
22
|
-
steps: [
|
|
23
|
-
{
|
|
24
|
-
id: "summarise",
|
|
25
|
-
type: "automation",
|
|
26
|
-
label: "Generate Summary",
|
|
27
|
-
description: "Run retrieval augmented generation over the knowledge base to produce a household summary.",
|
|
28
|
-
action: {
|
|
29
|
-
operation: { key: "pfo.summary.generate", version: "1.0.0" }
|
|
30
|
-
},
|
|
31
|
-
requiredIntegrations: ["primaryLLM", "primaryVectorDb"],
|
|
32
|
-
retry: {
|
|
33
|
-
maxAttempts: 3,
|
|
34
|
-
backoff: "exponential",
|
|
35
|
-
delayMs: 750
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
id: "distribute",
|
|
40
|
-
type: "automation",
|
|
41
|
-
label: "Distribute Summary",
|
|
42
|
-
description: "Send the generated summary via email and optionally synthesise a voice note.",
|
|
43
|
-
action: {
|
|
44
|
-
operation: { key: "pfo.summary.dispatch", version: "1.0.0" }
|
|
45
|
-
},
|
|
46
|
-
requiredIntegrations: ["emailOutbound"],
|
|
47
|
-
retry: {
|
|
48
|
-
maxAttempts: 2,
|
|
49
|
-
backoff: "linear",
|
|
50
|
-
delayMs: 500
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
],
|
|
54
|
-
transitions: [{ from: "summarise", to: "distribute" }]
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
// src/workflows/generate-openbanking-overview.ts
|
|
59
|
-
import {
|
|
60
|
-
OwnersEnum as OwnersEnum2,
|
|
61
|
-
StabilityEnum as StabilityEnum2,
|
|
62
|
-
TagsEnum as TagsEnum2
|
|
63
|
-
} from "@contractspec/lib.contracts-spec";
|
|
64
|
-
import { defineWorkflow as defineWorkflow2 } from "@contractspec/lib.contracts-spec/workflow/spec";
|
|
65
|
-
var OPEN_BANKING_CAPABILITIES = [
|
|
66
|
-
{ key: "openbanking.accounts.read", version: "1.0.0" },
|
|
67
|
-
{ key: "openbanking.transactions.read", version: "1.0.0" },
|
|
68
|
-
{ key: "openbanking.balances.read", version: "1.0.0" }
|
|
69
|
-
];
|
|
70
|
-
var generateOpenBankingOverviewWorkflow = defineWorkflow2({
|
|
71
|
-
meta: {
|
|
72
|
-
key: "pfo.workflow.generate-openbanking-overview",
|
|
73
|
-
version: "1.0.0",
|
|
74
|
-
title: "Generate Open Banking Overview",
|
|
75
|
-
description: "Produces a derived financial overview and stores it in the operational knowledge space.",
|
|
76
|
-
domain: "finance",
|
|
77
|
-
owners: [OwnersEnum2.PlatformFinance],
|
|
78
|
-
tags: ["open-banking", "summary", TagsEnum2.Automation],
|
|
79
|
-
stability: StabilityEnum2.Experimental
|
|
80
|
-
},
|
|
81
|
-
definition: {
|
|
82
|
-
entryStepId: "generate-overview",
|
|
83
|
-
steps: [
|
|
84
|
-
{
|
|
85
|
-
id: "generate-overview",
|
|
86
|
-
type: "automation",
|
|
87
|
-
label: "Generate Overview",
|
|
88
|
-
description: "Aggregate balances, cashflow, and category breakdowns into a knowledge entry.",
|
|
89
|
-
action: {
|
|
90
|
-
operation: {
|
|
91
|
-
key: "pfo.openbanking.generate-overview",
|
|
92
|
-
version: "1.0.0"
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
requiredIntegrations: ["primaryOpenBanking"],
|
|
96
|
-
requiredCapabilities: OPEN_BANKING_CAPABILITIES,
|
|
97
|
-
retry: {
|
|
98
|
-
maxAttempts: 3,
|
|
99
|
-
backoff: "exponential",
|
|
100
|
-
delayMs: 1500
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
],
|
|
104
|
-
transitions: []
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
|
|
108
|
-
// src/workflows/ingest-email-threads.ts
|
|
109
|
-
import {
|
|
110
|
-
OwnersEnum as OwnersEnum3,
|
|
111
|
-
StabilityEnum as StabilityEnum3,
|
|
112
|
-
TagsEnum as TagsEnum3
|
|
113
|
-
} from "@contractspec/lib.contracts-spec";
|
|
114
|
-
import { defineWorkflow as defineWorkflow3 } from "@contractspec/lib.contracts-spec/workflow/spec";
|
|
115
|
-
var ingestEmailThreadsWorkflow = defineWorkflow3({
|
|
116
|
-
meta: {
|
|
117
|
-
key: "pfo.workflow.ingest-email-threads",
|
|
118
|
-
version: "1.0.0",
|
|
119
|
-
title: "Ingest Email Threads",
|
|
120
|
-
description: "Synchronises Gmail threads tagged with finance labels and indexes them into operational knowledge spaces.",
|
|
121
|
-
domain: "communications",
|
|
122
|
-
owners: [OwnersEnum3.PlatformMessaging],
|
|
123
|
-
tags: ["gmail", "knowledge", TagsEnum3.Automation],
|
|
124
|
-
stability: StabilityEnum3.Experimental
|
|
125
|
-
},
|
|
126
|
-
definition: {
|
|
127
|
-
entryStepId: "sync",
|
|
128
|
-
steps: [
|
|
129
|
-
{
|
|
130
|
-
id: "sync",
|
|
131
|
-
type: "automation",
|
|
132
|
-
label: "Sync Gmail Threads",
|
|
133
|
-
description: "Fetches Gmail threads and transforms them into knowledge fragments before vector indexing.",
|
|
134
|
-
action: {
|
|
135
|
-
operation: { key: "pfo.email.sync-threads", version: "1.0.0" }
|
|
136
|
-
},
|
|
137
|
-
requiredIntegrations: ["emailInbound", "primaryVectorDb"],
|
|
138
|
-
retry: {
|
|
139
|
-
maxAttempts: 3,
|
|
140
|
-
backoff: "exponential",
|
|
141
|
-
delayMs: 1000
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
id: "triage",
|
|
146
|
-
type: "human",
|
|
147
|
-
label: "Triage Exceptions",
|
|
148
|
-
description: "Operators can resolve sync failures or tag important threads for follow-up."
|
|
149
|
-
}
|
|
150
|
-
],
|
|
151
|
-
transitions: [
|
|
152
|
-
{
|
|
153
|
-
from: "sync",
|
|
154
|
-
to: "triage",
|
|
155
|
-
condition: "output?.syncedThreads === 0",
|
|
156
|
-
label: "No new threads"
|
|
157
|
-
}
|
|
158
|
-
]
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
|
|
162
|
-
// src/workflows/process-uploaded-document.ts
|
|
163
|
-
import {
|
|
164
|
-
OwnersEnum as OwnersEnum4,
|
|
165
|
-
StabilityEnum as StabilityEnum4,
|
|
166
|
-
TagsEnum as TagsEnum4
|
|
167
|
-
} from "@contractspec/lib.contracts-spec";
|
|
168
|
-
import { defineWorkflow as defineWorkflow4 } from "@contractspec/lib.contracts-spec/workflow/spec";
|
|
169
|
-
var processUploadedDocumentWorkflow = defineWorkflow4({
|
|
170
|
-
meta: {
|
|
171
|
-
key: "pfo.workflow.process-uploaded-document",
|
|
172
|
-
version: "1.0.0",
|
|
173
|
-
title: "Process Uploaded Document",
|
|
174
|
-
description: "Stores an uploaded invoice/contract, queues ingestion, and records any follow-up reminders.",
|
|
175
|
-
domain: "finance",
|
|
176
|
-
owners: [OwnersEnum4.PlatformFinance],
|
|
177
|
-
tags: ["documents", "ingestion", TagsEnum4.Automation],
|
|
178
|
-
stability: StabilityEnum4.Experimental
|
|
179
|
-
},
|
|
180
|
-
definition: {
|
|
181
|
-
entryStepId: "store",
|
|
182
|
-
steps: [
|
|
183
|
-
{
|
|
184
|
-
id: "store",
|
|
185
|
-
type: "automation",
|
|
186
|
-
label: "Store and Queue Ingestion",
|
|
187
|
-
description: "Persist the document to storage and enqueue the knowledge ingestion pipeline.",
|
|
188
|
-
action: {
|
|
189
|
-
operation: { key: "pfo.documents.upload", version: "1.0.0" }
|
|
190
|
-
},
|
|
191
|
-
requiredIntegrations: ["primaryStorage", "primaryVectorDb"],
|
|
192
|
-
retry: {
|
|
193
|
-
maxAttempts: 3,
|
|
194
|
-
backoff: "exponential",
|
|
195
|
-
delayMs: 500
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
id: "review",
|
|
200
|
-
type: "human",
|
|
201
|
-
label: "Optional Human Classification",
|
|
202
|
-
description: "Finance lead can categorise the document while ingestion completes."
|
|
203
|
-
}
|
|
204
|
-
],
|
|
205
|
-
transitions: [
|
|
206
|
-
{
|
|
207
|
-
from: "store",
|
|
208
|
-
to: "review"
|
|
209
|
-
}
|
|
210
|
-
]
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
|
|
214
|
-
// src/workflows/refresh-openbanking-balances.ts
|
|
215
|
-
import {
|
|
216
|
-
OwnersEnum as OwnersEnum5,
|
|
217
|
-
StabilityEnum as StabilityEnum5,
|
|
218
|
-
TagsEnum as TagsEnum5
|
|
219
|
-
} from "@contractspec/lib.contracts-spec";
|
|
220
|
-
import { defineWorkflow as defineWorkflow5 } from "@contractspec/lib.contracts-spec/workflow/spec";
|
|
221
|
-
var BALANCE_CAPABILITY = {
|
|
222
|
-
key: "openbanking.balances.read",
|
|
223
|
-
version: "1.0.0"
|
|
224
|
-
};
|
|
225
|
-
var refreshOpenBankingBalancesWorkflow = defineWorkflow5({
|
|
226
|
-
meta: {
|
|
227
|
-
key: "pfo.workflow.refresh-openbanking-balances",
|
|
228
|
-
version: "1.0.0",
|
|
229
|
-
title: "Refresh Open Banking Balances",
|
|
230
|
-
description: "Refreshes balances for synced accounts to surface the latest cash positions in dashboards.",
|
|
231
|
-
domain: "finance",
|
|
232
|
-
owners: [OwnersEnum5.PlatformFinance],
|
|
233
|
-
tags: ["open-banking", "powens", TagsEnum5.Automation],
|
|
234
|
-
stability: StabilityEnum5.Experimental
|
|
235
|
-
},
|
|
236
|
-
definition: {
|
|
237
|
-
entryStepId: "refresh-balances",
|
|
238
|
-
steps: [
|
|
239
|
-
{
|
|
240
|
-
id: "refresh-balances",
|
|
241
|
-
type: "automation",
|
|
242
|
-
label: "Refresh Balances",
|
|
243
|
-
description: "Trigger the Powens provider to obtain current and available balances.",
|
|
244
|
-
action: {
|
|
245
|
-
operation: { key: "openbanking.balances.refresh", version: "1.0.0" }
|
|
246
|
-
},
|
|
247
|
-
requiredIntegrations: ["primaryOpenBanking"],
|
|
248
|
-
requiredCapabilities: [BALANCE_CAPABILITY],
|
|
249
|
-
retry: {
|
|
250
|
-
maxAttempts: 3,
|
|
251
|
-
backoff: "exponential",
|
|
252
|
-
delayMs: 1000
|
|
253
|
-
}
|
|
254
|
-
},
|
|
255
|
-
{
|
|
256
|
-
id: "fetch-balances",
|
|
257
|
-
type: "automation",
|
|
258
|
-
label: "Fetch Balances",
|
|
259
|
-
description: "Load the canonical balance snapshots for downstream workflows and dashboards.",
|
|
260
|
-
action: {
|
|
261
|
-
operation: { key: "openbanking.balances.get", version: "1.0.0" }
|
|
262
|
-
},
|
|
263
|
-
requiredIntegrations: ["primaryOpenBanking"],
|
|
264
|
-
requiredCapabilities: [BALANCE_CAPABILITY],
|
|
265
|
-
retry: {
|
|
266
|
-
maxAttempts: 2,
|
|
267
|
-
backoff: "linear",
|
|
268
|
-
delayMs: 750
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
],
|
|
272
|
-
transitions: [{ from: "refresh-balances", to: "fetch-balances" }]
|
|
273
|
-
}
|
|
274
|
-
});
|
|
275
|
-
|
|
276
|
-
// src/workflows/sync-openbanking-accounts.ts
|
|
277
|
-
import {
|
|
278
|
-
OwnersEnum as OwnersEnum6,
|
|
279
|
-
StabilityEnum as StabilityEnum6,
|
|
280
|
-
TagsEnum as TagsEnum6
|
|
281
|
-
} from "@contractspec/lib.contracts-spec";
|
|
282
|
-
import { defineWorkflow as defineWorkflow6 } from "@contractspec/lib.contracts-spec/workflow/spec";
|
|
283
|
-
var ACCOUNT_CAPABILITY = {
|
|
284
|
-
key: "openbanking.accounts.read",
|
|
285
|
-
version: "1.0.0"
|
|
286
|
-
};
|
|
287
|
-
var syncOpenBankingAccountsWorkflow = defineWorkflow6({
|
|
288
|
-
meta: {
|
|
289
|
-
key: "pfo.workflow.sync-openbanking-accounts",
|
|
290
|
-
version: "1.0.0",
|
|
291
|
-
title: "Synchronise Open Banking Accounts",
|
|
292
|
-
description: "Validates Powens connectivity and synchronises bank account metadata into the canonical ledger.",
|
|
293
|
-
domain: "finance",
|
|
294
|
-
owners: [OwnersEnum6.PlatformFinance],
|
|
295
|
-
tags: ["open-banking", "powens", TagsEnum6.Automation],
|
|
296
|
-
stability: StabilityEnum6.Experimental
|
|
297
|
-
},
|
|
298
|
-
definition: {
|
|
299
|
-
entryStepId: "sync-accounts",
|
|
300
|
-
steps: [
|
|
301
|
-
{
|
|
302
|
-
id: "sync-accounts",
|
|
303
|
-
type: "automation",
|
|
304
|
-
label: "Sync Accounts",
|
|
305
|
-
description: "Refresh linked bank accounts via Powens and upsert canonical BankAccount records.",
|
|
306
|
-
action: {
|
|
307
|
-
operation: { key: "openbanking.accounts.sync", version: "1.0.0" }
|
|
308
|
-
},
|
|
309
|
-
requiredIntegrations: ["primaryOpenBanking"],
|
|
310
|
-
requiredCapabilities: [ACCOUNT_CAPABILITY],
|
|
311
|
-
retry: {
|
|
312
|
-
maxAttempts: 3,
|
|
313
|
-
backoff: "exponential",
|
|
314
|
-
delayMs: 1000
|
|
315
|
-
}
|
|
316
|
-
},
|
|
317
|
-
{
|
|
318
|
-
id: "fetch-accounts",
|
|
319
|
-
type: "automation",
|
|
320
|
-
label: "Fetch Accounts",
|
|
321
|
-
description: "Retrieve the latest canonical account snapshot for downstream consumers.",
|
|
322
|
-
action: {
|
|
323
|
-
operation: { key: "openbanking.accounts.list", version: "1.0.0" }
|
|
324
|
-
},
|
|
325
|
-
requiredIntegrations: ["primaryOpenBanking"],
|
|
326
|
-
requiredCapabilities: [ACCOUNT_CAPABILITY],
|
|
327
|
-
retry: {
|
|
328
|
-
maxAttempts: 2,
|
|
329
|
-
backoff: "linear",
|
|
330
|
-
delayMs: 750
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
],
|
|
334
|
-
transitions: [{ from: "sync-accounts", to: "fetch-accounts" }]
|
|
335
|
-
}
|
|
336
|
-
});
|
|
337
|
-
|
|
338
|
-
// src/workflows/sync-openbanking-transactions.ts
|
|
339
|
-
import {
|
|
340
|
-
OwnersEnum as OwnersEnum7,
|
|
341
|
-
StabilityEnum as StabilityEnum7,
|
|
342
|
-
TagsEnum as TagsEnum7
|
|
343
|
-
} from "@contractspec/lib.contracts-spec";
|
|
344
|
-
import { defineWorkflow as defineWorkflow7 } from "@contractspec/lib.contracts-spec/workflow/spec";
|
|
345
|
-
var TRANSACTION_CAPABILITY = {
|
|
346
|
-
key: "openbanking.transactions.read",
|
|
347
|
-
version: "1.0.0"
|
|
348
|
-
};
|
|
349
|
-
var syncOpenBankingTransactionsWorkflow = defineWorkflow7({
|
|
350
|
-
meta: {
|
|
351
|
-
key: "pfo.workflow.sync-openbanking-transactions",
|
|
352
|
-
version: "1.0.0",
|
|
353
|
-
title: "Synchronise Open Banking Transactions",
|
|
354
|
-
description: "Fetches recent transactions from Powens for each linked account and stores them in the canonical ledger.",
|
|
355
|
-
domain: "finance",
|
|
356
|
-
owners: [OwnersEnum7.PlatformFinance],
|
|
357
|
-
tags: ["open-banking", "powens", TagsEnum7.Automation],
|
|
358
|
-
stability: StabilityEnum7.Experimental
|
|
359
|
-
},
|
|
360
|
-
definition: {
|
|
361
|
-
entryStepId: "sync-transactions",
|
|
362
|
-
steps: [
|
|
363
|
-
{
|
|
364
|
-
id: "sync-transactions",
|
|
365
|
-
type: "automation",
|
|
366
|
-
label: "Sync Transactions",
|
|
367
|
-
description: "Call the Powens provider to pull incremental transactions for active accounts.",
|
|
368
|
-
action: {
|
|
369
|
-
operation: { key: "openbanking.transactions.sync", version: "1.0.0" }
|
|
370
|
-
},
|
|
371
|
-
requiredIntegrations: ["primaryOpenBanking"],
|
|
372
|
-
requiredCapabilities: [TRANSACTION_CAPABILITY],
|
|
373
|
-
retry: {
|
|
374
|
-
maxAttempts: 4,
|
|
375
|
-
backoff: "exponential",
|
|
376
|
-
delayMs: 1500
|
|
377
|
-
}
|
|
378
|
-
},
|
|
379
|
-
{
|
|
380
|
-
id: "list-transactions",
|
|
381
|
-
type: "automation",
|
|
382
|
-
label: "List Transactions",
|
|
383
|
-
description: "Retrieve the canonical transaction list for reporting and downstream analytics.",
|
|
384
|
-
action: {
|
|
385
|
-
operation: { key: "openbanking.transactions.list", version: "1.0.0" }
|
|
386
|
-
},
|
|
387
|
-
requiredIntegrations: ["primaryOpenBanking"],
|
|
388
|
-
requiredCapabilities: [TRANSACTION_CAPABILITY],
|
|
389
|
-
retry: {
|
|
390
|
-
maxAttempts: 2,
|
|
391
|
-
backoff: "linear",
|
|
392
|
-
delayMs: 1000
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
],
|
|
396
|
-
transitions: [{ from: "sync-transactions", to: "list-transactions" }]
|
|
397
|
-
}
|
|
398
|
-
});
|
|
399
|
-
|
|
400
|
-
// src/workflows/upcoming-payments-reminder.ts
|
|
401
|
-
import {
|
|
402
|
-
OwnersEnum as OwnersEnum8,
|
|
403
|
-
StabilityEnum as StabilityEnum8,
|
|
404
|
-
TagsEnum as TagsEnum8
|
|
405
|
-
} from "@contractspec/lib.contracts-spec";
|
|
406
|
-
import { defineWorkflow as defineWorkflow8 } from "@contractspec/lib.contracts-spec/workflow/spec";
|
|
407
|
-
var upcomingPaymentsReminderWorkflow = defineWorkflow8({
|
|
408
|
-
meta: {
|
|
409
|
-
key: "pfo.workflow.upcoming-payments-reminder",
|
|
410
|
-
version: "1.0.0",
|
|
411
|
-
title: "Schedule Upcoming Payment Reminder",
|
|
412
|
-
description: "Collects payment metadata and schedules multi-channel reminders for bills that are due soon.",
|
|
413
|
-
domain: "finance",
|
|
414
|
-
owners: [OwnersEnum8.PlatformFinance],
|
|
415
|
-
tags: ["payments", "reminders", TagsEnum8.Automation],
|
|
416
|
-
stability: StabilityEnum8.Beta
|
|
417
|
-
},
|
|
418
|
-
definition: {
|
|
419
|
-
entryStepId: "collect",
|
|
420
|
-
steps: [
|
|
421
|
-
{
|
|
422
|
-
id: "collect",
|
|
423
|
-
type: "human",
|
|
424
|
-
label: "Review Upcoming Bill",
|
|
425
|
-
description: "Confirm amount, due date, and preferred delivery channels before scheduling reminder."
|
|
426
|
-
},
|
|
427
|
-
{
|
|
428
|
-
id: "schedule",
|
|
429
|
-
type: "automation",
|
|
430
|
-
label: "Schedule Reminder",
|
|
431
|
-
action: {
|
|
432
|
-
operation: {
|
|
433
|
-
key: "pfo.reminders.schedule-payment",
|
|
434
|
-
version: "1.0.0"
|
|
435
|
-
}
|
|
436
|
-
},
|
|
437
|
-
requiredIntegrations: [
|
|
438
|
-
"emailOutbound",
|
|
439
|
-
"smsNotifications",
|
|
440
|
-
"calendarScheduling"
|
|
441
|
-
],
|
|
442
|
-
retry: {
|
|
443
|
-
maxAttempts: 2,
|
|
444
|
-
backoff: "linear",
|
|
445
|
-
delayMs: 1000
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
],
|
|
449
|
-
transitions: [
|
|
450
|
-
{
|
|
451
|
-
from: "collect",
|
|
452
|
-
to: "schedule",
|
|
453
|
-
condition: "output?.confirmed === true",
|
|
454
|
-
label: "Reminder confirmed"
|
|
455
|
-
}
|
|
456
|
-
]
|
|
457
|
-
}
|
|
458
|
-
});
|
|
459
|
-
export {
|
|
460
|
-
upcomingPaymentsReminderWorkflow,
|
|
461
|
-
syncOpenBankingTransactionsWorkflow,
|
|
462
|
-
syncOpenBankingAccountsWorkflow,
|
|
463
|
-
refreshOpenBankingBalancesWorkflow,
|
|
464
|
-
processUploadedDocumentWorkflow,
|
|
465
|
-
ingestEmailThreadsWorkflow,
|
|
466
|
-
generateOpenBankingOverviewWorkflow,
|
|
467
|
-
generateFinancialSummaryWorkflow
|
|
468
|
-
};
|
|
2
|
+
import{OwnersEnum as q,StabilityEnum as v,TagsEnum as z}from"@contractspec/lib.contracts-spec";import{defineWorkflow as D}from"@contractspec/lib.contracts-spec/workflow/spec";var I=D({meta:{key:"pfo.workflow.generate-financial-summary",version:"1.0.0",title:"Generate Financial Summary",description:"Retrieves the latest financial signals, generates an AI summary, and optionally distributes it by voice or email.",domain:"finance",owners:[q.PlatformFinance],tags:["summary","ai",z.Automation],stability:v.Beta},definition:{entryStepId:"summarise",steps:[{id:"summarise",type:"automation",label:"Generate Summary",description:"Run retrieval augmented generation over the knowledge base to produce a household summary.",action:{operation:{key:"pfo.summary.generate",version:"1.0.0"}},requiredIntegrations:["primaryLLM","primaryVectorDb"],retry:{maxAttempts:3,backoff:"exponential",delayMs:750}},{id:"distribute",type:"automation",label:"Distribute Summary",description:"Send the generated summary via email and optionally synthesise a voice note.",action:{operation:{key:"pfo.summary.dispatch",version:"1.0.0"}},requiredIntegrations:["emailOutbound"],retry:{maxAttempts:2,backoff:"linear",delayMs:500}}],transitions:[{from:"summarise",to:"distribute"}]}});import{OwnersEnum as F,StabilityEnum as H,TagsEnum as J}from"@contractspec/lib.contracts-spec";import{defineWorkflow as M}from"@contractspec/lib.contracts-spec/workflow/spec";var Q=[{key:"openbanking.accounts.read",version:"1.0.0"},{key:"openbanking.transactions.read",version:"1.0.0"},{key:"openbanking.balances.read",version:"1.0.0"}],A=M({meta:{key:"pfo.workflow.generate-openbanking-overview",version:"1.0.0",title:"Generate Open Banking Overview",description:"Produces a derived financial overview and stores it in the operational knowledge space.",domain:"finance",owners:[F.PlatformFinance],tags:["open-banking","summary",J.Automation],stability:H.Experimental},definition:{entryStepId:"generate-overview",steps:[{id:"generate-overview",type:"automation",label:"Generate Overview",description:"Aggregate balances, cashflow, and category breakdowns into a knowledge entry.",action:{operation:{key:"pfo.openbanking.generate-overview",version:"1.0.0"}},requiredIntegrations:["primaryOpenBanking"],requiredCapabilities:Q,retry:{maxAttempts:3,backoff:"exponential",delayMs:1500}}],transitions:[]}});import{OwnersEnum as V,StabilityEnum as X,TagsEnum as Z}from"@contractspec/lib.contracts-spec";import{defineWorkflow as $}from"@contractspec/lib.contracts-spec/workflow/spec";var l=$({meta:{key:"pfo.workflow.ingest-email-threads",version:"1.0.0",title:"Ingest Email Threads",description:"Synchronises Gmail threads tagged with finance labels and indexes them into operational knowledge spaces.",domain:"communications",owners:[V.PlatformMessaging],tags:["gmail","knowledge",Z.Automation],stability:X.Experimental},definition:{entryStepId:"sync",steps:[{id:"sync",type:"automation",label:"Sync Gmail Threads",description:"Fetches Gmail threads and transforms them into knowledge fragments before vector indexing.",action:{operation:{key:"pfo.email.sync-threads",version:"1.0.0"}},requiredIntegrations:["emailInbound","primaryVectorDb"],retry:{maxAttempts:3,backoff:"exponential",delayMs:1000}},{id:"triage",type:"human",label:"Triage Exceptions",description:"Operators can resolve sync failures or tag important threads for follow-up."}],transitions:[{from:"sync",to:"triage",condition:"output?.syncedThreads === 0",label:"No new threads"}]}});import{OwnersEnum as G,StabilityEnum as K,TagsEnum as R}from"@contractspec/lib.contracts-spec";import{defineWorkflow as U}from"@contractspec/lib.contracts-spec/workflow/spec";var t=U({meta:{key:"pfo.workflow.process-uploaded-document",version:"1.0.0",title:"Process Uploaded Document",description:"Stores an uploaded invoice/contract, queues ingestion, and records any follow-up reminders.",domain:"finance",owners:[G.PlatformFinance],tags:["documents","ingestion",R.Automation],stability:K.Experimental},definition:{entryStepId:"store",steps:[{id:"store",type:"automation",label:"Store and Queue Ingestion",description:"Persist the document to storage and enqueue the knowledge ingestion pipeline.",action:{operation:{key:"pfo.documents.upload",version:"1.0.0"}},requiredIntegrations:["primaryStorage","primaryVectorDb"],retry:{maxAttempts:3,backoff:"exponential",delayMs:500}},{id:"review",type:"human",label:"Optional Human Classification",description:"Finance lead can categorise the document while ingestion completes."}],transitions:[{from:"store",to:"review"}]}});import{OwnersEnum as Y,StabilityEnum as d,TagsEnum as g}from"@contractspec/lib.contracts-spec";import{defineWorkflow as y}from"@contractspec/lib.contracts-spec/workflow/spec";var x={key:"openbanking.balances.read",version:"1.0.0"},xx=y({meta:{key:"pfo.workflow.refresh-openbanking-balances",version:"1.0.0",title:"Refresh Open Banking Balances",description:"Refreshes balances for synced accounts to surface the latest cash positions in dashboards.",domain:"finance",owners:[Y.PlatformFinance],tags:["open-banking","powens",g.Automation],stability:d.Experimental},definition:{entryStepId:"refresh-balances",steps:[{id:"refresh-balances",type:"automation",label:"Refresh Balances",description:"Trigger the Powens provider to obtain current and available balances.",action:{operation:{key:"openbanking.balances.refresh",version:"1.0.0"}},requiredIntegrations:["primaryOpenBanking"],requiredCapabilities:[x],retry:{maxAttempts:3,backoff:"exponential",delayMs:1000}},{id:"fetch-balances",type:"automation",label:"Fetch Balances",description:"Load the canonical balance snapshots for downstream workflows and dashboards.",action:{operation:{key:"openbanking.balances.get",version:"1.0.0"}},requiredIntegrations:["primaryOpenBanking"],requiredCapabilities:[x],retry:{maxAttempts:2,backoff:"linear",delayMs:750}}],transitions:[{from:"refresh-balances",to:"fetch-balances"}]}});import{OwnersEnum as P,StabilityEnum as W,TagsEnum as _}from"@contractspec/lib.contracts-spec";import{defineWorkflow as L}from"@contractspec/lib.contracts-spec/workflow/spec";var h={key:"openbanking.accounts.read",version:"1.0.0"},vx=L({meta:{key:"pfo.workflow.sync-openbanking-accounts",version:"1.0.0",title:"Synchronise Open Banking Accounts",description:"Validates Powens connectivity and synchronises bank account metadata into the canonical ledger.",domain:"finance",owners:[P.PlatformFinance],tags:["open-banking","powens",_.Automation],stability:W.Experimental},definition:{entryStepId:"sync-accounts",steps:[{id:"sync-accounts",type:"automation",label:"Sync Accounts",description:"Refresh linked bank accounts via Powens and upsert canonical BankAccount records.",action:{operation:{key:"openbanking.accounts.sync",version:"1.0.0"}},requiredIntegrations:["primaryOpenBanking"],requiredCapabilities:[h],retry:{maxAttempts:3,backoff:"exponential",delayMs:1000}},{id:"fetch-accounts",type:"automation",label:"Fetch Accounts",description:"Retrieve the latest canonical account snapshot for downstream consumers.",action:{operation:{key:"openbanking.accounts.list",version:"1.0.0"}},requiredIntegrations:["primaryOpenBanking"],requiredCapabilities:[h],retry:{maxAttempts:2,backoff:"linear",delayMs:750}}],transitions:[{from:"sync-accounts",to:"fetch-accounts"}]}});import{OwnersEnum as B,StabilityEnum as N,TagsEnum as S}from"@contractspec/lib.contracts-spec";import{defineWorkflow as O}from"@contractspec/lib.contracts-spec/workflow/spec";var j={key:"openbanking.transactions.read",version:"1.0.0"},Hx=O({meta:{key:"pfo.workflow.sync-openbanking-transactions",version:"1.0.0",title:"Synchronise Open Banking Transactions",description:"Fetches recent transactions from Powens for each linked account and stores them in the canonical ledger.",domain:"finance",owners:[B.PlatformFinance],tags:["open-banking","powens",S.Automation],stability:N.Experimental},definition:{entryStepId:"sync-transactions",steps:[{id:"sync-transactions",type:"automation",label:"Sync Transactions",description:"Call the Powens provider to pull incremental transactions for active accounts.",action:{operation:{key:"openbanking.transactions.sync",version:"1.0.0"}},requiredIntegrations:["primaryOpenBanking"],requiredCapabilities:[j],retry:{maxAttempts:4,backoff:"exponential",delayMs:1500}},{id:"list-transactions",type:"automation",label:"List Transactions",description:"Retrieve the canonical transaction list for reporting and downstream analytics.",action:{operation:{key:"openbanking.transactions.list",version:"1.0.0"}},requiredIntegrations:["primaryOpenBanking"],requiredCapabilities:[j],retry:{maxAttempts:2,backoff:"linear",delayMs:1000}}],transitions:[{from:"sync-transactions",to:"list-transactions"}]}});import{OwnersEnum as C,StabilityEnum as b,TagsEnum as f}from"@contractspec/lib.contracts-spec";import{defineWorkflow as k}from"@contractspec/lib.contracts-spec/workflow/spec";var Vx=k({meta:{key:"pfo.workflow.upcoming-payments-reminder",version:"1.0.0",title:"Schedule Upcoming Payment Reminder",description:"Collects payment metadata and schedules multi-channel reminders for bills that are due soon.",domain:"finance",owners:[C.PlatformFinance],tags:["payments","reminders",f.Automation],stability:b.Beta},definition:{entryStepId:"collect",steps:[{id:"collect",type:"human",label:"Review Upcoming Bill",description:"Confirm amount, due date, and preferred delivery channels before scheduling reminder."},{id:"schedule",type:"automation",label:"Schedule Reminder",action:{operation:{key:"pfo.reminders.schedule-payment",version:"1.0.0"}},requiredIntegrations:["emailOutbound","smsNotifications","calendarScheduling"],retry:{maxAttempts:2,backoff:"linear",delayMs:1000}}],transitions:[{from:"collect",to:"schedule",condition:"output?.confirmed === true",label:"Reminder confirmed"}]}});export{Vx as upcomingPaymentsReminderWorkflow,Hx as syncOpenBankingTransactionsWorkflow,vx as syncOpenBankingAccountsWorkflow,xx as refreshOpenBankingBalancesWorkflow,t as processUploadedDocumentWorkflow,l as ingestEmailThreadsWorkflow,A as generateOpenBankingOverviewWorkflow,I as generateFinancialSummaryWorkflow};
|
|
@@ -1,57 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
OwnersEnum,
|
|
5
|
-
StabilityEnum,
|
|
6
|
-
TagsEnum
|
|
7
|
-
} from "@contractspec/lib.contracts-spec";
|
|
8
|
-
import { defineWorkflow } from "@contractspec/lib.contracts-spec/workflow/spec";
|
|
9
|
-
var ingestEmailThreadsWorkflow = defineWorkflow({
|
|
10
|
-
meta: {
|
|
11
|
-
key: "pfo.workflow.ingest-email-threads",
|
|
12
|
-
version: "1.0.0",
|
|
13
|
-
title: "Ingest Email Threads",
|
|
14
|
-
description: "Synchronises Gmail threads tagged with finance labels and indexes them into operational knowledge spaces.",
|
|
15
|
-
domain: "communications",
|
|
16
|
-
owners: [OwnersEnum.PlatformMessaging],
|
|
17
|
-
tags: ["gmail", "knowledge", TagsEnum.Automation],
|
|
18
|
-
stability: StabilityEnum.Experimental
|
|
19
|
-
},
|
|
20
|
-
definition: {
|
|
21
|
-
entryStepId: "sync",
|
|
22
|
-
steps: [
|
|
23
|
-
{
|
|
24
|
-
id: "sync",
|
|
25
|
-
type: "automation",
|
|
26
|
-
label: "Sync Gmail Threads",
|
|
27
|
-
description: "Fetches Gmail threads and transforms them into knowledge fragments before vector indexing.",
|
|
28
|
-
action: {
|
|
29
|
-
operation: { key: "pfo.email.sync-threads", version: "1.0.0" }
|
|
30
|
-
},
|
|
31
|
-
requiredIntegrations: ["emailInbound", "primaryVectorDb"],
|
|
32
|
-
retry: {
|
|
33
|
-
maxAttempts: 3,
|
|
34
|
-
backoff: "exponential",
|
|
35
|
-
delayMs: 1000
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
id: "triage",
|
|
40
|
-
type: "human",
|
|
41
|
-
label: "Triage Exceptions",
|
|
42
|
-
description: "Operators can resolve sync failures or tag important threads for follow-up."
|
|
43
|
-
}
|
|
44
|
-
],
|
|
45
|
-
transitions: [
|
|
46
|
-
{
|
|
47
|
-
from: "sync",
|
|
48
|
-
to: "triage",
|
|
49
|
-
condition: "output?.syncedThreads === 0",
|
|
50
|
-
label: "No new threads"
|
|
51
|
-
}
|
|
52
|
-
]
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
export {
|
|
56
|
-
ingestEmailThreadsWorkflow
|
|
57
|
-
};
|
|
2
|
+
import{OwnersEnum as h,StabilityEnum as j,TagsEnum as q}from"@contractspec/lib.contracts-spec";import{defineWorkflow as v}from"@contractspec/lib.contracts-spec/workflow/spec";var A=v({meta:{key:"pfo.workflow.ingest-email-threads",version:"1.0.0",title:"Ingest Email Threads",description:"Synchronises Gmail threads tagged with finance labels and indexes them into operational knowledge spaces.",domain:"communications",owners:[h.PlatformMessaging],tags:["gmail","knowledge",q.Automation],stability:j.Experimental},definition:{entryStepId:"sync",steps:[{id:"sync",type:"automation",label:"Sync Gmail Threads",description:"Fetches Gmail threads and transforms them into knowledge fragments before vector indexing.",action:{operation:{key:"pfo.email.sync-threads",version:"1.0.0"}},requiredIntegrations:["emailInbound","primaryVectorDb"],retry:{maxAttempts:3,backoff:"exponential",delayMs:1000}},{id:"triage",type:"human",label:"Triage Exceptions",description:"Operators can resolve sync failures or tag important threads for follow-up."}],transitions:[{from:"sync",to:"triage",condition:"output?.syncedThreads === 0",label:"No new threads"}]}});export{A as ingestEmailThreadsWorkflow};
|
|
@@ -1,55 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
OwnersEnum,
|
|
5
|
-
StabilityEnum,
|
|
6
|
-
TagsEnum
|
|
7
|
-
} from "@contractspec/lib.contracts-spec";
|
|
8
|
-
import { defineWorkflow } from "@contractspec/lib.contracts-spec/workflow/spec";
|
|
9
|
-
var processUploadedDocumentWorkflow = defineWorkflow({
|
|
10
|
-
meta: {
|
|
11
|
-
key: "pfo.workflow.process-uploaded-document",
|
|
12
|
-
version: "1.0.0",
|
|
13
|
-
title: "Process Uploaded Document",
|
|
14
|
-
description: "Stores an uploaded invoice/contract, queues ingestion, and records any follow-up reminders.",
|
|
15
|
-
domain: "finance",
|
|
16
|
-
owners: [OwnersEnum.PlatformFinance],
|
|
17
|
-
tags: ["documents", "ingestion", TagsEnum.Automation],
|
|
18
|
-
stability: StabilityEnum.Experimental
|
|
19
|
-
},
|
|
20
|
-
definition: {
|
|
21
|
-
entryStepId: "store",
|
|
22
|
-
steps: [
|
|
23
|
-
{
|
|
24
|
-
id: "store",
|
|
25
|
-
type: "automation",
|
|
26
|
-
label: "Store and Queue Ingestion",
|
|
27
|
-
description: "Persist the document to storage and enqueue the knowledge ingestion pipeline.",
|
|
28
|
-
action: {
|
|
29
|
-
operation: { key: "pfo.documents.upload", version: "1.0.0" }
|
|
30
|
-
},
|
|
31
|
-
requiredIntegrations: ["primaryStorage", "primaryVectorDb"],
|
|
32
|
-
retry: {
|
|
33
|
-
maxAttempts: 3,
|
|
34
|
-
backoff: "exponential",
|
|
35
|
-
delayMs: 500
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
id: "review",
|
|
40
|
-
type: "human",
|
|
41
|
-
label: "Optional Human Classification",
|
|
42
|
-
description: "Finance lead can categorise the document while ingestion completes."
|
|
43
|
-
}
|
|
44
|
-
],
|
|
45
|
-
transitions: [
|
|
46
|
-
{
|
|
47
|
-
from: "store",
|
|
48
|
-
to: "review"
|
|
49
|
-
}
|
|
50
|
-
]
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
export {
|
|
54
|
-
processUploadedDocumentWorkflow
|
|
55
|
-
};
|
|
2
|
+
import{OwnersEnum as h,StabilityEnum as j,TagsEnum as q}from"@contractspec/lib.contracts-spec";import{defineWorkflow as v}from"@contractspec/lib.contracts-spec/workflow/spec";var A=v({meta:{key:"pfo.workflow.process-uploaded-document",version:"1.0.0",title:"Process Uploaded Document",description:"Stores an uploaded invoice/contract, queues ingestion, and records any follow-up reminders.",domain:"finance",owners:[h.PlatformFinance],tags:["documents","ingestion",q.Automation],stability:j.Experimental},definition:{entryStepId:"store",steps:[{id:"store",type:"automation",label:"Store and Queue Ingestion",description:"Persist the document to storage and enqueue the knowledge ingestion pipeline.",action:{operation:{key:"pfo.documents.upload",version:"1.0.0"}},requiredIntegrations:["primaryStorage","primaryVectorDb"],retry:{maxAttempts:3,backoff:"exponential",delayMs:500}},{id:"review",type:"human",label:"Optional Human Classification",description:"Finance lead can categorise the document while ingestion completes."}],transitions:[{from:"store",to:"review"}]}});export{A as processUploadedDocumentWorkflow};
|
|
@@ -1,65 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
OwnersEnum,
|
|
5
|
-
StabilityEnum,
|
|
6
|
-
TagsEnum
|
|
7
|
-
} from "@contractspec/lib.contracts-spec";
|
|
8
|
-
import { defineWorkflow } from "@contractspec/lib.contracts-spec/workflow/spec";
|
|
9
|
-
var BALANCE_CAPABILITY = {
|
|
10
|
-
key: "openbanking.balances.read",
|
|
11
|
-
version: "1.0.0"
|
|
12
|
-
};
|
|
13
|
-
var refreshOpenBankingBalancesWorkflow = defineWorkflow({
|
|
14
|
-
meta: {
|
|
15
|
-
key: "pfo.workflow.refresh-openbanking-balances",
|
|
16
|
-
version: "1.0.0",
|
|
17
|
-
title: "Refresh Open Banking Balances",
|
|
18
|
-
description: "Refreshes balances for synced accounts to surface the latest cash positions in dashboards.",
|
|
19
|
-
domain: "finance",
|
|
20
|
-
owners: [OwnersEnum.PlatformFinance],
|
|
21
|
-
tags: ["open-banking", "powens", TagsEnum.Automation],
|
|
22
|
-
stability: StabilityEnum.Experimental
|
|
23
|
-
},
|
|
24
|
-
definition: {
|
|
25
|
-
entryStepId: "refresh-balances",
|
|
26
|
-
steps: [
|
|
27
|
-
{
|
|
28
|
-
id: "refresh-balances",
|
|
29
|
-
type: "automation",
|
|
30
|
-
label: "Refresh Balances",
|
|
31
|
-
description: "Trigger the Powens provider to obtain current and available balances.",
|
|
32
|
-
action: {
|
|
33
|
-
operation: { key: "openbanking.balances.refresh", version: "1.0.0" }
|
|
34
|
-
},
|
|
35
|
-
requiredIntegrations: ["primaryOpenBanking"],
|
|
36
|
-
requiredCapabilities: [BALANCE_CAPABILITY],
|
|
37
|
-
retry: {
|
|
38
|
-
maxAttempts: 3,
|
|
39
|
-
backoff: "exponential",
|
|
40
|
-
delayMs: 1000
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
id: "fetch-balances",
|
|
45
|
-
type: "automation",
|
|
46
|
-
label: "Fetch Balances",
|
|
47
|
-
description: "Load the canonical balance snapshots for downstream workflows and dashboards.",
|
|
48
|
-
action: {
|
|
49
|
-
operation: { key: "openbanking.balances.get", version: "1.0.0" }
|
|
50
|
-
},
|
|
51
|
-
requiredIntegrations: ["primaryOpenBanking"],
|
|
52
|
-
requiredCapabilities: [BALANCE_CAPABILITY],
|
|
53
|
-
retry: {
|
|
54
|
-
maxAttempts: 2,
|
|
55
|
-
backoff: "linear",
|
|
56
|
-
delayMs: 750
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
],
|
|
60
|
-
transitions: [{ from: "refresh-balances", to: "fetch-balances" }]
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
export {
|
|
64
|
-
refreshOpenBankingBalancesWorkflow
|
|
65
|
-
};
|
|
2
|
+
import{OwnersEnum as j,StabilityEnum as q,TagsEnum as v}from"@contractspec/lib.contracts-spec";import{defineWorkflow as x}from"@contractspec/lib.contracts-spec/workflow/spec";var h={key:"openbanking.balances.read",version:"1.0.0"},F=x({meta:{key:"pfo.workflow.refresh-openbanking-balances",version:"1.0.0",title:"Refresh Open Banking Balances",description:"Refreshes balances for synced accounts to surface the latest cash positions in dashboards.",domain:"finance",owners:[j.PlatformFinance],tags:["open-banking","powens",v.Automation],stability:q.Experimental},definition:{entryStepId:"refresh-balances",steps:[{id:"refresh-balances",type:"automation",label:"Refresh Balances",description:"Trigger the Powens provider to obtain current and available balances.",action:{operation:{key:"openbanking.balances.refresh",version:"1.0.0"}},requiredIntegrations:["primaryOpenBanking"],requiredCapabilities:[h],retry:{maxAttempts:3,backoff:"exponential",delayMs:1000}},{id:"fetch-balances",type:"automation",label:"Fetch Balances",description:"Load the canonical balance snapshots for downstream workflows and dashboards.",action:{operation:{key:"openbanking.balances.get",version:"1.0.0"}},requiredIntegrations:["primaryOpenBanking"],requiredCapabilities:[h],retry:{maxAttempts:2,backoff:"linear",delayMs:750}}],transitions:[{from:"refresh-balances",to:"fetch-balances"}]}});export{F as refreshOpenBankingBalancesWorkflow};
|