PageSourceSearch

https://app.gopitcrew.com/assets/clientService-CwzRQW9n.js

js gopitcrew.com collected 2026-10-03 21:13:31 UTC 1,566 bytes, 1 lines download raw bytes

1import{y as r}from"./index-vP4jtEGS.js";import"./vendor-react-DqEQpdJ_.js";import"./vendor-icons-B-8y0biV.js";import"./vendor-radix-BAR1pTYe.js";function s(a){const t=a.created_at?new Date(a.created_at):new Date,e=a.updated_at?new Date(a.updated_at):new Date;return isNaN(t.getTime())&&console.warn("[transformApiClientToClient] Invalid createdAt, using current date"),isNaN(e.getTime())&&console.warn("[transformApiClientToClient] Invalid updatedAt, using current date"),{id:a.client_id,name:a.client_name,type:a.client_type,createdAt:isNaN(t.getTime())?new Date:t,updatedAt:isNaN(e.getTime())?new Date:e,sources:a.sources||[],sourcesCount:a.sources?.length||0,template:a.template||null,template_source:a.template_source||null,rag_collection_name:a.rag_collection_name||null}}class c{async getClients(){const t=await r.get("/api/clients");let e;if(Array.isArray(t.data))e=t.data;else if(t.clients&&Array.isArray(t.clients))e=t.clients;else if(Array.isArray(t))e=t;else throw console.error("[ClientService] Unexpected response format:",t),new Error("Unexpected response format from API");return e.map(s)}async getClient(t){const e=await r.get(`/api/clients/${t}`);let n;return e.data?n=e.data:e.client?n=e.client:n=e,s(n)}async createClient(t){const e=await r.post("/api/clients",t);let n;return e.data?n=e.data:e.client?n=e.client:n=e,s(n)}async deleteClient(t){await r.delete(`/api/clients/${t}`)}async updateClient(t,e){const n=await r.put(`/api/clients/${t}`,e);let i;return n.data?i=n.data:i=n,s(i)}}const u=new c;export{c as ClientService,u as clientService};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.