@gcforms/types 1.0.16 → 1.0.18

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/CHANGELOG.md CHANGED
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.0.18] - 2025-08-25
9
+
10
+ - Add ChoiceRule export
11
+
12
+ ## [1.0.17] - 2025-08-15
13
+
14
+ - Add FileInput type
8
15
 
9
16
  ## [1.0.16] - 2025-08-13
10
17
 
package/dist/index.d.mts CHANGED
@@ -1,3 +1,13 @@
1
+ type Responses = {
2
+ [key: string]: Response;
3
+ };
4
+ type Response = string | string[] | number | Record<string, unknown>[] | FileInputResponse | FileInputResponse[] | DateObject | Record<string, unknown>;
5
+ type FileInputResponse = {
6
+ name: string | null;
7
+ size: number | null;
8
+ content: ArrayBuffer | null;
9
+ };
10
+
1
11
  type TypeOmit<Type, Key extends PropertyKey> = {
2
12
  [Property in keyof Type as Exclude<Property, Key>]: Type[Property];
3
13
  };
@@ -21,6 +31,10 @@ type Group = {
21
31
  };
22
32
  type GroupsType = Record<string, Group>;
23
33
  type FormValues = Record<string, string | string[]>;
34
+ type ChoiceRule = {
35
+ elementId: string;
36
+ choiceId: string;
37
+ };
24
38
  type NextActionRule = {
25
39
  groupId: string;
26
40
  choiceId: string;
@@ -198,16 +212,11 @@ declare enum DatePart {
198
212
  MM = "month",
199
213
  YYYY = "year"
200
214
  }
201
-
202
- type Responses = {
203
- [key: string]: Response;
204
- };
205
- type Response = string | string[] | number | Record<string, unknown>[] | FileInputResponse | FileInputResponse[] | DateObject | Record<string, unknown>;
206
- type FileInputResponse = {
207
- name: string | null;
208
- size: number | null;
209
- content: ArrayBuffer | null;
210
- };
215
+ interface FileInput extends FileInputResponse {
216
+ name: string;
217
+ size: number;
218
+ content: ArrayBuffer;
219
+ }
211
220
 
212
221
  interface InputFieldProps {
213
222
  id?: string;
@@ -290,4 +299,4 @@ interface AddressCompleteLabels {
290
299
  country: string;
291
300
  }
292
301
 
293
- export { AddressCompleNext, type AddressCompleteChoice, type AddressCompleteLabels, type AddressCompleteProps, type AddressCompleteResult, type AddressComponents, type AddressElements, type BrandProperties, type ClosedDetails, type ConditionalRule, type DateFormat, type DateObject, DatePart, type DeliveryOption, type ElementProperties, type FileInputResponse, type FormElement, FormElementTypes, type FormProperties, type FormPurpose, type FormRecord, FormStatus, type FormValues, type Group, type GroupsType, NotificationsInterval, NotificationsIntervalDefault, type PropertyChoices, type PublicFormRecord, type Response, type Responses, type SecurityAttribute, SortOption, type SortValue, type ValidationProperties, type dynamicRowType };
302
+ export { AddressCompleNext, type AddressCompleteChoice, type AddressCompleteLabels, type AddressCompleteProps, type AddressCompleteResult, type AddressComponents, type AddressElements, type BrandProperties, type ChoiceRule, type ClosedDetails, type ConditionalRule, type DateFormat, type DateObject, DatePart, type DeliveryOption, type ElementProperties, type FileInput, type FileInputResponse, type FormElement, FormElementTypes, type FormProperties, type FormPurpose, type FormRecord, FormStatus, type FormValues, type Group, type GroupsType, NotificationsInterval, NotificationsIntervalDefault, type PropertyChoices, type PublicFormRecord, type Response, type Responses, type SecurityAttribute, SortOption, type SortValue, type ValidationProperties, type dynamicRowType };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,13 @@
1
+ type Responses = {
2
+ [key: string]: Response;
3
+ };
4
+ type Response = string | string[] | number | Record<string, unknown>[] | FileInputResponse | FileInputResponse[] | DateObject | Record<string, unknown>;
5
+ type FileInputResponse = {
6
+ name: string | null;
7
+ size: number | null;
8
+ content: ArrayBuffer | null;
9
+ };
10
+
1
11
  type TypeOmit<Type, Key extends PropertyKey> = {
2
12
  [Property in keyof Type as Exclude<Property, Key>]: Type[Property];
3
13
  };
@@ -21,6 +31,10 @@ type Group = {
21
31
  };
22
32
  type GroupsType = Record<string, Group>;
23
33
  type FormValues = Record<string, string | string[]>;
34
+ type ChoiceRule = {
35
+ elementId: string;
36
+ choiceId: string;
37
+ };
24
38
  type NextActionRule = {
25
39
  groupId: string;
26
40
  choiceId: string;
@@ -198,16 +212,11 @@ declare enum DatePart {
198
212
  MM = "month",
199
213
  YYYY = "year"
200
214
  }
201
-
202
- type Responses = {
203
- [key: string]: Response;
204
- };
205
- type Response = string | string[] | number | Record<string, unknown>[] | FileInputResponse | FileInputResponse[] | DateObject | Record<string, unknown>;
206
- type FileInputResponse = {
207
- name: string | null;
208
- size: number | null;
209
- content: ArrayBuffer | null;
210
- };
215
+ interface FileInput extends FileInputResponse {
216
+ name: string;
217
+ size: number;
218
+ content: ArrayBuffer;
219
+ }
211
220
 
212
221
  interface InputFieldProps {
213
222
  id?: string;
@@ -290,4 +299,4 @@ interface AddressCompleteLabels {
290
299
  country: string;
291
300
  }
292
301
 
293
- export { AddressCompleNext, type AddressCompleteChoice, type AddressCompleteLabels, type AddressCompleteProps, type AddressCompleteResult, type AddressComponents, type AddressElements, type BrandProperties, type ClosedDetails, type ConditionalRule, type DateFormat, type DateObject, DatePart, type DeliveryOption, type ElementProperties, type FileInputResponse, type FormElement, FormElementTypes, type FormProperties, type FormPurpose, type FormRecord, FormStatus, type FormValues, type Group, type GroupsType, NotificationsInterval, NotificationsIntervalDefault, type PropertyChoices, type PublicFormRecord, type Response, type Responses, type SecurityAttribute, SortOption, type SortValue, type ValidationProperties, type dynamicRowType };
302
+ export { AddressCompleNext, type AddressCompleteChoice, type AddressCompleteLabels, type AddressCompleteProps, type AddressCompleteResult, type AddressComponents, type AddressElements, type BrandProperties, type ChoiceRule, type ClosedDetails, type ConditionalRule, type DateFormat, type DateObject, DatePart, type DeliveryOption, type ElementProperties, type FileInput, type FileInputResponse, type FormElement, FormElementTypes, type FormProperties, type FormPurpose, type FormRecord, FormStatus, type FormValues, type Group, type GroupsType, NotificationsInterval, NotificationsIntervalDefault, type PropertyChoices, type PublicFormRecord, type Response, type Responses, type SecurityAttribute, SortOption, type SortValue, type ValidationProperties, type dynamicRowType };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gcforms/types",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "author": "Canadian Digital Service",
5
5
  "license": "MIT",
6
6
  "publishConfig": {