{"version":3,"file":"extensions.cjs","names":[],"sources":["../../../../src/rest/commands/create/extensions.ts"],"sourcesContent":["import type { RestCommand } from '../../types.js';\nimport { throwIfEmpty } from '../../utils/index.js';\n\n/**\n * Install an extension from the registry.\n * @param extensionId - Registry extension ID\n * @param version - Version ID to install\n * @returns Nothing\n * @throws Will throw if extensionId or version is empty\n */\nexport const installRegistryExtension =\n\t<Schema>(extensionId: string, version: string): RestCommand<void, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(extensionId, 'Extension id cannot be empty');\n\t\tthrowIfEmpty(version, 'Version cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/extensions/registry/install`,\n\t\t\tbody: JSON.stringify({ extension: extensionId, version }),\n\t\t\tmethod: 'POST',\n\t\t};\n\t};\n"],"mappings":"kDAUa,GACH,EAAqB,SAE7B,EAAA,aAAa,EAAa,+BAA+B,CACzD,EAAA,aAAa,EAAS,0BAA0B,CAEzC,CACN,KAAM,+BACN,KAAM,KAAK,UAAU,CAAE,UAAW,EAAa,UAAS,CAAC,CACzD,OAAQ,OACR"}