@finsys/core 1.5.1 → 2.0.0

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.cts CHANGED
@@ -432,4 +432,14 @@ declare function buildFileFieldTables(ihsData: Record<string, unknown>): Record<
432
432
  declare function processIhsDetails(ihsData: Record<string, unknown>): IhsFieldDetail[];
433
433
  declare function groupDetailsByCategory(details: IhsFieldDetail[]): IhsDetailCategory[];
434
434
 
435
- export { BASE_FIELD_SPECS, BasicFormField, type Category, type Choice, DEFAULT_VALIDATOR_DEFINITIONS, type DropdownOption, type EditorValidator, FIELD_TYPE_DEFINITIONS, type FieldData, type FieldGroup, type FieldReference, FieldType, type FileFieldTableData, type FileFieldTableItem, FileFieldTableType, FileFormField, FormField, FormFieldCategory, type FormFieldInputType, type FormFieldType, type FormFieldTypeDefinitions, FormFieldValidator, FormSpec, type FormValidatorDefinitions, type IhsDetailCategory, type IhsFieldDetail, IhsValueFormat, type PageConfig, type RHFSchemaOutput, type RHFStep, type ResolvedField, type SurveyElementJSON, type SurveyJSON, type SurveyPageJSON, type UnifiedFormConfig, type Validator, applyDynamicTitles, buildFileFieldTables, evaluateExpression, extractTimePeriods, generateRHFSchema, generateSurveyJson, getBaseCategories, getBaseFieldNames, getBaseFieldSpecMap, getBaseFieldSpecs, getCategoryName, getDisplayName, getDisplayNames, getPastMonthLabel, getPastYearLabel, getStepDefaultValues, getStepSchema, groupColumnsByTimePeriod, groupDetailsByCategory, groupFieldsByCategory, groupFieldsByPattern, processIhsDetails, resolvePageFields, validateFormConfig, validateFormSpec, validatePagesConfig };
435
+ /**
436
+ * Program access roles — shared across finsys-api and finhub-adonisjs.
437
+ * Values must match the database enum column in the `programaccess` table.
438
+ */
439
+ declare enum Role {
440
+ ADMIN = "Admin",
441
+ BORROWER_AGENT = "Borrower Agent",
442
+ LENDER_AGENT = "Lender Agent"
443
+ }
444
+
445
+ export { BASE_FIELD_SPECS, BasicFormField, type Category, type Choice, DEFAULT_VALIDATOR_DEFINITIONS, type DropdownOption, type EditorValidator, FIELD_TYPE_DEFINITIONS, type FieldData, type FieldGroup, type FieldReference, FieldType, type FileFieldTableData, type FileFieldTableItem, FileFieldTableType, FileFormField, FormField, FormFieldCategory, type FormFieldInputType, type FormFieldType, type FormFieldTypeDefinitions, FormFieldValidator, FormSpec, type FormValidatorDefinitions, type IhsDetailCategory, type IhsFieldDetail, IhsValueFormat, type PageConfig, type RHFSchemaOutput, type RHFStep, type ResolvedField, Role, type SurveyElementJSON, type SurveyJSON, type SurveyPageJSON, type UnifiedFormConfig, type Validator, applyDynamicTitles, buildFileFieldTables, evaluateExpression, extractTimePeriods, generateRHFSchema, generateSurveyJson, getBaseCategories, getBaseFieldNames, getBaseFieldSpecMap, getBaseFieldSpecs, getCategoryName, getDisplayName, getDisplayNames, getPastMonthLabel, getPastYearLabel, getStepDefaultValues, getStepSchema, groupColumnsByTimePeriod, groupDetailsByCategory, groupFieldsByCategory, groupFieldsByPattern, processIhsDetails, resolvePageFields, validateFormConfig, validateFormSpec, validatePagesConfig };
package/dist/index.d.ts CHANGED
@@ -432,4 +432,14 @@ declare function buildFileFieldTables(ihsData: Record<string, unknown>): Record<
432
432
  declare function processIhsDetails(ihsData: Record<string, unknown>): IhsFieldDetail[];
433
433
  declare function groupDetailsByCategory(details: IhsFieldDetail[]): IhsDetailCategory[];
434
434
 
435
- export { BASE_FIELD_SPECS, BasicFormField, type Category, type Choice, DEFAULT_VALIDATOR_DEFINITIONS, type DropdownOption, type EditorValidator, FIELD_TYPE_DEFINITIONS, type FieldData, type FieldGroup, type FieldReference, FieldType, type FileFieldTableData, type FileFieldTableItem, FileFieldTableType, FileFormField, FormField, FormFieldCategory, type FormFieldInputType, type FormFieldType, type FormFieldTypeDefinitions, FormFieldValidator, FormSpec, type FormValidatorDefinitions, type IhsDetailCategory, type IhsFieldDetail, IhsValueFormat, type PageConfig, type RHFSchemaOutput, type RHFStep, type ResolvedField, type SurveyElementJSON, type SurveyJSON, type SurveyPageJSON, type UnifiedFormConfig, type Validator, applyDynamicTitles, buildFileFieldTables, evaluateExpression, extractTimePeriods, generateRHFSchema, generateSurveyJson, getBaseCategories, getBaseFieldNames, getBaseFieldSpecMap, getBaseFieldSpecs, getCategoryName, getDisplayName, getDisplayNames, getPastMonthLabel, getPastYearLabel, getStepDefaultValues, getStepSchema, groupColumnsByTimePeriod, groupDetailsByCategory, groupFieldsByCategory, groupFieldsByPattern, processIhsDetails, resolvePageFields, validateFormConfig, validateFormSpec, validatePagesConfig };
435
+ /**
436
+ * Program access roles — shared across finsys-api and finhub-adonisjs.
437
+ * Values must match the database enum column in the `programaccess` table.
438
+ */
439
+ declare enum Role {
440
+ ADMIN = "Admin",
441
+ BORROWER_AGENT = "Borrower Agent",
442
+ LENDER_AGENT = "Lender Agent"
443
+ }
444
+
445
+ export { BASE_FIELD_SPECS, BasicFormField, type Category, type Choice, DEFAULT_VALIDATOR_DEFINITIONS, type DropdownOption, type EditorValidator, FIELD_TYPE_DEFINITIONS, type FieldData, type FieldGroup, type FieldReference, FieldType, type FileFieldTableData, type FileFieldTableItem, FileFieldTableType, FileFormField, FormField, FormFieldCategory, type FormFieldInputType, type FormFieldType, type FormFieldTypeDefinitions, FormFieldValidator, FormSpec, type FormValidatorDefinitions, type IhsDetailCategory, type IhsFieldDetail, IhsValueFormat, type PageConfig, type RHFSchemaOutput, type RHFStep, type ResolvedField, Role, type SurveyElementJSON, type SurveyJSON, type SurveyPageJSON, type UnifiedFormConfig, type Validator, applyDynamicTitles, buildFileFieldTables, evaluateExpression, extractTimePeriods, generateRHFSchema, generateSurveyJson, getBaseCategories, getBaseFieldNames, getBaseFieldSpecMap, getBaseFieldSpecs, getCategoryName, getDisplayName, getDisplayNames, getPastMonthLabel, getPastYearLabel, getStepDefaultValues, getStepSchema, groupColumnsByTimePeriod, groupDetailsByCategory, groupFieldsByCategory, groupFieldsByPattern, processIhsDetails, resolvePageFields, validateFormConfig, validateFormSpec, validatePagesConfig };
package/dist/index.js CHANGED
@@ -8381,7 +8381,7 @@ var form_field_base_specs_default = {
8381
8381
  category: "13"
8382
8382
  },
8383
8383
  {
8384
- name: "ssm",
8384
+ name: "form9",
8385
8385
  displayName: "Form 9 / Section 17 / Form D",
8386
8386
  type: "file",
8387
8387
  enableIf: "{formOfDisclosure} contains 'consented'",
@@ -8393,7 +8393,7 @@ var form_field_base_specs_default = {
8393
8393
  category: "13"
8394
8394
  },
8395
8395
  {
8396
- name: "ssm_business_information",
8396
+ name: "ssm",
8397
8397
  displayName: "SSM Company Profile",
8398
8398
  type: "file",
8399
8399
  enableIf: "{formOfDisclosure} contains 'consented'",
@@ -8403,6 +8403,8 @@ var form_field_base_specs_default = {
8403
8403
  "ssmIncorporatedDate",
8404
8404
  "businessCommencementDate",
8405
8405
  "businessNature",
8406
+ "ssmCompanyEntityType",
8407
+ "ssmPaidUpCapital",
8406
8408
  "companyStatus",
8407
8409
  "shareholders",
8408
8410
  "directors",
@@ -8416,7 +8418,7 @@ var form_field_base_specs_default = {
8416
8418
  category: "13"
8417
8419
  },
8418
8420
  {
8419
- name: "ic_front",
8421
+ name: "ic",
8420
8422
  displayName: "Identification Card (Front)",
8421
8423
  type: "file",
8422
8424
  enableIf: "{formOfDisclosure} contains 'consented'",
@@ -9257,6 +9259,8 @@ var form_field_display_names_default = {
9257
9259
  ssmCompanyName: "Company Name (SSM)",
9258
9260
  ssmCompanyRegNo: "Registration No. (SSM)",
9259
9261
  ssmIncorporatedDate: "Incorporated Date (SSM)",
9262
+ ssmCompanyEntityType: "Entity Type (SSM)",
9263
+ ssmPaidUpCapital: "Paid-Up Capital (SSM)",
9260
9264
  businessCommencementDate: "Business Commencement Date",
9261
9265
  businessNature: "Business Nature",
9262
9266
  companyStatus: "Company Status",
@@ -9317,9 +9321,9 @@ var FIELD_GROUP_PREFIXES = [
9317
9321
  ["financials", "financials"],
9318
9322
  ["epf_statement", "epf_statements"],
9319
9323
  ["payslip_statement", "payslip_statements"],
9320
- ["ssm_business_information", "ssm_company_profile"],
9321
- ["ssm", "ssm_documents"],
9322
- ["ic_", "ic_documents"]
9324
+ ["ssm", "ssm_company_profile"],
9325
+ ["form9", "form9"],
9326
+ ["ic", "ic"]
9323
9327
  ];
9324
9328
  function groupFieldsByPattern(fields) {
9325
9329
  const groups = {};
@@ -9342,9 +9346,9 @@ var GROUP_DISPLAY_NAMES = {
9342
9346
  financials: "Audited Financial Statements",
9343
9347
  epf_statements: "EPF Statements",
9344
9348
  payslip_statements: "Payslip Statements",
9345
- ssm_documents: "Form 9 / Section 17 / Form D",
9349
+ form9: "Form 9 / Section 17 / Form D",
9346
9350
  ssm_company_profile: "SSM Company Profile",
9347
- ic_documents: "Identification Card"
9351
+ ic: "Identification Card"
9348
9352
  };
9349
9353
  function isNumericField(fieldName) {
9350
9354
  const patterns = [
@@ -9535,6 +9539,14 @@ function groupDetailsByCategory(details) {
9535
9539
  }))
9536
9540
  }));
9537
9541
  }
9542
+
9543
+ // src/roles.ts
9544
+ var Role = /* @__PURE__ */ ((Role2) => {
9545
+ Role2["ADMIN"] = "Admin";
9546
+ Role2["BORROWER_AGENT"] = "Borrower Agent";
9547
+ Role2["LENDER_AGENT"] = "Lender Agent";
9548
+ return Role2;
9549
+ })(Role || {});
9538
9550
  export {
9539
9551
  BASE_FIELD_SPECS,
9540
9552
  BasicFormField,
@@ -9548,6 +9560,7 @@ export {
9548
9560
  FormFieldValidator,
9549
9561
  FormSpec,
9550
9562
  IhsValueFormat,
9563
+ Role,
9551
9564
  applyDynamicTitles,
9552
9565
  buildFileFieldTables,
9553
9566
  evaluateExpression,