@lssm/lib.contracts 0.0.0-canary-20251120170226 → 0.0.0-canary-20251120192244
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 +50 -50
- package/dist/app-config/events.d.ts +27 -27
- package/dist/app-config/lifecycle-contracts.d.ts +80 -80
- package/dist/data-views/query-generator.js.map +1 -1
- package/dist/data-views/runtime.js.map +1 -1
- package/dist/integrations/contracts.d.ts +102 -102
- package/dist/integrations/contracts.d.ts.map +1 -1
- package/dist/integrations/openbanking/contracts/accounts.d.ts +66 -66
- package/dist/integrations/openbanking/contracts/accounts.d.ts.map +1 -1
- package/dist/integrations/openbanking/contracts/balances.d.ts +34 -34
- package/dist/integrations/openbanking/contracts/transactions.d.ts +48 -48
- package/dist/knowledge/contracts.d.ts +66 -66
- package/dist/onboarding-base.d.ts +29 -29
- package/dist/workflow/sla-monitor.js.map +1 -1
- package/dist/workflow/spec.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1,135 +1,135 @@
|
|
|
1
1
|
import { ContractSpec } from "./spec.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _lssm_lib_schema453 from "@lssm/lib.schema";
|
|
3
3
|
import { SchemaModel } from "@lssm/lib.schema";
|
|
4
4
|
|
|
5
5
|
//#region src/onboarding-base.d.ts
|
|
6
6
|
/** Save/update onboarding draft (auto-save during flow) */
|
|
7
7
|
declare const SaveOnboardingDraftInput: SchemaModel<{
|
|
8
8
|
data: {
|
|
9
|
-
type:
|
|
9
|
+
type: _lssm_lib_schema453.FieldType<unknown, unknown>;
|
|
10
10
|
isOptional: false;
|
|
11
11
|
};
|
|
12
12
|
}>;
|
|
13
13
|
declare const SaveOnboardingDraftOutput: SchemaModel<{
|
|
14
14
|
id: {
|
|
15
|
-
type:
|
|
15
|
+
type: _lssm_lib_schema453.FieldType<string, string>;
|
|
16
16
|
isOptional: false;
|
|
17
17
|
};
|
|
18
18
|
organizationId: {
|
|
19
|
-
type:
|
|
19
|
+
type: _lssm_lib_schema453.FieldType<string, string>;
|
|
20
20
|
isOptional: false;
|
|
21
21
|
};
|
|
22
22
|
}>;
|
|
23
23
|
declare const SaveOnboardingDraftBaseSpec: ContractSpec<SchemaModel<{
|
|
24
24
|
data: {
|
|
25
|
-
type:
|
|
25
|
+
type: _lssm_lib_schema453.FieldType<unknown, unknown>;
|
|
26
26
|
isOptional: false;
|
|
27
27
|
};
|
|
28
28
|
}>, SchemaModel<{
|
|
29
29
|
id: {
|
|
30
|
-
type:
|
|
30
|
+
type: _lssm_lib_schema453.FieldType<string, string>;
|
|
31
31
|
isOptional: false;
|
|
32
32
|
};
|
|
33
33
|
organizationId: {
|
|
34
|
-
type:
|
|
34
|
+
type: _lssm_lib_schema453.FieldType<string, string>;
|
|
35
35
|
isOptional: false;
|
|
36
36
|
};
|
|
37
37
|
}>, undefined>;
|
|
38
38
|
/** Get current onboarding draft (on mount/restore) */
|
|
39
39
|
declare const GetOnboardingDraftOutput: SchemaModel<{
|
|
40
40
|
id: {
|
|
41
|
-
type:
|
|
41
|
+
type: _lssm_lib_schema453.FieldType<string, string>;
|
|
42
42
|
isOptional: true;
|
|
43
43
|
};
|
|
44
44
|
organizationId: {
|
|
45
|
-
type:
|
|
45
|
+
type: _lssm_lib_schema453.FieldType<string, string>;
|
|
46
46
|
isOptional: true;
|
|
47
47
|
};
|
|
48
48
|
data: {
|
|
49
|
-
type:
|
|
49
|
+
type: _lssm_lib_schema453.FieldType<unknown, unknown>;
|
|
50
50
|
isOptional: true;
|
|
51
51
|
};
|
|
52
52
|
createdAt: {
|
|
53
|
-
type:
|
|
53
|
+
type: _lssm_lib_schema453.FieldType<Date, string>;
|
|
54
54
|
isOptional: true;
|
|
55
55
|
};
|
|
56
56
|
updatedAt: {
|
|
57
|
-
type:
|
|
57
|
+
type: _lssm_lib_schema453.FieldType<Date, string>;
|
|
58
58
|
isOptional: true;
|
|
59
59
|
};
|
|
60
60
|
}>;
|
|
61
|
-
declare const GetOnboardingDraftBaseSpec: ContractSpec<
|
|
61
|
+
declare const GetOnboardingDraftBaseSpec: ContractSpec<_lssm_lib_schema453.AnySchemaModel, SchemaModel<{
|
|
62
62
|
id: {
|
|
63
|
-
type:
|
|
63
|
+
type: _lssm_lib_schema453.FieldType<string, string>;
|
|
64
64
|
isOptional: true;
|
|
65
65
|
};
|
|
66
66
|
organizationId: {
|
|
67
|
-
type:
|
|
67
|
+
type: _lssm_lib_schema453.FieldType<string, string>;
|
|
68
68
|
isOptional: true;
|
|
69
69
|
};
|
|
70
70
|
data: {
|
|
71
|
-
type:
|
|
71
|
+
type: _lssm_lib_schema453.FieldType<unknown, unknown>;
|
|
72
72
|
isOptional: true;
|
|
73
73
|
};
|
|
74
74
|
createdAt: {
|
|
75
|
-
type:
|
|
75
|
+
type: _lssm_lib_schema453.FieldType<Date, string>;
|
|
76
76
|
isOptional: true;
|
|
77
77
|
};
|
|
78
78
|
updatedAt: {
|
|
79
|
-
type:
|
|
79
|
+
type: _lssm_lib_schema453.FieldType<Date, string>;
|
|
80
80
|
isOptional: true;
|
|
81
81
|
};
|
|
82
82
|
}>, undefined>;
|
|
83
83
|
/** Delete onboarding draft (cleanup after completion or cancel) */
|
|
84
84
|
declare const DeleteOnboardingDraftOutput: SchemaModel<{
|
|
85
85
|
ok: {
|
|
86
|
-
type:
|
|
86
|
+
type: _lssm_lib_schema453.FieldType<boolean, boolean>;
|
|
87
87
|
isOptional: false;
|
|
88
88
|
};
|
|
89
89
|
}>;
|
|
90
|
-
declare const DeleteOnboardingDraftBaseSpec: ContractSpec<
|
|
90
|
+
declare const DeleteOnboardingDraftBaseSpec: ContractSpec<_lssm_lib_schema453.AnySchemaModel, SchemaModel<{
|
|
91
91
|
ok: {
|
|
92
|
-
type:
|
|
92
|
+
type: _lssm_lib_schema453.FieldType<boolean, boolean>;
|
|
93
93
|
isOptional: false;
|
|
94
94
|
};
|
|
95
95
|
}>, undefined>;
|
|
96
96
|
/** Complete onboarding (final submit, creates entities) */
|
|
97
97
|
declare const CompleteOnboardingBaseInput: SchemaModel<{
|
|
98
98
|
data: {
|
|
99
|
-
type:
|
|
99
|
+
type: _lssm_lib_schema453.FieldType<unknown, unknown>;
|
|
100
100
|
isOptional: false;
|
|
101
101
|
};
|
|
102
102
|
}>;
|
|
103
103
|
declare const CompleteOnboardingBaseOutput: SchemaModel<{
|
|
104
104
|
success: {
|
|
105
|
-
type:
|
|
105
|
+
type: _lssm_lib_schema453.FieldType<boolean, boolean>;
|
|
106
106
|
isOptional: false;
|
|
107
107
|
};
|
|
108
108
|
userId: {
|
|
109
|
-
type:
|
|
109
|
+
type: _lssm_lib_schema453.FieldType<string, string>;
|
|
110
110
|
isOptional: true;
|
|
111
111
|
};
|
|
112
112
|
organizationId: {
|
|
113
|
-
type:
|
|
113
|
+
type: _lssm_lib_schema453.FieldType<string, string>;
|
|
114
114
|
isOptional: true;
|
|
115
115
|
};
|
|
116
116
|
}>;
|
|
117
117
|
declare const CompleteOnboardingBaseSpec: ContractSpec<SchemaModel<{
|
|
118
118
|
data: {
|
|
119
|
-
type:
|
|
119
|
+
type: _lssm_lib_schema453.FieldType<unknown, unknown>;
|
|
120
120
|
isOptional: false;
|
|
121
121
|
};
|
|
122
122
|
}>, SchemaModel<{
|
|
123
123
|
success: {
|
|
124
|
-
type:
|
|
124
|
+
type: _lssm_lib_schema453.FieldType<boolean, boolean>;
|
|
125
125
|
isOptional: false;
|
|
126
126
|
};
|
|
127
127
|
userId: {
|
|
128
|
-
type:
|
|
128
|
+
type: _lssm_lib_schema453.FieldType<string, string>;
|
|
129
129
|
isOptional: true;
|
|
130
130
|
};
|
|
131
131
|
organizationId: {
|
|
132
|
-
type:
|
|
132
|
+
type: _lssm_lib_schema453.FieldType<string, string>;
|
|
133
133
|
isOptional: true;
|
|
134
134
|
};
|
|
135
135
|
}>, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sla-monitor.js","names":["eventEmitter: (\n event: string,\n payload: SLABreachEvent\n ) => void"],"sources":["../../src/workflow/sla-monitor.ts"],"sourcesContent":["import type { WorkflowState } from './state';\nimport type { WorkflowSpec } from './spec';\n\nexport interface SLABreachEvent {\n workflowId: string;\n workflowName: string;\n type: 'workflow_duration' | 'step_duration';\n stepId?: string;\n expectedMs: number;\n actualMs: number;\n breachedAt: Date;\n}\n\nexport class SLAMonitor {\n constructor(\n private readonly eventEmitter: (\n event: string,\n payload: SLABreachEvent\n ) => void\n ) {}\n\n check(state: WorkflowState, spec: WorkflowSpec): void {\n const sla = spec.definition.sla;\n if (!sla) return;\n\n const now = new Date().getTime();\n\n // Check total workflow duration\n if (sla.totalDurationMs) {\n const duration = now - state.createdAt.getTime();\n if (duration > sla.totalDurationMs) {\n // Only emit if not already completed/failed/cancelled\n if (state.status === 'running' || state.status === 'paused') {\n this.eventEmitter('workflow.sla_breach', {\n workflowId: state.workflowId,\n workflowName: state.workflowName,\n type: 'workflow_duration',\n expectedMs: sla.totalDurationMs,\n actualMs: duration,\n breachedAt: new Date(),\n });\n }\n }\n }\n\n // Check step durations\n if (sla.stepDurationMs) {\n // Check currently running step\n if (state.status === 'running' && state.currentStep) {\n // Find when the current step started\n // It might be the last entry in history if it's running?\n // But history usually stores *completed* steps or *failed* attempts.\n // Runner updates history with status='running' at start of execution?\n // Let's check runner.ts:\n // const execution: StepExecution = { ... status: 'running' ... };\n // workingState.history.push(execution);\n // Yes, it pushes running execution.\n\n const currentExecution = state.history.find(\n (h) => h.stepId === state.currentStep && h.status === 'running'\n );\n\n if (currentExecution) {\n const stepLimit = sla.stepDurationMs[state.currentStep];\n if (stepLimit) {\n const stepDuration = now - currentExecution.startedAt.getTime();\n if (stepDuration > stepLimit) {\n this.eventEmitter('workflow.sla_breach', {\n workflowId: state.workflowId,\n workflowName: state.workflowName,\n type: 'step_duration',\n stepId: state.currentStep,\n expectedMs: stepLimit,\n actualMs: stepDuration,\n breachedAt: new Date(),\n });\n }\n }\n }\n }\n }\n }\n}\n"],"mappings":"AAaA,IAAa,EAAb,KAAwB,CACtB,YACE,EAIA,CAJiB,KAAA,aAAA,EAMnB,MAAM,EAAsB,EAA0B,CACpD,IAAM,EAAM,EAAK,WAAW,IAC5B,GAAI,CAAC,EAAK,OAEV,IAAM,EAAM,IAAI,MAAM,CAAC,SAAS,CAGhC,GAAI,EAAI,gBAAiB,CACvB,IAAM,EAAW,EAAM,EAAM,UAAU,SAAS,CAC5C,EAAW,EAAI,kBAEb,EAAM,SAAW,WAAa,EAAM,SAAW,WACjD,KAAK,aAAa,sBAAuB,CACvC,WAAY,EAAM,WAClB,aAAc,EAAM,aACpB,KAAM,oBACN,WAAY,EAAI,gBAChB,SAAU,EACV,WAAY,IAAI,KACjB,CAAC,CAMR,GAAI,EAAI,gBAEF,EAAM,SAAW,WAAa,EAAM,YAAa,CAUnD,IAAM,EAAmB,EAAM,QAAQ,KACpC,GAAM,EAAE,SAAW,EAAM,aAAe,EAAE,SAAW,UACvD,CAED,GAAI,EAAkB,CACpB,IAAM,EAAY,EAAI,eAAe,EAAM,aAC3C,GAAI,EAAW,CACb,IAAM,EAAe,EAAM,EAAiB,UAAU,SAAS,CAC3D,EAAe,GACjB,KAAK,aAAa,sBAAuB,CACvC,WAAY,EAAM,WAClB,aAAc,EAAM,aACpB,KAAM,gBACN,OAAQ,EAAM,YACd,WAAY,EACZ,SAAU,EACV,WAAY,IAAI,KACjB,CAAC"}
|
|
1
|
+
{"version":3,"file":"sla-monitor.js","names":["eventEmitter: (\n event: string,\n payload: SLABreachEvent\n ) => void"],"sources":["../../src/workflow/sla-monitor.ts"],"sourcesContent":["import type { WorkflowState } from './state';\nimport type { WorkflowSpec } from './spec';\n\nexport interface SLABreachEvent {\n workflowId: string;\n workflowName: string;\n type: 'workflow_duration' | 'step_duration';\n stepId?: string;\n expectedMs: number;\n actualMs: number;\n breachedAt: Date;\n}\n\nexport class SLAMonitor {\n constructor(\n private readonly eventEmitter: (\n event: string,\n payload: SLABreachEvent\n ) => void\n ) {}\n\n check(state: WorkflowState, spec: WorkflowSpec): void {\n const sla = spec.definition.sla;\n if (!sla) return;\n\n const now = new Date().getTime();\n\n // Check total workflow duration\n if (sla.totalDurationMs) {\n const duration = now - state.createdAt.getTime();\n if (duration > sla.totalDurationMs) {\n // Only emit if not already completed/failed/cancelled\n if (state.status === 'running' || state.status === 'paused') {\n this.eventEmitter('workflow.sla_breach', {\n workflowId: state.workflowId,\n workflowName: state.workflowName,\n type: 'workflow_duration',\n expectedMs: sla.totalDurationMs,\n actualMs: duration,\n breachedAt: new Date(),\n });\n }\n }\n }\n\n // Check step durations\n if (sla.stepDurationMs) {\n // Check currently running step\n if (state.status === 'running' && state.currentStep) {\n // Find when the current step started\n // It might be the last entry in history if it's running?\n // But history usually stores *completed* steps or *failed* attempts.\n // Runner updates history with status='running' at start of execution?\n // Let's check runner.ts:\n // const execution: StepExecution = { ... status: 'running' ... };\n // workingState.history.push(execution);\n // Yes, it pushes running execution.\n\n const currentExecution = state.history.find(\n (h) => h.stepId === state.currentStep && h.status === 'running'\n );\n\n if (currentExecution) {\n const stepLimit = sla.stepDurationMs[state.currentStep];\n if (stepLimit) {\n const stepDuration = now - currentExecution.startedAt.getTime();\n if (stepDuration > stepLimit) {\n this.eventEmitter('workflow.sla_breach', {\n workflowId: state.workflowId,\n workflowName: state.workflowName,\n type: 'step_duration',\n stepId: state.currentStep,\n expectedMs: stepLimit,\n actualMs: stepDuration,\n breachedAt: new Date(),\n });\n }\n }\n }\n }\n }\n }\n}\n\n"],"mappings":"AAaA,IAAa,EAAb,KAAwB,CACtB,YACE,EAIA,CAJiB,KAAA,aAAA,EAMnB,MAAM,EAAsB,EAA0B,CACpD,IAAM,EAAM,EAAK,WAAW,IAC5B,GAAI,CAAC,EAAK,OAEV,IAAM,EAAM,IAAI,MAAM,CAAC,SAAS,CAGhC,GAAI,EAAI,gBAAiB,CACvB,IAAM,EAAW,EAAM,EAAM,UAAU,SAAS,CAC5C,EAAW,EAAI,kBAEb,EAAM,SAAW,WAAa,EAAM,SAAW,WACjD,KAAK,aAAa,sBAAuB,CACvC,WAAY,EAAM,WAClB,aAAc,EAAM,aACpB,KAAM,oBACN,WAAY,EAAI,gBAChB,SAAU,EACV,WAAY,IAAI,KACjB,CAAC,CAMR,GAAI,EAAI,gBAEF,EAAM,SAAW,WAAa,EAAM,YAAa,CAUnD,IAAM,EAAmB,EAAM,QAAQ,KACpC,GAAM,EAAE,SAAW,EAAM,aAAe,EAAE,SAAW,UACvD,CAED,GAAI,EAAkB,CACpB,IAAM,EAAY,EAAI,eAAe,EAAM,aAC3C,GAAI,EAAW,CACb,IAAM,EAAe,EAAM,EAAiB,UAAU,SAAS,CAC3D,EAAe,GACjB,KAAK,aAAa,sBAAuB,CACvC,WAAY,EAAM,WAClB,aAAc,EAAM,aACpB,KAAM,gBACN,OAAQ,EAAM,YACd,WAAY,EACZ,SAAU,EACV,WAAY,IAAI,KACjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spec.d.ts","names":[],"sources":["../../src/workflow/spec.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAQA;AAKY,UALK,OAAA,CAKG;EAER,GAAA,EAAA,MAAA;EAOA,OAAA,EAAA,MAAA;AAEZ;AAMiB,KAjBL,QAAA,GAiBgB,OAAA,GAAA,YAAA,GAAA,UAAA;AAQX,KAvBL,cAAA,
|
|
1
|
+
{"version":3,"file":"spec.d.ts","names":[],"sources":["../../src/workflow/spec.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAQA;AAKY,UALK,OAAA,CAKG;EAER,GAAA,EAAA,MAAA;EAOA,OAAA,EAAA,MAAA;AAEZ;AAMiB,KAjBL,QAAA,GAiBgB,OAAA,GAAA,YAAA,GAAA,UAAA;AAQX,KAvBL,cAAA,GAyBE,SAEL,GAAA,QAAO,GAAA,WAAA,GAAA,QAAA,GAAA,WAAA;AAGC,KAvBL,kBAAA,GAuBS,QAAA,GAAA,YAAA;AAEb,UAvBS,cAAA,CAuBT;EAGG,IAAA,EAzBH,kBAyBG;EACD;EAEA,KAAA,EAAA,MAAA;;AAI4B,UA3BrB,WAAA,CA2BqB;EAGrB,WAAA,EAAU,MAAA;EAQV,OAAG,EAAA,QAAA,GAED,aAAM;EAGR,OAAA,EAAA,MAAA;EAMA;EAKA,UAAA,CAAA,EAAA,MAAA;;AAEF,UAhDE,UAAA,CAgDF;EAGP;EACS,SAAA,CAAA,EAlDH,KAkDG;EAAoB;EAGpB,IAAA,CAAA,EAnDR,OAmDQ;AAOjB;AACQ,UAxDS,IAAA,CAwDT;EACM,EAAA,EAAA,MAAA;EAEE,IAAA,EAzDR,QAyDQ;EAAa,KAAA,EAAA,MAAA;EAOhB,WAAA,CAAA,EAAA,MAAgB;EAGZ,MAAA,CAAA,EAhEN,UAgEM;EAOP,KAAA,CAAA,EAtEA,cAsEA;EAI6B,SAAA,CAAA,EAAA,MAAA;EAAY,KAAA,CAAA,EAxEzC,WAwEyC;;;;yBApE1B;;UAGR,UAAA;;;;;;;UAQA,GAAA;;mBAEE;;UAGF,gBAAA;;aAEJ;;;UAII,oBAAA;;SAER;;UAGQ,kBAAA;SACR;eACM;;;QAGP;iBACS;;UAGA,YAAA,SAAqB;;;;;;UAOrB,YAAA;QACT;cACM;;;;gBAEE;;cAOH,gBAAA;;iBAGI;UAOP;uCAI6B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lssm/lib.contracts",
|
|
3
|
-
"version": "0.0.0-canary-
|
|
3
|
+
"version": "0.0.0-canary-20251120192244",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "bun build:bundle && bun build:types",
|
|
6
6
|
"build:bundle": "tsdown",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"test": "vitest run"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@lssm/tool.tsdown": "0.0.0-canary-
|
|
17
|
-
"@lssm/tool.typescript": "0.0.0-canary-
|
|
16
|
+
"@lssm/tool.tsdown": "0.0.0-canary-20251120192244",
|
|
17
|
+
"@lssm/tool.typescript": "0.0.0-canary-20251120192244",
|
|
18
18
|
"@types/express": "^5.0.3",
|
|
19
19
|
"tsdown": "^0.15.9",
|
|
20
20
|
"typescript": "^5.9.3",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"stripe": "^19.1.0",
|
|
31
31
|
"postmark": "^4.0.4",
|
|
32
32
|
"twilio": "^5.10.5",
|
|
33
|
-
"@lssm/lib.schema": "0.0.0-canary-
|
|
33
|
+
"@lssm/lib.schema": "0.0.0-canary-20251120192244",
|
|
34
34
|
"@modelcontextprotocol/sdk": "^1.20.1",
|
|
35
35
|
"mcp-handler": "^1.0.2",
|
|
36
36
|
"zod": "^4.1.5"
|