{"version":3,"file":"verify-cms-license.mjs","names":[],"sources":["../../../../src/libs/lucid-remote/services/verify-cms-license.ts"],"sourcesContent":["import type { ServiceFn } from \"../../../utils/services/types.js\";\nimport { getLucidRemoteClient } from \"../client.js\";\nimport { lucidRemotePaths } from \"../constants.js\";\nimport type { LucidRemoteRequestData } from \"../types.js\";\n\ntype VerifyCmsLicenseProps = {\n\tlicenseKey: string;\n};\n\nexport type VerifyCmsLicenseData = {\n\tvalid: boolean;\n\tmessage?: string;\n\tai: {\n\t\tenabled: boolean;\n\t};\n};\n\n/**\n * Verifies a CMS license key against Lucid's remote licensing API.\n */\nconst verifyCmsLicense: ServiceFn<\n\t[VerifyCmsLicenseProps],\n\tLucidRemoteRequestData<VerifyCmsLicenseData>\n> = async (context, props) => {\n\tconst client = getLucidRemoteClient(context);\n\n\treturn client.request<VerifyCmsLicenseData>(\n\t\tlucidRemotePaths.verifyCmsLicense,\n\t\t{\n\t\t\tretries: 1,\n\t\t\tmethod: \"POST\",\n\t\t\tbody: {\n\t\t\t\tlicenseKey: props.licenseKey,\n\t\t\t},\n\t\t},\n\t);\n};\n\nexport default verifyCmsLicense;\n"],"mappings":"yGAoBA,MAAM,EAGF,MAAO,EAAS,IACJ,EAAqB,CAExB,CAAC,CAAC,QACb,EAAiB,iBACjB,CACC,QAAS,EACT,OAAQ,OACR,KAAM,CACL,WAAY,EAAM,UACnB,CACD,CACD"}