Feature/b2b team 3521 export bulk - #224
Conversation
|
Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖 Please select which version do you want to release:
And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.
|
|
Beep boop 🤖 Thank you so much for keeping our documentation up-to-date ❤️ |
enzomerca
left a comment
There was a problem hiding this comment.
por que não podemos chamar o b2b-bulk-import do front? entendo que podemos, da mesma forma que ele é chamado para a feature de importação.
@enzomerca |
What problem is this solving?
The B2B Admin needs to export organizations, cost centers, members, and addresses as CSV, but the export engine lives in
b2b-bulk-import(REST + XLSX). The admin frontend should not call that service directly or handle file conversion.This PR adds a GraphQL layer in
b2b-organizations-graphqlthat:createExportandexportStatusfor all four export typesb2b-bulk-importwith admin authGET /_v/private/b2b/export/:exportIdorganizationsandcost_centers; passes throughmembersandaddressesas returned by bulk-importThis unblocks the frontend export button work in
b2b-organizations.How to test it?
Workspace:
https://wender--b2bstoreqa.myvtex.com(link this branch withvtex link)Prerequisites: Admin user with
buyer_organization_view;b2b-bulk-importavailable on the account.Variables:
{ "exportType": "organizations" }(repeat forcost_centers,members,addresses).IN_PROGRESS→COMPLETEDlinkToFileshould appear only whenstatus === COMPLETEDexportedRows / totalRowswhen bulk-import returns0%linkToFilein the browser while logged into Admin, or:Auth: unauthenticated download should return
403 Access denied.Unit tests:
yarn testinnode/(includescsvConverter.test.ts).See
docs/README.mdfor full API details.Workspace
Screenshots or example usage: