@zeniai/client-epic-state 5.0.81 → 5.0.82-beta0ND

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.
Files changed (125) hide show
  1. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  2. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
  3. package/lib/entity/account/accountSelector.d.ts +9 -0
  4. package/lib/entity/account/accountSelector.js +14 -1
  5. package/lib/entity/account/accountState.d.ts +1 -1
  6. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  7. package/lib/entity/class/classReducer.d.ts +4 -4
  8. package/lib/entity/class/classState.d.ts +1 -1
  9. package/lib/entity/company/companyPayload.d.ts +2 -0
  10. package/lib/entity/company/companyPayload.js +2 -0
  11. package/lib/entity/company/companyStateTypes.d.ts +2 -0
  12. package/lib/entity/forecast/forecastState.d.ts +1 -1
  13. package/lib/entity/paymentAccount/paymentAccountSelector.d.ts +1 -0
  14. package/lib/entity/paymentAccount/paymentAccountSelector.js +4 -0
  15. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  16. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  17. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  18. package/lib/entity/sectionProjectView/sectionProjectView.d.ts +1 -1
  19. package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +2 -2
  20. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  21. package/lib/entity/snackbar/snackbarTypes.js +1 -0
  22. package/lib/entity/tenant/clearAllEpic.d.ts +2 -1
  23. package/lib/entity/tenant/clearAllEpic.js +2 -0
  24. package/lib/entity/tenant/epic/deleteConnectionEpic.d.ts +1 -1
  25. package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.d.ts +21 -0
  26. package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.js +54 -0
  27. package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.d.ts +1 -1
  28. package/lib/entity/tenant/epic/saveConnectorCredentialsEpic.d.ts +3 -3
  29. package/lib/entity/tenant/epic/saveOAuthConnectionEpic.d.ts +1 -1
  30. package/lib/entity/tenant/tenantPayload.d.ts +1 -0
  31. package/lib/entity/tenant/tenantReducer.d.ts +38 -25
  32. package/lib/entity/tenant/tenantReducer.js +65 -5
  33. package/lib/entity/tenant/tenantState.d.ts +1 -0
  34. package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +4 -0
  35. package/lib/entity/transaction/payloadTypes/transactionPayload.js +18 -10
  36. package/lib/entity/transaction/stateTypes/transaction.d.ts +3 -0
  37. package/lib/epic.d.ts +6 -1
  38. package/lib/epic.js +7 -1
  39. package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
  40. package/lib/esm/entity/account/accountSelector.js +11 -0
  41. package/lib/esm/entity/company/companyPayload.js +2 -0
  42. package/lib/esm/entity/paymentAccount/paymentAccountSelector.js +3 -0
  43. package/lib/esm/entity/snackbar/snackbarTypes.js +1 -0
  44. package/lib/esm/entity/tenant/clearAllEpic.js +2 -0
  45. package/lib/esm/entity/tenant/epic/initEmailConnectOAuthEpic.js +50 -0
  46. package/lib/esm/entity/tenant/tenantReducer.js +63 -3
  47. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +18 -10
  48. package/lib/esm/epic.js +7 -1
  49. package/lib/esm/index.js +12 -8
  50. package/lib/esm/reducer.js +3 -0
  51. package/lib/esm/view/createTransferEntry/createTransferEntryReducer.js +82 -0
  52. package/lib/esm/view/createTransferEntry/createTransferEntrySelector.js +64 -0
  53. package/lib/esm/view/createTransferEntry/createTransferEntryState.js +17 -0
  54. package/lib/esm/view/createTransferEntry/epics/createTransferEntryEpic.js +130 -0
  55. package/lib/esm/view/createTransferEntry/epics/fetchTransferAccountsEpic.js +36 -0
  56. package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +13 -1
  57. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +9 -1
  58. package/lib/esm/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +40 -0
  59. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewReducer.js +93 -50
  60. package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +49 -0
  61. package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +58 -0
  62. package/lib/esm/view/spendManagement/commonSetup/kycKybAutofillActions.js +12 -0
  63. package/lib/esm/view/spendManagement/commonSetup/kycKybParseMapper.js +205 -0
  64. package/lib/esm/view/spendManagement/commonSetup/setupViewReducer.js +71 -52
  65. package/lib/esm/view/spendManagement/commonSetup/setupViewSelector.js +2 -0
  66. package/lib/esm/view/spendManagement/commonSetup/types/kycKybAutofill.js +28 -0
  67. package/lib/esm/view/transactionDetail/transactionDetailSelector.js +6 -1
  68. package/lib/index.d.ts +13 -8
  69. package/lib/index.js +56 -33
  70. package/lib/reducer.d.ts +3 -0
  71. package/lib/reducer.js +3 -0
  72. package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
  73. package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
  74. package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
  75. package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
  76. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
  77. package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
  78. package/lib/view/createTransferEntry/createTransferEntryReducer.d.ts +32 -0
  79. package/lib/view/createTransferEntry/createTransferEntryReducer.js +86 -0
  80. package/lib/view/createTransferEntry/createTransferEntrySelector.d.ts +39 -0
  81. package/lib/view/createTransferEntry/createTransferEntrySelector.js +69 -0
  82. package/lib/view/createTransferEntry/createTransferEntryState.d.ts +30 -0
  83. package/lib/view/createTransferEntry/createTransferEntryState.js +20 -0
  84. package/lib/view/createTransferEntry/epics/createTransferEntryEpic.d.ts +11 -0
  85. package/lib/view/createTransferEntry/epics/createTransferEntryEpic.js +134 -0
  86. package/lib/view/createTransferEntry/epics/fetchTransferAccountsEpic.d.ts +14 -0
  87. package/lib/view/createTransferEntry/epics/fetchTransferAccountsEpic.js +40 -0
  88. package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
  89. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  90. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +3 -1
  91. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +14 -2
  92. package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +4 -1
  93. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.d.ts +1 -0
  94. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +11 -2
  95. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  96. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
  97. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.d.ts +9 -0
  98. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +44 -0
  99. package/lib/view/onboardingView/customerView/onboardingCustomerViewPayload.d.ts +3 -0
  100. package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.d.ts +28 -3
  101. package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.js +94 -51
  102. package/lib/view/onboardingView/customerView/onboardingCustomerViewState.d.ts +11 -0
  103. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
  104. package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
  105. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.d.ts +8 -0
  106. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +53 -0
  107. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.d.ts +8 -0
  108. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +62 -0
  109. package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.d.ts +27 -0
  110. package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.js +15 -0
  111. package/lib/view/spendManagement/commonSetup/kycKybParseMapper.d.ts +24 -0
  112. package/lib/view/spendManagement/commonSetup/kycKybParseMapper.js +213 -0
  113. package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +24 -2
  114. package/lib/view/spendManagement/commonSetup/setupViewReducer.js +72 -53
  115. package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +4 -0
  116. package/lib/view/spendManagement/commonSetup/setupViewSelector.js +2 -0
  117. package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +12 -0
  118. package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.d.ts +125 -0
  119. package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.js +32 -0
  120. package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
  121. package/lib/view/topEx/topExSelector.d.ts +1 -1
  122. package/lib/view/transactionDetail/transactionDetailPayload.d.ts +1 -1
  123. package/lib/view/transactionDetail/transactionDetailSelector.d.ts +6 -1
  124. package/lib/view/transactionDetail/transactionDetailSelector.js +6 -1
  125. package/package.json +34 -62
@@ -1,66 +1,32 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.clearSetupView = exports.clearSetupViewDataInLocalStore = exports.saveIndustryAndIncDateInLocalStore = exports.verifyOtpFailureSpendManagementSetUp = exports.verifyOtpSuccessSpendManagementSetUp = exports.verifyOtpSpendManagementSetUp = exports.sendOtpFailureSpendManagementSetUp = exports.sendOtpSuccessSpendManagementSetUp = exports.resendOtpSpendManagementSetUp = exports.sendOtpSpendManagementSetUp = exports.saveTreasuryAdditionalDocumentsInLocalStore = exports.saveCompnayOfficerAdditionalDocumentsInLocalStore = exports.saveCompnayOfficerPhoneInLocalStore = exports.saveSetupViewDataInLocalStore = exports.updateSetupViewLocalStoreData = exports.updateSelectedCompanyOfficer = exports.updateBusinessVerificationDetailsFailure = exports.updateBusinessVerificationDetailsSuccess = exports.updateBusinessVerificationDetails = exports.enableSetupFailure = exports.enableSetupSuccess = exports.enableSetup = exports.initialState = void 0;
4
+ exports.clearKycKybAutofillForSetup = exports.applyKybDocumentAutofillForSetup = exports.applyKycDocumentAutofillForSetup = exports.clearSetupView = exports.clearSetupViewDataInLocalStore = exports.saveIndustryAndIncDateInLocalStore = exports.verifyOtpFailureSpendManagementSetUp = exports.verifyOtpSuccessSpendManagementSetUp = exports.verifyOtpSpendManagementSetUp = exports.sendOtpFailureSpendManagementSetUp = exports.sendOtpSuccessSpendManagementSetUp = exports.resendOtpSpendManagementSetUp = exports.sendOtpSpendManagementSetUp = exports.saveTreasuryAdditionalDocumentsInLocalStore = exports.saveCompnayOfficerAdditionalDocumentsInLocalStore = exports.saveCompnayOfficerPhoneInLocalStore = exports.saveSetupViewDataInLocalStore = exports.updateSetupViewLocalStoreData = exports.updateSelectedCompanyOfficer = exports.updateBusinessVerificationDetailsFailure = exports.updateBusinessVerificationDetailsSuccess = exports.updateBusinessVerificationDetails = exports.enableSetupFailure = exports.enableSetupSuccess = exports.enableSetup = exports.initialState = void 0;
5
5
  const toolkit_1 = require("@reduxjs/toolkit");
6
6
  const initialFetchStatus = {
7
7
  fetchState: 'Not-Started',
8
8
  error: undefined,
9
9
  };
10
+ const emptyOfficerSlot = {
11
+ autoFilledFields: [],
12
+ localData: undefined,
13
+ sendOtpStatus: initialFetchStatus,
14
+ otpverificationStatus: initialFetchStatus,
15
+ };
10
16
  exports.initialState = {
11
17
  updateStatus: { fetchState: 'Not-Started', error: undefined },
12
- companyDetails: {},
18
+ companyDetails: { autoFilledFields: [] },
13
19
  companyOfficerUpdateStatus: {
14
- Officer_1: {
15
- localData: undefined,
16
- sendOtpStatus: initialFetchStatus,
17
- otpverificationStatus: initialFetchStatus,
18
- },
19
- Officer_2: {
20
- localData: undefined,
21
- sendOtpStatus: initialFetchStatus,
22
- otpverificationStatus: initialFetchStatus,
23
- },
24
- Officer_3: {
25
- localData: undefined,
26
- sendOtpStatus: initialFetchStatus,
27
- otpverificationStatus: initialFetchStatus,
28
- },
29
- Officer_4: {
30
- localData: undefined,
31
- sendOtpStatus: initialFetchStatus,
32
- otpverificationStatus: initialFetchStatus,
33
- },
34
- Officer_5: {
35
- localData: undefined,
36
- sendOtpStatus: initialFetchStatus,
37
- otpverificationStatus: initialFetchStatus,
38
- },
39
- Officer_6: {
40
- localData: undefined,
41
- sendOtpStatus: initialFetchStatus,
42
- otpverificationStatus: initialFetchStatus,
43
- },
44
- Officer_7: {
45
- localData: undefined,
46
- sendOtpStatus: initialFetchStatus,
47
- otpverificationStatus: initialFetchStatus,
48
- },
49
- Officer_8: {
50
- localData: undefined,
51
- sendOtpStatus: initialFetchStatus,
52
- otpverificationStatus: initialFetchStatus,
53
- },
54
- Officer_9: {
55
- localData: undefined,
56
- sendOtpStatus: initialFetchStatus,
57
- otpverificationStatus: initialFetchStatus,
58
- },
59
- Officer_10: {
60
- localData: undefined,
61
- sendOtpStatus: initialFetchStatus,
62
- otpverificationStatus: initialFetchStatus,
63
- },
20
+ Officer_1: { ...emptyOfficerSlot },
21
+ Officer_2: { ...emptyOfficerSlot },
22
+ Officer_3: { ...emptyOfficerSlot },
23
+ Officer_4: { ...emptyOfficerSlot },
24
+ Officer_5: { ...emptyOfficerSlot },
25
+ Officer_6: { ...emptyOfficerSlot },
26
+ Officer_7: { ...emptyOfficerSlot },
27
+ Officer_8: { ...emptyOfficerSlot },
28
+ Officer_9: { ...emptyOfficerSlot },
29
+ Officer_10: { ...emptyOfficerSlot },
64
30
  },
65
31
  primaryContactDetails: {},
66
32
  };
@@ -301,7 +267,60 @@ const setupView = (0, toolkit_1.createSlice)({
301
267
  clearSetupView(draft) {
302
268
  Object.assign(draft, exports.initialState);
303
269
  },
270
+ /**
271
+ * Merge AI-parsed officer fields into the selected officer's localData and
272
+ * track which field names were autofilled so the form can show the ✦ badge.
273
+ */
274
+ applyKycDocumentAutofillForSetup: {
275
+ reducer(draft, action) {
276
+ const { officerType, values, autoFilledFieldNames } = action.payload;
277
+ const slot = draft.companyOfficerUpdateStatus[officerType];
278
+ slot.localData = Object.assign({}, slot.localData, values);
279
+ slot.autoFilledFields = Array.from(new Set([...slot.autoFilledFields, ...autoFilledFieldNames]));
280
+ },
281
+ prepare(payload) {
282
+ return { payload };
283
+ },
284
+ },
285
+ /**
286
+ * Merge AI-parsed company fields into companyDetails.localData and track
287
+ * which field names were autofilled.
288
+ */
289
+ applyKybDocumentAutofillForSetup: {
290
+ reducer(draft, action) {
291
+ const { values, autoFilledFieldNames } = action.payload;
292
+ draft.companyDetails.localData = Object.assign({}, draft.companyDetails.localData, values);
293
+ draft.companyDetails.autoFilledFields = Array.from(new Set([
294
+ ...draft.companyDetails.autoFilledFields,
295
+ ...autoFilledFieldNames,
296
+ ]));
297
+ },
298
+ prepare(payload) {
299
+ return { payload };
300
+ },
301
+ },
302
+ /**
303
+ * Wipe AI-autofill badges. If `officerType` is provided, clears only that
304
+ * officer; otherwise clears company details too.
305
+ */
306
+ clearKycKybAutofillForSetup: {
307
+ reducer(draft, action) {
308
+ const { officerType } = action.payload;
309
+ if (officerType != null) {
310
+ draft.companyOfficerUpdateStatus[officerType].autoFilledFields = [];
311
+ }
312
+ else {
313
+ draft.companyDetails.autoFilledFields = [];
314
+ Object.keys(draft.companyOfficerUpdateStatus).forEach((key) => {
315
+ draft.companyOfficerUpdateStatus[key].autoFilledFields = [];
316
+ });
317
+ }
318
+ },
319
+ prepare(payload = {}) {
320
+ return { payload };
321
+ },
322
+ },
304
323
  },
305
324
  });
306
- _a = setupView.actions, exports.enableSetup = _a.enableSetup, exports.enableSetupSuccess = _a.enableSetupSuccess, exports.enableSetupFailure = _a.enableSetupFailure, exports.updateBusinessVerificationDetails = _a.updateBusinessVerificationDetails, exports.updateBusinessVerificationDetailsSuccess = _a.updateBusinessVerificationDetailsSuccess, exports.updateBusinessVerificationDetailsFailure = _a.updateBusinessVerificationDetailsFailure, exports.updateSelectedCompanyOfficer = _a.updateSelectedCompanyOfficer, exports.updateSetupViewLocalStoreData = _a.updateSetupViewLocalStoreData, exports.saveSetupViewDataInLocalStore = _a.saveSetupViewDataInLocalStore, exports.saveCompnayOfficerPhoneInLocalStore = _a.saveCompnayOfficerPhoneInLocalStore, exports.saveCompnayOfficerAdditionalDocumentsInLocalStore = _a.saveCompnayOfficerAdditionalDocumentsInLocalStore, exports.saveTreasuryAdditionalDocumentsInLocalStore = _a.saveTreasuryAdditionalDocumentsInLocalStore, exports.sendOtpSpendManagementSetUp = _a.sendOtp, exports.resendOtpSpendManagementSetUp = _a.resendOtp, exports.sendOtpSuccessSpendManagementSetUp = _a.sendOtpSuccess, exports.sendOtpFailureSpendManagementSetUp = _a.sendOtpFailure, exports.verifyOtpSpendManagementSetUp = _a.verifyOtp, exports.verifyOtpSuccessSpendManagementSetUp = _a.verifyOtpSuccess, exports.verifyOtpFailureSpendManagementSetUp = _a.verifyOtpFailure, exports.saveIndustryAndIncDateInLocalStore = _a.saveIndustryAndIncDateInLocalStore, exports.clearSetupViewDataInLocalStore = _a.clearSetupViewDataInLocalStore, exports.clearSetupView = _a.clearSetupView;
325
+ _a = setupView.actions, exports.enableSetup = _a.enableSetup, exports.enableSetupSuccess = _a.enableSetupSuccess, exports.enableSetupFailure = _a.enableSetupFailure, exports.updateBusinessVerificationDetails = _a.updateBusinessVerificationDetails, exports.updateBusinessVerificationDetailsSuccess = _a.updateBusinessVerificationDetailsSuccess, exports.updateBusinessVerificationDetailsFailure = _a.updateBusinessVerificationDetailsFailure, exports.updateSelectedCompanyOfficer = _a.updateSelectedCompanyOfficer, exports.updateSetupViewLocalStoreData = _a.updateSetupViewLocalStoreData, exports.saveSetupViewDataInLocalStore = _a.saveSetupViewDataInLocalStore, exports.saveCompnayOfficerPhoneInLocalStore = _a.saveCompnayOfficerPhoneInLocalStore, exports.saveCompnayOfficerAdditionalDocumentsInLocalStore = _a.saveCompnayOfficerAdditionalDocumentsInLocalStore, exports.saveTreasuryAdditionalDocumentsInLocalStore = _a.saveTreasuryAdditionalDocumentsInLocalStore, exports.sendOtpSpendManagementSetUp = _a.sendOtp, exports.resendOtpSpendManagementSetUp = _a.resendOtp, exports.sendOtpSuccessSpendManagementSetUp = _a.sendOtpSuccess, exports.sendOtpFailureSpendManagementSetUp = _a.sendOtpFailure, exports.verifyOtpSpendManagementSetUp = _a.verifyOtp, exports.verifyOtpSuccessSpendManagementSetUp = _a.verifyOtpSuccess, exports.verifyOtpFailureSpendManagementSetUp = _a.verifyOtpFailure, exports.saveIndustryAndIncDateInLocalStore = _a.saveIndustryAndIncDateInLocalStore, exports.clearSetupViewDataInLocalStore = _a.clearSetupViewDataInLocalStore, exports.clearSetupView = _a.clearSetupView, exports.applyKycDocumentAutofillForSetup = _a.applyKycDocumentAutofillForSetup, exports.applyKybDocumentAutofillForSetup = _a.applyKybDocumentAutofillForSetup, exports.clearKycKybAutofillForSetup = _a.clearKycKybAutofillForSetup;
307
326
  exports.default = setupView.reducer;
@@ -54,6 +54,8 @@ export interface FundingAccount {
54
54
  }
55
55
  export interface CompanyOfficersDetails extends CompanyOfficerLocalData {
56
56
  additionalFiles: File[];
57
+ /** Field names in this officer's localData populated by AI doc autofill. */
58
+ autoFilledFields: string[];
57
59
  deleteFileStatusById: Record<ID, FetchStateAndError | undefined>;
58
60
  otpverificationStatus: FetchStateAndError;
59
61
  sendOtpStatus: FetchStateAndError;
@@ -62,6 +64,8 @@ export interface CompanyOfficersDetails extends CompanyOfficerLocalData {
62
64
  addressStatus?: NewAddressData;
63
65
  }
64
66
  export interface CompanyDetails {
67
+ /** Field names in companyDetails localData populated by AI doc autofill. */
68
+ autoFilledFields: string[];
65
69
  companyFiles: File[];
66
70
  companyId: ID;
67
71
  deleteFileStatusById: Record<ID, FetchStateAndError | undefined>;
@@ -124,6 +124,7 @@ const getCompanyAndIdentityDetails = (state, companyId, companyAndIdentityDetail
124
124
  const companyAddress = addressViewState.newAddressState?.company_address;
125
125
  const registeredCompanyAddress = addressViewState.newAddressState?.company_registered_address;
126
126
  companyDetailsLocalData = {
127
+ autoFilledFields: companyDetails.autoFilledFields,
127
128
  companyId,
128
129
  companyDescription,
129
130
  companyLegalName,
@@ -196,6 +197,7 @@ const getCompanyAndIdentityDetails = (state, companyId, companyAndIdentityDetail
196
197
  const companyOfficerAddress = addressViewState.newAddressState?.[addressType];
197
198
  companyOfficerLocalData[officerType] = {
198
199
  ...companyOfficer.localData,
200
+ autoFilledFields: companyOfficer.autoFilledFields,
199
201
  userFiles: (0, fileSelector_1.getFilesByFileIds)(fileState, fileIds),
200
202
  additionalFiles: (0, fileSelector_1.getFilesByFileIds)(fileState, additionalSubmittedDocumentsForVerificationFileIds),
201
203
  deleteFileStatusById,
@@ -81,9 +81,21 @@ export interface SetupViewLocalData {
81
81
  */
82
82
  export interface CompanyAndIdentityDetails {
83
83
  companyDetails: {
84
+ /**
85
+ * Field names from {@link CompanyDetailsLocalData} that were populated by AI
86
+ * autofill from an uploaded KYB document. Drives the ✦ sparkle in the form.
87
+ * Always present (empty when no autofill has run yet).
88
+ */
89
+ autoFilledFields: string[];
84
90
  localData?: CompanyDetailsLocalData;
85
91
  };
86
92
  companyOfficerUpdateStatus: Record<CompanyOfficerType, {
93
+ /**
94
+ * Field names from {@link CompanyOfficerLocalData} populated by AI autofill
95
+ * from an uploaded KYC identity document. Drives the ✦ sparkle in the form.
96
+ * Always present (empty when no autofill has run yet).
97
+ */
98
+ autoFilledFields: string[];
87
99
  otpverificationStatus: FetchStateAndError;
88
100
  sendOtpStatus: FetchStateAndError;
89
101
  localData?: CompanyOfficerLocalData;
@@ -0,0 +1,125 @@
1
+ /**
2
+ * Shared types for the KYC / KYB document autofill flow that lives inside the
3
+ * commonSetup feature (Setup pages + Onboarding both consume it via the same
4
+ * selector view; there is no separate state slice).
5
+ *
6
+ * Backed by document-communication-agent `POST /1.0/documents/process/sync`,
7
+ * which proxies document-service ExtendAI parsers and returns one of the
8
+ * parser payloads below — each value shaped as `{value, confidence}` per field.
9
+ */
10
+ import { ID } from '../../../../commonStateTypes/common';
11
+ /**
12
+ * Form-side identity document types as picked in `SelectDocumentField`.
13
+ * These are camelCase per the web-components convention.
14
+ */
15
+ export type KycSelectDocumentType = 'driverLicense' | 'passport' | 'ssnCard' | 'stateId';
16
+ /**
17
+ * KYC document types accepted by the document-service parsers (snake_case).
18
+ * Subset of {@link KycKybProvidedDocumentType}. `stateId` from the form maps
19
+ * to no parser today and is skipped at dispatch time.
20
+ */
21
+ export type KycProvidedDocumentType = 'passport' | 'driving_license' | 'social_security_card';
22
+ /** KYB document types accepted by the document-service parsers. */
23
+ export type KybProvidedDocumentType = 'certificate_of_incorporation' | 'tax_ein';
24
+ /** All KYC / KYB document types accepted by document-communication-agent. */
25
+ export type KycKybProvidedDocumentType = KycProvidedDocumentType | KybProvidedDocumentType;
26
+ /** Field value with model confidence (0..1) as returned by ExtendAI parsers. */
27
+ export interface FieldWithConfidence<T = string | null> {
28
+ confidence: number;
29
+ value: T | null;
30
+ }
31
+ /**
32
+ * Parser payloads — keep in sync with document-service
33
+ * `processors/parsers/extend_*_parser.py`.
34
+ */
35
+ export interface ExtendPassportParsed {
36
+ date_of_birth?: FieldWithConfidence;
37
+ date_of_expiry?: FieldWithConfidence;
38
+ date_of_issue?: FieldWithConfidence;
39
+ first_name?: FieldWithConfidence;
40
+ gender?: FieldWithConfidence;
41
+ issuing_authority?: FieldWithConfidence;
42
+ last_name?: FieldWithConfidence;
43
+ mrz_line_1?: FieldWithConfidence;
44
+ mrz_line_2?: FieldWithConfidence;
45
+ nationality?: FieldWithConfidence;
46
+ passport_number?: FieldWithConfidence;
47
+ place_of_birth?: FieldWithConfidence;
48
+ }
49
+ export interface ExtendDrivingLicenseParsed {
50
+ address_city?: FieldWithConfidence;
51
+ address_state?: FieldWithConfidence;
52
+ address_street?: FieldWithConfidence;
53
+ address_zip?: FieldWithConfidence;
54
+ date_of_birth?: FieldWithConfidence;
55
+ date_of_expiry?: FieldWithConfidence;
56
+ date_of_issue?: FieldWithConfidence;
57
+ first_name?: FieldWithConfidence;
58
+ issuing_state?: FieldWithConfidence;
59
+ last_name?: FieldWithConfidence;
60
+ license_number?: FieldWithConfidence;
61
+ middle_name?: FieldWithConfidence;
62
+ }
63
+ export interface ExtendSsnCardParsed {
64
+ full_name?: FieldWithConfidence;
65
+ }
66
+ export interface ExtendCertificateOfIncorporationParsed {
67
+ company_address?: FieldWithConfidence;
68
+ company_legal_name?: FieldWithConfidence;
69
+ countries_of_operations?: FieldWithConfidence<string[]>;
70
+ date_of_incorporation?: FieldWithConfidence;
71
+ ein?: FieldWithConfidence;
72
+ industry?: FieldWithConfidence;
73
+ phone_number?: FieldWithConfidence;
74
+ product_description?: FieldWithConfidence;
75
+ purpose_of_account?: FieldWithConfidence;
76
+ registered_address?: FieldWithConfidence;
77
+ regulated_status?: FieldWithConfidence;
78
+ source_of_funds?: FieldWithConfidence;
79
+ state_of_incorporation?: FieldWithConfidence;
80
+ sub_industry?: FieldWithConfidence;
81
+ sub_us_nexus?: FieldWithConfidence;
82
+ transaction_volume_expectations?: FieldWithConfidence;
83
+ type_of_incorporation?: FieldWithConfidence;
84
+ us_nexus?: FieldWithConfidence;
85
+ website?: FieldWithConfidence;
86
+ }
87
+ export interface ExtendTaxEinParsed {
88
+ ein?: FieldWithConfidence;
89
+ irs_address?: FieldWithConfidence;
90
+ legal_business_name?: FieldWithConfidence;
91
+ trade_name?: FieldWithConfidence;
92
+ }
93
+ /** POST /1.0/documents/process/sync request body. */
94
+ export interface SyncDocumentsProcessRequest {
95
+ files: Array<{
96
+ file_id: ID;
97
+ }>;
98
+ provided_document_type: KycKybProvidedDocumentType;
99
+ metadata?: {
100
+ source?: string;
101
+ } & Record<string, unknown>;
102
+ processing_priority?: number;
103
+ }
104
+ /** POST /1.0/documents/process/sync response body. */
105
+ export interface SyncDocumentsProcessResponse {
106
+ data: ExtendPassportParsed | ExtendDrivingLicenseParsed | ExtendSsnCardParsed | ExtendCertificateOfIncorporationParsed | ExtendTaxEinParsed | null;
107
+ status: {
108
+ code: number;
109
+ message: string;
110
+ };
111
+ }
112
+ /**
113
+ * Discriminator for which Redux slice to apply the autofill to — setup pages
114
+ * (`spendManagement/commonSetup`) and onboarding (`onboardingView/customerView`)
115
+ * share the same field shapes but live in separate slices.
116
+ */
117
+ export type KycKybAutofillTarget = 'setup' | 'onboarding';
118
+ /** Confidence floor below which we drop an autofill candidate. */
119
+ export declare const KYC_KYB_AUTOFILL_MIN_CONFIDENCE = 0.5;
120
+ /**
121
+ * Maps the form-side {@link KycSelectDocumentType} (camelCase) to the
122
+ * parser-side {@link KycProvidedDocumentType} (snake_case). Returns `null` for
123
+ * `stateId`, which has no parser today.
124
+ */
125
+ export declare const toKycProvidedDocumentType: (selectType: KycSelectDocumentType) => KycProvidedDocumentType | null;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ /**
3
+ * Shared types for the KYC / KYB document autofill flow that lives inside the
4
+ * commonSetup feature (Setup pages + Onboarding both consume it via the same
5
+ * selector view; there is no separate state slice).
6
+ *
7
+ * Backed by document-communication-agent `POST /1.0/documents/process/sync`,
8
+ * which proxies document-service ExtendAI parsers and returns one of the
9
+ * parser payloads below — each value shaped as `{value, confidence}` per field.
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.toKycProvidedDocumentType = exports.KYC_KYB_AUTOFILL_MIN_CONFIDENCE = void 0;
13
+ /** Confidence floor below which we drop an autofill candidate. */
14
+ exports.KYC_KYB_AUTOFILL_MIN_CONFIDENCE = 0.5;
15
+ /**
16
+ * Maps the form-side {@link KycSelectDocumentType} (camelCase) to the
17
+ * parser-side {@link KycProvidedDocumentType} (snake_case). Returns `null` for
18
+ * `stateId`, which has no parser today.
19
+ */
20
+ const toKycProvidedDocumentType = (selectType) => {
21
+ switch (selectType) {
22
+ case 'driverLicense':
23
+ return 'driving_license';
24
+ case 'passport':
25
+ return 'passport';
26
+ case 'ssnCard':
27
+ return 'social_security_card';
28
+ case 'stateId':
29
+ return null;
30
+ }
31
+ };
32
+ exports.toKycProvidedDocumentType = toKycProvidedDocumentType;
@@ -1,6 +1,6 @@
1
1
  import { RootState } from '../../reducer';
2
2
  export declare const getTasksCardReport: (state: RootState) => {
3
- reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation";
3
+ reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation" | "transfer_accounts" | "credit_card_transfer_accounts";
4
4
  reportTitle: string;
5
5
  version: string | number | undefined;
6
6
  status: import("../..").Status | undefined;
@@ -4,7 +4,7 @@ import { RootState } from '../../reducer';
4
4
  import { TopExReport, TopExTimePeriodWithMetaData } from './topExSelectorTypes';
5
5
  import { TopExState } from './topExState';
6
6
  export declare const getTopExpenses: (accountState: AccountState, topExState: TopExState, numberOfExpenses?: number) => {
7
- reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation";
7
+ reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation" | "transfer_accounts" | "credit_card_transfer_accounts";
8
8
  reportTitle: string;
9
9
  version: string | number | undefined;
10
10
  status: import("../..").Status | undefined;
@@ -3,7 +3,7 @@ import { TransactionPayload } from '../../entity/transaction/payloadTypes/transa
3
3
  import { SupportedTransactionPayload } from '../../entity/transaction/transactionState';
4
4
  import { VendorPayload } from '../../entity/vendor/vendorPayload';
5
5
  import { ZeniAPIResponse } from '../../responsePayload';
6
- interface TransactionDetailPayload {
6
+ export interface TransactionDetailPayload {
7
7
  query: {
8
8
  transaction_id: string;
9
9
  transaction_type: string;
@@ -1,7 +1,8 @@
1
1
  import { NestedAccountHierarchyForReport } from '../../commonStateTypes/accountView/nestedAccountID';
2
2
  import { NestedClassHierarchyForReport } from '../../commonStateTypes/classesView/nestedClassID';
3
- import { FetchStateAndError } from '../../commonStateTypes/common';
3
+ import { FetchState, FetchStateAndError } from '../../commonStateTypes/common';
4
4
  import { SelectorView } from '../../commonStateTypes/viewAndReport/viewAndReport';
5
+ import { AccountBase } from '../../entity/account/accountState';
5
6
  import { TransactionID } from '../../entity/transaction/stateTypes/transaction';
6
7
  import { SupportedTransactionWithCOT } from '../../entity/transaction/transactionState';
7
8
  import { Vendor } from '../../entity/vendor/vendorState';
@@ -17,6 +18,9 @@ export interface TransactionDetailReport extends SelectorView {
17
18
  allVendors: Vendor[];
18
19
  classHierarchyList: NestedClassHierarchyForReport[];
19
20
  classList: ClassListSelectorView;
21
+ createTransferEntryStatus: FetchState;
22
+ /** Resolved credit-card pool for credit_card_payment transfer drawer. */
23
+ creditCardTransferAccountsList: AccountBase[];
20
24
  deleteStatusByAttachmentName: Record<string, FetchStateAndError>;
21
25
  hasInFlightCategoryClassRecommendations: boolean;
22
26
  isAccountingClassesEnabled: boolean;
@@ -25,6 +29,7 @@ export interface TransactionDetailReport extends SelectorView {
25
29
  projectList: ProjectListSelectorView;
26
30
  transactionDetailLocalData: TransactionDetailLocalData;
27
31
  transactionDetailUpdateStatus: FetchStateAndError;
32
+ transferAccounts: AccountBase[];
28
33
  isUpdateNotAllowed?: boolean;
29
34
  transaction?: SupportedTransactionWithCOT;
30
35
  }
@@ -15,6 +15,7 @@ const vendorSelector_1 = require("../../entity/vendor/vendorSelector");
15
15
  const zeniDayJS_1 = require("../../zeniDayJS");
16
16
  const accountListSelector_1 = require("../accountList/accountListSelector");
17
17
  const classListSelector_1 = require("../classList/classListSelector");
18
+ const createTransferEntrySelector_1 = require("../createTransferEntry/createTransferEntrySelector");
18
19
  const projectListSelector_1 = require("../projectList/projectListSelector");
19
20
  const transactionDetailState_1 = require("./transactionDetailState");
20
21
  // "Any line on this transaction is fetching category/class recommendations?"
@@ -39,7 +40,7 @@ const getDetailInFlightRecommendations = (state, transactionId) => {
39
40
  };
40
41
  exports.getDetailInFlightRecommendations = getDetailInFlightRecommendations;
41
42
  const getTransactionDetail = (state, transactionId, fetchLinkedTransactions = true) => {
42
- const { transactionDetailState, transactionState, vendorState, vendorListState, accountState, classState, classListState, accountListState, projectState, projectListState, } = state;
43
+ const { transactionDetailState, transactionState, vendorState, vendorListState, accountState, classState, classListState, accountListState, createTransferEntryState, projectState, projectListState, } = state;
43
44
  const detailKey = (0, transactionDetailState_1.getTransactionDetailKey)(transactionId);
44
45
  const transactionDetail = (0, get_1.default)(transactionDetailState.transactionDetailById, detailKey);
45
46
  let fetchState = {
@@ -106,6 +107,7 @@ const getTransactionDetail = (state, transactionId, fetchLinkedTransactions = tr
106
107
  : [];
107
108
  const transactionDetailAnyUpdateStatus = reduceUpdateFetchStates(transactionDetail);
108
109
  const vendors = (0, vendorSelector_1.getVendorsByVendorIds)(vendorState, vendorListState.vendorIds);
110
+ const { transferAccountsList, creditCardTransferAccountsList } = (0, createTransferEntrySelector_1.getResolvedTransferAccounts)(state);
109
111
  const hasInFlightCategoryClassRecommendations = (0, exports.getDetailInFlightRecommendations)(state, transactionId);
110
112
  return {
111
113
  reportId: 'transaction_detail',
@@ -124,6 +126,9 @@ const getTransactionDetail = (state, transactionId, fetchLinkedTransactions = tr
124
126
  classList: classList,
125
127
  hasInFlightCategoryClassRecommendations,
126
128
  isAccountingClassesEnabled,
129
+ createTransferEntryStatus: createTransferEntryState.createTransferEntryStatus,
130
+ creditCardTransferAccountsList,
131
+ transferAccounts: transferAccountsList,
127
132
  isAccountingProjectsEnabled,
128
133
  projectList,
129
134
  isUpdateNotAllowed: transactionDetail?.isUpdateNotAllowed,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "5.0.81",
3
+ "version": "5.0.82-beta0ND",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/esm/index.js",
@@ -33,39 +33,6 @@
33
33
  "require": "./lib/view/*.js"
34
34
  }
35
35
  },
36
- "scripts": {
37
- "clean": "rimraf lib",
38
- "test:typecheck": "echo 'Typechecking test files...' && NODE_OPTIONS=--max-old-space-size=4096 time tsc -p tsconfig.typecheck.json",
39
- "test:typecheck-modified-files": "chmod +x ./scripts/tsc-modified-files.sh && ./scripts/tsc-modified-files.sh master tsconfig.typecheck.json",
40
- "test": "pnpm lint-modified-files && pnpm test:typecheck-modified-files && vitest run --typecheck",
41
- "lint": "eslint . --ext .js,.jsx,.ts,.tsx --max-warnings 0 --fix",
42
- "lint-modified-files": "chmod +x ./scripts/lint-modified-files.sh && ./scripts/lint-modified-files.sh",
43
- "lint:fix-modified-files": "chmod +x ./scripts/lint-modified-files.sh && LINT_FIX=true ./scripts/lint-modified-files.sh",
44
- "tsc-modified-files": "chmod +x ./scripts/tsc-modified-files.sh && ./scripts/tsc-modified-files.sh",
45
- "typecheck": "tsc --noEmit",
46
- "find-dead-code": "ts-prune | grep -v '(used in module)'",
47
- "find-unused-exports": "ts-unused-exports ./tsconfig.json",
48
- "circular-dependency": "npx madge --circular --extensions ts ./src",
49
- "build": "concurrently --kill-others-on-fail --handle-input \"echo 'TypeScript build in progress...' && time tsc && echo 'ESM build...' && tsc -p tsconfig.esm.json\" \"echo 'Running tests and typecheck (incl. lint-modified-files)...' && pnpm test\" && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
50
- "only-build": "eslint . --ext .js,.jsx,.ts,.tsx && time tsc && tsc -p tsconfig.esm.json && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
51
- "only-build-dev": "eslint . --ext .js,.jsx,.ts,.tsx && time tsc -p tsconfig.dev.json && tsc -p tsconfig.esm.dev.json && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
52
- "format": "prettier --write --ignore-unknown \"src/**/*\" && pnpm lint",
53
- "format-watch": "(git diff --name-only --diff-filter=ACM && git ls-files --others --exclude-standard) | grep -E '\\.(ts|tsx)$' | xargs prettier --write",
54
- "check-version": "node ./scripts/check_version.js",
55
- "prepublishOnly": "chmod +x ./scripts/branch_validation.sh && ./scripts/branch_validation.sh && pnpm update-slack-group-topic && pnpm run check-version && pnpm clean && pnpm build",
56
- "version": "git add -A src",
57
- "postversion": "git push && git push --tags",
58
- "check-dependencies": "node ./scripts/check_dependencies.js",
59
- "clean-overrides": "node ./scripts/clean_overrides.js",
60
- "create-release-branch": "chmod +x ./scripts/create_release_branch.sh && ./scripts/create_release_branch.sh",
61
- "bump-update-web-app-cockpit-beta": "chmod +x ./scripts/bump_and_update_web_app_ui_beta.sh && ./scripts/bump_and_update_web_app_ui_beta.sh",
62
- "send-release-notes": "chmod +x ./scripts/send_release_notes.sh && ./scripts/send_release_notes.sh",
63
- "update-slack-group-topic": "chmod +x ./scripts/update-slack-group-topic.sh && ./scripts/update-slack-group-topic.sh",
64
- "build-beta-and-copy": "chmod +x ./scripts/build_and_copy.sh && ./scripts/build_and_copy.sh",
65
- "pr-approvals-update": "chmod +x ./scripts/pr_approvals.sh && ./scripts/pr_approvals.sh",
66
- "raise-pr-automation": "chmod +x ./scripts/raise_pr_automation.sh && ./scripts/raise_pr_automation.sh",
67
- "test:file": "scripts/test-file.sh"
68
- },
69
36
  "files": [
70
37
  "lib/**/*"
71
38
  ],
@@ -136,32 +103,37 @@
136
103
  "dayjs": "^1.10.7",
137
104
  "url-parse": "^1.5.10"
138
105
  },
139
- "pnpm": {
140
- "overrides": {
141
- "@babel/helpers": ">=7.26.10",
142
- "@babel/runtime": ">=7.26.10",
143
- "@babel/traverse": ">=7.23.2",
144
- "@eslint/eslintrc>ajv": ">=6.14.0 <7",
145
- "@eslint/plugin-kit": ">=0.3.4",
146
- "@modelcontextprotocol/sdk": ">=1.25.2",
147
- "ajv": ">=8.18.0",
148
- "body-parser": ">=2.2.1",
149
- "brace-expansion": ">=5.0.6",
150
- "cross-spawn": ">=7.0.5",
151
- "eslint>ajv": ">=6.14.0 <7",
152
- "flatted": ">=3.4.2",
153
- "glob": ">=11.1.0",
154
- "hono": ">=4.11.4",
155
- "immutable": ">=4.3.8 <5",
156
- "js-yaml": ">=4.1.1",
157
- "minimatch": ">=10.2.3",
158
- "picomatch": ">=4.0.4",
159
- "postcss": ">=8.5.12",
160
- "qs": "^6.14.1",
161
- "rollup": ">=4.59.0",
162
- "tough-cookie": "=4.1.3",
163
- "vite": ">=7.3.2 <8",
164
- "yaml": ">=1.10.3"
165
- }
106
+ "scripts": {
107
+ "clean": "rimraf lib",
108
+ "test:typecheck": "echo 'Typechecking test files...' && NODE_OPTIONS=--max-old-space-size=4096 time tsc -p tsconfig.typecheck.json",
109
+ "test:typecheck-modified-files": "chmod +x ./scripts/tsc-modified-files.sh && ./scripts/tsc-modified-files.sh master tsconfig.typecheck.json",
110
+ "test": "pnpm lint-modified-files && pnpm test:typecheck-modified-files && vitest run --typecheck",
111
+ "test:full": "vitest run --typecheck",
112
+ "lint": "eslint . --ext .js,.jsx,.ts,.tsx --max-warnings 0 --fix",
113
+ "lint-modified-files": "chmod +x ./scripts/lint-modified-files.sh && ./scripts/lint-modified-files.sh",
114
+ "lint:fix-modified-files": "chmod +x ./scripts/lint-modified-files.sh && LINT_FIX=true ./scripts/lint-modified-files.sh",
115
+ "tsc-modified-files": "chmod +x ./scripts/tsc-modified-files.sh && ./scripts/tsc-modified-files.sh",
116
+ "typecheck": "tsc --noEmit",
117
+ "find-dead-code": "ts-prune | grep -v '(used in module)'",
118
+ "find-unused-exports": "ts-unused-exports ./tsconfig.json",
119
+ "circular-dependency": "npx madge --circular --extensions ts ./src",
120
+ "build": "concurrently --kill-others-on-fail --handle-input \"echo 'TypeScript build in progress...' && time tsc && echo 'ESM build...' && tsc -p tsconfig.esm.json\" \"echo 'Running tests and typecheck (incl. lint-modified-files)...' && pnpm test\" && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
121
+ "only-build": "eslint . --ext .js,.jsx,.ts,.tsx && time tsc && tsc -p tsconfig.esm.json && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
122
+ "only-build-dev": "eslint . --ext .js,.jsx,.ts,.tsx && time tsc -p tsconfig.dev.json && tsc -p tsconfig.esm.dev.json && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
123
+ "format": "prettier --write --ignore-unknown \"src/**/*\" && pnpm lint",
124
+ "format-watch": "(git diff --name-only --diff-filter=ACM && git ls-files --others --exclude-standard) | grep -E '\\.(ts|tsx)$' | xargs prettier --write",
125
+ "check-version": "node ./scripts/check_version.js",
126
+ "version": "git add -A src",
127
+ "postversion": "git push && git push --tags",
128
+ "check-dependencies": "node ./scripts/check_dependencies.js",
129
+ "clean-overrides": "node ./scripts/clean_overrides.js",
130
+ "create-release-branch": "chmod +x ./scripts/create_release_branch.sh && ./scripts/create_release_branch.sh",
131
+ "bump-update-web-app-cockpit-beta": "chmod +x ./scripts/bump_and_update_web_app_ui_beta.sh && ./scripts/bump_and_update_web_app_ui_beta.sh",
132
+ "send-release-notes": "chmod +x ./scripts/send_release_notes.sh && ./scripts/send_release_notes.sh",
133
+ "update-slack-group-topic": "chmod +x ./scripts/update-slack-group-topic.sh && ./scripts/update-slack-group-topic.sh",
134
+ "build-beta-and-copy": "chmod +x ./scripts/build_and_copy.sh && ./scripts/build_and_copy.sh",
135
+ "pr-approvals-update": "chmod +x ./scripts/pr_approvals.sh && ./scripts/pr_approvals.sh",
136
+ "raise-pr-automation": "chmod +x ./scripts/raise_pr_automation.sh && ./scripts/raise_pr_automation.sh",
137
+ "test:file": "scripts/test-file.sh"
166
138
  }
167
- }
139
+ }