-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Payrexx - new components #18622
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
Payrexx - new components #18622
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
WalkthroughAdds a Payrexx app implementation with signed HTTP requests, prop definitions, and API wrapper methods, plus seven new action modules for creating/deleting gateways/paylinks/invoices, creating manual payouts, listing invoices, and updates package metadata. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor U as User / Trigger
participant A as Action (e.g., Create Paylink)
participant P as Payrexx App
participant API as Payrexx API
U->>A: Trigger action with inputs
A->>P: this.payrexx.method({ $, data/ids })
P->>P: _authParams() → instance + ApiSignature
P->>P: _makeRequest() assemble URL, headers, params/body
P->>API: HTTP request (path, method, headers, params/body)
API-->>P: HTTP response
P-->>A: Return response (or throw on error)
A-->>U: Export `$summary` and return response
rect rgba(230,247,255,0.5)
note right of P: New/changed behaviors:<br/>• HMAC ApiSignature signing<br/>• Centralized _makeRequest<br/>• PropDefinitions powering action props
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
🧰 Additional context used🧬 Code graph analysis (1)components/payrexx/actions/delete-invoice/delete-invoice.mjs (4)
⏰ 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 (3)
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: 4
🧹 Nitpick comments (1)
components/payrexx/actions/create-manual-payout/create-manual-payout.mjs (1)
28-32
: Consider using a select input for PSP ID.The pspId prop accepts any string but only two values are valid (44 for Swiss Collecting, 36 for Payrexx Direct). Consider using an options array to constrain the input and improve UX.
Apply this diff to make pspId a select input:
pspId: { - type: "string", + type: "string", + options: [ + { label: "Swiss Collecting", value: "44" }, + { label: "Payrexx Direct", value: "36" }, + ], label: "PSP ID", description: "ID of the PSP from which the payout is to be triggered. 44 for Swiss Collecting and 36 for Payrexx Direct", },
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (9)
components/payrexx/actions/create-gateway/create-gateway.mjs
(1 hunks)components/payrexx/actions/create-manual-payout/create-manual-payout.mjs
(1 hunks)components/payrexx/actions/create-paylink/create-paylink.mjs
(1 hunks)components/payrexx/actions/delete-gateway/delete-gateway.mjs
(1 hunks)components/payrexx/actions/delete-invoice/delete-invoice.mjs
(1 hunks)components/payrexx/actions/list-invoices/list-invoices.mjs
(1 hunks)components/payrexx/actions/remove-paylink/remove-paylink.mjs
(1 hunks)components/payrexx/package.json
(2 hunks)components/payrexx/payrexx.app.mjs
(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (8)
components/payrexx/actions/remove-paylink/remove-paylink.mjs (3)
components/payrexx/actions/delete-gateway/delete-gateway.mjs (1)
response
(24-27)components/payrexx/actions/delete-invoice/delete-invoice.mjs (1)
response
(27-30)components/payrexx/payrexx.app.mjs (1)
response
(80-90)
components/payrexx/actions/delete-gateway/delete-gateway.mjs (3)
components/payrexx/actions/delete-invoice/delete-invoice.mjs (1)
response
(27-30)components/payrexx/actions/remove-paylink/remove-paylink.mjs (1)
response
(24-27)components/payrexx/payrexx.app.mjs (1)
response
(80-90)
components/payrexx/actions/create-manual-payout/create-manual-payout.mjs (3)
components/payrexx/actions/create-gateway/create-gateway.mjs (1)
response
(48-57)components/payrexx/actions/create-paylink/create-paylink.mjs (1)
response
(63-75)components/payrexx/payrexx.app.mjs (1)
response
(80-90)
components/payrexx/actions/create-paylink/create-paylink.mjs (2)
components/payrexx/actions/create-gateway/create-gateway.mjs (1)
response
(48-57)components/payrexx/payrexx.app.mjs (1)
response
(80-90)
components/payrexx/actions/create-gateway/create-gateway.mjs (2)
components/payrexx/actions/create-paylink/create-paylink.mjs (1)
response
(63-75)components/payrexx/payrexx.app.mjs (1)
response
(80-90)
components/payrexx/actions/delete-invoice/delete-invoice.mjs (3)
components/payrexx/actions/delete-gateway/delete-gateway.mjs (1)
response
(24-27)components/payrexx/actions/remove-paylink/remove-paylink.mjs (1)
response
(24-27)components/payrexx/payrexx.app.mjs (1)
response
(80-90)
components/payrexx/actions/list-invoices/list-invoices.mjs (2)
components/payrexx/actions/create-gateway/create-gateway.mjs (1)
response
(48-57)components/payrexx/payrexx.app.mjs (1)
response
(80-90)
components/payrexx/payrexx.app.mjs (7)
components/payrexx/actions/create-gateway/create-gateway.mjs (1)
response
(48-57)components/payrexx/actions/create-manual-payout/create-manual-payout.mjs (1)
response
(41-49)components/payrexx/actions/create-paylink/create-paylink.mjs (1)
response
(63-75)components/payrexx/actions/delete-gateway/delete-gateway.mjs (1)
response
(24-27)components/payrexx/actions/delete-invoice/delete-invoice.mjs (1)
response
(27-30)components/payrexx/actions/list-invoices/list-invoices.mjs (1)
response
(18-20)components/payrexx/actions/remove-paylink/remove-paylink.mjs (1)
response
(24-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 (20)
components/payrexx/package.json (1)
3-3
: LGTM! Version bump and dependency addition are appropriate.The version bump to 0.1.0 correctly reflects the addition of new features (7 new action components). The @pipedream/platform ^3.1.0 dependency is the latest stable version and provides the necessary runtime helpers for the new actions.
Also applies to: 15-17
components/payrexx/actions/create-paylink/create-paylink.mjs (3)
3-13
: LGTM! Action metadata is well-structured.The action metadata follows Pipedream conventions with appropriate annotations (openWorldHint for external API calls, destructiveHint: false since this creates a resource).
16-60
: Props structure looks good.The mix of inline prop definitions (title, description, referenceId) and propDefinitions (purpose, amount, currency, vatRate, sku) provides good balance between specificity and reusability.
62-79
: Clarify error handling and response shape.
- Axios (via the Pipedream wrapper) throws on non-2xx responses—wrap this call in a
try/catch
here only if you need custom error messages or retry logic.- Verify that the Payrexx API indeed returns the created paylink as the first element in
response.data
(soresponse.data[0]?.id
is always defined).components/payrexx/actions/list-invoices/list-invoices.mjs (2)
3-13
: LGTM! Correct annotations for a read-only list operation.The
readOnlyHint: true
annotation correctly reflects that this action only retrieves data without modifying resources.
17-24
: Verify response structure and consider array safety.The summary assumes
response.data
is an array (response.data?.length
). If the API returns a different structure, this could produce misleading output.Verify the listInvoices response structure:
components/payrexx/actions/remove-paylink/remove-paylink.mjs (2)
3-13
: LGTM! Correct destructive annotation.The
destructiveHint: true
annotation correctly flags this as a destructive operation that removes a resource.
23-31
: Consistent pattern for delete operations.The action correctly uses the input
paylinkId
in the summary rather than extracting an ID from the response, which is appropriate for delete operations that may return minimal data.components/payrexx/actions/delete-invoice/delete-invoice.mjs (1)
26-34
: Delete operation pattern is consistent.The run method correctly follows the delete operation pattern, using the input invoiceId in the summary.
components/payrexx/actions/create-manual-payout/create-manual-payout.mjs (1)
40-53
: Run method follows established pattern.The implementation is consistent with other create actions (create-gateway, create-paylink), using the same response structure assumption.
components/payrexx/actions/create-gateway/create-gateway.mjs (3)
3-13
: LGTM! Standard action structure.The action follows Pipedream conventions with appropriate metadata and annotations.
14-46
: Excellent use of propDefinitions.All props leverage propDefinitions from the payrexx app, promoting consistency and reusability across actions.
47-61
: Run method is well-structured.The implementation follows the established pattern for create actions with clear data mapping and appropriate summary generation.
components/payrexx/actions/delete-gateway/delete-gateway.mjs (2)
3-13
: LGTM! Appropriate destructive annotation.The action correctly flags the destructive nature of the delete operation.
23-32
: Consistent delete operation implementation.The run method correctly follows the established pattern for delete operations, using the input gatewayId in the summary.
components/payrexx/payrexx.app.mjs (5)
1-4
: LGTM!The imports are appropriate:
axios
andConfigurationError
from@pipedream/platform
, and Node's built-incrypto
for HMAC signing.
63-65
: LGTM!The base URL is correctly defined. The hardcoded API version (v1.11) is typical for Pipedream integrations when the API version is stable.
77-95
: LGTM!The
_makeRequest
method correctly:
- Constructs the full URL with base path
- Sets authentication via
X-API-KEY
header and query params- Merges auth parameters into the request
- Handles Payrexx API-level errors by checking
response.status === "error"
96-101
: LGTM!The
listInvoices
method correctly calls the Payrexx/Bill/
endpoint (Payrexx's terminology for invoices).
102-122
: LGTM!The create methods (
createGateway
,createPaylink
,createManualPayout
) correctly use POST requests to the appropriate Payrexx endpoints.
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.
LGTM!
* upstream/master: Adding app scaffolding for stackby Airtop new components (PipedreamHQ#18637) Sinch - new components (PipedreamHQ#18635) Mintlify - new components (PipedreamHQ#18519) Linear App - updates and new components (PipedreamHQ#18606) Merging pull request PipedreamHQ#18622 Adding app scaffolding for airtop
Resolves #17567
Summary by CodeRabbit