feat(gridspace): implement uploadContactToCampaign action in gridspace extension #481
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
User description
For context, see: https://linear.app/awell/issue/TP-2540/update-the-gridspace-extension
This PR implements "Upload Contacts to Campaign" in the Gridspace Extension. Api endpoint documentation can be found here: https://docs.gridspace.com/docs/monophone/mm37fjyb66m01-upload-contacts-to-campaign
PR Type
Enhancement, Tests
Description
uploadContactToCampaign
action to add contacts to a Gridspace autodialer campaign.uploadContactToCampaign
action to ensure functionality.GridspaceClient
with a new method to handle contact uploads.callWithGrace
action usingisNil
for null checks.Changes walkthrough 📝
callWithGrace.ts
Improve profile data handling with `isNil` check
extensions/gridspace/actions/callWithGrace/callWithGrace.ts
isNil
import fromlodash
.isNil
for null checks.index.ts
Export new `uploadContactToCampaign` action
extensions/gridspace/actions/index.ts
uploadContactToCampaign
action to exports.config.ts
Define fields and validation for `uploadContactToCampaign`
extensions/gridspace/actions/uploadContactToCampaign/config.ts
uploadContactToCampaign
action.index.ts
Export `uploadContactToCampaign` module
extensions/gridspace/actions/uploadContactToCampaign/index.ts
uploadContactToCampaign
module.uploadContactToCampaign.ts
Implement `uploadContactToCampaign` action
extensions/gridspace/actions/uploadContactToCampaign/uploadContactToCampaign.ts
uploadContactToCampaign
action.GridspaceClient
to upload contacts.client.ts
Extend `GridspaceClient` with contact upload capability
extensions/gridspace/lib/client.ts
uploadContactsToCampaign
method toGridspaceClient
.client
property readonly.uploadContactToCampaign.test.ts
Add tests for `uploadContactToCampaign` action
extensions/gridspace/actions/uploadContactToCampaign/uploadContactToCampaign.test.ts
uploadContactToCampaign
action.GridspaceClient
for testing.