-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(campaign-operations): use codegen, typescript, react fcs (#43)
- Loading branch information
Showing
13 changed files
with
740 additions
and
617 deletions.
There are no files selected for viewing
This file contains 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
67 changes: 67 additions & 0 deletions
67
libs/spoke-codegen/src/graphql/campaign-operations.graphql
This file contains 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,67 @@ | ||
fragment CurrentAssignmentTarget on AssignmentTarget { | ||
type | ||
campaign { | ||
id | ||
title | ||
} | ||
teamTitle | ||
countLeft | ||
enabled | ||
} | ||
|
||
fragment CampaignInfo on Campaign { | ||
id | ||
title | ||
isStarted | ||
isApproved | ||
isArchived | ||
hasUnassignedContacts | ||
hasUnsentInitialMessages | ||
hasUnhandledMessages | ||
description | ||
dueBy | ||
} | ||
|
||
query GetAdminAssignmentTargets($organizationId: String!) { | ||
organization(id: $organizationId) { | ||
id | ||
currentAssignmentTargets { | ||
...CurrentAssignmentTarget | ||
} | ||
} | ||
} | ||
|
||
mutation archiveCampaign($campaignId: String!) { | ||
archiveCampaign(id: $campaignId) { | ||
...CampaignInfo | ||
} | ||
} | ||
|
||
mutation unarchiveCampaign($campaignId: String!) { | ||
unarchiveCampaign(id: $campaignId) { | ||
...CampaignInfo | ||
} | ||
} | ||
|
||
mutation releaseMessages($campaignId: String!, $target: ReleaseActionTarget!, $ageInHours: Float) { | ||
releaseMessages(campaignId: $campaignId, target: $target, ageInHours: $ageInHours) | ||
} | ||
|
||
mutation deleteNeedsMessage($campaignId: String!) { | ||
deleteNeedsMessage(campaignId: $campaignId) | ||
} | ||
|
||
mutation markForSecondPass($campaignId: String!, $input: SecondPassInput!) { | ||
markForSecondPass(campaignId: $campaignId, input: $input) | ||
} | ||
|
||
mutation unMarkForSecondPass($campaignId: String!) { | ||
unMarkForSecondPass(campaignId: $campaignId) | ||
} | ||
|
||
mutation toggleAutoAssign($campaignId: String!, $enabled: Boolean!) { | ||
editCampaign(id: $campaignId, campaign: { isAutoassignEnabled: $enabled }) { | ||
id | ||
isAutoassignEnabled | ||
} | ||
} |
This file contains 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 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 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 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 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
Oops, something went wrong.