@lssm/example.analytics-dashboard 0.0.0-canary-20251217063201 → 0.0.0-canary-20251217072406

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 (94) hide show
  1. package/dist/dashboard/dashboard.contracts.d.ts +131 -131
  2. package/dist/dashboard/dashboard.contracts.js +5 -5
  3. package/dist/dashboard/dashboard.enum.d.ts +4 -4
  4. package/dist/dashboard/dashboard.enum.js +4 -4
  5. package/dist/dashboard/dashboard.schema.d.ts +79 -79
  6. package/dist/dashboard/dashboard.schema.js +43 -43
  7. package/dist/docs/analytics-dashboard.docblock.js +2 -2
  8. package/dist/events.d.ts +40 -40
  9. package/dist/events.js +25 -25
  10. package/dist/libs/contracts/dist/capabilities/openbanking.js +53 -49
  11. package/dist/libs/contracts/dist/client/index.js +1 -1
  12. package/dist/libs/contracts/dist/client/react/index.js +1 -1
  13. package/dist/libs/contracts/dist/contract-registry/index.js +1 -1
  14. package/dist/libs/contracts/dist/contract-registry/schemas.js +52 -49
  15. package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +11 -86
  16. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +11 -360
  17. package/dist/libs/contracts/dist/docs/index.js +2 -2
  18. package/dist/libs/contracts/dist/docs/presentations.js +48 -44
  19. package/dist/libs/contracts/dist/docs/registry.js +27 -25
  20. package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +11 -393
  21. package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +11 -78
  22. package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +11 -150
  23. package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +11 -96
  24. package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +10 -10
  25. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +15 -15
  26. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +12 -12
  27. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +11 -223
  28. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +44 -44
  29. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +30 -14
  30. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +10 -10
  31. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +13 -274
  32. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +41 -15
  33. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +15 -15
  34. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +14 -14
  35. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +16 -28
  36. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +60 -15
  37. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +13 -13
  38. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +31 -48
  39. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +40 -15
  40. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +14 -14
  41. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +22 -22
  42. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +12 -12
  43. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +22 -22
  44. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +11 -11
  45. package/dist/libs/contracts/dist/events.js +4 -3
  46. package/dist/libs/contracts/dist/index.js +14 -14
  47. package/dist/libs/contracts/dist/integrations/contracts.js +205 -199
  48. package/dist/libs/contracts/dist/integrations/index.js +5 -5
  49. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +133 -130
  50. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +95 -93
  51. package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +3 -3
  52. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +120 -118
  53. package/dist/libs/contracts/dist/integrations/openbanking/models.js +122 -120
  54. package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +9 -20
  55. package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +25 -25
  56. package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +36 -36
  57. package/dist/libs/contracts/dist/integrations/providers/gmail.js +40 -40
  58. package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +31 -31
  59. package/dist/libs/contracts/dist/integrations/providers/mistral.js +31 -31
  60. package/dist/libs/contracts/dist/integrations/providers/postmark.js +31 -31
  61. package/dist/libs/contracts/dist/integrations/providers/powens.js +51 -51
  62. package/dist/libs/contracts/dist/integrations/providers/qdrant.js +31 -31
  63. package/dist/libs/contracts/dist/integrations/providers/stripe.js +35 -35
  64. package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +28 -28
  65. package/dist/libs/contracts/dist/jsonschema.js +1 -1
  66. package/dist/libs/contracts/dist/knowledge/contracts.js +170 -163
  67. package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +17 -17
  68. package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +17 -17
  69. package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +19 -19
  70. package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +17 -17
  71. package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +17 -17
  72. package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +17 -17
  73. package/dist/libs/contracts/dist/llm/exporters.js +13 -12
  74. package/dist/libs/contracts/dist/onboarding-base.js +116 -99
  75. package/dist/libs/contracts/dist/ownership.js +18 -33
  76. package/dist/libs/contracts/dist/presentations.js +1 -1
  77. package/dist/libs/contracts/dist/presentations.v2.js +6 -2
  78. package/dist/libs/contracts/dist/regenerator/service.js +5 -0
  79. package/dist/libs/contracts/dist/registry.js +1 -1
  80. package/dist/libs/contracts/dist/schema/dist/FieldType.js +24 -14
  81. package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +180 -166
  82. package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +20 -9
  83. package/dist/libs/contracts/dist/server/mcp/registerPrompts.js +1 -1
  84. package/dist/libs/contracts/dist/spec.js +22 -13
  85. package/dist/libs/schema/dist/EnumType.js +25 -9
  86. package/dist/libs/schema/dist/FieldType.js +24 -14
  87. package/dist/libs/schema/dist/ScalarTypeEnum.js +180 -166
  88. package/dist/libs/schema/dist/SchemaModel.js +25 -10
  89. package/dist/libs/schema/dist/index.js +4 -4
  90. package/dist/query/query.contracts.d.ts +44 -44
  91. package/dist/query/query.contracts.js +3 -3
  92. package/dist/query/query.enum.js +2 -2
  93. package/dist/query/query.schema.js +33 -33
  94. package/package.json +10 -10
@@ -1,225 +1,228 @@
1
- import { t } from "../../../schema/dist/SchemaModel.js";
2
- import { l } from "../../../schema/dist/ScalarTypeEnum.js";
1
+ import { SchemaModel } from "../../../schema/dist/SchemaModel.js";
2
+ import { ScalarTypeEnum } from "../../../schema/dist/ScalarTypeEnum.js";
3
3
  import "../../../schema/dist/index.js";
4
- import { n, t as t$1 } from "../../../spec.js";
5
- import { n as n$1 } from "../models.js";
6
- import { t as t$2 } from "../telemetry.js";
4
+ import { defineCommand, defineQuery } from "../../../spec.js";
5
+ import { BankAccountRecord } from "../models.js";
6
+ import { OPENBANKING_TELEMETRY_EVENTS } from "../telemetry.js";
7
7
 
8
8
  //#region ../../libs/contracts/dist/integrations/openbanking/contracts/accounts.js
9
- const o = new t({
10
- name: `OpenBankingListAccountsInput`,
11
- description: `Parameters for listing bank accounts through the open banking provider.`,
9
+ const OpenBankingListAccountsInput = new SchemaModel({
10
+ name: "OpenBankingListAccountsInput",
11
+ description: "Parameters for listing bank accounts through the open banking provider.",
12
12
  fields: {
13
13
  tenantId: {
14
- type: l.ID(),
15
- isOptional: !1
14
+ type: ScalarTypeEnum.ID(),
15
+ isOptional: false
16
16
  },
17
17
  userId: {
18
- type: l.ID(),
19
- isOptional: !1
18
+ type: ScalarTypeEnum.ID(),
19
+ isOptional: false
20
20
  },
21
21
  connectionId: {
22
- type: l.ID(),
23
- isOptional: !0
22
+ type: ScalarTypeEnum.ID(),
23
+ isOptional: true
24
24
  },
25
25
  includeBalances: {
26
- type: l.Boolean(),
27
- isOptional: !0
26
+ type: ScalarTypeEnum.Boolean(),
27
+ isOptional: true
28
28
  },
29
29
  institutionId: {
30
- type: l.String_unsecure(),
31
- isOptional: !0
30
+ type: ScalarTypeEnum.String_unsecure(),
31
+ isOptional: true
32
32
  },
33
33
  cursor: {
34
- type: l.String_unsecure(),
35
- isOptional: !0
34
+ type: ScalarTypeEnum.String_unsecure(),
35
+ isOptional: true
36
36
  },
37
37
  pageSize: {
38
- type: l.Int_unsecure(),
39
- isOptional: !0
38
+ type: ScalarTypeEnum.Int_unsecure(),
39
+ isOptional: true
40
40
  }
41
41
  }
42
- }), s = new t({
43
- name: `OpenBankingListAccountsOutput`,
44
- description: `Paginated list of bank accounts available to the tenant and user.`,
42
+ });
43
+ const OpenBankingListAccountsOutput = new SchemaModel({
44
+ name: "OpenBankingListAccountsOutput",
45
+ description: "Paginated list of bank accounts available to the tenant and user.",
45
46
  fields: {
46
47
  accounts: {
47
- type: n$1,
48
- isOptional: !1,
49
- isArray: !0
48
+ type: BankAccountRecord,
49
+ isOptional: false,
50
+ isArray: true
50
51
  },
51
52
  nextCursor: {
52
- type: l.String_unsecure(),
53
- isOptional: !0
53
+ type: ScalarTypeEnum.String_unsecure(),
54
+ isOptional: true
54
55
  },
55
56
  hasMore: {
56
- type: l.Boolean(),
57
- isOptional: !0
57
+ type: ScalarTypeEnum.Boolean(),
58
+ isOptional: true
58
59
  }
59
60
  }
60
- }), c = new t({
61
- name: `OpenBankingGetAccountInput`,
62
- description: `Parameters for retrieving a specific bank account.`,
61
+ });
62
+ const OpenBankingGetAccountInput = new SchemaModel({
63
+ name: "OpenBankingGetAccountInput",
64
+ description: "Parameters for retrieving a specific bank account.",
63
65
  fields: {
64
66
  tenantId: {
65
- type: l.ID(),
66
- isOptional: !1
67
+ type: ScalarTypeEnum.ID(),
68
+ isOptional: false
67
69
  },
68
70
  accountId: {
69
- type: l.ID(),
70
- isOptional: !1
71
+ type: ScalarTypeEnum.ID(),
72
+ isOptional: false
71
73
  },
72
74
  includeBalances: {
73
- type: l.Boolean(),
74
- isOptional: !0
75
+ type: ScalarTypeEnum.Boolean(),
76
+ isOptional: true
75
77
  },
76
78
  includeLatestTransactions: {
77
- type: l.Boolean(),
78
- isOptional: !0
79
+ type: ScalarTypeEnum.Boolean(),
80
+ isOptional: true
79
81
  }
80
82
  }
81
- }), l$1 = new t({
82
- name: `OpenBankingSyncAccountsInput`,
83
- description: `Command payload to trigger an account synchronisation against the open banking provider.`,
83
+ });
84
+ const OpenBankingSyncAccountsInput = new SchemaModel({
85
+ name: "OpenBankingSyncAccountsInput",
86
+ description: "Command payload to trigger an account synchronisation against the open banking provider.",
84
87
  fields: {
85
88
  tenantId: {
86
- type: l.ID(),
87
- isOptional: !1
89
+ type: ScalarTypeEnum.ID(),
90
+ isOptional: false
88
91
  },
89
92
  userId: {
90
- type: l.ID(),
91
- isOptional: !0
93
+ type: ScalarTypeEnum.ID(),
94
+ isOptional: true
92
95
  },
93
96
  connectionId: {
94
- type: l.ID(),
95
- isOptional: !1
97
+ type: ScalarTypeEnum.ID(),
98
+ isOptional: false
96
99
  },
97
100
  accountIds: {
98
- type: l.ID(),
99
- isArray: !0,
100
- isOptional: !0
101
+ type: ScalarTypeEnum.ID(),
102
+ isArray: true,
103
+ isOptional: true
101
104
  },
102
105
  forceFullRefresh: {
103
- type: l.Boolean(),
104
- isOptional: !0
106
+ type: ScalarTypeEnum.Boolean(),
107
+ isOptional: true
105
108
  },
106
109
  triggerWorkflows: {
107
- type: l.Boolean(),
108
- isOptional: !0
110
+ type: ScalarTypeEnum.Boolean(),
111
+ isOptional: true
109
112
  }
110
113
  }
111
- }), u = new t({
112
- name: `OpenBankingSyncAccountsOutput`,
113
- description: `Result of a bank account synchronisation run.`,
114
+ });
115
+ const OpenBankingSyncAccountsOutput = new SchemaModel({
116
+ name: "OpenBankingSyncAccountsOutput",
117
+ description: "Result of a bank account synchronisation run.",
114
118
  fields: {
115
119
  synced: {
116
- type: l.Int_unsecure(),
117
- isOptional: !1
120
+ type: ScalarTypeEnum.Int_unsecure(),
121
+ isOptional: false
118
122
  },
119
123
  failed: {
120
- type: l.Int_unsecure(),
121
- isOptional: !1
124
+ type: ScalarTypeEnum.Int_unsecure(),
125
+ isOptional: false
122
126
  },
123
127
  errors: {
124
- type: l.String_unsecure(),
125
- isArray: !0,
126
- isOptional: !0
128
+ type: ScalarTypeEnum.String_unsecure(),
129
+ isArray: true,
130
+ isOptional: true
127
131
  },
128
132
  nextSyncSuggestedAt: {
129
- type: l.DateTime(),
130
- isOptional: !0
133
+ type: ScalarTypeEnum.DateTime(),
134
+ isOptional: true
131
135
  }
132
136
  }
133
- }), d = n({
137
+ });
138
+ const OpenBankingListAccounts = defineQuery({
134
139
  meta: {
135
- name: `openbanking.accounts.list`,
140
+ name: "openbanking.accounts.list",
136
141
  version: 1,
137
- description: `List bank accounts available to a tenant/user via Powens Open Banking.`,
138
- goal: `Provide downstream workflows with the set of accounts accessible via the configured open banking connection.`,
139
- context: `Used by Pocket Family Office dashboards and sync workflows to enumerate bank accounts prior to syncing balances or transactions.`,
140
- owners: [`platform.finance`],
142
+ description: "List bank accounts available to a tenant/user via Powens Open Banking.",
143
+ goal: "Provide downstream workflows with the set of accounts accessible via the configured open banking connection.",
144
+ context: "Used by Pocket Family Office dashboards and sync workflows to enumerate bank accounts prior to syncing balances or transactions.",
145
+ owners: ["platform.finance"],
141
146
  tags: [
142
- `open-banking`,
143
- `powens`,
144
- `accounts`
147
+ "open-banking",
148
+ "powens",
149
+ "accounts"
145
150
  ],
146
- stability: `experimental`
151
+ stability: "experimental"
147
152
  },
148
153
  io: {
149
- input: o,
150
- output: s
154
+ input: OpenBankingListAccountsInput,
155
+ output: OpenBankingListAccountsOutput
151
156
  },
152
- policy: { auth: `user` }
153
- }), f = n({
157
+ policy: { auth: "user" }
158
+ });
159
+ const OpenBankingGetAccount = defineQuery({
154
160
  meta: {
155
- name: `openbanking.accounts.get`,
161
+ name: "openbanking.accounts.get",
156
162
  version: 1,
157
- description: `Retrieve the canonical bank account record for the given account identifier.`,
158
- goal: `Allow user-facing experiences and automations to display up-to-date account metadata.`,
159
- context: `Invoked by UI surfaces and workflow automation steps that require detailed metadata for a specific bank account.`,
160
- owners: [`platform.finance`],
163
+ description: "Retrieve the canonical bank account record for the given account identifier.",
164
+ goal: "Allow user-facing experiences and automations to display up-to-date account metadata.",
165
+ context: "Invoked by UI surfaces and workflow automation steps that require detailed metadata for a specific bank account.",
166
+ owners: ["platform.finance"],
161
167
  tags: [
162
- `open-banking`,
163
- `powens`,
164
- `accounts`
168
+ "open-banking",
169
+ "powens",
170
+ "accounts"
165
171
  ],
166
- stability: `experimental`
172
+ stability: "experimental"
167
173
  },
168
174
  io: {
169
- input: c,
170
- output: n$1
175
+ input: OpenBankingGetAccountInput,
176
+ output: BankAccountRecord
171
177
  },
172
- policy: { auth: `user` }
173
- }), p = t$1({
178
+ policy: { auth: "user" }
179
+ });
180
+ const OpenBankingSyncAccounts = defineCommand({
174
181
  meta: {
175
- name: `openbanking.accounts.sync`,
182
+ name: "openbanking.accounts.sync",
176
183
  version: 1,
177
- description: `Initiate a synchronisation run to refresh bank account metadata from Powens.`,
178
- goal: `Keep canonical bank account records aligned with the external open banking provider.`,
179
- context: `Triggered by scheduled workflows or manual operator actions to reconcile account metadata prior to transaction/balance syncs.`,
180
- owners: [`platform.finance`],
184
+ description: "Initiate a synchronisation run to refresh bank account metadata from Powens.",
185
+ goal: "Keep canonical bank account records aligned with the external open banking provider.",
186
+ context: "Triggered by scheduled workflows or manual operator actions to reconcile account metadata prior to transaction/balance syncs.",
187
+ owners: ["platform.finance"],
181
188
  tags: [
182
- `open-banking`,
183
- `powens`,
184
- `accounts`
189
+ "open-banking",
190
+ "powens",
191
+ "accounts"
185
192
  ],
186
- stability: `experimental`
193
+ stability: "experimental"
187
194
  },
188
195
  io: {
189
- input: l$1,
190
- output: u
196
+ input: OpenBankingSyncAccountsInput,
197
+ output: OpenBankingSyncAccountsOutput
191
198
  },
192
- policy: { auth: `admin` },
199
+ policy: { auth: "admin" },
193
200
  telemetry: {
194
201
  success: {
195
- event: { name: t$2.accountsSynced },
196
- properties: ({ input: e, output: t$3 }) => {
197
- let n$2 = e, r = t$3;
202
+ event: { name: OPENBANKING_TELEMETRY_EVENTS.accountsSynced },
203
+ properties: ({ input, output }) => {
204
+ const payload = input;
205
+ const result = output;
198
206
  return {
199
- tenantId: n$2?.tenantId,
200
- connectionId: n$2?.connectionId,
201
- synced: r?.synced,
202
- failed: r?.failed
207
+ tenantId: payload?.tenantId,
208
+ connectionId: payload?.connectionId,
209
+ synced: result?.synced,
210
+ failed: result?.failed
203
211
  };
204
212
  }
205
213
  },
206
214
  failure: {
207
- event: { name: t$2.accountsSyncFailed },
208
- properties: ({ input: e, error: t$3 }) => {
209
- let n$2 = e;
215
+ event: { name: OPENBANKING_TELEMETRY_EVENTS.accountsSyncFailed },
216
+ properties: ({ input, error }) => {
217
+ const payload = input;
210
218
  return {
211
- tenantId: n$2?.tenantId,
212
- connectionId: n$2?.connectionId,
213
- error: t$3 instanceof Error ? t$3.message : String(t$3 ?? `unknown`)
219
+ tenantId: payload?.tenantId,
220
+ connectionId: payload?.connectionId,
221
+ error: error instanceof Error ? error.message : String(error ?? "unknown")
214
222
  };
215
223
  }
216
224
  }
217
225
  }
218
- }), m = {
219
- OpenBankingListAccounts: d,
220
- OpenBankingGetAccount: f,
221
- OpenBankingSyncAccounts: p
222
- };
226
+ });
223
227
 
224
- //#endregion
225
- export { d, f, p };
228
+ //#endregion
@@ -1,157 +1,159 @@
1
- import { t } from "../../../schema/dist/SchemaModel.js";
2
- import { l } from "../../../schema/dist/ScalarTypeEnum.js";
1
+ import { SchemaModel } from "../../../schema/dist/SchemaModel.js";
2
+ import { ScalarTypeEnum } from "../../../schema/dist/ScalarTypeEnum.js";
3
3
  import "../../../schema/dist/index.js";
4
- import { n, t as t$1 } from "../../../spec.js";
5
- import { i } from "../models.js";
6
- import { t as t$2 } from "../telemetry.js";
4
+ import { defineCommand, defineQuery } from "../../../spec.js";
5
+ import { AccountBalanceRecord } from "../models.js";
6
+ import { OPENBANKING_TELEMETRY_EVENTS } from "../telemetry.js";
7
7
 
8
8
  //#region ../../libs/contracts/dist/integrations/openbanking/contracts/balances.js
9
- const o = new t({
10
- name: `OpenBankingGetBalancesInput`,
11
- description: `Parameters for retrieving bank account balances from the canonical ledger.`,
9
+ const OpenBankingGetBalancesInput = new SchemaModel({
10
+ name: "OpenBankingGetBalancesInput",
11
+ description: "Parameters for retrieving bank account balances from the canonical ledger.",
12
12
  fields: {
13
13
  tenantId: {
14
- type: l.ID(),
15
- isOptional: !1
14
+ type: ScalarTypeEnum.ID(),
15
+ isOptional: false
16
16
  },
17
17
  accountId: {
18
- type: l.ID(),
19
- isOptional: !1
18
+ type: ScalarTypeEnum.ID(),
19
+ isOptional: false
20
20
  },
21
21
  balanceTypes: {
22
- type: l.String_unsecure(),
23
- isArray: !0,
24
- isOptional: !0
22
+ type: ScalarTypeEnum.String_unsecure(),
23
+ isArray: true,
24
+ isOptional: true
25
25
  }
26
26
  }
27
- }), s = new t({
28
- name: `OpenBankingGetBalancesOutput`,
29
- description: `Canonical balances for a bank account.`,
27
+ });
28
+ const OpenBankingGetBalancesOutput = new SchemaModel({
29
+ name: "OpenBankingGetBalancesOutput",
30
+ description: "Canonical balances for a bank account.",
30
31
  fields: {
31
32
  balances: {
32
- type: i,
33
- isOptional: !1,
34
- isArray: !0
33
+ type: AccountBalanceRecord,
34
+ isOptional: false,
35
+ isArray: true
35
36
  },
36
37
  asOf: {
37
- type: l.DateTime(),
38
- isOptional: !0
38
+ type: ScalarTypeEnum.DateTime(),
39
+ isOptional: true
39
40
  }
40
41
  }
41
- }), c = new t({
42
- name: `OpenBankingRefreshBalancesInput`,
43
- description: `Command payload to refresh balances for a bank account via the open banking provider.`,
42
+ });
43
+ const OpenBankingRefreshBalancesInput = new SchemaModel({
44
+ name: "OpenBankingRefreshBalancesInput",
45
+ description: "Command payload to refresh balances for a bank account via the open banking provider.",
44
46
  fields: {
45
47
  tenantId: {
46
- type: l.ID(),
47
- isOptional: !1
48
+ type: ScalarTypeEnum.ID(),
49
+ isOptional: false
48
50
  },
49
51
  accountId: {
50
- type: l.ID(),
51
- isOptional: !1
52
+ type: ScalarTypeEnum.ID(),
53
+ isOptional: false
52
54
  },
53
55
  connectionId: {
54
- type: l.ID(),
55
- isOptional: !0
56
+ type: ScalarTypeEnum.ID(),
57
+ isOptional: true
56
58
  },
57
59
  balanceTypes: {
58
- type: l.String_unsecure(),
59
- isArray: !0,
60
- isOptional: !0
60
+ type: ScalarTypeEnum.String_unsecure(),
61
+ isArray: true,
62
+ isOptional: true
61
63
  },
62
64
  forceRefresh: {
63
- type: l.Boolean(),
64
- isOptional: !0
65
+ type: ScalarTypeEnum.Boolean(),
66
+ isOptional: true
65
67
  }
66
68
  }
67
- }), l$1 = new t({
68
- name: `OpenBankingRefreshBalancesOutput`,
69
- description: `Result of a balance refresh against the open banking provider.`,
69
+ });
70
+ const OpenBankingRefreshBalancesOutput = new SchemaModel({
71
+ name: "OpenBankingRefreshBalancesOutput",
72
+ description: "Result of a balance refresh against the open banking provider.",
70
73
  fields: {
71
74
  balances: {
72
- type: i,
73
- isOptional: !1,
74
- isArray: !0
75
+ type: AccountBalanceRecord,
76
+ isOptional: false,
77
+ isArray: true
75
78
  },
76
79
  refreshedAt: {
77
- type: l.DateTime(),
78
- isOptional: !1
80
+ type: ScalarTypeEnum.DateTime(),
81
+ isOptional: false
79
82
  },
80
83
  errors: {
81
- type: l.String_unsecure(),
82
- isArray: !0,
83
- isOptional: !0
84
+ type: ScalarTypeEnum.String_unsecure(),
85
+ isArray: true,
86
+ isOptional: true
84
87
  }
85
88
  }
86
- }), u = n({
89
+ });
90
+ const OpenBankingGetBalances = defineQuery({
87
91
  meta: {
88
- name: `openbanking.balances.get`,
92
+ name: "openbanking.balances.get",
89
93
  version: 1,
90
- description: `Retrieve the latest cached balances for a bank account.`,
91
- goal: `Expose current and available balances required by dashboards and analytics.`,
92
- context: `Used by Pocket Family Office UI surfaces and automation steps that require balance totals prior to generating summaries.`,
93
- owners: [`platform.finance`],
94
+ description: "Retrieve the latest cached balances for a bank account.",
95
+ goal: "Expose current and available balances required by dashboards and analytics.",
96
+ context: "Used by Pocket Family Office UI surfaces and automation steps that require balance totals prior to generating summaries.",
97
+ owners: ["platform.finance"],
94
98
  tags: [
95
- `open-banking`,
96
- `powens`,
97
- `balances`
99
+ "open-banking",
100
+ "powens",
101
+ "balances"
98
102
  ],
99
- stability: `experimental`
103
+ stability: "experimental"
100
104
  },
101
105
  io: {
102
- input: o,
103
- output: s
106
+ input: OpenBankingGetBalancesInput,
107
+ output: OpenBankingGetBalancesOutput
104
108
  },
105
- policy: { auth: `user` }
106
- }), d = t$1({
109
+ policy: { auth: "user" }
110
+ });
111
+ const OpenBankingRefreshBalances = defineCommand({
107
112
  meta: {
108
- name: `openbanking.balances.refresh`,
113
+ name: "openbanking.balances.refresh",
109
114
  version: 1,
110
- description: `Refresh balances for a bank account via the configured open banking provider.`,
111
- goal: `Ensure canonical balance records reflect the latest values from Powens.`,
112
- context: `Triggered by scheduled workflows before generating summaries or forecasting cashflow.`,
113
- owners: [`platform.finance`],
115
+ description: "Refresh balances for a bank account via the configured open banking provider.",
116
+ goal: "Ensure canonical balance records reflect the latest values from Powens.",
117
+ context: "Triggered by scheduled workflows before generating summaries or forecasting cashflow.",
118
+ owners: ["platform.finance"],
114
119
  tags: [
115
- `open-banking`,
116
- `powens`,
117
- `balances`
120
+ "open-banking",
121
+ "powens",
122
+ "balances"
118
123
  ],
119
- stability: `experimental`
124
+ stability: "experimental"
120
125
  },
121
126
  io: {
122
- input: c,
123
- output: l$1
127
+ input: OpenBankingRefreshBalancesInput,
128
+ output: OpenBankingRefreshBalancesOutput
124
129
  },
125
- policy: { auth: `admin` },
130
+ policy: { auth: "admin" },
126
131
  telemetry: {
127
132
  success: {
128
- event: { name: t$2.balancesRefreshed },
129
- properties: ({ input: e, output: t$3 }) => {
130
- let n$1 = e, r = t$3;
133
+ event: { name: OPENBANKING_TELEMETRY_EVENTS.balancesRefreshed },
134
+ properties: ({ input, output }) => {
135
+ const payload = input;
136
+ const result = output;
131
137
  return {
132
- tenantId: n$1?.tenantId,
133
- accountId: n$1?.accountId,
134
- refreshedAt: r?.refreshedAt,
135
- balanceCount: Array.isArray(r?.balances) ? r?.balances.length : void 0
138
+ tenantId: payload?.tenantId,
139
+ accountId: payload?.accountId,
140
+ refreshedAt: result?.refreshedAt,
141
+ balanceCount: Array.isArray(result?.balances) ? result?.balances.length : void 0
136
142
  };
137
143
  }
138
144
  },
139
145
  failure: {
140
- event: { name: t$2.balancesRefreshFailed },
141
- properties: ({ input: e, error: t$3 }) => {
142
- let n$1 = e;
146
+ event: { name: OPENBANKING_TELEMETRY_EVENTS.balancesRefreshFailed },
147
+ properties: ({ input, error }) => {
148
+ const payload = input;
143
149
  return {
144
- tenantId: n$1?.tenantId,
145
- accountId: n$1?.accountId,
146
- error: t$3 instanceof Error ? t$3.message : String(t$3 ?? `unknown`)
150
+ tenantId: payload?.tenantId,
151
+ accountId: payload?.accountId,
152
+ error: error instanceof Error ? error.message : String(error ?? "unknown")
147
153
  };
148
154
  }
149
155
  }
150
156
  }
151
- }), f = {
152
- OpenBankingGetBalances: u,
153
- OpenBankingRefreshBalances: d
154
- };
157
+ });
155
158
 
156
- //#endregion
157
- export { d, u };
159
+ //#endregion
@@ -1,3 +1,3 @@
1
- import { d, f, p } from "./accounts.js";
2
- import { d as d$1, u } from "./transactions.js";
3
- import { d as d$2, u as u$1 } from "./balances.js";
1
+ import "./accounts.js";
2
+ import "./transactions.js";
3
+ import "./balances.js";