@defra/forms-model 3.0.674 → 3.0.675
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 +1 -0
- 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 +8 -0
- 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 +9 -0
|
@@ -2,6 +2,7 @@ export let FormMetricType = /*#__PURE__*/function (FormMetricType) {
|
|
|
2
2
|
FormMetricType["TotalsMetric"] = "totals-metric";
|
|
3
3
|
FormMetricType["OverviewMetric"] = "overview-metric";
|
|
4
4
|
FormMetricType["TimelineMetric"] = "timeline-metric";
|
|
5
|
+
FormMetricType["DrilldownMetric"] = "drilldown-metric";
|
|
5
6
|
return FormMetricType;
|
|
6
7
|
}({});
|
|
7
8
|
export let FormMetricName = /*#__PURE__*/function (FormMetricName) {
|
|
@@ -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 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;
|
|
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 DrilldownMetric = 'drilldown-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;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;AAO1B,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 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":[]}
|
|
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 interface FormDrilldownMetric {\n type: FormMetricType.DrilldownMetric\n formId: string\n metricName: FormMetricName\n metricValue: number\n periodName: string\n createdAt: Date\n}\n\nexport type FormMetric =\n | FormTotalsMetric\n | FormOverviewMetric\n | FormTimelineMetric\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export declare enum FormMetricType {
|
|
2
2
|
TotalsMetric = "totals-metric",
|
|
3
3
|
OverviewMetric = "overview-metric",
|
|
4
|
-
TimelineMetric = "timeline-metric"
|
|
4
|
+
TimelineMetric = "timeline-metric",
|
|
5
|
+
DrilldownMetric = "drilldown-metric"
|
|
5
6
|
}
|
|
6
7
|
export declare enum FormMetricName {
|
|
7
8
|
NewFormsCreated = "NewFormsCreated",
|
|
@@ -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;
|
|
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;IAClC,eAAe,qBAAqB;CACrC;AAED,oBAAY,cAAc;IACxB,eAAe,oBAAoB;IACnC,mBAAmB,wBAAwB;IAC3C,gBAAgB,qBAAqB;IACrC,WAAW,gBAAgB;IAC3B,YAAY,iBAAiB;IAC7B,aAAa,kBAAkB;CAChC"}
|
|
@@ -41,5 +41,13 @@ export interface FormTimelineMetric {
|
|
|
41
41
|
metricValue: number;
|
|
42
42
|
createdAt: Date;
|
|
43
43
|
}
|
|
44
|
+
export interface FormDrilldownMetric {
|
|
45
|
+
type: FormMetricType.DrilldownMetric;
|
|
46
|
+
formId: string;
|
|
47
|
+
metricName: FormMetricName;
|
|
48
|
+
metricValue: number;
|
|
49
|
+
periodName: string;
|
|
50
|
+
createdAt: Date;
|
|
51
|
+
}
|
|
44
52
|
export type FormMetric = FormTotalsMetric | FormOverviewMetric | FormTimelineMetric;
|
|
45
53
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -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;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,CAAC,CAAA;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC,cAAc,EAAE,eAAe,CAAC,CAAA;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC,cAAc,EAAE,eAAe,CAAC,CAAA;IAClD,OAAO,CAAC,EAAE,MAAM,CAAC,cAAc,EAAE,eAAe,CAAC,CAAA;IACjD,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA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AAC,CAAA;IAC1D,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IACnD,gBAAgB,EAAE,MAAM,CAAA;IACxB,SAAS,EAAE,IAAI,CAAA;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,cAAc,CAAC,cAAc,CAAA;IACnC,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,UAAU,CAAA;IACtB,UAAU,EAAE,cAAc,CAAA;IAC1B,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,IAAI,CAAA;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,cAAc,CAAC,eAAe,CAAA;IACpC,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,cAAc,CAAA;IAC1B,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,IAAI,CAAA;CAChB;AAED,MAAM,MAAM,UAAU,GAClB,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,CAAA"}
|
package/package.json
CHANGED
|
@@ -49,6 +49,15 @@ export interface FormTimelineMetric {
|
|
|
49
49
|
createdAt: Date
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
export interface FormDrilldownMetric {
|
|
53
|
+
type: FormMetricType.DrilldownMetric
|
|
54
|
+
formId: string
|
|
55
|
+
metricName: FormMetricName
|
|
56
|
+
metricValue: number
|
|
57
|
+
periodName: string
|
|
58
|
+
createdAt: Date
|
|
59
|
+
}
|
|
60
|
+
|
|
52
61
|
export type FormMetric =
|
|
53
62
|
| FormTotalsMetric
|
|
54
63
|
| FormOverviewMetric
|