@happyvertical/smrt-timesheets 0.56.0 → 0.56.2
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/AGENTS.md +34 -0
- package/README.md +34 -1
- package/dist/attendance.js +2 -2
- package/dist/chunks/{attendance-DGVy-iHI.js → attendance-CDfhph1R.js} +3 -3
- package/dist/chunks/{attendance-DGVy-iHI.js.map → attendance-CDfhph1R.js.map} +1 -1
- package/dist/chunks/{attendance-B1jCbqSb.js → attendance-mk6nqJhX.js} +3 -3
- package/dist/chunks/{attendance-B1jCbqSb.js.map → attendance-mk6nqJhX.js.map} +1 -1
- package/dist/chunks/{models-0-YD5F_o.js → models-C1krjn40.js} +2 -2
- package/dist/chunks/{models-0-YD5F_o.js.map → models-C1krjn40.js.map} +1 -1
- package/dist/chunks/{rollup-CDqzCxI2.js → rollup-C8p1PAXX.js} +3 -3
- package/dist/chunks/{rollup-CDqzCxI2.js.map → rollup-C8p1PAXX.js.map} +1 -1
- package/dist/chunks/service-time-entry-Cxh0pt0J.js +286 -0
- package/dist/chunks/service-time-entry-Cxh0pt0J.js.map +1 -0
- package/dist/chunks/time-entry-actions-Bp--TxUD.js +576 -0
- package/dist/chunks/time-entry-actions-Bp--TxUD.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +113 -334
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +373 -17
- package/dist/models/service-snapshots.d.ts.map +1 -1
- package/dist/models/service-time-entry.d.ts +36 -1
- package/dist/models/service-time-entry.d.ts.map +1 -1
- package/dist/recipes.d.ts +124 -0
- package/dist/recipes.d.ts.map +1 -0
- package/dist/rollup.js +1 -1
- package/dist/services/action-principal.d.ts +54 -0
- package/dist/services/action-principal.d.ts.map +1 -0
- package/dist/services/index.d.ts +2 -0
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/time-entry-actions.d.ts +83 -0
- package/dist/services/time-entry-actions.d.ts.map +1 -0
- package/dist/smrt-knowledge.json +230 -34
- package/package.json +8 -7
- package/dist/chunks/service-time-entry-t7P-bkOQ.js +0 -227
- package/dist/chunks/service-time-entry-t7P-bkOQ.js.map +0 -1
package/dist/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"version": "1.0.0",
|
|
3
3
|
"timestamp": 0,
|
|
4
4
|
"packageName": "@happyvertical/smrt-timesheets",
|
|
5
|
-
"packageVersion": "0.56.
|
|
5
|
+
"packageVersion": "0.56.2",
|
|
6
6
|
"objects": {
|
|
7
7
|
"@happyvertical/smrt-timesheets:AttendanceCorrection": {
|
|
8
8
|
"name": "attendancecorrection",
|
|
@@ -341,7 +341,16 @@
|
|
|
341
341
|
"fields": {},
|
|
342
342
|
"methods": {},
|
|
343
343
|
"decoratorConfig": {
|
|
344
|
-
"tableName": "attendance_corrections"
|
|
344
|
+
"tableName": "attendance_corrections",
|
|
345
|
+
"api": {
|
|
346
|
+
"include": []
|
|
347
|
+
},
|
|
348
|
+
"mcp": {
|
|
349
|
+
"include": []
|
|
350
|
+
},
|
|
351
|
+
"cli": {
|
|
352
|
+
"include": []
|
|
353
|
+
}
|
|
345
354
|
},
|
|
346
355
|
"extends": "SmrtCollection",
|
|
347
356
|
"extendsTypeArg": "AttendanceCorrection",
|
|
@@ -1642,7 +1651,25 @@
|
|
|
1642
1651
|
"fields": {},
|
|
1643
1652
|
"methods": {},
|
|
1644
1653
|
"decoratorConfig": {
|
|
1645
|
-
"tableName": "attendance_punches"
|
|
1654
|
+
"tableName": "attendance_punches",
|
|
1655
|
+
"api": {
|
|
1656
|
+
"include": [
|
|
1657
|
+
"list",
|
|
1658
|
+
"get"
|
|
1659
|
+
]
|
|
1660
|
+
},
|
|
1661
|
+
"mcp": {
|
|
1662
|
+
"include": [
|
|
1663
|
+
"list",
|
|
1664
|
+
"get"
|
|
1665
|
+
]
|
|
1666
|
+
},
|
|
1667
|
+
"cli": {
|
|
1668
|
+
"include": [
|
|
1669
|
+
"list",
|
|
1670
|
+
"get"
|
|
1671
|
+
]
|
|
1672
|
+
}
|
|
1646
1673
|
},
|
|
1647
1674
|
"extends": "SmrtCollection",
|
|
1648
1675
|
"extendsTypeArg": "AttendancePunch",
|
|
@@ -1830,7 +1857,25 @@
|
|
|
1830
1857
|
"fields": {},
|
|
1831
1858
|
"methods": {},
|
|
1832
1859
|
"decoratorConfig": {
|
|
1833
|
-
"tableName": "attendance_breaks"
|
|
1860
|
+
"tableName": "attendance_breaks",
|
|
1861
|
+
"api": {
|
|
1862
|
+
"include": [
|
|
1863
|
+
"list",
|
|
1864
|
+
"get"
|
|
1865
|
+
]
|
|
1866
|
+
},
|
|
1867
|
+
"mcp": {
|
|
1868
|
+
"include": [
|
|
1869
|
+
"list",
|
|
1870
|
+
"get"
|
|
1871
|
+
]
|
|
1872
|
+
},
|
|
1873
|
+
"cli": {
|
|
1874
|
+
"include": [
|
|
1875
|
+
"list",
|
|
1876
|
+
"get"
|
|
1877
|
+
]
|
|
1878
|
+
}
|
|
1834
1879
|
},
|
|
1835
1880
|
"extends": "SmrtCollection",
|
|
1836
1881
|
"extendsTypeArg": "AttendanceBreak",
|
|
@@ -1958,7 +2003,25 @@
|
|
|
1958
2003
|
"fields": {},
|
|
1959
2004
|
"methods": {},
|
|
1960
2005
|
"decoratorConfig": {
|
|
1961
|
-
"tableName": "attendance_segments"
|
|
2006
|
+
"tableName": "attendance_segments",
|
|
2007
|
+
"api": {
|
|
2008
|
+
"include": [
|
|
2009
|
+
"list",
|
|
2010
|
+
"get"
|
|
2011
|
+
]
|
|
2012
|
+
},
|
|
2013
|
+
"mcp": {
|
|
2014
|
+
"include": [
|
|
2015
|
+
"list",
|
|
2016
|
+
"get"
|
|
2017
|
+
]
|
|
2018
|
+
},
|
|
2019
|
+
"cli": {
|
|
2020
|
+
"include": [
|
|
2021
|
+
"list",
|
|
2022
|
+
"get"
|
|
2023
|
+
]
|
|
2024
|
+
}
|
|
1962
2025
|
},
|
|
1963
2026
|
"extends": "SmrtCollection",
|
|
1964
2027
|
"extendsTypeArg": "AttendanceSegment",
|
|
@@ -2139,7 +2202,16 @@
|
|
|
2139
2202
|
"fields": {},
|
|
2140
2203
|
"methods": {},
|
|
2141
2204
|
"decoratorConfig": {
|
|
2142
|
-
"tableName": "attendance_replays"
|
|
2205
|
+
"tableName": "attendance_replays",
|
|
2206
|
+
"api": {
|
|
2207
|
+
"include": []
|
|
2208
|
+
},
|
|
2209
|
+
"mcp": {
|
|
2210
|
+
"include": []
|
|
2211
|
+
},
|
|
2212
|
+
"cli": {
|
|
2213
|
+
"include": []
|
|
2214
|
+
}
|
|
2143
2215
|
},
|
|
2144
2216
|
"extends": "SmrtCollection",
|
|
2145
2217
|
"extendsTypeArg": "AttendanceReplay",
|
|
@@ -2671,13 +2743,25 @@
|
|
|
2671
2743
|
"className": "ServiceChargeSnapshotCollection",
|
|
2672
2744
|
"qualifiedName": "@happyvertical/smrt-timesheets:ServiceChargeSnapshotCollection",
|
|
2673
2745
|
"collection": "servicechargesnapshots",
|
|
2674
|
-
"description": "Collection over service_charge_snapshots.",
|
|
2675
2746
|
"filePath": "/home/runner/work/smrt/smrt/packages/timesheets/src/models/service-snapshots.ts",
|
|
2676
2747
|
"packageName": "@happyvertical/smrt-timesheets",
|
|
2677
2748
|
"fields": {},
|
|
2678
2749
|
"methods": {},
|
|
2679
2750
|
"decoratorConfig": {
|
|
2680
|
-
"
|
|
2751
|
+
"mcp": {
|
|
2752
|
+
"include": [
|
|
2753
|
+
"list",
|
|
2754
|
+
"get"
|
|
2755
|
+
]
|
|
2756
|
+
},
|
|
2757
|
+
"cli": false,
|
|
2758
|
+
"tableName": "service_charge_snapshots",
|
|
2759
|
+
"api": {
|
|
2760
|
+
"include": [
|
|
2761
|
+
"list",
|
|
2762
|
+
"get"
|
|
2763
|
+
]
|
|
2764
|
+
}
|
|
2681
2765
|
},
|
|
2682
2766
|
"extends": "SmrtCollection",
|
|
2683
2767
|
"extendsTypeArg": "ServiceChargeSnapshot",
|
|
@@ -2794,13 +2878,25 @@
|
|
|
2794
2878
|
"className": "ServiceCompensationSnapshotCollection",
|
|
2795
2879
|
"qualifiedName": "@happyvertical/smrt-timesheets:ServiceCompensationSnapshotCollection",
|
|
2796
2880
|
"collection": "servicecompensationsnapshots",
|
|
2797
|
-
"description": "Collection over service_compensation_snapshots.",
|
|
2798
2881
|
"filePath": "/home/runner/work/smrt/smrt/packages/timesheets/src/models/service-snapshots.ts",
|
|
2799
2882
|
"packageName": "@happyvertical/smrt-timesheets",
|
|
2800
2883
|
"fields": {},
|
|
2801
2884
|
"methods": {},
|
|
2802
2885
|
"decoratorConfig": {
|
|
2803
|
-
"
|
|
2886
|
+
"mcp": {
|
|
2887
|
+
"include": [
|
|
2888
|
+
"list",
|
|
2889
|
+
"get"
|
|
2890
|
+
]
|
|
2891
|
+
},
|
|
2892
|
+
"cli": false,
|
|
2893
|
+
"tableName": "service_compensation_snapshots",
|
|
2894
|
+
"api": {
|
|
2895
|
+
"include": [
|
|
2896
|
+
"list",
|
|
2897
|
+
"get"
|
|
2898
|
+
]
|
|
2899
|
+
}
|
|
2804
2900
|
},
|
|
2805
2901
|
"extends": "SmrtCollection",
|
|
2806
2902
|
"extendsTypeArg": "ServiceCompensationSnapshot",
|
|
@@ -3164,7 +3260,10 @@
|
|
|
3164
3260
|
"api": {
|
|
3165
3261
|
"include": [
|
|
3166
3262
|
"list",
|
|
3167
|
-
"get"
|
|
3263
|
+
"get",
|
|
3264
|
+
"record",
|
|
3265
|
+
"submit",
|
|
3266
|
+
"approve"
|
|
3168
3267
|
]
|
|
3169
3268
|
},
|
|
3170
3269
|
"cli": {
|
|
@@ -3411,6 +3510,72 @@
|
|
|
3411
3510
|
"packageName": "@happyvertical/smrt-timesheets",
|
|
3412
3511
|
"fields": {},
|
|
3413
3512
|
"methods": {
|
|
3513
|
+
"record": {
|
|
3514
|
+
"name": "record",
|
|
3515
|
+
"async": true,
|
|
3516
|
+
"parameters": [
|
|
3517
|
+
{
|
|
3518
|
+
"name": "options",
|
|
3519
|
+
"type": "RecordServiceTimeActionInput",
|
|
3520
|
+
"optional": false
|
|
3521
|
+
}
|
|
3522
|
+
],
|
|
3523
|
+
"returnType": "Promise<ServiceTimeEntry>",
|
|
3524
|
+
"isStatic": false,
|
|
3525
|
+
"isPublic": true,
|
|
3526
|
+
"decoratorConfig": {
|
|
3527
|
+
"httpMethod": "POST",
|
|
3528
|
+
"path": "record",
|
|
3529
|
+
"effect": "write",
|
|
3530
|
+
"idempotent": false,
|
|
3531
|
+
"openWorld": false,
|
|
3532
|
+
"description": "Record a draft time entry for the signed-in person (service-backed)."
|
|
3533
|
+
}
|
|
3534
|
+
},
|
|
3535
|
+
"submit": {
|
|
3536
|
+
"name": "submit",
|
|
3537
|
+
"async": true,
|
|
3538
|
+
"parameters": [
|
|
3539
|
+
{
|
|
3540
|
+
"name": "options",
|
|
3541
|
+
"type": "ServiceTimeEntryActionTarget",
|
|
3542
|
+
"optional": false
|
|
3543
|
+
}
|
|
3544
|
+
],
|
|
3545
|
+
"returnType": "Promise<ServiceTimeEntry>",
|
|
3546
|
+
"isStatic": false,
|
|
3547
|
+
"isPublic": true,
|
|
3548
|
+
"decoratorConfig": {
|
|
3549
|
+
"httpMethod": "POST",
|
|
3550
|
+
"path": "submit",
|
|
3551
|
+
"effect": "write",
|
|
3552
|
+
"idempotent": false,
|
|
3553
|
+
"openWorld": false,
|
|
3554
|
+
"description": "Submit a time entry for approval (service-backed)."
|
|
3555
|
+
}
|
|
3556
|
+
},
|
|
3557
|
+
"approve": {
|
|
3558
|
+
"name": "approve",
|
|
3559
|
+
"async": true,
|
|
3560
|
+
"parameters": [
|
|
3561
|
+
{
|
|
3562
|
+
"name": "options",
|
|
3563
|
+
"type": "ServiceTimeEntryActionTarget",
|
|
3564
|
+
"optional": false
|
|
3565
|
+
}
|
|
3566
|
+
],
|
|
3567
|
+
"returnType": "Promise<ServiceTimeEntry>",
|
|
3568
|
+
"isStatic": false,
|
|
3569
|
+
"isPublic": true,
|
|
3570
|
+
"decoratorConfig": {
|
|
3571
|
+
"httpMethod": "POST",
|
|
3572
|
+
"path": "approve",
|
|
3573
|
+
"effect": "write",
|
|
3574
|
+
"idempotent": true,
|
|
3575
|
+
"openWorld": false,
|
|
3576
|
+
"description": "Approve a submitted time entry and snapshot its charge and compensation (service-backed)."
|
|
3577
|
+
}
|
|
3578
|
+
},
|
|
3414
3579
|
"forWork": {
|
|
3415
3580
|
"name": "forWork",
|
|
3416
3581
|
"async": true,
|
|
@@ -3440,6 +3605,24 @@
|
|
|
3440
3605
|
}
|
|
3441
3606
|
},
|
|
3442
3607
|
"decoratorConfig": {
|
|
3608
|
+
"api": {
|
|
3609
|
+
"include": [
|
|
3610
|
+
"forWork",
|
|
3611
|
+
"pendingApproval",
|
|
3612
|
+
"record",
|
|
3613
|
+
"submit",
|
|
3614
|
+
"approve"
|
|
3615
|
+
]
|
|
3616
|
+
},
|
|
3617
|
+
"mcp": {
|
|
3618
|
+
"include": [
|
|
3619
|
+
"list",
|
|
3620
|
+
"get",
|
|
3621
|
+
"forWork",
|
|
3622
|
+
"pendingApproval"
|
|
3623
|
+
]
|
|
3624
|
+
},
|
|
3625
|
+
"cli": false,
|
|
3443
3626
|
"tableName": "service_time_entries"
|
|
3444
3627
|
},
|
|
3445
3628
|
"extends": "SmrtCollection",
|
|
@@ -4518,7 +4701,16 @@
|
|
|
4518
4701
|
"fields": {},
|
|
4519
4702
|
"methods": {},
|
|
4520
4703
|
"decoratorConfig": {
|
|
4521
|
-
"tableName": "period_timecards"
|
|
4704
|
+
"tableName": "period_timecards",
|
|
4705
|
+
"api": {
|
|
4706
|
+
"include": []
|
|
4707
|
+
},
|
|
4708
|
+
"mcp": {
|
|
4709
|
+
"include": []
|
|
4710
|
+
},
|
|
4711
|
+
"cli": {
|
|
4712
|
+
"include": []
|
|
4713
|
+
}
|
|
4522
4714
|
},
|
|
4523
4715
|
"extends": "SmrtCollection",
|
|
4524
4716
|
"extendsTypeArg": "PeriodTimecard",
|
|
@@ -4692,7 +4884,16 @@
|
|
|
4692
4884
|
"fields": {},
|
|
4693
4885
|
"methods": {},
|
|
4694
4886
|
"decoratorConfig": {
|
|
4695
|
-
"tableName": "timecard_adjustments"
|
|
4887
|
+
"tableName": "timecard_adjustments",
|
|
4888
|
+
"api": {
|
|
4889
|
+
"include": []
|
|
4890
|
+
},
|
|
4891
|
+
"mcp": {
|
|
4892
|
+
"include": []
|
|
4893
|
+
},
|
|
4894
|
+
"cli": {
|
|
4895
|
+
"include": []
|
|
4896
|
+
}
|
|
4696
4897
|
},
|
|
4697
4898
|
"extends": "SmrtCollection",
|
|
4698
4899
|
"extendsTypeArg": "TimecardAdjustment",
|
|
@@ -4831,7 +5032,16 @@
|
|
|
4831
5032
|
"fields": {},
|
|
4832
5033
|
"methods": {},
|
|
4833
5034
|
"decoratorConfig": {
|
|
4834
|
-
"tableName": "timecard_reopenings"
|
|
5035
|
+
"tableName": "timecard_reopenings",
|
|
5036
|
+
"api": {
|
|
5037
|
+
"include": []
|
|
5038
|
+
},
|
|
5039
|
+
"mcp": {
|
|
5040
|
+
"include": []
|
|
5041
|
+
},
|
|
5042
|
+
"cli": {
|
|
5043
|
+
"include": []
|
|
5044
|
+
}
|
|
4835
5045
|
},
|
|
4836
5046
|
"extends": "SmrtCollection",
|
|
4837
5047
|
"extendsTypeArg": "TimecardReopening",
|
|
@@ -4966,18 +5176,164 @@
|
|
|
4966
5176
|
}
|
|
4967
5177
|
},
|
|
4968
5178
|
"moduleType": "smrt",
|
|
5179
|
+
"recipes": [
|
|
5180
|
+
{
|
|
5181
|
+
"id": "timesheets.time-entries",
|
|
5182
|
+
"className": "TimeEntriesRecipe",
|
|
5183
|
+
"label": "Time entries",
|
|
5184
|
+
"summary": "Record who worked how long on what, for approval.",
|
|
5185
|
+
"synonyms": [
|
|
5186
|
+
"timesheets",
|
|
5187
|
+
"time tracking",
|
|
5188
|
+
"hours",
|
|
5189
|
+
"billable hours",
|
|
5190
|
+
"timecards"
|
|
5191
|
+
],
|
|
5192
|
+
"models": [
|
|
5193
|
+
"@happyvertical/smrt-timesheets:ServiceTimeEntry"
|
|
5194
|
+
],
|
|
5195
|
+
"nav": [
|
|
5196
|
+
{
|
|
5197
|
+
"label": "Time entries",
|
|
5198
|
+
"model": "@happyvertical/smrt-timesheets:ServiceTimeEntry",
|
|
5199
|
+
"icon": "fileText",
|
|
5200
|
+
"description": "Hours worked, by person and by job, from draft to approved."
|
|
5201
|
+
}
|
|
5202
|
+
],
|
|
5203
|
+
"requires": [],
|
|
5204
|
+
"section": {
|
|
5205
|
+
"id": "work",
|
|
5206
|
+
"label": "Work",
|
|
5207
|
+
"icon": "wrench",
|
|
5208
|
+
"description": "Time and costs: the work behind each job."
|
|
5209
|
+
},
|
|
5210
|
+
"options": {
|
|
5211
|
+
"@happyvertical/smrt-timesheets:ServiceTimeEntry": {
|
|
5212
|
+
"fields": {
|
|
5213
|
+
"participantProfileId": {
|
|
5214
|
+
"label": "Person",
|
|
5215
|
+
"order": 1
|
|
5216
|
+
},
|
|
5217
|
+
"description": {
|
|
5218
|
+
"order": 2,
|
|
5219
|
+
"help": "What the time was spent on, in a few words."
|
|
5220
|
+
},
|
|
5221
|
+
"startedAt": {
|
|
5222
|
+
"label": "Started",
|
|
5223
|
+
"order": 3
|
|
5224
|
+
},
|
|
5225
|
+
"endedAt": {
|
|
5226
|
+
"label": "Ended",
|
|
5227
|
+
"order": 4
|
|
5228
|
+
},
|
|
5229
|
+
"durationSeconds": {
|
|
5230
|
+
"label": "Duration (seconds)",
|
|
5231
|
+
"order": 5,
|
|
5232
|
+
"help": "Whole seconds: 3600 is one hour."
|
|
5233
|
+
},
|
|
5234
|
+
"workRefId": {
|
|
5235
|
+
"label": "Work reference",
|
|
5236
|
+
"order": 6,
|
|
5237
|
+
"help": "The job, project or case this time belongs to."
|
|
5238
|
+
},
|
|
5239
|
+
"workRefType": {
|
|
5240
|
+
"visibility": "hidden"
|
|
5241
|
+
},
|
|
5242
|
+
"participantKind": {
|
|
5243
|
+
"default": "human",
|
|
5244
|
+
"visibility": "hidden"
|
|
5245
|
+
},
|
|
5246
|
+
"agentRef": {
|
|
5247
|
+
"visibility": "hidden"
|
|
5248
|
+
},
|
|
5249
|
+
"source": {
|
|
5250
|
+
"default": "manual",
|
|
5251
|
+
"visibility": "hidden"
|
|
5252
|
+
},
|
|
5253
|
+
"evidence": {
|
|
5254
|
+
"visibility": "hidden"
|
|
5255
|
+
},
|
|
5256
|
+
"status": {
|
|
5257
|
+
"visibility": "hidden",
|
|
5258
|
+
"locked": true
|
|
5259
|
+
},
|
|
5260
|
+
"submittedAt": {
|
|
5261
|
+
"visibility": "hidden",
|
|
5262
|
+
"locked": true
|
|
5263
|
+
},
|
|
5264
|
+
"submittedByProfileId": {
|
|
5265
|
+
"visibility": "hidden",
|
|
5266
|
+
"locked": true
|
|
5267
|
+
},
|
|
5268
|
+
"approvedAt": {
|
|
5269
|
+
"visibility": "hidden",
|
|
5270
|
+
"locked": true
|
|
5271
|
+
},
|
|
5272
|
+
"approvedByProfileId": {
|
|
5273
|
+
"visibility": "hidden",
|
|
5274
|
+
"locked": true
|
|
5275
|
+
},
|
|
5276
|
+
"approvalPath": {
|
|
5277
|
+
"visibility": "hidden",
|
|
5278
|
+
"locked": true
|
|
5279
|
+
},
|
|
5280
|
+
"rejectedAt": {
|
|
5281
|
+
"visibility": "hidden",
|
|
5282
|
+
"locked": true
|
|
5283
|
+
},
|
|
5284
|
+
"rejectedByProfileId": {
|
|
5285
|
+
"visibility": "hidden",
|
|
5286
|
+
"locked": true
|
|
5287
|
+
},
|
|
5288
|
+
"rejectionReason": {
|
|
5289
|
+
"visibility": "hidden",
|
|
5290
|
+
"locked": true
|
|
5291
|
+
},
|
|
5292
|
+
"correctionOfId": {
|
|
5293
|
+
"visibility": "hidden",
|
|
5294
|
+
"locked": true
|
|
5295
|
+
},
|
|
5296
|
+
"metadata": {
|
|
5297
|
+
"visibility": "hidden"
|
|
5298
|
+
}
|
|
5299
|
+
}
|
|
5300
|
+
}
|
|
5301
|
+
},
|
|
5302
|
+
"help": {
|
|
5303
|
+
"markdown": "## Overview\n\nTime entries record who worked how long on what. Each entry names the person,\nwhat they did and when, and moves from draft to submitted to approved.\n\n## Tasks\n\n### Record time\n\n1. Create a new time entry.\n2. Pick the **{field:participantProfileId}** who did the work.\n3. Write a short **{field:description}** of what was done.\n4. Enter when it **{field:startedAt}** and **{field:endedAt}**, or type the\n **{field:durationSeconds}** directly (3600 is one hour).\n\n### Send it for approval\n\nApproval is not something you change on this form. It runs through your\napp's approval screen, which records who did each step and when.\n\n1. When an entry is ready to check, the person who did the work submits it.\n2. An approver, someone your app allows to approve time, approves it or sends\n it back with a reason. Approving fixes what the hours are charged and paid\n at, so an approved entry never changes; correct it with a new entry.\n3. If your app has no approval screen yet, entries stay as drafts until one is\n added.\n",
|
|
5304
|
+
"fieldRefs": [
|
|
5305
|
+
"description",
|
|
5306
|
+
"durationSeconds",
|
|
5307
|
+
"endedAt",
|
|
5308
|
+
"participantProfileId",
|
|
5309
|
+
"startedAt"
|
|
5310
|
+
]
|
|
5311
|
+
},
|
|
5312
|
+
"demo": {
|
|
5313
|
+
"mode": "server",
|
|
5314
|
+
"reasons": [
|
|
5315
|
+
"Needs a server because its package does not build for a browser: node:crypto; and its package depends on @happyvertical/smrt-profiles, @happyvertical/smrt-tenancy, @happyvertical/smrt-users, which do not build for a browser (#3617, #3624, #3626)."
|
|
5316
|
+
]
|
|
5317
|
+
}
|
|
5318
|
+
}
|
|
5319
|
+
],
|
|
4969
5320
|
"smrtDependencies": [
|
|
4970
5321
|
"@happyvertical/smrt-core",
|
|
4971
|
-
"@happyvertical/smrt-tenancy"
|
|
5322
|
+
"@happyvertical/smrt-tenancy",
|
|
5323
|
+
"@happyvertical/smrt-users"
|
|
4972
5324
|
],
|
|
4973
5325
|
"browser": {
|
|
4974
5326
|
"status": "server-only",
|
|
4975
5327
|
"issues": [
|
|
4976
|
-
"#
|
|
5328
|
+
"#3617",
|
|
5329
|
+
"#3624",
|
|
5330
|
+
"#3626"
|
|
4977
5331
|
],
|
|
4978
5332
|
"reason": "node:crypto",
|
|
4979
5333
|
"via": [
|
|
4980
|
-
"@happyvertical/smrt-
|
|
5334
|
+
"@happyvertical/smrt-profiles",
|
|
5335
|
+
"@happyvertical/smrt-tenancy",
|
|
5336
|
+
"@happyvertical/smrt-users"
|
|
4981
5337
|
]
|
|
4982
5338
|
},
|
|
4983
5339
|
"stampsConstructors": true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-snapshots.d.ts","sourceRoot":"","sources":["../../src/models/service-snapshots.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,cAAc,EACd,UAAU,EAGX,MAAM,0BAA0B,CAAC;AAGlC;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,CAa7E;AAoDD;;;GAGG;AACH,qBAYa,qBAAsB,SAAQ,UAAU;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IACT,WAAW,EAAE,MAAM,CAAM;IAC7E;;;;;;;;OAQG;IACH,MAAM,EAAE,MAAM,CAAK;IACM,QAAQ,EAAE,MAAM,CAAS;IACzB,cAAc,EAAE,MAAM,CAAM;IAC5B,QAAQ,EAAE,MAAM,CAAM;IACtB,YAAY,EAAE,MAAM,CAAQ;IAC5B,eAAe,EAAE,MAAM,CAAM;IACtD,SAAS,EAAE,IAAI,CAAc;IAEd,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAa3B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAkBrC;AAED;;;GAGG;AACH,qBAYa,2BAA4B,SAAQ,UAAU;IAC3B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IACT,WAAW,EAAE,MAAM,CAAM;IAC7E;;;;;;OAMG;IACH,MAAM,EAAE,MAAM,CAAK;IACM,QAAQ,EAAE,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,OAAO,CAAC,IAAI,CAAC;IAa3B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAkBrC;AAED,kDAAkD;AAIlD,qBACa,+BAAgC,SAAQ,cAAc,CAAC,qBAAqB,CAAC;IACxF,MAAM,CAAC,QAAQ,CAAC,UAAU,+BAAyB;CACpD;AACD,wDAAwD;AAIxD,qBACa,qCAAsC,SAAQ,cAAc,CAAC,2BAA2B,CAAC;IACpG,MAAM,CAAC,QAAQ,CAAC,UAAU,qCAA+B;CAC1D"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SmrtCollection, SmrtObject } from '@happyvertical/smrt-core';
|
|
2
|
+
import type { RecordServiceTimeActionInput, ServiceTimeEntryActionTarget } from '../services/time-entry-actions.js';
|
|
2
3
|
import { type ServiceEvidence, type ServiceParticipantKind, type ServiceTimeEntrySource, type ServiceTimeEntryStatus } from '../types.js';
|
|
3
4
|
/**
|
|
4
5
|
* Fields that may not change once an entry is approved (or corrected). A
|
|
@@ -6,6 +7,13 @@ import { type ServiceEvidence, type ServiceParticipantKind, type ServiceTimeEntr
|
|
|
6
7
|
* {@link ServiceTimeEntry.frozenFieldNames}.
|
|
7
8
|
*/
|
|
8
9
|
export declare const SERVICE_TIME_ENTRY_FROZEN_FIELDS: readonly ["tenantId", "workRefType", "workRefId", "participantKind", "participantProfileId", "agentRef", "source", "description", "startedAt", "endedAt", "durationSeconds", "evidence", "correctionOfId"];
|
|
10
|
+
/**
|
|
11
|
+
* The service-backed write actions (#4001). Each is a `POST
|
|
12
|
+
* /<collection>/<action>` route guarded by the `<collection>.<action>`
|
|
13
|
+
* permission inside the action itself, so every transport that reaches it
|
|
14
|
+
* enforces the same rule.
|
|
15
|
+
*/
|
|
16
|
+
export declare const SERVICE_TIME_ENTRY_ACTIONS: readonly ["record", "submit", "approve"];
|
|
9
17
|
/**
|
|
10
18
|
* A person or agent worked this long on this thing, and someone approved it.
|
|
11
19
|
*
|
|
@@ -63,9 +71,36 @@ export declare class ServiceTimeEntry extends SmrtObject {
|
|
|
63
71
|
save(): Promise<this>;
|
|
64
72
|
private readPrior;
|
|
65
73
|
}
|
|
66
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* Collection over `service_time_entries`.
|
|
76
|
+
*
|
|
77
|
+
* Collection classes are registered too, so this one carries its own surface:
|
|
78
|
+
* undecorated, it published generated `create`/`update`/`delete` MCP tools and
|
|
79
|
+
* CLI commands that wrote status and the approval trail directly. It keeps the
|
|
80
|
+
* reads it published and hosts the service-backed actions on REST only.
|
|
81
|
+
*/
|
|
67
82
|
export declare class ServiceTimeEntryCollection extends SmrtCollection<ServiceTimeEntry> {
|
|
68
83
|
static readonly _itemClass: typeof ServiceTimeEntry;
|
|
84
|
+
/**
|
|
85
|
+
* Record a draft time entry for the signed-in person through
|
|
86
|
+
* `ServiceEvidenceService.record()`. Needs `<collection>.record`; recording
|
|
87
|
+
* for another participant also needs `<collection>.approve`. The tenant and
|
|
88
|
+
* actor come from the session, never from the body.
|
|
89
|
+
*/
|
|
90
|
+
record(options: RecordServiceTimeActionInput): Promise<ServiceTimeEntry>;
|
|
91
|
+
/**
|
|
92
|
+
* Submit a draft or rejected entry for approval through
|
|
93
|
+
* `ServiceEvidenceService.submit()`. Needs `<collection>.submit`; only the
|
|
94
|
+
* entry's participant may submit it unless the caller can also approve.
|
|
95
|
+
*/
|
|
96
|
+
submit(options: ServiceTimeEntryActionTarget): Promise<ServiceTimeEntry>;
|
|
97
|
+
/**
|
|
98
|
+
* Approve a submitted entry through `ServiceEvidenceService.approve()`,
|
|
99
|
+
* writing its charge and compensation snapshots with the host's installed
|
|
100
|
+
* `ServiceCommercialResolver`. Needs an explicit `<collection>.approve`
|
|
101
|
+
* grant (no super-admin bypass). Retrying an incomplete approval is safe.
|
|
102
|
+
*/
|
|
103
|
+
approve(options: ServiceTimeEntryActionTarget): Promise<ServiceTimeEntry>;
|
|
69
104
|
forWork(workRefType: string, workRefId: string): Promise<ServiceTimeEntry[]>;
|
|
70
105
|
pendingApproval(): Promise<ServiceTimeEntry[]>;
|
|
71
106
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-time-entry.d.ts","sourceRoot":"","sources":["../../src/models/service-time-entry.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"service-time-entry.d.ts","sourceRoot":"","sources":["../../src/models/service-time-entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,cAAc,EACd,UAAU,EAEX,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EACV,4BAA4B,EAC5B,4BAA4B,EAC7B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC5B,MAAM,aAAa,CAAC;AAGrB;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,4MAcnC,CAAC;AAuBX;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,0CAI7B,CAAC;AAIX;;;;;;;;;;;;GAYG;AACH,qBAgBa,gBAAiB,SAAQ,UAAU;IAChB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IACpB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAQ;IAClC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAQ;IAChD,eAAe,EAAE,sBAAsB,CAAW;IAE3E,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAQ;IAClB,QAAQ,EAAE,MAAM,CAAM;IACtB,MAAM,EAAE,sBAAsB,CAAY;IAC1C,WAAW,EAAE,MAAM,CAAM;IAClD,SAAS,EAAE,IAAI,GAAG,IAAI,CAAQ;IAC9B,OAAO,EAAE,IAAI,GAAG,IAAI,CAAQ;IAC5B,0EAA0E;IAE1E,eAAe,EAAE,MAAM,GAAG,IAAI,CAAK;IACV,QAAQ,EAAE,MAAM,CAAQ;IACxB,MAAM,EAAE,sBAAsB,CAAW;IAClE,WAAW,EAAE,IAAI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