UNPKG

@fairmint/canton-node-sdk

Version:
30 lines 993 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GetUser = exports.GetUserParamsSchema = void 0; const zod_1 = require("zod"); const core_1 = require("../../../../../core"); exports.GetUserParamsSchema = zod_1.z.object({ userId: zod_1.z.string(), }); /** * Get details for a specific user * * @example * ```typescript * const user = await client.getUser({ userId: 'alice' }); * * ```; */ exports.GetUser = (0, core_1.createApiOperation)({ paramsSchema: exports.GetUserParamsSchema, method: 'GET', buildUrl: (params, apiUrl) => { const baseUrl = `${apiUrl}/v2/users/${params.userId}`; const queryParams = new URLSearchParams(); // Always pass empty string for identity-provider-id queryParams.append('identity-provider-id', ''); const queryString = queryParams.toString(); return queryString ? `${baseUrl}?${queryString}` : baseUrl; }, }); //# sourceMappingURL=get-user.js.map