@dappermountain/payload-plugin-achievements 0.2.7 → 0.2.8
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/collections/Metrics/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAS/C,wBAAgB,sBAAsB,IAAI,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/collections/Metrics/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAS/C,wBAAgB,sBAAsB,IAAI,gBAAgB,CA+FzD"}
|
|
@@ -28,6 +28,7 @@ export function buildMetricsCollection() {
|
|
|
28
28
|
type: 'select',
|
|
29
29
|
required: true,
|
|
30
30
|
defaultValue: 'stored',
|
|
31
|
+
enumName: 'ach_metric_kind',
|
|
31
32
|
options: [
|
|
32
33
|
{ label: 'Stored (log deltas)', value: 'stored' },
|
|
33
34
|
{ label: 'Computed', value: 'computed' },
|
|
@@ -40,6 +41,7 @@ export function buildMetricsCollection() {
|
|
|
40
41
|
name: 'compute',
|
|
41
42
|
type: 'select',
|
|
42
43
|
defaultValue: 'elapsed',
|
|
44
|
+
enumName: 'ach_metric_compute',
|
|
43
45
|
options: [{ label: 'Elapsed time', value: 'elapsed' }],
|
|
44
46
|
admin: {
|
|
45
47
|
condition: (_, sibling) => sibling?.kind === 'computed',
|
|
@@ -50,6 +52,7 @@ export function buildMetricsCollection() {
|
|
|
50
52
|
name: 'unit',
|
|
51
53
|
type: 'select',
|
|
52
54
|
defaultValue: 'days',
|
|
55
|
+
enumName: 'ach_metric_unit',
|
|
53
56
|
options: [
|
|
54
57
|
{ label: 'Days', value: 'days' },
|
|
55
58
|
{ label: 'Hours', value: 'hours' },
|
|
@@ -64,6 +67,7 @@ export function buildMetricsCollection() {
|
|
|
64
67
|
name: 'since',
|
|
65
68
|
type: 'select',
|
|
66
69
|
defaultValue: 'user-created-at',
|
|
70
|
+
enumName: 'ach_metric_since',
|
|
67
71
|
options: elapsedSinceSelectOptions(),
|
|
68
72
|
admin: {
|
|
69
73
|
condition: (_, sibling) => sibling?.kind === 'computed' && sibling?.compute === 'elapsed',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ruleFields.d.ts","sourceRoot":"","sources":["../../../src/collections/fields/ruleFields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"ruleFields.d.ts","sourceRoot":"","sources":["../../../src/collections/fields/ruleFields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAqJpC;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,KAAK,EAAE,CAqB7C;AAED,mDAAmD;AACnD,wBAAgB,kBAAkB,IAAI,KAAK,EAAE,CAE5C"}
|
|
@@ -93,6 +93,8 @@ function ruleParamFields() {
|
|
|
93
93
|
{
|
|
94
94
|
name: 'since',
|
|
95
95
|
type: 'select',
|
|
96
|
+
// Nested under eligibility/completion/unlock → rules → rules; keep PG enum ≤63 chars.
|
|
97
|
+
enumName: 'ach_elapsed_since',
|
|
96
98
|
defaultValue: 'user-created-at',
|
|
97
99
|
options: elapsedSinceSelectOptions(),
|
|
98
100
|
admin: {
|
|
@@ -117,6 +119,7 @@ function ruleParamFields() {
|
|
|
117
119
|
{
|
|
118
120
|
name: 'unit',
|
|
119
121
|
type: 'select',
|
|
122
|
+
enumName: 'ach_elapsed_unit',
|
|
120
123
|
defaultValue: 'days',
|
|
121
124
|
options: [
|
|
122
125
|
{ label: 'Days', value: 'days' },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dappermountain/payload-plugin-achievements",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"description": "A robust, Admin-configured achievements engine for Payload: composable unlock rules, derived rank progress, request/review grants, metrics, and scoped multi-tenant support.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|