@gcforms/types 1.0.0 → 1.0.2

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/index.d.mts CHANGED
@@ -158,6 +158,13 @@ type ClosedDetails = {
158
158
  messageFr?: string;
159
159
  };
160
160
  type PublicFormRecord = TypeOmit<FormRecord, "name" | "deliveryOption">;
161
+ declare const FormStatus: {
162
+ readonly ERROR: "Error";
163
+ readonly FILE_ERROR: "FileError";
164
+ readonly FORM_CLOSED_ERROR: "FormClosedError";
165
+ readonly SERVER_ID_ERROR: "ServerIDError";
166
+ };
167
+ type FormStatus = (typeof FormStatus)[keyof typeof FormStatus];
161
168
 
162
169
  type Responses = {
163
170
  [key: string]: Response;
@@ -169,4 +176,4 @@ type FileInputResponse = {
169
176
  based64EncodedFile: string | null;
170
177
  };
171
178
 
172
- export { type AddressComponents, type BrandProperties, type ClosedDetails, type ConditionalRule, type DeliveryOption, type ElementProperties, type FileInputResponse, type FormElement, FormElementTypes, type FormProperties, type FormPurpose, type FormRecord, type Group, type PropertyChoices, type PublicFormRecord, type Response, type Responses, type SecurityAttribute, type ValidationProperties, type dynamicRowType };
179
+ export { type AddressComponents, type BrandProperties, type ClosedDetails, type ConditionalRule, type DeliveryOption, type ElementProperties, type FileInputResponse, type FormElement, FormElementTypes, type FormProperties, type FormPurpose, type FormRecord, FormStatus, type Group, type PropertyChoices, type PublicFormRecord, type Response, type Responses, type SecurityAttribute, type ValidationProperties, type dynamicRowType };
package/dist/index.d.ts CHANGED
@@ -158,6 +158,13 @@ type ClosedDetails = {
158
158
  messageFr?: string;
159
159
  };
160
160
  type PublicFormRecord = TypeOmit<FormRecord, "name" | "deliveryOption">;
161
+ declare const FormStatus: {
162
+ readonly ERROR: "Error";
163
+ readonly FILE_ERROR: "FileError";
164
+ readonly FORM_CLOSED_ERROR: "FormClosedError";
165
+ readonly SERVER_ID_ERROR: "ServerIDError";
166
+ };
167
+ type FormStatus = (typeof FormStatus)[keyof typeof FormStatus];
161
168
 
162
169
  type Responses = {
163
170
  [key: string]: Response;
@@ -169,4 +176,4 @@ type FileInputResponse = {
169
176
  based64EncodedFile: string | null;
170
177
  };
171
178
 
172
- export { type AddressComponents, type BrandProperties, type ClosedDetails, type ConditionalRule, type DeliveryOption, type ElementProperties, type FileInputResponse, type FormElement, FormElementTypes, type FormProperties, type FormPurpose, type FormRecord, type Group, type PropertyChoices, type PublicFormRecord, type Response, type Responses, type SecurityAttribute, type ValidationProperties, type dynamicRowType };
179
+ export { type AddressComponents, type BrandProperties, type ClosedDetails, type ConditionalRule, type DeliveryOption, type ElementProperties, type FileInputResponse, type FormElement, FormElementTypes, type FormProperties, type FormPurpose, type FormRecord, FormStatus, type Group, type PropertyChoices, type PublicFormRecord, type Response, type Responses, type SecurityAttribute, type ValidationProperties, type dynamicRowType };
package/dist/index.js CHANGED
@@ -20,7 +20,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index.ts
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
- FormElementTypes: () => FormElementTypes
23
+ FormElementTypes: () => FormElementTypes,
24
+ FormStatus: () => FormStatus
24
25
  });
25
26
  module.exports = __toCommonJS(index_exports);
26
27
 
@@ -45,7 +46,14 @@ var FormElementTypes = /* @__PURE__ */ ((FormElementTypes2) => {
45
46
  FormElementTypes2["formattedDate"] = "formattedDate";
46
47
  return FormElementTypes2;
47
48
  })(FormElementTypes || {});
49
+ var FormStatus = {
50
+ ERROR: "Error",
51
+ FILE_ERROR: "FileError",
52
+ FORM_CLOSED_ERROR: "FormClosedError",
53
+ SERVER_ID_ERROR: "ServerIDError"
54
+ };
48
55
  // Annotate the CommonJS export names for ESM import in node:
49
56
  0 && (module.exports = {
50
- FormElementTypes
57
+ FormElementTypes,
58
+ FormStatus
51
59
  });
package/dist/index.mjs CHANGED
@@ -19,6 +19,13 @@ var FormElementTypes = /* @__PURE__ */ ((FormElementTypes2) => {
19
19
  FormElementTypes2["formattedDate"] = "formattedDate";
20
20
  return FormElementTypes2;
21
21
  })(FormElementTypes || {});
22
+ var FormStatus = {
23
+ ERROR: "Error",
24
+ FILE_ERROR: "FileError",
25
+ FORM_CLOSED_ERROR: "FormClosedError",
26
+ SERVER_ID_ERROR: "ServerIDError"
27
+ };
22
28
  export {
23
- FormElementTypes
29
+ FormElementTypes,
30
+ FormStatus
24
31
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gcforms/types",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "author": "Canadian Digital Service",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -21,11 +21,13 @@
21
21
  ],
22
22
  "scripts": {
23
23
  "build": "tsup src/index.ts --format cjs,esm --dts --clean",
24
- "prepare": "yarn && yarn build"
24
+ "prepack": "yarn build",
25
+ "types:prepack": "yarn prepack"
25
26
  },
26
27
  "devDependencies": {
27
28
  "@types/node": "^20.11.6",
28
29
  "tsup": "^8.3.6",
29
30
  "typescript": "^5.5.2"
30
- }
31
- }
31
+ },
32
+ "packageManager": "yarn@4.6.0"
33
+ }