1 export enum AuthDeviceErrorCodes {
2 AUTH_DEVICE_NOT_FOUND = 10_300,
3 AUTH_DEVICE_NOT_ACTIVE = 10_301,
4 AUTH_DEVICE_TOKEN_INVALID = 10_302,
5 AUTH_DEVICE_REJECTED = 10_303,
8 export const addAuthDeviceConfig = (data: { Name: string; ActivationToken?: string }) => ({
10 url: 'auth/v4/devices',
14 export const activateAuthDeviceConfig = ({ DeviceID, ...data }: { DeviceID: string; EncryptedSecret: string }) => ({
16 url: `auth/v4/devices/${DeviceID}`,
20 export const associateAuthDeviceConfig = ({ DeviceID, ...data }: { DeviceID: string; DeviceToken: string }) => ({
22 url: `auth/v4/devices/${DeviceID}/associate`,
26 export const getAuthDevicesConfig = () => ({
28 url: `auth/v4/devices`,
31 export const deleteAuthDeviceConfig = (deviceID: string) => ({
33 url: `auth/v4/devices/${deviceID}`,
36 export const deleteAllOtherAuthDeviceConfig = () => ({
38 url: `auth/v4/devices`,
41 export const rejectAuthDeviceConfig = (deviceID: string) => ({
43 url: `auth/v4/devices/${deviceID}/reject`,
46 export const askAdminConfig = (deviceID: string) => ({
48 url: `auth/v4/devices/${deviceID}/admin`,
51 export const getPendingMemberAuthDevicesConfig = () => ({
53 url: `core/v4/members/devices/pending`,
56 export const activateMemberAuthDeviceConfig = ({
62 EncryptedSecret: string;
63 UserKeys: { ID: string; PrivateKey: string }[];
66 url: `core/v4/members/${MemberID}/devices/reset`,
70 export const rejectMemberAuthDeviceConfig = ({ MemberID, DeviceID }: { MemberID: string; DeviceID: string }) => ({
72 url: `core/v4/members/${MemberID}/devices/${DeviceID}/reject`,