forked from politics-rewired/Spoke
-
Notifications
You must be signed in to change notification settings - Fork 2
feat(admin): add CampaignType to campaign + Call table #194
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
14540d9
feat(campaigns): add campaign type (SMS/Call) to campaign editor
sukhada 26fe7ee
feat(admin): add campaign type to admin UI
sukhada e0b4c03
feat(admin): add new dialer tables
sukhada 31539f4
chore(admin): address feedback
sukhada 552c0f0
chore(dialer): address new table feedback
sukhada 27c719f
chore(dialer): address feedback
sukhada 4243fe2
chore(dialer): regenerate schema dump
sukhada aea9afb
chore(dialer): address feedback
sukhada 50b2306
feat(dialer): volunteer caller backend (#205)
sukhada 6cb3e4e
chore(dialer): fix down migration for campaign type campaign view
sukhada File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| nodejs 16.14.0 | ||
| nodejs 20.16.0 | ||
| yarn 1.22.19 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| export const schema = ` | ||
| type DialerCampaignContact { | ||
| id: ID! | ||
| campaignId: ID! | ||
| firstName: String! | ||
| lastName: String! | ||
| zip: String | ||
| callStatus: String! | ||
| doNotCall: Boolean! | ||
| attemptCount: Int! | ||
| lastAttemptedAt: Date | ||
| customFields: JSON! | ||
| assignment: Assignment | ||
| interactionSteps: [InteractionStep!]! | ||
| questionResponseValues: [DialerQuestionResponseValue!]! | ||
| tags: [Tag!]! | ||
| campaignVariables: [CampaignVariable!]! | ||
| } | ||
|
|
||
| type DialerQuestionResponseValue { | ||
| id: ID! | ||
| interactionStepId: ID! | ||
| question: String! | ||
| value: String! | ||
| } | ||
|
|
||
| # A past texting conversation with the same person (matched by phone), shown | ||
| # as context on the calling screen. One entry per prior campaign_contact. | ||
| type DialerContactConversation { | ||
| campaignId: ID! | ||
| campaignTitle: String! | ||
| contactId: ID! | ||
| firstName: String | ||
| lastName: String | ||
| messages: [Message!]! | ||
| } | ||
|
|
||
| type DialerCall { | ||
| id: ID! | ||
| dialerCampaignContactId: ID! | ||
| status: String! | ||
| fromNumber: String | ||
| telnyxCallControlId: String | ||
| createdAt: Date! | ||
| answeredAt: Date | ||
| endedAt: Date | ||
| } | ||
|
|
||
| type InitiateCallResult { | ||
| dialerCallId: ID! | ||
| contactPhone: String! | ||
| fromNumber: String! | ||
| } | ||
|
|
||
| type RequestCallShiftResult { | ||
| assignmentId: ID | ||
| campaignId: ID | ||
| count: Int! | ||
| } | ||
|
|
||
| input DialerQuestionResponseInput { | ||
| interactionStepId: String! | ||
| value: String! | ||
| } | ||
|
|
||
| input UpdateDialerCallInput { | ||
| status: String | ||
| telnyxCallControlId: String | ||
| answeredAt: String | ||
| endedAt: String | ||
| } | ||
| `; | ||
|
|
||
| export default schema; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| fragment CampaignListEntry on Campaign { | ||
| id | ||
| title | ||
| campaignType | ||
| isStarted | ||
| isApproved | ||
| isArchived | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,166 @@ | ||
| fragment DialerContactCore on DialerCampaignContact { | ||
| id | ||
| campaignId | ||
| firstName | ||
| lastName | ||
| zip | ||
| callStatus | ||
| doNotCall | ||
| attemptCount | ||
| lastAttemptedAt | ||
| customFields | ||
| campaignVariables { | ||
| id | ||
| name | ||
| value | ||
| } | ||
| questionResponseValues { | ||
| id | ||
| interactionStepId | ||
| question | ||
| value | ||
| } | ||
| tags { | ||
| id | ||
| title | ||
| description | ||
| confirmationSteps | ||
| onApplyScript | ||
| textColor | ||
| backgroundColor | ||
| isAssignable | ||
| isSystem | ||
| } | ||
| interactionSteps { | ||
| id | ||
| questionText | ||
| scriptOptions | ||
| answerOption | ||
| parentInteractionId | ||
| isDeleted | ||
| answerActions | ||
| question { | ||
| text | ||
| answerOptions { | ||
| value | ||
| nextInteractionStep { | ||
| id | ||
| scriptOptions | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| query GetNextDialerContact($assignmentId: String!) { | ||
| getNextDialerContact(assignmentId: $assignmentId) { | ||
| ...DialerContactCore | ||
| } | ||
| } | ||
|
|
||
| query GetDialerContact($dialerCampaignContactId: String!) { | ||
| getDialerContact(dialerCampaignContactId: $dialerCampaignContactId) { | ||
| ...DialerContactCore | ||
| } | ||
| } | ||
|
|
||
| query DialerContactTextingHistory($dialerCampaignContactId: String!) { | ||
| dialerContactTextingHistory( | ||
| dialerCampaignContactId: $dialerCampaignContactId | ||
| ) { | ||
| contactId | ||
| campaignId | ||
| campaignTitle | ||
| firstName | ||
| lastName | ||
| messages { | ||
| id | ||
| text | ||
| isFromContact | ||
| createdAt | ||
| } | ||
| } | ||
| } | ||
|
|
||
| mutation InitiateCall($assignmentId: String!, $dialerCampaignContactId: String!) { | ||
| initiateCall(assignmentId: $assignmentId, dialerCampaignContactId: $dialerCampaignContactId) { | ||
| dialerCallId | ||
| contactPhone | ||
| fromNumber | ||
| } | ||
| } | ||
|
|
||
| mutation UpdateDialerCall( | ||
| $dialerCallId: String! | ||
| $input: UpdateDialerCallInput! | ||
| ) { | ||
| updateDialerCall(dialerCallId: $dialerCallId, input: $input) { | ||
| id | ||
| status | ||
| telnyxCallControlId | ||
| answeredAt | ||
| endedAt | ||
| } | ||
| } | ||
|
|
||
| mutation SaveDialerQuestionResponses( | ||
| $dialerCampaignContactId: String! | ||
| $questionResponses: [DialerQuestionResponseInput!]! | ||
| ) { | ||
| saveDialerQuestionResponses( | ||
| dialerCampaignContactId: $dialerCampaignContactId | ||
| questionResponses: $questionResponses | ||
| ) { | ||
| ...DialerContactCore | ||
| } | ||
| } | ||
|
|
||
| mutation MarkDialerContactComplete( | ||
| $dialerCampaignContactId: String! | ||
| $callStatus: String! | ||
| ) { | ||
| markDialerContactComplete( | ||
| dialerCampaignContactId: $dialerCampaignContactId | ||
| callStatus: $callStatus | ||
| ) { | ||
| id | ||
| callStatus | ||
| attemptCount | ||
| lastAttemptedAt | ||
| } | ||
| } | ||
|
|
||
| mutation TagDialerContact( | ||
| $dialerCampaignContactId: String! | ||
| $tag: ContactTagActionInput! | ||
| ) { | ||
| tagDialerContact( | ||
| dialerCampaignContactId: $dialerCampaignContactId | ||
| tag: $tag | ||
| ) { | ||
| id | ||
| tags { | ||
| id | ||
| title | ||
| description | ||
| confirmationSteps | ||
| onApplyScript | ||
| textColor | ||
| backgroundColor | ||
| isAssignable | ||
| isSystem | ||
| } | ||
| } | ||
| } | ||
|
|
||
| query CallShiftAvailable($organizationId: String!) { | ||
| callShiftAvailable(organizationId: $organizationId) | ||
| } | ||
|
|
||
| mutation RequestCallShift($organizationId: String!) { | ||
| requestCallShift(organizationId: $organizationId) { | ||
| assignmentId | ||
| campaignId | ||
| count | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.