{"format":"jobhunt.support.operation/v1","revision":"f77de0f4803debf8c5aaac1702865d976a380e994ea7f572d4e571c044d5495f","contract_sha256":"acfda93724db1a3f53160a30bc5891f447ad14601f26b02ff4cacd7c17d0812e","documentation_only":true,"operation":{"name":"create_cover_letter_document_v2","description":"Save the user’s requested cover-letter draft in the selected role package, with sources for supplied career facts. First create a role copy. Never infer the applicant has a qualification just because the posting requests it; ask about missing facts or offer truthful wording. Body text remains a draft for review. Use get_document and update_resume_section_v2 for shorter/use-my-wording revisions, and restore_document_revision for a selected undo. Does not send or submit.","http":"POST /api/v1/journey/create_cover_letter_document_v2","readOnly":false,"scopes":["read:documents","write:documents","write:applications"],"availability":"connected-journey","destructive":true,"implementation_sha256":"6f5030748fb90acd70e41c5e23e223d60652d7dc60075908ae62eea3412da86a","input_schema_ref":"/support/contracts.json#/tools/create_cover_letter_document_v2/inputSchema","output_schema_ref":"/support/contracts.json#/tools/create_cover_letter_document_v2/outputSchema","required_fields":["request_id","template_slug","expected_revision","expected_application_revision","workflow_revision","name","content","source_refs"]},"contract":{"annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Create cover letter document"},"description":"Save the user’s requested cover-letter draft in the selected role package, with sources for supplied career facts. First create a role copy. Never infer the applicant has a qualification just because the posting requests it; ask about missing facts or offer truthful wording. Body text remains a draft for review. Use get_document and update_resume_section_v2 for shorter/use-my-wording revisions, and restore_document_revision for a selected undo. Does not send or submit.","inputSchema":{"$defs":{"LetterContent":{"additionalProperties":false,"properties":{"body_paragraphs":{"items":{"maxLength":10000,"minLength":1,"type":"string"},"maxItems":30,"minItems":1,"title":"Body Paragraphs","type":"array"},"closing":{"default":"","maxLength":2000,"title":"Closing","type":"string"},"company":{"default":"","maxLength":255,"title":"Company","type":"string"},"date":{"anyOf":[{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},{"type":"null"}],"default":null,"title":"Date"},"position":{"default":"","maxLength":255,"title":"Position","type":"string"},"recipient":{"default":"","maxLength":255,"title":"Recipient","type":"string"},"salutation":{"default":"Dear hiring team,","maxLength":255,"title":"Salutation","type":"string"},"signoff":{"default":"Sincerely,","maxLength":255,"title":"Signoff","type":"string"}},"required":["body_paragraphs"],"title":"LetterContent","type":"object"},"SourceRef":{"additionalProperties":false,"properties":{"field":{"anyOf":[{"maxLength":160,"type":"string"},{"type":"null"}],"default":null,"title":"Field"},"kind":{"enum":["user_statement","import","posting","document","written_offer","verbal_offer","estimate","unknown"],"title":"Kind","type":"string"},"note":{"anyOf":[{"maxLength":1000,"type":"string"},{"type":"null"}],"default":null,"title":"Note"},"record_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"},{"type":"null"}],"default":null,"title":"Record Id"}},"required":["kind"],"title":"SourceRef","type":"object"}},"additionalProperties":false,"properties":{"content":{"$ref":"#/$defs/LetterContent"},"expected_account_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"},{"type":"null"}],"default":null,"description":"Use the verified get_connected_account ID for this intent. A changed connection is rejected before any action; never replace it automatically on retry.","title":"Expected Account Id"},"expected_application_revision":{"maximum":2147483647,"minimum":1,"title":"Expected Application Revision","type":"integer"},"expected_revision":{"maximum":2147483647,"minimum":1,"title":"Expected Revision","type":"integer"},"name":{"maxLength":255,"minLength":1,"title":"Name","type":"string"},"request_id":{"maxLength":36,"minLength":36,"title":"Request Id","type":"string"},"source_refs":{"items":{"$ref":"#/$defs/SourceRef"},"maxItems":20,"minItems":1,"title":"Source Refs","type":"array"},"template_slug":{"maxLength":256,"minLength":1,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","title":"Template Slug","type":"string"},"workflow_revision":{"maxLength":64,"minLength":64,"pattern":"^[a-f0-9]{64}$","title":"Workflow Revision","type":"string"}},"required":["request_id","template_slug","expected_revision","expected_application_revision","workflow_revision","name","content","source_refs"],"title":"CreateLetter","type":"object"},"name":"create_cover_letter_document_v2","outputSchema":{"$defs":{"DisplaySettings":{"additionalProperties":false,"description":"Presentation is separate from career facts and their confirmation.","properties":{"section_order":{"items":{"type":"string"},"maxItems":30,"title":"Section Order","type":"array"},"section_titles":{"additionalProperties":{"maxLength":120,"type":"string"},"title":"Section Titles","type":"object"},"section_visibility":{"additionalProperties":{"type":"boolean"},"title":"Section Visibility","type":"object"}},"title":"DisplaySettings","type":"object"},"Document":{"additionalProperties":false,"properties":{"application_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"},{"type":"null"}],"default":null,"title":"Application Id"},"archetype":{"default":"structured","enum":["structured","letter","reference","statement","contact"],"title":"Archetype","type":"string"},"contact_profile_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"},{"type":"null"}],"default":null,"title":"Contact Profile Id"},"design":{"enum":["linen","historical"],"title":"Design","type":"string"},"display_settings":{"$ref":"#/$defs/DisplaySettings"},"id":{"maxLength":256,"minLength":1,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","title":"Id","type":"string"},"master_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"},{"type":"null"}],"default":null,"title":"Master Id"},"name":{"maxLength":255,"minLength":1,"title":"Name","type":"string"},"relation":{"enum":["master","role_draft","source","prepared"],"title":"Relation","type":"string"},"revision":{"maximum":2147483647,"minimum":1,"title":"Revision","type":"integer"},"sections":{"items":{"$ref":"#/$defs/Section"},"maxItems":30,"title":"Sections","type":"array"},"slug":{"maxLength":256,"minLength":1,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","title":"Slug","type":"string"},"subtype":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"title":"Subtype"},"type":{"enum":["resume","cover_letter","offer_attachment","supporting_document"],"title":"Type","type":"string"},"uncertain_fields":{"items":{"type":"string"},"maxItems":200,"title":"Uncertain Fields","type":"array"}},"required":["id","slug","name","revision","type","relation","sections","design"],"title":"Document","type":"object"},"Fact":{"additionalProperties":false,"properties":{"field":{"description":"Career-content JSON pointer. For new resumes use /personal/name, /personal/email, /summary, /work/0/organization, /work/0/positions/0/position, /work/0/positions/0/startDate, /work/0/positions/0/endDate, /work/0/positions/0/highlights/0, /skills/0/category and /skills/0/skills/0. Dates use camelCase; skills are nested under a category. Use the exact returned path when correcting an existing fact. Omit unknown dates; never infer Present.","maxLength":160,"minLength":1,"title":"Field","type":"string"},"sources":{"items":{"$ref":"#/$defs/SourceRef"},"maxItems":20,"title":"Sources","type":"array"},"state":{"enum":["draft","uncertain","confirmed","declined"],"title":"State","type":"string"},"value":{"maxLength":10000,"title":"Value","type":"string"}},"required":["field","value","state","sources"],"title":"Fact","type":"object"},"Failure":{"additionalProperties":false,"properties":{"code":{"enum":["authentication_required","account_changed","insufficient_scope","access_unavailable","not_found","invalid_input","revision_conflict","request_id_conflict","source_unavailable","processing_failed","rate_limited","retry_expired"],"title":"Code","type":"string"},"message":{"maxLength":1000,"minLength":1,"title":"Message","type":"string"},"retry_after_seconds":{"anyOf":[{"maximum":900,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"title":"Retry After Seconds"}},"required":["code","message"],"title":"Failure","type":"object"},"NextAction":{"additionalProperties":false,"properties":{"kind":{"enum":["read","edit","select","retry","reconnect","consent","open_website","open_employer","support","none"],"title":"Kind","type":"string"},"label":{"maxLength":255,"title":"Label","type":"string"},"record_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"},{"type":"null"}],"default":null,"title":"Record Id"}},"required":["kind","label"],"title":"NextAction","type":"object"},"Operation":{"additionalProperties":false,"properties":{"error":{"anyOf":[{"$ref":"#/$defs/Failure"},{"type":"null"}],"default":null},"id":{"maxLength":256,"minLength":1,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","title":"Id","type":"string"},"kind":{"maxLength":100,"minLength":1,"title":"Kind","type":"string"},"resource":{"anyOf":[{"$ref":"#/$defs/Summary"},{"type":"null"}],"default":null},"retry_after_seconds":{"maximum":900,"minimum":0,"title":"Retry After Seconds","type":"integer"},"retry_expires_at":{"maxLength":40,"minLength":20,"title":"Retry Expires At","type":"string"},"status":{"enum":["pending","running","succeeded","failed"],"title":"Status","type":"string"}},"required":["id","status","kind","retry_after_seconds","retry_expires_at"],"title":"Operation","type":"object"},"Section":{"additionalProperties":false,"properties":{"entries":{"items":{"$ref":"#/$defs/SectionEntry"},"maxItems":100,"title":"Entries","type":"array"},"name":{"maxLength":80,"minLength":1,"title":"Name","type":"string"},"text":{"anyOf":[{"maxLength":100000,"type":"string"},{"type":"null"}],"title":"Text"}},"required":["name","text","entries"],"title":"Section","type":"object"},"SectionEntry":{"additionalProperties":false,"properties":{"fields":{"items":{"$ref":"#/$defs/Fact"},"maxItems":50,"title":"Fields","type":"array"},"id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"},{"type":"null"}],"default":null,"title":"Id"}},"required":["fields"],"title":"SectionEntry","type":"object"},"SourceRef":{"additionalProperties":false,"properties":{"field":{"anyOf":[{"maxLength":160,"type":"string"},{"type":"null"}],"default":null,"title":"Field"},"kind":{"enum":["user_statement","import","posting","document","written_offer","verbal_offer","estimate","unknown"],"title":"Kind","type":"string"},"note":{"anyOf":[{"maxLength":1000,"type":"string"},{"type":"null"}],"default":null,"title":"Note"},"record_id":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"},{"type":"null"}],"default":null,"title":"Record Id"}},"required":["kind"],"title":"SourceRef","type":"object"},"Summary":{"additionalProperties":false,"properties":{"id":{"maxLength":256,"minLength":1,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","title":"Id","type":"string"},"kind":{"enum":["application","search","document","task","interview","contact","company","note","profile","package","notification","highlight"],"title":"Kind","type":"string"},"label":{"maxLength":255,"minLength":1,"title":"Label","type":"string"},"revision":{"anyOf":[{"maximum":2147483647,"minimum":1,"type":"integer"},{"type":"null"}],"title":"Revision"},"website_url":{"anyOf":[{"maxLength":2048,"type":"string"},{"type":"null"}],"default":null,"title":"Website Url"}},"required":["id","kind","label","revision"],"title":"Summary","type":"object"}},"additionalProperties":false,"properties":{"data":{"anyOf":[{"$ref":"#/$defs/Document"},{"type":"null"}]},"error":{"anyOf":[{"$ref":"#/$defs/Failure"},{"type":"null"}],"default":null},"next_action":{"$ref":"#/$defs/NextAction"},"operation":{"anyOf":[{"$ref":"#/$defs/Operation"},{"type":"null"}],"default":null},"outcome":{"enum":["ready","pending","needs_input","conflict","failed"],"title":"Outcome","type":"string"},"revision":{"anyOf":[{"maximum":2147483647,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"title":"Revision"},"website_url":{"anyOf":[{"maxLength":2048,"type":"string"},{"type":"null"}],"default":null,"title":"Website Url"}},"required":["outcome","data","next_action"],"title":"Result[Document]","type":"object"},"title":"Create cover letter document"}}