docs(calling): add ai-docs specifications for Contacts module#4934
docs(calling): add ai-docs specifications for Contacts module#4934Kesari3008 wants to merge 3 commits intowebex:nextfrom
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c6b03b0bed
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const response = await contactClient.createContact({ | ||
| contactType: ContactType.CUSTOM, | ||
| displayName: 'Jane Doe', | ||
| firstName: 'Jane', | ||
| lastName: 'Doe', | ||
| emails: [{type: 'work', value: 'jane@example.com'}], | ||
| phoneNumbers: [{type: 'mobile', value: '+15551234567'}], |
There was a problem hiding this comment.
Make createContact examples satisfy documented Contact type
The examples for createContact pass partial objects, but this same doc defines the method as createContact(contactInfo: Contact) and Contact with required fields such as contactId, encryptionKeyUrl, groups, and resolved. As written, readers (and AI agents using this spec) will produce TypeScript calls that do not match the documented contract and fail type-checking. Either change the documented input contract to reflect the real accepted shape (e.g., a create-input type) or update the examples to include all required fields.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2526da754f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const groupId = groupResponse.data.group?.groupId; | ||
|
|
||
| await contactClient.deleteContactGroup(groupId); |
There was a problem hiding this comment.
Check group ID before calling deleteContactGroup
This example derives groupId via optional chaining and then passes it directly to deleteContactGroup(groupId), so groupId can be undefined when group creation fails or no group is returned. That either breaks TypeScript consumers (string | undefined to string) or sends a runtime delete call with an invalid ID. Add a guard (or explicit error path) before invoking deleteContactGroup.
Useful? React with 👍 / 👎.
COMPLETES #https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-807306
This pull request addresses
Specs for Contacts module within Calling SDK
by making the following changes
Added AGENTS.ms and ARCHITECTURE.md for Contacts nodule
Change Type
The following scenarios were tested
< ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >
The GAI Coding Policy And Copyright Annotation Best Practices
I certified that
Make sure to have followed the contributing guidelines before submitting.