@simplyhomes/sos-client
Version:
Client SDK for SimplyHomes SOS API
40 lines (39 loc) • 1.79 kB
TypeScript
import { SDK_Base } from '../../base';
import { SDK_Context } from 'sdk/client/client';
import { SDK_Execution } from 'sdk/interfaces/sdk-execution';
import { SDK_CreateSource_Body_Contact, SDK_CreateSource_Body_Dto, SDK_CreateSource_Body_Property, SDK_CreateSource_Response_Dto } from './types';
export declare class SDK_Properties_CreateSource extends SDK_Base implements SDK_Execution {
private payload;
constructor(context: SDK_Context, payload?: SDK_CreateSource_Body_Dto);
/**
* Sets the source contacts for the source being created
* @param contacts Array of contact objects related to the source
* @returns Current instance for method chaining
*/
withSourceContacts(contacts: SDK_CreateSource_Body_Contact[]): this;
/**
* Sets the source contact IDs for the source being created
* @param contactIds Array of contact IDs related to the source
* @returns Current instance for method chaining
*/
withSourceContactIds(contactIds: number[]): this;
/**
* Sets the properties associated with the source
* @param properties Array of property objects to include in the source
* @returns Current instance for method chaining
*/
withProperties(properties: SDK_CreateSource_Body_Property[]): this;
/**
* Applies a bulk update to the payload with arbitrary data
* @param data Partial source payload to merge into current state
* @returns Current instance for method chaining
*/
withData(data: Partial<SDK_CreateSource_Body_Dto>): this;
/**
* Executes the create source request to the API
* @returns API response with newly created source data
*/
execute(): Promise<SDK_CreateSource_Response_Dto>;
private clonePayload;
private resetPayload;
}