@zeniai/client-epic-state 5.1.29-beta0ND → 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.
- package/lib/__testHelpers__/apiFailure.json +6 -0
- package/lib/entity/customer/customerPayload.js +11 -2
- package/lib/entity/transaction/payloadTypes/vendorTransactionPayload.js +1 -1
- package/lib/entity/vendor/__mocks__/vendorMock.d.ts +7 -0
- package/lib/entity/vendor/__mocks__/vendorMock.js +311 -0
- package/lib/entity/vendor/__mocks__/vendorStateMocks.d.ts +8 -0
- package/lib/entity/vendor/__mocks__/vendorStateMocks.js +415 -0
- package/lib/entity/vendor/vendorPayload.d.ts +2 -4
- package/lib/entity/vendor/vendorPayload.js +3 -12
- package/lib/entity/vendor/vendorReducer.js +0 -3
- package/lib/esm/__testHelpers__/apiFailure.json +6 -0
- package/lib/esm/entity/customer/customerPayload.js +11 -2
- package/lib/esm/entity/transaction/payloadTypes/vendorTransactionPayload.js +2 -2
- package/lib/esm/entity/vendor/__mocks__/vendorMock.js +308 -0
- package/lib/esm/entity/vendor/__mocks__/vendorStateMocks.js +412 -0
- package/lib/esm/entity/vendor/vendorPayload.js +2 -10
- package/lib/esm/entity/vendor/vendorReducer.js +1 -4
- package/lib/esm/index.js +2 -2
- package/lib/esm/view/accountMappingView/__mocks__/accountMappingSelectorMock.js +4650 -0
- package/lib/esm/view/addressView/__mocks__/addressViewMocks.js +203 -0
- package/lib/esm/view/addressView/__mocks__/json/createAddressResponse.json +23 -0
- package/lib/esm/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +258 -0
- package/lib/esm/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +418 -0
- package/lib/esm/view/addressView/__mocks__/json/fetchAddressResponse.json +24 -0
- package/lib/esm/view/addressView/__mocks__/json/updateAddressResponse.json +24 -0
- package/lib/esm/view/commonVendorView/transactionVendorView/transactionVendorViewReducer.js +0 -2
- package/lib/esm/view/referralView/referralReducer.js +3 -2
- package/lib/esm/view/transactionDetail/epics/markTransactionAsNotMiscategorizedEpic.js +2 -28
- package/lib/esm/view/transactionDetail/epics/transactionDetailEpic.js +9 -10
- package/lib/index.d.ts +2 -2
- package/lib/index.js +7 -6
- package/lib/view/accountMappingView/__mocks__/accountMappingSelectorMock.d.ts +11 -0
- package/lib/view/accountMappingView/__mocks__/accountMappingSelectorMock.js +4659 -0
- package/lib/view/addressView/__mocks__/addressViewMocks.d.ts +35 -0
- package/lib/view/addressView/__mocks__/addressViewMocks.js +239 -0
- package/lib/view/addressView/__mocks__/json/createAddressResponse.json +23 -0
- package/lib/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +258 -0
- package/lib/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +418 -0
- package/lib/view/addressView/__mocks__/json/fetchAddressResponse.json +24 -0
- package/lib/view/addressView/__mocks__/json/updateAddressResponse.json +24 -0
- package/lib/view/commonVendorView/transactionVendorView/transactionVendorViewReducer.js +0 -2
- package/lib/view/referralView/referralReducer.d.ts +1 -0
- package/lib/view/referralView/referralReducer.js +4 -3
- package/lib/view/transactionDetail/epics/markTransactionAsNotMiscategorizedEpic.js +2 -28
- package/lib/view/transactionDetail/epics/transactionDetailEpic.js +8 -9
- package/package.json +70 -38
- package/lib/commonPayloadTypes/payloadIdentifier.d.ts +0 -6
- package/lib/commonPayloadTypes/payloadIdentifier.js +0 -18
- package/lib/esm/commonPayloadTypes/payloadIdentifier.js +0 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.1.
|
|
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
|
],
|
|
@@ -104,41 +142,35 @@
|
|
|
104
142
|
"dayjs": "^1.10.7",
|
|
105
143
|
"url-parse": "^1.5.10"
|
|
106
144
|
},
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
"send-release-notes": "chmod +x ./scripts/send_release_notes.sh && ./scripts/send_release_notes.sh",
|
|
138
|
-
"update-slack-group-topic": "chmod +x ./scripts/update-slack-group-topic.sh && ./scripts/update-slack-group-topic.sh",
|
|
139
|
-
"build-beta-and-copy": "chmod +x ./scripts/build_and_copy.sh && ./scripts/build_and_copy.sh",
|
|
140
|
-
"pr-approvals-update": "chmod +x ./scripts/pr_approvals.sh && ./scripts/pr_approvals.sh",
|
|
141
|
-
"raise-pr-automation": "chmod +x ./scripts/raise_pr_automation.sh && ./scripts/raise_pr_automation.sh",
|
|
142
|
-
"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
|
+
}
|
|
143
175
|
}
|
|
144
|
-
}
|
|
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
|
-
};
|