Skip to content
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

Update salesforce jsdocs #799

Closed
wants to merge 6 commits into from
Closed

Update salesforce jsdocs #799

wants to merge 6 commits into from

Conversation

mtuchi
Copy link
Collaborator

@mtuchi mtuchi commented Oct 25, 2024

Summary

Update params docs and improve examples in salesforce adaptor

Fixes #664

AI Usage

Please disclose how you've used AI in this work (it's cool, we just want to know!):

  • Code generation (copilot but not intellisense)
  • Learning or fact checking
  • Strategy / design
  • Optimisation / refactoring
  • Translation / spellchecking / doc gen
  • Other
  • I have not used AI

You can read more details in our Responsible AI Policy

Review Checklist

Before merging, the reviewer should check the following items:

  • Does the PR do what it claims to do?
  • If this is a new adaptor, added the adaptor on marketing website ?
  • Are there any unit tests?
  • Is there a changeset associated with this PR? Should there be? Note that
    dev only changes don't need a changeset.
  • Have you ticked a box under AI Usage?

@mtuchi mtuchi linked an issue Oct 25, 2024 that may be closed by this pull request
@mtuchi mtuchi requested a review from josephjclark October 28, 2024 08:23
@mtuchi mtuchi marked this pull request as ready for review October 28, 2024 08:23
@josephjclark
Copy link
Collaborator

@mtuchi Please make angry noises at me if this isn't done tomorrow morning

@josephjclark josephjclark changed the base branch from main to epic/salesforce October 30, 2024 15:56
@josephjclark josephjclark changed the base branch from epic/salesforce to main October 30, 2024 15:58
@josephjclark
Copy link
Collaborator

@mtuchi is this targeted at main? I expected this to be part of the next salesforce stuff, branching from epic/salesforce

Copy link
Collaborator

@josephjclark josephjclark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah @mtuchi unfortunately these docs are against the wrong branch. You have examples of state.references, but we're about to remove that stuff.

This needs to be be retargeted and mapped to the epic

I've left a couple of high level comments which will need to be taken into account

* { pollTimeout: 10000, pollInterval: 6000 }
* );
* @example <caption>Perform a bulk query on Patient records</caption>
* bulkQuery('SELECT Id, Name FROM Patient__c');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These examples don't use any dynamic state. We should make sure there's at least one example which uses state (or lazy state)

* retrieve('ContentVersion', '0684K0000020Au7QAE/VersionData');
* @example <caption>Retrieve a specific ContentVersion record</caption>
* retrieve('ContentVersion', '0684K0000020Au7QAE', state => {
* console.log(state.references[0]); // Log the retrieved record
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the comment here useful? console.log() is a pretty easy to understand function

* attr1: "foo",
* attr2: "bar"
* })
* @example <caption>Create a new record if `state.isNew` is true</caption>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not add new examples for deprecated APIs please

@mtuchi
Copy link
Collaborator Author

mtuchi commented Nov 1, 2024

Sorry @josephjclark i wasn't able to work on change request this week, I will pick this up next week. I only manage to resolved git conflicts on #691

@mtuchi
Copy link
Collaborator Author

mtuchi commented Nov 12, 2024

Closing this in favor of #821

@mtuchi mtuchi closed this Nov 12, 2024
@mtuchi mtuchi deleted the 664-sf-docs branch November 12, 2024 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

salesforce: docs deep dive
2 participants