import { z } from 'zod'; export default class Network { prefix = `NETWORK` indices = null constructor(indices) { this.indices = indices } schema = z.object({ id: z.number(), name: z.string(), apps: z.array(z.string()), logo: z.string(), abbreviation: z.string(), created: z.string(), stripeAccountId: z.string().nullable(), stripeAccessToken: z.string().nullable() }) .strict() get(id) { if(id.length > 1) { id = id.split("-")[1] } let index = this.indices[0] + (id - 1) return structuredClone(global.db.nodes[index]) } getByAbbreviation(abbreviation) { for(let i=this.indices[0]; i