@lssm/lib.contracts 1.6.0 → 1.7.1
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/app-config/contracts.d.ts +51 -49
- package/dist/app-config/contracts.d.ts.map +1 -1
- package/dist/app-config/contracts.js +1 -1
- package/dist/app-config/contracts.js.map +1 -1
- package/dist/app-config/events.d.ts +28 -26
- package/dist/app-config/events.d.ts.map +1 -1
- package/dist/app-config/events.js +1 -1
- package/dist/app-config/events.js.map +1 -1
- package/dist/app-config/lifecycle-contracts.d.ts +81 -79
- package/dist/app-config/lifecycle-contracts.d.ts.map +1 -1
- package/dist/app-config/lifecycle-contracts.js +1 -1
- package/dist/app-config/lifecycle-contracts.js.map +1 -1
- package/dist/capabilities/openbanking.js.map +1 -1
- package/dist/client/react/form-render.d.ts +1 -0
- package/dist/client/react/form-render.d.ts.map +1 -1
- package/dist/contracts-adapter-input.d.ts +1 -0
- package/dist/contracts-adapter-input.d.ts.map +1 -1
- package/dist/events.d.ts +1 -0
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +1 -1
- package/dist/events.js.map +1 -1
- package/dist/forms.d.ts +1 -0
- package/dist/forms.d.ts.map +1 -1
- package/dist/install.d.ts +1 -0
- package/dist/install.d.ts.map +1 -1
- package/dist/integrations/contracts.d.ts +103 -101
- package/dist/integrations/contracts.d.ts.map +1 -1
- package/dist/integrations/contracts.js +1 -1
- package/dist/integrations/contracts.js.map +1 -1
- package/dist/integrations/openbanking/contracts/accounts.d.ts +67 -65
- package/dist/integrations/openbanking/contracts/accounts.d.ts.map +1 -1
- package/dist/integrations/openbanking/contracts/accounts.js +1 -1
- package/dist/integrations/openbanking/contracts/accounts.js.map +1 -1
- package/dist/integrations/openbanking/contracts/balances.d.ts +35 -33
- package/dist/integrations/openbanking/contracts/balances.d.ts.map +1 -1
- package/dist/integrations/openbanking/contracts/balances.js +1 -1
- package/dist/integrations/openbanking/contracts/balances.js.map +1 -1
- package/dist/integrations/openbanking/contracts/index.js.map +1 -1
- package/dist/integrations/openbanking/contracts/transactions.d.ts +49 -47
- package/dist/integrations/openbanking/contracts/transactions.d.ts.map +1 -1
- package/dist/integrations/openbanking/contracts/transactions.js +1 -1
- package/dist/integrations/openbanking/contracts/transactions.js.map +1 -1
- package/dist/integrations/openbanking/guards.js.map +1 -1
- package/dist/integrations/openbanking/models.d.ts +57 -54
- package/dist/integrations/openbanking/models.d.ts.map +1 -1
- package/dist/integrations/openbanking/models.js +1 -1
- package/dist/integrations/openbanking/models.js.map +1 -1
- package/dist/integrations/openbanking/telemetry.js.map +1 -1
- package/dist/integrations/providers/powens.js.map +1 -1
- package/dist/jsonschema.d.ts +1 -1
- package/dist/jsonschema.d.ts.map +1 -1
- package/dist/knowledge/contracts.d.ts +67 -65
- package/dist/knowledge/contracts.d.ts.map +1 -1
- package/dist/knowledge/contracts.js +1 -1
- package/dist/knowledge/contracts.js.map +1 -1
- package/dist/knowledge/spaces/product-canon.js.map +1 -1
- package/dist/knowledge/spaces/support-faq.js.map +1 -1
- package/dist/knowledge/spec.js.map +1 -1
- package/dist/onboarding-base.d.ts +30 -28
- package/dist/onboarding-base.d.ts.map +1 -1
- package/dist/onboarding-base.js +1 -1
- package/dist/onboarding-base.js.map +1 -1
- package/dist/presentations.d.ts +1 -0
- package/dist/presentations.d.ts.map +1 -1
- package/dist/presentations.v2.d.ts +1 -0
- package/dist/presentations.v2.d.ts.map +1 -1
- package/dist/regenerator/executor.js.map +1 -1
- package/dist/regenerator/service.js.map +1 -1
- package/dist/regenerator/sinks.js.map +1 -1
- package/dist/regenerator/utils.js.map +1 -1
- package/dist/registry.d.ts +1 -0
- package/dist/registry.d.ts.map +1 -1
- package/dist/resources.d.ts.map +1 -1
- package/dist/schema/{src → dist}/FieldType.js +1 -1
- package/dist/schema/dist/FieldType.js.map +1 -0
- package/dist/schema/dist/ScalarTypeEnum.js +2 -0
- package/dist/schema/dist/ScalarTypeEnum.js.map +1 -0
- package/dist/schema/{src → dist}/SchemaModel.js +1 -1
- package/dist/schema/dist/SchemaModel.js.map +1 -0
- package/dist/schema/dist/index.js +1 -0
- package/dist/spec.d.ts +1 -0
- package/dist/spec.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/schema/src/FieldType.js.map +0 -1
- package/dist/schema/src/ScalarTypeEnum.js +0 -2
- package/dist/schema/src/ScalarTypeEnum.js.map +0 -1
- package/dist/schema/src/SchemaModel.js.map +0 -1
- package/dist/schema/src/index.js +0 -1
- /package/dist/schema/{src → dist}/EnumType.js +0 -0
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { ContractSpec } from "../../../spec.js";
|
|
2
2
|
import { SpecRegistry } from "../../../registry.js";
|
|
3
|
+
import * as _lssm_lib_schema365 from "@lssm/lib.schema";
|
|
4
|
+
import { SchemaModel } from "@lssm/lib.schema";
|
|
3
5
|
|
|
4
6
|
//#region src/integrations/openbanking/contracts/balances.d.ts
|
|
5
7
|
declare const OpenBankingGetBalances: ContractSpec<SchemaModel<{
|
|
6
8
|
tenantId: {
|
|
7
|
-
type:
|
|
9
|
+
type: _lssm_lib_schema365.FieldType<string, string>;
|
|
8
10
|
isOptional: false;
|
|
9
11
|
};
|
|
10
12
|
accountId: {
|
|
11
|
-
type:
|
|
13
|
+
type: _lssm_lib_schema365.FieldType<string, string>;
|
|
12
14
|
isOptional: false;
|
|
13
15
|
};
|
|
14
16
|
balanceTypes: {
|
|
15
|
-
type:
|
|
17
|
+
type: _lssm_lib_schema365.FieldType<string, string>;
|
|
16
18
|
isArray: true;
|
|
17
19
|
isOptional: true;
|
|
18
20
|
};
|
|
@@ -20,47 +22,47 @@ declare const OpenBankingGetBalances: ContractSpec<SchemaModel<{
|
|
|
20
22
|
balances: {
|
|
21
23
|
type: SchemaModel<{
|
|
22
24
|
id: {
|
|
23
|
-
type:
|
|
25
|
+
type: _lssm_lib_schema365.FieldType<string, string>;
|
|
24
26
|
isOptional: false;
|
|
25
27
|
};
|
|
26
28
|
accountId: {
|
|
27
|
-
type:
|
|
29
|
+
type: _lssm_lib_schema365.FieldType<string, string>;
|
|
28
30
|
isOptional: false;
|
|
29
31
|
};
|
|
30
32
|
tenantId: {
|
|
31
|
-
type:
|
|
33
|
+
type: _lssm_lib_schema365.FieldType<string, string>;
|
|
32
34
|
isOptional: false;
|
|
33
35
|
};
|
|
34
36
|
connectionId: {
|
|
35
|
-
type:
|
|
37
|
+
type: _lssm_lib_schema365.FieldType<string, string>;
|
|
36
38
|
isOptional: false;
|
|
37
39
|
};
|
|
38
40
|
balanceType: {
|
|
39
|
-
type:
|
|
41
|
+
type: _lssm_lib_schema365.FieldType<string, string>;
|
|
40
42
|
isOptional: false;
|
|
41
43
|
};
|
|
42
44
|
currentBalance: {
|
|
43
|
-
type:
|
|
45
|
+
type: _lssm_lib_schema365.FieldType<number, number>;
|
|
44
46
|
isOptional: false;
|
|
45
47
|
};
|
|
46
48
|
availableBalance: {
|
|
47
|
-
type:
|
|
49
|
+
type: _lssm_lib_schema365.FieldType<number, number>;
|
|
48
50
|
isOptional: true;
|
|
49
51
|
};
|
|
50
52
|
currency: {
|
|
51
|
-
type:
|
|
53
|
+
type: _lssm_lib_schema365.FieldType<string, string>;
|
|
52
54
|
isOptional: false;
|
|
53
55
|
};
|
|
54
56
|
lastUpdatedAt: {
|
|
55
|
-
type:
|
|
57
|
+
type: _lssm_lib_schema365.FieldType<Date, string>;
|
|
56
58
|
isOptional: false;
|
|
57
59
|
};
|
|
58
60
|
createdAt: {
|
|
59
|
-
type:
|
|
61
|
+
type: _lssm_lib_schema365.FieldType<Date, string>;
|
|
60
62
|
isOptional: false;
|
|
61
63
|
};
|
|
62
64
|
metadata: {
|
|
63
|
-
type:
|
|
65
|
+
type: _lssm_lib_schema365.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
64
66
|
isOptional: true;
|
|
65
67
|
};
|
|
66
68
|
}>;
|
|
@@ -68,77 +70,77 @@ declare const OpenBankingGetBalances: ContractSpec<SchemaModel<{
|
|
|
68
70
|
isArray: true;
|
|
69
71
|
};
|
|
70
72
|
asOf: {
|
|
71
|
-
type:
|
|
73
|
+
type: _lssm_lib_schema365.FieldType<Date, string>;
|
|
72
74
|
isOptional: true;
|
|
73
75
|
};
|
|
74
76
|
}>, undefined>;
|
|
75
77
|
declare const OpenBankingRefreshBalances: ContractSpec<SchemaModel<{
|
|
76
78
|
tenantId: {
|
|
77
|
-
type:
|
|
79
|
+
type: _lssm_lib_schema365.FieldType<string, string>;
|
|
78
80
|
isOptional: false;
|
|
79
81
|
};
|
|
80
82
|
accountId: {
|
|
81
|
-
type:
|
|
83
|
+
type: _lssm_lib_schema365.FieldType<string, string>;
|
|
82
84
|
isOptional: false;
|
|
83
85
|
};
|
|
84
86
|
connectionId: {
|
|
85
|
-
type:
|
|
87
|
+
type: _lssm_lib_schema365.FieldType<string, string>;
|
|
86
88
|
isOptional: true;
|
|
87
89
|
};
|
|
88
90
|
balanceTypes: {
|
|
89
|
-
type:
|
|
91
|
+
type: _lssm_lib_schema365.FieldType<string, string>;
|
|
90
92
|
isArray: true;
|
|
91
93
|
isOptional: true;
|
|
92
94
|
};
|
|
93
95
|
forceRefresh: {
|
|
94
|
-
type:
|
|
96
|
+
type: _lssm_lib_schema365.FieldType<boolean, boolean>;
|
|
95
97
|
isOptional: true;
|
|
96
98
|
};
|
|
97
99
|
}>, SchemaModel<{
|
|
98
100
|
balances: {
|
|
99
101
|
type: SchemaModel<{
|
|
100
102
|
id: {
|
|
101
|
-
type:
|
|
103
|
+
type: _lssm_lib_schema365.FieldType<string, string>;
|
|
102
104
|
isOptional: false;
|
|
103
105
|
};
|
|
104
106
|
accountId: {
|
|
105
|
-
type:
|
|
107
|
+
type: _lssm_lib_schema365.FieldType<string, string>;
|
|
106
108
|
isOptional: false;
|
|
107
109
|
};
|
|
108
110
|
tenantId: {
|
|
109
|
-
type:
|
|
111
|
+
type: _lssm_lib_schema365.FieldType<string, string>;
|
|
110
112
|
isOptional: false;
|
|
111
113
|
};
|
|
112
114
|
connectionId: {
|
|
113
|
-
type:
|
|
115
|
+
type: _lssm_lib_schema365.FieldType<string, string>;
|
|
114
116
|
isOptional: false;
|
|
115
117
|
};
|
|
116
118
|
balanceType: {
|
|
117
|
-
type:
|
|
119
|
+
type: _lssm_lib_schema365.FieldType<string, string>;
|
|
118
120
|
isOptional: false;
|
|
119
121
|
};
|
|
120
122
|
currentBalance: {
|
|
121
|
-
type:
|
|
123
|
+
type: _lssm_lib_schema365.FieldType<number, number>;
|
|
122
124
|
isOptional: false;
|
|
123
125
|
};
|
|
124
126
|
availableBalance: {
|
|
125
|
-
type:
|
|
127
|
+
type: _lssm_lib_schema365.FieldType<number, number>;
|
|
126
128
|
isOptional: true;
|
|
127
129
|
};
|
|
128
130
|
currency: {
|
|
129
|
-
type:
|
|
131
|
+
type: _lssm_lib_schema365.FieldType<string, string>;
|
|
130
132
|
isOptional: false;
|
|
131
133
|
};
|
|
132
134
|
lastUpdatedAt: {
|
|
133
|
-
type:
|
|
135
|
+
type: _lssm_lib_schema365.FieldType<Date, string>;
|
|
134
136
|
isOptional: false;
|
|
135
137
|
};
|
|
136
138
|
createdAt: {
|
|
137
|
-
type:
|
|
139
|
+
type: _lssm_lib_schema365.FieldType<Date, string>;
|
|
138
140
|
isOptional: false;
|
|
139
141
|
};
|
|
140
142
|
metadata: {
|
|
141
|
-
type:
|
|
143
|
+
type: _lssm_lib_schema365.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
142
144
|
isOptional: true;
|
|
143
145
|
};
|
|
144
146
|
}>;
|
|
@@ -146,11 +148,11 @@ declare const OpenBankingRefreshBalances: ContractSpec<SchemaModel<{
|
|
|
146
148
|
isArray: true;
|
|
147
149
|
};
|
|
148
150
|
refreshedAt: {
|
|
149
|
-
type:
|
|
151
|
+
type: _lssm_lib_schema365.FieldType<Date, string>;
|
|
150
152
|
isOptional: false;
|
|
151
153
|
};
|
|
152
154
|
errors: {
|
|
153
|
-
type:
|
|
155
|
+
type: _lssm_lib_schema365.FieldType<string, string>;
|
|
154
156
|
isArray: true;
|
|
155
157
|
isOptional: true;
|
|
156
158
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"balances.d.ts","names":[],"sources":["../../../../src/integrations/openbanking/contracts/balances.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"balances.d.ts","names":[],"sources":["../../../../src/integrations/openbanking/contracts/balances.ts"],"sourcesContent":[],"mappings":";;;;;;cA2Ea,wBAAsB,aAAA;;UAmBjC,mBAAA,CAAA;IAnBW,UAAA,EAAA,KAAA;EAmBX,CAAA;;;IAnBiC,UAAA,EAAA,KAAA;EAAA,CAAA;;;;;;;;;;cAAA,mBAAA,CAAA;;;;;;;;;QAAA,UAAA,EAAA,KAAA;MAAA,CAAA;MAqBtB,YAAA,EAAA;QAwDX,IAAA,+BAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;QAxDqC,UAAA,EAAA,KAAA;MAAA,CAAA;;;;;;;;;;;;;;;;;;;;MAAA,CAAA;MAAA,QAAA,EAAA;QA0D1B,IAAA,+BAA4C,OAAf,CAAA,MAAM,EAAA,OAAA,CAAA,QAAA,CAAA,MAAA,EAAA,OAAA,CAAA,CAAA;QAMhC,UAAA,EAAA,IAAA;;;;;;;;;;;cAhEH,4BAA0B,aAAA;;UAwDrC,mBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;cAxDqC,mBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA0D1B,6BAA6B,eAAe;iBAMzC,mCAAA,WACJ,eACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{l as e}from"../../../schema/dist/ScalarTypeEnum.js";import{t}from"../../../schema/dist/SchemaModel.js";import"../../../schema/dist/index.js";import{defineCommand as n,defineQuery as r}from"../../../spec.js";import{AccountBalanceRecord as i}from"../models.js";import{OPENBANKING_TELEMETRY_EVENTS as a}from"../telemetry.js";const o=new t({name:`OpenBankingGetBalancesInput`,description:`Parameters for retrieving bank account balances from the canonical ledger.`,fields:{tenantId:{type:e.ID(),isOptional:!1},accountId:{type:e.ID(),isOptional:!1},balanceTypes:{type:e.String_unsecure(),isArray:!0,isOptional:!0}}}),s=new t({name:`OpenBankingGetBalancesOutput`,description:`Canonical balances for a bank account.`,fields:{balances:{type:i,isOptional:!1,isArray:!0},asOf:{type:e.DateTime(),isOptional:!0}}}),c=new t({name:`OpenBankingRefreshBalancesInput`,description:`Command payload to refresh balances for a bank account via the open banking provider.`,fields:{tenantId:{type:e.ID(),isOptional:!1},accountId:{type:e.ID(),isOptional:!1},connectionId:{type:e.ID(),isOptional:!0},balanceTypes:{type:e.String_unsecure(),isArray:!0,isOptional:!0},forceRefresh:{type:e.Boolean(),isOptional:!0}}}),l=new t({name:`OpenBankingRefreshBalancesOutput`,description:`Result of a balance refresh against the open banking provider.`,fields:{balances:{type:i,isOptional:!1,isArray:!0},refreshedAt:{type:e.DateTime(),isOptional:!1},errors:{type:e.String_unsecure(),isArray:!0,isOptional:!0}}}),u=r({meta:{name:`openbanking.balances.get`,version:1,description:`Retrieve the latest cached balances for a bank account.`,goal:`Expose current and available balances required by dashboards and analytics.`,context:`Used by Pocket Family Office UI surfaces and automation steps that require balance totals prior to generating summaries.`,owners:[`platform.finance`],tags:[`open-banking`,`powens`,`balances`],stability:`experimental`},io:{input:o,output:s},policy:{auth:`user`}}),d=n({meta:{name:`openbanking.balances.refresh`,version:1,description:`Refresh balances for a bank account via the configured open banking provider.`,goal:`Ensure canonical balance records reflect the latest values from Powens.`,context:`Triggered by scheduled workflows before generating summaries or forecasting cashflow.`,owners:[`platform.finance`],tags:[`open-banking`,`powens`,`balances`],stability:`experimental`},io:{input:c,output:l},policy:{auth:`admin`},telemetry:{success:{event:{name:a.balancesRefreshed},properties:({input:e,output:t})=>{let n=e,r=t;return{tenantId:n?.tenantId,accountId:n?.accountId,refreshedAt:r?.refreshedAt,balanceCount:Array.isArray(r?.balances)?r?.balances.length:void 0}}},failure:{event:{name:a.balancesRefreshFailed},properties:({input:e,error:t})=>{let n=e;return{tenantId:n?.tenantId,accountId:n?.accountId,error:t instanceof Error?t.message:String(t??`unknown`)}}}}}),f={OpenBankingGetBalances:u,OpenBankingRefreshBalances:d};function p(e){return e.register(u).register(d)}export{u as OpenBankingGetBalances,d as OpenBankingRefreshBalances,f as openBankingBalanceContracts,p as registerOpenBankingBalanceContracts};
|
|
2
2
|
//# sourceMappingURL=balances.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"balances.js","names":["openBankingBalanceContracts: Record<string, ContractSpec<any, any>>"],"sources":["../../../../src/integrations/openbanking/contracts/balances.ts"],"sourcesContent":["import {\n ScalarTypeEnum,\n SchemaModel,\n} from '@lssm/lib.schema';\nimport {\n defineCommand,\n defineQuery,\n type ContractSpec,\n} from '../../../spec';\nimport type { SpecRegistry } from '../../../registry';\nimport { AccountBalanceRecord } from '../models';\nimport { OPENBANKING_TELEMETRY_EVENTS } from '../telemetry';\n\nconst OpenBankingGetBalancesInput = new SchemaModel({\n name: 'OpenBankingGetBalancesInput',\n description: 'Parameters for retrieving bank account balances from the canonical ledger.',\n fields: {\n tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },\n accountId: { type: ScalarTypeEnum.ID(), isOptional: false },\n balanceTypes: {\n type: ScalarTypeEnum.String_unsecure(),\n isArray: true,\n isOptional: true,\n },\n },\n});\n\nconst OpenBankingGetBalancesOutput = new SchemaModel({\n name: 'OpenBankingGetBalancesOutput',\n description: 'Canonical balances for a bank account.',\n fields: {\n balances: {\n type: AccountBalanceRecord,\n isOptional: false,\n isArray: true,\n },\n asOf: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n },\n});\n\nconst OpenBankingRefreshBalancesInput = new SchemaModel({\n name: 'OpenBankingRefreshBalancesInput',\n description:\n 'Command payload to refresh balances for a bank account via the open banking provider.',\n fields: {\n tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },\n accountId: { type: ScalarTypeEnum.ID(), isOptional: false },\n connectionId: { type: ScalarTypeEnum.ID(), isOptional: true },\n balanceTypes: {\n type: ScalarTypeEnum.String_unsecure(),\n isArray: true,\n isOptional: true,\n },\n forceRefresh: { type: ScalarTypeEnum.Boolean(), isOptional: true },\n },\n});\n\nconst OpenBankingRefreshBalancesOutput = new SchemaModel({\n name: 'OpenBankingRefreshBalancesOutput',\n description: 'Result of a balance refresh against the open banking provider.',\n fields: {\n balances: {\n type: AccountBalanceRecord,\n isOptional: false,\n isArray: true,\n },\n refreshedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n errors: {\n type: ScalarTypeEnum.String_unsecure(),\n isArray: true,\n isOptional: true,\n },\n },\n});\n\nexport const OpenBankingGetBalances = defineQuery({\n meta: {\n name: 'openbanking.balances.get',\n version: 1,\n description: 'Retrieve the latest cached balances for a bank account.',\n goal: 'Expose current and available balances required by dashboards and analytics.',\n context:\n 'Used by Pocket Family Office UI surfaces and automation steps that require balance totals prior to generating summaries.',\n owners: ['platform.finance'],\n tags: ['open-banking', 'powens', 'balances'],\n stability: 'experimental',\n },\n io: {\n input: OpenBankingGetBalancesInput,\n output: OpenBankingGetBalancesOutput,\n },\n policy: {\n auth: 'user',\n },\n});\n\nexport const OpenBankingRefreshBalances = defineCommand({\n meta: {\n name: 'openbanking.balances.refresh',\n version: 1,\n description: 'Refresh balances for a bank account via the configured open banking provider.',\n goal: 'Ensure canonical balance records reflect the latest values from Powens.',\n context:\n 'Triggered by scheduled workflows before generating summaries or forecasting cashflow.',\n owners: ['platform.finance'],\n tags: ['open-banking', 'powens', 'balances'],\n stability: 'experimental',\n },\n io: {\n input: OpenBankingRefreshBalancesInput,\n output: OpenBankingRefreshBalancesOutput,\n },\n policy: {\n auth: 'admin',\n },\n telemetry: {\n success: {\n event: { name: OPENBANKING_TELEMETRY_EVENTS.balancesRefreshed },\n properties: ({ input, output }) => {\n const payload = input as {\n tenantId?: string;\n accountId?: string;\n };\n const result = output as {\n balances?: unknown[];\n refreshedAt?: string;\n } | null;\n return {\n tenantId: payload?.tenantId,\n accountId: payload?.accountId,\n refreshedAt: result?.refreshedAt,\n balanceCount: Array.isArray(result?.balances)\n ? result?.balances.length\n : undefined,\n };\n },\n },\n failure: {\n event: { name: OPENBANKING_TELEMETRY_EVENTS.balancesRefreshFailed },\n properties: ({ input, error }) => {\n const payload = input as {\n tenantId?: string;\n accountId?: string;\n };\n return {\n tenantId: payload?.tenantId,\n accountId: payload?.accountId,\n error: error instanceof Error ? error.message : String(error ?? 'unknown'),\n };\n },\n },\n },\n});\n\nexport const openBankingBalanceContracts: Record<string, ContractSpec<any, any>> =\n {\n OpenBankingGetBalances,\n OpenBankingRefreshBalances,\n };\n\nexport function registerOpenBankingBalanceContracts(\n registry: SpecRegistry\n): SpecRegistry {\n return registry\n .register(OpenBankingGetBalances)\n .register(OpenBankingRefreshBalances);\n}\n\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"balances.js","names":["SchemaModel","ScalarTypeEnum","openBankingBalanceContracts: Record<string, ContractSpec<any, any>>"],"sources":["../../../../src/integrations/openbanking/contracts/balances.ts"],"sourcesContent":["import {\n ScalarTypeEnum,\n SchemaModel,\n} from '@lssm/lib.schema';\nimport {\n defineCommand,\n defineQuery,\n type ContractSpec,\n} from '../../../spec';\nimport type { SpecRegistry } from '../../../registry';\nimport { AccountBalanceRecord } from '../models';\nimport { OPENBANKING_TELEMETRY_EVENTS } from '../telemetry';\n\nconst OpenBankingGetBalancesInput = new SchemaModel({\n name: 'OpenBankingGetBalancesInput',\n description: 'Parameters for retrieving bank account balances from the canonical ledger.',\n fields: {\n tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },\n accountId: { type: ScalarTypeEnum.ID(), isOptional: false },\n balanceTypes: {\n type: ScalarTypeEnum.String_unsecure(),\n isArray: true,\n isOptional: true,\n },\n },\n});\n\nconst OpenBankingGetBalancesOutput = new SchemaModel({\n name: 'OpenBankingGetBalancesOutput',\n description: 'Canonical balances for a bank account.',\n fields: {\n balances: {\n type: AccountBalanceRecord,\n isOptional: false,\n isArray: true,\n },\n asOf: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n },\n});\n\nconst OpenBankingRefreshBalancesInput = new SchemaModel({\n name: 'OpenBankingRefreshBalancesInput',\n description:\n 'Command payload to refresh balances for a bank account via the open banking provider.',\n fields: {\n tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },\n accountId: { type: ScalarTypeEnum.ID(), isOptional: false },\n connectionId: { type: ScalarTypeEnum.ID(), isOptional: true },\n balanceTypes: {\n type: ScalarTypeEnum.String_unsecure(),\n isArray: true,\n isOptional: true,\n },\n forceRefresh: { type: ScalarTypeEnum.Boolean(), isOptional: true },\n },\n});\n\nconst OpenBankingRefreshBalancesOutput = new SchemaModel({\n name: 'OpenBankingRefreshBalancesOutput',\n description: 'Result of a balance refresh against the open banking provider.',\n fields: {\n balances: {\n type: AccountBalanceRecord,\n isOptional: false,\n isArray: true,\n },\n refreshedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n errors: {\n type: ScalarTypeEnum.String_unsecure(),\n isArray: true,\n isOptional: true,\n },\n },\n});\n\nexport const OpenBankingGetBalances = defineQuery({\n meta: {\n name: 'openbanking.balances.get',\n version: 1,\n description: 'Retrieve the latest cached balances for a bank account.',\n goal: 'Expose current and available balances required by dashboards and analytics.',\n context:\n 'Used by Pocket Family Office UI surfaces and automation steps that require balance totals prior to generating summaries.',\n owners: ['platform.finance'],\n tags: ['open-banking', 'powens', 'balances'],\n stability: 'experimental',\n },\n io: {\n input: OpenBankingGetBalancesInput,\n output: OpenBankingGetBalancesOutput,\n },\n policy: {\n auth: 'user',\n },\n});\n\nexport const OpenBankingRefreshBalances = defineCommand({\n meta: {\n name: 'openbanking.balances.refresh',\n version: 1,\n description: 'Refresh balances for a bank account via the configured open banking provider.',\n goal: 'Ensure canonical balance records reflect the latest values from Powens.',\n context:\n 'Triggered by scheduled workflows before generating summaries or forecasting cashflow.',\n owners: ['platform.finance'],\n tags: ['open-banking', 'powens', 'balances'],\n stability: 'experimental',\n },\n io: {\n input: OpenBankingRefreshBalancesInput,\n output: OpenBankingRefreshBalancesOutput,\n },\n policy: {\n auth: 'admin',\n },\n telemetry: {\n success: {\n event: { name: OPENBANKING_TELEMETRY_EVENTS.balancesRefreshed },\n properties: ({ input, output }) => {\n const payload = input as {\n tenantId?: string;\n accountId?: string;\n };\n const result = output as {\n balances?: unknown[];\n refreshedAt?: string;\n } | null;\n return {\n tenantId: payload?.tenantId,\n accountId: payload?.accountId,\n refreshedAt: result?.refreshedAt,\n balanceCount: Array.isArray(result?.balances)\n ? result?.balances.length\n : undefined,\n };\n },\n },\n failure: {\n event: { name: OPENBANKING_TELEMETRY_EVENTS.balancesRefreshFailed },\n properties: ({ input, error }) => {\n const payload = input as {\n tenantId?: string;\n accountId?: string;\n };\n return {\n tenantId: payload?.tenantId,\n accountId: payload?.accountId,\n error: error instanceof Error ? error.message : String(error ?? 'unknown'),\n };\n },\n },\n },\n});\n\nexport const openBankingBalanceContracts: Record<string, ContractSpec<any, any>> =\n {\n OpenBankingGetBalances,\n OpenBankingRefreshBalances,\n };\n\nexport function registerOpenBankingBalanceContracts(\n registry: SpecRegistry\n): SpecRegistry {\n return registry\n .register(OpenBankingGetBalances)\n .register(OpenBankingRefreshBalances);\n}\n\n"],"mappings":"yUAaA,MAAM,EAA8B,IAAIA,EAAY,CAClD,KAAM,8BACN,YAAa,6EACb,OAAQ,CACN,SAAU,CAAE,KAAMC,EAAe,IAAI,CAAE,WAAY,GAAO,CAC1D,UAAW,CAAE,KAAMA,EAAe,IAAI,CAAE,WAAY,GAAO,CAC3D,aAAc,CACZ,KAAMA,EAAe,iBAAiB,CACtC,QAAS,GACT,WAAY,GACb,CACF,CACF,CAAC,CAEI,EAA+B,IAAID,EAAY,CACnD,KAAM,+BACN,YAAa,yCACb,OAAQ,CACN,SAAU,CACR,KAAM,EACN,WAAY,GACZ,QAAS,GACV,CACD,KAAM,CAAE,KAAMC,EAAe,UAAU,CAAE,WAAY,GAAM,CAC5D,CACF,CAAC,CAEI,EAAkC,IAAID,EAAY,CACtD,KAAM,kCACN,YACE,wFACF,OAAQ,CACN,SAAU,CAAE,KAAMC,EAAe,IAAI,CAAE,WAAY,GAAO,CAC1D,UAAW,CAAE,KAAMA,EAAe,IAAI,CAAE,WAAY,GAAO,CAC3D,aAAc,CAAE,KAAMA,EAAe,IAAI,CAAE,WAAY,GAAM,CAC7D,aAAc,CACZ,KAAMA,EAAe,iBAAiB,CACtC,QAAS,GACT,WAAY,GACb,CACD,aAAc,CAAE,KAAMA,EAAe,SAAS,CAAE,WAAY,GAAM,CACnE,CACF,CAAC,CAEI,EAAmC,IAAID,EAAY,CACvD,KAAM,mCACN,YAAa,iEACb,OAAQ,CACN,SAAU,CACR,KAAM,EACN,WAAY,GACZ,QAAS,GACV,CACD,YAAa,CAAE,KAAMC,EAAe,UAAU,CAAE,WAAY,GAAO,CACnE,OAAQ,CACN,KAAMA,EAAe,iBAAiB,CACtC,QAAS,GACT,WAAY,GACb,CACF,CACF,CAAC,CAEW,EAAyB,EAAY,CAChD,KAAM,CACJ,KAAM,2BACN,QAAS,EACT,YAAa,0DACb,KAAM,8EACN,QACE,2HACF,OAAQ,CAAC,mBAAmB,CAC5B,KAAM,CAAC,eAAgB,SAAU,WAAW,CAC5C,UAAW,eACZ,CACD,GAAI,CACF,MAAO,EACP,OAAQ,EACT,CACD,OAAQ,CACN,KAAM,OACP,CACF,CAAC,CAEW,EAA6B,EAAc,CACtD,KAAM,CACJ,KAAM,+BACN,QAAS,EACT,YAAa,gFACb,KAAM,0EACN,QACE,wFACF,OAAQ,CAAC,mBAAmB,CAC5B,KAAM,CAAC,eAAgB,SAAU,WAAW,CAC5C,UAAW,eACZ,CACD,GAAI,CACF,MAAO,EACP,OAAQ,EACT,CACD,OAAQ,CACN,KAAM,QACP,CACD,UAAW,CACT,QAAS,CACP,MAAO,CAAE,KAAM,EAA6B,kBAAmB,CAC/D,YAAa,CAAE,QAAO,YAAa,CACjC,IAAM,EAAU,EAIV,EAAS,EAIf,MAAO,CACL,SAAU,GAAS,SACnB,UAAW,GAAS,UACpB,YAAa,GAAQ,YACrB,aAAc,MAAM,QAAQ,GAAQ,SAAS,CACzC,GAAQ,SAAS,OACjB,IAAA,GACL,EAEJ,CACD,QAAS,CACP,MAAO,CAAE,KAAM,EAA6B,sBAAuB,CACnE,YAAa,CAAE,QAAO,WAAY,CAChC,IAAM,EAAU,EAIhB,MAAO,CACL,SAAU,GAAS,SACnB,UAAW,GAAS,UACpB,MAAO,aAAiB,MAAQ,EAAM,QAAU,OAAO,GAAS,UAAU,CAC3E,EAEJ,CACF,CACF,CAAC,CAEWC,EACX,CACE,yBACA,6BACD,CAEH,SAAgB,EACd,EACc,CACd,OAAO,EACJ,SAAS,EAAuB,CAChC,SAAS,EAA2B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/integrations/openbanking/contracts/index.ts"],"sourcesContent":["import type { SpecRegistry } from '../../../registry';\nimport {\n registerOpenBankingAccountContracts,\n OpenBankingGetAccount,\n OpenBankingListAccounts,\n OpenBankingSyncAccounts,\n} from './accounts';\nimport {\n registerOpenBankingTransactionContracts,\n OpenBankingListTransactions,\n OpenBankingSyncTransactions,\n} from './transactions';\nimport {\n registerOpenBankingBalanceContracts,\n OpenBankingGetBalances,\n OpenBankingRefreshBalances,\n} from './balances';\n\nexport {\n OpenBankingGetAccount,\n OpenBankingListAccounts,\n OpenBankingSyncAccounts,\n OpenBankingListTransactions,\n OpenBankingSyncTransactions,\n OpenBankingGetBalances,\n OpenBankingRefreshBalances,\n};\n\nexport function registerOpenBankingContracts(\n registry: SpecRegistry\n): SpecRegistry {\n return registerOpenBankingBalanceContracts(\n registerOpenBankingTransactionContracts(\n registerOpenBankingAccountContracts(registry)\n )\n );\n}\n\n"],"mappings":"uaA4BA,SAAgB,EACd,EACc,CACd,OAAO,EACL,EACE,EAAoC,EAAS,CAC9C,CACF"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/integrations/openbanking/contracts/index.ts"],"sourcesContent":["import type { SpecRegistry } from '../../../registry';\nimport {\n registerOpenBankingAccountContracts,\n OpenBankingGetAccount,\n OpenBankingListAccounts,\n OpenBankingSyncAccounts,\n} from './accounts';\nimport {\n registerOpenBankingTransactionContracts,\n OpenBankingListTransactions,\n OpenBankingSyncTransactions,\n} from './transactions';\nimport {\n registerOpenBankingBalanceContracts,\n OpenBankingGetBalances,\n OpenBankingRefreshBalances,\n} from './balances';\n\nexport {\n OpenBankingGetAccount,\n OpenBankingListAccounts,\n OpenBankingSyncAccounts,\n OpenBankingListTransactions,\n OpenBankingSyncTransactions,\n OpenBankingGetBalances,\n OpenBankingRefreshBalances,\n};\n\nexport function registerOpenBankingContracts(\n registry: SpecRegistry\n): SpecRegistry {\n return registerOpenBankingBalanceContracts(\n registerOpenBankingTransactionContracts(\n registerOpenBankingAccountContracts(registry)\n )\n );\n}\n\n\n"],"mappings":"uaA4BA,SAAgB,EACd,EACc,CACd,OAAO,EACL,EACE,EAAoC,EAAS,CAC9C,CACF"}
|
|
@@ -1,137 +1,139 @@
|
|
|
1
1
|
import { ContractSpec } from "../../../spec.js";
|
|
2
2
|
import { SpecRegistry } from "../../../registry.js";
|
|
3
|
+
import * as _lssm_lib_schema398 from "@lssm/lib.schema";
|
|
4
|
+
import { SchemaModel } from "@lssm/lib.schema";
|
|
3
5
|
|
|
4
6
|
//#region src/integrations/openbanking/contracts/transactions.d.ts
|
|
5
7
|
declare const OpenBankingListTransactions: ContractSpec<SchemaModel<{
|
|
6
8
|
tenantId: {
|
|
7
|
-
type:
|
|
9
|
+
type: _lssm_lib_schema398.FieldType<string, string>;
|
|
8
10
|
isOptional: false;
|
|
9
11
|
};
|
|
10
12
|
accountId: {
|
|
11
|
-
type:
|
|
13
|
+
type: _lssm_lib_schema398.FieldType<string, string>;
|
|
12
14
|
isOptional: false;
|
|
13
15
|
};
|
|
14
16
|
from: {
|
|
15
|
-
type:
|
|
17
|
+
type: _lssm_lib_schema398.FieldType<Date, string>;
|
|
16
18
|
isOptional: true;
|
|
17
19
|
};
|
|
18
20
|
to: {
|
|
19
|
-
type:
|
|
21
|
+
type: _lssm_lib_schema398.FieldType<Date, string>;
|
|
20
22
|
isOptional: true;
|
|
21
23
|
};
|
|
22
24
|
cursor: {
|
|
23
|
-
type:
|
|
25
|
+
type: _lssm_lib_schema398.FieldType<string, string>;
|
|
24
26
|
isOptional: true;
|
|
25
27
|
};
|
|
26
28
|
pageSize: {
|
|
27
|
-
type:
|
|
29
|
+
type: _lssm_lib_schema398.FieldType<number, number>;
|
|
28
30
|
isOptional: true;
|
|
29
31
|
};
|
|
30
32
|
direction: {
|
|
31
|
-
type:
|
|
33
|
+
type: _lssm_lib_schema398.FieldType<string, string>;
|
|
32
34
|
isOptional: true;
|
|
33
35
|
};
|
|
34
36
|
minimumAmount: {
|
|
35
|
-
type:
|
|
37
|
+
type: _lssm_lib_schema398.FieldType<number, number>;
|
|
36
38
|
isOptional: true;
|
|
37
39
|
};
|
|
38
40
|
maximumAmount: {
|
|
39
|
-
type:
|
|
41
|
+
type: _lssm_lib_schema398.FieldType<number, number>;
|
|
40
42
|
isOptional: true;
|
|
41
43
|
};
|
|
42
44
|
category: {
|
|
43
|
-
type:
|
|
45
|
+
type: _lssm_lib_schema398.FieldType<string, string>;
|
|
44
46
|
isOptional: true;
|
|
45
47
|
};
|
|
46
48
|
}>, SchemaModel<{
|
|
47
49
|
transactions: {
|
|
48
50
|
type: SchemaModel<{
|
|
49
51
|
id: {
|
|
50
|
-
type:
|
|
52
|
+
type: _lssm_lib_schema398.FieldType<string, string>;
|
|
51
53
|
isOptional: false;
|
|
52
54
|
};
|
|
53
55
|
accountId: {
|
|
54
|
-
type:
|
|
56
|
+
type: _lssm_lib_schema398.FieldType<string, string>;
|
|
55
57
|
isOptional: false;
|
|
56
58
|
};
|
|
57
59
|
tenantId: {
|
|
58
|
-
type:
|
|
60
|
+
type: _lssm_lib_schema398.FieldType<string, string>;
|
|
59
61
|
isOptional: false;
|
|
60
62
|
};
|
|
61
63
|
connectionId: {
|
|
62
|
-
type:
|
|
64
|
+
type: _lssm_lib_schema398.FieldType<string, string>;
|
|
63
65
|
isOptional: false;
|
|
64
66
|
};
|
|
65
67
|
externalId: {
|
|
66
|
-
type:
|
|
68
|
+
type: _lssm_lib_schema398.FieldType<string, string>;
|
|
67
69
|
isOptional: false;
|
|
68
70
|
};
|
|
69
71
|
amount: {
|
|
70
|
-
type:
|
|
72
|
+
type: _lssm_lib_schema398.FieldType<number, number>;
|
|
71
73
|
isOptional: false;
|
|
72
74
|
};
|
|
73
75
|
currency: {
|
|
74
|
-
type:
|
|
76
|
+
type: _lssm_lib_schema398.FieldType<string, string>;
|
|
75
77
|
isOptional: false;
|
|
76
78
|
};
|
|
77
79
|
date: {
|
|
78
|
-
type:
|
|
80
|
+
type: _lssm_lib_schema398.FieldType<Date, string>;
|
|
79
81
|
isOptional: false;
|
|
80
82
|
};
|
|
81
83
|
bookingDate: {
|
|
82
|
-
type:
|
|
84
|
+
type: _lssm_lib_schema398.FieldType<Date, string>;
|
|
83
85
|
isOptional: true;
|
|
84
86
|
};
|
|
85
87
|
valueDate: {
|
|
86
|
-
type:
|
|
88
|
+
type: _lssm_lib_schema398.FieldType<Date, string>;
|
|
87
89
|
isOptional: true;
|
|
88
90
|
};
|
|
89
91
|
description: {
|
|
90
|
-
type:
|
|
92
|
+
type: _lssm_lib_schema398.FieldType<string, string>;
|
|
91
93
|
isOptional: true;
|
|
92
94
|
};
|
|
93
95
|
counterpartyName: {
|
|
94
|
-
type:
|
|
96
|
+
type: _lssm_lib_schema398.FieldType<string, string>;
|
|
95
97
|
isOptional: true;
|
|
96
98
|
};
|
|
97
99
|
counterpartyAccount: {
|
|
98
|
-
type:
|
|
100
|
+
type: _lssm_lib_schema398.FieldType<string, string>;
|
|
99
101
|
isOptional: true;
|
|
100
102
|
};
|
|
101
103
|
merchantCategoryCode: {
|
|
102
|
-
type:
|
|
104
|
+
type: _lssm_lib_schema398.FieldType<string, string>;
|
|
103
105
|
isOptional: true;
|
|
104
106
|
};
|
|
105
107
|
rawCategory: {
|
|
106
|
-
type:
|
|
108
|
+
type: _lssm_lib_schema398.FieldType<string, string>;
|
|
107
109
|
isOptional: true;
|
|
108
110
|
};
|
|
109
111
|
standardizedCategory: {
|
|
110
|
-
type:
|
|
112
|
+
type: _lssm_lib_schema398.FieldType<string, string>;
|
|
111
113
|
isOptional: true;
|
|
112
114
|
};
|
|
113
115
|
transactionType: {
|
|
114
|
-
type:
|
|
116
|
+
type: _lssm_lib_schema398.FieldType<string, string>;
|
|
115
117
|
isOptional: false;
|
|
116
118
|
};
|
|
117
119
|
status: {
|
|
118
|
-
type:
|
|
120
|
+
type: _lssm_lib_schema398.FieldType<string, string>;
|
|
119
121
|
isOptional: false;
|
|
120
122
|
};
|
|
121
123
|
runningBalance: {
|
|
122
|
-
type:
|
|
124
|
+
type: _lssm_lib_schema398.FieldType<number, number>;
|
|
123
125
|
isOptional: true;
|
|
124
126
|
};
|
|
125
127
|
metadata: {
|
|
126
|
-
type:
|
|
128
|
+
type: _lssm_lib_schema398.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
127
129
|
isOptional: true;
|
|
128
130
|
};
|
|
129
131
|
createdAt: {
|
|
130
|
-
type:
|
|
132
|
+
type: _lssm_lib_schema398.FieldType<Date, string>;
|
|
131
133
|
isOptional: false;
|
|
132
134
|
};
|
|
133
135
|
updatedAt: {
|
|
134
|
-
type:
|
|
136
|
+
type: _lssm_lib_schema398.FieldType<Date, string>;
|
|
135
137
|
isOptional: false;
|
|
136
138
|
};
|
|
137
139
|
}>;
|
|
@@ -139,66 +141,66 @@ declare const OpenBankingListTransactions: ContractSpec<SchemaModel<{
|
|
|
139
141
|
isArray: true;
|
|
140
142
|
};
|
|
141
143
|
nextCursor: {
|
|
142
|
-
type:
|
|
144
|
+
type: _lssm_lib_schema398.FieldType<string, string>;
|
|
143
145
|
isOptional: true;
|
|
144
146
|
};
|
|
145
147
|
hasMore: {
|
|
146
|
-
type:
|
|
148
|
+
type: _lssm_lib_schema398.FieldType<boolean, boolean>;
|
|
147
149
|
isOptional: true;
|
|
148
150
|
};
|
|
149
151
|
}>, undefined>;
|
|
150
152
|
declare const OpenBankingSyncTransactions: ContractSpec<SchemaModel<{
|
|
151
153
|
tenantId: {
|
|
152
|
-
type:
|
|
154
|
+
type: _lssm_lib_schema398.FieldType<string, string>;
|
|
153
155
|
isOptional: false;
|
|
154
156
|
};
|
|
155
157
|
accountId: {
|
|
156
|
-
type:
|
|
158
|
+
type: _lssm_lib_schema398.FieldType<string, string>;
|
|
157
159
|
isOptional: false;
|
|
158
160
|
};
|
|
159
161
|
from: {
|
|
160
|
-
type:
|
|
162
|
+
type: _lssm_lib_schema398.FieldType<Date, string>;
|
|
161
163
|
isOptional: true;
|
|
162
164
|
};
|
|
163
165
|
to: {
|
|
164
|
-
type:
|
|
166
|
+
type: _lssm_lib_schema398.FieldType<Date, string>;
|
|
165
167
|
isOptional: true;
|
|
166
168
|
};
|
|
167
169
|
connectionId: {
|
|
168
|
-
type:
|
|
170
|
+
type: _lssm_lib_schema398.FieldType<string, string>;
|
|
169
171
|
isOptional: true;
|
|
170
172
|
};
|
|
171
173
|
includePending: {
|
|
172
|
-
type:
|
|
174
|
+
type: _lssm_lib_schema398.FieldType<boolean, boolean>;
|
|
173
175
|
isOptional: true;
|
|
174
176
|
};
|
|
175
177
|
backfillDays: {
|
|
176
|
-
type:
|
|
178
|
+
type: _lssm_lib_schema398.FieldType<number, number>;
|
|
177
179
|
isOptional: true;
|
|
178
180
|
};
|
|
179
181
|
}>, SchemaModel<{
|
|
180
182
|
synced: {
|
|
181
|
-
type:
|
|
183
|
+
type: _lssm_lib_schema398.FieldType<number, number>;
|
|
182
184
|
isOptional: false;
|
|
183
185
|
};
|
|
184
186
|
failed: {
|
|
185
|
-
type:
|
|
187
|
+
type: _lssm_lib_schema398.FieldType<number, number>;
|
|
186
188
|
isOptional: false;
|
|
187
189
|
};
|
|
188
190
|
earliestSyncedAt: {
|
|
189
|
-
type:
|
|
191
|
+
type: _lssm_lib_schema398.FieldType<Date, string>;
|
|
190
192
|
isOptional: true;
|
|
191
193
|
};
|
|
192
194
|
latestSyncedAt: {
|
|
193
|
-
type:
|
|
195
|
+
type: _lssm_lib_schema398.FieldType<Date, string>;
|
|
194
196
|
isOptional: true;
|
|
195
197
|
};
|
|
196
198
|
nextSinceToken: {
|
|
197
|
-
type:
|
|
199
|
+
type: _lssm_lib_schema398.FieldType<string, string>;
|
|
198
200
|
isOptional: true;
|
|
199
201
|
};
|
|
200
202
|
errors: {
|
|
201
|
-
type:
|
|
203
|
+
type: _lssm_lib_schema398.FieldType<string, string>;
|
|
202
204
|
isArray: true;
|
|
203
205
|
isOptional: true;
|
|
204
206
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.d.ts","names":[],"sources":["../../../../src/integrations/openbanking/contracts/transactions.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transactions.d.ts","names":[],"sources":["../../../../src/integrations/openbanking/contracts/transactions.ts"],"sourcesContent":[],"mappings":";;;;;;cA4Ea,6BAA2B,aAAA;;UAmBtC,mBAAA,CAAA;IAnBW,UAAA,EAAA,KAAA;EAmBX,CAAA;;;;;;;;;;;;EAnBsC,CAAA;EAAA,MAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAA,mBAAA,CAAA;;;;;QAAA,UAAA,EAAA,KAAA;MAAA,CAAA;MAqB3B,QAAA,EAAA;QA2DX,IAAA,+BAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;QA3DsC,UAAA,EAAA,KAAA;MAAA,CAAA;;;;;;;;;MAAA,IAAA,EAAA;QAAA,IAAA,+BAAA,KAAA,EAAA,MAAA,CAAA;QA6D3B,UAAA,EAAA,KAAA;MAQG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cArEH,6BAA2B,aAAA;;UA2DtC,mBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA3DsC,mBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;cA6D3B,iCAAiC,eAE5C;iBAMc,uCAAA,WACJ,eACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{l as e}from"../../../schema/dist/ScalarTypeEnum.js";import{t}from"../../../schema/dist/SchemaModel.js";import"../../../schema/dist/index.js";import{defineCommand as n,defineQuery as r}from"../../../spec.js";import{BankTransactionRecord as i}from"../models.js";import{OPENBANKING_TELEMETRY_EVENTS as a}from"../telemetry.js";const o=new t({name:`OpenBankingListTransactionsInput`,description:`Parameters for listing bank transactions from the canonical ledger.`,fields:{tenantId:{type:e.ID(),isOptional:!1},accountId:{type:e.ID(),isOptional:!1},from:{type:e.DateTime(),isOptional:!0},to:{type:e.DateTime(),isOptional:!0},cursor:{type:e.String_unsecure(),isOptional:!0},pageSize:{type:e.Int_unsecure(),isOptional:!0},direction:{type:e.String_unsecure(),isOptional:!0},minimumAmount:{type:e.Float_unsecure(),isOptional:!0},maximumAmount:{type:e.Float_unsecure(),isOptional:!0},category:{type:e.String_unsecure(),isOptional:!0}}}),s=new t({name:`OpenBankingListTransactionsOutput`,description:`Paginated list of transactions for a bank account.`,fields:{transactions:{type:i,isOptional:!1,isArray:!0},nextCursor:{type:e.String_unsecure(),isOptional:!0},hasMore:{type:e.Boolean(),isOptional:!0}}}),c=new t({name:`OpenBankingSyncTransactionsInput`,description:`Command payload to synchronise transactions from the open banking provider into the canonical ledger.`,fields:{tenantId:{type:e.ID(),isOptional:!1},accountId:{type:e.ID(),isOptional:!1},from:{type:e.DateTime(),isOptional:!0},to:{type:e.DateTime(),isOptional:!0},connectionId:{type:e.ID(),isOptional:!0},includePending:{type:e.Boolean(),isOptional:!0},backfillDays:{type:e.Int_unsecure(),isOptional:!0}}}),l=new t({name:`OpenBankingSyncTransactionsOutput`,description:`Result of a transaction synchronisation run.`,fields:{synced:{type:e.Int_unsecure(),isOptional:!1},failed:{type:e.Int_unsecure(),isOptional:!1},earliestSyncedAt:{type:e.DateTime(),isOptional:!0},latestSyncedAt:{type:e.DateTime(),isOptional:!0},nextSinceToken:{type:e.String_unsecure(),isOptional:!0},errors:{type:e.String_unsecure(),isArray:!0,isOptional:!0}}}),u=r({meta:{name:`openbanking.transactions.list`,version:1,description:`List bank transactions that have been normalised into the canonical ledger.`,goal:`Allow downstream analytics and UI surfaces to page through canonical bank transactions.`,context:`Used by Pocket Family Office dashboards, reconciliation workflows, and analytics data views.`,owners:[`platform.finance`],tags:[`open-banking`,`powens`,`transactions`],stability:`experimental`},io:{input:o,output:s},policy:{auth:`user`}}),d=n({meta:{name:`openbanking.transactions.sync`,version:1,description:`Synchronise transactions for a bank account by calling the configured open banking provider.`,goal:`Ensure the canonical transaction ledger stays aligned with the external provider.`,context:`Triggered by scheduled workflows or on-demand actions when activity is expected on an account.`,owners:[`platform.finance`],tags:[`open-banking`,`powens`,`transactions`],stability:`experimental`},io:{input:c,output:l},policy:{auth:`admin`},telemetry:{success:{event:{name:a.transactionsSynced},properties:({input:e,output:t})=>{let n=e,r=t;return{tenantId:n?.tenantId,accountId:n?.accountId,synced:r?.synced,failed:r?.failed,earliestSyncedAt:r?.earliestSyncedAt,latestSyncedAt:r?.latestSyncedAt}}},failure:{event:{name:a.transactionsSyncFailed},properties:({input:e,error:t})=>{let n=e;return{tenantId:n?.tenantId,accountId:n?.accountId,error:t instanceof Error?t.message:String(t??`unknown`)}}}}}),f={OpenBankingListTransactions:u,OpenBankingSyncTransactions:d};function p(e){return e.register(u).register(d)}export{u as OpenBankingListTransactions,d as OpenBankingSyncTransactions,f as openBankingTransactionContracts,p as registerOpenBankingTransactionContracts};
|
|
2
2
|
//# sourceMappingURL=transactions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.js","names":["openBankingTransactionContracts: Record<\n string,\n ContractSpec<any, any>\n>"],"sources":["../../../../src/integrations/openbanking/contracts/transactions.ts"],"sourcesContent":["import {\n ScalarTypeEnum,\n SchemaModel,\n} from '@lssm/lib.schema';\nimport {\n defineCommand,\n defineQuery,\n type ContractSpec,\n} from '../../../spec';\nimport type { SpecRegistry } from '../../../registry';\nimport { BankTransactionRecord } from '../models';\nimport { OPENBANKING_TELEMETRY_EVENTS } from '../telemetry';\n\nconst OpenBankingListTransactionsInput = new SchemaModel({\n name: 'OpenBankingListTransactionsInput',\n description: 'Parameters for listing bank transactions from the canonical ledger.',\n fields: {\n tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },\n accountId: { type: ScalarTypeEnum.ID(), isOptional: false },\n from: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n to: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n cursor: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n pageSize: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n direction: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n minimumAmount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: true },\n maximumAmount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: true },\n category: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\nconst OpenBankingListTransactionsOutput = new SchemaModel({\n name: 'OpenBankingListTransactionsOutput',\n description: 'Paginated list of transactions for a bank account.',\n fields: {\n transactions: {\n type: BankTransactionRecord,\n isOptional: false,\n isArray: true,\n },\n nextCursor: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n hasMore: { type: ScalarTypeEnum.Boolean(), isOptional: true },\n },\n});\n\nconst OpenBankingSyncTransactionsInput = new SchemaModel({\n name: 'OpenBankingSyncTransactionsInput',\n description:\n 'Command payload to synchronise transactions from the open banking provider into the canonical ledger.',\n fields: {\n tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },\n accountId: { type: ScalarTypeEnum.ID(), isOptional: false },\n from: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n to: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n connectionId: { type: ScalarTypeEnum.ID(), isOptional: true },\n includePending: { type: ScalarTypeEnum.Boolean(), isOptional: true },\n backfillDays: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n },\n});\n\nconst OpenBankingSyncTransactionsOutput = new SchemaModel({\n name: 'OpenBankingSyncTransactionsOutput',\n description: 'Result of a transaction synchronisation run.',\n fields: {\n synced: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n failed: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n earliestSyncedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n latestSyncedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n nextSinceToken: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n errors: {\n type: ScalarTypeEnum.String_unsecure(),\n isArray: true,\n isOptional: true,\n },\n },\n});\n\nexport const OpenBankingListTransactions = defineQuery({\n meta: {\n name: 'openbanking.transactions.list',\n version: 1,\n description: 'List bank transactions that have been normalised into the canonical ledger.',\n goal: 'Allow downstream analytics and UI surfaces to page through canonical bank transactions.',\n context:\n 'Used by Pocket Family Office dashboards, reconciliation workflows, and analytics data views.',\n owners: ['platform.finance'],\n tags: ['open-banking', 'powens', 'transactions'],\n stability: 'experimental',\n },\n io: {\n input: OpenBankingListTransactionsInput,\n output: OpenBankingListTransactionsOutput,\n },\n policy: {\n auth: 'user',\n },\n});\n\nexport const OpenBankingSyncTransactions = defineCommand({\n meta: {\n name: 'openbanking.transactions.sync',\n version: 1,\n description:\n 'Synchronise transactions for a bank account by calling the configured open banking provider.',\n goal: 'Ensure the canonical transaction ledger stays aligned with the external provider.',\n context:\n 'Triggered by scheduled workflows or on-demand actions when activity is expected on an account.',\n owners: ['platform.finance'],\n tags: ['open-banking', 'powens', 'transactions'],\n stability: 'experimental',\n },\n io: {\n input: OpenBankingSyncTransactionsInput,\n output: OpenBankingSyncTransactionsOutput,\n },\n policy: {\n auth: 'admin',\n },\n telemetry: {\n success: {\n event: { name: OPENBANKING_TELEMETRY_EVENTS.transactionsSynced },\n properties: ({ input, output }) => {\n const payload = input as {\n tenantId?: string;\n accountId?: string;\n };\n const result = output as {\n synced?: number;\n failed?: number;\n earliestSyncedAt?: string;\n latestSyncedAt?: string;\n } | null;\n return {\n tenantId: payload?.tenantId,\n accountId: payload?.accountId,\n synced: result?.synced,\n failed: result?.failed,\n earliestSyncedAt: result?.earliestSyncedAt,\n latestSyncedAt: result?.latestSyncedAt,\n };\n },\n },\n failure: {\n event: { name: OPENBANKING_TELEMETRY_EVENTS.transactionsSyncFailed },\n properties: ({ input, error }) => {\n const payload = input as {\n tenantId?: string;\n accountId?: string;\n };\n return {\n tenantId: payload?.tenantId,\n accountId: payload?.accountId,\n error: error instanceof Error ? error.message : String(error ?? 'unknown'),\n };\n },\n },\n },\n});\n\nexport const openBankingTransactionContracts: Record<\n string,\n ContractSpec<any, any>\n> = {\n OpenBankingListTransactions,\n OpenBankingSyncTransactions,\n};\n\nexport function registerOpenBankingTransactionContracts(\n registry: SpecRegistry\n): SpecRegistry {\n return registry\n .register(OpenBankingListTransactions)\n .register(OpenBankingSyncTransactions);\n}\n\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"transactions.js","names":["SchemaModel","ScalarTypeEnum","openBankingTransactionContracts: Record<\n string,\n ContractSpec<any, any>\n>"],"sources":["../../../../src/integrations/openbanking/contracts/transactions.ts"],"sourcesContent":["import {\n ScalarTypeEnum,\n SchemaModel,\n} from '@lssm/lib.schema';\nimport {\n defineCommand,\n defineQuery,\n type ContractSpec,\n} from '../../../spec';\nimport type { SpecRegistry } from '../../../registry';\nimport { BankTransactionRecord } from '../models';\nimport { OPENBANKING_TELEMETRY_EVENTS } from '../telemetry';\n\nconst OpenBankingListTransactionsInput = new SchemaModel({\n name: 'OpenBankingListTransactionsInput',\n description: 'Parameters for listing bank transactions from the canonical ledger.',\n fields: {\n tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },\n accountId: { type: ScalarTypeEnum.ID(), isOptional: false },\n from: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n to: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n cursor: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n pageSize: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n direction: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n minimumAmount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: true },\n maximumAmount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: true },\n category: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\nconst OpenBankingListTransactionsOutput = new SchemaModel({\n name: 'OpenBankingListTransactionsOutput',\n description: 'Paginated list of transactions for a bank account.',\n fields: {\n transactions: {\n type: BankTransactionRecord,\n isOptional: false,\n isArray: true,\n },\n nextCursor: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n hasMore: { type: ScalarTypeEnum.Boolean(), isOptional: true },\n },\n});\n\nconst OpenBankingSyncTransactionsInput = new SchemaModel({\n name: 'OpenBankingSyncTransactionsInput',\n description:\n 'Command payload to synchronise transactions from the open banking provider into the canonical ledger.',\n fields: {\n tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },\n accountId: { type: ScalarTypeEnum.ID(), isOptional: false },\n from: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n to: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n connectionId: { type: ScalarTypeEnum.ID(), isOptional: true },\n includePending: { type: ScalarTypeEnum.Boolean(), isOptional: true },\n backfillDays: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n },\n});\n\nconst OpenBankingSyncTransactionsOutput = new SchemaModel({\n name: 'OpenBankingSyncTransactionsOutput',\n description: 'Result of a transaction synchronisation run.',\n fields: {\n synced: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n failed: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n earliestSyncedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n latestSyncedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n nextSinceToken: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n errors: {\n type: ScalarTypeEnum.String_unsecure(),\n isArray: true,\n isOptional: true,\n },\n },\n});\n\nexport const OpenBankingListTransactions = defineQuery({\n meta: {\n name: 'openbanking.transactions.list',\n version: 1,\n description: 'List bank transactions that have been normalised into the canonical ledger.',\n goal: 'Allow downstream analytics and UI surfaces to page through canonical bank transactions.',\n context:\n 'Used by Pocket Family Office dashboards, reconciliation workflows, and analytics data views.',\n owners: ['platform.finance'],\n tags: ['open-banking', 'powens', 'transactions'],\n stability: 'experimental',\n },\n io: {\n input: OpenBankingListTransactionsInput,\n output: OpenBankingListTransactionsOutput,\n },\n policy: {\n auth: 'user',\n },\n});\n\nexport const OpenBankingSyncTransactions = defineCommand({\n meta: {\n name: 'openbanking.transactions.sync',\n version: 1,\n description:\n 'Synchronise transactions for a bank account by calling the configured open banking provider.',\n goal: 'Ensure the canonical transaction ledger stays aligned with the external provider.',\n context:\n 'Triggered by scheduled workflows or on-demand actions when activity is expected on an account.',\n owners: ['platform.finance'],\n tags: ['open-banking', 'powens', 'transactions'],\n stability: 'experimental',\n },\n io: {\n input: OpenBankingSyncTransactionsInput,\n output: OpenBankingSyncTransactionsOutput,\n },\n policy: {\n auth: 'admin',\n },\n telemetry: {\n success: {\n event: { name: OPENBANKING_TELEMETRY_EVENTS.transactionsSynced },\n properties: ({ input, output }) => {\n const payload = input as {\n tenantId?: string;\n accountId?: string;\n };\n const result = output as {\n synced?: number;\n failed?: number;\n earliestSyncedAt?: string;\n latestSyncedAt?: string;\n } | null;\n return {\n tenantId: payload?.tenantId,\n accountId: payload?.accountId,\n synced: result?.synced,\n failed: result?.failed,\n earliestSyncedAt: result?.earliestSyncedAt,\n latestSyncedAt: result?.latestSyncedAt,\n };\n },\n },\n failure: {\n event: { name: OPENBANKING_TELEMETRY_EVENTS.transactionsSyncFailed },\n properties: ({ input, error }) => {\n const payload = input as {\n tenantId?: string;\n accountId?: string;\n };\n return {\n tenantId: payload?.tenantId,\n accountId: payload?.accountId,\n error: error instanceof Error ? error.message : String(error ?? 'unknown'),\n };\n },\n },\n },\n});\n\nexport const openBankingTransactionContracts: Record<\n string,\n ContractSpec<any, any>\n> = {\n OpenBankingListTransactions,\n OpenBankingSyncTransactions,\n};\n\nexport function registerOpenBankingTransactionContracts(\n registry: SpecRegistry\n): SpecRegistry {\n return registry\n .register(OpenBankingListTransactions)\n .register(OpenBankingSyncTransactions);\n}\n\n"],"mappings":"0UAaA,MAAM,EAAmC,IAAIA,EAAY,CACvD,KAAM,mCACN,YAAa,sEACb,OAAQ,CACN,SAAU,CAAE,KAAMC,EAAe,IAAI,CAAE,WAAY,GAAO,CAC1D,UAAW,CAAE,KAAMA,EAAe,IAAI,CAAE,WAAY,GAAO,CAC3D,KAAM,CAAE,KAAMA,EAAe,UAAU,CAAE,WAAY,GAAM,CAC3D,GAAI,CAAE,KAAMA,EAAe,UAAU,CAAE,WAAY,GAAM,CACzD,OAAQ,CAAE,KAAMA,EAAe,iBAAiB,CAAE,WAAY,GAAM,CACpE,SAAU,CAAE,KAAMA,EAAe,cAAc,CAAE,WAAY,GAAM,CACnE,UAAW,CAAE,KAAMA,EAAe,iBAAiB,CAAE,WAAY,GAAM,CACvE,cAAe,CAAE,KAAMA,EAAe,gBAAgB,CAAE,WAAY,GAAM,CAC1E,cAAe,CAAE,KAAMA,EAAe,gBAAgB,CAAE,WAAY,GAAM,CAC1E,SAAU,CAAE,KAAMA,EAAe,iBAAiB,CAAE,WAAY,GAAM,CACvE,CACF,CAAC,CAEI,EAAoC,IAAID,EAAY,CACxD,KAAM,oCACN,YAAa,qDACb,OAAQ,CACN,aAAc,CACZ,KAAM,EACN,WAAY,GACZ,QAAS,GACV,CACD,WAAY,CAAE,KAAMC,EAAe,iBAAiB,CAAE,WAAY,GAAM,CACxE,QAAS,CAAE,KAAMA,EAAe,SAAS,CAAE,WAAY,GAAM,CAC9D,CACF,CAAC,CAEI,EAAmC,IAAID,EAAY,CACvD,KAAM,mCACN,YACE,wGACF,OAAQ,CACN,SAAU,CAAE,KAAMC,EAAe,IAAI,CAAE,WAAY,GAAO,CAC1D,UAAW,CAAE,KAAMA,EAAe,IAAI,CAAE,WAAY,GAAO,CAC3D,KAAM,CAAE,KAAMA,EAAe,UAAU,CAAE,WAAY,GAAM,CAC3D,GAAI,CAAE,KAAMA,EAAe,UAAU,CAAE,WAAY,GAAM,CACzD,aAAc,CAAE,KAAMA,EAAe,IAAI,CAAE,WAAY,GAAM,CAC7D,eAAgB,CAAE,KAAMA,EAAe,SAAS,CAAE,WAAY,GAAM,CACpE,aAAc,CAAE,KAAMA,EAAe,cAAc,CAAE,WAAY,GAAM,CACxE,CACF,CAAC,CAEI,EAAoC,IAAID,EAAY,CACxD,KAAM,oCACN,YAAa,+CACb,OAAQ,CACN,OAAQ,CAAE,KAAMC,EAAe,cAAc,CAAE,WAAY,GAAO,CAClE,OAAQ,CAAE,KAAMA,EAAe,cAAc,CAAE,WAAY,GAAO,CAClE,iBAAkB,CAAE,KAAMA,EAAe,UAAU,CAAE,WAAY,GAAM,CACvE,eAAgB,CAAE,KAAMA,EAAe,UAAU,CAAE,WAAY,GAAM,CACrE,eAAgB,CAAE,KAAMA,EAAe,iBAAiB,CAAE,WAAY,GAAM,CAC5E,OAAQ,CACN,KAAMA,EAAe,iBAAiB,CACtC,QAAS,GACT,WAAY,GACb,CACF,CACF,CAAC,CAEW,EAA8B,EAAY,CACrD,KAAM,CACJ,KAAM,gCACN,QAAS,EACT,YAAa,8EACb,KAAM,0FACN,QACE,+FACF,OAAQ,CAAC,mBAAmB,CAC5B,KAAM,CAAC,eAAgB,SAAU,eAAe,CAChD,UAAW,eACZ,CACD,GAAI,CACF,MAAO,EACP,OAAQ,EACT,CACD,OAAQ,CACN,KAAM,OACP,CACF,CAAC,CAEW,EAA8B,EAAc,CACvD,KAAM,CACJ,KAAM,gCACN,QAAS,EACT,YACE,+FACF,KAAM,oFACN,QACE,iGACF,OAAQ,CAAC,mBAAmB,CAC5B,KAAM,CAAC,eAAgB,SAAU,eAAe,CAChD,UAAW,eACZ,CACD,GAAI,CACF,MAAO,EACP,OAAQ,EACT,CACD,OAAQ,CACN,KAAM,QACP,CACD,UAAW,CACT,QAAS,CACP,MAAO,CAAE,KAAM,EAA6B,mBAAoB,CAChE,YAAa,CAAE,QAAO,YAAa,CACjC,IAAM,EAAU,EAIV,EAAS,EAMf,MAAO,CACL,SAAU,GAAS,SACnB,UAAW,GAAS,UACpB,OAAQ,GAAQ,OAChB,OAAQ,GAAQ,OAChB,iBAAkB,GAAQ,iBAC1B,eAAgB,GAAQ,eACzB,EAEJ,CACD,QAAS,CACP,MAAO,CAAE,KAAM,EAA6B,uBAAwB,CACpE,YAAa,CAAE,QAAO,WAAY,CAChC,IAAM,EAAU,EAIhB,MAAO,CACL,SAAU,GAAS,SACnB,UAAW,GAAS,UACpB,MAAO,aAAiB,MAAQ,EAAM,QAAU,OAAO,GAAS,UAAU,CAC3E,EAEJ,CACF,CACF,CAAC,CAEWC,EAGT,CACF,8BACA,8BACD,CAED,SAAgB,EACd,EACc,CACd,OAAO,EACJ,SAAS,EAA4B,CACrC,SAAS,EAA4B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guards.js","names":[],"sources":["../../../src/integrations/openbanking/guards.ts"],"sourcesContent":["import type {\n ResolvedAppConfig,\n ResolvedIntegration,\n} from '../../app-config/runtime';\n\nconst PRIMARY_SLOT_ID = 'primaryOpenBanking';\n\nexport interface OpenBankingGuardResult {\n ok: boolean;\n integration?: ResolvedIntegration;\n error?: string;\n}\n\nexport function ensurePrimaryOpenBankingIntegration(\n config: ResolvedAppConfig\n): OpenBankingGuardResult {\n const integration = config.integrations.find(\n (item) => item.slot.slotId === PRIMARY_SLOT_ID\n );\n\n if (!integration) {\n return {\n ok: false,\n error: 'primaryOpenBanking slot is not bound in the resolved app config.',\n };\n }\n\n const status = integration.connection.status;\n if (status === 'error' || status === 'disconnected') {\n return {\n ok: false,\n integration,\n error: `primaryOpenBanking connection is in status \"${status}\".`,\n };\n }\n\n if (status === 'unknown') {\n return {\n ok: false,\n integration,\n error: 'primaryOpenBanking connection health is unknown.',\n };\n }\n\n return { ok: true, integration };\n}\n\nexport function assertPrimaryOpenBankingReady(\n config: ResolvedAppConfig\n): ResolvedIntegration {\n const result = ensurePrimaryOpenBankingIntegration(config);\n if (!result.ok) {\n throw new Error(result.error ?? 'Open banking integration not available.');\n }\n return result.integration!;\n}\n\n"],"mappings":"AAaA,SAAgB,EACd,EACwB,CACxB,IAAM,EAAc,EAAO,aAAa,KACrC,GAAS,EAAK,KAAK,SAAW,qBAChC,CAED,GAAI,CAAC,EACH,MAAO,CACL,GAAI,GACJ,MAAO,mEACR,CAGH,IAAM,EAAS,EAAY,WAAW,OAiBtC,OAhBI,IAAW,SAAW,IAAW,eAC5B,CACL,GAAI,GACJ,cACA,MAAO,+CAA+C,EAAO,IAC9D,CAGC,IAAW,UACN,CACL,GAAI,GACJ,cACA,MAAO,mDACR,CAGI,CAAE,GAAI,GAAM,cAAa,CAGlC,SAAgB,EACd,EACqB,CACrB,IAAM,EAAS,EAAoC,EAAO,CAC1D,GAAI,CAAC,EAAO,GACV,MAAU,MAAM,EAAO,OAAS,0CAA0C,CAE5E,OAAO,EAAO"}
|
|
1
|
+
{"version":3,"file":"guards.js","names":[],"sources":["../../../src/integrations/openbanking/guards.ts"],"sourcesContent":["import type {\n ResolvedAppConfig,\n ResolvedIntegration,\n} from '../../app-config/runtime';\n\nconst PRIMARY_SLOT_ID = 'primaryOpenBanking';\n\nexport interface OpenBankingGuardResult {\n ok: boolean;\n integration?: ResolvedIntegration;\n error?: string;\n}\n\nexport function ensurePrimaryOpenBankingIntegration(\n config: ResolvedAppConfig\n): OpenBankingGuardResult {\n const integration = config.integrations.find(\n (item) => item.slot.slotId === PRIMARY_SLOT_ID\n );\n\n if (!integration) {\n return {\n ok: false,\n error: 'primaryOpenBanking slot is not bound in the resolved app config.',\n };\n }\n\n const status = integration.connection.status;\n if (status === 'error' || status === 'disconnected') {\n return {\n ok: false,\n integration,\n error: `primaryOpenBanking connection is in status \"${status}\".`,\n };\n }\n\n if (status === 'unknown') {\n return {\n ok: false,\n integration,\n error: 'primaryOpenBanking connection health is unknown.',\n };\n }\n\n return { ok: true, integration };\n}\n\nexport function assertPrimaryOpenBankingReady(\n config: ResolvedAppConfig\n): ResolvedIntegration {\n const result = ensurePrimaryOpenBankingIntegration(config);\n if (!result.ok) {\n throw new Error(result.error ?? 'Open banking integration not available.');\n }\n return result.integration!;\n}\n\n\n"],"mappings":"AAaA,SAAgB,EACd,EACwB,CACxB,IAAM,EAAc,EAAO,aAAa,KACrC,GAAS,EAAK,KAAK,SAAW,qBAChC,CAED,GAAI,CAAC,EACH,MAAO,CACL,GAAI,GACJ,MAAO,mEACR,CAGH,IAAM,EAAS,EAAY,WAAW,OAiBtC,OAhBI,IAAW,SAAW,IAAW,eAC5B,CACL,GAAI,GACJ,cACA,MAAO,+CAA+C,EAAO,IAC9D,CAGC,IAAW,UACN,CACL,GAAI,GACJ,cACA,MAAO,mDACR,CAGI,CAAE,GAAI,GAAM,cAAa,CAGlC,SAAgB,EACd,EACqB,CACrB,IAAM,EAAS,EAAoC,EAAO,CAC1D,GAAI,CAAC,EAAO,GACV,MAAU,MAAM,EAAO,OAAS,0CAA0C,CAE5E,OAAO,EAAO"}
|