@paritydeals/node-sdk
Version:
Node.js SDK for interacting with the ParityDeals API.
66 lines • 2.74 kB
TypeScript
import type { ParityDeals } from './client';
import { CustomerResponse, PaginatedCustomerResponse, ArchiveSuccessResponse } from './models';
export declare class CustomersOperations {
private client;
constructor(client: ParityDeals);
/**
* Retrieves a paginated list of customers.
* @param params - Optional parameters for pagination.
* - page?: number - Page number to retrieve.
* - pageSize?: number - Number of items per page.
* @returns A Promise resolving to PaginatedCustomerResponse.
*/
list(params?: {
page?: number;
pageSize?: number;
}): Promise<PaginatedCustomerResponse>;
/**
* Creates a new customer record.
* @param params - Parameters for creating a customer.
* - customerId: string - Client-defined unique identifier for the customer.
* - email: string - Email address of the customer.
* - name?: string | null - Optional name of the customer.
* - metadata?: Record<string, any> | null - Optional metadata for the customer.
* @returns A Promise resolving to CustomerResponse.
*/
create(params: {
customerId: string;
email?: string | null;
name?: string | null;
metadata?: Record<string, any> | null;
}): Promise<CustomerResponse>;
/**
* Retrieves a specific customer by their client-defined customerId.
* @param params - Parameters for retrieving a customer.
* - customerId: string - The unique identifier of the customer.
* @returns A Promise resolving to CustomerResponse.
*/
retrieve(params: {
customerId: string;
}): Promise<CustomerResponse>;
/**
* Updates an existing customer record (partial update).
* @param params - Parameters for updating a customer.
* - customerId: string - The unique identifier of the customer to update.
* - name?: string | null - Optional new name for the customer.
* - email?: string | null - Optional new email for the customer.
* - metadata?: Record<string, any> | null - Optional new metadata for the customer.
* @returns A Promise resolving to CustomerResponse.
*/
update(params: {
customerId: string;
name?: string | null;
email?: string | null;
metadata?: Record<string, any> | null;
}): Promise<CustomerResponse>;
/**
* Archives (soft deletes) a customer.
* @param params - Parameters for archiving a customer.
* - customerId: string - The unique identifier of the customer to archive.
* @returns A Promise resolving to ArchiveSuccessResponse.
*/
archive(params: {
customerId: string;
}): Promise<ArchiveSuccessResponse>;
}
//# sourceMappingURL=customers.d.ts.map