@defra/forms-model 3.0.33 → 3.0.35
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/data-model/helpers.js +5 -0
- package/dist/module/data-model/helpers.js.map +1 -0
- package/dist/module/data-model/index.js +1 -0
- package/dist/module/data-model/index.js.map +1 -1
- package/dist/module/data-model/types.js +1 -8
- package/dist/module/data-model/types.js.map +1 -1
- package/dist/types/data-model/helpers.d.ts +3 -0
- package/dist/types/data-model/helpers.d.ts.map +1 -0
- package/dist/types/data-model/index.d.ts +1 -0
- package/dist/types/data-model/index.d.ts.map +1 -1
- package/dist/types/data-model/types.d.ts +1 -2
- package/dist/types/data-model/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/data-model/helpers.ts +8 -0
- package/src/data-model/index.ts +1 -0
- package/src/data-model/types.ts +1 -8
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"helpers.js","names":["isMultipleApiKey","payApiKey","obj","test","undefined","production"],"sources":["../../../src/data-model/helpers.ts"],"sourcesContent":["import { type MultipleApiKeys } from '~/src/data-model/types.js'\n\nexport function isMultipleApiKey(\n payApiKey: string | MultipleApiKeys | undefined\n): payApiKey is MultipleApiKeys {\n const obj = payApiKey as MultipleApiKeys\n return obj.test !== undefined || obj.production !== undefined\n}\n"],"mappings":"AAEA,OAAO,SAASA,gBAAgBA,CAC9BC,SAA+C,EACjB;EAC9B,MAAMC,GAAG,GAAGD,SAA4B;EACxC,OAAOC,GAAG,CAACC,IAAI,KAAKC,SAAS,IAAIF,GAAG,CAACG,UAAU,KAAKD,SAAS;AAC/D","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","names":["InputWrapper","ConditionsWrapper","OutputType"],"sources":["../../../src/data-model/index.ts"],"sourcesContent":["export { InputWrapper } from '~/src/data-model/input-wrapper.js'\nexport { ConditionsWrapper } from '~/src/data-model/conditions-wrapper.js'\nexport { OutputType } from '~/src/data-model/enums.js'\n"],"mappings":"AAAA,SAASA,YAAY;AACrB,SAASC,iBAAiB;AAC1B,SAASC,UAAU","ignoreList":[]}
|
1
|
+
{"version":3,"file":"index.js","names":["InputWrapper","ConditionsWrapper","OutputType","isMultipleApiKey"],"sources":["../../../src/data-model/index.ts"],"sourcesContent":["export { InputWrapper } from '~/src/data-model/input-wrapper.js'\nexport { ConditionsWrapper } from '~/src/data-model/conditions-wrapper.js'\nexport { OutputType } from '~/src/data-model/enums.js'\nexport { isMultipleApiKey } from '~/src/data-model/helpers.js'\n"],"mappings":"AAAA,SAASA,YAAY;AACrB,SAASC,iBAAiB;AAC1B,SAASC,UAAU;AACnB,SAASC,gBAAgB","ignoreList":[]}
|
@@ -1,9 +1,2 @@
|
|
1
|
-
export
|
2
|
-
const obj = payApiKey;
|
3
|
-
return obj.test !== undefined || obj.production !== undefined;
|
4
|
-
}
|
5
|
-
|
6
|
-
/**
|
7
|
-
* `FormDefinition` is a typescript representation of `Schema`
|
8
|
-
*/
|
1
|
+
export {};
|
9
2
|
//# sourceMappingURL=types.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.js","names":[
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/data-model/types.ts"],"sourcesContent":["import { type ComponentDef } from '~/src/components/types.js'\nimport { type Condition } from '~/src/conditions/condition.js'\nimport { type OutputType } from '~/src/data-model/enums.js'\n\ntype Toggleable<T> = boolean | T\n\nexport interface Next {\n path: string\n condition?: string\n}\nexport type Link = Next\n\nexport interface Page {\n title: string\n path: string\n controller: string\n components?: ComponentDef[]\n section: string // the section ID\n next?: { path: string; condition?: string }[]\n}\n\nexport interface RepeatingFieldPage extends Page {\n controller: 'RepeatingFieldPageController'\n options: {\n summaryDisplayMode?: {\n samePage?: boolean\n separatePage?: boolean\n hideRowTitles?: boolean\n }\n customText?: {\n separatePageTitle?: string\n }\n }\n}\n\nexport interface Section {\n name: string\n title: string\n hideTitle: boolean\n}\n\nexport interface Item {\n text: string\n value: string | number | boolean\n description?: string\n condition?: string\n}\n\nexport interface List {\n name: string\n title: string\n type: 'string' | 'number' | 'boolean'\n items: Item[]\n}\n\nexport interface Feedback {\n feedbackForm?: boolean\n url?: string\n emailAddress?: string\n}\n\nexport interface PhaseBanner {\n phase?: 'alpha' | 'beta'\n feedbackUrl?: string\n}\n\nexport interface MultipleApiKeys {\n test?: string\n production?: string\n}\n\nexport interface EmailOutputConfiguration {\n emailAddress: string\n}\n\nexport interface NotifyOutputConfiguration {\n apiKey: string\n templateId: string\n emailField: string\n personalisation: string[]\n personalisationFieldCustomisation?: Record<string, string[]>\n addReferencesToPersonalisation?: boolean\n emailReplyToIdConfiguration?: {\n emailReplyToId: string\n condition?: string | undefined\n }[]\n}\n\nexport interface WebhookOutputConfiguration {\n url: string\n}\n\nexport type OutputConfiguration =\n | EmailOutputConfiguration\n | NotifyOutputConfiguration\n | WebhookOutputConfiguration\n\nexport interface Output {\n name: string\n title: string\n type: OutputType\n outputConfiguration: OutputConfiguration\n}\n\nexport interface ConfirmationPage {\n customText: {\n title: string\n paymentSkipped: Toggleable<string>\n nextSteps: Toggleable<string>\n }\n components: ComponentDef[]\n}\n\nexport interface PaymentSkippedWarningPage {\n customText: {\n title: string\n caption: string\n body: string\n }\n}\n\nexport interface SpecialPages {\n confirmationPage?: ConfirmationPage\n paymentSkippedWarningPage?: PaymentSkippedWarningPage\n}\n\nexport interface Fee {\n description: string\n amount: number\n multiplier?: string\n condition?: string\n prefix?: string\n}\n\nexport interface FeeOptions {\n paymentReferenceFormat?: string\n payReturnUrl?: string\n allowSubmissionWithoutPayment: boolean\n maxAttempts: number\n customPayErrorMessage?: string\n showPaymentSkippedWarningPage: boolean\n}\n\nexport type ConditionWrapperValue =\n | string\n | {\n name: string\n conditions: Condition[]\n }\n\nexport interface ConditionRawData {\n name: string\n displayName: string\n value: ConditionWrapperValue\n}\n\n/**\n * `FormDefinition` is a typescript representation of `Schema`\n */\nexport interface FormDefinition {\n pages: (Page | RepeatingFieldPage)[]\n conditions: ConditionRawData[]\n lists: List[]\n sections: Section[]\n startPage?: Page['path'] | undefined\n name?: string | undefined\n feedback?: Feedback\n phaseBanner?: PhaseBanner\n fees: Fee[]\n skipSummary?: boolean | undefined\n outputs: Output[]\n declaration?: string | undefined\n metadata?: Record<string, unknown>\n payApiKey?: string | MultipleApiKeys | undefined\n specialPages?: SpecialPages\n paymentReferenceFormat?: string\n feeOptions: FeeOptions\n}\n"],"mappings":"","ignoreList":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/data-model/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAEhE,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,GAC9C,SAAS,IAAI,eAAe,CAG9B"}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
export { InputWrapper } from '../data-model/input-wrapper.js';
|
2
2
|
export { ConditionsWrapper } from '../data-model/conditions-wrapper.js';
|
3
3
|
export { OutputType } from '../data-model/enums.js';
|
4
|
+
export { isMultipleApiKey } from '../data-model/helpers.js';
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/data-model/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAA;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/data-model/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAA;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA"}
|
@@ -105,7 +105,6 @@ export interface SpecialPages {
|
|
105
105
|
confirmationPage?: ConfirmationPage;
|
106
106
|
paymentSkippedWarningPage?: PaymentSkippedWarningPage;
|
107
107
|
}
|
108
|
-
export declare function isMultipleApiKey(payApiKey: string | MultipleApiKeys | undefined): payApiKey is MultipleApiKeys;
|
109
108
|
export interface Fee {
|
110
109
|
description: string;
|
111
110
|
amount: number;
|
@@ -146,7 +145,7 @@ export interface FormDefinition {
|
|
146
145
|
skipSummary?: boolean | undefined;
|
147
146
|
outputs: Output[];
|
148
147
|
declaration?: string | undefined;
|
149
|
-
metadata?: Record<string,
|
148
|
+
metadata?: Record<string, unknown>;
|
150
149
|
payApiKey?: string | MultipleApiKeys | undefined;
|
151
150
|
specialPages?: SpecialPages;
|
152
151
|
paymentReferenceFormat?: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/data-model/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,+BAA+B,CAAA;AAC9D,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAE3D,KAAK,UAAU,CAAC,CAAC,IAAI,OAAO,GAAG,CAAC,CAAA;AAEhC,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AACD,MAAM,MAAM,IAAI,GAAG,IAAI,CAAA;AAEvB,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,YAAY,EAAE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AC7B,MAAM,GACN;IACE,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,SAAS,EAAE,CAAA;CACxB,CAAA;AAEL,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,qBAAqB,CAAA;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,CAAC,IAAI,GAAG,kBAAkB,CAAC,EAAE,CAAA;IACpC,UAAU,EAAE,gBAAgB,EAAE,CAAA;IAC9B,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,SAAS,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,SAAS,CAAA;IACpC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,IAAI,EAAE,GAAG,EAAE,CAAA;IACX,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IACjC,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAClC,SAAS,CAAC,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAAA;IAChD,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,UAAU,EAAE,UAAU,CAAA;CACvB"}
|
package/package.json
CHANGED
@@ -0,0 +1,8 @@
|
|
1
|
+
import { type MultipleApiKeys } from '~/src/data-model/types.js'
|
2
|
+
|
3
|
+
export function isMultipleApiKey(
|
4
|
+
payApiKey: string | MultipleApiKeys | undefined
|
5
|
+
): payApiKey is MultipleApiKeys {
|
6
|
+
const obj = payApiKey as MultipleApiKeys
|
7
|
+
return obj.test !== undefined || obj.production !== undefined
|
8
|
+
}
|
package/src/data-model/index.ts
CHANGED
package/src/data-model/types.ts
CHANGED
@@ -124,13 +124,6 @@ export interface SpecialPages {
|
|
124
124
|
paymentSkippedWarningPage?: PaymentSkippedWarningPage
|
125
125
|
}
|
126
126
|
|
127
|
-
export function isMultipleApiKey(
|
128
|
-
payApiKey: string | MultipleApiKeys | undefined
|
129
|
-
): payApiKey is MultipleApiKeys {
|
130
|
-
const obj = payApiKey as MultipleApiKeys
|
131
|
-
return obj.test !== undefined || obj.production !== undefined
|
132
|
-
}
|
133
|
-
|
134
127
|
export interface Fee {
|
135
128
|
description: string
|
136
129
|
amount: number
|
@@ -177,7 +170,7 @@ export interface FormDefinition {
|
|
177
170
|
skipSummary?: boolean | undefined
|
178
171
|
outputs: Output[]
|
179
172
|
declaration?: string | undefined
|
180
|
-
metadata?: Record<string,
|
173
|
+
metadata?: Record<string, unknown>
|
181
174
|
payApiKey?: string | MultipleApiKeys | undefined
|
182
175
|
specialPages?: SpecialPages
|
183
176
|
paymentReferenceFormat?: string
|