@lssm/example.pocket-family-office 0.0.0-canary-20251220002821 → 0.0.0-canary-20251220021406

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/dist/blueprint.d.ts +4 -7
  2. package/dist/blueprint.d.ts.map +1 -1
  3. package/dist/connections/samples.d.ts +3 -7
  4. package/dist/connections/samples.d.ts.map +1 -1
  5. package/dist/contracts/index.d.ts +491 -118
  6. package/dist/contracts/index.d.ts.map +1 -1
  7. package/dist/index.d.ts +9 -16
  8. package/dist/index.d.ts.map +1 -0
  9. package/dist/index.js +89 -17
  10. package/dist/knowledge/sources.sample.d.ts +2 -6
  11. package/dist/knowledge/sources.sample.d.ts.map +1 -1
  12. package/dist/pocket-family-office.feature.d.ts +7 -7
  13. package/dist/pocket-family-office.feature.d.ts.map +1 -1
  14. package/dist/telemetry.d.ts +3 -7
  15. package/dist/telemetry.d.ts.map +1 -1
  16. package/dist/tenant.sample.d.ts +2 -6
  17. package/dist/tenant.sample.d.ts.map +1 -1
  18. package/dist/tests/pocket-family-office.test.d.ts +2 -0
  19. package/dist/tests/pocket-family-office.test.d.ts.map +1 -0
  20. package/dist/workflows/generate-financial-summary.d.ts +2 -6
  21. package/dist/workflows/generate-financial-summary.d.ts.map +1 -1
  22. package/dist/workflows/generate-openbanking-overview.d.ts +2 -6
  23. package/dist/workflows/generate-openbanking-overview.d.ts.map +1 -1
  24. package/dist/workflows/index.d.ts +9 -9
  25. package/dist/workflows/index.d.ts.map +1 -0
  26. package/dist/workflows/ingest-email-threads.d.ts +2 -6
  27. package/dist/workflows/ingest-email-threads.d.ts.map +1 -1
  28. package/dist/workflows/process-uploaded-document.d.ts +2 -6
  29. package/dist/workflows/process-uploaded-document.d.ts.map +1 -1
  30. package/dist/workflows/refresh-openbanking-balances.d.ts +2 -6
  31. package/dist/workflows/refresh-openbanking-balances.d.ts.map +1 -1
  32. package/dist/workflows/sync-openbanking-accounts.d.ts +2 -6
  33. package/dist/workflows/sync-openbanking-accounts.d.ts.map +1 -1
  34. package/dist/workflows/sync-openbanking-transactions.d.ts +2 -6
  35. package/dist/workflows/sync-openbanking-transactions.d.ts.map +1 -1
  36. package/dist/workflows/upcoming-payments-reminder.d.ts +2 -6
  37. package/dist/workflows/upcoming-payments-reminder.d.ts.map +1 -1
  38. package/package.json +12 -11
  39. package/dist/blueprint.js +0 -201
  40. package/dist/blueprint.js.map +0 -1
  41. package/dist/connections/samples.js +0 -227
  42. package/dist/connections/samples.js.map +0 -1
  43. package/dist/contracts/index.js +0 -271
  44. package/dist/contracts/index.js.map +0 -1
  45. package/dist/knowledge/sources.sample.js +0 -50
  46. package/dist/knowledge/sources.sample.js.map +0 -1
  47. package/dist/libs/contracts/dist/integrations/index.js +0 -18
  48. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +0 -227
  49. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js.map +0 -1
  50. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +0 -158
  51. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js.map +0 -1
  52. package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +0 -3
  53. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +0 -209
  54. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js.map +0 -1
  55. package/dist/libs/contracts/dist/integrations/openbanking/models.js +0 -241
  56. package/dist/libs/contracts/dist/integrations/openbanking/models.js.map +0 -1
  57. package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +0 -26
  58. package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js.map +0 -1
  59. package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +0 -53
  60. package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js.map +0 -1
  61. package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +0 -76
  62. package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js.map +0 -1
  63. package/dist/libs/contracts/dist/integrations/providers/gmail.js +0 -88
  64. package/dist/libs/contracts/dist/integrations/providers/gmail.js.map +0 -1
  65. package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +0 -67
  66. package/dist/libs/contracts/dist/integrations/providers/google-calendar.js.map +0 -1
  67. package/dist/libs/contracts/dist/integrations/providers/index.js +0 -11
  68. package/dist/libs/contracts/dist/integrations/providers/mistral.js +0 -69
  69. package/dist/libs/contracts/dist/integrations/providers/mistral.js.map +0 -1
  70. package/dist/libs/contracts/dist/integrations/providers/postmark.js +0 -69
  71. package/dist/libs/contracts/dist/integrations/providers/postmark.js.map +0 -1
  72. package/dist/libs/contracts/dist/integrations/providers/powens.js +0 -117
  73. package/dist/libs/contracts/dist/integrations/providers/powens.js.map +0 -1
  74. package/dist/libs/contracts/dist/integrations/providers/qdrant.js +0 -74
  75. package/dist/libs/contracts/dist/integrations/providers/qdrant.js.map +0 -1
  76. package/dist/libs/contracts/dist/integrations/providers/registry.js +0 -10
  77. package/dist/libs/contracts/dist/integrations/providers/stripe.js +0 -84
  78. package/dist/libs/contracts/dist/integrations/providers/stripe.js.map +0 -1
  79. package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +0 -62
  80. package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js.map +0 -1
  81. package/dist/libs/contracts/dist/ownership.js +0 -38
  82. package/dist/libs/contracts/dist/ownership.js.map +0 -1
  83. package/dist/libs/contracts/dist/schema/dist/index.js +0 -3873
  84. package/dist/libs/contracts/dist/schema/dist/index.js.map +0 -1
  85. package/dist/libs/contracts/dist/spec.js +0 -35
  86. package/dist/libs/contracts/dist/spec.js.map +0 -1
  87. package/dist/pocket-family-office.feature.js +0 -47
  88. package/dist/pocket-family-office.feature.js.map +0 -1
  89. package/dist/telemetry.js +0 -171
  90. package/dist/telemetry.js.map +0 -1
  91. package/dist/tenant.sample.js +0 -90
  92. package/dist/tenant.sample.js.map +0 -1
  93. package/dist/workflows/generate-financial-summary.js +0 -61
  94. package/dist/workflows/generate-financial-summary.js.map +0 -1
  95. package/dist/workflows/generate-openbanking-overview.js +0 -58
  96. package/dist/workflows/generate-openbanking-overview.js.map +0 -1
  97. package/dist/workflows/index.js +0 -10
  98. package/dist/workflows/ingest-email-threads.js +0 -53
  99. package/dist/workflows/ingest-email-threads.js.map +0 -1
  100. package/dist/workflows/process-uploaded-document.js +0 -51
  101. package/dist/workflows/process-uploaded-document.js.map +0 -1
  102. package/dist/workflows/refresh-openbanking-balances.js +0 -67
  103. package/dist/workflows/refresh-openbanking-balances.js.map +0 -1
  104. package/dist/workflows/sync-openbanking-accounts.js +0 -67
  105. package/dist/workflows/sync-openbanking-accounts.js.map +0 -1
  106. package/dist/workflows/sync-openbanking-transactions.js +0 -67
  107. package/dist/workflows/sync-openbanking-transactions.js.map +0 -1
  108. package/dist/workflows/upcoming-payments-reminder.js +0 -56
  109. package/dist/workflows/upcoming-payments-reminder.js.map +0 -1
@@ -1,227 +0,0 @@
1
- import { E5, x8 } from "../../../schema/dist/index.js";
2
- import { BankAccountRecord } from "../models.js";
3
- import { OPENBANKING_TELEMETRY_EVENTS } from "../telemetry.js";
4
- import { defineCommand, defineQuery } from "../../../spec.js";
5
-
6
- //#region ../../libs/contracts/dist/integrations/openbanking/contracts/accounts.js
7
- const OpenBankingListAccountsInput = new x8({
8
- name: "OpenBankingListAccountsInput",
9
- description: "Parameters for listing bank accounts through the open banking provider.",
10
- fields: {
11
- tenantId: {
12
- type: E5.ID(),
13
- isOptional: false
14
- },
15
- userId: {
16
- type: E5.ID(),
17
- isOptional: false
18
- },
19
- connectionId: {
20
- type: E5.ID(),
21
- isOptional: true
22
- },
23
- includeBalances: {
24
- type: E5.Boolean(),
25
- isOptional: true
26
- },
27
- institutionId: {
28
- type: E5.String_unsecure(),
29
- isOptional: true
30
- },
31
- cursor: {
32
- type: E5.String_unsecure(),
33
- isOptional: true
34
- },
35
- pageSize: {
36
- type: E5.Int_unsecure(),
37
- isOptional: true
38
- }
39
- }
40
- });
41
- const OpenBankingListAccountsOutput = new x8({
42
- name: "OpenBankingListAccountsOutput",
43
- description: "Paginated list of bank accounts available to the tenant and user.",
44
- fields: {
45
- accounts: {
46
- type: BankAccountRecord,
47
- isOptional: false,
48
- isArray: true
49
- },
50
- nextCursor: {
51
- type: E5.String_unsecure(),
52
- isOptional: true
53
- },
54
- hasMore: {
55
- type: E5.Boolean(),
56
- isOptional: true
57
- }
58
- }
59
- });
60
- const OpenBankingGetAccountInput = new x8({
61
- name: "OpenBankingGetAccountInput",
62
- description: "Parameters for retrieving a specific bank account.",
63
- fields: {
64
- tenantId: {
65
- type: E5.ID(),
66
- isOptional: false
67
- },
68
- accountId: {
69
- type: E5.ID(),
70
- isOptional: false
71
- },
72
- includeBalances: {
73
- type: E5.Boolean(),
74
- isOptional: true
75
- },
76
- includeLatestTransactions: {
77
- type: E5.Boolean(),
78
- isOptional: true
79
- }
80
- }
81
- });
82
- const OpenBankingSyncAccountsInput = new x8({
83
- name: "OpenBankingSyncAccountsInput",
84
- description: "Command payload to trigger an account synchronisation against the open banking provider.",
85
- fields: {
86
- tenantId: {
87
- type: E5.ID(),
88
- isOptional: false
89
- },
90
- userId: {
91
- type: E5.ID(),
92
- isOptional: true
93
- },
94
- connectionId: {
95
- type: E5.ID(),
96
- isOptional: false
97
- },
98
- accountIds: {
99
- type: E5.ID(),
100
- isArray: true,
101
- isOptional: true
102
- },
103
- forceFullRefresh: {
104
- type: E5.Boolean(),
105
- isOptional: true
106
- },
107
- triggerWorkflows: {
108
- type: E5.Boolean(),
109
- isOptional: true
110
- }
111
- }
112
- });
113
- const OpenBankingSyncAccountsOutput = new x8({
114
- name: "OpenBankingSyncAccountsOutput",
115
- description: "Result of a bank account synchronisation run.",
116
- fields: {
117
- synced: {
118
- type: E5.Int_unsecure(),
119
- isOptional: false
120
- },
121
- failed: {
122
- type: E5.Int_unsecure(),
123
- isOptional: false
124
- },
125
- errors: {
126
- type: E5.String_unsecure(),
127
- isArray: true,
128
- isOptional: true
129
- },
130
- nextSyncSuggestedAt: {
131
- type: E5.DateTime(),
132
- isOptional: true
133
- }
134
- }
135
- });
136
- const OpenBankingListAccounts = defineQuery({
137
- meta: {
138
- name: "openbanking.accounts.list",
139
- version: 1,
140
- description: "List bank accounts available to a tenant/user via Powens Open Banking.",
141
- goal: "Provide downstream workflows with the set of accounts accessible via the configured open banking connection.",
142
- context: "Used by Pocket Family Office dashboards and sync workflows to enumerate bank accounts prior to syncing balances or transactions.",
143
- owners: ["platform.finance"],
144
- tags: [
145
- "open-banking",
146
- "powens",
147
- "accounts"
148
- ],
149
- stability: "experimental"
150
- },
151
- io: {
152
- input: OpenBankingListAccountsInput,
153
- output: OpenBankingListAccountsOutput
154
- },
155
- policy: { auth: "user" }
156
- });
157
- const OpenBankingGetAccount = defineQuery({
158
- meta: {
159
- name: "openbanking.accounts.get",
160
- version: 1,
161
- description: "Retrieve the canonical bank account record for the given account identifier.",
162
- goal: "Allow user-facing experiences and automations to display up-to-date account metadata.",
163
- context: "Invoked by UI surfaces and workflow automation steps that require detailed metadata for a specific bank account.",
164
- owners: ["platform.finance"],
165
- tags: [
166
- "open-banking",
167
- "powens",
168
- "accounts"
169
- ],
170
- stability: "experimental"
171
- },
172
- io: {
173
- input: OpenBankingGetAccountInput,
174
- output: BankAccountRecord
175
- },
176
- policy: { auth: "user" }
177
- });
178
- const OpenBankingSyncAccounts = defineCommand({
179
- meta: {
180
- name: "openbanking.accounts.sync",
181
- version: 1,
182
- description: "Initiate a synchronisation run to refresh bank account metadata from Powens.",
183
- goal: "Keep canonical bank account records aligned with the external open banking provider.",
184
- context: "Triggered by scheduled workflows or manual operator actions to reconcile account metadata prior to transaction/balance syncs.",
185
- owners: ["platform.finance"],
186
- tags: [
187
- "open-banking",
188
- "powens",
189
- "accounts"
190
- ],
191
- stability: "experimental"
192
- },
193
- io: {
194
- input: OpenBankingSyncAccountsInput,
195
- output: OpenBankingSyncAccountsOutput
196
- },
197
- policy: { auth: "admin" },
198
- telemetry: {
199
- success: {
200
- event: { name: OPENBANKING_TELEMETRY_EVENTS.accountsSynced },
201
- properties: ({ input, output }) => {
202
- const payload = input;
203
- const result = output;
204
- return {
205
- tenantId: payload?.tenantId,
206
- connectionId: payload?.connectionId,
207
- synced: result?.synced,
208
- failed: result?.failed
209
- };
210
- }
211
- },
212
- failure: {
213
- event: { name: OPENBANKING_TELEMETRY_EVENTS.accountsSyncFailed },
214
- properties: ({ input, error }) => {
215
- const payload = input;
216
- return {
217
- tenantId: payload?.tenantId,
218
- connectionId: payload?.connectionId,
219
- error: error instanceof Error ? error.message : String(error ?? "unknown")
220
- };
221
- }
222
- }
223
- }
224
- });
225
-
226
- //#endregion
227
- //# sourceMappingURL=accounts.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"accounts.js","names":[],"sources":["../../../../../../../../../libs/contracts/dist/integrations/openbanking/contracts/accounts.js"],"sourcesContent":["import { E5, x8 } from \"../../../schema/dist/index.js\";\nimport { defineCommand, defineQuery } from \"../../../spec.js\";\nimport { BankAccountRecord } from \"../models.js\";\nimport { OPENBANKING_TELEMETRY_EVENTS } from \"../telemetry.js\";\n\n//#region src/integrations/openbanking/contracts/accounts.ts\nconst OpenBankingListAccountsInput = new x8({\n\tname: \"OpenBankingListAccountsInput\",\n\tdescription: \"Parameters for listing bank accounts through the open banking provider.\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tuserId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tconnectionId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: true\n\t\t},\n\t\tincludeBalances: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: true\n\t\t},\n\t\tinstitutionId: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tcursor: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tpageSize: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingListAccountsOutput = new x8({\n\tname: \"OpenBankingListAccountsOutput\",\n\tdescription: \"Paginated list of bank accounts available to the tenant and user.\",\n\tfields: {\n\t\taccounts: {\n\t\t\ttype: BankAccountRecord,\n\t\t\tisOptional: false,\n\t\t\tisArray: true\n\t\t},\n\t\tnextCursor: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\thasMore: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingGetAccountInput = new x8({\n\tname: \"OpenBankingGetAccountInput\",\n\tdescription: \"Parameters for retrieving a specific bank account.\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\taccountId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tincludeBalances: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: true\n\t\t},\n\t\tincludeLatestTransactions: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingSyncAccountsInput = new x8({\n\tname: \"OpenBankingSyncAccountsInput\",\n\tdescription: \"Command payload to trigger an account synchronisation against the open banking provider.\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tuserId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: true\n\t\t},\n\t\tconnectionId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\taccountIds: {\n\t\t\ttype: E5.ID(),\n\t\t\tisArray: true,\n\t\t\tisOptional: true\n\t\t},\n\t\tforceFullRefresh: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: true\n\t\t},\n\t\ttriggerWorkflows: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingSyncAccountsOutput = new x8({\n\tname: \"OpenBankingSyncAccountsOutput\",\n\tdescription: \"Result of a bank account synchronisation run.\",\n\tfields: {\n\t\tsynced: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tfailed: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\terrors: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisArray: true,\n\t\t\tisOptional: true\n\t\t},\n\t\tnextSyncSuggestedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingListAccounts = defineQuery({\n\tmeta: {\n\t\tname: \"openbanking.accounts.list\",\n\t\tversion: 1,\n\t\tdescription: \"List bank accounts available to a tenant/user via Powens Open Banking.\",\n\t\tgoal: \"Provide downstream workflows with the set of accounts accessible via the configured open banking connection.\",\n\t\tcontext: \"Used by Pocket Family Office dashboards and sync workflows to enumerate bank accounts prior to syncing balances or transactions.\",\n\t\towners: [\"platform.finance\"],\n\t\ttags: [\n\t\t\t\"open-banking\",\n\t\t\t\"powens\",\n\t\t\t\"accounts\"\n\t\t],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: OpenBankingListAccountsInput,\n\t\toutput: OpenBankingListAccountsOutput\n\t},\n\tpolicy: { auth: \"user\" }\n});\nconst OpenBankingGetAccount = defineQuery({\n\tmeta: {\n\t\tname: \"openbanking.accounts.get\",\n\t\tversion: 1,\n\t\tdescription: \"Retrieve the canonical bank account record for the given account identifier.\",\n\t\tgoal: \"Allow user-facing experiences and automations to display up-to-date account metadata.\",\n\t\tcontext: \"Invoked by UI surfaces and workflow automation steps that require detailed metadata for a specific bank account.\",\n\t\towners: [\"platform.finance\"],\n\t\ttags: [\n\t\t\t\"open-banking\",\n\t\t\t\"powens\",\n\t\t\t\"accounts\"\n\t\t],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: OpenBankingGetAccountInput,\n\t\toutput: BankAccountRecord\n\t},\n\tpolicy: { auth: \"user\" }\n});\nconst OpenBankingSyncAccounts = defineCommand({\n\tmeta: {\n\t\tname: \"openbanking.accounts.sync\",\n\t\tversion: 1,\n\t\tdescription: \"Initiate a synchronisation run to refresh bank account metadata from Powens.\",\n\t\tgoal: \"Keep canonical bank account records aligned with the external open banking provider.\",\n\t\tcontext: \"Triggered by scheduled workflows or manual operator actions to reconcile account metadata prior to transaction/balance syncs.\",\n\t\towners: [\"platform.finance\"],\n\t\ttags: [\n\t\t\t\"open-banking\",\n\t\t\t\"powens\",\n\t\t\t\"accounts\"\n\t\t],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: OpenBankingSyncAccountsInput,\n\t\toutput: OpenBankingSyncAccountsOutput\n\t},\n\tpolicy: { auth: \"admin\" },\n\ttelemetry: {\n\t\tsuccess: {\n\t\t\tevent: { name: OPENBANKING_TELEMETRY_EVENTS.accountsSynced },\n\t\t\tproperties: ({ input, output }) => {\n\t\t\t\tconst payload = input;\n\t\t\t\tconst result = output;\n\t\t\t\treturn {\n\t\t\t\t\ttenantId: payload?.tenantId,\n\t\t\t\t\tconnectionId: payload?.connectionId,\n\t\t\t\t\tsynced: result?.synced,\n\t\t\t\t\tfailed: result?.failed\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t\tfailure: {\n\t\t\tevent: { name: OPENBANKING_TELEMETRY_EVENTS.accountsSyncFailed },\n\t\t\tproperties: ({ input, error }) => {\n\t\t\t\tconst payload = input;\n\t\t\t\treturn {\n\t\t\t\t\ttenantId: payload?.tenantId,\n\t\t\t\t\tconnectionId: payload?.connectionId,\n\t\t\t\t\terror: error instanceof Error ? error.message : String(error ?? \"unknown\")\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n});\nconst openBankingAccountContracts = {\n\tOpenBankingListAccounts,\n\tOpenBankingGetAccount,\n\tOpenBankingSyncAccounts\n};\nfunction registerOpenBankingAccountContracts(registry) {\n\treturn registry.register(OpenBankingListAccounts).register(OpenBankingGetAccount).register(OpenBankingSyncAccounts);\n}\n\n//#endregion\nexport { OpenBankingGetAccount, OpenBankingListAccounts, OpenBankingSyncAccounts, openBankingAccountContracts, registerOpenBankingAccountContracts };"],"mappings":";;;;;;AAMA,MAAM,+BAA+B,IAAI,GAAG;CAC3C,MAAM;CACN,aAAa;CACb,QAAQ;EACP,UAAU;GACT,MAAM,GAAG,IAAI;GACb,YAAY;GACZ;EACD,QAAQ;GACP,MAAM,GAAG,IAAI;GACb,YAAY;GACZ;EACD,cAAc;GACb,MAAM,GAAG,IAAI;GACb,YAAY;GACZ;EACD,iBAAiB;GAChB,MAAM,GAAG,SAAS;GAClB,YAAY;GACZ;EACD,eAAe;GACd,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,QAAQ;GACP,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,UAAU;GACT,MAAM,GAAG,cAAc;GACvB,YAAY;GACZ;EACD;CACD,CAAC;AACF,MAAM,gCAAgC,IAAI,GAAG;CAC5C,MAAM;CACN,aAAa;CACb,QAAQ;EACP,UAAU;GACT,MAAM;GACN,YAAY;GACZ,SAAS;GACT;EACD,YAAY;GACX,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,SAAS;GACR,MAAM,GAAG,SAAS;GAClB,YAAY;GACZ;EACD;CACD,CAAC;AACF,MAAM,6BAA6B,IAAI,GAAG;CACzC,MAAM;CACN,aAAa;CACb,QAAQ;EACP,UAAU;GACT,MAAM,GAAG,IAAI;GACb,YAAY;GACZ;EACD,WAAW;GACV,MAAM,GAAG,IAAI;GACb,YAAY;GACZ;EACD,iBAAiB;GAChB,MAAM,GAAG,SAAS;GAClB,YAAY;GACZ;EACD,2BAA2B;GAC1B,MAAM,GAAG,SAAS;GAClB,YAAY;GACZ;EACD;CACD,CAAC;AACF,MAAM,+BAA+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MAAM;EACL,MAAM;EACN,SAAS;EACT,aAAa;EACb,MAAM;EACN,SAAS;EACT,QAAQ,CAAC,mBAAmB;EAC5B,MAAM;GACL;GACA;GACA;GACA;EACD,WAAW;EACX;CACD,IAAI;EACH,OAAO;EACP,QAAQ;EACR;CACD,QAAQ,EAAE,MAAM,SAAS;CACzB,WAAW;EACV,SAAS;GACR,OAAO,EAAE,MAAM,6BAA6B,gBAAgB;GAC5D,aAAa,EAAE,OAAO,aAAa;IAClC,MAAM,UAAU;IAChB,MAAM,SAAS;AACf,WAAO;KACN,UAAU,SAAS;KACnB,cAAc,SAAS;KACvB,QAAQ,QAAQ;KAChB,QAAQ,QAAQ;KAChB;;GAEF;EACD,SAAS;GACR,OAAO,EAAE,MAAM,6BAA6B,oBAAoB;GAChE,aAAa,EAAE,OAAO,YAAY;IACjC,MAAM,UAAU;AAChB,WAAO;KACN,UAAU,SAAS;KACnB,cAAc,SAAS;KACvB,OAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,SAAS,UAAU;KAC1E;;GAEF;EACD;CACD,CAAC"}
@@ -1,158 +0,0 @@
1
- import { E5, x8 } from "../../../schema/dist/index.js";
2
- import { AccountBalanceRecord } from "../models.js";
3
- import { OPENBANKING_TELEMETRY_EVENTS } from "../telemetry.js";
4
- import { defineCommand, defineQuery } from "../../../spec.js";
5
-
6
- //#region ../../libs/contracts/dist/integrations/openbanking/contracts/balances.js
7
- const OpenBankingGetBalancesInput = new x8({
8
- name: "OpenBankingGetBalancesInput",
9
- description: "Parameters for retrieving bank account balances from the canonical ledger.",
10
- fields: {
11
- tenantId: {
12
- type: E5.ID(),
13
- isOptional: false
14
- },
15
- accountId: {
16
- type: E5.ID(),
17
- isOptional: false
18
- },
19
- balanceTypes: {
20
- type: E5.String_unsecure(),
21
- isArray: true,
22
- isOptional: true
23
- }
24
- }
25
- });
26
- const OpenBankingGetBalancesOutput = new x8({
27
- name: "OpenBankingGetBalancesOutput",
28
- description: "Canonical balances for a bank account.",
29
- fields: {
30
- balances: {
31
- type: AccountBalanceRecord,
32
- isOptional: false,
33
- isArray: true
34
- },
35
- asOf: {
36
- type: E5.DateTime(),
37
- isOptional: true
38
- }
39
- }
40
- });
41
- const OpenBankingRefreshBalancesInput = new x8({
42
- name: "OpenBankingRefreshBalancesInput",
43
- description: "Command payload to refresh balances for a bank account via the open banking provider.",
44
- fields: {
45
- tenantId: {
46
- type: E5.ID(),
47
- isOptional: false
48
- },
49
- accountId: {
50
- type: E5.ID(),
51
- isOptional: false
52
- },
53
- connectionId: {
54
- type: E5.ID(),
55
- isOptional: true
56
- },
57
- balanceTypes: {
58
- type: E5.String_unsecure(),
59
- isArray: true,
60
- isOptional: true
61
- },
62
- forceRefresh: {
63
- type: E5.Boolean(),
64
- isOptional: true
65
- }
66
- }
67
- });
68
- const OpenBankingRefreshBalancesOutput = new x8({
69
- name: "OpenBankingRefreshBalancesOutput",
70
- description: "Result of a balance refresh against the open banking provider.",
71
- fields: {
72
- balances: {
73
- type: AccountBalanceRecord,
74
- isOptional: false,
75
- isArray: true
76
- },
77
- refreshedAt: {
78
- type: E5.DateTime(),
79
- isOptional: false
80
- },
81
- errors: {
82
- type: E5.String_unsecure(),
83
- isArray: true,
84
- isOptional: true
85
- }
86
- }
87
- });
88
- const OpenBankingGetBalances = defineQuery({
89
- meta: {
90
- name: "openbanking.balances.get",
91
- version: 1,
92
- description: "Retrieve the latest cached balances for a bank account.",
93
- goal: "Expose current and available balances required by dashboards and analytics.",
94
- context: "Used by Pocket Family Office UI surfaces and automation steps that require balance totals prior to generating summaries.",
95
- owners: ["platform.finance"],
96
- tags: [
97
- "open-banking",
98
- "powens",
99
- "balances"
100
- ],
101
- stability: "experimental"
102
- },
103
- io: {
104
- input: OpenBankingGetBalancesInput,
105
- output: OpenBankingGetBalancesOutput
106
- },
107
- policy: { auth: "user" }
108
- });
109
- const OpenBankingRefreshBalances = defineCommand({
110
- meta: {
111
- name: "openbanking.balances.refresh",
112
- version: 1,
113
- description: "Refresh balances for a bank account via the configured open banking provider.",
114
- goal: "Ensure canonical balance records reflect the latest values from Powens.",
115
- context: "Triggered by scheduled workflows before generating summaries or forecasting cashflow.",
116
- owners: ["platform.finance"],
117
- tags: [
118
- "open-banking",
119
- "powens",
120
- "balances"
121
- ],
122
- stability: "experimental"
123
- },
124
- io: {
125
- input: OpenBankingRefreshBalancesInput,
126
- output: OpenBankingRefreshBalancesOutput
127
- },
128
- policy: { auth: "admin" },
129
- telemetry: {
130
- success: {
131
- event: { name: OPENBANKING_TELEMETRY_EVENTS.balancesRefreshed },
132
- properties: ({ input, output }) => {
133
- const payload = input;
134
- const result = output;
135
- return {
136
- tenantId: payload?.tenantId,
137
- accountId: payload?.accountId,
138
- refreshedAt: result?.refreshedAt,
139
- balanceCount: Array.isArray(result?.balances) ? result?.balances.length : void 0
140
- };
141
- }
142
- },
143
- failure: {
144
- event: { name: OPENBANKING_TELEMETRY_EVENTS.balancesRefreshFailed },
145
- properties: ({ input, error }) => {
146
- const payload = input;
147
- return {
148
- tenantId: payload?.tenantId,
149
- accountId: payload?.accountId,
150
- error: error instanceof Error ? error.message : String(error ?? "unknown")
151
- };
152
- }
153
- }
154
- }
155
- });
156
-
157
- //#endregion
158
- //# sourceMappingURL=balances.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"balances.js","names":[],"sources":["../../../../../../../../../libs/contracts/dist/integrations/openbanking/contracts/balances.js"],"sourcesContent":["import { E5, x8 } from \"../../../schema/dist/index.js\";\nimport { defineCommand, defineQuery } from \"../../../spec.js\";\nimport { AccountBalanceRecord } from \"../models.js\";\nimport { OPENBANKING_TELEMETRY_EVENTS } from \"../telemetry.js\";\n\n//#region src/integrations/openbanking/contracts/balances.ts\nconst OpenBankingGetBalancesInput = new x8({\n\tname: \"OpenBankingGetBalancesInput\",\n\tdescription: \"Parameters for retrieving bank account balances from the canonical ledger.\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\taccountId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tbalanceTypes: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisArray: true,\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingGetBalancesOutput = new x8({\n\tname: \"OpenBankingGetBalancesOutput\",\n\tdescription: \"Canonical balances for a bank account.\",\n\tfields: {\n\t\tbalances: {\n\t\t\ttype: AccountBalanceRecord,\n\t\t\tisOptional: false,\n\t\t\tisArray: true\n\t\t},\n\t\tasOf: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingRefreshBalancesInput = new x8({\n\tname: \"OpenBankingRefreshBalancesInput\",\n\tdescription: \"Command payload to refresh balances for a bank account via the open banking provider.\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\taccountId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tconnectionId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: true\n\t\t},\n\t\tbalanceTypes: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisArray: true,\n\t\t\tisOptional: true\n\t\t},\n\t\tforceRefresh: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingRefreshBalancesOutput = new x8({\n\tname: \"OpenBankingRefreshBalancesOutput\",\n\tdescription: \"Result of a balance refresh against the open banking provider.\",\n\tfields: {\n\t\tbalances: {\n\t\t\ttype: AccountBalanceRecord,\n\t\t\tisOptional: false,\n\t\t\tisArray: true\n\t\t},\n\t\trefreshedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: false\n\t\t},\n\t\terrors: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisArray: true,\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingGetBalances = defineQuery({\n\tmeta: {\n\t\tname: \"openbanking.balances.get\",\n\t\tversion: 1,\n\t\tdescription: \"Retrieve the latest cached balances for a bank account.\",\n\t\tgoal: \"Expose current and available balances required by dashboards and analytics.\",\n\t\tcontext: \"Used by Pocket Family Office UI surfaces and automation steps that require balance totals prior to generating summaries.\",\n\t\towners: [\"platform.finance\"],\n\t\ttags: [\n\t\t\t\"open-banking\",\n\t\t\t\"powens\",\n\t\t\t\"balances\"\n\t\t],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: OpenBankingGetBalancesInput,\n\t\toutput: OpenBankingGetBalancesOutput\n\t},\n\tpolicy: { auth: \"user\" }\n});\nconst OpenBankingRefreshBalances = defineCommand({\n\tmeta: {\n\t\tname: \"openbanking.balances.refresh\",\n\t\tversion: 1,\n\t\tdescription: \"Refresh balances for a bank account via the configured open banking provider.\",\n\t\tgoal: \"Ensure canonical balance records reflect the latest values from Powens.\",\n\t\tcontext: \"Triggered by scheduled workflows before generating summaries or forecasting cashflow.\",\n\t\towners: [\"platform.finance\"],\n\t\ttags: [\n\t\t\t\"open-banking\",\n\t\t\t\"powens\",\n\t\t\t\"balances\"\n\t\t],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: OpenBankingRefreshBalancesInput,\n\t\toutput: OpenBankingRefreshBalancesOutput\n\t},\n\tpolicy: { auth: \"admin\" },\n\ttelemetry: {\n\t\tsuccess: {\n\t\t\tevent: { name: OPENBANKING_TELEMETRY_EVENTS.balancesRefreshed },\n\t\t\tproperties: ({ input, output }) => {\n\t\t\t\tconst payload = input;\n\t\t\t\tconst result = output;\n\t\t\t\treturn {\n\t\t\t\t\ttenantId: payload?.tenantId,\n\t\t\t\t\taccountId: payload?.accountId,\n\t\t\t\t\trefreshedAt: result?.refreshedAt,\n\t\t\t\t\tbalanceCount: Array.isArray(result?.balances) ? result?.balances.length : void 0\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t\tfailure: {\n\t\t\tevent: { name: OPENBANKING_TELEMETRY_EVENTS.balancesRefreshFailed },\n\t\t\tproperties: ({ input, error }) => {\n\t\t\t\tconst payload = input;\n\t\t\t\treturn {\n\t\t\t\t\ttenantId: payload?.tenantId,\n\t\t\t\t\taccountId: payload?.accountId,\n\t\t\t\t\terror: error instanceof Error ? error.message : String(error ?? \"unknown\")\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n});\nconst openBankingBalanceContracts = {\n\tOpenBankingGetBalances,\n\tOpenBankingRefreshBalances\n};\nfunction registerOpenBankingBalanceContracts(registry) {\n\treturn registry.register(OpenBankingGetBalances).register(OpenBankingRefreshBalances);\n}\n\n//#endregion\nexport { OpenBankingGetBalances, OpenBankingRefreshBalances, openBankingBalanceContracts, registerOpenBankingBalanceContracts };"],"mappings":";;;;;;AAMA,MAAM,8BAA8B,IAAI,GAAG;CAC1C,MAAM;CACN,aAAa;CACb,QAAQ;EACP,UAAU;GACT,MAAM,GAAG,IAAI;GACb,YAAY;GACZ;EACD,WAAW;GACV,MAAM,GAAG,IAAI;GACb,YAAY;GACZ;EACD,cAAc;GACb,MAAM,GAAG,iBAAiB;GAC1B,SAAS;GACT,YAAY;GACZ;EACD;CACD,CAAC;AACF,MAAM,+BAA+B,IAAI,GAAG;CAC3C,MAAM;CACN,aAAa;CACb,QAAQ;EACP,UAAU;GACT,MAAM;GACN,YAAY;GACZ,SAAS;GACT;EACD,MAAM;GACL,MAAM,GAAG,UAAU;GACnB,YAAY;GACZ;EACD;CACD,CAAC;AACF,MAAM,kCAAkC,IAAI,GAAG;CAC9C,MAAM;CACN,aAAa;CACb,QAAQ;EACP,UAAU;GACT,MAAM,GAAG,IAAI;GACb,YAAY;GACZ;EACD,WAAW;GACV,MAAM,GAAG,IAAI;GACb,YAAY;GACZ;EACD,cAAc;GACb,MAAM,GAAG,IAAI;GACb,YAAY;GACZ;EACD,cAAc;GACb,MAAM,GAAG,iBAAiB;GAC1B,SAAS;GACT,YAAY;GACZ;EACD,cAAc;GACb,MAA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AQ,MAAM,UAAU,OAAO,SAAS,UAAU;KAC1E;;GAEF;EACD;CACD,CAAC"}
@@ -1,3 +0,0 @@
1
- import "./accounts.js";
2
- import "./transactions.js";
3
- import "./balances.js";
@@ -1,209 +0,0 @@
1
- import { E5, x8 } from "../../../schema/dist/index.js";
2
- import { BankTransactionRecord } from "../models.js";
3
- import { OPENBANKING_TELEMETRY_EVENTS } from "../telemetry.js";
4
- import { defineCommand, defineQuery } from "../../../spec.js";
5
-
6
- //#region ../../libs/contracts/dist/integrations/openbanking/contracts/transactions.js
7
- const OpenBankingListTransactionsInput = new x8({
8
- name: "OpenBankingListTransactionsInput",
9
- description: "Parameters for listing bank transactions from the canonical ledger.",
10
- fields: {
11
- tenantId: {
12
- type: E5.ID(),
13
- isOptional: false
14
- },
15
- accountId: {
16
- type: E5.ID(),
17
- isOptional: false
18
- },
19
- from: {
20
- type: E5.DateTime(),
21
- isOptional: true
22
- },
23
- to: {
24
- type: E5.DateTime(),
25
- isOptional: true
26
- },
27
- cursor: {
28
- type: E5.String_unsecure(),
29
- isOptional: true
30
- },
31
- pageSize: {
32
- type: E5.Int_unsecure(),
33
- isOptional: true
34
- },
35
- direction: {
36
- type: E5.String_unsecure(),
37
- isOptional: true
38
- },
39
- minimumAmount: {
40
- type: E5.Float_unsecure(),
41
- isOptional: true
42
- },
43
- maximumAmount: {
44
- type: E5.Float_unsecure(),
45
- isOptional: true
46
- },
47
- category: {
48
- type: E5.String_unsecure(),
49
- isOptional: true
50
- }
51
- }
52
- });
53
- const OpenBankingListTransactionsOutput = new x8({
54
- name: "OpenBankingListTransactionsOutput",
55
- description: "Paginated list of transactions for a bank account.",
56
- fields: {
57
- transactions: {
58
- type: BankTransactionRecord,
59
- isOptional: false,
60
- isArray: true
61
- },
62
- nextCursor: {
63
- type: E5.String_unsecure(),
64
- isOptional: true
65
- },
66
- hasMore: {
67
- type: E5.Boolean(),
68
- isOptional: true
69
- }
70
- }
71
- });
72
- const OpenBankingSyncTransactionsInput = new x8({
73
- name: "OpenBankingSyncTransactionsInput",
74
- description: "Command payload to synchronise transactions from the open banking provider into the canonical ledger.",
75
- fields: {
76
- tenantId: {
77
- type: E5.ID(),
78
- isOptional: false
79
- },
80
- accountId: {
81
- type: E5.ID(),
82
- isOptional: false
83
- },
84
- from: {
85
- type: E5.DateTime(),
86
- isOptional: true
87
- },
88
- to: {
89
- type: E5.DateTime(),
90
- isOptional: true
91
- },
92
- connectionId: {
93
- type: E5.ID(),
94
- isOptional: true
95
- },
96
- includePending: {
97
- type: E5.Boolean(),
98
- isOptional: true
99
- },
100
- backfillDays: {
101
- type: E5.Int_unsecure(),
102
- isOptional: true
103
- }
104
- }
105
- });
106
- const OpenBankingSyncTransactionsOutput = new x8({
107
- name: "OpenBankingSyncTransactionsOutput",
108
- description: "Result of a transaction synchronisation run.",
109
- fields: {
110
- synced: {
111
- type: E5.Int_unsecure(),
112
- isOptional: false
113
- },
114
- failed: {
115
- type: E5.Int_unsecure(),
116
- isOptional: false
117
- },
118
- earliestSyncedAt: {
119
- type: E5.DateTime(),
120
- isOptional: true
121
- },
122
- latestSyncedAt: {
123
- type: E5.DateTime(),
124
- isOptional: true
125
- },
126
- nextSinceToken: {
127
- type: E5.String_unsecure(),
128
- isOptional: true
129
- },
130
- errors: {
131
- type: E5.String_unsecure(),
132
- isArray: true,
133
- isOptional: true
134
- }
135
- }
136
- });
137
- const OpenBankingListTransactions = defineQuery({
138
- meta: {
139
- name: "openbanking.transactions.list",
140
- version: 1,
141
- description: "List bank transactions that have been normalised into the canonical ledger.",
142
- goal: "Allow downstream analytics and UI surfaces to page through canonical bank transactions.",
143
- context: "Used by Pocket Family Office dashboards, reconciliation workflows, and analytics data views.",
144
- owners: ["platform.finance"],
145
- tags: [
146
- "open-banking",
147
- "powens",
148
- "transactions"
149
- ],
150
- stability: "experimental"
151
- },
152
- io: {
153
- input: OpenBankingListTransactionsInput,
154
- output: OpenBankingListTransactionsOutput
155
- },
156
- policy: { auth: "user" }
157
- });
158
- const OpenBankingSyncTransactions = defineCommand({
159
- meta: {
160
- name: "openbanking.transactions.sync",
161
- version: 1,
162
- description: "Synchronise transactions for a bank account by calling the configured open banking provider.",
163
- goal: "Ensure the canonical transaction ledger stays aligned with the external provider.",
164
- context: "Triggered by scheduled workflows or on-demand actions when activity is expected on an account.",
165
- owners: ["platform.finance"],
166
- tags: [
167
- "open-banking",
168
- "powens",
169
- "transactions"
170
- ],
171
- stability: "experimental"
172
- },
173
- io: {
174
- input: OpenBankingSyncTransactionsInput,
175
- output: OpenBankingSyncTransactionsOutput
176
- },
177
- policy: { auth: "admin" },
178
- telemetry: {
179
- success: {
180
- event: { name: OPENBANKING_TELEMETRY_EVENTS.transactionsSynced },
181
- properties: ({ input, output }) => {
182
- const payload = input;
183
- const result = output;
184
- return {
185
- tenantId: payload?.tenantId,
186
- accountId: payload?.accountId,
187
- synced: result?.synced,
188
- failed: result?.failed,
189
- earliestSyncedAt: result?.earliestSyncedAt,
190
- latestSyncedAt: result?.latestSyncedAt
191
- };
192
- }
193
- },
194
- failure: {
195
- event: { name: OPENBANKING_TELEMETRY_EVENTS.transactionsSyncFailed },
196
- properties: ({ input, error }) => {
197
- const payload = input;
198
- return {
199
- tenantId: payload?.tenantId,
200
- accountId: payload?.accountId,
201
- error: error instanceof Error ? error.message : String(error ?? "unknown")
202
- };
203
- }
204
- }
205
- }
206
- });
207
-
208
- //#endregion
209
- //# sourceMappingURL=transactions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transactions.js","names":[],"sources":["../../../../../../../../../libs/contracts/dist/integrations/openbanking/contracts/transactions.js"],"sourcesContent":["import { E5, x8 } from \"../../../schema/dist/index.js\";\nimport { defineCommand, defineQuery } from \"../../../spec.js\";\nimport { BankTransactionRecord } from \"../models.js\";\nimport { OPENBANKING_TELEMETRY_EVENTS } from \"../telemetry.js\";\n\n//#region src/integrations/openbanking/contracts/transactions.ts\nconst OpenBankingListTransactionsInput = new x8({\n\tname: \"OpenBankingListTransactionsInput\",\n\tdescription: \"Parameters for listing bank transactions from the canonical ledger.\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\taccountId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tfrom: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tto: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tcursor: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tpageSize: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tdirection: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tminimumAmount: {\n\t\t\ttype: E5.Float_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tmaximumAmount: {\n\t\t\ttype: E5.Float_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tcategory: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingListTransactionsOutput = new x8({\n\tname: \"OpenBankingListTransactionsOutput\",\n\tdescription: \"Paginated list of transactions for a bank account.\",\n\tfields: {\n\t\ttransactions: {\n\t\t\ttype: BankTransactionRecord,\n\t\t\tisOptional: false,\n\t\t\tisArray: true\n\t\t},\n\t\tnextCursor: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\thasMore: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingSyncTransactionsInput = new x8({\n\tname: \"OpenBankingSyncTransactionsInput\",\n\tdescription: \"Command payload to synchronise transactions from the open banking provider into the canonical ledger.\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\taccountId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tfrom: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tto: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tconnectionId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: true\n\t\t},\n\t\tincludePending: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: true\n\t\t},\n\t\tbackfillDays: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingSyncTransactionsOutput = new x8({\n\tname: \"OpenBankingSyncTransactionsOutput\",\n\tdescription: \"Result of a transaction synchronisation run.\",\n\tfields: {\n\t\tsynced: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tfailed: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tearliestSyncedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tlatestSyncedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tnextSinceToken: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\terrors: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisArray: true,\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst OpenBankingListTransactions = defineQuery({\n\tmeta: {\n\t\tname: \"openbanking.transactions.list\",\n\t\tversion: 1,\n\t\tdescription: \"List bank transactions that have been normalised into the canonical ledger.\",\n\t\tgoal: \"Allow downstream analytics and UI surfaces to page through canonical bank transactions.\",\n\t\tcontext: \"Used by Pocket Family Office dashboards, reconciliation workflows, and analytics data views.\",\n\t\towners: [\"platform.finance\"],\n\t\ttags: [\n\t\t\t\"open-banking\",\n\t\t\t\"powens\",\n\t\t\t\"transactions\"\n\t\t],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: OpenBankingListTransactionsInput,\n\t\toutput: OpenBankingListTransactionsOutput\n\t},\n\tpolicy: { auth: \"user\" }\n});\nconst OpenBankingSyncTransactions = defineCommand({\n\tmeta: {\n\t\tname: \"openbanking.transactions.sync\",\n\t\tversion: 1,\n\t\tdescription: \"Synchronise transactions for a bank account by calling the configured open banking provider.\",\n\t\tgoal: \"Ensure the canonical transaction ledger stays aligned with the external provider.\",\n\t\tcontext: \"Triggered by scheduled workflows or on-demand actions when activity is expected on an account.\",\n\t\towners: [\"platform.finance\"],\n\t\ttags: [\n\t\t\t\"open-banking\",\n\t\t\t\"powens\",\n\t\t\t\"transactions\"\n\t\t],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: OpenBankingSyncTransactionsInput,\n\t\toutput: OpenBankingSyncTransactionsOutput\n\t},\n\tpolicy: { auth: \"admin\" },\n\ttelemetry: {\n\t\tsuccess: {\n\t\t\tevent: { name: OPENBANKING_TELEMETRY_EVENTS.transactionsSynced },\n\t\t\tproperties: ({ input, output }) => {\n\t\t\t\tconst payload = input;\n\t\t\t\tconst result = output;\n\t\t\t\treturn {\n\t\t\t\t\ttenantId: payload?.tenantId,\n\t\t\t\t\taccountId: payload?.accountId,\n\t\t\t\t\tsynced: result?.synced,\n\t\t\t\t\tfailed: result?.failed,\n\t\t\t\t\tearliestSyncedAt: result?.earliestSyncedAt,\n\t\t\t\t\tlatestSyncedAt: result?.latestSyncedAt\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t\tfailure: {\n\t\t\tevent: { name: OPENBANKING_TELEMETRY_EVENTS.transactionsSyncFailed },\n\t\t\tproperties: ({ input, error }) => {\n\t\t\t\tconst payload = input;\n\t\t\t\treturn {\n\t\t\t\t\ttenantId: payload?.tenantId,\n\t\t\t\t\taccountId: payload?.accountId,\n\t\t\t\t\terror: error instanceof Error ? error.message : String(error ?? \"unknown\")\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n});\nconst openBankingTransactionContracts = {\n\tOpenBankingListTransactions,\n\tOpenBankingSyncTransactions\n};\nfunction registerOpenBankingTransactionContracts(registry) {\n\treturn registry.register(OpenBankingListTransactions).register(OpenBankingSyncTransactions);\n}\n\n//#endregion\nexport { OpenBankingListTransactions, OpenBankingSyncTransactions, openBankingTransactionContracts, registerOpenBankingTransactionContracts };"],"mappings":";;;;;;AAMA,MAAM,mCAAmC,IAAI,GAAG;CAC/C,MAAM;CACN,aAAa;CACb,QAAQ;EACP,UAAU;GACT,MAAM,GAAG,IAAI;GACb,YAAY;GACZ;EACD,WAAW;GACV,MAAM,GAAG,IAAI;GACb,YAAY;GACZ;EACD,MAAM;GACL,MAAM,GAAG,UAAU;GACnB,YAAY;GACZ;EACD,IAAI;GACH,MAAM,GAAG,UAAU;GACnB,YAAY;GACZ;EACD,QAAQ;GACP,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,UAAU;GACT,MAAM,GAAG,cAAc;GACvB,YAAY;GACZ;EACD,WAAW;GACV,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,eAAe;GACd,MAAM,GAAG,gBAAgB;GACzB,YAAY;GACZ;EACD,eAAe;GACd,MAAM,GAAG,gBAAgB;GACzB,YAAY;GACZ;EACD,UAAU;GACT,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD;CACD,CAAC;AACF,MAAM,oCAAoC,IAAI,GAAG;CAChD,MAAM;CACN,aAAa;CACb,QAAQ;EACP,cAAc;GACb,MAAM;GACN,YAAY;GACZ,SAAS;GACT;EACD,YAAY;GACX,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,SAAS;GACR,MAAM,GAAG,SAAS;GAClB,YAAY;GACZ;EACD;CACD,CAAC;AACF,MAAM,mCAAmC,IAAI,GAAG;CAC/C,MAAM;CACN,aAAa;CACb,QAAQ;EACP,UAAU;GACT,MAAM,GAAG,IAAI;GACb,YAAY;GACZ;EACD,WA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