-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Braintree - new components #19407
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
Braintree - new components #19407
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
WalkthroughAdds a Braintree integration: app-level GraphQL helper, GraphQL query/mutation modules, a create-customer action, a reusable polling source framework, two polling sources (new customer, new transaction), and package/version metadata updates. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Source as Polling Source
participant App as braintree.app (makeGraphQLRequest)
participant API as Braintree GraphQL
participant DB as Persisted DB
participant Events as Event Emitter
Source->>DB: _getLastCreatedAt()
DB-->>Source: lastCreatedAt
Source->>App: makeGraphQLRequest(query=search..., variables={createdAt >= lastCreatedAt})
App->>API: POST GraphQL request (basic auth, headers)
API-->>App: GraphQL response (edges -> nodes)
App-->>Source: response
loop for each result
Source->>Events: emitEvent(result, meta)
Events-->>Source: ack
Source->>DB: _setLastCreatedAt(result.createdAt) (update maxCreatedAt)
DB-->>Source: ack
end
sequenceDiagram
autonumber
participant Action as create-customer Action
participant App as braintree.app (makeGraphQLRequest)
participant API as Braintree GraphQL
Action->>App: makeGraphQLRequest(mutation=createCustomer, variables={input: { customer: {...} }})
App->>API: POST GraphQL mutation (basic auth, headers)
API-->>App: mutation response (created customer)
App-->>Action: response
Action-->>Caller: return response + summary("Customer successfully created with ID ...")
Estimated code review effort🎯 4 (Complex) | ⏱️ ~35–50 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 2 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
🔇 Additional comments (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 11
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (8)
components/braintree/actions/create-customer/create-customer.mjs(1 hunks)components/braintree/braintree.app.mjs(1 hunks)components/braintree/common/mutations.mjs(1 hunks)components/braintree/common/queries.mjs(1 hunks)components/braintree/package.json(2 hunks)components/braintree/sources/common/base-polling.mjs(1 hunks)components/braintree/sources/new-customer-created/new-customer-created.mjs(1 hunks)components/braintree/sources/new-transaction-created/new-transaction-created.mjs(1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-09-15T22:01:11.472Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 18362
File: components/leonardo_ai/actions/generate-image/generate-image.mjs:103-105
Timestamp: 2025-09-15T22:01:11.472Z
Learning: In Pipedream components, pipedream/platform's axios implementation automatically excludes undefined values from HTTP requests, so there's no need to manually check for truthiness before including properties in request payloads.
Applied to files:
components/braintree/braintree.app.mjs
📚 Learning: 2024-10-30T15:24:39.294Z
Learnt from: jcortes
Repo: PipedreamHQ/pipedream PR: 14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In `components/gainsight_px/actions/create-account/create-account.mjs`, the action name should be "Create Account" instead of "Create Memory".
Applied to files:
components/braintree/actions/create-customer/create-customer.mjs
📚 Learning: 2024-12-12T19:23:09.039Z
Learnt from: jcortes
Repo: PipedreamHQ/pipedream PR: 14935
File: components/sailpoint/package.json:15-18
Timestamp: 2024-12-12T19:23:09.039Z
Learning: When developing Pipedream components, do not add built-in Node.js modules like `fs` to `package.json` dependencies, as they are native modules provided by the Node.js runtime.
Applied to files:
components/braintree/package.json
🧬 Code graph analysis (1)
components/braintree/sources/new-customer-created/new-customer-created.mjs (2)
components/braintree/sources/common/base-polling.mjs (1)
lastCreatedAt(49-49)components/braintree/sources/new-transaction-created/new-transaction-created.mjs (1)
braintree(16-27)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: pnpm publish
- GitHub Check: Publish TypeScript components
- GitHub Check: Verify TypeScript components
- GitHub Check: Lint Code Base
🔇 Additional comments (3)
components/braintree/package.json (1)
3-17: LGTM!Version bump to 0.1.0 is appropriate for this feature addition, and the
@pipedream/platformdependency is correctly added to support the newaxios-based GraphQL request method.components/braintree/common/mutations.mjs (1)
1-21: LGTM!The GraphQL mutation is well-structured and returns a comprehensive set of customer fields. The export pattern is consistent with the queries module.
components/braintree/sources/common/base-polling.mjs (1)
18-23: LGTM: Clean date utility method.The
_yesterday()method correctly creates an ISO timestamp for 24 hours ago, providing a sensible default for initial polling.
components/braintree/sources/new-customer-created/new-customer-created.mjs
Show resolved
Hide resolved
components/braintree/sources/new-transaction-created/new-transaction-created.mjs
Show resolved
Hide resolved
components/braintree/sources/new-transaction-created/new-transaction-created.mjs
Show resolved
Hide resolved
jcortes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @michelle0927 lgtm! Ready for QA!
For Integration QA: |
|
Hello everyone, I have tested this PR and there're some test cases failed or needed improvement. Please check test reports below for more information:
|
|
@vunguyenhung I added error handling to display the GraphQL errors when they're returned. When I tested with the account in 1PW, I got an authentication error. I noticed that the |
|
Hi @michelle0927, thank you for your information. Definitely something miss on my end, will check and test again |
|
Hi everyone, all test cases are passed! Ready for release! Test reports
|
|
/approve |
|
/approve |
Resolves #13226
Summary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.