-
Notifications
You must be signed in to change notification settings - Fork 18
GoogleContacts - remove component duplicates #615
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: dev
Are you sure you want to change the base?
Conversation
## Walkthrough
This change removes all legacy Google Contacts components and their implementation files from the codebase. It deletes modules for creating, updating, deleting, searching, and listing contacts and contact groups, along with their respective component descriptors and the OAuth2 authentication module. Only minor description updates remain in the new "core" Google Contacts component configurations.
## Changes
| Files | Change Summary |
|---------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|
| src/appmixer/googleContacts/AddorRemoveContactsfromGroup/*<br>src/appmixer/googleContacts/CreateContact/*<br>src/appmixer/googleContacts/CreateContactGroup/*<br>src/appmixer/googleContacts/DeleteContact/*<br>src/appmixer/googleContacts/DeleteContactGroup/*<br>src/appmixer/googleContacts/FindContactGroups/*<br>src/appmixer/googleContacts/FindMyContacts/*<br>src/appmixer/googleContacts/FindOtherContacts/*<br>src/appmixer/googleContacts/GetContact/*<br>src/appmixer/googleContacts/GetContactGroup/*<br>src/appmixer/googleContacts/SearchContacts/*<br>src/appmixer/googleContacts/SearchDirectoryContacts/*<br>src/appmixer/googleContacts/UpdateContact/*<br>src/appmixer/googleContacts/UpdateContactGroup/* | Deleted all legacy Google Contacts modules and their respective component.json descriptors. |
| src/appmixer/google/contacts/* | Deleted all legacy Google Contacts modules, component descriptors, OAuth2 authentication module, schemas, and utility libraries. |
| src/appmixer/googleContacts/core/FindContacts/component.json | Updated description to clarify search is performed using a query. |
| src/appmixer/googleContacts/core/FindDirectoryContacts/component.json | Updated description to specify search is performed using a query. |
| src/appmixer/googleContacts/core/ListOtherContacts/component.json | Updated description to clarify which contacts are listed as "Other contacts." |
| src/appmixer/googleContacts/core/ListContactGroups/ListContactGroups.js | Added safety check before mapping contact groups to avoid errors if data is missing or malformed. |
| src/appmixer/googleContacts/core/ListMyContacts/ListMyContacts.js | Added safety check before mapping contacts to avoid errors if data is missing or malformed. |
| src/appmixer/googleContacts/core/ListOtherContacts/ListOtherContacts.js | Added safety check before mapping other contacts to avoid errors if data is missing or malformed. |
| src/appmixer/googleContacts/core/ListContactGroups/component.json | Updated output port source URL to include "core" subdirectory in path. |
| src/appmixer/googleContacts/core/ListMyContacts/component.json | Updated output port source URL to include "core" subdirectory in path. |
| src/appmixer/googleContacts/core/ListOtherContacts/component.json | Updated output port source URL to include "core" subdirectory in path. |
| src/appmixer/googleContacts/core/FindContacts/FindContacts.js | Updated API endpoint to use `searchContacts` with sources parameter; adjusted response parsing and logging. |
| src/appmixer/googleContacts/core/UpdateContact/UpdateContact.js | Corrected property name from `emails` to `emailAddresses` in update payload to match API expectations. |
## Possibly related PRs
- [clientIO/appmixer-connectors#592](https://github.com/clientIO/appmixer-connectors/pull/592): Adds the "AddorRemoveContactsfromGroup" module and its component, which are removed in this PR; directly related as inverse operations.
- [clientIO/appmixer-connectors#528](https://github.com/clientIO/appmixer-connectors/pull/528): Introduces the same add/remove contacts from group module and component that this PR deletes; directly related as inverse operations.
- [clientIO/appmixer-connectors#603](https://github.com/clientIO/appmixer-connectors/pull/603): Adds new "core" versions of the same Google Contacts components removed here, suggesting this PR deletes legacy versions replaced by those introduced in #603.
## Suggested reviewers
- vtalas 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
npm error Exit handler never called! 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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: 3
🔭 Outside diff range comments (1)
src/appmixer/googleContacts/core/FindDirectoryContacts/component.json (1)
85-86
:icon
must be an SVG URL, not an inline PNGGuidelines: “icon property, if present, must be a link to an SVG icon.”
Current value is a large base-64 PNG → bloats manifest and violates spec.- "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAY..." + "icon": "https://static.appmixer.com/icons/googleContacts.svg"
🧹 Nitpick comments (2)
src/appmixer/googleContacts/core/ListOtherContacts/component.json (1)
4-4
: Minor wording polishConsider hyphenating “auto-created” to improve readability:
- "description": "List all \"Other contacts\", that is contacts that are not in a contact group. \"Other contacts\" are typically auto created contacts from interactions.", + "description": "List all \"Other contacts\" – contacts that are not in a contact group. \"Other contacts\" are typically auto-created from interactions.",src/appmixer/googleContacts/core/FindDirectoryContacts/component.json (1)
30-42
: Non-contiguous inspectorindex
values
query
isindex: 0
,outputType
isindex: 2
(skips 1).
Not harmful but breaks visual ordering conventions and may confuse inspector rendering logic.- "index": 2, + "index": 1,
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (31)
src/appmixer/googleContacts/AddorRemoveContactsfromGroup/AddorRemoveContactsfromGroup.js
(0 hunks)src/appmixer/googleContacts/AddorRemoveContactsfromGroup/component.json
(0 hunks)src/appmixer/googleContacts/CreateContact/CreateContact.js
(0 hunks)src/appmixer/googleContacts/CreateContact/component.json
(0 hunks)src/appmixer/googleContacts/CreateContactGroup/CreateContactGroup.js
(0 hunks)src/appmixer/googleContacts/CreateContactGroup/component.json
(0 hunks)src/appmixer/googleContacts/DeleteContact/DeleteContact.js
(0 hunks)src/appmixer/googleContacts/DeleteContact/component.json
(0 hunks)src/appmixer/googleContacts/DeleteContactGroup/DeleteContactGroup.js
(0 hunks)src/appmixer/googleContacts/DeleteContactGroup/component.json
(0 hunks)src/appmixer/googleContacts/FindContactGroups/FindContactGroups.js
(0 hunks)src/appmixer/googleContacts/FindContactGroups/component.json
(0 hunks)src/appmixer/googleContacts/FindMyContacts/FindMyContacts.js
(0 hunks)src/appmixer/googleContacts/FindMyContacts/component.json
(0 hunks)src/appmixer/googleContacts/FindOtherContacts/FindOtherContacts.js
(0 hunks)src/appmixer/googleContacts/FindOtherContacts/component.json
(0 hunks)src/appmixer/googleContacts/GetContact/GetContact.js
(0 hunks)src/appmixer/googleContacts/GetContact/component.json
(0 hunks)src/appmixer/googleContacts/GetContactGroup/GetContactGroup.js
(0 hunks)src/appmixer/googleContacts/GetContactGroup/component.json
(0 hunks)src/appmixer/googleContacts/SearchContacts/SearchContacts.js
(0 hunks)src/appmixer/googleContacts/SearchContacts/component.json
(0 hunks)src/appmixer/googleContacts/SearchDirectoryContacts/SearchDirectoryContacts.js
(0 hunks)src/appmixer/googleContacts/SearchDirectoryContacts/component.json
(0 hunks)src/appmixer/googleContacts/UpdateContact/UpdateContact.js
(0 hunks)src/appmixer/googleContacts/UpdateContact/component.json
(0 hunks)src/appmixer/googleContacts/UpdateContactGroup/UpdateContactGroup.js
(0 hunks)src/appmixer/googleContacts/UpdateContactGroup/component.json
(0 hunks)src/appmixer/googleContacts/core/FindContacts/component.json
(1 hunks)src/appmixer/googleContacts/core/FindDirectoryContacts/component.json
(1 hunks)src/appmixer/googleContacts/core/ListOtherContacts/component.json
(1 hunks)
💤 Files with no reviewable changes (28)
- src/appmixer/googleContacts/DeleteContactGroup/DeleteContactGroup.js
- src/appmixer/googleContacts/GetContact/component.json
- src/appmixer/googleContacts/DeleteContact/DeleteContact.js
- src/appmixer/googleContacts/AddorRemoveContactsfromGroup/AddorRemoveContactsfromGroup.js
- src/appmixer/googleContacts/DeleteContactGroup/component.json
- src/appmixer/googleContacts/FindContactGroups/component.json
- src/appmixer/googleContacts/UpdateContactGroup/UpdateContactGroup.js
- src/appmixer/googleContacts/UpdateContact/UpdateContact.js
- src/appmixer/googleContacts/GetContactGroup/GetContactGroup.js
- src/appmixer/googleContacts/FindContactGroups/FindContactGroups.js
- src/appmixer/googleContacts/DeleteContact/component.json
- src/appmixer/googleContacts/SearchDirectoryContacts/SearchDirectoryContacts.js
- src/appmixer/googleContacts/GetContact/GetContact.js
- src/appmixer/googleContacts/SearchContacts/component.json
- src/appmixer/googleContacts/CreateContactGroup/component.json
- src/appmixer/googleContacts/FindMyContacts/component.json
- src/appmixer/googleContacts/UpdateContactGroup/component.json
- src/appmixer/googleContacts/CreateContact/CreateContact.js
- src/appmixer/googleContacts/FindMyContacts/FindMyContacts.js
- src/appmixer/googleContacts/UpdateContact/component.json
- src/appmixer/googleContacts/AddorRemoveContactsfromGroup/component.json
- src/appmixer/googleContacts/FindOtherContacts/FindOtherContacts.js
- src/appmixer/googleContacts/CreateContact/component.json
- src/appmixer/googleContacts/FindOtherContacts/component.json
- src/appmixer/googleContacts/SearchContacts/SearchContacts.js
- src/appmixer/googleContacts/CreateContactGroup/CreateContactGroup.js
- src/appmixer/googleContacts/SearchDirectoryContacts/component.json
- src/appmixer/googleContacts/GetContactGroup/component.json
🧰 Additional context used
📓 Path-based instructions (2)
`src/appmixer/**`: Use `src/appmixer` for source code of connectors.
src/appmixer/**
: Usesrc/appmixer
for source code of connectors.
📄 Source: CodeRabbit Inference Engine (.github/copilot-instructions.md)
List of files the instruction was applied to:
src/appmixer/googleContacts/core/FindDirectoryContacts/component.json
src/appmixer/googleContacts/core/FindContacts/component.json
src/appmixer/googleContacts/core/ListOtherContacts/component.json
`src/appmixer/*/core/*/component.json`: Each component must have a `component.js...
src/appmixer/*/core/*/component.json
: Each component must have acomponent.json
file in its folder under core.
If adding a new field to component.json, add the field to bothschema
andinspector
sections in theinPorts
array, following JSON schema format.
Thecomponent.json
file must have aname
property in the format 'vendor.connectorName.core.componentName'.
Thecomponent.json
file must define thelabel
,description
, andauthor
properties as described in the schema.
Thecomponent.json
file must defineinPorts
andoutPorts
arrays according to the schema, with each port having the required structure.
Thecomponent.json
file must not have additional properties beyond those defined in the schema.
Thecomponent.json
file must define theversion
property, e.g., '1.0.0'.
Thecomponent.json
file'sauth
property, if present, must have aservice
property in the format [vendor]:[service].
Thecomponent.json
file'squota
property, if present, must reference a quota manager and resources as described in the schema.
Thecomponent.json
file'sproperties
object, if present, must defineschema
andinspector
according to the definitions.
Thecomponent.json
file'sinPorts
array must define each input port with a name and configuration, allowing placeholders for variables.
Thecomponent.json
file'soutPorts
array must define each output port with a name and optionally an options array describing output structure.
Thecomponent.json
file'sinspector
property, if present, must follow the Rappid Inspector definition format or use a dynamic source.
Thecomponent.json
file'sname
property must match the pattern ^[\w]+.[\w]+.[\w]+.[\w]+$.
Thecomponent.json
file'sicon
property, if present, must be a link to an SVG icon.
Thecomponent.json
file'stick
property, if present and true, indicates the component will receive signals at regular intervals.
Thecomponent.json
file'swebhook
property, if present and true, enables webhook functionality for the component.
Thecomponent.json
file'sstate
property, if present, must define apersistent
boolean.
Thecomponent.json
file'soptions
property, if present, must be an array of unique objects or strings.
Thecomponent.json
file'sinspectorInput
property, if present, must follow the defined schema for inspector inputs.
📄 Source: CodeRabbit Inference Engine (.github/copilot-instructions.md)
List of files the instruction was applied to:
src/appmixer/googleContacts/core/FindDirectoryContacts/component.json
src/appmixer/googleContacts/core/FindContacts/component.json
src/appmixer/googleContacts/core/ListOtherContacts/component.json
🧠 Learnings (3)
src/appmixer/googleContacts/core/FindDirectoryContacts/component.json (10)
Learnt from: CR
PR: clientIO/appmixer-connectors#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T09:09:52.832Z
Learning: Applies to src/appmixer/*/core/*/component.json : The `component.json` file must define the `label`, `description`, and `author` properties as described in the schema.
Learnt from: CR
PR: clientIO/appmixer-connectors#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T09:09:52.832Z
Learning: Applies to src/appmixer/*/core/*/component.json : The `component.json` file must not have additional properties beyond those defined in the schema.
Learnt from: CR
PR: clientIO/appmixer-connectors#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T09:09:52.832Z
Learning: Applies to src/appmixer/*/core/*/component.json : The `component.json` file must have a `name` property in the format 'vendor.connectorName.core.componentName'.
Learnt from: CR
PR: clientIO/appmixer-connectors#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T09:09:52.832Z
Learning: Applies to src/appmixer/*/core/*/component.json : Each component must have a `component.json` file in its folder under core.
Learnt from: CR
PR: clientIO/appmixer-connectors#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T09:09:52.832Z
Learning: Applies to src/appmixer/*/core/*/*.js : When adding a new field to a component, update the corresponding behavior JS file to handle the new field, especially in `context.httpRequest` calls.
Learnt from: CR
PR: clientIO/appmixer-connectors#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T09:09:52.832Z
Learning: Applies to src/appmixer/*/core/*/component.json : The `component.json` file must define the `version` property, e.g., '1.0.0'.
Learnt from: CR
PR: clientIO/appmixer-connectors#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T09:09:52.832Z
Learning: Applies to src/appmixer/*/core/*/component.json : If adding a new field to component.json, add the field to both `schema` and `inspector` sections in the `inPorts` array, following JSON schema format.
Learnt from: CR
PR: clientIO/appmixer-connectors#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T09:09:52.832Z
Learning: Applies to src/appmixer/*/core/*/component.json : The `component.json` file's `name` property must match the pattern ^[\w]+\.[\w]+\.[\w]+\.[\w]+$.
Learnt from: CR
PR: clientIO/appmixer-connectors#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T09:09:52.832Z
Learning: Applies to src/appmixer/*/core/*/component.json : The `component.json` file's `auth` property, if present, must have a `service` property in the format [vendor]:[service].
Learnt from: CR
PR: clientIO/appmixer-connectors#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T09:09:52.832Z
Learning: Applies to src/appmixer/*/core/*/component.json : The `component.json` file's `quota` property, if present, must reference a quota manager and resources as described in the schema.
src/appmixer/googleContacts/core/FindContacts/component.json (7)
Learnt from: CR
PR: clientIO/appmixer-connectors#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T09:09:52.832Z
Learning: Applies to src/appmixer/*/core/*/component.json : The `component.json` file must define the `label`, `description`, and `author` properties as described in the schema.
Learnt from: CR
PR: clientIO/appmixer-connectors#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T09:09:52.832Z
Learning: Applies to src/appmixer/*/core/*/*.js : When adding a new field to a component, update the corresponding behavior JS file to handle the new field, especially in `context.httpRequest` calls.
Learnt from: CR
PR: clientIO/appmixer-connectors#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T09:09:52.832Z
Learning: Applies to src/appmixer/*/core/*/component.json : The `component.json` file must have a `name` property in the format 'vendor.connectorName.core.componentName'.
Learnt from: CR
PR: clientIO/appmixer-connectors#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T09:09:52.832Z
Learning: Applies to src/appmixer/*/core/*/component.json : The `component.json` file must not have additional properties beyond those defined in the schema.
Learnt from: CR
PR: clientIO/appmixer-connectors#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T09:09:52.832Z
Learning: Applies to src/appmixer/*/core/*/component.json : The `component.json` file must define the `version` property, e.g., '1.0.0'.
Learnt from: CR
PR: clientIO/appmixer-connectors#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T09:09:52.832Z
Learning: Applies to src/appmixer/*/core/*/component.json : Each component must have a `component.json` file in its folder under core.
Learnt from: CR
PR: clientIO/appmixer-connectors#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T09:09:52.832Z
Learning: Applies to src/appmixer/*/core/*/component.json : If adding a new field to component.json, add the field to both `schema` and `inspector` sections in the `inPorts` array, following JSON schema format.
src/appmixer/googleContacts/core/ListOtherContacts/component.json (6)
Learnt from: CR
PR: clientIO/appmixer-connectors#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T09:09:52.832Z
Learning: Applies to src/appmixer/*/core/*/component.json : The `component.json` file must define the `label`, `description`, and `author` properties as described in the schema.
Learnt from: CR
PR: clientIO/appmixer-connectors#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T09:09:52.832Z
Learning: Applies to src/appmixer/*/core/*/component.json : The `component.json` file must not have additional properties beyond those defined in the schema.
Learnt from: CR
PR: clientIO/appmixer-connectors#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T09:09:52.832Z
Learning: Applies to src/appmixer/*/core/*/*.js : When adding a new field to a component, update the corresponding behavior JS file to handle the new field, especially in `context.httpRequest` calls.
Learnt from: CR
PR: clientIO/appmixer-connectors#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T09:09:52.832Z
Learning: Applies to src/appmixer/*/core/*/component.json : The `component.json` file must have a `name` property in the format 'vendor.connectorName.core.componentName'.
Learnt from: CR
PR: clientIO/appmixer-connectors#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T09:09:52.832Z
Learning: Applies to src/appmixer/*/core/*/component.json : Each component must have a `component.json` file in its folder under core.
Learnt from: CR
PR: clientIO/appmixer-connectors#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T09:09:52.832Z
Learning: Applies to src/appmixer/*/core/*/component.json : The `component.json` file must define the `version` property, e.g., '1.0.0'.
🔇 Additional comments (2)
src/appmixer/googleContacts/core/FindContacts/component.json (1)
4-4
: Description tweak looks goodThe refined wording (“using query”) clarifies usage without altering behaviour.
src/appmixer/googleContacts/core/FindDirectoryContacts/component.json (1)
68-79
: Verifysource.url
still resolves after component clean-upThe endpoint
/component/appmixer/googleContacts/FindDirectoryContacts
drops thecore
segment.
After removing legacy modules, make sure the router still maps to the correct handler, otherwise the out-port will never emit.
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.
@ZbynekPelunek bundle.json
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.
remove the google/contacts as well
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: 5
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
src/appmixer/googleContacts/core/FindContacts/component.json
(2 hunks)src/appmixer/googleContacts/core/FindDirectoryContacts/component.json
(2 hunks)src/appmixer/googleContacts/core/ListContactGroups/ListContactGroups.js
(1 hunks)src/appmixer/googleContacts/core/ListContactGroups/component.json
(1 hunks)src/appmixer/googleContacts/core/ListMyContacts/ListMyContacts.js
(1 hunks)src/appmixer/googleContacts/core/ListMyContacts/component.json
(1 hunks)src/appmixer/googleContacts/core/ListOtherContacts/ListOtherContacts.js
(1 hunks)src/appmixer/googleContacts/core/ListOtherContacts/component.json
(2 hunks)
✅ Files skipped from review due to trivial changes (2)
- src/appmixer/googleContacts/core/ListMyContacts/component.json
- src/appmixer/googleContacts/core/ListContactGroups/component.json
🚧 Files skipped from review as they are similar to previous changes (3)
- src/appmixer/googleContacts/core/FindContacts/component.json
- src/appmixer/googleContacts/core/FindDirectoryContacts/component.json
- src/appmixer/googleContacts/core/ListOtherContacts/component.json
🧰 Additional context used
📓 Path-based instructions (4)
`src/appmixer/**`: Use `src/appmixer` for source code of connectors.
src/appmixer/**
: Usesrc/appmixer
for source code of connectors.
📄 Source: CodeRabbit Inference Engine (.github/copilot-instructions.md)
List of files the instruction was applied to:
src/appmixer/googleContacts/core/ListMyContacts/ListMyContacts.js
src/appmixer/googleContacts/core/ListOtherContacts/ListOtherContacts.js
src/appmixer/googleContacts/core/ListContactGroups/ListContactGroups.js
`src/appmixer/*/core/*/*.js`: Behavior files for components must be JavaScript f...
src/appmixer/*/core/*/*.js
: Behavior files for components must be JavaScript files named after the component and located in the corresponding component folder under core.
When adding a new field to a component, update the corresponding behavior JS file to handle the new field, especially incontext.httpRequest
calls.
Do not check for required properties in thereceive
function of behavior files; required properties are validated by the input schema in component.json.
📄 Source: CodeRabbit Inference Engine (.github/copilot-instructions.md)
List of files the instruction was applied to:
src/appmixer/googleContacts/core/ListMyContacts/ListMyContacts.js
src/appmixer/googleContacts/core/ListOtherContacts/ListOtherContacts.js
src/appmixer/googleContacts/core/ListContactGroups/ListContactGroups.js
`**/*.js`: Add one empty line after function definition. Use 4 spaces for indentation.
**/*.js
: Add one empty line after function definition.
Use 4 spaces for indentation.
📄 Source: CodeRabbit Inference Engine (.github/copilot-instructions.md)
List of files the instruction was applied to:
src/appmixer/googleContacts/core/ListMyContacts/ListMyContacts.js
src/appmixer/googleContacts/core/ListOtherContacts/ListOtherContacts.js
src/appmixer/googleContacts/core/ListContactGroups/ListContactGroups.js
`src/appmixer/**/*.js`: Not necessary to add try/catch blocks in their `receive`...
src/appmixer/**/*.js
: Not necessary to add try/catch blocks in theirreceive
function. Appmixer engine automatically handles any exceptions that originate in these async functions.The directive
"use strict";
is desirable here
⚙️ Source: CodeRabbit Configuration File
List of files the instruction was applied to:
src/appmixer/googleContacts/core/ListMyContacts/ListMyContacts.js
src/appmixer/googleContacts/core/ListOtherContacts/ListOtherContacts.js
src/appmixer/googleContacts/core/ListContactGroups/ListContactGroups.js
🧠 Learnings (3)
src/appmixer/googleContacts/core/ListMyContacts/ListMyContacts.js (2)
Learnt from: ZbynekPelunek
PR: clientIO/appmixer-connectors#384
File: src/appmixer/airtable/records/NewRecordWebhook/NewRecordWebhook.js:75-80
Timestamp: 2025-03-10T13:32:28.895Z
Learning: In Airtable webhook responses for new records, if the payload array exists and passes the check `Array.isArray(payloads) && payloads.length > 0`, then `payloads[0].changedTablesById[tableId].createdRecordsById` will always contain at least one record, making additional empty array checks unnecessary.
Learnt from: CR
PR: clientIO/appmixer-connectors#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T09:09:52.832Z
Learning: Applies to src/appmixer/*/core/*/*.js : Do not check for required properties in the `receive` function of behavior files; required properties are validated by the input schema in component.json.
src/appmixer/googleContacts/core/ListOtherContacts/ListOtherContacts.js (2)
Learnt from: CR
PR: clientIO/appmixer-connectors#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T09:09:52.832Z
Learning: Applies to src/appmixer/*/core/*/*.js : Do not check for required properties in the `receive` function of behavior files; required properties are validated by the input schema in component.json.
Learnt from: CR
PR: clientIO/appmixer-connectors#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T09:09:52.832Z
Learning: Applies to src/appmixer/*/core/*/*.js : When adding a new field to a component, update the corresponding behavior JS file to handle the new field, especially in `context.httpRequest` calls.
src/appmixer/googleContacts/core/ListContactGroups/ListContactGroups.js (4)
Learnt from: CR
PR: clientIO/appmixer-connectors#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T09:09:52.832Z
Learning: Applies to src/appmixer/*/core/*/*.js : Do not check for required properties in the `receive` function of behavior files; required properties are validated by the input schema in component.json.
Learnt from: CR
PR: clientIO/appmixer-connectors#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T09:09:52.832Z
Learning: Applies to src/appmixer/*/core/*/*.js : When adding a new field to a component, update the corresponding behavior JS file to handle the new field, especially in `context.httpRequest` calls.
Learnt from: ZbynekPelunek
PR: clientIO/appmixer-connectors#384
File: src/appmixer/airtable/records/NewRecordWebhook/NewRecordWebhook.js:75-80
Timestamp: 2025-03-10T13:32:28.895Z
Learning: In Airtable webhook responses for new records, if the payload array exists and passes the check `Array.isArray(payloads) && payloads.length > 0`, then `payloads[0].changedTablesById[tableId].createdRecordsById` will always contain at least one record, making additional empty array checks unnecessary.
Learnt from: sayam-nasir
PR: clientIO/appmixer-connectors#448
File: src/appmixer/github/list/GetUser/GetUser.js:12-14
Timestamp: 2025-04-28T11:22:40.693Z
Learning: Error handling for GitHub API requests in the appmixer connectors is already implemented at a different level (likely in lib.apiRequest), so additional try-catch blocks aren't needed in individual component files.
🧬 Code Graph Analysis (3)
src/appmixer/googleContacts/core/ListMyContacts/ListMyContacts.js (2)
src/appmixer/googleContacts/core/FindContacts/FindContacts.js (1)
records
(31-43)src/appmixer/googleContacts/core/FindDirectoryContacts/FindDirectoryContacts.js (1)
records
(32-44)
src/appmixer/googleContacts/core/ListOtherContacts/ListOtherContacts.js (2)
src/appmixer/googleContacts/core/FindContacts/FindContacts.js (1)
records
(31-43)src/appmixer/googleContacts/core/FindDirectoryContacts/FindDirectoryContacts.js (1)
records
(32-44)
src/appmixer/googleContacts/core/ListContactGroups/ListContactGroups.js (4)
src/appmixer/googleContacts/core/ListOtherContacts/ListOtherContacts.js (1)
records
(26-26)src/appmixer/googleContacts/core/ListMyContacts/ListMyContacts.js (1)
records
(27-27)src/appmixer/googleContacts/core/FindContacts/FindContacts.js (1)
records
(31-43)src/appmixer/googleContacts/core/FindDirectoryContacts/FindDirectoryContacts.js (1)
records
(32-44)
🔇 Additional comments (1)
src/appmixer/googleContacts/core/ListContactGroups/ListContactGroups.js (1)
25-34
: Add null safety checks for nested property access.The mapping logic accesses nested properties like
contactGroup.metadata?.updateTime
but doesn't guard against missing required properties, which could cause runtime errors.records = data.contactGroups.map((contactGroup) => { return { - id: contactGroup.resourceName.split('/')[1], + id: contactGroup.resourceName?.split('/')[1], etag: contactGroup.etag ?? undefined, updateTime: contactGroup.metadata?.updateTime, groupType: contactGroup.groupType, name: contactGroup.name, formattedName: contactGroup.formattedName }; });⛔ Skipped due to learnings
Learnt from: ZbynekPelunek PR: clientIO/appmixer-connectors#461 File: src/appmixer/microsoft/sharepoint/FindFilesOrFolders/FindFilesOrFolders.js:54-54 Timestamp: 2025-04-22T16:36:59.075Z Learning: Optional chaining (`?.`) in JavaScript correctly handles nullish (null or undefined) values, making additional explicit null checks unnecessary. In boolean contexts like `Array.some()`, if the referenced property is nullish, it evaluates to `undefined` which coerces to `false`.
Learnt from: ZbynekPelunek PR: clientIO/appmixer-connectors#378 File: src/appmixer/akamai/clientlist/UpsertListEntries/UpsertListEntries.js:38-41 Timestamp: 2025-03-10T10:24:51.035Z Learning: In the Akamai connector's UpsertListEntries component, the optional chaining operator (`?.`) is used for handling potentially undefined tag values, making additional null checks unnecessary.
Learnt from: CR PR: clientIO/appmixer-connectors#0 File: .github/copilot-instructions.md:0-0 Timestamp: 2025-06-30T09:09:52.832Z Learning: Applies to src/appmixer/*/core/*/*.js : Do not check for required properties in the `receive` function of behavior files; required properties are validated by the input schema in component.json.
src/appmixer/googleContacts/core/ListContactGroups/ListContactGroups.js
Outdated
Show resolved
Hide resolved
src/appmixer/googleContacts/core/ListMyContacts/ListMyContacts.js
Outdated
Show resolved
Hide resolved
src/appmixer/googleContacts/core/ListOtherContacts/ListOtherContacts.js
Outdated
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.
Actionable comments posted: 2
🔭 Outside diff range comments (1)
src/appmixer/googleContacts/core/UpdateContact/UpdateContact.js (1)
53-63
: Add safety checks for optional properties.The response processing assumes certain properties exist without null checks, which could cause runtime errors if the Google API response structure varies.
Apply this diff to add safety checks:
const betterResponse = { id: data.resourceName.split('/')[1], etag: data.etag, updateTime: data.metadata.sources[0].updateTime, - displayName: data.names[0].displayName, - givenName: data.names[0].givenName, - displayNameLastFirst: data.names[0].displayNameLastFirst, - unstructuredName: data.names[0].unstructuredName, - photoUrl: data.photos[0].url, + displayName: data.names?.[0]?.displayName, + givenName: data.names?.[0]?.givenName, + displayNameLastFirst: data.names?.[0]?.displayNameLastFirst, + unstructuredName: data.names?.[0]?.unstructuredName, + photoUrl: data.photos?.[0]?.url, memberships: data.memberships };
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
src/appmixer/googleContacts/core/FindContacts/FindContacts.js
(1 hunks)src/appmixer/googleContacts/core/FindContacts/component.json
(3 hunks)src/appmixer/googleContacts/core/ListContactGroups/ListContactGroups.js
(1 hunks)src/appmixer/googleContacts/core/ListMyContacts/ListMyContacts.js
(1 hunks)src/appmixer/googleContacts/core/ListOtherContacts/ListOtherContacts.js
(1 hunks)src/appmixer/googleContacts/core/UpdateContact/UpdateContact.js
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
- src/appmixer/googleContacts/core/ListContactGroups/ListContactGroups.js
- src/appmixer/googleContacts/core/FindContacts/component.json
- src/appmixer/googleContacts/core/ListMyContacts/ListMyContacts.js
- src/appmixer/googleContacts/core/ListOtherContacts/ListOtherContacts.js
🧰 Additional context used
📓 Path-based instructions (4)
`src/appmixer/**`: Use `src/appmixer` for source code of connectors.
src/appmixer/**
: Usesrc/appmixer
for source code of connectors.
📄 Source: CodeRabbit Inference Engine (.github/copilot-instructions.md)
List of files the instruction was applied to:
src/appmixer/googleContacts/core/UpdateContact/UpdateContact.js
src/appmixer/googleContacts/core/FindContacts/FindContacts.js
`src/appmixer/*/core/*/*.js`: Behavior files for components must be JavaScript f...
src/appmixer/*/core/*/*.js
: Behavior files for components must be JavaScript files named after the component and located in the corresponding component folder under core.
When adding a new field to a component, update the corresponding behavior JS file to handle the new field, especially incontext.httpRequest
calls.
Do not check for required properties in thereceive
function of behavior files; required properties are validated by the input schema in component.json.
📄 Source: CodeRabbit Inference Engine (.github/copilot-instructions.md)
List of files the instruction was applied to:
src/appmixer/googleContacts/core/UpdateContact/UpdateContact.js
src/appmixer/googleContacts/core/FindContacts/FindContacts.js
`**/*.js`: Add one empty line after function definition. Use 4 spaces for indentation.
**/*.js
: Add one empty line after function definition.
Use 4 spaces for indentation.
📄 Source: CodeRabbit Inference Engine (.github/copilot-instructions.md)
List of files the instruction was applied to:
src/appmixer/googleContacts/core/UpdateContact/UpdateContact.js
src/appmixer/googleContacts/core/FindContacts/FindContacts.js
`src/appmixer/**/*.js`: Not necessary to add try/catch blocks in their `receive`...
src/appmixer/**/*.js
: Not necessary to add try/catch blocks in theirreceive
function. Appmixer engine automatically handles any exceptions that originate in these async functions.The directive
"use strict";
is desirable here
⚙️ Source: CodeRabbit Configuration File
List of files the instruction was applied to:
src/appmixer/googleContacts/core/UpdateContact/UpdateContact.js
src/appmixer/googleContacts/core/FindContacts/FindContacts.js
🧠 Learnings (1)
src/appmixer/googleContacts/core/UpdateContact/UpdateContact.js (1)
Learnt from: CR
PR: clientIO/appmixer-connectors#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T09:09:52.832Z
Learning: Applies to src/appmixer/*/core/*/*.js : When adding a new field to a component, update the corresponding behavior JS file to handle the new field, especially in `context.httpRequest` calls.
🔇 Additional comments (3)
src/appmixer/googleContacts/core/UpdateContact/UpdateContact.js (1)
48-48
: LGTM! Correct API field name usage.The change from
emails
toemailAddresses
properly aligns with the Google People API field naming conventions and uses the correctly processed variable.src/appmixer/googleContacts/core/FindContacts/FindContacts.js (2)
23-23
: LGTM: API parameter addition is correct.The
sources
parameter correctly specifies the contact source type for the Google People API's searchContacts endpoint.
30-32
: LGTM: Response structure update is correct.The change from
data.connections
todata.results
correctly reflects the updated Google People API response structure.
Summary by CodeRabbit
Removals
Documentation