@vulog/aima-user
Version:
User management module for the AIMA platform. This module provides comprehensive functionality to manage users, profiles, billing groups, and user-related operations.
21 lines (17 loc) • 598 B
text/typescript
import { Client } from '@vulog/aima-client';
import { z } from 'zod';
const schema = z.object({
userId: z.string().uuid(),
cityId: z.string().uuid(),
});
export const acceptTAndC = async (client: Client, userId: string, cityId: string): Promise<void> => {
const result = schema.safeParse({ userId, cityId });
if (!result.success) {
throw new TypeError('Invalid args', {
cause: result.error.issues,
});
}
await client.post(
`boapi/proxy/user/fleets/${client.clientOptions.fleetId}/cities/${cityId}/users/${userId}/agreements`
);
};