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

[3rd Party Feeds] Implement API calls for 3rd part workspace feeds v1 #49690

Open
dylanexpensify opened this issue Sep 25, 2024 · 17 comments
Open

Comments

@dylanexpensify
Copy link
Contributor

Coming from this thread, we have some clean up to-dos for the Third-party workspace feeds v1 initiative.

Copy link

melvin-bot bot commented Sep 25, 2024

Auto-assigning issues to engineers is no longer supported. If you think this issue should receive engineering attention, please raise it in #whatsnext.

@VickyStash
Copy link
Contributor

Hi, I'm Viktoryia from Callstack - expert contributor group - and I would like to work on this issue.

@robertjchen
Copy link
Contributor

robertjchen commented Sep 25, 2024

WorkspaceCompanyCardsPage.tsx

  • OpenPolicyCompanyCardsPage(policyID)

WorkspaceCompanyCardsListHeaderButtons.tsx

  • AssignCard(policyID, bankName, encryptedCardNumber, email, startDate, reportActionID)

WorkspaceCompanyCardsSettingsPage.tsx

WorkspaceCompanyCardFeedSelectorPage.tsx

WorkspaceMemberNewCardPage.tsx

  • OpenPolicyCompanyCardsFeed(policyID, bankName)
  • SetCardExportAccount(cardID, exportAccountDetails)
  • SetCardName(cardID, cardName)

CardSelectionStep.tsx

  • OpenPolicyCompanyCardsFeed() called earlier in the flow should already load the list of cards 🤔

@narefyev91
Copy link
Contributor

Hi, I'm Nicolay from Callstack - expert contributor group - will help here as well (from tomorrow).
Will pick:

  • WorkspaceCompanyCardsSettingsPage.tsx
  • WorkspaceMemberNewCardPage.tsx
    OpenPolicyCompanyCardsFeed(policyID, bankName)
    SetCardExportAccount(cardID, exportAccountDetails)
    SetCardName(cardID, cardName)

@joekaufmanexpensify
Copy link
Contributor

Assigned!

@VickyStash
Copy link
Contributor

@robertjchen I have a question about reportActionID for this API call:
AssignCard(policyID, bankName, encryptedCardNumber, email, startDate, reportActionID).

Is it for this message? Should I optimistically create it?
image

I'm asking cause it looks like we don't create similar messages optimistically while issuing Expensify Cards.
^^ @mountiny

@robertjchen
Copy link
Contributor

Interesting! That's a good point- if these messages are not being optimistically created, then the reportActionID is not needed 👍

@mountiny
Copy link
Contributor

@robertjchen I think it's a bit different thought, right? With Expensify cards, we have to talk to Marqeta, a third-party service, and so there is a higher chance of the call with fail, so we do not create the actions optimistically. In this case, when we already have the list of the available cards, there are fewer things that can cause it to fail, so I think we could consider adding these optimistically; what do you think, @robertjchen?

@robertjchen
Copy link
Contributor

That makes sense, that context definitely helps!

Since we already have all the info we need in Onyx at time of assignment, we can definitely do it optimistically which would make for a better user experience

@mountiny
Copy link
Contributor

@VickyStash Feel free to add the optimistic reportActionID param to the api call and create the action optimistically and we can add it to BE

@joekaufmanexpensify joekaufmanexpensify changed the title [Clean up] Implement API calls for 3rd part workspace feeds v1 [3rd Party Feeds] Implement API calls for 3rd part workspace feeds v1 Sep 26, 2024
@VickyStash
Copy link
Contributor

@robertjchen Could you say what action name this optimistic report action should have? I'm talking about the one created during AssignCard API call.

@robertjchen
Copy link
Contributor

@VickyStash It would be CARDASSIGNED

@VickyStash
Copy link
Contributor

I've prepared a Draft PR with:

  • AssignCard API call
  • Plain implementation of RequestFeedSetup API call
  • Support of CARDASSIGNED report action display
  • TODOs resolution

@robertjchen Please, let us know when RequestFeedSetup is deployed so we can start extensive testing of the functionality with the real data.

@melvin-bot melvin-bot bot removed the Overdue label Sep 30, 2024
@robertjchen
Copy link
Contributor

Yes, it appears to be under review at the moment 👍

@dylanexpensify
Copy link
Contributor Author

Making progress

@melvin-bot melvin-bot bot removed the Overdue label Oct 3, 2024
@VickyStash
Copy link
Contributor

Updates:

  • Updated params passed to RequestFeedSetup
  • Waiting for API fixes

@melvin-bot melvin-bot bot added the Overdue label Oct 7, 2024
@dylanexpensify
Copy link
Contributor Author

TY @VickyStash!

@melvin-bot melvin-bot bot removed the Overdue label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Release 2: Summer 2024 (Aug)
Development

No branches or pull requests

6 participants