@aibvf/core 0.10.5 → 0.11.0
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/README.md +10 -2
- package/dist/aliases.d.ts +6 -1
- package/dist/aliases.d.ts.map +1 -1
- package/dist/aliases.js +159 -40
- package/dist/aliases.js.map +1 -1
- package/dist/assessInitiative.d.ts +13 -2
- package/dist/assessInitiative.d.ts.map +1 -1
- package/dist/assessInitiative.js +342 -79
- package/dist/assessInitiative.js.map +1 -1
- package/dist/assessInitiative.test.js +210 -119
- package/dist/assessInitiative.test.js.map +1 -1
- package/dist/audit.d.ts +1 -1
- package/dist/audit.js +1 -1
- package/dist/extractRevenue.d.ts +7 -0
- package/dist/extractRevenue.d.ts.map +1 -0
- package/dist/extractRevenue.js +104 -0
- package/dist/extractRevenue.js.map +1 -0
- package/dist/extractRevenue.test.d.ts +2 -0
- package/dist/extractRevenue.test.d.ts.map +1 -0
- package/dist/extractRevenue.test.js +119 -0
- package/dist/extractRevenue.test.js.map +1 -0
- package/dist/guidedQuestions.d.ts +30 -0
- package/dist/guidedQuestions.d.ts.map +1 -0
- package/dist/guidedQuestions.js +104 -0
- package/dist/guidedQuestions.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/plainLanguage.test.d.ts +2 -0
- package/dist/plainLanguage.test.d.ts.map +1 -0
- package/dist/plainLanguage.test.js +97 -0
- package/dist/plainLanguage.test.js.map +1 -0
- package/dist/types.d.ts +107 -7
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# @aibvf/core
|
|
2
2
|
|
|
3
|
-
AI
|
|
3
|
+
Deterministic AI investment assessment with disclosed assumptions, evidence gaps and work design checks. The public portfolio format is version 1.0.
|
|
4
4
|
|
|
5
|
-
> **Source:** [github.com/Craig-Horton/ai-bvf](https://github.com/Craig-Horton/ai-bvf) ·
|
|
5
|
+
> **Source:** [github.com/Craig-Horton/ai-bvf](https://github.com/Craig-Horton/ai-bvf) · [Try an assessment](https://www.aibvf.com/start) · [Issues](https://github.com/Craig-Horton/ai-bvf/issues) · Built by [Craig Horton Advisory](https://craighortonadvisory.com)
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
npm install @aibvf/core
|
|
@@ -50,6 +50,14 @@ console.log(r.net_high_eur); // ~247M
|
|
|
50
50
|
|
|
51
51
|
The work architecture fields are optional inputs and accept only evidence the organisation has. An explicit `false` value or an omitted check holds an otherwise green initiative at Fix, while the response names each gap or unknown and returns the next question to ask. Accelerate requires all four checks to be evidenced as complete.
|
|
52
52
|
|
|
53
|
+
## Reading the result
|
|
54
|
+
|
|
55
|
+
The fields `net_low_eur` and `net_high_eur` are readiness-adjusted benefit scenarios before project build, operating and change costs. They require a separate costed business case.
|
|
56
|
+
|
|
57
|
+
The `confidence` field is a heuristic score derived from pillar inputs and input completeness, with no calibrated probability interpretation. Sector labels in `applied_modules` identify model context and do not certify regulatory compliance.
|
|
58
|
+
|
|
59
|
+
[Formulas and assumptions](https://github.com/Craig-Horton/ai-bvf/blob/main/docs/scoring-formulas.md) · [Reproducible example](https://github.com/Craig-Horton/ai-bvf/blob/main/docs/worked-example.md)
|
|
60
|
+
|
|
53
61
|
## Spec
|
|
54
62
|
|
|
55
63
|
Full specification at [www.aibvf.com/protocol](https://www.aibvf.com/protocol).
|
package/dist/aliases.d.ts
CHANGED
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
* map_to_taxonomy: senior users say "customer service", "procurement" and
|
|
3
3
|
* "legal", not cx, supply and risk. This maps everyday business language
|
|
4
4
|
* onto the canonical enums deterministically, so callers stop passing the
|
|
5
|
-
* wrong function.
|
|
5
|
+
* wrong function.
|
|
6
|
+
*
|
|
7
|
+
* Matching order: exact canonical id, exact alias, then whole-word phrase
|
|
8
|
+
* match. A phrase never matches inside another word, the longest phrase
|
|
9
|
+
* wins, and two phrases that point to different values return no value and
|
|
10
|
+
* name both candidates. An unresolved field is a question for the user.
|
|
6
11
|
*/
|
|
7
12
|
import type { MapTaxonomyResult } from './types.js';
|
|
8
13
|
export declare function mapToTaxonomy(input: {
|
package/dist/aliases.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aliases.d.ts","sourceRoot":"","sources":["../src/aliases.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"aliases.d.ts","sourceRoot":"","sources":["../src/aliases.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAiB,MAAM,YAAY,CAAC;AAwMnE,wBAAgB,aAAa,CAAC,KAAK,EAAE;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,iBAAiB,CASpB"}
|
package/dist/aliases.js
CHANGED
|
@@ -1,66 +1,185 @@
|
|
|
1
1
|
import { INDUSTRIES, FUNCTIONS, AI_TIERS, READINESS } from './taxonomy.js';
|
|
2
|
+
/** A direct answer is at most this many words; weak aliases apply only then. */
|
|
3
|
+
const SHORT_ANSWER_WORDS = 4;
|
|
2
4
|
const FUNCTION_ALIASES = {
|
|
3
|
-
cx:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
cx: {
|
|
6
|
+
strong: ['customer service', 'customer support', 'customer care', 'service desk', 'contact centre', 'contact center', 'customer experience', 'call centre', 'call center', 'helpdesk', 'help desk', 'client service', 'customer complaints', 'complaints handling', 'support team', 'cx'],
|
|
7
|
+
weak: ['support', 'complaints'],
|
|
8
|
+
},
|
|
9
|
+
supply: {
|
|
10
|
+
strong: ['procurement', 'supply chain', 'manufacturing ops', 'warehouse', 'warehousing', 'inventory', 'sourcing', 'fulfilment', 'fulfillment', 'purchasing'],
|
|
11
|
+
weak: ['logistics', 'operations', 'ops', 'supply'],
|
|
12
|
+
},
|
|
13
|
+
rd: {
|
|
14
|
+
strong: ['r&d', 'research and development', 'product development', 'product engineering', 'product team', 'engineering team'],
|
|
15
|
+
weak: ['research', 'product', 'engineering', 'innovation', 'design', 'development'],
|
|
16
|
+
},
|
|
17
|
+
risk: {
|
|
18
|
+
strong: ['legal', 'compliance', 'risk management', 'regulatory', 'fraud', 'internal audit', 'legal team', 'risk team'],
|
|
19
|
+
weak: ['audit', 'governance', 'controls', 'risk'],
|
|
20
|
+
},
|
|
21
|
+
hr: {
|
|
22
|
+
strong: ['recruiting', 'recruitment', 'human resources', 'people operations', 'l&d', 'learning and development', 'hr', 'hr team', 'onboarding', 'hiring'],
|
|
23
|
+
weak: ['people', 'talent', 'workforce'],
|
|
24
|
+
},
|
|
25
|
+
sales: {
|
|
26
|
+
strong: ['sales', 'sales team', 'marketing', 'business development', 'crm', 'account management', 'lead generation'],
|
|
27
|
+
weak: ['revenue', 'commercial', 'growth', 'pipeline', 'pricing'],
|
|
28
|
+
},
|
|
29
|
+
it: {
|
|
30
|
+
strong: ['it team', 'it department', 'it support', 'it helpdesk', 'it help desk', 'it service desk', 'it operations', 'it ops', 'devops', 'service management', 'itsm', 'security operations', 'it infrastructure'],
|
|
31
|
+
weak: ['technology', 'infrastructure', 'platform', 'cloud'],
|
|
32
|
+
},
|
|
33
|
+
finance: {
|
|
34
|
+
strong: ['finance', 'finance team', 'accounting', 'bookkeeping', 'month end', 'fp&a', 'treasury', 'controlling', 'financial planning', 'financial reporting', 'billing', 'invoicing', 'accounts payable', 'accounts receivable', 'fpa'],
|
|
35
|
+
},
|
|
11
36
|
};
|
|
12
37
|
const INDUSTRY_ALIASES = {
|
|
13
|
-
retail:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
38
|
+
retail: {
|
|
39
|
+
strong: ['retail', 'retailer', 'ecommerce', 'e-commerce', 'consumer goods', 'fmcg', 'grocery', 'fashion retail'],
|
|
40
|
+
weak: ['fashion', 'shops'],
|
|
41
|
+
},
|
|
42
|
+
financial: {
|
|
43
|
+
strong: ['financial services', 'banking', 'bank', 'retail bank', 'retail banking', 'insurance', 'insurer', 'fintech', 'asset management', 'wealth management', 'credit union', 'building society'],
|
|
44
|
+
weak: ['financial', 'payments'],
|
|
45
|
+
},
|
|
46
|
+
healthcare: {
|
|
47
|
+
strong: ['healthcare', 'health care', 'hospital', 'pharma', 'pharmaceutical', 'medtech', 'life sciences', 'clinic', 'care home', 'gp practice'],
|
|
48
|
+
weak: ['clinical', 'health'],
|
|
49
|
+
},
|
|
50
|
+
manufacturing: {
|
|
51
|
+
strong: ['manufacturing', 'manufacturer', 'automotive', 'factory', 'engineering company'],
|
|
52
|
+
weak: ['industrial', 'production'],
|
|
53
|
+
},
|
|
54
|
+
technology: {
|
|
55
|
+
strong: ['software', 'saas', 'it services', 'telecom', 'telecommunications', 'msp', 'managed service provider', 'managed services provider', 'technology company', 'tech company', 'tech startup', 'software company'],
|
|
56
|
+
weak: ['technology', 'tech'],
|
|
57
|
+
},
|
|
58
|
+
logistics: {
|
|
59
|
+
strong: ['logistics', 'shipping', 'freight', 'haulage', 'postal', 'logistics company', 'transport company'],
|
|
60
|
+
weak: ['transport', 'distribution'],
|
|
61
|
+
},
|
|
62
|
+
energy: {
|
|
63
|
+
strong: ['energy', 'utilities', 'utility', 'oil and gas', 'renewables', 'power company', 'power station'],
|
|
64
|
+
weak: ['power'],
|
|
65
|
+
},
|
|
66
|
+
public_sector: {
|
|
67
|
+
strong: ['public sector', 'government', 'municipality', 'public services', 'civil service', 'defence', 'defense', 'local authority', 'council'],
|
|
68
|
+
},
|
|
69
|
+
professional: {
|
|
70
|
+
strong: ['professional services', 'consulting', 'consultancy', 'law firm', 'accounting firm', 'accountancy', 'accountancy firm', 'accountancy practice', 'accounting practice', 'accountants', 'bookkeeping firm', 'architecture practice', 'recruitment agency'],
|
|
71
|
+
weak: ['agency'],
|
|
72
|
+
},
|
|
73
|
+
education: {
|
|
74
|
+
strong: ['education', 'university', 'edtech', 'training provider', 'college'],
|
|
75
|
+
weak: ['school'],
|
|
76
|
+
},
|
|
77
|
+
real_estate: {
|
|
78
|
+
strong: ['real estate', 'housing association', 'construction', 'proptech', 'property management', 'estate agency'],
|
|
79
|
+
weak: ['property', 'housing'],
|
|
80
|
+
},
|
|
81
|
+
creative: {
|
|
82
|
+
strong: ['creative agency', 'entertainment', 'publishing', 'advertising', 'design studio', 'design agency', 'media company', 'marketing agency'],
|
|
83
|
+
weak: ['creative', 'media', 'gaming'],
|
|
84
|
+
},
|
|
85
|
+
nonprofit: {
|
|
86
|
+
strong: ['nonprofit', 'ngo', 'charity', 'not for profit', 'non-profit'],
|
|
87
|
+
weak: ['foundation'],
|
|
88
|
+
},
|
|
89
|
+
universal: {
|
|
90
|
+
strong: ['cross-industry'],
|
|
91
|
+
weak: ['general', 'any', 'other'],
|
|
92
|
+
},
|
|
27
93
|
};
|
|
28
94
|
const TIER_ALIASES = {
|
|
29
|
-
gen1:
|
|
30
|
-
|
|
31
|
-
|
|
95
|
+
gen1: {
|
|
96
|
+
strong: ['rpa', 'automation', 'scripted', 'rules based', 'workflow automation', 'macros', 'classic ml'],
|
|
97
|
+
},
|
|
98
|
+
gen2: {
|
|
99
|
+
strong: ['genai', 'gen ai', 'generative ai', 'llm', 'copilot', 'chatbot', 'ai assistant', 'gpt', 'chatgpt', 'claude', 'gemini', 'summarisation', 'summarization', 'drafting'],
|
|
100
|
+
weak: ['assistant'],
|
|
101
|
+
},
|
|
102
|
+
gen3: {
|
|
103
|
+
strong: ['agentic', 'ai agent', 'autonomous', 'autonomous agent', 'multi-agent', 'auto-pilot', 'autopilot', 'self-directed'],
|
|
104
|
+
weak: ['agent'],
|
|
105
|
+
},
|
|
32
106
|
};
|
|
33
107
|
const READINESS_ALIASES = {
|
|
34
|
-
agile:
|
|
35
|
-
|
|
36
|
-
|
|
108
|
+
agile: {
|
|
109
|
+
strong: ['agile', 'cross-functional', 'startup', 'product-led', 'fast-moving', 'empowered teams', 'change-ready'],
|
|
110
|
+
weak: ['collaborative'],
|
|
111
|
+
},
|
|
112
|
+
traditional: {
|
|
113
|
+
strong: ['traditional', 'hierarchy', 'hierarchical', 'an established'],
|
|
114
|
+
weak: ['functional', 'corporate', 'committee', 'matrix', 'established'],
|
|
115
|
+
},
|
|
116
|
+
siloed: {
|
|
117
|
+
strong: ['siloed', 'silo', 'bureaucratic', 'territorial', 'legacy culture', 'work separately'],
|
|
118
|
+
weak: ['rigid', 'slow', 'political', 'fragmented'],
|
|
119
|
+
},
|
|
37
120
|
};
|
|
121
|
+
/** Lowercase words; hyphens, slashes and underscores separate, "&" stays ("r&d"). */
|
|
122
|
+
function words(value) {
|
|
123
|
+
return value.toLowerCase().replace(/[_\-/]+/g, ' ').replace(/[^a-z0-9&\s]/g, ' ').split(/\s+/).filter(Boolean);
|
|
124
|
+
}
|
|
125
|
+
/** Every place an alias appears as whole words. A plural "s" on the last word is tolerated. */
|
|
126
|
+
function findHits(tokens, canon, alias) {
|
|
127
|
+
const a = words(alias);
|
|
128
|
+
const hits = [];
|
|
129
|
+
if (!a.length)
|
|
130
|
+
return hits;
|
|
131
|
+
for (let i = 0; i + a.length <= tokens.length; i++) {
|
|
132
|
+
let ok = true;
|
|
133
|
+
for (let j = 0; j < a.length && ok; j++) {
|
|
134
|
+
const t = tokens[i + j];
|
|
135
|
+
const last = j === a.length - 1;
|
|
136
|
+
ok = t === a[j] || (last && a[j].length > 2 && t === `${a[j]}s`);
|
|
137
|
+
}
|
|
138
|
+
if (ok)
|
|
139
|
+
hits.push({ canon, alias, start: i, end: i + a.length });
|
|
140
|
+
}
|
|
141
|
+
return hits;
|
|
142
|
+
}
|
|
38
143
|
function matchOne(input, canon, aliases) {
|
|
39
|
-
const
|
|
40
|
-
const norm =
|
|
41
|
-
const compact =
|
|
144
|
+
const tokens = words(input);
|
|
145
|
+
const norm = tokens.join(' ');
|
|
146
|
+
const compact = tokens.join('');
|
|
42
147
|
for (const c of canon) {
|
|
43
148
|
if (compact === c.toLowerCase().replace(/[_\s]+/g, ''))
|
|
44
149
|
return { input, resolved: c, matched_on: 'exact' };
|
|
45
150
|
}
|
|
46
|
-
for (const [c,
|
|
47
|
-
for (const a of
|
|
48
|
-
if (norm ===
|
|
151
|
+
for (const [c, group] of Object.entries(aliases)) {
|
|
152
|
+
for (const a of [...group.strong, ...(group.weak ?? [])]) {
|
|
153
|
+
if (norm === words(a).join(' '))
|
|
49
154
|
return { input, resolved: c, matched_on: a };
|
|
50
155
|
}
|
|
51
156
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
157
|
+
const short = tokens.length <= SHORT_ANSWER_WORDS;
|
|
158
|
+
const all = [];
|
|
159
|
+
for (const [c, group] of Object.entries(aliases)) {
|
|
160
|
+
for (const a of short ? [...group.strong, ...(group.weak ?? [])] : group.strong) {
|
|
161
|
+
all.push(...findHits(tokens, c, a));
|
|
57
162
|
}
|
|
58
163
|
}
|
|
164
|
+
// A phrase that sits inside a longer matched phrase gives way to it:
|
|
165
|
+
// "retail" inside "retail bank" does not compete with it.
|
|
166
|
+
const kept = all.filter((h) => !all.some((o) => o !== h
|
|
167
|
+
&& o.start <= h.start && o.end >= h.end && (o.end - o.start) > (h.end - h.start)));
|
|
168
|
+
const candidates = [...new Set(kept.map((h) => h.canon))];
|
|
169
|
+
if (candidates.length === 1) {
|
|
170
|
+
const best = kept.reduce((a, b) => ((b.end - b.start) > (a.end - a.start) ? b : a));
|
|
171
|
+
return { input, resolved: best.canon, matched_on: best.alias };
|
|
172
|
+
}
|
|
173
|
+
if (candidates.length > 1) {
|
|
174
|
+
// Order the candidates as the canonical list does, so the result is stable.
|
|
175
|
+
const ordered = canon.filter((c) => candidates.includes(c));
|
|
176
|
+
return { input, resolved: null, candidates: ordered, suggestions: [...canon] };
|
|
177
|
+
}
|
|
59
178
|
return { input, resolved: null, suggestions: [...canon] };
|
|
60
179
|
}
|
|
61
180
|
export function mapToTaxonomy(input) {
|
|
62
181
|
const out = {
|
|
63
|
-
guidance: 'Pass the resolved values to score_initiative, score_portfolio, sequence_portfolio, recommend_improvements, calculate_pace_layer_drag, get_benchmark or infer_readiness. A null resolution means no confident match: ask the user to
|
|
182
|
+
guidance: 'Pass the resolved values to score_initiative, score_portfolio, sequence_portfolio, recommend_improvements, calculate_pace_layer_drag, get_benchmark or infer_readiness. A null resolution means no confident match: ask the user to choose. When candidates are present the wording pointed to more than one value, so ask the user to pick between those candidates.',
|
|
64
183
|
};
|
|
65
184
|
if (input.industry !== undefined)
|
|
66
185
|
out.industry = matchOne(input.industry, INDUSTRIES, INDUSTRY_ALIASES);
|
package/dist/aliases.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aliases.js","sourceRoot":"","sources":["../src/aliases.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"aliases.js","sourceRoot":"","sources":["../src/aliases.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAS3E,gFAAgF;AAChF,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAE7B,MAAM,gBAAgB,GAA+B;IACnD,EAAE,EAAE;QACF,MAAM,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,EAAE,eAAe,EAAE,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,aAAa,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,qBAAqB,E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M,UAAU,aAAa,CAAC,KAK7B;IACC,MAAM,GAAG,GAAsB;QAC7B,QAAQ,EAAE,uWAAuW;KAClX,CAAC;IACF,IAAI,KAAK,CAAC,QAAQ,KAAK,SAAS;QAAE,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,UAAU,EAAE,gBAAgB,CAAC,CAAC;IACxG,IAAI,KAAK,CAAC,QAAQ,KAAK,SAAS;QAAE,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,SAAS,EAAE,gBAAgB,CAAC,CAAC;IACvG,IAAI,KAAK,CAAC,OAAO,KAAK,SAAS;QAAE,GAAG,CAAC,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;IAC/F,IAAI,KAAK,CAAC,SAAS,KAAK,SAAS;QAAE,GAAG,CAAC,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC,SAAS,EAAE,SAAS,EAAE,iBAAiB,CAAC,CAAC;IAC3G,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
+
import { SMALLER_FIRM_BELOW } from './guidedQuestions.js';
|
|
1
2
|
import type { AssessInitiativeInput, AssessInitiativeResult } from './types.js';
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
export { extractRevenueEur } from './extractRevenue.js';
|
|
4
|
+
/**
|
|
5
|
+
* Reads headcount from descriptions of the organisation: "40-person firm",
|
|
6
|
+
* "12 person MSP", "600 staff", "an agency of 25 people". A bare "40 people"
|
|
7
|
+
* is not read, because it may describe the team the AI is for. Two different
|
|
8
|
+
* figures resolve to nothing.
|
|
9
|
+
*/
|
|
10
|
+
export declare function extractEmployees(proposal: string): {
|
|
11
|
+
value: number;
|
|
12
|
+
matched_on: string;
|
|
13
|
+
} | undefined;
|
|
4
14
|
export declare function assessInitiative(input: AssessInitiativeInput): AssessInitiativeResult;
|
|
15
|
+
export { SMALLER_FIRM_BELOW };
|
|
5
16
|
//# sourceMappingURL=assessInitiative.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assessInitiative.d.ts","sourceRoot":"","sources":["../src/assessInitiative.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"assessInitiative.d.ts","sourceRoot":"","sources":["../src/assessInitiative.ts"],"names":[],"mappings":"AAgBA,OAAO,EACwB,kBAAkB,EAEhD,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAEV,qBAAqB,EAAE,sBAAsB,EAE9C,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAgExD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAcpG;AAoED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,sBAAsB,CA0NrF;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|