@allthings/sdk
Version:
Allthings Node/Javascript SDK
35 lines (34 loc) • 2.11 kB
TypeScript
import { IAllthingsRestClient } from '../types';
export interface IRegistrationCodeTenant {
readonly email?: string;
readonly name?: string;
readonly phone?: string;
}
export interface IRegistrationCodeOptions {
readonly dataSource?: string;
readonly externalId?: string;
readonly instantTenantInviteActive?: boolean;
readonly permanent?: boolean;
readonly readOnly?: boolean;
readonly tenant?: IRegistrationCodeTenant;
}
export interface IRegistrationCode extends Required<IRegistrationCodeOptions> {
readonly code: string;
readonly createdAt: string;
readonly email: string;
readonly externalId: string;
readonly id: string;
readonly invitationSent: boolean;
readonly utilisationPeriods: readonly string[];
}
export type PartialRegistrationCode = Partial<IRegistrationCode>;
export type RegistrationCodeResult = Promise<IRegistrationCode>;
export declare const remapRegistationCodeResult: (registrationCode: any) => any;
export type MethodRegistrationCodeCreate = (code: string, utilisationPeriods: string | readonly string[], options?: IRegistrationCodeOptions) => RegistrationCodeResult;
export declare function registrationCodeCreate(client: IAllthingsRestClient, code: string, utilisationPeriods: string | readonly string[], options?: IRegistrationCodeOptions): RegistrationCodeResult;
export type MethodRegistrationCodeUpdateById = (registrationCodeId: string, data: PartialRegistrationCode) => RegistrationCodeResult;
export declare function registrationCodeUpdateById(client: IAllthingsRestClient, registrationCodeId: string, data: PartialRegistrationCode): RegistrationCodeResult;
export type MethodRegistrationCodeGetById = (registrationCodeId: string) => RegistrationCodeResult;
export declare function registrationCodeGetById(client: IAllthingsRestClient, registrationCodeId: string): RegistrationCodeResult;
export type MethodRegistrationCodeDelete = (registrationCodeId: string) => RegistrationCodeResult;
export declare function registrationCodeDelete(client: IAllthingsRestClient, registrationCodeId: string): Promise<boolean>;