1 line
No EOL
12 KiB
XML
1 line
No EOL
12 KiB
XML
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentStyleType="text/css" data-diagram-type="SEQUENCE" height="542px" preserveAspectRatio="none" style="width:627px;height:542px;background:#FFFFFF;" version="1.1" viewBox="0 0 627 542" width="627px" zoomAndPan="magnify"><title>Listing creation and admin approval</title><defs/><g><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacing" textLength="285.8926" x="172.1538" y="27.9951">Listing creation and admin approval</text><g><title>Owner</title><rect fill="#000000" fill-opacity="0.00000" height="342.7266" width="8" x="26.856" y="118.5938"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5,5;" x1="30" x2="30" y1="118.5938" y2="461.3203"/></g><g><title>Next API</title><rect fill="#000000" fill-opacity="0.00000" height="342.7266" width="8" x="194.9795" y="118.5938"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5,5;" x1="198.25" x2="198.25" y1="118.5938" y2="461.3203"/></g><g><title>Postgres</title><rect fill="#000000" fill-opacity="0.00000" height="342.7266" width="8" x="480.2554" y="118.5938"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5,5;" x1="484.085" x2="484.085" y1="118.5938" y2="461.3203"/></g><g><title>Admin</title><rect fill="#000000" fill-opacity="0.00000" height="342.7266" width="8" x="548.8579" y="118.5938"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5,5;" x1="552.4258" x2="552.4258" y1="118.5938" y2="461.3203"/></g><g><title>User</title><rect fill="#000000" fill-opacity="0.00000" height="342.7266" width="8" x="603.2451" y="118.5938"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5,5;" x1="606.29" x2="606.29" y1="118.5938" y2="461.3203"/></g><g class="participant participant-head" data-participant="Owner"><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="45.7119" x="5" y="115.292">Owner</text><ellipse cx="30.856" cy="50.7969" fill="#E2E2F0" rx="8" ry="8" style="stroke:#181818;stroke-width:0.5;"/><path d="M30.856,58.7969 L30.856,85.7969 M17.856,66.7969 L43.856,66.7969 M30.856,85.7969 L17.856,100.7969 M30.856,85.7969 L43.856,100.7969" fill="none" style="stroke:#181818;stroke-width:0.5;"/></g><g class="participant participant-tail" data-participant="Owner"><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="45.7119" x="5" y="473.3154">Owner</text><ellipse cx="30.856" cy="485.1172" fill="#E2E2F0" rx="8" ry="8" style="stroke:#181818;stroke-width:0.5;"/><path d="M30.856,493.1172 L30.856,520.1172 M17.856,501.1172 L43.856,501.1172 M30.856,520.1172 L17.856,535.1172 M30.856,520.1172 L43.856,535.1172" fill="none" style="stroke:#181818;stroke-width:0.5;"/></g><g class="participant participant-head" data-participant="API"><rect fill="#E2E2F0" height="30.2969" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="73.459" x="162.25" y="87.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="59.459" x="169.25" y="107.292">Next API</text></g><g class="participant participant-tail" data-participant="API"><rect fill="#E2E2F0" height="30.2969" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="73.459" x="162.25" y="460.3203"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="59.459" x="169.25" y="480.3154">Next API</text></g><g class="participant participant-head" data-participant="DB"><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="60.3408" x="451.085" y="115.292">Postgres</text><path d="M466.2554,66.2969 C466.2554,56.2969 484.2554,56.2969 484.2554,56.2969 C484.2554,56.2969 502.2554,56.2969 502.2554,66.2969 L502.2554,92.2969 C502.2554,102.2969 484.2554,102.2969 484.2554,102.2969 C484.2554,102.2969 466.2554,102.2969 466.2554,92.2969 L466.2554,66.2969" fill="#E2E2F0" style="stroke:#181818;stroke-width:0.5;"/><path d="M466.2554,66.2969 C466.2554,76.2969 484.2554,76.2969 484.2554,76.2969 C484.2554,76.2969 502.2554,76.2969 502.2554,66.2969" fill="none" style="stroke:#181818;stroke-width:0.5;"/></g><g class="participant participant-tail" data-participant="DB"><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="60.3408" x="451.085" y="473.3154">Postgres</text><path d="M466.2554,486.6172 C466.2554,476.6172 484.2554,476.6172 484.2554,476.6172 C484.2554,476.6172 502.2554,476.6172 502.2554,486.6172 L502.2554,512.6172 C502.2554,522.6172 484.2554,522.6172 484.2554,522.6172 C484.2554,522.6172 466.2554,522.6172 466.2554,512.6172 L466.2554,486.6172" fill="#E2E2F0" style="stroke:#181818;stroke-width:0.5;"/><path d="M466.2554,486.6172 C466.2554,496.6172 484.2554,496.6172 484.2554,496.6172 C484.2554,496.6172 502.2554,496.6172 502.2554,486.6172" fill="none" style="stroke:#181818;stroke-width:0.5;"/></g><g class="participant participant-head" data-participant="Admin"><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="44.8643" x="527.4258" y="115.292">Admin</text><ellipse cx="552.8579" cy="50.7969" fill="#E2E2F0" rx="8" ry="8" style="stroke:#181818;stroke-width:0.5;"/><path d="M552.8579,58.7969 L552.8579,85.7969 M539.8579,66.7969 L565.8579,66.7969 M552.8579,85.7969 L539.8579,100.7969 M552.8579,85.7969 L565.8579,100.7969" fill="none" style="stroke:#181818;stroke-width:0.5;"/></g><g class="participant participant-tail" data-participant="Admin"><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="44.8643" x="527.4258" y="473.3154">Admin</text><ellipse cx="552.8579" cy="485.1172" fill="#E2E2F0" rx="8" ry="8" style="stroke:#181818;stroke-width:0.5;"/><path d="M552.8579,493.1172 L552.8579,520.1172 M539.8579,501.1172 L565.8579,501.1172 M552.8579,520.1172 L539.8579,535.1172 M552.8579,520.1172 L565.8579,535.1172" fill="none" style="stroke:#181818;stroke-width:0.5;"/></g><g class="participant participant-head" data-participant="User"><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="31.9102" x="588.29" y="115.292">User</text><ellipse cx="607.2451" cy="50.7969" fill="#E2E2F0" rx="8" ry="8" style="stroke:#181818;stroke-width:0.5;"/><path d="M607.2451,58.7969 L607.2451,85.7969 M594.2451,66.7969 L620.2451,66.7969 M607.2451,85.7969 L594.2451,100.7969 M607.2451,85.7969 L620.2451,100.7969" fill="none" style="stroke:#181818;stroke-width:0.5;"/></g><g class="participant participant-tail" data-participant="User"><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="31.9102" x="588.29" y="473.3154">User</text><ellipse cx="607.2451" cy="485.1172" fill="#E2E2F0" rx="8" ry="8" style="stroke:#181818;stroke-width:0.5;"/><path d="M607.2451,493.1172 L607.2451,520.1172 M594.2451,501.1172 L620.2451,501.1172 M607.2451,520.1172 L594.2451,535.1172 M607.2451,520.1172 L620.2451,535.1172" fill="none" style="stroke:#181818;stroke-width:0.5;"/></g><g class="message" data-participant-1="Owner" data-participant-2="API"><polygon fill="#181818" points="186.9795,160.8594,196.9795,164.8594,186.9795,168.8594,190.9795,164.8594" style="stroke:#181818;stroke-width:1;"/><line style="stroke:#181818;stroke-width:1;" x1="30.856" x2="192.9795" y1="164.8594" y2="164.8594"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="112.9565" x="37.856" y="144.6606">POST /api/listings</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="144.1235" x="37.856" y="159.7935">(slug, details, images)</text></g><g class="message" data-participant-1="API" data-participant-2="DB"><polygon fill="#181818" points="472.2554,205.125,482.2554,209.125,472.2554,213.125,476.2554,209.125" style="stroke:#181818;stroke-width:1;"/><line style="stroke:#181818;stroke-width:1;" x1="198.9795" x2="478.2554" y1="209.125" y2="209.125"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="88.5117" x="205.9795" y="188.9263">create Listing</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="261.2759" x="205.9795" y="204.0591">status=PENDING (or PUBLISHED if auto)</text></g><g class="message" data-participant-1="Admin" data-participant-2="API"><polygon fill="#181818" points="209.9795,234.2578,199.9795,238.2578,209.9795,242.2578,205.9795,238.2578" style="stroke:#181818;stroke-width:1;"/><line style="stroke:#181818;stroke-width:1;" x1="203.9795" x2="551.8579" y1="238.2578" y2="238.2578"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="156.9077" x="215.9795" y="233.1919">GET /api/admin/pending</text></g><g class="message" data-participant-1="API" data-participant-2="DB"><polygon fill="#181818" points="472.2554,263.3906,482.2554,267.3906,472.2554,271.3906,476.2554,267.3906" style="stroke:#181818;stroke-width:1;"/><line style="stroke:#181818;stroke-width:1;" x1="198.9795" x2="478.2554" y1="267.3906" y2="267.3906"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="140.1372" x="205.9795" y="262.3247">fetch pending listings</text></g><g class="message" data-participant-1="Admin" data-participant-2="API"><polygon fill="#181818" points="209.9795,307.6563,199.9795,311.6563,209.9795,315.6563,205.9795,311.6563" style="stroke:#181818;stroke-width:1;"/><line style="stroke:#181818;stroke-width:1;" x1="203.9795" x2="551.8579" y1="311.6563" y2="311.6563"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="215.9092" x="215.9795" y="291.4575">POST /api/admin/listings/approve</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="210.1201" x="215.9795" y="306.5903">(action=approve|reject|remove)</text></g><g class="message" data-participant-1="API" data-participant-2="DB"><polygon fill="#181818" points="472.2554,336.7891,482.2554,340.7891,472.2554,344.7891,476.2554,340.7891" style="stroke:#181818;stroke-width:1;"/><line style="stroke:#181818;stroke-width:1;" x1="198.9795" x2="478.2554" y1="340.7891" y2="340.7891"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="175.043" x="205.9795" y="335.7231">update status, timestamps</text></g><g class="message" data-participant-1="User" data-participant-2="API"><polygon fill="#181818" points="209.9795,365.9219,199.9795,369.9219,209.9795,373.9219,205.9795,369.9219" style="stroke:#181818;stroke-width:1;"/><line style="stroke:#181818;stroke-width:1;" x1="203.9795" x2="606.2451" y1="369.9219" y2="369.9219"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="122.1099" x="215.9795" y="364.856">GET /listings/[slug]</text></g><g class="message" data-participant-1="API" data-participant-2="DB"><polygon fill="#181818" points="472.2554,410.1875,482.2554,414.1875,472.2554,418.1875,476.2554,414.1875" style="stroke:#181818;stroke-width:1;"/><line style="stroke:#181818;stroke-width:1;" x1="198.9795" x2="478.2554" y1="414.1875" y2="414.1875"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="107.0913" x="205.9795" y="393.9888">fetch translation</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="240.4873" x="205.9795" y="409.1216">status=PUBLISHED and not removed</text></g><g class="message" data-participant-1="API" data-participant-2="User"><polygon fill="#181818" points="595.2451,439.3203,605.2451,443.3203,595.2451,447.3203,599.2451,443.3203" style="stroke:#181818;stroke-width:1;"/><line style="stroke:#181818;stroke-width:1;stroke-dasharray:2,2;" x1="198.9795" x2="601.2451" y1="443.3203" y2="443.3203"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="86.5059" x="205.9795" y="438.2544">render listing</text></g><!--SRC=[PL5BJy904BxtLqmuOOBfdGGJI0cI46Y2dCJ3s1tgcdQxsPcg1t-yisq1qTFEFhxdYfMAO6DPh2kX28HY6mVe3A2fhKxUX-O3gmGBQGBiFXs5n6CGMrYFJc2qfI-1URuU0N9S4uE2hyW4USDI1k9uaIq6Xdca7UO3ArdISSBzGmHF8T_jdo15RzEgTyL7D-QgBITWID1MF05ROqbyboWWuhB5jBT-IN9qB2Wjp_BbDbjlLp1MjVomsAptZyiCx0cmbKO9kendwTLoKEwYfvwSKQxVAYUIuWs62pWR_4DpJT3pd9-bVPUaUJI-rZmR3hu3lLCXkjIwkudLUXDZzMac8BOcdMlFIUpkrlb5vpdMzVBVjmHqN7K_V2teKahySzS8z2vC3rTy59hggJCgE6Zy0000]--></g></svg> |