[{"data":1,"prerenderedAt":613},["ShallowReactive",2],{"/docs/base/jobs-base/client-exports/documents":3,"/docs/base/jobs-base/client-exports/documents-surround":599,"/docs/base/jobs-base/client-exports/documents-implemented-suggestions":612},{"id":4,"title":5,"body":6,"description":588,"extension":589,"head":590,"implementedSuggestions":590,"meta":591,"navigation":592,"path":594,"schemaOrg":590,"seo":595,"sitemap":596,"stem":597,"__hash__":598},"docs/1.docs/base/2.jobs-base/3.client-exports/3.documents.md","Documents",{"type":7,"value":8,"toc":581},"minimark",[9,14,40,43,47,50,106,120,124,138,193,206,210,216,252,259,263,270,409,412,544,557,577],[10,11,13],"h2",{"id":12},"document-views","Document views",[15,16,17,18,22,23,27,28,31,32,35,36,39],"p",{},"These ",[19,20,21],"strong",{},"client-only"," exports belong to the new document-card update.\nSupported types are exactly ",[24,25,26],"code",{},"identity",", ",[24,29,30],{},"licenses"," and ",[24,33,34],{},"service",".\nThe view exports display on the caller's screen. ",[24,37,38],{},"PresentOwnDocument"," displays the sender's own\ndocument to one selected nearby recipient.",[15,41,42],{},"Jobs Base must have finished starting. Call from a client event, command handler or thread\nthat can yield while the server request completes.",[10,44,46],{"id":45},"showowndocumentdocumenttype","ShowOwnDocument(documentType)",[15,48,49],{},"Shows the calling player's own card. The server selects the authenticated requesting\ncharacter; no supplied target ID or identity fields can replace that owner.\nNo job inspection grant is required for your own card.",[51,52,57],"pre",{"className":53,"code":54,"language":55,"meta":56,"style":56},"language-lua shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","local success, reason = exports[\"sky_jobs_base\"]:ShowOwnDocument(\"identity\")\n","lua","",[24,58,59],{"__ignoreMap":56},[60,61,64,68,72,75,78,81,85,87,90,94,97,99,101,103],"span",{"class":62,"line":63},"line",1,[60,65,67],{"class":66},"sMK4o","local",[60,69,71],{"class":70},"sTEyZ"," success, reason ",[60,73,74],{"class":66},"=",[60,76,77],{"class":70}," exports[",[60,79,80],{"class":66},"\"",[60,82,84],{"class":83},"sfazB","sky_jobs_base",[60,86,80],{"class":66},[60,88,89],{"class":70},"]:",[60,91,93],{"class":92},"s2Zo4","ShowOwnDocument",[60,95,96],{"class":70},"(",[60,98,80],{"class":66},[60,100,26],{"class":83},[60,102,80],{"class":66},[60,104,105],{"class":70},")\n",[15,107,108,109,112,113,115,116,119],{},"For your own license view, pass ",[24,110,111],{},"\"licenses\""," to ",[24,114,93],{}," instead.\nFor your department service ID, pass ",[24,117,118],{},"\"service\"",".\nClose the current card before opening another one.",[10,121,123],{"id":122},"showplayerdocumentdocumenttype-targetserverid","ShowPlayerDocument(documentType, targetServerId)",[15,125,126,127,130,131,134,135,137],{},"Inspects another player's identity, licenses or service ID.\n",[24,128,129],{},"targetServerId"," must be a positive integer ",[19,132,133],{},"server ID",", not a player index or ped handle.\nUse ",[24,136,93],{}," for your own character.",[51,139,141],{"className":53,"code":140,"language":55,"meta":56,"style":56},"local targetServerId = 12 -- Resolve your selected player's server ID.\nlocal success, reason = exports[\"sky_jobs_base\"]:ShowPlayerDocument(\"identity\", targetServerId)\n",[24,142,143,160],{"__ignoreMap":56},[60,144,145,147,150,152,156],{"class":62,"line":63},[60,146,67],{"class":66},[60,148,149],{"class":70}," targetServerId ",[60,151,74],{"class":66},[60,153,155],{"class":154},"sbssI"," 12",[60,157,159],{"class":158},"sHwdD"," -- Resolve your selected player's server ID.\n",[60,161,163,165,167,169,171,173,175,177,179,182,184,186,188,190],{"class":62,"line":162},2,[60,164,67],{"class":66},[60,166,71],{"class":70},[60,168,74],{"class":66},[60,170,77],{"class":70},[60,172,80],{"class":66},[60,174,84],{"class":83},[60,176,80],{"class":66},[60,178,89],{"class":70},[60,180,181],{"class":92},"ShowPlayerDocument",[60,183,96],{"class":70},[60,185,80],{"class":66},[60,187,26],{"class":83},[60,189,80],{"class":66},[60,191,192],{"class":70},", targetServerId)\n",[15,194,195,196,198,199,201,202,205],{},"The actor needs the corresponding ",[24,197,26],{}," or ",[24,200,30],{}," inspection permission, with the\nexisting job, grade and duty rules. The server checks a maximum distance of ",[19,203,204],{},"2.5 metres",",\nmatching routing buckets and unchanged character identity after provider work. The target must\nbe restrained by Jobs Base (handcuffs or zip ties), including when inspected by Crime members.\nCalling an export does not grant access.\nService-ID inspection uses the identity permission. The holder must have an employment\njob; number allocation requires the new service-card tables and oxmysql.",[10,207,209],{"id":208},"presentowndocumentdocumenttype-recipientserverid","PresentOwnDocument(documentType, recipientServerId)",[15,211,212,213,215],{},"Shows the sender's own document on one nearby player's screen. The server chooses the\nauthenticated sender's character. No inspection grant is required; the sender cannot be\nrestrained. Both players must remain within ",[19,214,204],{}," in the same routing bucket.\nThe recipient must have no other focused NUI. Offers are single-use and bound to both\nplayers' current characters. Presentation uses the shared card interface.",[51,217,219],{"className":53,"code":218,"language":55,"meta":56,"style":56},"local success, reason = exports[\"sky_jobs_base\"]:PresentOwnDocument(\"service\", recipientServerId)\n",[24,220,221],{"__ignoreMap":56},[60,222,223,225,227,229,231,233,235,237,239,241,243,245,247,249],{"class":62,"line":63},[60,224,67],{"class":66},[60,226,71],{"class":70},[60,228,74],{"class":66},[60,230,77],{"class":70},[60,232,80],{"class":66},[60,234,84],{"class":83},[60,236,80],{"class":66},[60,238,89],{"class":70},[60,240,38],{"class":92},[60,242,96],{"class":70},[60,244,80],{"class":66},[60,246,34],{"class":83},[60,248,80],{"class":66},[60,250,251],{"class":70},", recipientServerId)\n",[15,253,254,255,258],{},"The radial also exposes these actions under ",[19,256,257],{},"Player interactions → Documents",".\nThis presents a document; it does not transfer an inventory item.",[10,260,262],{"id":261},"return-values","Return values",[15,264,265,266,269],{},"All three return ",[24,267,268],{},"success, reason?",":",[271,272,273,286],"table",{},[274,275,276],"thead",{},[277,278,279,283],"tr",{},[280,281,282],"th",{},"Result",[280,284,285],{},"Meaning",[287,288,289,300,317,327,337,349,359,369,379,389,399],"tbody",{},[277,290,291,297],{},[292,293,294],"td",{},[24,295,296],{},"true",[292,298,299],{},"Shared-view opening was accepted, or an authorized native-provider handoff was accepted. It does not prove that an external provider rendered its UI.",[277,301,302,307],{},[292,303,304],{},[24,305,306],{},"false, \"invalid_document_type\"",[292,308,309,310,27,312,198,314,316],{},"Type is not ",[24,311,26],{},[24,313,30],{},[24,315,34],{},".",[277,318,319,324],{},[292,320,321],{},[24,322,323],{},"false, \"storage\"",[292,325,326],{},"Service settings or number allocation could not be stored/read. Check the new tables and oxmysql.",[277,328,329,334],{},[292,330,331],{},[24,332,333],{},"false, \"disabled\"",[292,335,336],{},"The master document switch or service-card switch is off in Jobs Base configuration.",[277,338,339,344],{},[292,340,341],{},[24,342,343],{},"false, \"invalid_target\"",[292,345,346,347,316],{},"Invalid target, changed character, or your own ID supplied to ",[24,348,181],{},[277,350,351,356],{},[292,352,353],{},[24,354,355],{},"false, \"busy\"",[292,357,358],{},"The viewing client has another focused NUI, the recipient has a pending offer, or the request is rate-limited.",[277,360,361,366],{},[292,362,363],{},[24,364,365],{},"false, \"target_not_restrained\"",[292,367,368],{},"Target inspection requires handcuffs or zip ties.",[277,370,371,376],{},[292,372,373],{},[24,374,375],{},"false, \"restrained\"",[292,377,378],{},"A restrained sender cannot present their own document.",[277,380,381,386],{},[292,382,383],{},[24,384,385],{},"false, \"not_authorized\"",[292,387,388],{},"Inspection permission or character binding failed.",[277,390,391,396],{},[292,392,393],{},[24,394,395],{},"false, \"too_far\"",[292,397,398],{},"Target is too far away, in another routing bucket, or has no usable ped.",[277,400,401,406],{},[292,402,403],{},[24,404,405],{},"false, \"unavailable\"",[292,407,408],{},"Request or configured provider could not supply the document.",[15,410,411],{},"Access and custom-provider hooks can return their own existing failure reason.\nHandle failed requests explicitly instead of treating them as empty or successful cards.",[51,413,415],{"className":53,"code":414,"language":55,"meta":56,"style":56},"RegisterCommand(\"myidentity\", function()\n    local success, reason = exports[\"sky_jobs_base\"]:ShowOwnDocument(\"identity\")\n    if not success then\n        print((\"Document view failed: %s\"):format(reason or \"unavailable\"))\n    end\nend, false)\n",[24,416,417,440,471,486,525,531],{"__ignoreMap":56},[60,418,419,422,424,426,429,431,433,437],{"class":62,"line":63},[60,420,421],{"class":92},"RegisterCommand",[60,423,96],{"class":70},[60,425,80],{"class":66},[60,427,428],{"class":83},"myidentity",[60,430,80],{"class":66},[60,432,27],{"class":70},[60,434,436],{"class":435},"s7zQu","function",[60,438,439],{"class":66},"()\n",[60,441,442,445,447,449,451,453,455,457,459,461,463,465,467,469],{"class":62,"line":162},[60,443,444],{"class":66},"    local",[60,446,71],{"class":70},[60,448,74],{"class":66},[60,450,77],{"class":70},[60,452,80],{"class":66},[60,454,84],{"class":83},[60,456,80],{"class":66},[60,458,89],{"class":70},[60,460,93],{"class":92},[60,462,96],{"class":70},[60,464,80],{"class":66},[60,466,26],{"class":83},[60,468,80],{"class":66},[60,470,105],{"class":70},[60,472,474,477,480,483],{"class":62,"line":473},3,[60,475,476],{"class":435},"    if",[60,478,479],{"class":66}," not",[60,481,482],{"class":70}," success ",[60,484,485],{"class":435},"then\n",[60,487,489,492,495,497,500,502,505,508,511,514,517,520,522],{"class":62,"line":488},4,[60,490,491],{"class":92},"        print",[60,493,494],{"class":70},"((",[60,496,80],{"class":66},[60,498,499],{"class":83},"Document view failed: %s",[60,501,80],{"class":66},[60,503,504],{"class":70},"):",[60,506,507],{"class":92},"format",[60,509,510],{"class":70},"(reason ",[60,512,513],{"class":66},"or",[60,515,516],{"class":66}," \"",[60,518,519],{"class":83},"unavailable",[60,521,80],{"class":66},[60,523,524],{"class":70},"))\n",[60,526,528],{"class":62,"line":527},5,[60,529,530],{"class":435},"    end\n",[60,532,534,537,539,542],{"class":62,"line":533},6,[60,535,536],{"class":435},"end",[60,538,27],{"class":70},[60,540,541],{"class":66},"false",[60,543,105],{"class":70},[15,545,546,547,550,551,550,554,316],{},"After importing Jobs Base, the same client APIs are available as\n",[24,548,549],{},"Sky_Jobs.ShowOwnDocument(documentType)"," and\n",[24,552,553],{},"Sky_Jobs.ShowPlayerDocument(documentType, targetServerId)",[24,555,556],{},"Sky_Jobs.PresentOwnDocument(documentType, recipientServerId)",[15,558,559,560,27,563,566,567,570,571,576],{},"Shared cards close with ",[19,561,562],{},"Return / Enter",[19,564,565],{},"Escape",", or after ",[19,568,569],{},"60 seconds",".\nExternal providers retain their own interface and closing behaviour.\nSee ",[572,573,575],"a",{"href":574},"/docs/base/jobs-base/features/player-documents","Player Documents"," for editable templates,\nposition, size, optional branding and native integrations.",[578,579,580],"style",{},"html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}",{"title":56,"searchDepth":63,"depth":162,"links":582},[583,584,585,586,587],{"id":12,"depth":162,"text":13},{"id":45,"depth":162,"text":46},{"id":122,"depth":162,"text":123},{"id":208,"depth":162,"text":209},{"id":261,"depth":162,"text":262},"Client exports for viewing your own documents and inspecting a selected player's identity, licenses or service ID.","md",null,{},{"icon":593},"i-lucide-id-card","/docs/base/jobs-base/client-exports/documents",{"title":5,"description":588},{"loc":594},"1.docs/base/2.jobs-base/3.client-exports/3.documents","ijqcs-vCCN8O-AJ8h5jh4NSAn58sYGJn1O0mc9n7DPc",[600,606],{"title":601,"path":602,"stem":603,"description":604,"icon":605,"children":-1},"Training","/docs/base/jobs-base/client-exports/training","1.docs/base/2.jobs-base/3.client-exports/2.training","Supported client-side integration boundary for the Jobs Base Training App.","i-lucide-graduation-cap",{"title":607,"path":608,"stem":609,"children":-1,"description":610,"icon":611},"Server Exports","/docs/base/jobs-base/server-exports","1.docs/base/2.jobs-base/4.server-exports","Server-side exports provided by sky_jobs_base for wholesale orders, storage, dispatch, tablet app registration, and more.","i-lucide-server",[],1791771127876]