@defra/forms-model 3.0.671 → 3.0.673
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/module/form/form-metrics/enums.js +2 -1
- package/dist/module/form/form-metrics/enums.js.map +1 -1
- package/dist/module/form/form-metrics/types.js.map +1 -1
- package/dist/types/form/form-metrics/enums.d.ts +2 -1
- package/dist/types/form/form-metrics/enums.d.ts.map +1 -1
- package/dist/types/form/form-metrics/types.d.ts +7 -1
- package/dist/types/form/form-metrics/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/form/form-metrics/enums.ts +2 -1
- package/src/form/form-metrics/types.ts +7 -1
|
@@ -6,7 +6,8 @@ export let FormMetricType = /*#__PURE__*/function (FormMetricType) {
|
|
|
6
6
|
}({});
|
|
7
7
|
export let FormMetricName = /*#__PURE__*/function (FormMetricName) {
|
|
8
8
|
FormMetricName["NewFormsCreated"] = "NewFormsCreated";
|
|
9
|
-
FormMetricName["
|
|
9
|
+
FormMetricName["FormsFirstPublished"] = "FormsFirstPublished";
|
|
10
|
+
FormMetricName["FormsRePublished"] = "FormsRePublished";
|
|
10
11
|
FormMetricName["Submissions"] = "Submissions";
|
|
11
12
|
FormMetricName["FormsInDraft"] = "FormsInDraft";
|
|
12
13
|
FormMetricName["TimeToPublish"] = "TimeToPublish";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","names":["FormMetricType","FormMetricName"],"sources":["../../../../src/form/form-metrics/enums.ts"],"sourcesContent":["export enum FormMetricType {\n TotalsMetric = 'totals-metric',\n OverviewMetric = 'overview-metric',\n TimelineMetric = 'timeline-metric'\n}\n\nexport enum FormMetricName {\n NewFormsCreated = 'NewFormsCreated',\n
|
|
1
|
+
{"version":3,"file":"enums.js","names":["FormMetricType","FormMetricName"],"sources":["../../../../src/form/form-metrics/enums.ts"],"sourcesContent":["export enum FormMetricType {\n TotalsMetric = 'totals-metric',\n OverviewMetric = 'overview-metric',\n TimelineMetric = 'timeline-metric'\n}\n\nexport enum FormMetricName {\n NewFormsCreated = 'NewFormsCreated',\n FormsFirstPublished = 'FormsFirstPublished',\n FormsRePublished = 'FormsRePublished',\n Submissions = 'Submissions',\n FormsInDraft = 'FormsInDraft',\n TimeToPublish = 'TimeToPublish'\n}\n"],"mappings":"AAAA,WAAYA,cAAc,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;AAM1B,WAAYC,cAAc,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../../src/form/form-metrics/types.ts"],"sourcesContent":["import { type FormStatus } from '~/src/common/enums.js'\nimport {\n type FormMetricName,\n type FormMetricType\n} from '~/src/form/form-metrics/enums.js'\n\nexport interface FormTotalMetric {\n count?: number\n}\n\nexport interface FormTotalsMetric {\n type: FormMetricType.TotalsMetric\n last7Days?: Record<FormMetricName, FormTotalMetric>\n prev7Days?: Record<FormMetricName, FormTotalMetric>\n last30Days?: Record<FormMetricName, FormTotalMetric>\n prev30Days?: Record<FormMetricName, FormTotalMetric>\n lastYear?: Record<FormMetricName, FormTotalMetric>\n prevYear?: Record<FormMetricName, FormTotalMetric>\n allTime?: Record<FormMetricName, FormTotalMetric>\n liveSubmissions?: Record<string, number>\n draftSubmissions?: Record<string, number>\n daysToPublish?: Record<string, number>\n republished?: Record<string, number>\n updatedAt: Date\n}\n\nexport interface FormOverviewMetric {\n type: FormMetricType.OverviewMetric\n formId: string\n formStatus: FormStatus\n summaryMetrics: Record<string, number | string | string[]>\n featureMetrics: Record<string, Map<string, number>>\n submissionsCount: number\n updatedAt: Date\n}\n\nexport interface FormTimelineMetric {\n type: FormMetricType.TimelineMetric\n formId: string\n formStatus: FormStatus\n metricName:
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../../src/form/form-metrics/types.ts"],"sourcesContent":["import { type FormStatus } from '~/src/common/enums.js'\nimport {\n type FormMetricName,\n type FormMetricType\n} from '~/src/form/form-metrics/enums.js'\n\nexport interface FormTotalMetric {\n count?: number\n details?: {\n formId: string\n metricValue?: string | Date | number\n createdAt?: Date\n }\n}\n\nexport interface FormTotalsMetric {\n type: FormMetricType.TotalsMetric\n last7Days?: Record<FormMetricName, FormTotalMetric>\n prev7Days?: Record<FormMetricName, FormTotalMetric>\n last30Days?: Record<FormMetricName, FormTotalMetric>\n prev30Days?: Record<FormMetricName, FormTotalMetric>\n lastYear?: Record<FormMetricName, FormTotalMetric>\n prevYear?: Record<FormMetricName, FormTotalMetric>\n allTime?: Record<FormMetricName, FormTotalMetric>\n liveSubmissions?: Record<string, number>\n draftSubmissions?: Record<string, number>\n daysToPublish?: Record<string, number>\n republished?: Record<string, number>\n updatedAt: Date\n earliestDate: Date\n}\n\nexport interface FormOverviewMetric {\n type: FormMetricType.OverviewMetric\n formId: string\n formStatus: FormStatus\n summaryMetrics: Record<string, number | string | string[]>\n featureMetrics: Record<string, Map<string, number>>\n submissionsCount: number\n updatedAt: Date\n}\n\nexport interface FormTimelineMetric {\n type: FormMetricType.TimelineMetric\n formId: string\n formStatus: FormStatus\n metricName: FormMetricName\n metricValue: number\n createdAt: Date\n}\n\nexport type FormMetric =\n | FormTotalsMetric\n | FormOverviewMetric\n | FormTimelineMetric\n"],"mappings":"","ignoreList":[]}
|
|
@@ -5,7 +5,8 @@ export declare enum FormMetricType {
|
|
|
5
5
|
}
|
|
6
6
|
export declare enum FormMetricName {
|
|
7
7
|
NewFormsCreated = "NewFormsCreated",
|
|
8
|
-
|
|
8
|
+
FormsFirstPublished = "FormsFirstPublished",
|
|
9
|
+
FormsRePublished = "FormsRePublished",
|
|
9
10
|
Submissions = "Submissions",
|
|
10
11
|
FormsInDraft = "FormsInDraft",
|
|
11
12
|
TimeToPublish = "TimeToPublish"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../../src/form/form-metrics/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACxB,YAAY,kBAAkB;IAC9B,cAAc,oBAAoB;IAClC,cAAc,oBAAoB;CACnC;AAED,oBAAY,cAAc;IACxB,eAAe,oBAAoB;IACnC,
|
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../../src/form/form-metrics/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACxB,YAAY,kBAAkB;IAC9B,cAAc,oBAAoB;IAClC,cAAc,oBAAoB;CACnC;AAED,oBAAY,cAAc;IACxB,eAAe,oBAAoB;IACnC,mBAAmB,wBAAwB;IAC3C,gBAAgB,qBAAqB;IACrC,WAAW,gBAAgB;IAC3B,YAAY,iBAAiB;IAC7B,aAAa,kBAAkB;CAChC"}
|
|
@@ -2,6 +2,11 @@ import { type FormStatus } from '../../common/enums.js';
|
|
|
2
2
|
import { type FormMetricName, type FormMetricType } from '../../form/form-metrics/enums.js';
|
|
3
3
|
export interface FormTotalMetric {
|
|
4
4
|
count?: number;
|
|
5
|
+
details?: {
|
|
6
|
+
formId: string;
|
|
7
|
+
metricValue?: string | Date | number;
|
|
8
|
+
createdAt?: Date;
|
|
9
|
+
};
|
|
5
10
|
}
|
|
6
11
|
export interface FormTotalsMetric {
|
|
7
12
|
type: FormMetricType.TotalsMetric;
|
|
@@ -17,6 +22,7 @@ export interface FormTotalsMetric {
|
|
|
17
22
|
daysToPublish?: Record<string, number>;
|
|
18
23
|
republished?: Record<string, number>;
|
|
19
24
|
updatedAt: Date;
|
|
25
|
+
earliestDate: Date;
|
|
20
26
|
}
|
|
21
27
|
export interface FormOverviewMetric {
|
|
22
28
|
type: FormMetricType.OverviewMetric;
|
|
@@ -31,7 +37,7 @@ export interface FormTimelineMetric {
|
|
|
31
37
|
type: FormMetricType.TimelineMetric;
|
|
32
38
|
formId: string;
|
|
33
39
|
formStatus: FormStatus;
|
|
34
|
-
metricName:
|
|
40
|
+
metricName: FormMetricName;
|
|
35
41
|
metricValue: number;
|
|
36
42
|
createdAt: Date;
|
|
37
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/form-metrics/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,kCAAkC,CAAA;AAEzC,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/form-metrics/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,kCAAkC,CAAA;AAEzC,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE;QACR,MAAM,EAAE,MAAM,CAAA;QACd,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAAA;QACpC,SAAS,CAAC,EAAE,IAAI,CAAA;KACjB,CAAA;CACF;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,cAAc,CAAC,YAAY,CAAA;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC,cAAc,EAAE,eAAe,CAAC,CAAA;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC,cAAc,EAAE,eAAe,CAAC,CAAA;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC,cAAc,EAAE,eAAe,CAAC,CAAA;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC,cAAc,EAAE,eAAe,CA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ED
|
@@ -6,7 +6,8 @@ export enum FormMetricType {
|
|
|
6
6
|
|
|
7
7
|
export enum FormMetricName {
|
|
8
8
|
NewFormsCreated = 'NewFormsCreated',
|
|
9
|
-
|
|
9
|
+
FormsFirstPublished = 'FormsFirstPublished',
|
|
10
|
+
FormsRePublished = 'FormsRePublished',
|
|
10
11
|
Submissions = 'Submissions',
|
|
11
12
|
FormsInDraft = 'FormsInDraft',
|
|
12
13
|
TimeToPublish = 'TimeToPublish'
|
|
@@ -6,6 +6,11 @@ import {
|
|
|
6
6
|
|
|
7
7
|
export interface FormTotalMetric {
|
|
8
8
|
count?: number
|
|
9
|
+
details?: {
|
|
10
|
+
formId: string
|
|
11
|
+
metricValue?: string | Date | number
|
|
12
|
+
createdAt?: Date
|
|
13
|
+
}
|
|
9
14
|
}
|
|
10
15
|
|
|
11
16
|
export interface FormTotalsMetric {
|
|
@@ -22,6 +27,7 @@ export interface FormTotalsMetric {
|
|
|
22
27
|
daysToPublish?: Record<string, number>
|
|
23
28
|
republished?: Record<string, number>
|
|
24
29
|
updatedAt: Date
|
|
30
|
+
earliestDate: Date
|
|
25
31
|
}
|
|
26
32
|
|
|
27
33
|
export interface FormOverviewMetric {
|
|
@@ -38,7 +44,7 @@ export interface FormTimelineMetric {
|
|
|
38
44
|
type: FormMetricType.TimelineMetric
|
|
39
45
|
formId: string
|
|
40
46
|
formStatus: FormStatus
|
|
41
|
-
metricName:
|
|
47
|
+
metricName: FormMetricName
|
|
42
48
|
metricValue: number
|
|
43
49
|
createdAt: Date
|
|
44
50
|
}
|