Conversation
Contributor
Author
Usage examplesCreate a campaign with a weekly reminder message := "Please complete your campaign checks."
slack := "platform-eng" // API stores this as "#platform-eng"
campaign, err := client.CreateCampaign(opslevel.CampaignCreateInput{
Name: "Upgrade to Rails 7",
OwnerId: teamID,
Reminder: &opslevel.CampaignReminderInput{
Channels: []opslevel.CampaignReminderChannelEnum{
opslevel.CampaignReminderChannelEnumSlack,
opslevel.CampaignReminderChannelEnumEmail,
},
Frequency: 1,
FrequencyUnit: opslevel.CampaignReminderFrequencyUnitEnumWeek,
DaysOfWeek: []opslevel.DayOfWeekEnum{opslevel.DayOfWeekEnumMonday, opslevel.DayOfWeekEnumThursday},
TimeOfDay: "09:30",
Timezone: "America/Chicago",
Message: &message,
DefaultSlackChannel: &slack,
},
})
Clear an existing reminder on update _, err := client.UpdateCampaign(opslevel.CampaignUpdateInput{
Id: campaign.Id,
Reminder: opslevel.NewNullOf[opslevel.CampaignReminderInput](), // marshals to `null`
})Read it back c, _ := client.GetCampaign(campaign.Id)
if c.Reminder != nil {
fmt.Println(c.Reminder.FrequencyUnit, c.Reminder.NextOccurrence)
} |
CampaignUpdateInput.Reminder is now *Nullable[CampaignReminderInput] so an explicit null can be sent to remove an existing reminder. Sending the field unset still leaves the current reminder untouched. The input object generator template carries the same override so the type survives the next schema regeneration. Co-authored-by: Cursor <cursoragent@cursor.com>
jamescarr
force-pushed
the
jamescarr/campaign-reminders
branch
from
September 16, 2026 10:17
6ca1b18 to
3dd427a
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Changes
CampaignUpdateInput.Reminderfrom*CampaignReminderInputto*Nullable[CampaignReminderInput].Why
campaignUpdatetreats an omittedreminderas "leave the existing reminder alone", so with a plain pointer there is no way to express "remove the reminder from this campaign" — the field either carries a value or disappears from the request. Wrapping it inNullablelets callers send an explicitnull.This matters for the Terraform provider, where removing the
reminderblock from a campaign resource has to actually clear the reminder rather than silently keep it.Notes
Everything else this originally carried (the
CampaignReminderobject,CampaignReminderInput, and the reminder enums) shipped inv2026.9.7, so this PR is now just the nullability change.The generator template in
templates/inputObjects.tplcarries the same per-field override, alongside the existingCheckPackageVersionUpdateInputone, so the type survives the next schema regeneration.Testing
Two new mocked tests: one sends a full reminder and asserts the response parses, the other sends
NewNullOf[CampaignReminderInput]()and asserts the request body contains"reminder":null.