{"save_campaign":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"description":"Update this campaign. Omit to update the campaign with exactly this name, or create one.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"description":"The campaign's name (matched case-insensitively; the default campaign is never matched)."},"start_date":{"description":"YYYY-MM-DD. Required to create: ask the merchant, never assume today.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"end_date":{"description":"YYYY-MM-DD, or null for open-ended.","anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"status":{"description":"Campaign status, for example DRAFT or ACTIVE.","type":"string"},"campaign_type":{"description":"Campaign type name or slug (get_campaign_type_options). Defaults to the workspace's first type.","type":"string"},"allocated_budget":{"type":"number","minimum":0},"utm_campaign":{"type":"string"}},"required":["name"]},"get_campaign":{"type":"object","properties":{"returnsFrom":{"type":"string","format":"date-time","description":"Window start: the UTC day this instant falls in, inclusive. Defaults to 30 days ago.","default":"2020-01-01T00:00:00.000Z"},"rowId":{"type":"string","format":"uuid","description":"Equal to the specified value."}},"required":["rowId"]},"get_campaign_signals":{"type":"object","properties":{"campaignId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","minLength":1},{"type":"object","properties":{"name":{"type":"string","minLength":1}},"required":["name"],"additionalProperties":false}],"description":"Checks for equality with the object’s `campaignId` field. A UUID, the name, or { \"name\": \"…\" } — resolved for you."}},"required":["campaignId"]},"list_campaigns":{"type":"object","properties":{"after":{"type":"string","description":"Read all values in the set after (below) this cursor."},"filter":{"$ref":"#/$defs/CampaignFilter","description":"A filter to be used in determining which values should be returned by the collection."},"first":{"type":"integer","default":50,"description":"Only read the first `n` values of the set."}},"$defs":{"CampaignFilter":{"type":"object","properties":{"and":{"type":"array","items":{"$ref":"#/$defs/CampaignFilter"}},"campaignSlug":{"$ref":"#/$defs/StringFilter"},"isDefault":{"$ref":"#/$defs/BooleanFilter"},"managedByConnectionId":{"$ref":"#/$defs/UUIDFilter"},"name":{"$ref":"#/$defs/StringFilter"},"not":{"$ref":"#/$defs/CampaignFilter"},"or":{"type":"array","items":{"$ref":"#/$defs/CampaignFilter"}},"rowId":{"$ref":"#/$defs/UUIDFilter"},"status":{"$ref":"#/$defs/CampaignStatusFilter"},"utmCampaign":{"$ref":"#/$defs/StringFilter"},"utmTerm":{"$ref":"#/$defs/StringFilter"}}},"StringFilter":{"type":"object","properties":{"equalTo":{"type":"string"},"greaterThan":{"type":"string"},"greaterThanOrEqualTo":{"type":"string"},"in":{"type":"array","items":{"type":"string"}},"includesInsensitive":{"type":"string"},"isNull":{"type":"boolean"},"lessThan":{"type":"string"},"lessThanOrEqualTo":{"type":"string"},"notEqualTo":{"type":"string"},"notIn":{"type":"array","items":{"type":"string"}}}},"BooleanFilter":{"type":"object","properties":{"equalTo":{"type":"boolean"},"greaterThan":{"type":"boolean"},"greaterThanOrEqualTo":{"type":"boolean"},"in":{"type":"array","items":{"type":"boolean"}},"isNull":{"type":"boolean"},"lessThan":{"type":"boolean"},"lessThanOrEqualTo":{"type":"boolean"},"notEqualTo":{"type":"boolean"},"notIn":{"type":"array","items":{"type":"boolean"}}}},"UUIDFilter":{"type":"object","properties":{"equalTo":{"type":"string","format":"uuid"},"greaterThan":{"type":"string","format":"uuid"},"greaterThanOrEqualTo":{"type":"string","format":"uuid"},"in":{"type":"array","items":{"type":"string","format":"uuid"}},"isNull":{"type":"boolean"},"lessThan":{"type":"string","format":"uuid"},"lessThanOrEqualTo":{"type":"string","format":"uuid"},"notEqualTo":{"type":"string","format":"uuid"},"notIn":{"type":"array","items":{"type":"string","format":"uuid"}}}},"CampaignStatusFilter":{"type":"object","properties":{"equalTo":{"type":"string","enum":["ACTIVE","ARCHIVED","COMPLETED","DRAFT","ENDED","PAUSED"]},"greaterThan":{"type":"string","enum":["ACTIVE","ARCHIVED","COMPLETED","DRAFT","ENDED","PAUSED"]},"greaterThanOrEqualTo":{"type":"string","enum":["ACTIVE","ARCHIVED","COMPLETED","DRAFT","ENDED","PAUSED"]},"in":{"type":"array","items":{"type":"string","enum":["ACTIVE","ARCHIVED","COMPLETED","DRAFT","ENDED","PAUSED"]}},"isNull":{"type":"boolean"},"lessThan":{"type":"string","enum":["ACTIVE","ARCHIVED","COMPLETED","DRAFT","ENDED","PAUSED"]},"lessThanOrEqualTo":{"type":"string","enum":["ACTIVE","ARCHIVED","COMPLETED","DRAFT","ENDED","PAUSED"]},"notEqualTo":{"type":"string","enum":["ACTIVE","ARCHIVED","COMPLETED","DRAFT","ENDED","PAUSED"]},"notIn":{"type":"array","items":{"type":"string","enum":["ACTIVE","ARCHIVED","COMPLETED","DRAFT","ENDED","PAUSED"]}}}}}},"get_campaign_type_options":{"type":"object","properties":{"first":{"type":"integer","default":200,"description":"Only read the first `n` values of the set."}}},"create_campaign":{"type":"object","properties":{"body":{"type":"object","properties":{"campaign_type_id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":120},"start_date":{},"end_date":{"anyOf":[{},{"type":"null"}]},"status":{"type":"string","enum":["ACTIVE","DRAFT","ARCHIVED","PAUSED","ENDED","COMPLETED"]},"allocated_budget":{"anyOf":[{"type":"number","minimum":0,"maximum":1000000000,"multipleOf":0.01},{"type":"null"}]},"utm_campaign":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"utm_term":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"icon":{"anyOf":[{"type":"string","enum":["megaphone","sparkles","rocket","flag","star","heart","bell","party-popper","gift","tag","ticket","percent","badge-percent","shopping-bag","shopping-cart","package","truck","store","sun","snowflake","leaf","flower","sprout","umbrella","moon","tree-pine","egg","ghost","cake","trophy","crown","gem","award","medal","calendar","calendar-heart","camera","video","clapperboard","music","mic","palette","shirt","watch","globe","map-pin","plane","users","handshake","target","trending-up","zap","flame","coffee","dumbbell","gamepad-2"]},{"type":"null"}]},"icon_color":{"anyOf":[{"type":"string","enum":["default","gray","brown","orange","yellow","green","blue","purple","pink","red"]},{"type":"null"}]}},"required":["campaign_type_id","name","start_date"]}},"required":["body"]},"link_campaign_discount":{"type":"object","properties":{"input":{"$ref":"#/$defs/LinkCampaignDiscountInput","description":"The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields."}},"required":["input"],"$defs":{"LinkCampaignDiscountInput":{"type":"object","properties":{"campaignId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","minLength":1},{"type":"object","properties":{"name":{"type":"string","minLength":1}},"required":["name"],"additionalProperties":false}],"description":"A UUID, the name, or { \"name\": \"…\" } — resolved for you."},"discountCodeId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","minLength":1},{"type":"object","properties":{"name":{"type":"string","minLength":1}},"required":["name"],"additionalProperties":false}],"description":"A UUID, the name, or { \"name\": \"…\" } — resolved for you."}},"required":["campaignId","discountCodeId"]}}},"merge_campaigns":{"type":"object","properties":{"loserId":{"type":"string","format":"uuid"},"winnerId":{"type":"string","format":"uuid"}},"required":["loserId","winnerId"]},"preview_campaign_merge":{"type":"object","properties":{"loserId":{"type":"string","format":"uuid"},"winnerId":{"type":"string","format":"uuid"}},"required":["loserId","winnerId"]},"save_campaign_signals":{"type":"object","properties":{"campaignId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","minLength":1},{"type":"object","properties":{"name":{"type":"string","minLength":1}},"required":["name"],"additionalProperties":false}],"description":"A UUID, the name, or { \"name\": \"…\" } — resolved for you."},"signals":{"type":"array","items":{"$ref":"#/$defs/CampaignSignalRowInput"}}},"required":["campaignId","signals"],"$defs":{"CampaignSignalRowInput":{"type":"object","properties":{"fetchEnabled":{"type":"boolean","description":"HASHTAG only: also a capture target for the campaign schedule."},"kind":{"type":"string","enum":["HASHTAG","KEYWORD","MENTION"]},"socialNetworkId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","minLength":1},{"type":"object","properties":{"name":{"type":"string","minLength":1}},"required":["name"],"additionalProperties":false}],"description":"MENTION only: the network the handle belongs to. Null = any. A UUID, the name, or { \"name\": \"…\" } — resolved for you."},"value":{"type":"string","description":"With or without its prefix — stored bare."}},"required":["fetchEnabled","kind","value"]}}},"update_campaign_details":{"type":"object","properties":{"body":{"type":"object","properties":{"campaign_type_id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":120},"start_date":{},"end_date":{"anyOf":[{},{"type":"null"}]},"status":{"type":"string","enum":["ACTIVE","DRAFT","ARCHIVED","PAUSED","ENDED","COMPLETED"]},"allocated_budget":{"anyOf":[{"type":"number","minimum":0,"maximum":1000000000,"multipleOf":0.01},{"type":"null"}]},"utm_campaign":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"utm_term":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"icon":{"anyOf":[{"type":"string","enum":["megaphone","sparkles","rocket","flag","star","heart","bell","party-popper","gift","tag","ticket","percent","badge-percent","shopping-bag","shopping-cart","package","truck","store","sun","snowflake","leaf","flower","sprout","umbrella","moon","tree-pine","egg","ghost","cake","trophy","crown","gem","award","medal","calendar","calendar-heart","camera","video","clapperboard","music","mic","palette","shirt","watch","globe","map-pin","plane","users","handshake","target","trending-up","zap","flame","coffee","dumbbell","gamepad-2"]},{"type":"null"}]},"icon_color":{"anyOf":[{"type":"string","enum":["default","gray","brown","orange","yellow","green","blue","purple","pink","red"]},{"type":"null"}]}}},"campaignId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","minLength":1},{"type":"object","properties":{"name":{"type":"string","minLength":1}},"required":["name"],"additionalProperties":false}],"description":"A UUID, the name, or { \"name\": \"…\" } — resolved for you."}},"required":["body","campaignId"]},"update_campaign_icon":{"type":"object","properties":{"body":{"type":"object","properties":{"campaign_type_id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":120},"start_date":{},"end_date":{"anyOf":[{},{"type":"null"}]},"status":{"type":"string","enum":["ACTIVE","DRAFT","ARCHIVED","PAUSED","ENDED","COMPLETED"]},"allocated_budget":{"anyOf":[{"type":"number","minimum":0,"maximum":1000000000,"multipleOf":0.01},{"type":"null"}]},"utm_campaign":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"utm_term":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"icon":{"anyOf":[{"type":"string","enum":["megaphone","sparkles","rocket","flag","star","heart","bell","party-popper","gift","tag","ticket","percent","badge-percent","shopping-bag","shopping-cart","package","truck","store","sun","snowflake","leaf","flower","sprout","umbrella","moon","tree-pine","egg","ghost","cake","trophy","crown","gem","award","medal","calendar","calendar-heart","camera","video","clapperboard","music","mic","palette","shirt","watch","globe","map-pin","plane","users","handshake","target","trending-up","zap","flame","coffee","dumbbell","gamepad-2"]},{"type":"null"}]},"icon_color":{"anyOf":[{"type":"string","enum":["default","gray","brown","orange","yellow","green","blue","purple","pink","red"]},{"type":"null"}]}}},"campaignId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","minLength":1},{"type":"object","properties":{"name":{"type":"string","minLength":1}},"required":["name"],"additionalProperties":false}],"description":"A UUID, the name, or { \"name\": \"…\" } — resolved for you."}},"required":["body","campaignId"]},"update_campaign_status":{"type":"object","properties":{"body":{"type":"object","properties":{"campaign_type_id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":120},"start_date":{},"end_date":{"anyOf":[{},{"type":"null"}]},"status":{"type":"string","enum":["ACTIVE","DRAFT","ARCHIVED","PAUSED","ENDED","COMPLETED"]},"allocated_budget":{"anyOf":[{"type":"number","minimum":0,"maximum":1000000000,"multipleOf":0.01},{"type":"null"}]},"utm_campaign":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"utm_term":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"icon":{"anyOf":[{"type":"string","enum":["megaphone","sparkles","rocket","flag","star","heart","bell","party-popper","gift","tag","ticket","percent","badge-percent","shopping-bag","shopping-cart","package","truck","store","sun","snowflake","leaf","flower","sprout","umbrella","moon","tree-pine","egg","ghost","cake","trophy","crown","gem","award","medal","calendar","calendar-heart","camera","video","clapperboard","music","mic","palette","shirt","watch","globe","map-pin","plane","users","handshake","target","trending-up","zap","flame","coffee","dumbbell","gamepad-2"]},{"type":"null"}]},"icon_color":{"anyOf":[{"type":"string","enum":["default","gray","brown","orange","yellow","green","blue","purple","pink","red"]},{"type":"null"}]}}},"campaignId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","minLength":1},{"type":"object","properties":{"name":{"type":"string","minLength":1}},"required":["name"],"additionalProperties":false}],"description":"A UUID, the name, or { \"name\": \"…\" } — resolved for you."}},"required":["body","campaignId"]},"get_workspace_signals":{"type":"object","properties":{}}}