@quotivity/cpq-inventory-core 0.1.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.
Files changed (45) hide show
  1. package/assets/report/assets/index-CKPi--yh.css +1 -0
  2. package/assets/report/assets/index-CqUjsqpS.js +9 -0
  3. package/assets/report/fonts/LexendDeca-VariableFont_wght.ttf +0 -0
  4. package/assets/report/index.html +14 -0
  5. package/lib/banner.d.ts +7 -0
  6. package/lib/banner.js +13 -0
  7. package/lib/classify/advancedCondition.d.ts +34 -0
  8. package/lib/classify/advancedCondition.js +112 -0
  9. package/lib/classify/formula.d.ts +29 -0
  10. package/lib/classify/formula.js +125 -0
  11. package/lib/classify/index.d.ts +80 -0
  12. package/lib/classify/index.js +662 -0
  13. package/lib/classify/rules.d.ts +31 -0
  14. package/lib/classify/rules.js +868 -0
  15. package/lib/config/outbound.d.ts +31 -0
  16. package/lib/config/outbound.js +35 -0
  17. package/lib/connection.d.ts +42 -0
  18. package/lib/connection.js +52 -0
  19. package/lib/extract/index.d.ts +112 -0
  20. package/lib/extract/index.js +373 -0
  21. package/lib/extract/records.d.ts +421 -0
  22. package/lib/extract/records.js +327 -0
  23. package/lib/index.d.ts +30 -0
  24. package/lib/index.js +51 -0
  25. package/lib/liveness.d.ts +19 -0
  26. package/lib/liveness.js +34 -0
  27. package/lib/mapping.d.ts +14 -0
  28. package/lib/mapping.js +272 -0
  29. package/lib/report/assemble.d.ts +16 -0
  30. package/lib/report/assemble.js +499 -0
  31. package/lib/report/printDoc.d.ts +13 -0
  32. package/lib/report/printDoc.js +82 -0
  33. package/lib/report/shareSummary.d.ts +8 -0
  34. package/lib/report/shareSummary.js +54 -0
  35. package/lib/report/types.d.ts +146 -0
  36. package/lib/report/types.js +2 -0
  37. package/lib/server.d.ts +32 -0
  38. package/lib/server.js +185 -0
  39. package/lib/soql.d.ts +50 -0
  40. package/lib/soql.js +76 -0
  41. package/lib/summary.d.ts +14 -0
  42. package/lib/summary.js +143 -0
  43. package/lib/types.d.ts +22 -0
  44. package/lib/types.js +85 -0
  45. package/package.json +35 -0
package/lib/mapping.js ADDED
@@ -0,0 +1,272 @@
1
+ export const MAPPING_ROWS = [
2
+ {
3
+ id: 'catalog.products',
4
+ bucket: 'catalog',
5
+ from: 'Products, price books',
6
+ to: 'HubSpot product library, Quotivity price books',
7
+ verdict: 'Clear path',
8
+ shape: '1:1',
9
+ },
10
+ {
11
+ id: 'catalog.multicurrency',
12
+ bucket: 'catalog',
13
+ from: 'Multi-currency price books',
14
+ to: 'Price book entries carry a price per enabled portal currency',
15
+ verdict: 'Clear path',
16
+ shape: '1:1',
17
+ },
18
+ {
19
+ id: 'catalog.dcrStatic',
20
+ bucket: 'catalog',
21
+ from: 'Dated conversion rates, a single static rate',
22
+ to: 'A manually set HubSpot exchange rate',
23
+ verdict: 'Clear path',
24
+ shape: '1:1',
25
+ },
26
+ {
27
+ id: 'catalog.dcrTable',
28
+ bucket: 'catalog',
29
+ from: 'Dated conversion rates, a maintained rate table',
30
+ to: 'HubSpot holds one current rate per currency — a rate cannot be authored against a period',
31
+ verdict: 'Degraded',
32
+ },
33
+ {
34
+ id: 'configuration.bundles',
35
+ bucket: 'configuration',
36
+ from: 'Bundles, features, options, quantity bounds',
37
+ to: 'Bundles, bundle options, option products',
38
+ verdict: 'Clear path',
39
+ shape: '1:1',
40
+ },
41
+ {
42
+ id: 'configuration.exclusion',
43
+ bucket: 'configuration',
44
+ from: 'Option constraints — exclusion',
45
+ to: 'Compatibility Rules',
46
+ verdict: 'Clear path',
47
+ shape: '1:1',
48
+ },
49
+ {
50
+ id: 'configuration.dependency',
51
+ bucket: 'configuration',
52
+ from: 'Option constraints — dependency ("requires")',
53
+ to: 'Already satisfied when the required option is included with a default; otherwise Add add-on or Block',
54
+ verdict: 'Degraded',
55
+ },
56
+ {
57
+ id: 'configuration.minMax',
58
+ bucket: 'configuration',
59
+ from: 'Feature min/max option counts',
60
+ to: '"Pick one" and "Pick one or more" are native; a numeric cap needs a roll-up + Block',
61
+ verdict: 'Degraded',
62
+ },
63
+ {
64
+ id: 'configuration.nested',
65
+ bucket: 'configuration',
66
+ from: 'Nested bundles',
67
+ to: '—',
68
+ verdict: 'No target',
69
+ },
70
+ {
71
+ id: 'configuration.filter',
72
+ bucket: 'configuration',
73
+ from: 'Dynamic option sets (filter rules)',
74
+ to: '—',
75
+ verdict: 'No target',
76
+ },
77
+ {
78
+ id: 'configuration.lookup',
79
+ bucket: 'configuration',
80
+ from: 'Lookup queries on a product rule',
81
+ to: 'Depends on the custom object behind them, which the tool cannot read',
82
+ verdict: 'Further review',
83
+ },
84
+ {
85
+ id: 'discovery.attributes',
86
+ bucket: 'discovery',
87
+ from: 'Configuration attributes',
88
+ to: 'Header property + Update Bundle Members, or Guided Selling',
89
+ verdict: 'Clear path',
90
+ shape: '1:1',
91
+ },
92
+ {
93
+ id: 'discovery.guided',
94
+ bucket: 'discovery',
95
+ from: 'Guided selling processes',
96
+ to: 'Guided Selling flows + questions',
97
+ verdict: 'Clear path',
98
+ shape: '1:1',
99
+ },
100
+ {
101
+ id: 'price.tiers',
102
+ bucket: 'price',
103
+ from: 'Volume and tier pricing, attribute pricing',
104
+ to: 'Price book adjustments, pricing tables, variants',
105
+ verdict: 'Clear path',
106
+ shape: '1:1',
107
+ },
108
+ {
109
+ id: 'price.calculated',
110
+ bucket: 'price',
111
+ from: 'Cost-plus, percent-of-total, block pricing',
112
+ to: 'Calculated pricing (+ roll-ups)',
113
+ verdict: 'Clear path',
114
+ shape: 'Fan-out',
115
+ },
116
+ {
117
+ id: 'price.mdq',
118
+ bucket: 'price',
119
+ from: 'MDQ / segmented subscription pricing',
120
+ to: 'Ramp pricing; Update Bundle Members rules when bundled. Stepped quantity does not carry',
121
+ verdict: 'Degraded',
122
+ },
123
+ {
124
+ id: 'price.term',
125
+ bucket: 'price',
126
+ from: 'Subscription term and proration maths',
127
+ to: '—',
128
+ verdict: 'No target',
129
+ },
130
+ {
131
+ id: 'price.lookup',
132
+ bucket: 'price',
133
+ from: 'Lookup queries on a price rule',
134
+ to: 'Depends on the custom object behind them, which the tool cannot read',
135
+ verdict: 'Further review',
136
+ },
137
+ {
138
+ id: 'discounting.tiers',
139
+ bucket: 'discounting',
140
+ from: 'Discount schedules, per-line tiers',
141
+ to: 'Volume pricing tiers',
142
+ verdict: 'Clear path',
143
+ shape: '1:1',
144
+ },
145
+ {
146
+ id: 'discounting.quote',
147
+ bucket: 'discounting',
148
+ from: 'Schedules aggregating across the quote',
149
+ to: 'Quote-wide roll-up + calculated pricing formula',
150
+ verdict: 'Clear path',
151
+ shape: 'Fan-out',
152
+ },
153
+ {
154
+ id: 'discounting.group',
155
+ bucket: 'discounting',
156
+ from: 'Schedules aggregating across a quote line group',
157
+ to: 'Roll-up quote-wide or per bundle — grouping itself carries no functional aggregate',
158
+ verdict: 'Degraded',
159
+ },
160
+ {
161
+ id: 'discounting.contracted',
162
+ bucket: 'discounting',
163
+ from: 'Contracted pricing',
164
+ to: 'Price books assigned to companies',
165
+ verdict: 'Clear path',
166
+ shape: 'Fan-out',
167
+ },
168
+ {
169
+ id: 'guardrails.validation',
170
+ bucket: 'guardrails',
171
+ from: 'Validation rules',
172
+ to: 'Block',
173
+ verdict: 'Clear path',
174
+ shape: '1:1',
175
+ },
176
+ {
177
+ id: 'guardrails.alert',
178
+ bucket: 'guardrails',
179
+ from: 'Alert rules',
180
+ to: 'Notify',
181
+ verdict: 'Clear path',
182
+ shape: '1:1',
183
+ },
184
+ {
185
+ id: 'guardrails.flags',
186
+ bucket: 'guardrails',
187
+ from: 'Non-discountable, price-not-editable',
188
+ to: 'Price book editability, property-set rules',
189
+ verdict: 'Clear path',
190
+ shape: '1:1',
191
+ },
192
+ {
193
+ id: 'guardrails.custom',
194
+ bucket: 'guardrails',
195
+ from: 'Custom boolean condition logic on a rule',
196
+ to: 'Condition groups, the expression flattened',
197
+ verdict: 'Clear path',
198
+ shape: 'Fan-out',
199
+ },
200
+ {
201
+ id: 'approvals.rules',
202
+ bucket: 'approvals',
203
+ from: 'Approval rules and conditions',
204
+ to: 'Require Approval + approval queue',
205
+ verdict: 'Clear path',
206
+ shape: '1:1',
207
+ },
208
+ {
209
+ id: 'approvals.chains',
210
+ bucket: 'approvals',
211
+ from: 'Approval chains, ordering',
212
+ to: 'Stacked Request Quote Approval (v2) actions in a HubSpot workflow',
213
+ verdict: 'Clear path',
214
+ shape: 'Rebuild',
215
+ },
216
+ {
217
+ id: 'approvals.derived',
218
+ bucket: 'approvals',
219
+ from: 'Derived approvers, escalation',
220
+ to: 'Workflow routing',
221
+ verdict: 'Degraded',
222
+ },
223
+ {
224
+ id: 'output.groups',
225
+ bucket: 'output',
226
+ from: 'Quote line groups',
227
+ to: 'Template grouping of line items by a line item property',
228
+ verdict: 'Clear path',
229
+ shape: '1:1',
230
+ },
231
+ {
232
+ id: 'output.templates',
233
+ bucket: 'output',
234
+ from: 'Quote templates, sections, columns, terms',
235
+ to: 'Quotivity Templates, Terms Library',
236
+ verdict: 'Clear path',
237
+ shape: 'Rebuild',
238
+ },
239
+ {
240
+ id: 'lifecycle.renewals',
241
+ bucket: 'lifecycle',
242
+ from: 'Amendments, prorations, renewals',
243
+ to: 'HubSpot Contracts, change and renewal quotes',
244
+ verdict: 'Clear path',
245
+ shape: '1:1',
246
+ },
247
+ {
248
+ id: 'lifecycle.orders',
249
+ bucket: 'lifecycle',
250
+ from: 'Orders, assets',
251
+ to: '—',
252
+ verdict: 'No target',
253
+ },
254
+ {
255
+ id: 'code.custom',
256
+ bucket: 'code',
257
+ from: 'QCP, triggers and UI customisations on CPQ objects',
258
+ to: 'Calculated pricing, most likely — listed, not interpreted',
259
+ verdict: 'Further review',
260
+ },
261
+ ];
262
+ export const VERDICT_MEANINGS = {
263
+ 'Clear path': 'The behaviour survives and the route to it is known',
264
+ Degraded: 'The behaviour survives in part. The report names what is lost',
265
+ 'No target': 'The behaviour does not survive. Needs a redesign or a product change',
266
+ };
267
+ export const SHAPE_MEANINGS = {
268
+ '1:1': 'One record becomes one record',
269
+ 'Fan-out': 'One construct becomes several records, or several collapse into one',
270
+ Rebuild: 'Authored fresh in the target rather than imported',
271
+ };
272
+ //# sourceMappingURL=mapping.js.map
@@ -0,0 +1,16 @@
1
+ import type { Classification } from '../classify/index.js';
2
+ import type { Extraction } from '../extract/index.js';
3
+ import type { ReportData } from './types.js';
4
+ export interface AssembleOptions {
5
+ version: string;
6
+ runId: string;
7
+ org: {
8
+ name: string;
9
+ username: string;
10
+ instanceUrl: string;
11
+ orgId: string;
12
+ };
13
+ now?: Date;
14
+ }
15
+ export declare function assembleReport(ex: Extraction, cl: Classification, opts: AssembleOptions): ReportData;
16
+ //# sourceMappingURL=assemble.d.ts.map