-
Notifications
You must be signed in to change notification settings - Fork 5.4k
17714 kustomer #17814
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
base: master
Are you sure you want to change the base?
17714 kustomer #17814
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
WalkthroughThis update introduces four new Kustomer actions for managing custom objects: retrieving by ID, by external ID, listing, and updating by ID. Supporting methods and property definitions are added to the Kustomer app module. Additionally, several existing actions and sources receive a version bump, and the package version and a dependency are updated. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Action
participant KustomerApp
participant KustomerAPI
User->>Action: Trigger action (get/list/update custom object)
Action->>KustomerApp: Call method (e.g., getCustomObjectById)
KustomerApp->>KustomerAPI: Make API request (GET/PUT)
KustomerAPI-->>KustomerApp: Return response
KustomerApp-->>Action: Return processed data
Action-->>User: Return result or error
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~15–20 minutes Suggested reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
components/kustomer/actions/create-customer/create-customer.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs components/kustomer/actions/create-conversation/create-conversation.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs components/kustomer/actions/get-custom-object-by-external-id/get-custom-object-by-external-id.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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: 1
📜 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 (15)
components/kustomer/actions/create-conversation/create-conversation.mjs
(1 hunks)components/kustomer/actions/create-customer/create-customer.mjs
(1 hunks)components/kustomer/actions/get-custom-object-by-external-id/get-custom-object-by-external-id.mjs
(1 hunks)components/kustomer/actions/get-custom-object-by-id/get-custom-object-by-id.mjs
(1 hunks)components/kustomer/actions/get-custom-objects/get-custom-objects.mjs
(1 hunks)components/kustomer/actions/update-conversation/update-conversation.mjs
(1 hunks)components/kustomer/actions/update-custom-object-by-id/update-custom-object-by-id.mjs
(1 hunks)components/kustomer/actions/update-customer/update-customer.mjs
(1 hunks)components/kustomer/kustomer.app.mjs
(2 hunks)components/kustomer/package.json
(2 hunks)components/kustomer/sources/new-conversation-instant/new-conversation-instant.mjs
(1 hunks)components/kustomer/sources/new-customer-instant/new-customer-instant.mjs
(1 hunks)components/kustomer/sources/new-message-instant/new-message-instant.mjs
(1 hunks)components/kustomer/sources/updated-conversation-instant/updated-conversation-instant.mjs
(1 hunks)components/kustomer/sources/updated-customer-instant/updated-customer-instant.mjs
(1 hunks)
🧰 Additional context used
🧠 Learnings (12)
components/kustomer/actions/update-customer/update-customer.mjs (1)
Learnt from: jcortes
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".
components/kustomer/sources/updated-customer-instant/updated-customer-instant.mjs (2)
Learnt from: GTFalcao
PR: #15376
File: components/monday/sources/name-updated/name-updated.mjs:6-6
Timestamp: 2025-01-23T03:55:15.166Z
Learning: Source names in Monday.com components don't need to start with "New" if they emit events for updated items (e.g., "Name Updated", "Column Value Updated") rather than new items. This follows the component guidelines exception where the "New" prefix is only required when emits are limited to new items.
Learnt from: GTFalcao
PR: #14265
File: components/the_magic_drip/sources/common.mjs:35-43
Timestamp: 2024-10-10T19:18:27.998Z
Learning: In components/the_magic_drip/sources/common.mjs
, when processing items in getAndProcessData
, savedIds
is intentionally updated with IDs of both emitted and non-emitted items to avoid emitting retroactive events upon first deployment and ensure only new events are emitted as they occur.
components/kustomer/package.json (1)
Learnt from: jcortes
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.
components/kustomer/actions/update-conversation/update-conversation.mjs (1)
Learnt from: jcortes
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".
components/kustomer/actions/create-customer/create-customer.mjs (1)
Learnt from: jcortes
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".
components/kustomer/sources/new-message-instant/new-message-instant.mjs (1)
Learnt from: GTFalcao
PR: #15376
File: components/monday/sources/name-updated/name-updated.mjs:6-6
Timestamp: 2025-01-23T03:55:15.166Z
Learning: Source names in Monday.com components don't need to start with "New" if they emit events for updated items (e.g., "Name Updated", "Column Value Updated") rather than new items. This follows the component guidelines exception where the "New" prefix is only required when emits are limited to new items.
components/kustomer/sources/new-customer-instant/new-customer-instant.mjs (1)
Learnt from: GTFalcao
PR: #15376
File: components/monday/sources/name-updated/name-updated.mjs:6-6
Timestamp: 2025-01-23T03:55:15.166Z
Learning: Source names in Monday.com components don't need to start with "New" if they emit events for updated items (e.g., "Name Updated", "Column Value Updated") rather than new items. This follows the component guidelines exception where the "New" prefix is only required when emits are limited to new items.
components/kustomer/actions/create-conversation/create-conversation.mjs (1)
Learnt from: jcortes
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".
components/kustomer/sources/updated-conversation-instant/updated-conversation-instant.mjs (1)
Learnt from: GTFalcao
PR: #15376
File: components/monday/sources/name-updated/name-updated.mjs:6-6
Timestamp: 2025-01-23T03:55:15.166Z
Learning: Source names in Monday.com components don't need to start with "New" if they emit events for updated items (e.g., "Name Updated", "Column Value Updated") rather than new items. This follows the component guidelines exception where the "New" prefix is only required when emits are limited to new items.
components/kustomer/actions/get-custom-objects/get-custom-objects.mjs (2)
Learnt from: GTFalcao
PR: #12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the run
method of an action, ensure the message is correctly formatted. For example, in the hackerone-get-members
action, the correct format is Successfully retrieved ${response.data.length} members
.
Learnt from: GTFalcao
PR: #12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the run
method of an action, ensure the message is correctly formatted. For example, in the hackerone-get-members
action, the correct format is Successfully retrieved ${response.data.length} members
.
components/kustomer/actions/get-custom-object-by-external-id/get-custom-object-by-external-id.mjs (3)
Learnt from: jcortes
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".
Learnt from: GTFalcao
PR: #12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the run
method of an action, ensure the message is correctly formatted. For example, in the hackerone-get-members
action, the correct format is Successfully retrieved ${response.data.length} members
.
Learnt from: GTFalcao
PR: #12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the run
method of an action, ensure the message is correctly formatted. For example, in the hackerone-get-members
action, the correct format is Successfully retrieved ${response.data.length} members
.
components/kustomer/kustomer.app.mjs (3)
Learnt from: GTFalcao
PR: #16954
File: components/salesloft/salesloft.app.mjs:14-23
Timestamp: 2025-06-04T17:52:05.780Z
Learning: In the Salesloft API integration (components/salesloft/salesloft.app.mjs), the _makeRequest method returns response.data which directly contains arrays for list endpoints like listPeople, listCadences, listUsers, and listAccounts. The propDefinitions correctly call .map() directly on these responses without needing to destructure a nested data property.
Learnt from: GTFalcao
PR: #12697
File: components/salesforce_rest_api/sources/common-webhook-methods.mjs:1-71
Timestamp: 2024-10-08T15:33:38.240Z
Learning: The common-webhook-methods.mjs
object is designed to be extended, similar to an abstract class, and intentionally does not implement certain methods like generateWebhookMeta
and getEventType
to enforce implementation in subclasses.
Learnt from: GTFalcao
PR: #12697
File: components/salesforce_rest_api/sources/common-webhook-methods.mjs:1-71
Timestamp: 2024-07-24T02:06:47.016Z
Learning: The common-webhook-methods.mjs
object is designed to be extended, similar to an abstract class, and intentionally does not implement certain methods like generateWebhookMeta
and getEventType
to enforce implementation in subclasses.
🧬 Code Graph Analysis (1)
components/kustomer/actions/get-custom-object-by-id/get-custom-object-by-id.mjs (1)
components/kustomer/actions/get-custom-object-by-external-id/get-custom-object-by-external-id.mjs (1)
response
(26-30)
⏰ 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: Lint Code Base
- GitHub Check: pnpm publish
- GitHub Check: Verify TypeScript components
- GitHub Check: Publish TypeScript components
🔇 Additional comments (23)
components/kustomer/kustomer.app.mjs (7)
130-150
: LGTM! The klassName propDefinition follows established patterns.The implementation correctly follows the existing pattern for async options with proper pagination parameters and data mapping. The destructuring of
attributes: { name: value, displayName: label }
appropriately maps the API response structure.
151-172
: LGTM! The customObjectId propDefinition correctly depends on klassName.The implementation properly handles the dependency on
klassName
parameter and follows the established pagination pattern. The data mapping usingattributes: { title: label }
is appropriate for custom objects.
373-378
: LGTM! The listKlasses method follows the established pattern.The implementation is consistent with other list methods in the module, using the correct path
/klasses
and following the same _makeRequest pattern.
379-386
: LGTM! The listCustomObjects method correctly handles the nested resource structure.The method properly destructures the
klassName
parameter and constructs the correct path/klasses/${klassName}
for the nested resource. The parameter handling follows established patterns.
387-396
: LGTM! The getCustomObjectById method correctly implements the nested resource path.The method properly handles both
klassName
andcustomObjectId
parameters to construct the correct path/klasses/${klassName}/${customObjectId}
. The parameter destructuring and path construction are appropriate.
397-406
: LGTM! The getCustomObjectByExternalId method uses the correct API path format.The method correctly constructs the path
/klasses/${klassName}/externalId=${externalId}
which appears to follow the Kustomer API convention for external ID lookups. Parameter handling is consistent with other methods.
407-417
: LGTM! The updateCustomObjectById method correctly implements the PUT operation.The method properly uses the PUT HTTP method and constructs the correct nested resource path. The parameter destructuring follows the established pattern used throughout the module.
components/kustomer/sources/new-conversation-instant/new-conversation-instant.mjs (1)
9-9
: LGTM! Version increment aligns with package updates.The version bump from "0.0.1" to "0.0.2" is consistent with the package version increment and other component updates in this PR.
components/kustomer/package.json (2)
3-3
: LGTM! Minor version bump appropriately reflects new custom object features.The version increment from "0.1.0" to "0.2.0" correctly follows semantic versioning for the addition of new custom object functionality.
16-16
: LGTM! Platform dependency update follows semantic versioning.The update from "^3.0.3" to "^3.1.0" is a reasonable minor version update that should maintain compatibility while potentially providing new features.
components/kustomer/sources/new-message-instant/new-message-instant.mjs (1)
9-9
: LGTM! Version increment maintains consistency across components.The version bump from "0.0.1" to "0.0.2" is consistent with other source components in this PR and aligns with the overall package update strategy.
components/kustomer/actions/update-conversation/update-conversation.mjs (1)
10-10
: LGTM! Version increment maintains consistency across action components.The version bump from "0.0.1" to "0.0.2" is consistent with other action components in this PR and follows the coordinated version update strategy.
components/kustomer/actions/create-conversation/create-conversation.mjs (1)
10-10
: Version bump looks goodNo functional changes detected. 👍
components/kustomer/sources/updated-conversation-instant/updated-conversation-instant.mjs (1)
9-9
: Aligned version incrementConsistent with other components in this release. ✔️
components/kustomer/sources/updated-customer-instant/updated-customer-instant.mjs (1)
9-9
: Version update acknowledgedMatches the coordinated 0.0.2 rollout. ✅
components/kustomer/actions/update-customer/update-customer.mjs (1)
10-10
: Semantic version bump acceptedNo code changes beyond metadata. Looks good. 🟢
components/kustomer/sources/new-customer-instant/new-customer-instant.mjs (1)
9-9
: Minor version bump OKConsistent with the rest of the Kustomer package. 👍
components/kustomer/actions/create-customer/create-customer.mjs (1)
10-10
: LGTM! Version bump aligns with the broader integration update.The version increment from "0.0.1" to "0.0.2" is appropriate and maintains consistency with other Kustomer components being updated in this PR.
components/kustomer/actions/get-custom-object-by-id/get-custom-object-by-id.mjs (1)
1-42
: Well-structured action implementation with robust error handling.The action follows Pipedream conventions well:
- Proper use of ConfigurationError for API errors
- Dynamic property definitions with klassName dependency
- Clear summary message formatting
- Consistent API method call pattern
The implementation looks solid and follows patterns established by similar actions in the codebase.
components/kustomer/actions/get-custom-objects/get-custom-objects.mjs (1)
1-41
: Excellent implementation with proper summary formatting.The action is well-implemented with:
- Clear ISO 8601 date format specification for the
fromDate
parameter- Proper error handling consistent with other actions
- Correct summary message format that follows established patterns (using
response.data.length
)- Good use of optional filtering parameter
The implementation aligns with best practices and retrieved learnings about summary message formatting.
components/kustomer/actions/get-custom-object-by-external-id/get-custom-object-by-external-id.mjs (1)
1-38
: Consistent implementation with appropriate design choices.The action maintains consistency with the "by-id" variant while making appropriate design decisions:
- Uses static string input for
externalId
(appropriate for user-provided identifiers)- Maintains the same error handling and summary message patterns
- Proper use of the
klassName
propDefinition for class selectionThe implementation is clean and follows established patterns.
components/kustomer/actions/update-custom-object-by-id/update-custom-object-by-id.mjs (2)
1-97
: Comprehensive update action with proper JSON handling.The action provides extensive update capabilities with:
- Comprehensive set of optional update fields (externalId, title, description, data, custom, tags, rev)
- Proper use of
parseObject
utility for JSON fields to safely handle string inputs- Appropriate mix of propDefinitions and static property definitions
- Consistent error handling and summary message patterns
The implementation handles the complexity of update operations well while maintaining code clarity.
84-86
: Good practice: Safe JSON parsing for object fields.The use of
parseObject()
for thedata
,custom
, andtags
fields ensures safe handling of JSON string inputs while gracefully handling cases where the values might already be objects.
components/kustomer/actions/get-custom-object-by-id/get-custom-object-by-id.mjs
Show resolved
Hide resolved
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!
Resolves #17714
Summary by CodeRabbit
New Features
Bug Fixes
Chores