@simpleapps-com/augur-api
Version:
TypeScript client library for Augur microservices API endpoints
232 lines • 10.9 kB
TypeScript
import type { AgrInfoClient } from '../client';
import type { MicroservicesListParams, MicroserviceCreateParams, MicroserviceUpdateParams, Microservice } from '../schemas';
type ExecuteRequest = AgrInfoClient['executeRequest'];
/**
* Creates the microservices resource methods
* OpenAPI Path: /microservices → microservices.*
* @description Microservices management endpoints
*/
export declare function createMicroservicesResource(executeRequest: ExecuteRequest): {
/**
* List available microservices with filtering and pagination
*
* @fullPath api.agrInfo.microservices.list
* @service agr-info
* @domain microservice-management
* @dataMethod microservicesData.list
* @discoverable true
* @searchTerms ["microservices", "services", "list", "status", "infrastructure"]
* @relatedEndpoints ["api.agrInfo.microservices.get", "api.agrInfo.microservices.create"]
* @commonPatterns ["List all microservices", "Filter by status", "Service discovery"]
* @workflow ["service-discovery", "infrastructure-monitoring", "microservice-management"]
* @prerequisites ["Valid authentication", "Public access permissions"]
* @nextSteps ["Get specific microservice details", "Manage individual services"]
* @businessRules ["Supports pagination", "Can filter by status code", "Returns service metadata"]
* @functionalArea "microservice-management"
* @caching "Cache for 2 minutes, invalidate on service changes"
* @performance "Use pagination for large service lists"
*
* @param params Optional filtering and pagination parameters
* @returns Promise<MicroservicesListResponse> List of microservices
*/
list: (params?: MicroservicesListParams) => Promise<{
params: Record<string, unknown> | unknown[];
data: import("zod").objectInputType<{
microservices_uid: import("zod").ZodNumber;
name: import("zod").ZodOptional<import("zod").ZodString>;
status_cd: import("zod").ZodOptional<import("zod").ZodNumber>;
created_at: import("zod").ZodOptional<import("zod").ZodString>;
updated_at: import("zod").ZodOptional<import("zod").ZodString>;
}, import("zod").ZodTypeAny, "passthrough">[];
options: Record<string, unknown> | unknown[];
status: number;
message: string;
count: number;
total: number;
totalResults: number;
}>;
/**
* Get specific microservice details by UID
*
* @fullPath api.agrInfo.microservices.get
* @service agr-info
* @domain microservice-management
* @dataMethod microservicesData.get
* @discoverable true
* @searchTerms ["microservice", "details", "get", "service", "info"]
* @relatedEndpoints ["api.agrInfo.microservices.list", "api.agrInfo.microservices.update", "api.agrInfo.microservices.delete"]
* @commonPatterns ["Get service details", "Service information", "Microservice lookup"]
* @workflow ["service-inspection", "microservice-management", "configuration-review"]
* @prerequisites ["Valid authentication", "Valid microservice UID"]
* @nextSteps ["Update service configuration", "Monitor service status"]
* @businessRules ["Requires valid microservices_uid", "Returns complete service metadata"]
* @functionalArea "microservice-management"
* @caching "Cache for 5 minutes, real-time for critical services"
* @performance "Fast lookup by UID"
*
* @param microservicesUid Unique identifier for the microservice
* @returns Promise<MicroserviceResponse> Microservice details
*/
get: (microservicesUid: string | number) => Promise<{
params: Record<string, unknown> | unknown[];
data: {
microservices_uid: number;
name?: string | undefined;
status_cd?: number | undefined;
created_at?: string | undefined;
updated_at?: string | undefined;
} & {
[k: string]: unknown;
};
options: Record<string, unknown> | unknown[];
status: number;
message: string;
count: number;
total: number;
totalResults: number;
}>;
/**
* Create a new microservice
*
* @fullPath api.agrInfo.microservices.create
* @service agr-info
* @domain microservice-management
* @dataMethod microservicesData.create
* @discoverable true
* @searchTerms ["microservice", "create", "add", "new", "service", "register"]
* @relatedEndpoints ["api.agrInfo.microservices.list", "api.agrInfo.microservices.get", "api.agrInfo.microservices.update"]
* @commonPatterns ["Register new service", "Add microservice", "Service registration"]
* @workflow ["service-deployment", "microservice-registration", "infrastructure-setup"]
* @prerequisites ["Valid authentication", "Service deployment ready"]
* @nextSteps ["Configure service settings", "Monitor new service health"]
* @businessRules ["Validates service configuration", "Assigns unique UID", "Sets initial status"]
* @functionalArea "microservice-management"
* @caching "No caching - immediate registration"
* @performance "Fast registration with validation"
*
* @param data Microservice creation data
* @returns Promise<MicroserviceResponse> Created microservice details
*/
create: (data: MicroserviceCreateParams) => Promise<{
params: Record<string, unknown> | unknown[];
data: {
microservices_uid: number;
name?: string | undefined;
status_cd?: number | undefined;
created_at?: string | undefined;
updated_at?: string | undefined;
} & {
[k: string]: unknown;
};
options: Record<string, unknown> | unknown[];
status: number;
message: string;
count: number;
total: number;
totalResults: number;
}>;
/**
* Update existing microservice configuration
*
* @fullPath api.agrInfo.microservices.update
* @service agr-info
* @domain microservice-management
* @dataMethod microservicesData.update
* @discoverable true
* @searchTerms ["microservice", "update", "modify", "edit", "configure"]
* @relatedEndpoints ["api.agrInfo.microservices.get", "api.agrInfo.microservices.list", "api.agrInfo.microservices.delete"]
* @commonPatterns ["Update service config", "Modify microservice", "Change service status"]
* @workflow ["service-configuration", "microservice-management", "status-updates"]
* @prerequisites ["Valid authentication", "Existing microservice", "Valid microservices_uid"]
* @nextSteps ["Verify configuration changes", "Monitor service after update"]
* @businessRules ["Validates updated configuration", "Maintains service integrity", "Updates timestamps"]
* @functionalArea "microservice-management"
* @caching "Invalidate cache on update"
* @performance "Fast updates with validation"
*
* @param microservicesUid Unique identifier for the microservice
* @param data Updated microservice data
* @returns Promise<MicroserviceResponse> Updated microservice details
*/
update: (microservicesUid: string | number, data: MicroserviceUpdateParams) => Promise<{
params: Record<string, unknown> | unknown[];
data: {
microservices_uid: number;
name?: string | undefined;
status_cd?: number | undefined;
created_at?: string | undefined;
updated_at?: string | undefined;
} & {
[k: string]: unknown;
};
options: Record<string, unknown> | unknown[];
status: number;
message: string;
count: number;
total: number;
totalResults: number;
}>;
/**
* Delete a microservice
*
* @fullPath api.agrInfo.microservices.delete
* @service agr-info
* @domain microservice-management
* @dataMethod microservicesData.delete
* @discoverable true
* @searchTerms ["microservice", "delete", "remove", "unregister", "decommission"]
* @relatedEndpoints ["api.agrInfo.microservices.list", "api.agrInfo.microservices.get"]
* @commonPatterns ["Remove service", "Decommission microservice", "Unregister service"]
* @workflow ["service-decommission", "microservice-cleanup", "infrastructure-management"]
* @prerequisites ["Valid authentication", "Existing microservice", "Service shutdown confirmation"]
* @nextSteps ["Verify service removal", "Update infrastructure documentation"]
* @businessRules ["Confirms service is not critical", "Cleans up dependencies", "Logs deletion"]
* @functionalArea "microservice-management"
* @caching "Invalidate all related cache on delete"
* @performance "Fast deletion with dependency checks"
*
* @param microservicesUid Unique identifier for the microservice
* @returns Promise<boolean> Success indicator
*/
delete: (microservicesUid: string | number) => Promise<boolean>;
};
/**
* Creates the microservicesData resource methods (data-only versions)
*/
export declare function createMicroservicesDataResource(microservices: ReturnType<typeof createMicroservicesResource>): {
/**
* Get microservices list data only
* @param params Optional filtering and pagination parameters
* @returns Promise<Microservice[]> Array of microservices
*/
list: (params?: MicroservicesListParams) => Promise<Microservice[]>;
/**
* Get microservice details data only
* @param microservicesUid Unique identifier for the microservice
* @returns Promise<Microservice> Microservice details
*/
get: (microservicesUid: string | number) => Promise<Microservice>;
/**
* Get created microservice data only
* @param data Microservice creation data
* @returns Promise<Microservice> Created microservice
*/
create: (data: MicroserviceCreateParams) => Promise<Microservice>;
/**
* Get updated microservice data only
* @param microservicesUid Unique identifier for the microservice
* @param data Updated microservice data
* @returns Promise<Microservice> Updated microservice
*/
update: (microservicesUid: string | number, data: MicroserviceUpdateParams) => Promise<Microservice>;
/**
* Delete microservice and return success status
* @param microservicesUid Unique identifier for the microservice
* @returns Promise<boolean> Success indicator
*/
delete: (microservicesUid: string | number) => Promise<boolean>;
};
export type MicroservicesResource = ReturnType<typeof createMicroservicesResource>;
export type MicroservicesDataResource = ReturnType<typeof createMicroservicesDataResource>;
export {};
//# sourceMappingURL=microservices.d.ts.map