UNPKG

@simpleapps-com/augur-api

Version:

TypeScript client library for Augur microservices API endpoints

145 lines 4.73 kB
import type { CustomersClient } from '../client'; import type { ContactsIdCustomersParams } from '../schemas'; type ExecuteRequest = CustomersClient['executeRequest']; /** * Creates the contacts resource methods * OpenAPI Path: /contacts → contacts.* * @description Contact-specific operations and static refresh endpoint */ export declare function createContactsResource(executeRequest: ExecuteRequest): ((contactId: number) => { /** * Contact document endpoint - OpenAPI Path: /contacts/{id}/doc (GET) * @fullPath api.customers.contacts.doc * @description Returns contact document with full details * @service customers * @domain contact-management * @dataMethod contactsData.doc.get * @discoverable true */ doc: { get: () => Promise<{ params: Record<string, unknown> | unknown[]; data: { id: string; } & { [k: string]: unknown; }; options: Record<string, unknown> | unknown[]; status: number; message: string; count: number; total: number; totalResults: number; }>; }; /** * Contact web allowance endpoint - OpenAPI Path: /contacts/{id}/web-allowance (GET) * @fullPath api.customers.contacts.webAllowance * @description Returns contact web allowance permissions * @service customers * @domain contact-management * @dataMethod contactsData.webAllowance.get * @discoverable true */ webAllowance: { get: () => Promise<{ params: Record<string, unknown> | unknown[]; data: { id: string; } & { [k: string]: unknown; }; options: Record<string, unknown> | unknown[]; status: number; message: string; count: number; total: number; totalResults: number; }>; }; /** * Contact customers endpoint - OpenAPI Path: /contacts/{id}/customers (GET) * @fullPath api.customers.contacts.customers * @description Returns list of customers associated with this contact * @service customers * @domain contact-management * @dataMethod contactsData.customers.list * @discoverable true */ customers: { list: (params?: ContactsIdCustomersParams) => Promise<{ params: Record<string, unknown> | unknown[]; data: import("zod").objectInputType<{ customerId: import("zod").ZodNumber; }, import("zod").ZodTypeAny, "passthrough">[]; options: Record<string, unknown> | unknown[]; status: number; message: string; count: number; total: number; totalResults: number; }>; }; }) & { /** * Contacts refresh endpoint - OpenAPI Path: /contacts/refresh (GET) * @fullPath api.customers.contacts.refresh * @description Refreshes contact data from source system * @service customers * @domain data-refresh * @dataMethod contactsData.refresh.get * @discoverable true */ refresh: { get: () => Promise<{ params: Record<string, unknown> | unknown[]; data: { message: string; timestamp: string; jobId: string; }; options: Record<string, unknown> | unknown[]; status: number; message: string; count: number; total: number; totalResults: number; }>; }; }; /** * Creates the contactsData resource methods (data-only versions) */ export declare function createContactsDataResource(contacts: ReturnType<typeof createContactsResource>): ((contactId: number) => { doc: { get: () => Promise<{ id: string; } & { [k: string]: unknown; }>; }; webAllowance: { get: () => Promise<{ id: string; } & { [k: string]: unknown; }>; }; customers: { list: (params?: ContactsIdCustomersParams) => Promise<import("zod").objectInputType<{ customerId: import("zod").ZodNumber; }, import("zod").ZodTypeAny, "passthrough">[]>; }; }) & { refresh: { get: () => Promise<{ message: string; timestamp: string; jobId: string; }>; }; }; export type ContactsResource = ReturnType<typeof createContactsResource>; export type ContactsDataResource = ReturnType<typeof createContactsDataResource>; export {}; //# sourceMappingURL=contacts.d.ts.map