@lepistabioinformatics/mycelium-sdk 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/errors.ts","../src/settings.ts","../src/models/permission.ts","../src/models/verboseStatus.ts","../src/models/accountMetaKey.ts","../src/models/owner.ts","../src/models/licensedResource.ts","../src/models/licensedResources.ts","../src/models/tenantOwnership.ts","../src/models/tenantsOwnership.ts","../src/models/profile.ts","../src/functions/decodeAndDecompressProfileFromBase64.ts"],"sourcesContent":["export * from \"./errors.js\"\nexport * from \"./settings.js\"\n\nexport * from \"./models/permission.js\"\nexport * from \"./models/verboseStatus.js\"\nexport * from \"./models/accountMetaKey.js\"\nexport * from \"./models/owner.js\"\nexport * from \"./models/licensedResource.js\"\nexport * from \"./models/licensedResources.js\"\nexport * from \"./models/tenantOwnership.js\"\nexport * from \"./models/tenantsOwnership.js\"\nexport * from \"./models/relatedAccounts.js\"\nexport * from \"./models/profile.js\"\n\nexport * from \"./functions/decodeAndDecompressProfileFromBase64.js\"\n","export class MyceliumError extends Error {\n code?: string\n expTrue: boolean\n\n constructor(message: string, code?: string, expTrue = false) {\n super(message)\n this.name = \"MyceliumError\"\n this.code = code\n this.expTrue = expTrue\n }\n}\n\nexport class InsufficientPrivilegesError extends MyceliumError {\n filteringState: string[]\n\n constructor(message: string, filteringState: string[] = []) {\n super(message, \"MYC00019\", true)\n this.name = \"InsufficientPrivilegesError\"\n this.filteringState = filteringState\n }\n}\n\nexport class InsufficientLicensesError extends MyceliumError {\n constructor(\n message: string = \"Insufficient licenses to perform these action\"\n ) {\n super(message, \"MYC00019\", true)\n this.name = \"InsufficientLicensesError\"\n }\n}\n\nexport class ProfileDecodingError extends MyceliumError {\n constructor(message: string) {\n super(message, \"MYC00020\", false)\n this.name = \"ProfileDecodingError\"\n }\n}\n","export const DEFAULT_PROFILE_KEY = \"x-mycelium-profile\"\nexport const DEFAULT_EMAIL_KEY = \"x-mycelium-email\"\nexport const DEFAULT_SCOPE_KEY = \"x-mycelium-scope\"\nexport const DEFAULT_MYCELIUM_ROLE_KEY = \"x-mycelium-role\"\nexport const DEFAULT_REQUEST_ID_KEY = \"x-mycelium-request-id\"\nexport const DEFAULT_CONNECTION_STRING_KEY = \"x-mycelium-connection-string\"\nexport const DEFAULT_TENANT_ID_KEY = \"x-mycelium-tenant-id\"\n","import { z } from \"zod\"\n\nexport const Permission = {\n READ: 0,\n WRITE: 1,\n} as const\n\nexport type Permission = (typeof Permission)[keyof typeof Permission]\n\nexport const PermissionSchema: z.ZodType<Permission> = z.union([\n z.literal(0),\n z.literal(1),\n])\n\nexport function permissionToInt(permission: Permission): number {\n return permission\n}\n\nexport function permissionFromInt(value: number): Permission {\n if (value === Permission.READ || value === Permission.WRITE) {\n return value\n }\n throw new Error(`Invalid permission code: ${value}`)\n}\n","import { z } from \"zod\"\n\nexport const VerboseStatusSchema = z.enum([\n \"unverified\",\n \"verified\",\n \"inactive\",\n \"archived\",\n \"deleted\",\n \"unknown\",\n])\n\nexport type VerboseStatus = z.infer<typeof VerboseStatusSchema>\n","import { z } from \"zod\"\n\nconst KNOWN_KEYS = [\n \"phone_number\",\n \"telegram_user\",\n \"whatsapp_user\",\n \"locale\",\n] as const\n\nexport type AccountMetaKey = (typeof KNOWN_KEYS)[number] | `custom:${string}`\n\nexport const AccountMetaKeySchema = z\n .string()\n .refine(\n (value): value is AccountMetaKey =>\n (KNOWN_KEYS as readonly string[]).includes(value) ||\n value.startsWith(\"custom:\"),\n {\n message:\n \"must be one of phone_number, telegram_user, whatsapp_user, locale, or a custom:<key> string\",\n }\n )\n\nexport const ProfileMetaSchema = z.record(AccountMetaKeySchema, z.string())\n\nexport type ProfileMeta = z.infer<typeof ProfileMetaSchema>\n","import { z } from \"zod\"\n\nexport const OwnerSchema = z.object({\n id: z.string().uuid(),\n email: z.string(),\n firstName: z.string().optional(),\n lastName: z.string().optional(),\n username: z.string().optional(),\n isPrincipal: z.boolean(),\n})\n\nexport type Owner = z.infer<typeof OwnerSchema>\n","import { z } from \"zod\"\nimport { PermissionSchema, permissionFromInt } from \"./permission.js\"\n\nexport const LicensedResourceSchema = z.object({\n accId: z.string().uuid(),\n sysAcc: z.boolean(),\n tenantId: z.string().uuid(),\n accName: z.string(),\n role: z.string(),\n roleId: z.string().uuid(),\n perm: PermissionSchema,\n verified: z.boolean(),\n permitFlags: z.array(z.string()).optional(),\n denyFlags: z.array(z.string()).optional(),\n})\n\nexport type LicensedResource = z.infer<typeof LicensedResourceSchema>\n\nexport function licensedResourceFromUrlString(value: string): LicensedResource {\n let url: URL\n try {\n url = new URL(value, \"http://placeholder.local\")\n } catch {\n throw new Error(`Invalid licensed resource URL string: ${value}`)\n }\n\n const segments = url.pathname.split(\"/\").filter(Boolean)\n if (\n segments.length !== 6 ||\n segments[0] !== \"t\" ||\n segments[2] !== \"a\" ||\n segments[4] !== \"r\"\n ) {\n throw new Error(`Invalid path format in licensed resource URL: ${value}`)\n }\n\n const tenantId = segments[1] as string\n const accId = segments[3] as string\n const roleId = segments[5] as string\n\n const pParam = url.searchParams.get(\"p\")\n if (pParam === null) {\n throw new Error(`Parameter 'p' not found in: ${value}`)\n }\n const sepIndex = pParam.lastIndexOf(\":\")\n if (sepIndex === -1) {\n throw new Error(`Invalid 'p' parameter format in: ${value}`)\n }\n const role = pParam.slice(0, sepIndex)\n const perm = permissionFromInt(Number.parseInt(pParam.slice(sepIndex + 1), 10))\n\n const sParam = url.searchParams.get(\"s\")\n const vParam = url.searchParams.get(\"v\")\n const nParam = url.searchParams.get(\"n\")\n if (sParam === null || vParam === null || nParam === null) {\n throw new Error(`Missing 's'/'v'/'n' parameter in: ${value}`)\n }\n if (sParam !== \"0\" && sParam !== \"1\") {\n throw new Error(`Invalid 's' parameter value in: ${value}`)\n }\n if (vParam !== \"0\" && vParam !== \"1\") {\n throw new Error(`Invalid 'v' parameter value in: ${value}`)\n }\n\n const accName = Buffer.from(nParam, \"base64\").toString(\"utf-8\")\n\n const pfParam = url.searchParams.get(\"pf\")\n const dfParam = url.searchParams.get(\"df\")\n\n return LicensedResourceSchema.parse({\n accId,\n sysAcc: sParam === \"1\",\n tenantId,\n accName,\n role,\n roleId,\n perm,\n verified: vParam === \"1\",\n permitFlags: pfParam ? pfParam.split(\",\") : undefined,\n denyFlags: dfParam ? dfParam.split(\",\") : undefined,\n })\n}\n","import { z } from \"zod\"\nimport {\n LicensedResourceSchema,\n licensedResourceFromUrlString,\n type LicensedResource,\n} from \"./licensedResource.js\"\n\nfunction tagRecordsOrUrls(raw: unknown) {\n if (raw && typeof raw === \"object\") {\n const obj = raw as Record<string, unknown>\n const hasRecords = \"records\" in obj\n const hasUrls = \"urls\" in obj\n if (hasRecords && !hasUrls) {\n return { kind: \"records\", records: obj.records }\n }\n if (hasUrls && !hasRecords) {\n return { kind: \"urls\", urls: obj.urls }\n }\n }\n return raw\n}\n\nexport const LicensedResourcesSchema = z.preprocess(\n tagRecordsOrUrls,\n z.discriminatedUnion(\"kind\", [\n z.object({\n kind: z.literal(\"records\"),\n records: z.array(LicensedResourceSchema),\n }),\n z.object({\n kind: z.literal(\"urls\"),\n urls: z.array(z.string()),\n }),\n ])\n)\n\nexport type LicensedResources = z.infer<typeof LicensedResourcesSchema>\n\nexport function toLicensesVector(\n lr: LicensedResources | undefined\n): LicensedResource[] {\n if (!lr) return []\n if (lr.kind === \"records\") return lr.records\n return lr.urls.map(licensedResourceFromUrlString)\n}\n","import { z } from \"zod\"\n\nexport const TenantOwnershipSchema = z.object({\n id: z.string().uuid(),\n name: z.string(),\n since: z.coerce.date(),\n})\n\nexport type TenantOwnership = z.infer<typeof TenantOwnershipSchema>\n\nfunction reinsertUuidHyphens(noHyphens: string): string {\n if (!/^[0-9a-fA-F]{32}$/.test(noHyphens)) {\n throw new Error(`Invalid unhyphenated UUID: ${noHyphens}`)\n }\n return [\n noHyphens.slice(0, 8),\n noHyphens.slice(8, 12),\n noHyphens.slice(12, 16),\n noHyphens.slice(16, 20),\n noHyphens.slice(20, 32),\n ].join(\"-\")\n}\n\nexport function tenantOwnershipFromUrlString(value: string): TenantOwnership {\n let url: URL\n try {\n url = new URL(value, \"http://placeholder.local\")\n } catch {\n throw new Error(`Invalid tenant ownership URL string: ${value}`)\n }\n\n const segments = url.pathname.split(\"/\").filter(Boolean)\n if (segments.length !== 2 || segments[0] !== \"tid\") {\n throw new Error(`Invalid path format in tenant ownership URL: ${value}`)\n }\n\n const id = reinsertUuidHyphens(segments[1] as string)\n\n const since = url.searchParams.get(\"since\")\n const nameEncoded = url.searchParams.get(\"name\")\n if (since === null || nameEncoded === null) {\n throw new Error(`Missing 'since'/'name' parameter in: ${value}`)\n }\n\n const name = Buffer.from(nameEncoded, \"base64\").toString(\"utf-8\")\n\n return TenantOwnershipSchema.parse({ id, name, since })\n}\n","import { z } from \"zod\"\nimport {\n TenantOwnershipSchema,\n tenantOwnershipFromUrlString,\n type TenantOwnership,\n} from \"./tenantOwnership.js\"\n\nfunction tagRecordsOrUrls(raw: unknown) {\n if (raw && typeof raw === \"object\") {\n const obj = raw as Record<string, unknown>\n const hasRecords = \"records\" in obj\n const hasUrls = \"urls\" in obj\n if (hasRecords && !hasUrls) {\n return { kind: \"records\", records: obj.records }\n }\n if (hasUrls && !hasRecords) {\n return { kind: \"urls\", urls: obj.urls }\n }\n }\n return raw\n}\n\nexport const TenantsOwnershipSchema = z.preprocess(\n tagRecordsOrUrls,\n z.discriminatedUnion(\"kind\", [\n z.object({\n kind: z.literal(\"records\"),\n records: z.array(TenantOwnershipSchema),\n }),\n z.object({\n kind: z.literal(\"urls\"),\n urls: z.array(z.string()),\n }),\n ])\n)\n\nexport type TenantsOwnership = z.infer<typeof TenantsOwnershipSchema>\n\nexport function toOwnershipVector(\n to: TenantsOwnership | undefined\n): TenantOwnership[] {\n if (!to) return []\n if (to.kind === \"records\") return to.records\n return to.urls.map(tenantOwnershipFromUrlString)\n}\n","import { z } from \"zod\"\nimport {\n InsufficientLicensesError,\n InsufficientPrivilegesError,\n} from \"../errors.js\"\nimport { ProfileMetaSchema } from \"./accountMetaKey.js\"\nimport type { LicensedResource } from \"./licensedResource.js\"\nimport {\n LicensedResourcesSchema,\n toLicensesVector,\n type LicensedResources,\n} from \"./licensedResources.js\"\nimport { OwnerSchema } from \"./owner.js\"\nimport { Permission, permissionToInt } from \"./permission.js\"\nimport type { RelatedAccounts } from \"./relatedAccounts.js\"\nimport {\n TenantsOwnershipSchema,\n toOwnershipVector,\n} from \"./tenantsOwnership.js\"\nimport { VerboseStatusSchema } from \"./verboseStatus.js\"\n\nexport const ProfileSchema = z.object({\n owners: z.array(OwnerSchema).default([]),\n accId: z.string().uuid(),\n isSubscription: z.boolean(),\n isStaff: z.boolean(),\n isManager: z.boolean().default(false),\n ownerIsActive: z.boolean(),\n accountIsActive: z.boolean(),\n accountWasApproved: z.boolean(),\n accountWasArchived: z.boolean(),\n accountWasDeleted: z.boolean(),\n verboseStatus: VerboseStatusSchema.optional(),\n licensedResources: LicensedResourcesSchema.optional(),\n tenantsOwnership: TenantsOwnershipSchema.optional(),\n meta: ProfileMetaSchema.optional(),\n filteringState: z.array(z.string()).optional(),\n})\n\nexport type ProfileData = z.infer<typeof ProfileSchema>\n\nfunction appendState(\n current: string[] | undefined,\n entry: string\n): string[] {\n const state = current ?? []\n return [...state, `${state.length + 1}:${entry}`]\n}\n\nexport class Profile {\n readonly data: ProfileData\n\n private constructor(data: ProfileData) {\n this.data = data\n }\n\n static fromValidated(data: ProfileData): Profile {\n return new Profile(data)\n }\n\n get accId(): string {\n return this.data.accId\n }\n\n get owners() {\n return this.data.owners\n }\n\n get isStaff(): boolean {\n return this.data.isStaff\n }\n\n get isManager(): boolean {\n return this.data.isManager\n }\n\n get licensedResources(): LicensedResources | undefined {\n return this.data.licensedResources\n }\n\n get tenantsOwnership() {\n return this.data.tenantsOwnership\n }\n\n get filteringState(): string[] | undefined {\n return this.data.filteringState\n }\n\n private withData(partial: Partial<ProfileData>): Profile {\n return new Profile({ ...this.data, ...partial })\n }\n\n private filterLicensedResources(\n predicate: (r: LicensedResource) => boolean\n ): LicensedResources | undefined {\n const records = toLicensesVector(this.data.licensedResources).filter(\n predicate\n )\n return records.length === 0\n ? undefined\n : { kind: \"records\", records }\n }\n\n private withPermission(permission: Permission): Profile {\n if (!this.data.licensedResources) return this\n const licensedResources = this.filterLicensedResources(\n (r) => permissionToInt(r.perm) >= permissionToInt(permission)\n )\n return this.withData({\n licensedResources,\n filteringState: appendState(\n this.data.filteringState,\n `permission:${permissionToInt(permission)}`\n ),\n })\n }\n\n withReadAccess(): Profile {\n return this.withPermission(Permission.READ)\n }\n\n withWriteAccess(): Profile {\n return this.withPermission(Permission.WRITE)\n }\n\n onTenant(tenantId: string): Profile {\n const licensedResources = this.filterLicensedResources(\n (r) => r.tenantId === tenantId\n )\n return this.withData({\n licensedResources,\n filteringState: appendState(\n this.data.filteringState,\n `tenantId:${tenantId}`\n ),\n })\n }\n\n withRoles(roles: string[]): Profile {\n const licensedResources = this.filterLicensedResources((r) =>\n roles.includes(r.role)\n )\n return this.withData({\n licensedResources,\n filteringState: appendState(\n this.data.filteringState,\n `role:${roles.join(\",\")}`\n ),\n })\n }\n\n onAccount(accountId: string): Profile {\n const licensedResources = this.filterLicensedResources(\n (r) => r.accId === accountId\n )\n return this.withData({\n licensedResources,\n filteringState: appendState(\n this.data.filteringState,\n `accountId:${accountId}`\n ),\n })\n }\n\n hasPermitFlags(flags: string[]): Profile {\n const licensedResources = this.filterLicensedResources((r) => {\n if (!r.permitFlags) return false\n return flags.every((f) => r.permitFlags?.includes(f))\n })\n return this.withData({\n licensedResources,\n filteringState: appendState(\n this.data.filteringState,\n `permittedFlags:${flags.join(\",\")}`\n ),\n })\n }\n\n hasNotDenyFlags(flags: string[]): Profile {\n const licensedResources = this.filterLicensedResources((r) => {\n if (!r.denyFlags) return true\n return !flags.some((f) => r.denyFlags?.includes(f))\n })\n return this.withData({\n licensedResources,\n filteringState: appendState(\n this.data.filteringState,\n `deniedFlags:${flags.join(\",\")}`\n ),\n })\n }\n\n onTenantAsManager(tenantId: string, permission: Permission): Profile {\n const profile = this.onTenant(tenantId)\n .withPermission(permission)\n .withRoles([\"tenant-manager\"])\n\n return profile.withData({\n filteringState: appendState(profile.data.filteringState, `isTenantManager:true`),\n })\n }\n\n withSystemAccountsAccess(): Profile {\n const licensedResources = this.filterLicensedResources((r) => r.sysAcc)\n return this.withData({\n licensedResources,\n filteringState: appendState(\n this.data.filteringState,\n `isAccStd:true`\n ),\n })\n }\n\n withTenantOwnershipOrError(tenantId: string): Profile {\n const tenants = toOwnershipVector(this.data.tenantsOwnership)\n if (tenants.some((t) => t.id === tenantId)) {\n return this.withData({\n filteringState: appendState(\n this.data.filteringState,\n `tenantOwnership:${tenantId}`\n ),\n })\n }\n\n throw new InsufficientPrivilegesError(\n `Insufficient privileges to perform these action (no tenant ownership): ${(\n this.data.filteringState ?? []\n ).join(\", \")}`,\n this.data.filteringState\n )\n }\n\n hasAdminPrivileges(): boolean {\n return this.data.isStaff || this.data.isManager\n }\n\n hasAdminPrivilegesOrError(): void {\n if (!this.hasAdminPrivileges()) {\n throw new InsufficientPrivilegesError(\n \"Current account has no administration privileges\",\n this.data.filteringState\n )\n }\n }\n\n getIdsOrError(): string[] {\n const ids = toLicensesVector(this.data.licensedResources).map(\n (r) => r.accId\n )\n\n if (ids.length === 0 && !this.hasAdminPrivileges()) {\n throw new InsufficientPrivilegesError(\n `Insufficient privileges to perform these action (no ids): ${(\n this.data.filteringState ?? []\n ).join(\", \")}`,\n this.data.filteringState\n )\n }\n\n return ids\n }\n\n getTenantWidePermissionOrError(\n tenantId: string,\n permission: Permission\n ): RelatedAccounts {\n if (this.data.isStaff) {\n return { kind: \"HasStaffPrivileges\" }\n }\n if (this.data.isManager) {\n return { kind: \"HasManagerPrivileges\" }\n }\n\n const tenants = toOwnershipVector(this.data.tenantsOwnership)\n if (tenants.some((t) => t.id === tenantId)) {\n return { kind: \"HasTenantWidePrivileges\", tenantId }\n }\n\n try {\n this.onTenantAsManager(tenantId, permission).getIdsOrError()\n return { kind: \"HasTenantWidePrivileges\", tenantId }\n } catch {\n // fall through to error below\n }\n\n throw new InsufficientPrivilegesError(\n `Insufficient privileges to perform these action (no tenant wide permission): ${(\n this.data.filteringState ?? []\n ).join(\", \")}`,\n this.data.filteringState\n )\n }\n\n getRelatedAccountsOrTenantWidePermissionOrError(\n tenantId: string,\n permission: Permission\n ): RelatedAccounts {\n try {\n return this.getTenantWidePermissionOrError(tenantId, permission)\n } catch {\n return this.getRelatedAccountOrError()\n }\n }\n\n getRelatedAccountOrError(): RelatedAccounts {\n if (this.data.isStaff) {\n return { kind: \"HasStaffPrivileges\" }\n }\n if (this.data.isManager) {\n return { kind: \"HasManagerPrivileges\" }\n }\n if (this.data.licensedResources) {\n const records = toLicensesVector(this.data.licensedResources)\n if (records.length === 0) {\n throw new InsufficientLicensesError()\n }\n return {\n kind: \"AllowedAccounts\",\n accounts: records.map((r) => r.accId),\n }\n }\n\n throw new InsufficientPrivilegesError(\n `Insufficient privileges to perform these action (no accounts): ${(\n this.data.filteringState ?? []\n ).join(\", \")}`,\n this.data.filteringState\n )\n }\n\n getOwnersIds(): string[] {\n return this.data.owners.map((o) => o.id)\n }\n\n profileString(): string {\n return `profile/${this.data.accId}`\n }\n\n profileRedacted(): string {\n const redactedEmails = this.data.owners.map((o) => redactEmail(o.email))\n return `profile/${this.data.accId} owners: [${redactedEmails.join(\", \")}]`\n }\n}\n\nfunction redactEmail(email: string): string {\n const [local, domain] = email.split(\"@\")\n if (!domain || !local) return email\n const visible = local.slice(0, 1)\n return `${visible}${\"*\".repeat(Math.max(local.length - 1, 1))}@${domain}`\n}\n","import { zstdCompressSync, zstdDecompressSync } from \"node:zlib\"\nimport { ProfileDecodingError } from \"../errors.js\"\nimport { Profile, ProfileSchema } from \"../models/profile.js\"\n\nexport interface DecodeOptions {\n strict?: boolean\n}\n\nexport function decodeAndDecompressProfileFromBase64(\n input: string | Buffer,\n opts: DecodeOptions = {}\n): Profile {\n const strict = opts.strict ?? true\n\n if (\n (typeof input === \"string\" && input.length === 0) ||\n (Buffer.isBuffer(input) && input.length === 0)\n ) {\n throw new ProfileDecodingError(\"Profile input is empty\")\n }\n\n const inputBytes = Buffer.isBuffer(input)\n ? input\n : Buffer.from(input, \"utf-8\")\n\n const base64Text = inputBytes.toString(\"utf-8\")\n if (!/^[A-Za-z0-9+/]*={0,2}$/.test(base64Text) || base64Text.length % 4 !== 0) {\n throw new ProfileDecodingError(\n `Failed to decode base64 profile: not valid base64`\n )\n }\n\n let decoded: Buffer\n try {\n decoded = Buffer.from(base64Text, \"base64\")\n } catch (cause) {\n throw new ProfileDecodingError(`Failed to decode base64 profile: ${cause}`)\n }\n\n let decompressed: Buffer\n try {\n decompressed = zstdDecompressSync(decoded)\n } catch (cause) {\n if (strict) {\n throw new ProfileDecodingError(\n `Failed to decompress zstd profile: ${cause}`\n )\n }\n decompressed = decoded\n }\n\n let profileString: string\n try {\n profileString = decompressed.toString(\"utf-8\")\n } catch (cause) {\n throw new ProfileDecodingError(\n `Failed to convert decompressed profile to string: ${cause}`\n )\n }\n\n let profileJson: unknown\n try {\n profileJson = JSON.parse(profileString)\n } catch (cause) {\n throw new ProfileDecodingError(`Failed to deserialize profile: ${cause}`)\n }\n\n const result = ProfileSchema.safeParse(profileJson)\n if (!result.success) {\n throw new ProfileDecodingError(\n `Failed to deserialize profile: ${formatZodError(result.error)}`\n )\n }\n\n return Profile.fromValidated(result.data)\n}\n\nexport type SafeDecodeResult =\n | { success: true; profile: Profile }\n | { success: false; error: ProfileDecodingError }\n\nexport function safeDecodeAndDecompressProfileFromBase64(\n input: string | Buffer,\n opts: DecodeOptions = {}\n): SafeDecodeResult {\n try {\n const profile = decodeAndDecompressProfileFromBase64(input, opts)\n return { success: true, profile }\n } catch (error) {\n if (error instanceof ProfileDecodingError) {\n return { success: false, error }\n }\n return {\n success: false,\n error: new ProfileDecodingError(String(error)),\n }\n }\n}\n\nexport function compressAndEncodeProfileToBase64(profile: Profile): string {\n const json = JSON.stringify(profile.data)\n const compressed = zstdCompressSync(Buffer.from(json, \"utf-8\"))\n return compressed.toString(\"base64\")\n}\n\nfunction formatZodError(error: {\n issues: { path: (string | number)[]; message: string }[]\n}): string {\n return error.issues\n .map((issue) => {\n const path = issue.path.length > 0 ? issue.path.join(\".\") : \"(root)\"\n return `field '${path}' ${issue.message}`\n })\n .join(\"; \")\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,gBAAN,cAA4B,MAAM;AAAA,EACvC;AAAA,EACA;AAAA,EAEA,YAAY,SAAiB,MAAe,UAAU,OAAO;AAC3D,UAAM,OAAO;AACb,SAAK,OAAO;AACZ,SAAK,OAAO;AACZ,SAAK,UAAU;AAAA,EACjB;AACF;AAEO,IAAM,8BAAN,cAA0C,cAAc;AAAA,EAC7D;AAAA,EAEA,YAAY,SAAiB,iBAA2B,CAAC,GAAG;AAC1D,UAAM,SAAS,YAAY,IAAI;AAC/B,SAAK,OAAO;AACZ,SAAK,iBAAiB;AAAA,EACxB;AACF;AAEO,IAAM,4BAAN,cAAwC,cAAc;AAAA,EAC3D,YACE,UAAkB,iDAClB;AACA,UAAM,SAAS,YAAY,IAAI;AAC/B,SAAK,OAAO;AAAA,EACd;AACF;AAEO,IAAM,uBAAN,cAAmC,cAAc;AAAA,EACtD,YAAY,SAAiB;AAC3B,UAAM,SAAS,YAAY,KAAK;AAChC,SAAK,OAAO;AAAA,EACd;AACF;;;ACpCO,IAAM,sBAAsB;AAC5B,IAAM,oBAAoB;AAC1B,IAAM,oBAAoB;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EACF;AACF;AAEO,SAAS,iCAAiC,SAA0B;AACzE,QAAM,OAAO,KAAK,UAAU,QAAQ,IAAI;AACxC,QAAM,iBAAa,mCAAiB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC9D,SAAO,WAAW,SAAS,QAAQ;AACrC;AAEA,SAAS,eAAe,OAEb;AACT,SAAO,MAAM,OACV,IAAI,CAAC,UAAU;AACd,UAAM,OAAO,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,KAAK,GAAG,IAAI;AAC5D,WAAO,UAAU,IAAI,KAAK,MAAM,OAAO;AAAA,EACzC,CAAC,EACA,KAAK,IAAI;AACd;","names":["import_zod","import_zod","import_zod","import_zod","import_zod","import_zod","import_zod","tagRecordsOrUrls","import_zod"]}
@@ -0,0 +1,138 @@
1
+ import { P as Profile } from './profile-CUKBifyR.cjs';
2
+ export { A as AccountMetaKey, a as AccountMetaKeySchema, L as LicensedResource, b as LicensedResourceSchema, c as LicensedResources, d as LicensedResourcesSchema, e as Permission, f as PermissionSchema, g as ProfileData, h as ProfileMeta, i as ProfileMetaSchema, j as ProfileSchema, R as RelatedAccounts, l as licensedResourceFromUrlString, p as permissionFromInt, k as permissionToInt, t as toLicensesVector } from './profile-CUKBifyR.cjs';
3
+ import { z } from 'zod';
4
+
5
+ declare class MyceliumError extends Error {
6
+ code?: string;
7
+ expTrue: boolean;
8
+ constructor(message: string, code?: string, expTrue?: boolean);
9
+ }
10
+ declare class InsufficientPrivilegesError extends MyceliumError {
11
+ filteringState: string[];
12
+ constructor(message: string, filteringState?: string[]);
13
+ }
14
+ declare class InsufficientLicensesError extends MyceliumError {
15
+ constructor(message?: string);
16
+ }
17
+ declare class ProfileDecodingError extends MyceliumError {
18
+ constructor(message: string);
19
+ }
20
+
21
+ declare const DEFAULT_PROFILE_KEY = "x-mycelium-profile";
22
+ declare const DEFAULT_EMAIL_KEY = "x-mycelium-email";
23
+ declare const DEFAULT_SCOPE_KEY = "x-mycelium-scope";
24
+ declare const DEFAULT_MYCELIUM_ROLE_KEY = "x-mycelium-role";
25
+ declare const DEFAULT_REQUEST_ID_KEY = "x-mycelium-request-id";
26
+ declare const DEFAULT_CONNECTION_STRING_KEY = "x-mycelium-connection-string";
27
+ declare const DEFAULT_TENANT_ID_KEY = "x-mycelium-tenant-id";
28
+
29
+ declare const VerboseStatusSchema: z.ZodEnum<["unverified", "verified", "inactive", "archived", "deleted", "unknown"]>;
30
+ type VerboseStatus = z.infer<typeof VerboseStatusSchema>;
31
+
32
+ declare const OwnerSchema: z.ZodObject<{
33
+ id: z.ZodString;
34
+ email: z.ZodString;
35
+ firstName: z.ZodOptional<z.ZodString>;
36
+ lastName: z.ZodOptional<z.ZodString>;
37
+ username: z.ZodOptional<z.ZodString>;
38
+ isPrincipal: z.ZodBoolean;
39
+ }, "strip", z.ZodTypeAny, {
40
+ email: string;
41
+ id: string;
42
+ isPrincipal: boolean;
43
+ firstName?: string | undefined;
44
+ lastName?: string | undefined;
45
+ username?: string | undefined;
46
+ }, {
47
+ email: string;
48
+ id: string;
49
+ isPrincipal: boolean;
50
+ firstName?: string | undefined;
51
+ lastName?: string | undefined;
52
+ username?: string | undefined;
53
+ }>;
54
+ type Owner = z.infer<typeof OwnerSchema>;
55
+
56
+ declare const TenantOwnershipSchema: z.ZodObject<{
57
+ id: z.ZodString;
58
+ name: z.ZodString;
59
+ since: z.ZodDate;
60
+ }, "strip", z.ZodTypeAny, {
61
+ id: string;
62
+ name: string;
63
+ since: Date;
64
+ }, {
65
+ id: string;
66
+ name: string;
67
+ since: Date;
68
+ }>;
69
+ type TenantOwnership = z.infer<typeof TenantOwnershipSchema>;
70
+ declare function tenantOwnershipFromUrlString(value: string): TenantOwnership;
71
+
72
+ declare const TenantsOwnershipSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
73
+ kind: z.ZodLiteral<"records">;
74
+ records: z.ZodArray<z.ZodObject<{
75
+ id: z.ZodString;
76
+ name: z.ZodString;
77
+ since: z.ZodDate;
78
+ }, "strip", z.ZodTypeAny, {
79
+ id: string;
80
+ name: string;
81
+ since: Date;
82
+ }, {
83
+ id: string;
84
+ name: string;
85
+ since: Date;
86
+ }>, "many">;
87
+ }, "strip", z.ZodTypeAny, {
88
+ records: {
89
+ id: string;
90
+ name: string;
91
+ since: Date;
92
+ }[];
93
+ kind: "records";
94
+ }, {
95
+ records: {
96
+ id: string;
97
+ name: string;
98
+ since: Date;
99
+ }[];
100
+ kind: "records";
101
+ }>, z.ZodObject<{
102
+ kind: z.ZodLiteral<"urls">;
103
+ urls: z.ZodArray<z.ZodString, "many">;
104
+ }, "strip", z.ZodTypeAny, {
105
+ urls: string[];
106
+ kind: "urls";
107
+ }, {
108
+ urls: string[];
109
+ kind: "urls";
110
+ }>]>, {
111
+ records: {
112
+ id: string;
113
+ name: string;
114
+ since: Date;
115
+ }[];
116
+ kind: "records";
117
+ } | {
118
+ urls: string[];
119
+ kind: "urls";
120
+ }, unknown>;
121
+ type TenantsOwnership = z.infer<typeof TenantsOwnershipSchema>;
122
+ declare function toOwnershipVector(to: TenantsOwnership | undefined): TenantOwnership[];
123
+
124
+ interface DecodeOptions {
125
+ strict?: boolean;
126
+ }
127
+ declare function decodeAndDecompressProfileFromBase64(input: string | Buffer, opts?: DecodeOptions): Profile;
128
+ type SafeDecodeResult = {
129
+ success: true;
130
+ profile: Profile;
131
+ } | {
132
+ success: false;
133
+ error: ProfileDecodingError;
134
+ };
135
+ declare function safeDecodeAndDecompressProfileFromBase64(input: string | Buffer, opts?: DecodeOptions): SafeDecodeResult;
136
+ declare function compressAndEncodeProfileToBase64(profile: Profile): string;
137
+
138
+ export { DEFAULT_CONNECTION_STRING_KEY, DEFAULT_EMAIL_KEY, DEFAULT_MYCELIUM_ROLE_KEY, DEFAULT_PROFILE_KEY, DEFAULT_REQUEST_ID_KEY, DEFAULT_SCOPE_KEY, DEFAULT_TENANT_ID_KEY, type DecodeOptions, InsufficientLicensesError, InsufficientPrivilegesError, MyceliumError, type Owner, OwnerSchema, Profile, ProfileDecodingError, type SafeDecodeResult, type TenantOwnership, TenantOwnershipSchema, type TenantsOwnership, TenantsOwnershipSchema, type VerboseStatus, VerboseStatusSchema, compressAndEncodeProfileToBase64, decodeAndDecompressProfileFromBase64, safeDecodeAndDecompressProfileFromBase64, tenantOwnershipFromUrlString, toOwnershipVector };
@@ -0,0 +1,138 @@
1
+ import { P as Profile } from './profile-CUKBifyR.js';
2
+ export { A as AccountMetaKey, a as AccountMetaKeySchema, L as LicensedResource, b as LicensedResourceSchema, c as LicensedResources, d as LicensedResourcesSchema, e as Permission, f as PermissionSchema, g as ProfileData, h as ProfileMeta, i as ProfileMetaSchema, j as ProfileSchema, R as RelatedAccounts, l as licensedResourceFromUrlString, p as permissionFromInt, k as permissionToInt, t as toLicensesVector } from './profile-CUKBifyR.js';
3
+ import { z } from 'zod';
4
+
5
+ declare class MyceliumError extends Error {
6
+ code?: string;
7
+ expTrue: boolean;
8
+ constructor(message: string, code?: string, expTrue?: boolean);
9
+ }
10
+ declare class InsufficientPrivilegesError extends MyceliumError {
11
+ filteringState: string[];
12
+ constructor(message: string, filteringState?: string[]);
13
+ }
14
+ declare class InsufficientLicensesError extends MyceliumError {
15
+ constructor(message?: string);
16
+ }
17
+ declare class ProfileDecodingError extends MyceliumError {
18
+ constructor(message: string);
19
+ }
20
+
21
+ declare const DEFAULT_PROFILE_KEY = "x-mycelium-profile";
22
+ declare const DEFAULT_EMAIL_KEY = "x-mycelium-email";
23
+ declare const DEFAULT_SCOPE_KEY = "x-mycelium-scope";
24
+ declare const DEFAULT_MYCELIUM_ROLE_KEY = "x-mycelium-role";
25
+ declare const DEFAULT_REQUEST_ID_KEY = "x-mycelium-request-id";
26
+ declare const DEFAULT_CONNECTION_STRING_KEY = "x-mycelium-connection-string";
27
+ declare const DEFAULT_TENANT_ID_KEY = "x-mycelium-tenant-id";
28
+
29
+ declare const VerboseStatusSchema: z.ZodEnum<["unverified", "verified", "inactive", "archived", "deleted", "unknown"]>;
30
+ type VerboseStatus = z.infer<typeof VerboseStatusSchema>;
31
+
32
+ declare const OwnerSchema: z.ZodObject<{
33
+ id: z.ZodString;
34
+ email: z.ZodString;
35
+ firstName: z.ZodOptional<z.ZodString>;
36
+ lastName: z.ZodOptional<z.ZodString>;
37
+ username: z.ZodOptional<z.ZodString>;
38
+ isPrincipal: z.ZodBoolean;
39
+ }, "strip", z.ZodTypeAny, {
40
+ email: string;
41
+ id: string;
42
+ isPrincipal: boolean;
43
+ firstName?: string | undefined;
44
+ lastName?: string | undefined;
45
+ username?: string | undefined;
46
+ }, {
47
+ email: string;
48
+ id: string;
49
+ isPrincipal: boolean;
50
+ firstName?: string | undefined;
51
+ lastName?: string | undefined;
52
+ username?: string | undefined;
53
+ }>;
54
+ type Owner = z.infer<typeof OwnerSchema>;
55
+
56
+ declare const TenantOwnershipSchema: z.ZodObject<{
57
+ id: z.ZodString;
58
+ name: z.ZodString;
59
+ since: z.ZodDate;
60
+ }, "strip", z.ZodTypeAny, {
61
+ id: string;
62
+ name: string;
63
+ since: Date;
64
+ }, {
65
+ id: string;
66
+ name: string;
67
+ since: Date;
68
+ }>;
69
+ type TenantOwnership = z.infer<typeof TenantOwnershipSchema>;
70
+ declare function tenantOwnershipFromUrlString(value: string): TenantOwnership;
71
+
72
+ declare const TenantsOwnershipSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
73
+ kind: z.ZodLiteral<"records">;
74
+ records: z.ZodArray<z.ZodObject<{
75
+ id: z.ZodString;
76
+ name: z.ZodString;
77
+ since: z.ZodDate;
78
+ }, "strip", z.ZodTypeAny, {
79
+ id: string;
80
+ name: string;
81
+ since: Date;
82
+ }, {
83
+ id: string;
84
+ name: string;
85
+ since: Date;
86
+ }>, "many">;
87
+ }, "strip", z.ZodTypeAny, {
88
+ records: {
89
+ id: string;
90
+ name: string;
91
+ since: Date;
92
+ }[];
93
+ kind: "records";
94
+ }, {
95
+ records: {
96
+ id: string;
97
+ name: string;
98
+ since: Date;
99
+ }[];
100
+ kind: "records";
101
+ }>, z.ZodObject<{
102
+ kind: z.ZodLiteral<"urls">;
103
+ urls: z.ZodArray<z.ZodString, "many">;
104
+ }, "strip", z.ZodTypeAny, {
105
+ urls: string[];
106
+ kind: "urls";
107
+ }, {
108
+ urls: string[];
109
+ kind: "urls";
110
+ }>]>, {
111
+ records: {
112
+ id: string;
113
+ name: string;
114
+ since: Date;
115
+ }[];
116
+ kind: "records";
117
+ } | {
118
+ urls: string[];
119
+ kind: "urls";
120
+ }, unknown>;
121
+ type TenantsOwnership = z.infer<typeof TenantsOwnershipSchema>;
122
+ declare function toOwnershipVector(to: TenantsOwnership | undefined): TenantOwnership[];
123
+
124
+ interface DecodeOptions {
125
+ strict?: boolean;
126
+ }
127
+ declare function decodeAndDecompressProfileFromBase64(input: string | Buffer, opts?: DecodeOptions): Profile;
128
+ type SafeDecodeResult = {
129
+ success: true;
130
+ profile: Profile;
131
+ } | {
132
+ success: false;
133
+ error: ProfileDecodingError;
134
+ };
135
+ declare function safeDecodeAndDecompressProfileFromBase64(input: string | Buffer, opts?: DecodeOptions): SafeDecodeResult;
136
+ declare function compressAndEncodeProfileToBase64(profile: Profile): string;
137
+
138
+ export { DEFAULT_CONNECTION_STRING_KEY, DEFAULT_EMAIL_KEY, DEFAULT_MYCELIUM_ROLE_KEY, DEFAULT_PROFILE_KEY, DEFAULT_REQUEST_ID_KEY, DEFAULT_SCOPE_KEY, DEFAULT_TENANT_ID_KEY, type DecodeOptions, InsufficientLicensesError, InsufficientPrivilegesError, MyceliumError, type Owner, OwnerSchema, Profile, ProfileDecodingError, type SafeDecodeResult, type TenantOwnership, TenantOwnershipSchema, type TenantsOwnership, TenantsOwnershipSchema, type VerboseStatus, VerboseStatusSchema, compressAndEncodeProfileToBase64, decodeAndDecompressProfileFromBase64, safeDecodeAndDecompressProfileFromBase64, tenantOwnershipFromUrlString, toOwnershipVector };
package/dist/index.js ADDED
@@ -0,0 +1,69 @@
1
+ import {
2
+ AccountMetaKeySchema,
3
+ DEFAULT_CONNECTION_STRING_KEY,
4
+ DEFAULT_EMAIL_KEY,
5
+ DEFAULT_MYCELIUM_ROLE_KEY,
6
+ DEFAULT_PROFILE_KEY,
7
+ DEFAULT_REQUEST_ID_KEY,
8
+ DEFAULT_SCOPE_KEY,
9
+ DEFAULT_TENANT_ID_KEY,
10
+ InsufficientLicensesError,
11
+ InsufficientPrivilegesError,
12
+ LicensedResourceSchema,
13
+ LicensedResourcesSchema,
14
+ MyceliumError,
15
+ OwnerSchema,
16
+ Permission,
17
+ PermissionSchema,
18
+ Profile,
19
+ ProfileDecodingError,
20
+ ProfileMetaSchema,
21
+ ProfileSchema,
22
+ TenantOwnershipSchema,
23
+ TenantsOwnershipSchema,
24
+ VerboseStatusSchema,
25
+ compressAndEncodeProfileToBase64,
26
+ decodeAndDecompressProfileFromBase64,
27
+ licensedResourceFromUrlString,
28
+ permissionFromInt,
29
+ permissionToInt,
30
+ safeDecodeAndDecompressProfileFromBase64,
31
+ tenantOwnershipFromUrlString,
32
+ toLicensesVector,
33
+ toOwnershipVector
34
+ } from "./chunk-VPKHPMDS.js";
35
+ export {
36
+ AccountMetaKeySchema,
37
+ DEFAULT_CONNECTION_STRING_KEY,
38
+ DEFAULT_EMAIL_KEY,
39
+ DEFAULT_MYCELIUM_ROLE_KEY,
40
+ DEFAULT_PROFILE_KEY,
41
+ DEFAULT_REQUEST_ID_KEY,
42
+ DEFAULT_SCOPE_KEY,
43
+ DEFAULT_TENANT_ID_KEY,
44
+ InsufficientLicensesError,
45
+ InsufficientPrivilegesError,
46
+ LicensedResourceSchema,
47
+ LicensedResourcesSchema,
48
+ MyceliumError,
49
+ OwnerSchema,
50
+ Permission,
51
+ PermissionSchema,
52
+ Profile,
53
+ ProfileDecodingError,
54
+ ProfileMetaSchema,
55
+ ProfileSchema,
56
+ TenantOwnershipSchema,
57
+ TenantsOwnershipSchema,
58
+ VerboseStatusSchema,
59
+ compressAndEncodeProfileToBase64,
60
+ decodeAndDecompressProfileFromBase64,
61
+ licensedResourceFromUrlString,
62
+ permissionFromInt,
63
+ permissionToInt,
64
+ safeDecodeAndDecompressProfileFromBase64,
65
+ tenantOwnershipFromUrlString,
66
+ toLicensesVector,
67
+ toOwnershipVector
68
+ };
69
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}