Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add OPF integration #17250

Draft
wants to merge 330 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
330 commits
Select commit Hold shift + click to select a range
18f6692
Fix install error (#17622)
FollowTheFlo Jul 10, 2023
21c1fb3
Add e2e and unit tests for opf render payment method (#17651)
rmch91 Jul 18, 2023
d534cda
CXSPA-4049 Add tests for payment verification process (#17662)
rmch91 Jul 20, 2023
7444bfa
fix: payment info still displayed when date is missing (#17667)
FollowTheFlo Jul 24, 2023
9659e33
Implement Hosted-fields pattern#3 (iframe) (#17664)
FollowTheFlo Jul 25, 2023
3c12c8a
fix about service not provided (#17680)
FollowTheFlo Jul 25, 2023
825dcd4
feat: Add unit tests for OPF event listener
Matejk00 Jul 26, 2023
887a4aa
tests: Add tests for OpfOrderService
RadhepS Jul 27, 2023
01c7d66
fix: opf build error (#17694)
FollowTheFlo Jul 27, 2023
757f61d
test: update connector tests to remove warnings
RadhepS Jul 31, 2023
89a7b88
Merge branch 'develop-6.4.x' into epic/opf
Matejk00 Aug 1, 2023
c93e6e4
Update tsconfig
Matejk00 Aug 1, 2023
d2d9178
Config update
Matejk00 Aug 1, 2023
886d185
fix: revert typo for timeZoneOffset (#17717)
FollowTheFlo Aug 1, 2023
a1ce0b5
unit test for Initiate payments endpoint failed (#17715)
kimhw0630 Aug 1, 2023
a8e1836
test: unit test for displaying payment options (#17733)
kimhw0630 Aug 7, 2023
2bdf850
Verify endpoint failed unit tests (#17739)
rmch91 Aug 9, 2023
a2781ef
Merge branch 'develop-6.4.x' into epic/opf
kpawelczak Aug 11, 2023
dc7e363
config update
kpawelczak Aug 11, 2023
9c21396
Unit tests for billing address (#17749)
rmch91 Aug 14, 2023
5bb6cfe
Tests for opf hosted fields payment success and payment declined (#17…
rmch91 Aug 18, 2023
2c15ccb
Unit test for Place Order failed on CCv2 (#17763)
kpawelczak Aug 21, 2023
2442f44
fix: re-add opf into libs list (#17791)
FollowTheFlo Aug 23, 2023
d2340e1
fix: build failing due to mismatched version (#17794)
FollowTheFlo Aug 24, 2023
7e17779
chore: enable pipeline checks
RadhepS Aug 25, 2023
8b3b549
feat: adjust API endpoints (#17796)
FollowTheFlo Aug 29, 2023
e1586cd
test: add tests for opf resource loader service
RadhepS Aug 31, 2023
a06eac9
fix: Update unit tests coverage
Matejk00 Sep 11, 2023
4a9cc67
fix: Update tests coverage
Matejk00 Sep 11, 2023
bf507e4
Feature/cxspa 4606 Fix opf unit tests coverage (#17821)
rmch91 Sep 11, 2023
5edbc54
fix: Update unit tests coverage
Matejk00 Sep 13, 2023
06048eb
refactor: change header from deprecated Content-language to Accept-La…
FollowTheFlo Sep 13, 2023
a265e76
Adjust header with language requirements from OPF server (#17860)
FollowTheFlo Sep 21, 2023
6ef7b96
feat: add hostedFields pattern#2 (#17744)
FollowTheFlo Sep 21, 2023
a1c0cb6
opf: remove obsolete file (#17867)
FollowTheFlo Sep 21, 2023
25c7469
Merge branch 'develop-6.5.x' into epic/opf
FollowTheFlo Sep 27, 2023
2ce1f6e
feat: add throwPaymentError global function (#17875)
FollowTheFlo Sep 29, 2023
5d247fd
config update
kpawelczak Oct 2, 2023
06e4208
bump angular version
kpawelczak Oct 2, 2023
914b5e1
fix: OPF unit test coverage opf-checkout-billing-address-component-se…
kpawelczak Oct 2, 2023
7985d55
feat: Multi-config checkout integration
Matejk00 Oct 2, 2023
47499d1
feat: update opf-checkout-payments.components unit tests (#17901)
kpawelczak Oct 3, 2023
9de9d1e
feat: update opf-checkout-billing-address-form.component unit tests (…
kpawelczak Oct 3, 2023
8a88b74
Merge branch 'develop-6.6.x' into epic/opf
FollowTheFlo Oct 4, 2023
cc98064
refactor: remove hard-coded page navigation (#17908)
FollowTheFlo Oct 4, 2023
732fdd4
Merge branch 'develop-6.6.x' into epic/opf
FollowTheFlo Oct 5, 2023
549d6db
Fix coverage for some opf tests (#17914)
rmch91 Oct 5, 2023
fec8a1a
feat: update unit test coverage: occ-opf.adapter.spec.ts (#17916)
kpawelczak Oct 9, 2023
712cba5
Merge branch 'develop-6.6.x' into epic/opf
FollowTheFlo Oct 10, 2023
f343c89
test: Add OPF Order Adapter unit tests
Matejk00 Oct 11, 2023
6ed8490
test: Update OPF Checkout Payment Wrapper tests
Matejk00 Oct 11, 2023
c408b8e
refactor: Move getActiveConfigurations to Opf/Base lib (#17953)
FollowTheFlo Oct 11, 2023
8914181
test: Update OPF schematics unit tests
Matejk00 Oct 12, 2023
aa9f1db
feat: add terms and conditions message alert
Matejk00 Oct 23, 2023
2aed8f0
feat: remove duplicated resource loader service (#18000)
Matejk00 Oct 23, 2023
8331f9f
Merge branch 'develop-6.6.x' into epic/opf
FollowTheFlo Oct 25, 2023
0160269
update tsconfig with new libraries
FollowTheFlo Oct 25, 2023
955ad0f
feat: add 3 global functions domains (#18010)
FollowTheFlo Oct 26, 2023
44c1008
feat: Add CTA Scripts feature (#17991)
FollowTheFlo Oct 27, 2023
c41fbd4
fix: Update schematics
Matejk00 Nov 7, 2023
46f8388
Merge branch 'develop-6.7.x' into epic/opf
FollowTheFlo Nov 9, 2023
45edb3b
fix: CTA scripts (#18091)
FollowTheFlo Nov 13, 2023
4f8e363
fix: adjust property and fix exception thrown (#18115)
FollowTheFlo Nov 21, 2023
862f390
Update OPF version
Matejk00 Nov 28, 2023
2e9f47a
Merge branch 'develop-6.7.x' into epic/opf
Matejk00 Nov 28, 2023
43adddf
Update installation script
Matejk00 Nov 28, 2023
948e558
feat: QuickBuy ApplePay and GooglePay (#18156)
FollowTheFlo Dec 8, 2023
bb8b8ad
Update dependencies
Matejk00 Dec 11, 2023
e82a0ed
Add dependencies to the schematics
Matejk00 Dec 11, 2023
d6a5383
Reference fix
Matejk00 Dec 11, 2023
bae66aa
feat: add Loader Indicator global functions (#18221)
FollowTheFlo Dec 11, 2023
dee87dc
Update config
Matejk00 Dec 12, 2023
9830a2e
Add peer dependencies
Matejk00 Dec 12, 2023
baf56d0
Add OPF dependency
Matejk00 Dec 12, 2023
d65a2e1
Add temporaily new core deps
Matejk00 Dec 12, 2023
d52100c
Update packages
Matejk00 Dec 12, 2023
69cf77c
feat: fetch merchantId & countryCode from OPF server (#18243)
FollowTheFlo Dec 15, 2023
a69cd0d
fix: switching Card in Apple Pay drawer loses the delivery cost (#18259)
FollowTheFlo Dec 15, 2023
a019fb5
fix: QB buttons should not be displayed in pdp when guest is disabled…
FollowTheFlo Dec 18, 2023
0f31661
feat: Add pre-selected first payment option as default (#18318)
Matejk00 Jan 2, 2024
e692274
Add license header
github-actions[bot] Jan 2, 2024
60dac73
chore: Unit tests for quick buy cart handler (#18322)
rmch91 Jan 3, 2024
6bbb363
fix: Clear state if T&C are disabled
Matejk00 Jan 3, 2024
63d58cd
chore: Google pay unit tests (#18319)
rmch91 Jan 4, 2024
1e21dfe
chore: Unit tests for quick buy component (#18341)
rmch91 Jan 4, 2024
92abf1b
feat: Apple pay unit test (#18343)
kimhw0630 Jan 8, 2024
a41f024
feat: enable SSL for OPF development (#18356)
Matejk00 Jan 12, 2024
b2ea1d9
feat: remove 3rd party typings from public API (#18364)
Matejk00 Jan 16, 2024
9835e15
fix: remove duplicated headers (#18412)
FollowTheFlo Jan 23, 2024
c4d6aab
feat: Add OPF active cart support for Google Pay
Matejk00 Jan 25, 2024
4173468
Merge branch 'develop-6.8.x' into epic/opf
FollowTheFlo Jan 25, 2024
1dab98a
fix: wrong import location
Matejk00 Jan 29, 2024
f3209ce
feature: add QuickBuy using content projection (#18418)
FollowTheFlo Jan 29, 2024
b676bd5
Update installation script
Matejk00 Jan 30, 2024
86e5f30
Add cybersource provider support based on form (#18461)
Matejk00 Feb 8, 2024
66ec8e4
feat: improve quickBuy CartPage UI (#18495)
FollowTheFlo Feb 16, 2024
6adaa68
feat: Generate data attributes for scripts (#18512)
Matejk00 Feb 21, 2024
f1c7141
Fix google pay transactions (#18545)
Matejk00 Feb 26, 2024
2aadc73
feat: add paymentSessionId in storage state (#18507)
FollowTheFlo Feb 26, 2024
acf3d0d
feat: Add ApplePay Cart support
Matejk00 Mar 1, 2024
78dbd34
chore: Angular update to the latest develop version
Matejk00 Mar 5, 2024
c401272
feat: multiCart on ApplePay with switch solution (#18574)
FollowTheFlo Mar 7, 2024
e617dda
faat: multiCart for GooglePay (#18607)
FollowTheFlo Mar 11, 2024
03864d7
fix: replace css with media-breakpoint (#18622)
FollowTheFlo Mar 12, 2024
0742c24
feat: Add pickup in store support for GooglePay
Matejk00 Mar 18, 2024
6edc7f7
feat: update generating OTP token endpoint call
Matejk00 Mar 20, 2024
312ad0b
feat: pickup in store for ApplePay (#18643)
FollowTheFlo Mar 21, 2024
e78964f
fix: payment still on progress on next payment (#18658)
FollowTheFlo Mar 25, 2024
281d005
feat: add Merchant Name label on payment sheet (#18663)
FollowTheFlo Mar 25, 2024
826dd21
feat: Add billing address to the GooglePay transaction
Matejk00 Mar 29, 2024
bc74133
fix: cart not found error when cancelling or completing payment (#18676)
FollowTheFlo Apr 3, 2024
a69675c
fix: opf add-to-cart not displayed below product summary on b2b (#18707)
FollowTheFlo Apr 9, 2024
66e5d14
Retry service action in case of 401 error (#18696)
Matejk00 Apr 10, 2024
d89b755
fix: item counter to set values only for specific component (#18712)
Matejk00 Apr 10, 2024
979379b
fix: Move utils to the different sub-library (#18724)
Matejk00 Apr 12, 2024
e7c0d36
Update
Matejk00 May 14, 2024
0ed3836
Add license header
github-actions[bot] May 14, 2024
cd52582
Update
Matejk00 May 14, 2024
0165cee
Update
Matejk00 May 14, 2024
ec1a30d
Update
Matejk00 May 14, 2024
8f8d664
Merge branch 'develop' into epic/opf
Matejk00 May 14, 2024
c442c95
Update
Matejk00 May 14, 2024
1c4e757
Update
Matejk00 May 14, 2024
8849a92
Update
Matejk00 May 14, 2024
38b6080
Update
Matejk00 May 14, 2024
7c0aa47
Update
Matejk00 May 14, 2024
8f262f9
Update
Matejk00 May 14, 2024
4739026
Update
Matejk00 May 15, 2024
c12fb7d
Merge branch 'develop' into epic/opf
Matejk00 May 15, 2024
a4fd421
Update config flow name (#18841)
Matejk00 May 17, 2024
5c2cd77
Merge branch 'develop' into epic/opf
Matejk00 May 21, 2024
5d029ec
Update
Matejk00 May 21, 2024
13b24a1
Update
Matejk00 May 21, 2024
2f8441e
Update
Matejk00 May 21, 2024
cb78e1e
Merge branch 'develop' into epic/opf
Matejk00 May 22, 2024
7aaaaaf
Merge branch 'develop' into epic/opf
Matejk00 May 23, 2024
cc92352
Update
Matejk00 May 23, 2024
40dd919
Update
Matejk00 May 23, 2024
666c12a
Update
Matejk00 May 23, 2024
c3e155f
Update
Matejk00 May 23, 2024
5b8c863
Update
Matejk00 May 23, 2024
0dca3a6
Update
Matejk00 May 23, 2024
1b26cf3
Update
Matejk00 May 23, 2024
319102b
Update
Matejk00 May 23, 2024
b599295
Update
Matejk00 May 23, 2024
ba869c5
Update
Matejk00 May 23, 2024
9934c19
Update
Matejk00 May 23, 2024
cae192a
Update
Matejk00 May 23, 2024
c99bf91
Update
Matejk00 May 23, 2024
b8dc081
Merge branch 'develop' into epic/opf
Matejk00 May 23, 2024
3fb347c
Update
Matejk00 May 23, 2024
6762af9
Update
Matejk00 May 23, 2024
8c713e7
Update
Matejk00 May 23, 2024
3ca7de5
Merge branch 'develop' into epic/opf
Matejk00 May 23, 2024
e981fc3
trigger build
Matejk00 May 23, 2024
630a732
Merge branch 'develop' into epic/opf
giancorderoortiz May 23, 2024
eda4dc6
Merge branch 'develop' into epic/opf
Matejk00 May 23, 2024
bb713d5
trigger build
Matejk00 May 24, 2024
396725f
Merge branch 'develop' into epic/opf
Matejk00 May 27, 2024
e3b1abd
Update
Matejk00 May 27, 2024
b80969c
Update
Matejk00 May 27, 2024
143dee1
Update
Matejk00 May 27, 2024
b2093fc
Merge branch 'develop' into epic/opf
giancorderoortiz May 27, 2024
1ae5cd4
Merge branch 'develop' into epic/opf
Matejk00 May 28, 2024
db24866
Merge branch 'develop' into epic/opf
Matejk00 Jun 3, 2024
d21971d
Merge branch 'develop' into epic/opf
Matejk00 Jun 3, 2024
67a773c
Update
Matejk00 Jun 3, 2024
2e5207a
Merge branch 'develop' into epic/opf
Matejk00 Jun 4, 2024
c49fc3e
Update
Matejk00 Jun 4, 2024
65c9cb6
Merge branch 'develop' into epic/opf
Matejk00 Jun 5, 2024
45e7d5b
Update
Matejk00 Jun 5, 2024
83e602c
Update
Matejk00 Jun 5, 2024
c481b32
Merge branch 'develop' into epic/opf
Matejk00 Jun 5, 2024
0ffbc02
Update
Matejk00 Jun 5, 2024
c84f373
Update
Matejk00 Jun 6, 2024
f65a01e
Merge branch 'develop' into epic/opf
Matejk00 Jun 6, 2024
556b925
Update
Matejk00 Jun 6, 2024
878429f
Merge branch 'develop' into epic/opf
Matejk00 Jun 6, 2024
e2e2d67
Merge branch 'develop' into epic/opf
Matejk00 Jun 11, 2024
2cd923b
Update
Matejk00 Jun 11, 2024
fb61306
Update
Matejk00 Jun 11, 2024
41bd31b
Merge branch 'develop' into epic/opf
Matejk00 Jun 12, 2024
bf4a1c2
Merge branch 'develop' into epic/opf
Matejk00 Jun 18, 2024
5bf08cf
Merge branch 'develop' into epic/opf
Matejk00 Jul 2, 2024
d36cade
Update
Matejk00 Jul 2, 2024
57d4484
Merge branch 'develop' into epic/opf
Matejk00 Jul 9, 2024
c2c95da
Merge branch 'develop' into epic/opf
Matejk00 Jul 11, 2024
0621004
Update
Matejk00 Jul 11, 2024
5c153a0
Merge branch 'develop' into epic/opf
giancorderoortiz Jul 11, 2024
ebf596b
Merge branch 'develop' into epic/opf
giancorderoortiz Jul 17, 2024
924efd1
Update ts config files after npm config update
giancorderoortiz Jul 17, 2024
1d7718f
remove schematics package lock json file
giancorderoortiz Jul 17, 2024
bb92bbc
Update snapshot
Matejk00 Jul 18, 2024
8a508c8
Update config
Matejk00 Jul 18, 2024
30afe0d
Merge branch 'develop' into epic/opf
Matejk00 Jul 18, 2024
d00b378
Update config
Matejk00 Jul 18, 2024
88c0296
Update config
Matejk00 Jul 18, 2024
3d1fdcb
Merge branch 'develop' into epic/opf
Matejk00 Jul 19, 2024
6803be5
Update config
Matejk00 Jul 19, 2024
00e3d72
Merge branch 'develop' into epic/opf
Matejk00 Jul 31, 2024
454e068
Merge branch 'develop' into epic/opf
Matejk00 Aug 7, 2024
e3487aa
Update
Matejk00 Aug 7, 2024
8a0395c
Update
Matejk00 Aug 27, 2024
eaf26f6
Update
Matejk00 Aug 27, 2024
952e67e
Update
Matejk00 Aug 27, 2024
1256cb5
Update
Matejk00 Aug 27, 2024
2959dfd
feat: QuickBuy descope
Matejk00 Aug 27, 2024
cbbe0de
Merge branch 'develop' into epic/opf
Matejk00 Aug 27, 2024
5748a36
Update
Matejk00 Aug 27, 2024
4122d6d
Update
Matejk00 Aug 27, 2024
263f3f0
Merge branch 'develop' into epic/opf
Matejk00 Aug 28, 2024
d7961e1
Update
Matejk00 Aug 28, 2024
73f0b35
feat: Add iframe support (#19223)
Matejk00 Sep 12, 2024
8573fac
refactor: OPF sub-libs reorganization
Matejk00 Sep 17, 2024
58e6137
Merge branch 'develop' into epic/opf
Matejk00 Sep 17, 2024
afa2313
Remove libs export in main lib
Matejk00 Sep 17, 2024
39840a1
Merge branch 'develop' into epic/opf
Matejk00 Sep 17, 2024
79304ad
Pipeline fix
Matejk00 Sep 17, 2024
74d7012
Pipeline fix
Matejk00 Sep 17, 2024
1e9216e
Pipeline fix
Matejk00 Sep 17, 2024
153ec98
Pipeline fix
Matejk00 Sep 17, 2024
72ac43a
Pipeline fix
Matejk00 Sep 17, 2024
4b3e29e
Pipeline fix
Matejk00 Sep 17, 2024
3c7d5c8
Pipeline fix
Matejk00 Sep 17, 2024
c021ef7
Pipeline fix
Matejk00 Sep 17, 2024
6d62cfa
Merge branch 'develop' into epic/opf
Matejk00 Sep 18, 2024
8bae9a6
Pipeline fix
Matejk00 Sep 18, 2024
9263904
CR update
Matejk00 Sep 18, 2024
17a3dc2
Pipeline fix
Matejk00 Sep 18, 2024
a8c655e
Merge branch 'develop' into epic/opf
Matejk00 Sep 20, 2024
f6f044f
fix: submit API invoked when add to cart or proceed to checkout (#19276)
FollowTheFlo Sep 25, 2024
7279d4f
feat: add OPF Onsite Message (#19262)
FollowTheFlo Sep 30, 2024
12c6c13
fix: dynamic cta not visible on first visit (#19333)
FollowTheFlo Oct 4, 2024
85ddf62
test: add unit tests for opf onsite messaging (#19308)
FollowTheFlo Oct 7, 2024
17032a4
feat: revert quick buy to the OPF codebase
Matejk00 Oct 7, 2024
c4041d9
Merge branch 'develop' into epic/opf
Matejk00 Oct 7, 2024
3a7a70d
Fix sonar
Matejk00 Oct 7, 2024
169ad91
Update env (#19351)
Matejk00 Oct 7, 2024
51428c4
fix: cta unit test update (#19352)
FollowTheFlo Oct 8, 2024
5e5479a
Merge branch 'develop' into epic/opf
Matejk00 Oct 8, 2024
d55674c
Prettier fix
Matejk00 Oct 8, 2024
5f1b9a7
chore: Add configuration for OPF
Matejk00 Oct 18, 2024
7e0070c
chore: add opf sub-libs to schematics (#19387)
FollowTheFlo Oct 18, 2024
f52b4e6
fix: Adjust billing address feature to change to sapBillingAddress ke…
rmch91 Oct 18, 2024
64ecb9a
add missing unit tests (#19419)
kimhw0630 Oct 22, 2024
b0a5081
fix: Prevent 3rd party script to load ssr (#19443)
FollowTheFlo Oct 31, 2024
4c84bc1
feat: Support payment provider icons
Matejk00 Nov 4, 2024
6b17b14
feat: GooglePay guest mode support (#19448)
Matejk00 Nov 4, 2024
7603201
Merge branch 'develop' into epic/opf
Matejk00 Nov 5, 2024
8463def
Fix after resolve conflict
Matejk00 Nov 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 9 additions & 5 deletions .env-cmdrc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
"CX_EPD_VISUALIZATION": "true",
"CX_BASE_URL": "https://api.cp96avkh5f-integrati1-d1-public.model-t.cc.commerce.ondemand.com"
},
"opf": {
"CX_OPF": "true",
"CX_BASE_URL": "https://api.cp96avkh5f-integrati2-s1-public.model-t.cc.commerce.ondemand.com"
},
"cpq": {
"CX_BASE_URL": "https://api.cg79x9wuu9-eccommerc1-s1-public.model-t.myhybris.cloud/",
"CX_B2B": "true",
Expand All @@ -55,7 +59,7 @@
"CX_REQUESTED_DELIVERY_DATE": "true",
"CX_PDF_INVOICES": "true"
},
"omf":{
"omf": {
"CX_BASE_URL": "https://api.cg79x9wuu9-eccommerc1-s9-public.model-t.myhybris.cloud",
"CX_OMF": "true"
},
Expand All @@ -71,22 +75,22 @@
"CX_BASE_URL": "https://api.cg79x9wuu9-eccommerc1-s5-public.model-t.myhybris.cloud",
"CX_PDF_INVOICES": "true"
},
"my-account-v2":{
"my-account-v2": {
"CX_BASE_URL": "https://api.cg79x9wuu9-eccommerc1-s5-public.model-t.myhybris.cloud",
"CX_PDF_INVOICES": "true",
"CX_MY_ACCOUNT_V2": "true"
},
"cdp":{
"cdp": {
"CX_CDP": "true",
"CX_BASE_URL": "https://api.cg79x9wuu9-eccommerc1-s5-public.model-t.myhybris.cloud",
"CX_PDF_INVOICES": "true",
"CX_MY_ACCOUNT_V2": "true"
},
"opps":{
"opps": {
"CX_BASE_URL": "https://api.cg79x9wuu9-eccommerc1-s5-public.model-t.myhybris.cloud",
"CX_OPPS": "true"
},
"s4-service":{
"s4-service": {
"CX_BASE_URL": "https://api.cg79x9wuu9-eccommerc1-s8-public.model-t.myhybris.cloud",
"CX_S4_SERVICE": "true",
"CX_B2B": "true"
Expand Down
78 changes: 78 additions & 0 deletions core-libs/setup/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,84 @@
"@spartacus/omf": ["../../integration-libs/omf/public_api"],
"@spartacus/omf/order": ["../../integration-libs/omf/order/public_api"],
"@spartacus/omf/root": ["../../integration-libs/omf/root/public_api"],
"@spartacus/opf/base/components": [
"../../integration-libs/opf/base/components/public_api"
],
"@spartacus/opf/base/core": [
"../../integration-libs/opf/base/core/public_api"
],
"@spartacus/opf/base": ["../../integration-libs/opf/base/public_api"],
"@spartacus/opf/base/opf-api": [
"../../integration-libs/opf/base/opf-api/public_api"
],
"@spartacus/opf/base/root": [
"../../integration-libs/opf/base/root/public_api"
],
"@spartacus/opf/checkout/assets": [
"../../integration-libs/opf/checkout/assets/public_api"
],
"@spartacus/opf/checkout/components": [
"../../integration-libs/opf/checkout/components/public_api"
],
"@spartacus/opf/checkout": [
"../../integration-libs/opf/checkout/public_api"
],
"@spartacus/opf/checkout/root": [
"../../integration-libs/opf/checkout/root/public_api"
],
"@spartacus/opf/cta/components": [
"../../integration-libs/opf/cta/components/public_api"
],
"@spartacus/opf/cta/core": [
"../../integration-libs/opf/cta/core/public_api"
],
"@spartacus/opf/cta": ["../../integration-libs/opf/cta/public_api"],
"@spartacus/opf/cta/opf-api": [
"../../integration-libs/opf/cta/opf-api/public_api"
],
"@spartacus/opf/cta/root": [
"../../integration-libs/opf/cta/root/public_api"
],
"@spartacus/opf/global-functions/core": [
"../../integration-libs/opf/global-functions/core/public_api"
],
"@spartacus/opf/global-functions": [
"../../integration-libs/opf/global-functions/public_api"
],
"@spartacus/opf/global-functions/root": [
"../../integration-libs/opf/global-functions/root/public_api"
],
"@spartacus/opf": ["../../integration-libs/opf/public_api"],
"@spartacus/opf/payment/assets": [
"../../integration-libs/opf/payment/assets/public_api"
],
"@spartacus/opf/payment/core": [
"../../integration-libs/opf/payment/core/public_api"
],
"@spartacus/opf/payment": [
"../../integration-libs/opf/payment/public_api"
],
"@spartacus/opf/payment/opf-api": [
"../../integration-libs/opf/payment/opf-api/public_api"
],
"@spartacus/opf/payment/root": [
"../../integration-libs/opf/payment/root/public_api"
],
"@spartacus/opf/quick-buy/components": [
"../../integration-libs/opf/quick-buy/components/public_api"
],
"@spartacus/opf/quick-buy/core": [
"../../integration-libs/opf/quick-buy/core/public_api"
],
"@spartacus/opf/quick-buy": [
"../../integration-libs/opf/quick-buy/public_api"
],
"@spartacus/opf/quick-buy/opf-api": [
"../../integration-libs/opf/quick-buy/opf-api/public_api"
],
"@spartacus/opf/quick-buy/root": [
"../../integration-libs/opf/quick-buy/root/public_api"
],
"@spartacus/opps": ["../../integration-libs/opps/public_api"],
"@spartacus/opps/root": ["../../integration-libs/opps/root/public_api"],
"@spartacus/s4-service/assets": [
Expand Down
1 change: 1 addition & 0 deletions extra-webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ module.exports = {
'feature-libs/pickup-in-store'
),
'@spartacus/s4om': path.join(__dirname, 'integration-libs/s4om'),
'@spartacus/opf': path.join(__dirname, 'integration-libs/opf'),
'@spartacus/s4-service': path.join(__dirname, 'integration-libs/s4-service'),
'@spartacus/omf': path.join(__dirname, 'integration-libs/omf'),
},
Expand Down
78 changes: 78 additions & 0 deletions feature-libs/asm/tsconfig.schematics.json
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,84 @@
"@spartacus/omf": ["../../integration-libs/omf/public_api"],
"@spartacus/omf/order": ["../../integration-libs/omf/order/public_api"],
"@spartacus/omf/root": ["../../integration-libs/omf/root/public_api"],
"@spartacus/opf/base/components": [
"../../integration-libs/opf/base/components/public_api"
],
"@spartacus/opf/base/core": [
"../../integration-libs/opf/base/core/public_api"
],
"@spartacus/opf/base": ["../../integration-libs/opf/base/public_api"],
"@spartacus/opf/base/opf-api": [
"../../integration-libs/opf/base/opf-api/public_api"
],
"@spartacus/opf/base/root": [
"../../integration-libs/opf/base/root/public_api"
],
"@spartacus/opf/checkout/assets": [
"../../integration-libs/opf/checkout/assets/public_api"
],
"@spartacus/opf/checkout/components": [
"../../integration-libs/opf/checkout/components/public_api"
],
"@spartacus/opf/checkout": [
"../../integration-libs/opf/checkout/public_api"
],
"@spartacus/opf/checkout/root": [
"../../integration-libs/opf/checkout/root/public_api"
],
"@spartacus/opf/cta/components": [
"../../integration-libs/opf/cta/components/public_api"
],
"@spartacus/opf/cta/core": [
"../../integration-libs/opf/cta/core/public_api"
],
"@spartacus/opf/cta": ["../../integration-libs/opf/cta/public_api"],
"@spartacus/opf/cta/opf-api": [
"../../integration-libs/opf/cta/opf-api/public_api"
],
"@spartacus/opf/cta/root": [
"../../integration-libs/opf/cta/root/public_api"
],
"@spartacus/opf/global-functions/core": [
"../../integration-libs/opf/global-functions/core/public_api"
],
"@spartacus/opf/global-functions": [
"../../integration-libs/opf/global-functions/public_api"
],
"@spartacus/opf/global-functions/root": [
"../../integration-libs/opf/global-functions/root/public_api"
],
"@spartacus/opf": ["../../integration-libs/opf/public_api"],
"@spartacus/opf/payment/assets": [
"../../integration-libs/opf/payment/assets/public_api"
],
"@spartacus/opf/payment/core": [
"../../integration-libs/opf/payment/core/public_api"
],
"@spartacus/opf/payment": [
"../../integration-libs/opf/payment/public_api"
],
"@spartacus/opf/payment/opf-api": [
"../../integration-libs/opf/payment/opf-api/public_api"
],
"@spartacus/opf/payment/root": [
"../../integration-libs/opf/payment/root/public_api"
],
"@spartacus/opf/quick-buy/components": [
"../../integration-libs/opf/quick-buy/components/public_api"
],
"@spartacus/opf/quick-buy/core": [
"../../integration-libs/opf/quick-buy/core/public_api"
],
"@spartacus/opf/quick-buy": [
"../../integration-libs/opf/quick-buy/public_api"
],
"@spartacus/opf/quick-buy/opf-api": [
"../../integration-libs/opf/quick-buy/opf-api/public_api"
],
"@spartacus/opf/quick-buy/root": [
"../../integration-libs/opf/quick-buy/root/public_api"
],
"@spartacus/opps": ["../../integration-libs/opps/public_api"],
"@spartacus/opps/root": ["../../integration-libs/opps/root/public_api"],
"@spartacus/s4-service/assets": [
Expand Down
3 changes: 3 additions & 0 deletions feature-libs/cart/base/core/cart-base-core.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import { NgModule } from '@angular/core';
import { HttpErrorHandler } from '@spartacus/core';
import { CartPersistenceModule } from './cart-persistence.module';
import { CartAccessCodeConnector, CartGuestUserConnector } from './connectors';
import { CartConnector } from './connectors/cart/cart.connector';
import { CartEntryConnector } from './connectors/entry/cart-entry.connector';
import { CartValidationConnector } from './connectors/validation/cart-validation.connector';
Expand All @@ -30,6 +31,8 @@ import { MultiCartStoreModule } from './store/multi-cart-store.module';
CartEntryConnector,
CartVoucherConnector,
CartValidationConnector,
CartAccessCodeConnector,
CartGuestUserConnector,
...facadeProviders,
{
provide: HttpErrorHandler,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* SPDX-FileCopyrightText: 2024 SAP Spartacus team <[email protected]>
*
* SPDX-License-Identifier: Apache-2.0
*/

import { Observable } from 'rxjs';

export abstract class CartAccessCodeAdapter {
/**
* Abstract method used to generate access code for a specific cart id.
*
* @param {string} userId
* @param {string} cartId
*
*/
abstract getCartAccessCode(
userId: string,
cartId: string
): Observable<string | undefined>;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { TestBed } from '@angular/core/testing';
import { of } from 'rxjs';
import { take } from 'rxjs/operators';
import { CartAccessCodeAdapter } from './cart-access-code.adapter';
import { CartAccessCodeConnector } from './cart-access-code.connector';
import createSpy = jasmine.createSpy;

class MockCartAccessCodeAdapter implements CartAccessCodeAdapter {
getCartAccessCode = createSpy().and.returnValue(of({}));
}

describe('CartAccessCodeConnector', () => {
let service: CartAccessCodeConnector;
let adapter: CartAccessCodeAdapter;

beforeEach(() => {
TestBed.configureTestingModule({
providers: [
CartAccessCodeConnector,
{
provide: CartAccessCodeAdapter,
useClass: MockCartAccessCodeAdapter,
},
],
});

service = TestBed.inject(CartAccessCodeConnector);
adapter = TestBed.inject(CartAccessCodeAdapter);
});

it('should be created', () => {
expect(service).toBeTruthy();
});

it('should call adapter', () => {
service.getCartAccessCode('user1', 'cart1').pipe(take(1)).subscribe();
expect(adapter.getCartAccessCode).toHaveBeenCalledWith('user1', 'cart1');
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* SPDX-FileCopyrightText: 2024 SAP Spartacus team <[email protected]>
*
* SPDX-License-Identifier: Apache-2.0
*/

import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { CartAccessCodeAdapter } from './cart-access-code.adapter';

@Injectable()
export class CartAccessCodeConnector {
constructor(protected adapter: CartAccessCodeAdapter) {}

public getCartAccessCode(
userId: string,
cartId: string
): Observable<string | undefined> {
return this.adapter.getCartAccessCode(userId, cartId);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* SPDX-FileCopyrightText: 2024 SAP Spartacus team <[email protected]>
*
* SPDX-License-Identifier: Apache-2.0
*/

import { InjectionToken } from '@angular/core';
import { Converter } from '@spartacus/core';

export const CART_ACCESS_CODE_NORMALIZER = new InjectionToken<
Converter<any, string>
>('CartAccessCodeNormalizer');
9 changes: 9 additions & 0 deletions feature-libs/cart/base/core/connectors/access-code/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* SPDX-FileCopyrightText: 2024 SAP Spartacus team <[email protected]>
*
* SPDX-License-Identifier: Apache-2.0
*/

export * from './cart-access-code.adapter';
export * from './cart-access-code.connector';
export * from './converters';
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* SPDX-FileCopyrightText: 2024 SAP Spartacus team <[email protected]>
*
* SPDX-License-Identifier: Apache-2.0
*/

import { CartGuestUser } from '@spartacus/cart/base/root';
import { Observable } from 'rxjs';

export abstract class CartGuestUserAdapter {
/**
* Abstract method used to create a guest user, and assigns the user to the cart.
*
* @param {string} userId
* @param {string} cartId
* @param {CartGuestUser} guestUserDetails
*
*/
abstract createCartGuestUser(
userId: string,
cartId: string,
guestUserDetails?: CartGuestUser
): Observable<CartGuestUser>;

/**
* Abstract method used to update a guest user, and assigns the user to the cart.
*
* @param {string} userId
* @param {string} cartId
* @param {CartGuestUser} guestUserDetails
*
*/
abstract updateCartGuestUser(
userId: string,
cartId: string,
guestUserDetails: CartGuestUser
): Observable<CartGuestUser>;
}
Loading
Loading