@happyvertical/smrt-support 0.51.32 → 0.51.34
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/index.d.ts +17 -0
- package/dist/index.js +1 -1
- package/dist/manifest.json +1 -1
- package/dist/migrations/moneyMinorUnits.d.ts +30 -1
- package/dist/models/service-time-entry.d.ts +2 -1
- package/dist/models/support-ai-run.d.ts +11 -1
- package/dist/models/support-case-event.d.ts +11 -1
- package/dist/models/support-case.d.ts +13 -2
- package/dist/models/support-channel-binding.d.ts +11 -1
- package/dist/models/support-compensation-plan.d.ts +11 -0
- package/dist/models/support-interaction.d.ts +12 -1
- package/dist/models/support-plan.d.ts +19 -1
- package/dist/models/support-policy.d.ts +11 -0
- package/dist/models/support-service-target.d.ts +15 -1
- package/dist/models/support-settlement.d.ts +20 -1
- package/dist/models/support-specialist.d.ts +15 -1
- package/dist/models/support-work-link.d.ts +13 -1
- package/dist/permissions.d.ts +12 -1
- package/dist/services/coverage-calendar.d.ts +22 -1
- package/dist/services/human-handoff-service.d.ts +18 -3
- package/dist/services/project-assistance-adapter.d.ts +2 -2
- package/dist/services/service-target-engine.d.ts +33 -6
- package/dist/services/service-time-entry-service.d.ts +15 -3
- package/dist/services/support-ai-workflow.d.ts +22 -5
- package/dist/services/support-case-service.d.ts +15 -7
- package/dist/services/support-intake-service.d.ts +25 -4
- package/dist/services/support-plan-admin-service.d.ts +17 -4
- package/dist/services/support-routing-service.d.ts +19 -4
- package/dist/services/time-entry-approval-service.d.ts +33 -6
- package/dist/smrt-knowledge.json +4 -4
- package/package.json +11 -11
|
@@ -1,10 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* TimeEntryApprovalService — the approval gate for Service Time Entries and
|
|
3
|
+
* the ONLY writer of their commercial snapshots (FR-36/FR-32/FR-35, issue
|
|
4
|
+
* #1930).
|
|
5
|
+
*
|
|
6
|
+
* Approval paths come from the governing Managed Support Plan's
|
|
7
|
+
* `timeApprovalPolicy`: `automatic` (no principal needed under the
|
|
8
|
+
* thresholds), `threshold` (an over-threshold automatic entry needs an
|
|
9
|
+
* operator), `operator` (the `support.approve-time-entry` split), and
|
|
10
|
+
* `client` (the case's Client, with the operator split as override).
|
|
11
|
+
*
|
|
12
|
+
* On approval two deliberately separate rows derive per entry:
|
|
13
|
+
*
|
|
14
|
+
* - **SupportCharge** — client side, from the Managed Support Plan only:
|
|
15
|
+
* included time consumes first (per case; period windows arrive with usage
|
|
16
|
+
* pricing #1925), the remainder meters at the overage (or on-call) rate.
|
|
17
|
+
* Rate math uses the CASE's `planSnapshot` when present so later plan edits
|
|
18
|
+
* never change history.
|
|
19
|
+
* - **SupportCompensation** — provider side, from the effective-dated Support
|
|
20
|
+
* Compensation Plan only.
|
|
21
|
+
*
|
|
22
|
+
* Margin (charge − compensation) stays computable by readers and is NEVER
|
|
23
|
+
* stored; case-visible audit events carry the charge amount only, never the
|
|
24
|
+
* compensation. Approved entries freeze (model-enforced); disputes flow
|
|
25
|
+
* through {@link TimeEntryApprovalService.correct}, which supersedes the
|
|
26
|
+
* original and re-derives fresh snapshots from the correcting entry.
|
|
27
|
+
*/
|
|
28
|
+
import type { SmrtObjectOptions } from '@happyvertical/smrt-core';
|
|
29
|
+
import { type ServiceTimeEntry, ServiceTimeEntryCollection } from '../models/service-time-entry.js';
|
|
30
|
+
import type { SupportCase } from '../models/support-case.js';
|
|
4
31
|
import { SupportCompensationPlanCollection } from '../models/support-compensation-plan.js';
|
|
5
|
-
import { SupportCharge, SupportChargeCollection, SupportCompensation, SupportCompensationCollection } from '../models/support-settlement.js';
|
|
6
|
-
import { SupportPrincipal } from '../permissions.js';
|
|
7
|
-
import { TimeApprovalPolicy, TimeEntryApprovalPath, TimeEntryEvidence } from '../types.js';
|
|
32
|
+
import { type SupportCharge, SupportChargeCollection, type SupportCompensation, SupportCompensationCollection } from '../models/support-settlement.js';
|
|
33
|
+
import { type SupportPrincipal } from '../permissions.js';
|
|
34
|
+
import type { TimeApprovalPolicy, TimeEntryApprovalPath, TimeEntryEvidence } from '../types.js';
|
|
8
35
|
import { SupportCaseService } from './support-case-service.js';
|
|
9
36
|
/** Thrown when an approval-path or tenant gate refuses the acting principal. */
|
|
10
37
|
export declare class TimeEntryApprovalDeniedError extends Error {
|
package/dist/smrt-knowledge.json
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
"sensitiveFieldsExcluded": true,
|
|
4
4
|
"generatedAt": "1970-01-01T00:00:00.000Z",
|
|
5
5
|
"packageName": "@happyvertical/smrt-support",
|
|
6
|
-
"packageVersion": "0.51.
|
|
6
|
+
"packageVersion": "0.51.34",
|
|
7
7
|
"sourceManifestPath": "dist/manifest.json",
|
|
8
8
|
"agentDocPath": "AGENTS.md",
|
|
9
9
|
"sourceHashes": {
|
|
10
|
-
"manifest": "
|
|
11
|
-
"packageJson": "
|
|
10
|
+
"manifest": "c25fb14d77ac385fd42fc4908d363a06fa25c1a5860a1fc0584f6f51196f07ed",
|
|
11
|
+
"packageJson": "9111a9d9c69ea630ac59f1251e8502b4daa391bfe0953e5cd3ca68df58bd25d9",
|
|
12
12
|
"agents": "57d75c4e48c549de0e7e50bfc16d739384cd37f4a0c66f0375d1985b24e6cbdd"
|
|
13
13
|
},
|
|
14
14
|
"exports": [
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@types/node": "24.13.6",
|
|
35
35
|
"svelte": "^5.57.1",
|
|
36
36
|
"svelte-check": "^4.7.6",
|
|
37
|
-
"typescript": "
|
|
37
|
+
"typescript": "6.0.3",
|
|
38
38
|
"vite": "8.1.4",
|
|
39
39
|
"vitest": "4.1.10"
|
|
40
40
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-support",
|
|
3
|
-
"version": "0.51.
|
|
3
|
+
"version": "0.51.34",
|
|
4
4
|
"smrtJsdoc": "strict",
|
|
5
5
|
"description": "AI-first Support Cases: channel-neutral intake, lifecycle, routing, service targets, and service time for the SMRT framework",
|
|
6
6
|
"type": "module",
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@happyvertical/logger": "^0.94.1",
|
|
30
|
-
"@happyvertical/smrt-chat": "0.51.
|
|
31
|
-
"@happyvertical/smrt-core": "0.51.
|
|
32
|
-
"@happyvertical/smrt-jobs": "0.51.
|
|
33
|
-
"@happyvertical/smrt-messages": "0.51.
|
|
34
|
-
"@happyvertical/smrt-projects": "0.51.
|
|
35
|
-
"@happyvertical/smrt-tenancy": "0.51.
|
|
36
|
-
"@happyvertical/smrt-ui": "0.51.
|
|
37
|
-
"@happyvertical/smrt-users": "0.51.
|
|
30
|
+
"@happyvertical/smrt-chat": "0.51.34",
|
|
31
|
+
"@happyvertical/smrt-core": "0.51.34",
|
|
32
|
+
"@happyvertical/smrt-jobs": "0.51.34",
|
|
33
|
+
"@happyvertical/smrt-messages": "0.51.34",
|
|
34
|
+
"@happyvertical/smrt-projects": "0.51.34",
|
|
35
|
+
"@happyvertical/smrt-tenancy": "0.51.34",
|
|
36
|
+
"@happyvertical/smrt-ui": "0.51.34",
|
|
37
|
+
"@happyvertical/smrt-users": "0.51.34",
|
|
38
38
|
"@happyvertical/sql": "^0.94.1"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
@@ -46,13 +46,13 @@
|
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@happyvertical/smrt-vitest": "0.51.
|
|
49
|
+
"@happyvertical/smrt-vitest": "0.51.34",
|
|
50
50
|
"@sveltejs/package": "^2.5.8",
|
|
51
51
|
"@sveltejs/vite-plugin-svelte": "^7.3.0",
|
|
52
52
|
"@types/node": "24.13.6",
|
|
53
53
|
"svelte": "^5.57.1",
|
|
54
54
|
"svelte-check": "^4.7.6",
|
|
55
|
-
"typescript": "
|
|
55
|
+
"typescript": "6.0.3",
|
|
56
56
|
"vite": "8.1.4",
|
|
57
57
|
"vitest": "4.1.10"
|
|
58
58
|
},
|