@happyvertical/smrt-approvals 0.57.36 → 0.57.38
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 +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +226 -36
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +327 -30
- package/dist/models/ApprovalEvent.d.ts +2 -2
- package/dist/models/ApprovalEvent.d.ts.map +1 -1
- package/dist/models/ApprovalPolicy.d.ts +2 -2
- package/dist/models/ApprovalPolicy.d.ts.map +1 -1
- package/dist/models/ApprovalRequest.d.ts +2 -2
- package/dist/models/ApprovalRequest.d.ts.map +1 -1
- package/dist/recipes.d.ts +193 -0
- package/dist/recipes.d.ts.map +1 -0
- package/dist/smrt-knowledge.json +293 -32
- package/package.json +8 -6
package/dist/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"version": "1.0.0",
|
|
3
3
|
"timestamp": 0,
|
|
4
4
|
"packageName": "@happyvertical/smrt-approvals",
|
|
5
|
-
"packageVersion": "0.57.
|
|
5
|
+
"packageVersion": "0.57.38",
|
|
6
6
|
"objects": {
|
|
7
7
|
"@happyvertical/smrt-approvals:ApprovalEventCollection": {
|
|
8
8
|
"name": "approvaleventcollection",
|
|
@@ -528,7 +528,9 @@
|
|
|
528
528
|
"type": "foreignKey",
|
|
529
529
|
"required": true,
|
|
530
530
|
"related": "ApprovalRequest",
|
|
531
|
+
"description": "The request this entry belongs to.",
|
|
531
532
|
"_meta": {
|
|
533
|
+
"description": "The request this entry belongs to.",
|
|
532
534
|
"required": true,
|
|
533
535
|
"constraint": {
|
|
534
536
|
"engines": [
|
|
@@ -543,26 +545,32 @@
|
|
|
543
545
|
"type": {
|
|
544
546
|
"type": "text",
|
|
545
547
|
"required": true,
|
|
548
|
+
"description": "What happened: created, approved, rejected, changes requested, cancelled, expired or used.",
|
|
546
549
|
"_meta": {
|
|
547
550
|
"required": true,
|
|
548
|
-
"readonly": true
|
|
551
|
+
"readonly": true,
|
|
552
|
+
"description": "What happened: created, approved, rejected, changes requested, cancelled, expired or used."
|
|
549
553
|
},
|
|
550
554
|
"readonly": true
|
|
551
555
|
},
|
|
552
556
|
"actorId": {
|
|
553
557
|
"type": "text",
|
|
554
558
|
"required": true,
|
|
559
|
+
"description": "Who did it.",
|
|
555
560
|
"_meta": {
|
|
556
561
|
"required": true,
|
|
557
|
-
"readonly": true
|
|
562
|
+
"readonly": true,
|
|
563
|
+
"description": "Who did it."
|
|
558
564
|
},
|
|
559
565
|
"readonly": true
|
|
560
566
|
},
|
|
561
567
|
"actorType": {
|
|
562
568
|
"type": "text",
|
|
563
569
|
"required": false,
|
|
570
|
+
"description": "Whether a person, an assistant or an automated process did it.",
|
|
564
571
|
"_meta": {
|
|
565
|
-
"readonly": true
|
|
572
|
+
"readonly": true,
|
|
573
|
+
"description": "Whether a person, an assistant or an automated process did it."
|
|
566
574
|
},
|
|
567
575
|
"enum": [
|
|
568
576
|
"human",
|
|
@@ -574,8 +582,10 @@
|
|
|
574
582
|
"reason": {
|
|
575
583
|
"type": "text",
|
|
576
584
|
"required": false,
|
|
585
|
+
"description": "The reason given, for example why a request was rejected or cancelled.",
|
|
577
586
|
"_meta": {
|
|
578
|
-
"readonly": true
|
|
587
|
+
"readonly": true,
|
|
588
|
+
"description": "The reason given, for example why a request was rejected or cancelled."
|
|
579
589
|
},
|
|
580
590
|
"readonly": true
|
|
581
591
|
},
|
|
@@ -607,8 +617,10 @@
|
|
|
607
617
|
"occurredAt": {
|
|
608
618
|
"type": "datetime",
|
|
609
619
|
"required": false,
|
|
620
|
+
"description": "When it happened.",
|
|
610
621
|
"_meta": {
|
|
611
|
-
"readonly": true
|
|
622
|
+
"readonly": true,
|
|
623
|
+
"description": "When it happened."
|
|
612
624
|
},
|
|
613
625
|
"readonly": true
|
|
614
626
|
},
|
|
@@ -616,9 +628,11 @@
|
|
|
616
628
|
"type": "boolean",
|
|
617
629
|
"required": false,
|
|
618
630
|
"default": false,
|
|
631
|
+
"description": "Whether the person who asked also decided, where that is allowed.",
|
|
619
632
|
"_meta": {
|
|
620
633
|
"readonly": true,
|
|
621
|
-
"default": false
|
|
634
|
+
"default": false,
|
|
635
|
+
"description": "Whether the person who asked also decided, where that is allowed."
|
|
622
636
|
},
|
|
623
637
|
"readonly": true
|
|
624
638
|
},
|
|
@@ -637,7 +651,13 @@
|
|
|
637
651
|
"save": {
|
|
638
652
|
"name": "save",
|
|
639
653
|
"async": true,
|
|
640
|
-
"parameters": [
|
|
654
|
+
"parameters": [
|
|
655
|
+
{
|
|
656
|
+
"name": "options",
|
|
657
|
+
"type": "SmrtSaveOptions",
|
|
658
|
+
"optional": true
|
|
659
|
+
}
|
|
660
|
+
],
|
|
641
661
|
"returnType": "Promise<this>",
|
|
642
662
|
"isStatic": false,
|
|
643
663
|
"isPublic": true
|
|
@@ -898,36 +918,56 @@
|
|
|
898
918
|
"kind": {
|
|
899
919
|
"type": "text",
|
|
900
920
|
"required": true,
|
|
921
|
+
"description": "The sort of approval these rules apply to.",
|
|
901
922
|
"_meta": {
|
|
902
|
-
"required": true
|
|
923
|
+
"required": true,
|
|
924
|
+
"description": "The sort of approval these rules apply to."
|
|
903
925
|
}
|
|
904
926
|
},
|
|
905
927
|
"requiredApprovals": {
|
|
906
928
|
"type": "integer",
|
|
907
929
|
"required": false,
|
|
908
|
-
"
|
|
930
|
+
"description": "How many different people must agree. Zero keeps the usual number.",
|
|
931
|
+
"_meta": {
|
|
932
|
+
"description": "How many different people must agree. Zero keeps the usual number."
|
|
933
|
+
}
|
|
909
934
|
},
|
|
910
935
|
"ttlMs": {
|
|
911
936
|
"type": "integer",
|
|
912
937
|
"required": false,
|
|
913
|
-
"
|
|
938
|
+
"description": "How long a request stays open, in milliseconds. Zero keeps the usual time.",
|
|
939
|
+
"_meta": {
|
|
940
|
+
"description": "How long a request stays open, in milliseconds. Zero keeps the usual time."
|
|
941
|
+
}
|
|
914
942
|
},
|
|
915
943
|
"requiredPermission": {
|
|
916
944
|
"type": "text",
|
|
917
945
|
"required": false,
|
|
918
|
-
"
|
|
946
|
+
"description": "An extra permission a decider must hold. Leave empty for none.",
|
|
947
|
+
"_meta": {
|
|
948
|
+
"description": "An extra permission a decider must hold. Leave empty for none."
|
|
949
|
+
}
|
|
919
950
|
},
|
|
920
951
|
"updatedBy": {
|
|
921
952
|
"type": "text",
|
|
922
953
|
"required": false,
|
|
923
|
-
"
|
|
954
|
+
"description": "Who last changed these rules.",
|
|
955
|
+
"_meta": {
|
|
956
|
+
"description": "Who last changed these rules."
|
|
957
|
+
}
|
|
924
958
|
}
|
|
925
959
|
},
|
|
926
960
|
"methods": {
|
|
927
961
|
"save": {
|
|
928
962
|
"name": "save",
|
|
929
963
|
"async": true,
|
|
930
|
-
"parameters": [
|
|
964
|
+
"parameters": [
|
|
965
|
+
{
|
|
966
|
+
"name": "options",
|
|
967
|
+
"type": "SmrtSaveOptions",
|
|
968
|
+
"optional": true
|
|
969
|
+
}
|
|
970
|
+
],
|
|
931
971
|
"returnType": "Promise<this>",
|
|
932
972
|
"isStatic": false,
|
|
933
973
|
"isPublic": true
|
|
@@ -1097,62 +1137,76 @@
|
|
|
1097
1137
|
"kind": {
|
|
1098
1138
|
"type": "text",
|
|
1099
1139
|
"required": true,
|
|
1140
|
+
"description": "What sort of approval this is, such as publishing a post.",
|
|
1100
1141
|
"_meta": {
|
|
1101
1142
|
"required": true,
|
|
1102
|
-
"readonly": true
|
|
1143
|
+
"readonly": true,
|
|
1144
|
+
"description": "What sort of approval this is, such as publishing a post."
|
|
1103
1145
|
},
|
|
1104
1146
|
"readonly": true
|
|
1105
1147
|
},
|
|
1106
1148
|
"subjectType": {
|
|
1107
1149
|
"type": "text",
|
|
1108
1150
|
"required": true,
|
|
1151
|
+
"description": "What kind of thing the request is about.",
|
|
1109
1152
|
"_meta": {
|
|
1110
1153
|
"required": true,
|
|
1111
|
-
"readonly": true
|
|
1154
|
+
"readonly": true,
|
|
1155
|
+
"description": "What kind of thing the request is about."
|
|
1112
1156
|
},
|
|
1113
1157
|
"readonly": true
|
|
1114
1158
|
},
|
|
1115
1159
|
"subjectId": {
|
|
1116
1160
|
"type": "text",
|
|
1117
1161
|
"required": true,
|
|
1162
|
+
"description": "Which thing the request is about.",
|
|
1118
1163
|
"_meta": {
|
|
1119
1164
|
"required": true,
|
|
1120
|
-
"readonly": true
|
|
1165
|
+
"readonly": true,
|
|
1166
|
+
"description": "Which thing the request is about."
|
|
1121
1167
|
},
|
|
1122
1168
|
"readonly": true
|
|
1123
1169
|
},
|
|
1124
1170
|
"subjectRevisionHash": {
|
|
1125
1171
|
"type": "text",
|
|
1126
1172
|
"required": true,
|
|
1173
|
+
"description": "A fingerprint of the exact version that was put up for approval. If the thing changes, the approval no longer applies.",
|
|
1127
1174
|
"_meta": {
|
|
1128
1175
|
"required": true,
|
|
1129
|
-
"readonly": true
|
|
1176
|
+
"readonly": true,
|
|
1177
|
+
"description": "A fingerprint of the exact version that was put up for approval. If the thing changes, the approval no longer applies."
|
|
1130
1178
|
},
|
|
1131
1179
|
"readonly": true
|
|
1132
1180
|
},
|
|
1133
1181
|
"requestKey": {
|
|
1134
1182
|
"type": "text",
|
|
1135
1183
|
"required": true,
|
|
1184
|
+
"description": "The reference the request is filed under, so asking twice does not open it twice.",
|
|
1136
1185
|
"_meta": {
|
|
1137
1186
|
"required": true,
|
|
1138
|
-
"readonly": true
|
|
1187
|
+
"readonly": true,
|
|
1188
|
+
"description": "The reference the request is filed under, so asking twice does not open it twice."
|
|
1139
1189
|
},
|
|
1140
1190
|
"readonly": true
|
|
1141
1191
|
},
|
|
1142
1192
|
"requestedBy": {
|
|
1143
1193
|
"type": "text",
|
|
1144
1194
|
"required": true,
|
|
1195
|
+
"description": "Who asked for the approval.",
|
|
1145
1196
|
"_meta": {
|
|
1146
1197
|
"required": true,
|
|
1147
|
-
"readonly": true
|
|
1198
|
+
"readonly": true,
|
|
1199
|
+
"description": "Who asked for the approval."
|
|
1148
1200
|
},
|
|
1149
1201
|
"readonly": true
|
|
1150
1202
|
},
|
|
1151
1203
|
"requestedByType": {
|
|
1152
1204
|
"type": "text",
|
|
1153
1205
|
"required": false,
|
|
1206
|
+
"description": "Whether a person, an assistant or an automated process asked.",
|
|
1154
1207
|
"_meta": {
|
|
1155
|
-
"readonly": true
|
|
1208
|
+
"readonly": true,
|
|
1209
|
+
"description": "Whether a person, an assistant or an automated process asked."
|
|
1156
1210
|
},
|
|
1157
1211
|
"enum": [
|
|
1158
1212
|
"human",
|
|
@@ -1164,32 +1218,40 @@
|
|
|
1164
1218
|
"summary": {
|
|
1165
1219
|
"type": "text",
|
|
1166
1220
|
"required": false,
|
|
1221
|
+
"description": "A short description of what needs approval.",
|
|
1167
1222
|
"_meta": {
|
|
1168
|
-
"readonly": true
|
|
1223
|
+
"readonly": true,
|
|
1224
|
+
"description": "A short description of what needs approval."
|
|
1169
1225
|
},
|
|
1170
1226
|
"readonly": true
|
|
1171
1227
|
},
|
|
1172
1228
|
"status": {
|
|
1173
1229
|
"type": "text",
|
|
1174
1230
|
"required": false,
|
|
1231
|
+
"description": "Where the request stands: waiting, approved, rejected, changes requested, cancelled or expired.",
|
|
1175
1232
|
"_meta": {
|
|
1176
|
-
"readonly": true
|
|
1233
|
+
"readonly": true,
|
|
1234
|
+
"description": "Where the request stands: waiting, approved, rejected, changes requested, cancelled or expired."
|
|
1177
1235
|
},
|
|
1178
1236
|
"readonly": true
|
|
1179
1237
|
},
|
|
1180
1238
|
"requiredApprovals": {
|
|
1181
1239
|
"type": "integer",
|
|
1182
1240
|
"required": false,
|
|
1241
|
+
"description": "How many different people must agree.",
|
|
1183
1242
|
"_meta": {
|
|
1184
|
-
"readonly": true
|
|
1243
|
+
"readonly": true,
|
|
1244
|
+
"description": "How many different people must agree."
|
|
1185
1245
|
},
|
|
1186
1246
|
"readonly": true
|
|
1187
1247
|
},
|
|
1188
1248
|
"approvalCount": {
|
|
1189
1249
|
"type": "integer",
|
|
1190
1250
|
"required": false,
|
|
1251
|
+
"description": "How many people have agreed so far.",
|
|
1191
1252
|
"_meta": {
|
|
1192
|
-
"readonly": true
|
|
1253
|
+
"readonly": true,
|
|
1254
|
+
"description": "How many people have agreed so far."
|
|
1193
1255
|
},
|
|
1194
1256
|
"readonly": true
|
|
1195
1257
|
},
|
|
@@ -1212,32 +1274,40 @@
|
|
|
1212
1274
|
"expiresAt": {
|
|
1213
1275
|
"type": "datetime",
|
|
1214
1276
|
"required": false,
|
|
1277
|
+
"description": "The deadline. After it the request can no longer be decided.",
|
|
1215
1278
|
"_meta": {
|
|
1216
|
-
"readonly": true
|
|
1279
|
+
"readonly": true,
|
|
1280
|
+
"description": "The deadline. After it the request can no longer be decided."
|
|
1217
1281
|
},
|
|
1218
1282
|
"readonly": true
|
|
1219
1283
|
},
|
|
1220
1284
|
"decidedAt": {
|
|
1221
1285
|
"type": "datetime",
|
|
1222
1286
|
"required": false,
|
|
1287
|
+
"description": "When the request was decided.",
|
|
1223
1288
|
"_meta": {
|
|
1224
|
-
"readonly": true
|
|
1289
|
+
"readonly": true,
|
|
1290
|
+
"description": "When the request was decided."
|
|
1225
1291
|
},
|
|
1226
1292
|
"readonly": true
|
|
1227
1293
|
},
|
|
1228
1294
|
"consumedAt": {
|
|
1229
1295
|
"type": "datetime",
|
|
1230
1296
|
"required": false,
|
|
1297
|
+
"description": "When the approval was used to let the action go ahead.",
|
|
1231
1298
|
"_meta": {
|
|
1232
|
-
"readonly": true
|
|
1299
|
+
"readonly": true,
|
|
1300
|
+
"description": "When the approval was used to let the action go ahead."
|
|
1233
1301
|
},
|
|
1234
1302
|
"readonly": true
|
|
1235
1303
|
},
|
|
1236
1304
|
"consumedBy": {
|
|
1237
1305
|
"type": "text",
|
|
1238
1306
|
"required": false,
|
|
1307
|
+
"description": "Who used the approval.",
|
|
1239
1308
|
"_meta": {
|
|
1240
|
-
"readonly": true
|
|
1309
|
+
"readonly": true,
|
|
1310
|
+
"description": "Who used the approval."
|
|
1241
1311
|
},
|
|
1242
1312
|
"readonly": true
|
|
1243
1313
|
}
|
|
@@ -1285,7 +1355,13 @@
|
|
|
1285
1355
|
"save": {
|
|
1286
1356
|
"name": "save",
|
|
1287
1357
|
"async": true,
|
|
1288
|
-
"parameters": [
|
|
1358
|
+
"parameters": [
|
|
1359
|
+
{
|
|
1360
|
+
"name": "options",
|
|
1361
|
+
"type": "SmrtSaveOptions",
|
|
1362
|
+
"optional": true
|
|
1363
|
+
}
|
|
1364
|
+
],
|
|
1289
1365
|
"returnType": "Promise<this>",
|
|
1290
1366
|
"isStatic": false,
|
|
1291
1367
|
"isPublic": true
|
|
@@ -1553,6 +1629,227 @@
|
|
|
1553
1629
|
}
|
|
1554
1630
|
},
|
|
1555
1631
|
"moduleType": "smrt",
|
|
1632
|
+
"recipes": [
|
|
1633
|
+
{
|
|
1634
|
+
"id": "approvals.requests",
|
|
1635
|
+
"className": "ApprovalsRecipe",
|
|
1636
|
+
"label": "Approvals",
|
|
1637
|
+
"summary": "See what is waiting for a yes, who decided what, and the rules each kind of approval follows.",
|
|
1638
|
+
"synonyms": [
|
|
1639
|
+
"approvals",
|
|
1640
|
+
"approval requests",
|
|
1641
|
+
"sign-off",
|
|
1642
|
+
"sign off",
|
|
1643
|
+
"authorisation",
|
|
1644
|
+
"authorization",
|
|
1645
|
+
"review queue",
|
|
1646
|
+
"waiting for approval"
|
|
1647
|
+
],
|
|
1648
|
+
"models": [
|
|
1649
|
+
"@happyvertical/smrt-approvals:ApprovalRequest",
|
|
1650
|
+
"@happyvertical/smrt-approvals:ApprovalEvent",
|
|
1651
|
+
"@happyvertical/smrt-approvals:ApprovalPolicy"
|
|
1652
|
+
],
|
|
1653
|
+
"nav": [
|
|
1654
|
+
{
|
|
1655
|
+
"label": "Requests",
|
|
1656
|
+
"model": "@happyvertical/smrt-approvals:ApprovalRequest",
|
|
1657
|
+
"icon": "fileText",
|
|
1658
|
+
"description": "Everything waiting for a yes or already decided, and where each one stands.",
|
|
1659
|
+
"noun": "request"
|
|
1660
|
+
},
|
|
1661
|
+
{
|
|
1662
|
+
"label": "History",
|
|
1663
|
+
"model": "@happyvertical/smrt-approvals:ApprovalEvent",
|
|
1664
|
+
"icon": "book",
|
|
1665
|
+
"description": "Who did what on each request, and when.",
|
|
1666
|
+
"noun": "history entry"
|
|
1667
|
+
},
|
|
1668
|
+
{
|
|
1669
|
+
"label": "Policies",
|
|
1670
|
+
"model": "@happyvertical/smrt-approvals:ApprovalPolicy",
|
|
1671
|
+
"icon": "settings",
|
|
1672
|
+
"description": "The rules for each kind of approval: how many people must agree and how long a request lasts.",
|
|
1673
|
+
"noun": "policy"
|
|
1674
|
+
}
|
|
1675
|
+
],
|
|
1676
|
+
"requires": [],
|
|
1677
|
+
"section": {
|
|
1678
|
+
"id": "approvals",
|
|
1679
|
+
"label": "Approvals",
|
|
1680
|
+
"icon": "briefcase",
|
|
1681
|
+
"description": "Who has to say yes before something happens."
|
|
1682
|
+
},
|
|
1683
|
+
"options": {
|
|
1684
|
+
"@happyvertical/smrt-approvals:ApprovalRequest": {
|
|
1685
|
+
"fields": {
|
|
1686
|
+
"summary": {
|
|
1687
|
+
"order": 1
|
|
1688
|
+
},
|
|
1689
|
+
"kind": {
|
|
1690
|
+
"order": 2
|
|
1691
|
+
},
|
|
1692
|
+
"status": {
|
|
1693
|
+
"order": 3
|
|
1694
|
+
},
|
|
1695
|
+
"requestedBy": {
|
|
1696
|
+
"label": "Requested by",
|
|
1697
|
+
"order": 4
|
|
1698
|
+
},
|
|
1699
|
+
"requestedByType": {
|
|
1700
|
+
"label": "Requested by a",
|
|
1701
|
+
"order": 5
|
|
1702
|
+
},
|
|
1703
|
+
"expiresAt": {
|
|
1704
|
+
"label": "Expires",
|
|
1705
|
+
"order": 6
|
|
1706
|
+
},
|
|
1707
|
+
"decidedAt": {
|
|
1708
|
+
"label": "Decided on",
|
|
1709
|
+
"order": 7
|
|
1710
|
+
},
|
|
1711
|
+
"subjectType": {
|
|
1712
|
+
"label": "What it is about",
|
|
1713
|
+
"visibility": "advanced"
|
|
1714
|
+
},
|
|
1715
|
+
"subjectId": {
|
|
1716
|
+
"label": "Which one",
|
|
1717
|
+
"visibility": "advanced"
|
|
1718
|
+
},
|
|
1719
|
+
"requiredApprovals": {
|
|
1720
|
+
"label": "Approvals needed",
|
|
1721
|
+
"visibility": "advanced"
|
|
1722
|
+
},
|
|
1723
|
+
"approvalCount": {
|
|
1724
|
+
"label": "Approvals so far",
|
|
1725
|
+
"visibility": "advanced"
|
|
1726
|
+
},
|
|
1727
|
+
"consumedAt": {
|
|
1728
|
+
"label": "Used on",
|
|
1729
|
+
"visibility": "advanced"
|
|
1730
|
+
},
|
|
1731
|
+
"consumedBy": {
|
|
1732
|
+
"label": "Used by",
|
|
1733
|
+
"visibility": "advanced"
|
|
1734
|
+
},
|
|
1735
|
+
"tenantId": {
|
|
1736
|
+
"visibility": "hidden"
|
|
1737
|
+
},
|
|
1738
|
+
"subjectRevisionHash": {
|
|
1739
|
+
"visibility": "hidden"
|
|
1740
|
+
},
|
|
1741
|
+
"requestKey": {
|
|
1742
|
+
"visibility": "hidden"
|
|
1743
|
+
},
|
|
1744
|
+
"requiredPermissions": {
|
|
1745
|
+
"visibility": "hidden"
|
|
1746
|
+
},
|
|
1747
|
+
"version": {
|
|
1748
|
+
"visibility": "hidden"
|
|
1749
|
+
}
|
|
1750
|
+
}
|
|
1751
|
+
},
|
|
1752
|
+
"@happyvertical/smrt-approvals:ApprovalEvent": {
|
|
1753
|
+
"fields": {
|
|
1754
|
+
"requestId": {
|
|
1755
|
+
"label": "Request",
|
|
1756
|
+
"order": 1
|
|
1757
|
+
},
|
|
1758
|
+
"type": {
|
|
1759
|
+
"label": "What happened",
|
|
1760
|
+
"order": 2
|
|
1761
|
+
},
|
|
1762
|
+
"actorId": {
|
|
1763
|
+
"label": "Who",
|
|
1764
|
+
"order": 3
|
|
1765
|
+
},
|
|
1766
|
+
"actorType": {
|
|
1767
|
+
"label": "Who it was",
|
|
1768
|
+
"order": 4
|
|
1769
|
+
},
|
|
1770
|
+
"reason": {
|
|
1771
|
+
"order": 5
|
|
1772
|
+
},
|
|
1773
|
+
"occurredAt": {
|
|
1774
|
+
"label": "When",
|
|
1775
|
+
"order": 6
|
|
1776
|
+
},
|
|
1777
|
+
"selfApproved": {
|
|
1778
|
+
"label": "Decided by the requester",
|
|
1779
|
+
"visibility": "advanced"
|
|
1780
|
+
},
|
|
1781
|
+
"tenantId": {
|
|
1782
|
+
"visibility": "hidden"
|
|
1783
|
+
},
|
|
1784
|
+
"subjectRevisionHash": {
|
|
1785
|
+
"visibility": "hidden"
|
|
1786
|
+
},
|
|
1787
|
+
"sequence": {
|
|
1788
|
+
"visibility": "hidden"
|
|
1789
|
+
},
|
|
1790
|
+
"voteKey": {
|
|
1791
|
+
"visibility": "hidden"
|
|
1792
|
+
},
|
|
1793
|
+
"selfApprovalPermission": {
|
|
1794
|
+
"visibility": "hidden"
|
|
1795
|
+
}
|
|
1796
|
+
}
|
|
1797
|
+
},
|
|
1798
|
+
"@happyvertical/smrt-approvals:ApprovalPolicy": {
|
|
1799
|
+
"fields": {
|
|
1800
|
+
"kind": {
|
|
1801
|
+
"order": 1
|
|
1802
|
+
},
|
|
1803
|
+
"requiredApprovals": {
|
|
1804
|
+
"label": "Approvals needed",
|
|
1805
|
+
"order": 2
|
|
1806
|
+
},
|
|
1807
|
+
"ttlMs": {
|
|
1808
|
+
"label": "Time limit in milliseconds",
|
|
1809
|
+
"order": 3
|
|
1810
|
+
},
|
|
1811
|
+
"requiredPermission": {
|
|
1812
|
+
"label": "Extra permission needed",
|
|
1813
|
+
"order": 4
|
|
1814
|
+
},
|
|
1815
|
+
"updatedBy": {
|
|
1816
|
+
"label": "Last changed by",
|
|
1817
|
+
"order": 5
|
|
1818
|
+
},
|
|
1819
|
+
"tenantId": {
|
|
1820
|
+
"visibility": "hidden"
|
|
1821
|
+
}
|
|
1822
|
+
}
|
|
1823
|
+
}
|
|
1824
|
+
},
|
|
1825
|
+
"help": {
|
|
1826
|
+
"markdown": "## Overview\n\nApprovals is where you see who has to say yes before something happens, such\nas publishing a post or sending an order. Each request names what needs\napproval, who asked and where it stands: waiting, approved, rejected, changes\nrequested, cancelled or expired. The history keeps every step taken on a\nrequest, and the policies show the rules each kind of approval follows.\n\n## Tasks\n\nRequests are raised by the app or by an assistant through the approval\nservice, decisions are recorded by the same service, and policies are set by\nan administrator through it. Nothing here is created or changed by hand in the\napp. Here you find a request, see where it stands and read what happened.\n\n### Find a request\n\n1. Open the list of requests.\n2. Look at the **{field:ApprovalRequest.summary}** to see what needs approval, and the **{field:ApprovalRequest.kind}** to see what sort of approval it is.\n3. Check **{field:ApprovalRequest.requestedBy}** to see who asked.\n\n### See where a request stands\n\n1. Open the request.\n2. Its **{field:ApprovalRequest.status}** shows whether it is still waiting, approved, rejected, sent back for changes, cancelled or expired.\n3. **{field:ApprovalRequest.expiresAt}** is the deadline: after it a request can no longer be decided.\n4. Once decided, **{field:ApprovalRequest.decidedAt}** shows when.\n\n### Read the history of a request\n\n1. Open the history.\n2. Find the entries for the **{field:ApprovalEvent.requestId}** you are interested in.\n3. Each entry shows **{field:ApprovalEvent.type}**, who did it in **{field:ApprovalEvent.actorId}**, and **{field:ApprovalEvent.occurredAt}**, oldest first.\n4. A rejection or cancellation carries its **{field:ApprovalEvent.reason}**.\n\n### Read the rules for a kind of approval\n\n1. Open the policies.\n2. Find the **{field:ApprovalPolicy.kind}** you want to know about.\n3. **{field:ApprovalPolicy.requiredApprovals}** is how many different people must agree, and **{field:ApprovalPolicy.ttlMs}** is how long a request stays open.\n4. **{field:ApprovalPolicy.requiredPermission}** names any extra permission a decider must hold.\n",
|
|
1827
|
+
"fieldRefs": [
|
|
1828
|
+
"ApprovalEvent.actorId",
|
|
1829
|
+
"ApprovalEvent.occurredAt",
|
|
1830
|
+
"ApprovalEvent.reason",
|
|
1831
|
+
"ApprovalEvent.requestId",
|
|
1832
|
+
"ApprovalEvent.type",
|
|
1833
|
+
"ApprovalPolicy.kind",
|
|
1834
|
+
"ApprovalPolicy.requiredApprovals",
|
|
1835
|
+
"ApprovalPolicy.requiredPermission",
|
|
1836
|
+
"ApprovalPolicy.ttlMs",
|
|
1837
|
+
"ApprovalRequest.decidedAt",
|
|
1838
|
+
"ApprovalRequest.expiresAt",
|
|
1839
|
+
"ApprovalRequest.kind",
|
|
1840
|
+
"ApprovalRequest.requestedBy",
|
|
1841
|
+
"ApprovalRequest.status",
|
|
1842
|
+
"ApprovalRequest.summary"
|
|
1843
|
+
]
|
|
1844
|
+
},
|
|
1845
|
+
"demo": {
|
|
1846
|
+
"mode": "server",
|
|
1847
|
+
"reasons": [
|
|
1848
|
+
"Needs a server because its package depends on @happyvertical/smrt-profiles, @happyvertical/smrt-tenancy, @happyvertical/smrt-users, which do not build for a browser (#3617, #3624, #3626)."
|
|
1849
|
+
]
|
|
1850
|
+
}
|
|
1851
|
+
}
|
|
1852
|
+
],
|
|
1556
1853
|
"smrtDependencies": [
|
|
1557
1854
|
"@happyvertical/smrt-core",
|
|
1558
1855
|
"@happyvertical/smrt-tenancy",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @packageDocumentation
|
|
11
11
|
*/
|
|
12
|
-
import { SmrtObject, type SmrtObjectOptions } from '@happyvertical/smrt-core';
|
|
12
|
+
import { SmrtObject, type SmrtObjectOptions, type SmrtSaveOptions } from '@happyvertical/smrt-core';
|
|
13
13
|
import { type ApprovalEventType, type ApprovalPrincipalType } from '../types.js';
|
|
14
14
|
/** Constructor options for {@link ApprovalEvent}. */
|
|
15
15
|
export interface ApprovalEventOptions extends SmrtObjectOptions {
|
|
@@ -67,7 +67,7 @@ export declare class ApprovalEvent extends SmrtObject {
|
|
|
67
67
|
*
|
|
68
68
|
* @throws {ApprovalError} `APPROVAL_FORBIDDEN` for a persisted event.
|
|
69
69
|
*/
|
|
70
|
-
save(): Promise<this>;
|
|
70
|
+
save(options?: SmrtSaveOptions): Promise<this>;
|
|
71
71
|
/**
|
|
72
72
|
* Refuse any insert `ApprovalService` did not mint in the same transaction
|
|
73
73
|
* as its guarded UPDATE (see `write-capability.ts`): a forged `approved`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApprovalEvent.d.ts","sourceRoot":"","sources":["../../src/models/ApprovalEvent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAGL,UAAU,EACV,KAAK,iBAAiB,
|
|
1
|
+
{"version":3,"file":"ApprovalEvent.d.ts","sourceRoot":"","sources":["../../src/models/ApprovalEvent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAGL,UAAU,EACV,KAAK,iBAAiB,EACtB,KAAK,eAAe,EAErB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC3B,MAAM,aAAa,CAAC;AAIrB,qDAAqD;AACrD,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,qBAAqB,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CAC1B;AAED,4DAA4D;AAC5D,qBAuBa,aAAc,SAAQ,UAAU;IAC3C,kDAAkD;IAElD,QAAQ,EAAE,MAAM,CAAM;IAEtB;;;;;;OAMG;IASH,SAAS,EAAE,MAAM,CAAM;IAEvB,qBAAqB;IAQrB,IAAI,EAAE,iBAAiB,CAAa;IAEpC,iCAAiC;IAOjC,OAAO,EAAE,MAAM,CAAM;IAErB,mCAAmC;IAOnC,SAAS,EAAE,qBAAqB,CAAW;IAE3C,yEAAyE;IAOzE,MAAM,EAAE,MAAM,CAAM;IAEpB,wEAAwE;IAExE,mBAAmB,EAAE,MAAM,CAAM;IAEjC,qEAAqE;IAErE,QAAQ,EAAE,MAAM,CAAK;IAErB;;;OAGG;IAEH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE9B,+BAA+B;IAM/B,UAAU,EAAE,IAAI,GAAG,IAAI,CAAQ;IAE/B,uEAAuE;IAQvE,YAAY,EAAE,OAAO,CAAS;IAE9B,gFAAgF;IAEhF,sBAAsB,EAAE,MAAM,CAAM;gBAExB,OAAO,GAAE,oBAAyB;IAoB9C;;;;OAIG;IACY,IAAI,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAa7D;;;;;;;OAOG;cACsB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IAK5D,OAAO,CAAC,mBAAmB;IAQ3B;;;;OAIG;IACY,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;CAMvC"}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*
|
|
11
11
|
* @packageDocumentation
|
|
12
12
|
*/
|
|
13
|
-
import { SmrtObject, type SmrtObjectOptions } from '@happyvertical/smrt-core';
|
|
13
|
+
import { SmrtObject, type SmrtObjectOptions, type SmrtSaveOptions } from '@happyvertical/smrt-core';
|
|
14
14
|
/** Constructor options for {@link ApprovalPolicy}. */
|
|
15
15
|
export interface ApprovalPolicyOptions extends SmrtObjectOptions {
|
|
16
16
|
tenantId?: string;
|
|
@@ -42,6 +42,6 @@ export declare class ApprovalPolicy extends SmrtObject {
|
|
|
42
42
|
* @throws {ApprovalError} `APPROVAL_KIND_UNKNOWN`,
|
|
43
43
|
* `APPROVAL_POLICY_LOOSENS`, or `APPROVAL_INVALID`.
|
|
44
44
|
*/
|
|
45
|
-
save(): Promise<this>;
|
|
45
|
+
save(options?: SmrtSaveOptions): Promise<this>;
|
|
46
46
|
}
|
|
47
47
|
//# sourceMappingURL=ApprovalPolicy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApprovalPolicy.d.ts","sourceRoot":"","sources":["../../src/models/ApprovalPolicy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAEL,UAAU,EACV,KAAK,iBAAiB,
|
|
1
|
+
{"version":3,"file":"ApprovalPolicy.d.ts","sourceRoot":"","sources":["../../src/models/ApprovalPolicy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAEL,UAAU,EACV,KAAK,iBAAiB,EACtB,KAAK,eAAe,EAErB,MAAM,0BAA0B,CAAC;AAIlC,sDAAsD;AACtD,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB;IAC9D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,gFAAgF;AAChF,qBAca,cAAe,SAAQ,UAAU;IAC5C,qBAAqB;IAErB,QAAQ,EAAE,MAAM,CAAM;IAEtB,2CAA2C;IAM3C,IAAI,EAAE,MAAM,CAAM;IAElB,oDAAoD;IAMpD,iBAAiB,EAAE,MAAM,CAAK;IAE9B,yEAAyE;IAMzE,KAAK,EAAE,MAAM,CAAK;IAElB,iEAAiE;IAMjE,kBAAkB,EAAE,MAAM,CAAM;IAEhC,4CAA4C;IAK5C,SAAS,EAAE,MAAM,CAAM;gBAEX,OAAO,GAAE,qBAA0B;IAY/C;;;;;;OAMG;IACY,IAAI,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;CAW9D"}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @packageDocumentation
|
|
11
11
|
*/
|
|
12
|
-
import { SmrtObject, type SmrtObjectOptions } from '@happyvertical/smrt-core';
|
|
12
|
+
import { SmrtObject, type SmrtObjectOptions, type SmrtSaveOptions } from '@happyvertical/smrt-core';
|
|
13
13
|
import { type ApprovalPrincipalType, type ApprovalStatus } from '../types.js';
|
|
14
14
|
/** Constructor options for {@link ApprovalRequest}. */
|
|
15
15
|
export interface ApprovalRequestOptions extends SmrtObjectOptions {
|
|
@@ -107,7 +107,7 @@ export declare class ApprovalRequest extends SmrtObject {
|
|
|
107
107
|
*
|
|
108
108
|
* @throws {ApprovalError} `APPROVAL_FORBIDDEN` for a persisted request.
|
|
109
109
|
*/
|
|
110
|
-
save(): Promise<this>;
|
|
110
|
+
save(options?: SmrtSaveOptions): Promise<this>;
|
|
111
111
|
/**
|
|
112
112
|
* Requests are durable records of a decision.
|
|
113
113
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApprovalRequest.d.ts","sourceRoot":"","sources":["../../src/models/ApprovalRequest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAEL,UAAU,EACV,KAAK,iBAAiB,
|
|
1
|
+
{"version":3,"file":"ApprovalRequest.d.ts","sourceRoot":"","sources":["../../src/models/ApprovalRequest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAEL,UAAU,EACV,KAAK,iBAAiB,EACtB,KAAK,eAAe,EAErB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EACpB,MAAM,aAAa,CAAC;AAGrB,uDAAuD;AACvD,MAAM,WAAW,sBAAuB,SAAQ,iBAAiB;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,qBAAqB,CAAC;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,UAAU,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;GAMG;AACH,qBAsBa,eAAgB,SAAQ,UAAU;IAC7C,gEAAgE;IAEhE,QAAQ,EAAE,MAAM,CAAM;IAEtB,qDAAqD;IAOrD,IAAI,EAAE,MAAM,CAAM;IAElB,6EAA6E;IAO7E,WAAW,EAAE,MAAM,CAAM;IAEzB,iEAAiE;IAOjE,SAAS,EAAE,MAAM,CAAM;IAEvB;;;OAGG;IAQH,mBAAmB,EAAE,MAAM,CAAM;IAEjC,6EAA6E;IAQ7E,UAAU,EAAE,MAAM,CAAM;IAExB,qEAAqE;IAOrE,WAAW,EAAE,MAAM,CAAM;IAEzB,wEAAwE;IAOxE,eAAe,EAAE,qBAAqB,CAAW;IAEjD,0DAA0D;IAM1D,OAAO,EAAE,MAAM,CAAM;IAErB,6DAA6D;IAO7D,MAAM,EAAE,cAAc,CAAa;IAEnC,iEAAiE;IAMjE,iBAAiB,EAAE,MAAM,CAAK;IAE9B,0CAA0C;IAM1C,aAAa,EAAE,MAAM,CAAK;IAE1B;;;OAGG;IAEH,mBAAmB,EAAE,MAAM,CAAQ;IAEnC,sEAAsE;IAEtE,OAAO,EAAE,MAAM,CAAK;IAEpB,2EAA2E;IAM3E,SAAS,EAAE,IAAI,GAAG,IAAI,CAAQ;IAE9B,oDAAoD;IAMpD,SAAS,EAAE,IAAI,GAAG,IAAI,CAAQ;IAE9B,mDAAmD;IAMnD,UAAU,EAAE,IAAI,GAAG,IAAI,CAAQ;IAE/B,+CAA+C;IAM/C,UAAU,EAAE,MAAM,CAAM;gBAEZ,OAAO,GAAE,sBAA2B;IA8BhD,sFAAsF;IACtF,sBAAsB,IAAI,MAAM,EAAE;IAWlC,sDAAsD;IACtD,sBAAsB,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI;IAItD,0EAA0E;IAC1E,WAAW,IAAI,MAAM;IASrB,2CAA2C;IAC3C,UAAU,IAAI,OAAO;IAIrB;;;;;;;OAOG;cACsB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IAK5D,OAAO,CAAC,mBAAmB;IAuB3B;;;;;OAKG;IACY,IAAI,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAY7D;;;;OAIG;IACY,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;CAMvC"}
|