ngx-t-forms-types 0.0.27 → 0.0.29

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.
@@ -26,10 +26,22 @@ export interface Body {
26
26
  raw: string;
27
27
  options: Option;
28
28
  }
29
+ /**
30
+ * One query-string entry on a captured Postman request URL. Postman marks a
31
+ * param the author unticked with `disabled: true` — such entries are excluded
32
+ * when seeding a fetch config's `capturedQuery`.
33
+ */
34
+ export interface IUrlQueryParam {
35
+ key: string;
36
+ value: string;
37
+ disabled?: boolean;
38
+ }
29
39
  export interface Url {
30
40
  raw: string;
31
41
  host: string[];
32
42
  path: string[];
43
+ /** Structured query params of the captured URL (absent when the URL has none). */
44
+ query?: IUrlQueryParam[];
33
45
  }
34
46
  export interface Request {
35
47
  method: 'GET' | 'POST' | 'PUT' | 'DELETE';
@@ -97,10 +97,27 @@ export interface IStoreFunctions {
97
97
  saveUserSignature: (signature: PointGroup[]) => Observable<void>;
98
98
  httpPostDataFunction: (url: string, data: any, options?: any) => Observable<any>;
99
99
  httpGetDataFunction: (url: string, options?: any) => Observable<any>;
100
+ /**
101
+ * Transport for a per-input value/options fetch whose `httpMethod` is `'PUT'`.
102
+ * Optional: when the host does not provide it, the library falls back to its
103
+ * own `HttpClient.put(url, data, options)` with the options bag forwarded.
104
+ */
105
+ httpPutDataFunction?: (url: string, data: any, options?: any) => Observable<any>;
100
106
  getCurrentStepMicroflowSubmissions: () => Observable<{
101
107
  submissions: any[];
102
108
  columnMapping: AdjResponseReviewColumnMapping;
103
109
  scoreSheet?: WorkflowAdjudicationScoreSheetValue[];
104
110
  adjudicationPricePreferenceCalculationFormula?: string;
111
+ /**
112
+ * "Rand value" of the procurement per PPR 2022 reg 1: the total
113
+ * estimated value of the contract in Rand, calculated at the time of
114
+ * the tender invitation (all applicable taxes included). Used by the
115
+ * library to auto-select the 80/20 vs 90/10 preference point system
116
+ * (≤ R50 million → 80/20; > R50 million → 90/10, regs 4(1)/5(1)) and
117
+ * as a reference for abnormally-low-tender flagging. Optional: when
118
+ * absent, the system is selected from the lowest acceptable tender
119
+ * received, per reg 3(b).
120
+ */
121
+ estimatedProcurementValue?: number;
105
122
  }>;
106
123
  }
@@ -103,6 +103,45 @@ export type HeaderTemplateValue = string | number | boolean;
103
103
  export type HeaderTemplate = {
104
104
  [headerName: string]: HeaderTemplateValue;
105
105
  };
106
+ /**
107
+ * A single query-parameter value in a {@link QueryTemplate}.
108
+ *
109
+ * Scalars only — a URL query parameter is text on the wire, so a number/boolean
110
+ * literal is stringified at request time. The exact structural twin of
111
+ * {@link HeaderTemplateValue}.
112
+ */
113
+ export type QueryTemplateValue = string | number | boolean;
114
+ /**
115
+ * Declarative URL query parameters for a value/options fetch — the exact
116
+ * structural twin of {@link HeaderTemplate}, resolved with the same
117
+ * `{{inputId}}` token syntax.
118
+ *
119
+ * A value that is EXACTLY `"{{inputId}}"` is replaced by that input's live value
120
+ * (stringified); a value that merely CONTAINS token(s) is interpolated
121
+ * (`"za-{{province}}"`); every other literal is a fixed default. Parameter
122
+ * names are always literal.
123
+ *
124
+ * Applies to GET as well as POST — query parameters are a transport concern.
125
+ * The resolved map is merged into
126
+ * {@link APIDataFetchingConfigurationInterface.httpHeaderOptions}`.params`
127
+ * (the template wins on a name collision) before the request is issued; any
128
+ * literal query text already inside `httpEndPoint` is left untouched and the
129
+ * HTTP layer appends the params after it.
130
+ *
131
+ * Like a header template, a token that resolves empty keeps the fetch **idle**:
132
+ * a request missing a bound parameter would return the wrong data, so the
133
+ * engine waits for the bound field instead.
134
+ *
135
+ * @example
136
+ * queryTemplate: {
137
+ * financialYear: '{{financialYear}}',
138
+ * department: '{{departmentId}}',
139
+ * pageSize: 50,
140
+ * }
141
+ */
142
+ export type QueryTemplate = {
143
+ [paramName: string]: QueryTemplateValue;
144
+ };
106
145
  export interface APIDataFetchingConfigurationInterface extends DataFetchingBaseConfig {
107
146
  _id: string;
108
147
  name: string;
@@ -140,6 +179,26 @@ export interface APIDataFetchingConfigurationInterface extends DataFetchingBaseC
140
179
  * it never opens blank; never sent on its own.
141
180
  */
142
181
  capturedHeaders?: HeaderTemplate;
182
+ /**
183
+ * Author-configured URL query parameters, optionally bound to live form values
184
+ * (see {@link QueryTemplate}). Merged over {@link httpHeaderOptions}`.params`
185
+ * at request time; absent means "send exactly what `httpHeaderOptions` says",
186
+ * which is the historical behaviour.
187
+ */
188
+ queryTemplate?: QueryTemplate;
189
+ /**
190
+ * The query parameters captured from the selected endpoint's URL (e.g. the
191
+ * Postman request's enabled `url.query` entries). Persisted only to seed
192
+ * {@link queryTemplate}'s editor so it never opens blank; never sent on its
193
+ * own — mirrors {@link capturedHeaders}.
194
+ */
195
+ capturedQuery?: QueryTemplate;
196
+ /**
197
+ * The endpoint's documentation captured verbatim from the Postman request's
198
+ * `description`. Display-only (the editor's Docs tab); never sent, never
199
+ * interpreted — mirrors the other `captured*` seeds.
200
+ */
201
+ capturedDocs?: string;
143
202
  backEndConfig: {
144
203
  /**
145
204
  * The default/mapTo mapping that shapes the POST body in `'mappedInputs'` mode.
@@ -1,7 +1,72 @@
1
+ import { InputObservedForChange } from "./FormControlCustomValidatorsInterface.js";
2
+ /**
3
+ * One conditional-display rule declared on a form input's
4
+ * `conditionalInputConfig`.
5
+ *
6
+ * ### Two shapes, one field
7
+ *
8
+ * The interface carries an **expression** half (read by the engine) and a
9
+ * legacy **descriptive** half (read by external consumers that render authoring
10
+ * guidance). This mirrors `ConfigurationValidTestInterface`, which solved the
11
+ * same migration by making the legacy fields optional and adding `expression`
12
+ * alongside them.
13
+ *
14
+ * - A rule with an `expression` participates in the runtime visibility gate.
15
+ * - A rule without one is inert to the engine — it is descriptive metadata only,
16
+ * and the input stays visible as far as that rule is concerned.
17
+ *
18
+ * ### Combination
19
+ *
20
+ * Multiple rules combine with **AND**: the input is revealed only when every
21
+ * expression-bearing rule evaluates to `true`. This matches how every other
22
+ * show-gate in the form builder composes (`additionalTest` entries are all
23
+ * applied with `.every`). An absent or empty array means *always visible*.
24
+ *
25
+ * @example Reveal a phone-number field only when the contact method is 'phone'.
26
+ * ```ts
27
+ * conditionalInputConfig: [{
28
+ * id: 'reveal-phone',
29
+ * expression: 'contactMethod === "phone"',
30
+ * inputsObservedForChanges: [{ inputId: 'a1b2', variable: 'contactMethod' }],
31
+ * }]
32
+ * ```
33
+ */
1
34
  export interface ConditionalInputRule {
2
- formControlName: string;
3
- label: string;
4
- testType: string;
5
- valueMatch: string;
35
+ /** Stable rule identifier. */
6
36
  id: string;
37
+ /**
38
+ * Predicate expression over the observed inputs' values. Evaluating to
39
+ * `true` means the input is **REVEALED**.
40
+ *
41
+ * Same DSL as a custom validator's `expression`, with the opposite polarity:
42
+ * a validator's `true` means *invalid*, a rule's `true` means *shown*.
43
+ */
44
+ expression?: string;
45
+ /**
46
+ * Dependency list auto-derived from {@link ConditionalInputRule.expression},
47
+ * exactly as custom validators derive theirs. Each entry binds a variable
48
+ * name used in the expression to the input whose value supplies it.
49
+ */
50
+ inputsObservedForChanges?: InputObservedForChange[];
51
+ /**
52
+ * @deprecated Legacy descriptive shape. Never read by the engine; retained
53
+ * because external consumers render it as authoring guidance. Author new
54
+ * rules with {@link ConditionalInputRule.expression}.
55
+ */
56
+ formControlName?: string;
57
+ /**
58
+ * @deprecated Legacy descriptive shape — see
59
+ * {@link ConditionalInputRule.formControlName}.
60
+ */
61
+ label?: string;
62
+ /**
63
+ * @deprecated Legacy descriptive shape — see
64
+ * {@link ConditionalInputRule.formControlName}.
65
+ */
66
+ testType?: string;
67
+ /**
68
+ * @deprecated Legacy descriptive shape — see
69
+ * {@link ConditionalInputRule.formControlName}.
70
+ */
71
+ valueMatch?: string;
7
72
  }
@@ -121,6 +121,51 @@ export interface IIncludedSegmentConfig {
121
121
  segmentExtension: boolean;
122
122
  id: string;
123
123
  }
124
+ /**
125
+ * How the {@link IDualCashExclusionConfig.rules} combine into one verdict.
126
+ * - `'any'`: cash is suppressed when AT LEAST ONE rule matches (default).
127
+ * - `'all'`: cash is suppressed only when EVERY rule matches.
128
+ */
129
+ export type DualCashExclusionMatchMode = 'any' | 'all';
130
+ /**
131
+ * One regex condition evaluated against the selected ACCRUAL account values of
132
+ * a Dual-basis MSCOA input. A rule "matches" when its pattern matches at least
133
+ * one selected accrual account value in its segment scope.
134
+ *
135
+ * The pattern is tested against the account's `SCOAAccount` value AND the value
136
+ * of the field named by {@link IScoaInputConfig.accountValueLabel} (what the
137
+ * user sees selected in the chart). An invalid pattern never matches — it can
138
+ * therefore never suppress the cash requirement by accident.
139
+ */
140
+ export interface IDualCashExclusionRule {
141
+ /** Stable record id (stamped by the builder's record-list editor). */
142
+ id?: string;
143
+ /** JavaScript regular-expression source, without delimiters (e.g. `^1[0-9]{3}`). */
144
+ pattern: string;
145
+ /** Optional regex flags (e.g. `i`). Invalid flags make the rule evaluate as not matched. */
146
+ flags?: string;
147
+ /**
148
+ * Optional segment scope (matched case-insensitively against the accrual
149
+ * segment key, e.g. `ITEM`). Empty/absent = every accrual segment.
150
+ */
151
+ segment?: string;
152
+ /** Admin note describing the business intent of the rule. */
153
+ description?: string;
154
+ }
155
+ /**
156
+ * Dual-basis-only refinement of the "both bases required" rule. When the rules
157
+ * evaluate to a match (per {@link DualCashExclusionMatchMode}) against the
158
+ * selected accrual accounts, the cash side is suppressed: the cash table is
159
+ * hidden, cash account values are cleared from the input value, and validation
160
+ * requires the accrual side only. With no (usable) rules configured, the
161
+ * default Dual behaviour — cash AND accrual both required — is enforced.
162
+ */
163
+ export interface IDualCashExclusionConfig {
164
+ /** Regex conditions evaluated against the selected accrual account values. */
165
+ rules?: IDualCashExclusionRule[];
166
+ /** How the rules combine; defaults to `'any'` when absent. */
167
+ matchMode?: DualCashExclusionMatchMode;
168
+ }
124
169
  export interface IScoaInputConfig {
125
170
  inputs: ScoaInnerInput[];
126
171
  label: string;
@@ -131,6 +176,12 @@ export interface IScoaInputConfig {
131
176
  cashSegments: IIncludedSegmentConfig[] | undefined;
132
177
  accountValueLabel: string;
133
178
  showAllSegments: boolean;
179
+ /**
180
+ * Optional Dual-basis refinement: regex conditions under which the cash side
181
+ * is NOT required (see {@link IDualCashExclusionConfig}). Ignored for
182
+ * non-Dual accounting bases.
183
+ */
184
+ dualCashExclusion?: IDualCashExclusionConfig;
134
185
  }
135
186
  export interface IGetTreeResponse {
136
187
  message: string;
@@ -3,6 +3,11 @@ export declare enum MinInputTypes {
3
3
  Default = "default",
4
4
  MapTo = "mapto",
5
5
  MapDocFilter = "mapDocFilter",
6
+ /**
7
+ * @deprecated Never implemented. No editor offers it, no runtime handles it —
8
+ * a `bind` entry leaves its fetch permanently idle. The runtime now surfaces a
9
+ * config error when it encounters one. Re-map the entry as {@link MapTo}.
10
+ */
6
11
  Bind = "bind"
7
12
  }
8
13
  export declare enum JsDataTypes {
@@ -3,6 +3,11 @@ export var MinInputTypes;
3
3
  MinInputTypes["Default"] = "default";
4
4
  MinInputTypes["MapTo"] = "mapto";
5
5
  MinInputTypes["MapDocFilter"] = "mapDocFilter";
6
+ /**
7
+ * @deprecated Never implemented. No editor offers it, no runtime handles it —
8
+ * a `bind` entry leaves its fetch permanently idle. The runtime now surfaces a
9
+ * config error when it encounters one. Re-map the entry as {@link MapTo}.
10
+ */
6
11
  MinInputTypes["Bind"] = "bind";
7
12
  })(MinInputTypes || (MinInputTypes = {}));
8
13
  export var JsDataTypes;
@@ -13,6 +13,17 @@ export interface AdjResponseReviewColumnMapping {
13
13
  respondentCodeKey: string;
14
14
  responsePreferenceCalculationKey?: string;
15
15
  responseDateKey?: string;
16
+ /**
17
+ * Form key on each submission row holding the tendered price ("price" per
18
+ * PPR 2022 reg 1: all applicable taxes included, less unconditional
19
+ * discounts). When present, the library's submission-review step computes
20
+ * the PPPFA price preference points itself (organically, per the
21
+ * Preferential Procurement Regulations 2022, regs 3–5) instead of relying
22
+ * on host-stamped scores. Falls back to `'totalBidPrice'` when omitted;
23
+ * if no row carries a usable price under that key either, the library
24
+ * keeps whatever score the host stamped onto the rows.
25
+ */
26
+ responsePriceKey?: string;
16
27
  }
17
28
  export interface WorkflowAdjudicationMicroFlowReviewValue {
18
29
  id: string;
@@ -1,14 +1,15 @@
1
1
  import { IFolderItem, IPostmanCollection } from "../FormBuilder/postmanCollection.js";
2
2
  import { IWorkflowDocListCols, IWorkflowStepOption } from "../FormBuilder/workflowSelectionConfig.js";
3
3
  import { TreeNode } from "../FormSlide/accessTree.js";
4
- import { APIDataFetchingConfigurationInterface, HeaderTemplate, HeaderTemplateValue, InputAPIDataId, MongoDbPipeLineConfigInterface, PayloadTemplate, PayloadTemplateValue, RequestBodyMode } from "./APIDataFetchingConfigurationInterface.js";
4
+ import { APIDataFetchingConfigurationInterface, HeaderTemplate, HeaderTemplateValue, InputAPIDataId, MongoDbPipeLineConfigInterface, PayloadTemplate, PayloadTemplateValue, QueryTemplate, QueryTemplateValue, RequestBodyMode } from "./APIDataFetchingConfigurationInterface.js";
5
5
  import { AutocapitalizeOptions, AutocompleteOptions, ElementTypes, IBasicFormInput, IFormElementTemplate, InputDataTypes, InputPipeTypes, InputTypes, OptionSelectTypes } from "./BasicFormInputInterface.js";
6
+ import { ConditionalInputRule } from "./ConditionalInputRule.js";
6
7
  import { IDateRangePickerInput } from "./DateRangePickerInput.js";
7
8
  import { AllDocumentFileExtensions, AllImageFileExtensions, FileUploadInputValueInterface, IFileUploadInput, InputFileType, UploadTypes } from "./FileUploadInputInterface.js";
8
9
  import { DraftFormControlCustomValidator, FormControlCustomValidatorsInterface, InputObservedForChange } from "./FormControlCustomValidatorsInterface.js";
9
10
  import { IFormValidationOverride } from "./FormValidationOverride.js";
10
11
  import { FormInputBasicOptionInterface } from "./FormInputBasicOptionInterface.js";
11
- import { AccountingBasis, IAccountSegmentTreeKeys, IGetTreeResponse, IIncludedSegmentConfig, IScoaAccount, IScoaInput, IScoaInputConfig, ITableScoaSelectionRow, ScoaAccountTree, ScoaInterface, ScoaSegmentValue, ScoaSegmentValueBag } from "./IMscoaAccount.js";
12
+ import { AccountingBasis, DualCashExclusionMatchMode, IAccountSegmentTreeKeys, IDualCashExclusionConfig, IDualCashExclusionRule, IGetTreeResponse, IIncludedSegmentConfig, IScoaAccount, IScoaInput, IScoaInputConfig, ITableScoaSelectionRow, ScoaAccountTree, ScoaInterface, ScoaSegmentValue, ScoaSegmentValueBag } from "./IMscoaAccount.js";
12
13
  import { ISelectInputInterface } from "./ISelectInputInterface.js";
13
14
  import { MatDataOptionsInterface } from "./MatDataOptionsInterface.js";
14
15
  import { IMatrixInput } from "./MatrixInputInterface.js";
@@ -25,4 +26,4 @@ import { CalculationFunctions, calculationVariableInterface } from "./calculatio
25
26
  import { IRichTextEditor, RichTextEditorType } from "./RichTextEditorInput.js";
26
27
  import { ValidationError, ValidationOptions } from "./schema.js";
27
28
  import { IUserSignature } from "./userSignature.js";
28
- export { ElementTypes, InputTypes, InputPipeTypes, AutocapitalizeOptions, AutocompleteOptions, InputDataTypes, MinInputTypes, IFormElementTemplate, IBasicFormInput, IFileUploadInput, IDateRangePickerInput, ITextareaProperties, IToggleInput, IMatrixInput, IMultiple, IMultipleInputCal, IScoaInput, TableConfigurationsInterface, TableColumnConfigInterface, FormControlCustomValidatorsInterface, InputObservedForChange, DraftFormControlCustomValidator, IFormValidationOverride, MinimumInputRequiredInterface, MinInputMapInput, CalculatedFieldRules, calculationVariableInterface, APIDataFetchingConfigurationInterface, PayloadTemplate, PayloadTemplateValue, RequestBodyMode, HeaderTemplate, HeaderTemplateValue, IGetTreeResponse, CalculationFunctions, TreeNode, IPostmanCollection, IFolderItem, FileUploadInputValueInterface, AllDocumentFileExtensions, AllImageFileExtensions, UploadTypes, InputFileType, IScoaAccount, IScoaInputConfig, ITableScoaSelectionRow, ScoaSegmentValue, ScoaSegmentValueBag, IIncludedSegmentConfig, AccountingBasis, ScoaAccountTree, IUserSignature, ValidationOptions, ValidationError, MatDataOptionsInterface, MongoDbPipeLineConfigInterface, InputAPIDataId, FormInputBasicOptionInterface, ScoaInterface, ScoaInnerInput, IAccountSegmentTreeKeys, IWorkflowDocumentPicker, IWorkflowDocumentPickerConfig, IWorkflowDocumentStepFilter, IDocumentPickerFilter, IDocumentPage, IDocumentQueryRequest, IDocumentReference, DocumentPickerFilterOperator, DocumentPickerFilterValueSource, DocumentPickerFilterValueType, DOCUMENT_PICKER_FILTER_OPERATORS, DOCUMENT_PICKER_FILTER_VALUE_SOURCES, DOCUMENT_PICKER_FILTER_VALUE_TYPES, workflowStepStatus, IWorkflowDocListCols, IWorkflowStepOption, JsDataTypes, AdjudicationSteps, IWorkflowAdjudicationInput, WorkflowAdjudicationScoreSheetValue, WorkflowAdjudicationMicroFlowReviewValue, WorkflowAdjudicationResponseElectedSupplierSelectionValue, ScoreSheetItem, AdjResponseReviewColumnMapping, OptionSelectTypes, ISelectInputInterface, MultipleInputAvailableOperations, RichTextEditorType, IRichTextEditor, };
29
+ export { ElementTypes, InputTypes, InputPipeTypes, AutocapitalizeOptions, AutocompleteOptions, InputDataTypes, MinInputTypes, IFormElementTemplate, IBasicFormInput, IFileUploadInput, ConditionalInputRule, IDateRangePickerInput, ITextareaProperties, IToggleInput, IMatrixInput, IMultiple, IMultipleInputCal, IScoaInput, TableConfigurationsInterface, TableColumnConfigInterface, FormControlCustomValidatorsInterface, InputObservedForChange, DraftFormControlCustomValidator, IFormValidationOverride, MinimumInputRequiredInterface, MinInputMapInput, CalculatedFieldRules, calculationVariableInterface, APIDataFetchingConfigurationInterface, PayloadTemplate, PayloadTemplateValue, RequestBodyMode, HeaderTemplate, HeaderTemplateValue, QueryTemplate, QueryTemplateValue, IGetTreeResponse, CalculationFunctions, TreeNode, IPostmanCollection, IFolderItem, FileUploadInputValueInterface, AllDocumentFileExtensions, AllImageFileExtensions, UploadTypes, InputFileType, IScoaAccount, IScoaInputConfig, ITableScoaSelectionRow, ScoaSegmentValue, ScoaSegmentValueBag, IIncludedSegmentConfig, AccountingBasis, DualCashExclusionMatchMode, IDualCashExclusionConfig, IDualCashExclusionRule, ScoaAccountTree, IUserSignature, ValidationOptions, ValidationError, MatDataOptionsInterface, MongoDbPipeLineConfigInterface, InputAPIDataId, FormInputBasicOptionInterface, ScoaInterface, ScoaInnerInput, IAccountSegmentTreeKeys, IWorkflowDocumentPicker, IWorkflowDocumentPickerConfig, IWorkflowDocumentStepFilter, IDocumentPickerFilter, IDocumentPage, IDocumentQueryRequest, IDocumentReference, DocumentPickerFilterOperator, DocumentPickerFilterValueSource, DocumentPickerFilterValueType, DOCUMENT_PICKER_FILTER_OPERATORS, DOCUMENT_PICKER_FILTER_VALUE_SOURCES, DOCUMENT_PICKER_FILTER_VALUE_TYPES, workflowStepStatus, IWorkflowDocListCols, IWorkflowStepOption, JsDataTypes, AdjudicationSteps, IWorkflowAdjudicationInput, WorkflowAdjudicationScoreSheetValue, WorkflowAdjudicationMicroFlowReviewValue, WorkflowAdjudicationResponseElectedSupplierSelectionValue, ScoreSheetItem, AdjResponseReviewColumnMapping, OptionSelectTypes, ISelectInputInterface, MultipleInputAvailableOperations, RichTextEditorType, IRichTextEditor, };
@@ -1,6 +1,12 @@
1
1
  import { IIncludedSegmentConfig } from "../../formInput/index.js";
2
2
  /** Plain-union mirror of Angular Material's `MatFormFieldAppearance` (no `@angular/material` dependency). */
3
3
  type MatFormFieldAppearance = 'fill' | 'outline';
4
+ /**
5
+ * FROZEN legacy snapshot of the pre-upgrade rule shape. Deliberately NOT kept in
6
+ * step with the canonical {@link ConditionalInputRule} — this module describes
7
+ * the *old* document a form is upgraded FROM, so widening it would misdescribe
8
+ * the input of the upgrade.
9
+ */
4
10
  interface conditionalInputRule {
5
11
  formControlName: string;
6
12
  label: string;
@@ -24,6 +24,8 @@ const minimumInputRequiredSchema = Joi.object({
24
24
  });
25
25
  /** A flat `header name → scalar value` map (see `HeaderTemplate`). */
26
26
  const headerTemplateSchema = Joi.object().pattern(Joi.string(), Joi.alternatives().try(Joi.string().allow(''), Joi.number(), Joi.boolean()));
27
+ /** A flat `param name → scalar value` map (see `QueryTemplate`) — twin of the header schema. */
28
+ const queryTemplateSchema = Joi.object().pattern(Joi.string(), Joi.alternatives().try(Joi.string().allow(''), Joi.number(), Joi.boolean()));
27
29
  const APIDataFetchingConfigurationSchema = Joi.object({
28
30
  _id: Joi.string().required(),
29
31
  name: Joi.string().required(),
@@ -50,6 +52,13 @@ const APIDataFetchingConfigurationSchema = Joi.object({
50
52
  headerTemplate: headerTemplateSchema.optional(),
51
53
  // Headers captured from the selected endpoint; seeds the editor, never sent alone.
52
54
  capturedHeaders: headerTemplateSchema.optional(),
55
+ // Author-configured URL query params, values optionally carrying {{inputId}} tokens.
56
+ // Flat scalars only — a query param is text on the wire.
57
+ queryTemplate: queryTemplateSchema.optional(),
58
+ // Query params captured from the endpoint's URL; seeds the editor, never sent alone.
59
+ capturedQuery: queryTemplateSchema.optional(),
60
+ // The endpoint's Postman description, verbatim; display-only (Docs tab).
61
+ capturedDocs: Joi.string().allow('').optional(),
53
62
  backEndConfig: Joi.object({
54
63
  // Optional: a 'template'-mode fetch shapes its body from payloadTemplate and
55
64
  // carries no mapping; GET fetches never had one. Readers default it to [].
@@ -1,5 +1,7 @@
1
1
  import Joi from 'joi';
2
2
  export declare const IncludedSegmentConfigSchema: Joi.ObjectSchema<any>;
3
+ export declare const DualCashExclusionRuleSchema: Joi.ObjectSchema<any>;
4
+ export declare const DualCashExclusionConfigSchema: Joi.ObjectSchema<any>;
3
5
  export declare const MscoaInputConfigSchema: Joi.ObjectSchema<any>;
4
6
  export declare function validateMscoaInputConfig(value: any): {
5
7
  error: Joi.ValidationError | undefined;
@@ -12,6 +12,17 @@ export const IncludedSegmentConfigSchema = Joi.object({
12
12
  segmentExtension: Joi.boolean().required(),
13
13
  id: Joi.string().required()
14
14
  });
15
+ export const DualCashExclusionRuleSchema = Joi.object({
16
+ id: Joi.string().optional(),
17
+ pattern: Joi.string().required(),
18
+ flags: Joi.string().allow('').optional(),
19
+ segment: Joi.string().allow('').optional(),
20
+ description: Joi.string().allow('').optional()
21
+ });
22
+ export const DualCashExclusionConfigSchema = Joi.object({
23
+ rules: Joi.array().items(DualCashExclusionRuleSchema).optional(),
24
+ matchMode: Joi.string().valid('any', 'all').optional()
25
+ });
15
26
  export const MscoaInputConfigSchema = Joi.object({
16
27
  inputs: Joi.array().items(Joi.object().pattern(/./, Joi.any())).required(),
17
28
  segments: Joi.array().items(IncludedSegmentConfigSchema).min(1).required(),
@@ -19,7 +30,8 @@ export const MscoaInputConfigSchema = Joi.object({
19
30
  accountValueLabel: Joi.string().required(),
20
31
  accountingBasis: Joi.string().valid(...Object.values(AccountingBasis)).optional(),
21
32
  extensionAccountsForSegments: Joi.array().items(Joi.string()).optional(),
22
- showAllSegments: Joi.boolean().required()
33
+ showAllSegments: Joi.boolean().required(),
34
+ dualCashExclusion: DualCashExclusionConfigSchema.optional()
23
35
  });
24
36
  export function validateMscoaInputConfig(value) {
25
37
  const { error, value: validatedValue } = MscoaInputConfigSchema.validate(value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-t-forms-types",
3
- "version": "0.0.27",
3
+ "version": "0.0.29",
4
4
  "description": "Typings and interfaces for the ngx-t-forms library for dynamic forms.",
5
5
  "keywords": [
6
6
  "typings",
@@ -1,31 +0,0 @@
1
- declare enum EditType {
2
- Input = "input",
3
- Toggle = "toggle",
4
- ChipSelect = "chipSelect",
5
- OptionSelect = "optionSelect",
6
- Range = "range",
7
- MinMaxValue = "minMaxValue",
8
- DocumentPropertyPicker = "documentPropertyPicker",
9
- ManualDocumentPropertyPicker = "manualDocumentPropertyPicker",
10
- FormInputSelector = "formInputSelector",
11
- SelectAForm = "selectAForm",
12
- WorkflowPicker = "workflowPicker",
13
- WorkflowStepPicker = "workflowStepPicker",
14
- WorkflowDocumentListLabels = "workflowDocumentListLabels",
15
- DecisionGateSettings = "decisionGateSettings",
16
- EscalateTask = "escalateTask",
17
- AddMembers = "addMembers",
18
- MultipleInputConfigurations = "multipleInputConfigurations",
19
- TableConfigSetup = "tableConfigSetup",
20
- SelectionOptions = "selectionOptions",
21
- ApiValueAccessRules = "apiValueAccessRules",
22
- RequiredInputs = "requiredInputs",
23
- ChartAxis = "chartAxis",
24
- Series = "series",
25
- MongoPipelineBuilder = "mongoPipelineBuilder",
26
- ApiCall = "apiCall",
27
- ConfigMscoaSegments = "configMscoaSegments",
28
- ConfigMscoaAdditionalInputs = "configMscoaAdditionalInputs",
29
- Validators = "validators",
30
- CalculatedFieldRules = "calculatedFieldRules"
31
- }
@@ -1,40 +0,0 @@
1
- "use strict";
2
- var EditType;
3
- (function (EditType) {
4
- // Basic Input Types
5
- EditType["Input"] = "input";
6
- EditType["Toggle"] = "toggle";
7
- EditType["ChipSelect"] = "chipSelect";
8
- EditType["OptionSelect"] = "optionSelect";
9
- EditType["Range"] = "range";
10
- EditType["MinMaxValue"] = "minMaxValue";
11
- // Document/Form Pickers
12
- EditType["DocumentPropertyPicker"] = "documentPropertyPicker";
13
- EditType["ManualDocumentPropertyPicker"] = "manualDocumentPropertyPicker";
14
- EditType["FormInputSelector"] = "formInputSelector";
15
- EditType["SelectAForm"] = "selectAForm";
16
- // Workflow Related
17
- EditType["WorkflowPicker"] = "workflowPicker";
18
- EditType["WorkflowStepPicker"] = "workflowStepPicker";
19
- EditType["WorkflowDocumentListLabels"] = "workflowDocumentListLabels";
20
- EditType["DecisionGateSettings"] = "decisionGateSettings";
21
- EditType["EscalateTask"] = "escalateTask";
22
- EditType["AddMembers"] = "addMembers";
23
- // Multiple Configurations
24
- EditType["MultipleInputConfigurations"] = "multipleInputConfigurations";
25
- EditType["TableConfigSetup"] = "tableConfigSetup";
26
- EditType["SelectionOptions"] = "selectionOptions";
27
- EditType["ApiValueAccessRules"] = "apiValueAccessRules";
28
- EditType["RequiredInputs"] = "requiredInputs";
29
- // Chart/Report Related
30
- EditType["ChartAxis"] = "chartAxis";
31
- EditType["Series"] = "series";
32
- EditType["MongoPipelineBuilder"] = "mongoPipelineBuilder";
33
- EditType["ApiCall"] = "apiCall";
34
- // MSCOA Related
35
- EditType["ConfigMscoaSegments"] = "configMscoaSegments";
36
- EditType["ConfigMscoaAdditionalInputs"] = "configMscoaAdditionalInputs";
37
- // Validation/Rules
38
- EditType["Validators"] = "validators";
39
- EditType["CalculatedFieldRules"] = "calculatedFieldRules";
40
- })(EditType || (EditType = {}));