@zeniai/client-epic-state 5.1.29 → 5.1.30-beta0AY

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 (64) hide show
  1. package/README.md +3 -1
  2. package/lib/entity/customer/customerPayload.js +11 -2
  3. package/lib/entity/jeSchedules/jeSchedulesPayload.js +2 -3
  4. package/lib/entity/transaction/payloadTypes/vendorTransactionPayload.js +1 -1
  5. package/lib/entity/vendor/vendorPayload.d.ts +2 -4
  6. package/lib/entity/vendor/vendorPayload.js +3 -12
  7. package/lib/entity/vendor/vendorReducer.js +0 -3
  8. package/lib/epic.d.ts +2 -1
  9. package/lib/epic.js +2 -1
  10. package/lib/esm/entity/customer/customerPayload.js +11 -2
  11. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +2 -3
  12. package/lib/esm/entity/transaction/payloadTypes/vendorTransactionPayload.js +2 -2
  13. package/lib/esm/entity/vendor/vendorPayload.js +2 -10
  14. package/lib/esm/entity/vendor/vendorReducer.js +1 -4
  15. package/lib/esm/epic.js +2 -1
  16. package/lib/esm/index.js +4 -4
  17. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +29 -3
  18. package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +11 -0
  19. package/lib/esm/view/aiCfoView/epics/createSessionAndSubmitEpic.js +2 -2
  20. package/lib/esm/view/aiCfoView/epics/fetchSkillsEpic.js +34 -0
  21. package/lib/esm/view/aiCfoView/epics/submitQuestionEpic.js +7 -1
  22. package/lib/esm/view/commonVendorView/transactionVendorView/epics/saveTransactionVendorEpic.js +6 -9
  23. package/lib/esm/view/commonVendorView/transactionVendorView/transactionVendorViewReducer.js +0 -2
  24. package/lib/esm/view/createTransferEntry/epics/createTransferEntryEpic.js +1 -1
  25. package/lib/esm/view/onboardingView/cockpitView/epic/initializeOnboardingCustomerViewUpdateDataEpic.js +4 -16
  26. package/lib/esm/view/onboardingView/cockpitView/onboardingCockpitViewPayload.js +2 -2
  27. package/lib/esm/view/referralView/epics/sendReferralInviteEpic.js +9 -1
  28. package/lib/esm/view/referralView/referralReducer.js +3 -2
  29. package/lib/esm/view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic.js +3 -3
  30. package/lib/esm/view/transactionDetail/epics/transactionDetailEpic.js +9 -10
  31. package/lib/esm/view/transactionDetail/epics/updateTransactionDetailEpic.js +1 -1
  32. package/lib/esm/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListReducer.js +1 -3
  33. package/lib/esm/view/vendorList/vendorListReducer.js +1 -3
  34. package/lib/esm/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.js +2 -2
  35. package/lib/index.d.ts +6 -6
  36. package/lib/index.js +11 -6
  37. package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +14 -0
  38. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +8 -4
  39. package/lib/view/aiCfoView/aiCfoViewReducer.js +30 -4
  40. package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +2 -1
  41. package/lib/view/aiCfoView/aiCfoViewSelector.js +12 -0
  42. package/lib/view/aiCfoView/aiCfoViewState.d.ts +15 -0
  43. package/lib/view/aiCfoView/epics/createSessionAndSubmitEpic.js +2 -2
  44. package/lib/view/aiCfoView/epics/fetchSkillsEpic.d.ts +8 -0
  45. package/lib/view/aiCfoView/epics/fetchSkillsEpic.js +38 -0
  46. package/lib/view/aiCfoView/epics/submitQuestionEpic.js +7 -1
  47. package/lib/view/commonVendorView/transactionVendorView/epics/saveTransactionVendorEpic.js +6 -9
  48. package/lib/view/commonVendorView/transactionVendorView/transactionVendorViewReducer.js +0 -2
  49. package/lib/view/createTransferEntry/epics/createTransferEntryEpic.js +1 -1
  50. package/lib/view/onboardingView/cockpitView/epic/initializeOnboardingCustomerViewUpdateDataEpic.js +3 -15
  51. package/lib/view/onboardingView/cockpitView/onboardingCockpitViewPayload.js +2 -2
  52. package/lib/view/referralView/epics/sendReferralInviteEpic.js +9 -1
  53. package/lib/view/referralView/referralReducer.d.ts +1 -0
  54. package/lib/view/referralView/referralReducer.js +4 -3
  55. package/lib/view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic.js +3 -3
  56. package/lib/view/transactionDetail/epics/transactionDetailEpic.js +8 -9
  57. package/lib/view/transactionDetail/epics/updateTransactionDetailEpic.js +1 -1
  58. package/lib/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListReducer.js +1 -3
  59. package/lib/view/vendorList/vendorListReducer.js +1 -3
  60. package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.js +2 -2
  61. package/package.json +71 -36
  62. package/lib/commonPayloadTypes/payloadIdentifier.d.ts +0 -6
  63. package/lib/commonPayloadTypes/payloadIdentifier.js +0 -18
  64. package/lib/esm/commonPayloadTypes/payloadIdentifier.js +0 -14
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.sendReferralInviteEpic = void 0;
4
4
  const rxjs_1 = require("rxjs");
5
5
  const operators_1 = require("rxjs/operators");
6
+ const snackbarReducer_1 = require("../../../entity/snackbar/snackbarReducer");
6
7
  const responsePayload_1 = require("../../../responsePayload");
7
8
  const referralReducer_1 = require("../referralReducer");
8
9
  const sendReferralInviteEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(referralReducer_1.sendReferralInvite.match), (0, operators_1.switchMap)(() => {
@@ -16,7 +17,14 @@ const sendReferralInviteEpic = (actions$, state$, zeniAPI) => actions$.pipe((0,
16
17
  .postAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/company-referrals`, invitePayload)
17
18
  .pipe((0, operators_1.mergeMap)((response) => {
18
19
  if ((0, responsePayload_1.isSuccessStatus)(response)) {
19
- const actions = [(0, referralReducer_1.sendReferralInviteSuccess)()];
20
+ const actions = [
21
+ (0, referralReducer_1.sendReferralInviteSuccess)(),
22
+ (0, snackbarReducer_1.openSnackbar)({
23
+ messageSection: 'referral_invite_sent',
24
+ messageText: 'success',
25
+ type: 'success',
26
+ }),
27
+ ];
20
28
  return actions;
21
29
  }
22
30
  else {
@@ -2,6 +2,7 @@ import { SortOrder } from '../../commonStateTypes/selectorTypes/sortOrderTypes';
2
2
  import { ZeniAPIStatus } from '../../responsePayload';
3
3
  import { FetchRewardsPayload, FetchRewardsPlanPayload } from './referralPayload';
4
4
  import { InviteCompanyLocalData, ReferralListViewSortKey, ReferralViewState } from './referralState';
5
+ export declare const DEFAULT_REFERRER_AMOUNT = 4000;
5
6
  export declare const initialState: ReferralViewState;
6
7
  export declare const fetchReferrals: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[cacheOverride?: any, refreshViewInBackground?: any], {
7
8
  cacheOverride: any;
@@ -1,13 +1,14 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.updateRewardsPlanFailure = exports.updateRewardsPlan = exports.fetchRewardsPlan = exports.clearReferrals = exports.updateReferViewedFailure = exports.updateReferViewedSuccess = exports.updateReferViewed = exports.resendReferralInviteSuccess = exports.resendReferralInvite = exports.sendReferralInviteFailure = exports.sendReferralInviteSuccess = exports.sendReferralInvite = exports.clearReferralFormDataInLocalStore = exports.saveReferralFormDataInLocalStore = exports.updateReferralsFailure = exports.updateReferralListSortUiState = exports.updateReferrals = exports.fetchReferrals = exports.initialState = void 0;
4
+ exports.updateRewardsPlanFailure = exports.updateRewardsPlan = exports.fetchRewardsPlan = exports.clearReferrals = exports.updateReferViewedFailure = exports.updateReferViewedSuccess = exports.updateReferViewed = exports.resendReferralInviteSuccess = exports.resendReferralInvite = exports.sendReferralInviteFailure = exports.sendReferralInviteSuccess = exports.sendReferralInvite = exports.clearReferralFormDataInLocalStore = exports.saveReferralFormDataInLocalStore = exports.updateReferralsFailure = exports.updateReferralListSortUiState = exports.updateReferrals = exports.fetchReferrals = exports.initialState = exports.DEFAULT_REFERRER_AMOUNT = void 0;
5
5
  const toolkit_1 = require("@reduxjs/toolkit");
6
6
  const amount_1 = require("../../commonStateTypes/amount");
7
7
  const zeniDayJS_1 = require("../../zeniDayJS");
8
8
  const zeniUrl_1 = require("../../zeniUrl");
9
9
  const referralPayload_1 = require("./referralPayload");
10
10
  const referralState_1 = require("./referralState");
11
+ exports.DEFAULT_REFERRER_AMOUNT = 4000;
11
12
  exports.initialState = {
12
13
  fetchState: 'Not-Started',
13
14
  error: undefined,
@@ -48,7 +49,7 @@ exports.initialState = {
48
49
  },
49
50
  rewardsPlan: {
50
51
  referrerAmount: {
51
- amount: 0,
52
+ amount: exports.DEFAULT_REFERRER_AMOUNT,
52
53
  currencyCode: 'USD',
53
54
  currencySymbol: '$',
54
55
  },
@@ -57,7 +58,7 @@ exports.initialState = {
57
58
  currencyCode: 'USD',
58
59
  currencySymbol: '$',
59
60
  },
60
- planName: 'PLAN_1000',
61
+ planName: 'PLAN_4000',
61
62
  planId: 'dummy',
62
63
  referralLink: (0, zeniUrl_1.toZeniUrl)(''),
63
64
  },
@@ -104,11 +104,11 @@ const fetchBillDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, ope
104
104
  }
105
105
  else {
106
106
  fetchActions.push((0, billDetailViewReducer_1.updateBillDetail)({ billId, billDetail: response.data }));
107
- fetchActions.push((0, billDetailViewReducer_1.updateBillDetailFetchState)(transcationId, 'Completed', undefined, vendorInResponse?.vendor_id ?? undefined));
107
+ fetchActions.push((0, billDetailViewReducer_1.updateBillDetailFetchState)(transcationId, 'Completed', undefined, vendorInResponse?.vendor_id));
108
108
  const transactionInResponse = response.data?.transaction;
109
109
  if (transactionInResponse != null &&
110
110
  transactionInResponse.total_amount != null &&
111
- vendorInResponse.vendor_id != null) {
111
+ vendorInResponse != null) {
112
112
  fetchActions.push((0, billPayReviewReducer_1.fetchDuplicateBill)(vendorInResponse.vendor_name, vendorInResponse.vendor_id, transactionInResponse.total_amount, transactionInResponse.recipient_total_amount, transactionInResponse.document_id, billId));
113
113
  }
114
114
  const billHasPaymentError = [
@@ -165,7 +165,7 @@ function removeCompleteTransaction(billId, transaction) {
165
165
  function getVendorPreviousBillsActions(billTransactionPayload) {
166
166
  const fetchPreviousBillsActions = [];
167
167
  const vendorId = billTransactionPayload.vendor_id;
168
- if (vendorId != null && vendorId !== '') {
168
+ if (Boolean(vendorId) === true) {
169
169
  fetchPreviousBillsActions.push((0, previousBillsReducer_1.fetchPreviousBills)(vendorId, false));
170
170
  }
171
171
  return fetchPreviousBillsActions;
@@ -62,11 +62,11 @@ const fetchTransactionDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe(
62
62
  const transcationId = (0, transactionIDPayload_1.toTransactionID)(response.data.transaction);
63
63
  const responseData = {
64
64
  ...response.data,
65
- vendors: response.data.vendors?.map((vendor) => (0, vendorPayload_1.normalizeVendorBasePayload)(vendor)) ?? [],
65
+ vendors: response.data.vendors?.map((vendor) => ({
66
+ ...vendor,
67
+ vendor_id: vendor.qbo_id ?? vendor.vendor_id,
68
+ })) ?? [],
66
69
  };
67
- const resolvedVendorId = responseData.vendors.length > 0
68
- ? (0, vendorPayload_1.getVendorPayloadIdentifier)(responseData.vendors[0])
69
- : null;
70
70
  if (responseData.vendors.length > 0) {
71
71
  updateActions.push((0, vendorReducer_1.updateVendors)(responseData.vendors, 'merge'));
72
72
  }
@@ -74,16 +74,15 @@ const fetchTransactionDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe(
74
74
  updateActions.push((0, transactionReducer_1.updateTransaction)(transactionDetailKeyForResponse, responseData.transaction));
75
75
  updateActions.push((0, transactionDetailReducer_1.initializeTransactionDetailLocalData)({
76
76
  transactionId: transcationId,
77
- vendorId: resolvedVendorId ?? undefined,
77
+ vendorId: responseData.vendors[0]?.vendor_id,
78
78
  }));
79
79
  updateActions.push((0, transactionDetailReducer_1.updateTransactionDetailFetchState)(transcationId, 'Completed'));
80
80
  // IMPORTANT: Fetch linked transactions..
81
81
  updateActions.push(...getAllFetchLinkedTransactionDetailActions(responseData.transaction, state$.value));
82
- if (resolvedVendorId != null) {
83
- const vendorPayload = responseData.vendors[0];
82
+ if (responseData.vendors.length > 0) {
84
83
  updateActions.push((0, transactionVendorViewReducer_1.updateTransactionVendorLocalData)({
85
- vendorId: resolvedVendorId,
86
- localData: (0, transactionVendorLocalDataHelper_1.getInitializedTransactionVendorLocalData)((0, vendorPayload_1.mapVendorPayloadToVendor)(vendorPayload)),
84
+ vendorId: responseData.vendors[0].vendor_id,
85
+ localData: (0, transactionVendorLocalDataHelper_1.getInitializedTransactionVendorLocalData)((0, vendorPayload_1.mapVendorPayloadToVendor)(responseData.vendors[0])),
87
86
  }));
88
87
  }
89
88
  // If vendor transaction, fetch owners list
@@ -67,7 +67,7 @@ const updateTransactionDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe
67
67
  actions.push((0, transactionReducer_1.updateTransaction)(transactionDetailKeyForResponse, response.data.transaction));
68
68
  actions.push((0, transactionDetailReducer_1.initializeTransactionDetailLocalData)({
69
69
  transactionId: transactionIdResp,
70
- vendorId: response.data.vendors?.[0]?.vendor_id ?? undefined,
70
+ vendorId: response.data.vendors?.[0]?.vendor_id,
71
71
  }));
72
72
  actions.push((0, transactionDetailReducer_1.updateTransactionDetailSaveStatus)(transactionIdResp, 'Completed'));
73
73
  let callMarkTransactionAsNotMiscategorized = true;
@@ -79,9 +79,7 @@ const vendorFiling1099List = (0, toolkit_1.createSlice)({
79
79
  },
80
80
  updateVendorsFiling1099List(draft, action) {
81
81
  const { response } = action.payload;
82
- const newVendorIds = response.data?.report.vendors
83
- ?.map((vendor) => vendor.vendor_id)
84
- .filter((vendorId) => vendorId != null) ?? [];
82
+ const newVendorIds = response.data?.report.vendors?.map((vendor) => vendor.vendor_id) ?? [];
85
83
  draft.vendorIds = [...new Set([...draft.vendorIds, ...newVendorIds])];
86
84
  draft.isVendor1099Populated =
87
85
  response.data?.report.is_vendor_1099_populated ?? true;
@@ -88,9 +88,7 @@ const vendorList = (0, toolkit_1.createSlice)({
88
88
  },
89
89
  updateVendorsList(draft, action) {
90
90
  const { response, searchString, view } = action.payload;
91
- const newVendorIds = response.data?.vendors
92
- ?.map((vendor) => vendor.vendor_id)
93
- .filter((vendorId) => vendorId != null) ?? [];
91
+ const newVendorIds = response.data?.vendors?.map((vendor) => vendor.vendor_id) ?? [];
94
92
  if (searchString.length > 0) {
95
93
  if (action.payload.keepExistingListItems === false) {
96
94
  draft.searchResults = newVendorIds;
@@ -317,8 +317,8 @@ const toVendorReviewViewLocalDataById = (vendorsPayload) => {
317
317
  const mapPayloadToVendorFirstReviewView = (payload) => {
318
318
  const { recommendationIds, nonExistingRecommendations } = (0, commonTypes_1.toAllRecommendationsFromPayload)(payload.recommendations);
319
319
  return {
320
- vendorId: payload.vendor_id ?? '',
321
- selectedVendorId: payload.vendor_id ?? '',
320
+ vendorId: payload.vendor_id,
321
+ selectedVendorId: payload.vendor_id,
322
322
  status: {
323
323
  code: (0, commonTypes_1.toVendorFirstReviewViewStatusesTypeStrict)(payload.status.code),
324
324
  name: payload.status.name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "5.1.29",
3
+ "version": "5.1.30-beta0AY",
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,6 +33,44 @@
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 && SINCE_DAYS=2 ./scripts/tsc-modified-files.sh master tsconfig.typecheck.json",
40
+ "test:typecheck-mocks": "echo 'Typechecking mock files...' && NODE_OPTIONS=--max-old-space-size=4096 time tsc -p tsconfig.mocks.json",
41
+ "test:typecheck-mocks-modified-files": "chmod +x ./scripts/tsc-modified-files.sh && SINCE_DAYS=2 ./scripts/tsc-modified-files.sh master tsconfig.mocks.json",
42
+ "test": "pnpm lint-modified-files && pnpm test:typecheck-modified-files && pnpm test:typecheck-mocks-modified-files && vitest run --typecheck",
43
+ "test:full": "pnpm test:typecheck-modified-files && pnpm test:typecheck-mocks-modified-files && vitest run --typecheck",
44
+ "lint": "eslint . --ext .js,.jsx,.ts,.tsx --max-warnings 0 --fix",
45
+ "lint-modified-files": "chmod +x ./scripts/lint-modified-files.sh && ./scripts/lint-modified-files.sh",
46
+ "lint:fix-modified-files": "chmod +x ./scripts/lint-modified-files.sh && LINT_FIX=true ./scripts/lint-modified-files.sh",
47
+ "tsc-modified-files": "chmod +x ./scripts/tsc-modified-files.sh && ./scripts/tsc-modified-files.sh",
48
+ "typecheck": "tsc --noEmit",
49
+ "find-dead-code": "ts-prune | grep -v '(used in module)'",
50
+ "find-unused-exports": "ts-unused-exports ./tsconfig.json",
51
+ "circular-dependency": "npx madge --circular --extensions ts ./src",
52
+ "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__\"",
53
+ "only-build": "eslint . --ext .js,.jsx,.ts,.tsx && time tsc && tsc -p tsconfig.esm.json && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
54
+ "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__\"",
55
+ "format": "prettier --write --ignore-unknown \"src/**/*\" && pnpm lint",
56
+ "format-watch": "(git diff --name-only --diff-filter=ACM && git ls-files --others --exclude-standard) | grep -E '\\.(ts|tsx)$' | xargs prettier --write",
57
+ "check-version": "node ./scripts/check_version.js",
58
+ "prepublishOnly": "chmod +x ./scripts/branch_validation.sh && ./scripts/branch_validation.sh && (npm run update-slack-group-topic || true) && npm_config_tag=betaAY npm run check-version && npm run clean && npm run only-build",
59
+ "version": "git add -A src",
60
+ "postversion": "git push && git push --tags",
61
+ "check-dependencies": "node ./scripts/check_dependencies.js",
62
+ "clean-overrides": "node ./scripts/clean_overrides.js",
63
+ "create-or-update-release-branch": "chmod +x ./scripts/create_or_update_release_branch.sh && ./scripts/create_or_update_release_branch.sh",
64
+ "bump-versions-master": "chmod +x ./scripts/bump_versions_master.sh && ./scripts/bump_versions_master.sh",
65
+ "bump-versions-beta": "chmod +x ./scripts/bump_versions_beta.sh && ./scripts/bump_versions_beta.sh",
66
+ "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",
67
+ "send-release-notes": "chmod +x ./scripts/send_release_notes.sh && ./scripts/send_release_notes.sh",
68
+ "update-slack-group-topic": "chmod +x ./scripts/update-slack-group-topic.sh && ./scripts/update-slack-group-topic.sh",
69
+ "build-beta-and-copy": "chmod +x ./scripts/build_and_copy.sh && ./scripts/build_and_copy.sh",
70
+ "pr-approvals-update": "chmod +x ./scripts/pr_approvals.sh && ./scripts/pr_approvals.sh",
71
+ "raise-pr-automation": "chmod +x ./scripts/raise_pr_automation.sh && ./scripts/raise_pr_automation.sh",
72
+ "test:file": "scripts/test-file.sh"
73
+ },
36
74
  "files": [
37
75
  "lib/**/*"
38
76
  ],
@@ -79,6 +117,7 @@
79
117
  "ts-prune": "^0.10.3",
80
118
  "ts-unused-exports": "^11.0.1",
81
119
  "typescript": "^5.7.3",
120
+ "vite": "^7.3.5",
82
121
  "vitest": "^4.1.8"
83
122
  },
84
123
  "dependencies": {
@@ -103,39 +142,35 @@
103
142
  "dayjs": "^1.10.7",
104
143
  "url-parse": "^1.5.10"
105
144
  },
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 && SINCE_DAYS=2 ./scripts/tsc-modified-files.sh master tsconfig.typecheck.json",
110
- "test:typecheck-mocks": "echo 'Typechecking mock files...' && NODE_OPTIONS=--max-old-space-size=4096 time tsc -p tsconfig.mocks.json",
111
- "test:typecheck-mocks-modified-files": "chmod +x ./scripts/tsc-modified-files.sh && SINCE_DAYS=2 ./scripts/tsc-modified-files.sh master tsconfig.mocks.json",
112
- "test": "pnpm lint-modified-files && pnpm test:typecheck-modified-files && pnpm test:typecheck-mocks-modified-files && vitest run --typecheck",
113
- "test:full": "pnpm test:typecheck-modified-files && pnpm test:typecheck-mocks-modified-files && vitest run --typecheck",
114
- "lint": "eslint . --ext .js,.jsx,.ts,.tsx --max-warnings 0 --fix",
115
- "lint-modified-files": "chmod +x ./scripts/lint-modified-files.sh && ./scripts/lint-modified-files.sh",
116
- "lint:fix-modified-files": "chmod +x ./scripts/lint-modified-files.sh && LINT_FIX=true ./scripts/lint-modified-files.sh",
117
- "tsc-modified-files": "chmod +x ./scripts/tsc-modified-files.sh && ./scripts/tsc-modified-files.sh",
118
- "typecheck": "tsc --noEmit",
119
- "find-dead-code": "ts-prune | grep -v '(used in module)'",
120
- "find-unused-exports": "ts-unused-exports ./tsconfig.json",
121
- "circular-dependency": "npx madge --circular --extensions ts ./src",
122
- "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__\"",
123
- "only-build": "eslint . --ext .js,.jsx,.ts,.tsx && time tsc && tsc -p tsconfig.esm.json && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
124
- "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__\"",
125
- "format": "prettier --write --ignore-unknown \"src/**/*\" && pnpm lint",
126
- "format-watch": "(git diff --name-only --diff-filter=ACM && git ls-files --others --exclude-standard) | grep -E '\\.(ts|tsx)$' | xargs prettier --write",
127
- "check-version": "node ./scripts/check_version.js",
128
- "version": "git add -A src",
129
- "postversion": "git push && git push --tags",
130
- "check-dependencies": "node ./scripts/check_dependencies.js",
131
- "clean-overrides": "node ./scripts/clean_overrides.js",
132
- "create-release-branch": "chmod +x ./scripts/create_release_branch.sh && ./scripts/create_release_branch.sh",
133
- "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",
134
- "send-release-notes": "chmod +x ./scripts/send_release_notes.sh && ./scripts/send_release_notes.sh",
135
- "update-slack-group-topic": "chmod +x ./scripts/update-slack-group-topic.sh && ./scripts/update-slack-group-topic.sh",
136
- "build-beta-and-copy": "chmod +x ./scripts/build_and_copy.sh && ./scripts/build_and_copy.sh",
137
- "pr-approvals-update": "chmod +x ./scripts/pr_approvals.sh && ./scripts/pr_approvals.sh",
138
- "raise-pr-automation": "chmod +x ./scripts/raise_pr_automation.sh && ./scripts/raise_pr_automation.sh",
139
- "test:file": "scripts/test-file.sh"
145
+ "pnpm": {
146
+ "overrides": {
147
+ "@babel/core": ">=7.29.6",
148
+ "@babel/helpers": ">=7.26.10",
149
+ "@babel/runtime": ">=7.26.10",
150
+ "@babel/traverse": ">=7.23.2",
151
+ "@eslint/eslintrc>ajv": ">=6.14.0 <7",
152
+ "@eslint/plugin-kit": ">=0.3.4",
153
+ "@modelcontextprotocol/sdk": ">=1.25.2",
154
+ "ajv": ">=8.18.0",
155
+ "body-parser": ">=2.2.1",
156
+ "brace-expansion": ">=5.0.6",
157
+ "cross-spawn": ">=7.0.5",
158
+ "esbuild": ">=0.28.1",
159
+ "eslint>ajv": ">=6.14.0 <7",
160
+ "flatted": ">=3.4.2",
161
+ "glob": ">=11.1.0",
162
+ "hono": ">=4.11.4",
163
+ "immutable": ">=4.3.8 <5",
164
+ "js-yaml": ">=4.2.0",
165
+ "minimatch": ">=10.2.3",
166
+ "picomatch": ">=4.0.4",
167
+ "postcss": ">=8.5.12",
168
+ "qs": "^6.14.1",
169
+ "rollup": ">=4.59.0",
170
+ "shell-quote": ">=1.8.4",
171
+ "tough-cookie": "=4.1.3",
172
+ "vite": ">=7.3.5 <8",
173
+ "yaml": ">=1.10.3"
174
+ }
140
175
  }
141
- }
176
+ }
@@ -1,6 +0,0 @@
1
- /**
2
- * Resolves an entity identifier from a primary id and optional fallback id.
3
- * Treats null and empty string as absent so JE/Deposit payloads can fall back
4
- * to qbo_id uniformly across customer and vendor mappers.
5
- */
6
- export declare const resolvePayloadIdentifier: (primaryId: string | null | undefined, fallbackId: string | null | undefined) => string | null;
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolvePayloadIdentifier = void 0;
4
- /**
5
- * Resolves an entity identifier from a primary id and optional fallback id.
6
- * Treats null and empty string as absent so JE/Deposit payloads can fall back
7
- * to qbo_id uniformly across customer and vendor mappers.
8
- */
9
- const resolvePayloadIdentifier = (primaryId, fallbackId) => {
10
- if (primaryId != null && primaryId !== '') {
11
- return primaryId;
12
- }
13
- if (fallbackId != null && fallbackId !== '') {
14
- return fallbackId;
15
- }
16
- return null;
17
- };
18
- exports.resolvePayloadIdentifier = resolvePayloadIdentifier;
@@ -1,14 +0,0 @@
1
- /**
2
- * Resolves an entity identifier from a primary id and optional fallback id.
3
- * Treats null and empty string as absent so JE/Deposit payloads can fall back
4
- * to qbo_id uniformly across customer and vendor mappers.
5
- */
6
- export const resolvePayloadIdentifier = (primaryId, fallbackId) => {
7
- if (primaryId != null && primaryId !== '') {
8
- return primaryId;
9
- }
10
- if (fallbackId != null && fallbackId !== '') {
11
- return fallbackId;
12
- }
13
- return null;
14
- };