@allthings/sdk
Version:
Allthings Node/Javascript SDK
35 lines (34 loc) • 1.74 kB
TypeScript
import { EnumCountryCode, EnumServiceProviderType, IAllthingsRestClient } from '../types';
export interface IServiceProvider {
readonly address: Partial<{
readonly city: string | null;
readonly country: EnumCountryCode | null;
readonly houseNumber: string | null;
readonly latitude: number | null;
readonly longitude: number | null;
readonly postalCode: string | null;
readonly street: string | null;
readonly type: string | null;
}>;
readonly email: string;
readonly externalId: string;
readonly id: string;
readonly name: string;
readonly parent: string;
readonly phoneNumber: string | null;
readonly readOnly?: boolean;
readonly type: EnumServiceProviderType;
readonly website: string | null;
}
export type PartialServiceProvider = Partial<IServiceProvider>;
export type ServiceProviderResult = Promise<IServiceProvider>;
export type MethodServiceProviderCreate = (data: PartialServiceProvider & {
readonly name: string;
}) => ServiceProviderResult;
export declare function serviceProviderCreate(client: IAllthingsRestClient, data: PartialServiceProvider & {
readonly name: string;
}): ServiceProviderResult;
export type MethodServiceProviderGetById = (propertyId: string) => ServiceProviderResult;
export declare function serviceProviderGetById(client: IAllthingsRestClient, serviceProviderId: string): ServiceProviderResult;
export type MethodServiceProviderUpdateById = (serviceProviderId: string, data: PartialServiceProvider) => ServiceProviderResult;
export declare function serviceProviderUpdateById(client: IAllthingsRestClient, serviceProviderId: string, data: PartialServiceProvider): ServiceProviderResult;