@insurup/sdk 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../package.json","../src/version.ts","../src/core/error-types.ts","../src/core/errors.ts","../src/core/result.ts","../src/core/config.ts","../src/core/retry.ts","../src/client/http.ts","../src/client/graphql.ts","../src/core/endpoints.ts","../src/clients/agent.ts","../src/clients/agentBranch.ts","../src/clients/agentRole.ts","../src/clients/agentSetup.ts","../../contracts/src/common.base.ts","../../contracts/src/common.coverage.ts","../../contracts/src/common.policy.ts","../../contracts/src/common.property.ts","../../contracts/src/common.vehicle.ts","../../contracts/src/common.date.ts","../../contracts/src/customers.ts","../../contracts/src/cases.ts","../../contracts/src/agents.ts","../../contracts/src/webhooks.ts","../../contracts/src/proposals.ts","../../contracts/src/graphql/common.ts","../../contracts/src/graphql/customers.ts","../../contracts/src/graphql/policies.ts","../../contracts/src/graphql/proposals.ts","../../contracts/src/graphql/cases.ts","../../contracts/src/graphql/agentUsers.ts","../../contracts/src/graphql/policyTransfers.ts","../../contracts/src/graphql/filePolicyTransfers.ts","../../contracts/src/graphql/webhookDeliveries.ts","../src/clients/agentUser.ts","../src/clients/customer.ts","../src/clients/vehicle.ts","../src/clients/property.ts","../src/clients/policy.ts","../src/clients/case.ts","../src/clients/webhook.ts","../src/clients/coverage.ts","../src/clients/insurance.ts","../src/clients/proposal.ts","../src/clients/file.ts","../src/clients/language.ts","../src/clients/template.ts","../src/client/client.ts"],"sourcesContent":["{\n \"name\": \"@insurup/sdk\",\n \"version\": \"0.1.7\",\n \"description\": \"Type-safe TypeScript SDK for the InsurUp insurance platform with GraphQL support. Tree-shakeable, works everywhere.\",\n \"keywords\": [\n \"insurup\",\n \"insurance\",\n \"sdk\",\n \"typescript\",\n \"api-client\",\n \"graphql\",\n \"policy\",\n \"claims\",\n \"coverage\",\n \"vehicle-insurance\",\n \"property-insurance\"\n ],\n \"author\": \"InsurUp Team\",\n \"license\": \"MIT\",\n \"homepage\": \"https://github.com/InsurUp/ts-toolkit#readme\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/InsurUp/ts-toolkit.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/InsurUp/ts-toolkit/issues\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"type\": \"module\",\n \"sideEffects\": false,\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"files\": [\n \"dist\"\n ],\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"development\": \"./src/index.ts\",\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\",\n \"default\": \"./dist/index.js\"\n },\n \"./browser\": {\n \"types\": \"./dist/index.d.ts\",\n \"development\": \"./src/index.ts\",\n \"import\": \"./dist/index.browser.js\",\n \"default\": \"./dist/index.browser.js\"\n }\n },\n \"scripts\": {\n \"build\": \"tsup\",\n \"build:tsc\": \"tsc\",\n \"check-types\": \"tsc --noEmit\",\n \"dev\": \"tsup --watch\",\n \"docs\": \"typedoc\",\n \"lint\": \"eslint src test --max-warnings 0\",\n \"test\": \"vitest run\",\n \"test:watch\": \"vitest\",\n \"test:coverage\": \"vitest run --coverage\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"devDependencies\": {\n \"@eslint/js\": \"^9.39.2\",\n \"@vitest/coverage-v8\": \"^4.0.17\",\n \"eslint\": \"^9.39.2\",\n \"eslint-config-prettier\": \"^10.1.8\",\n \"eslint-plugin-prettier\": \"^5.5.5\",\n \"msw\": \"^2.12.7\",\n \"prettier\": \"^3.8.0\",\n \"tsup\": \"^8.5.1\",\n \"typedoc\": \"^0.28.16\",\n \"typescript\": \"^5.9.3\",\n \"typescript-eslint\": \"^8.53.1\",\n \"vitest\": \"^4.0.17\"\n },\n \"dependencies\": {\n \"@insurup/contracts\": \"workspace:*\"\n }\n}\n","/**\n * SDK version information.\n * @module version\n */\n\nimport pkg from \"../package.json\" with { type: \"json\" };\n\n/**\n * The current version of the InsurUp SDK.\n * This value is automatically derived from package.json.\n */\nexport const VERSION: string = pkg.version;\n","/**\n * @fileoverview Error Type Enums - Foundational error types used across the SDK\n * @description Centralized error type definitions to avoid circular dependencies\n */\n\n/**\n * Client-side error types that can occur during API operations\n */\nexport enum InsurUpClientErrorType {\n Unknown = \"Unknown\",\n JsonSerialization = \"JsonSerialization\",\n JsonDeserialization = \"JsonDeserialization\",\n NullResponse = \"NullResponse\",\n Timeout = \"Timeout\",\n HttpRequestFailed = \"HttpRequestFailed\",\n UnexpectedNoContent = \"UnexpectedNoContent\",\n GraphQLError = \"GraphQLError\",\n}\n\n/**\n * Server-side error types from HTTP responses\n */\nexport enum InsurUpServerErrorType {\n Unknown = \"Unknown\",\n AccessDenied = \"AccessDenied\",\n BusinessValidation = \"BusinessValidation\",\n FeatureNotSupported = \"FeatureNotSupported\",\n InputValidation = \"InputValidation\",\n ResourceDuplicate = \"ResourceDuplicate\",\n ResourceInvalidState = \"ResourceInvalidState\",\n ResourceNotFound = \"ResourceNotFound\",\n EndpointNotFound = \"EndpointNotFound\",\n UnsupportedMediaType = \"UnsupportedMediaType\",\n MethodNotAllowed = \"MethodNotAllowed\",\n Unauthorized = \"Unauthorized\",\n Upstream = \"Upstream\",\n}\n\n/**\n * GraphQL error codes from the server\n * These match the error codes set by the GraphQL error filter on the backend\n */\nexport enum InsurUpGraphQLErrorCode {\n /** Access denied - user lacks permission */\n Forbidden = \"FORBIDDEN\",\n /** Authentication required or invalid */\n Unauthorized = \"UNAUTHORIZED\",\n /** Requested resource not found */\n NotFound = \"NOT_FOUND\",\n /** Invalid input or business validation failure */\n BadRequest = \"BAD_REQUEST\",\n /** Resource conflict (duplicate or invalid state) */\n Conflict = \"CONFLICT\",\n /** Feature not supported */\n NotSupported = \"NOT_SUPPORTED\",\n /** Upstream service error */\n UpstreamError = \"UPSTREAM_ERROR\",\n /** Internal server error */\n InternalError = \"INTERNAL_ERROR\",\n /** GraphQL validation error */\n ValidationError = \"VALIDATION_ERROR\",\n /** Filter is required for this query */\n FilterRequired = \"FILTER_REQUIRED\",\n /** Filter time span exceeds maximum allowed */\n FilterMaxSpanExceeded = \"FILTER_MAX_SPAN_EXCEEDED\",\n /** Unknown error code */\n Unknown = \"UNKNOWN\",\n}\n","/**\n * @fileoverview Error handling and mapping utilities\n * @description Error type mapping and parsing logic\n */\n\nimport {\n InsurUpServerErrorType,\n InsurUpClientErrorType,\n} from \"./error-types.js\";\nimport type {\n ValidationError} from \"./result.js\";\nimport {\n type ServerError,\n type ClientError,\n type GraphQLErrors,\n} from \"./result.js\";\n\n/**\n * Error type URLs from the API\n */\nconst ERROR_TYPE_URLS = {\n \"https://api.insurup.com/problems/access-denied\":\n InsurUpServerErrorType.AccessDenied,\n \"https://api.insurup.com/problems/business-validation\":\n InsurUpServerErrorType.BusinessValidation,\n \"https://api.insurup.com/problems/feature-not-supported\":\n InsurUpServerErrorType.FeatureNotSupported,\n \"https://api.insurup.com/problems/input-validation\":\n InsurUpServerErrorType.InputValidation,\n \"https://api.insurup.com/problems/resource-duplicate\":\n InsurUpServerErrorType.ResourceDuplicate,\n \"https://api.insurup.com/problems/resource-invalid-state\":\n InsurUpServerErrorType.ResourceInvalidState,\n \"https://api.insurup.com/problems/resource-not-found\":\n InsurUpServerErrorType.ResourceNotFound,\n \"https://api.insurup.com/problems/endpoint-not-found\":\n InsurUpServerErrorType.EndpointNotFound,\n \"https://api.insurup.com/problems/unauthorized\":\n InsurUpServerErrorType.Unauthorized,\n \"https://api.insurup.com/problems/upstream-service\":\n InsurUpServerErrorType.Upstream,\n \"https://api.insurup.com/problems/unsupported-media-type\":\n InsurUpServerErrorType.UnsupportedMediaType,\n \"https://api.insurup.com/problems/method-not-allowed\":\n InsurUpServerErrorType.MethodNotAllowed,\n} as const;\n\n/**\n * Interface representing the server error response structure\n */\ninterface ServerErrorResponse {\n type?: string;\n title?: string;\n detail?: string;\n instance?: string;\n status?: number;\n codes?: string[];\n traceId?: string;\n template?: string;\n templateArgs?: Record<string, unknown>;\n suggestions?: string[];\n validationErrors?: Array<{\n propertyName?: string;\n errorMessage?: string;\n attemptedValue?: unknown;\n }>;\n}\n\n/**\n * Maps a server error type string to the corresponding enum value\n */\nfunction mapServerErrorType(typeString: string): InsurUpServerErrorType {\n const normalizedType = typeString.toLowerCase().trim();\n return (\n ERROR_TYPE_URLS[normalizedType as keyof typeof ERROR_TYPE_URLS] ??\n InsurUpServerErrorType.Unknown\n );\n}\n\n/**\n * Parses validation errors from server response\n */\nfunction parseValidationErrors(\n validationErrors?: Array<{\n propertyName?: string;\n errorMessage?: string;\n attemptedValue?: unknown;\n }>,\n): ValidationError[] {\n if (!validationErrors || !Array.isArray(validationErrors)) {\n return [];\n }\n\n return validationErrors\n .filter((error): error is NonNullable<typeof error> => error != null)\n .map(\n (error): ValidationError => ({\n propertyName: error.propertyName ?? \"\",\n errorMessage: error.errorMessage ?? \"\",\n attemptedValue: error.attemptedValue ?? null,\n }),\n );\n}\n\n/**\n * Parses server error response and creates a ServerError object\n */\nexport function parseServerError(\n response: Response,\n responseBody: string,\n): ServerError {\n let errorData: ServerErrorResponse = {};\n\n // Try to parse JSON response body\n try {\n if (responseBody.trim()) {\n const parsed = JSON.parse(responseBody) as unknown;\n if (typeof parsed === \"object\" && parsed !== null) {\n errorData = parsed as ServerErrorResponse;\n }\n }\n } catch {\n // If JSON parsing fails, create minimal error info from response\n }\n\n const typeString =\n errorData.type ?? \"https://api.insurup.com/problems/unknown\";\n const type = mapServerErrorType(typeString);\n\n return {\n kind: \"server-error\",\n isSuccess: false,\n message:\n errorData.detail ?? (response.statusText || \"Unknown server error\"),\n type,\n typeString,\n title: errorData.title ?? `HTTP ${response.status}`,\n detail: errorData.detail ?? (response.statusText || \"Unknown server error\"),\n instance: errorData.instance ?? \"\",\n status: errorData.status ?? response.status,\n codes: errorData.codes ?? [],\n traceId: errorData.traceId ?? undefined,\n template: errorData.template ?? \"\",\n templateArgs: errorData.templateArgs ?? {},\n suggestions: errorData.suggestions ?? [],\n validationErrors: parseValidationErrors(errorData.validationErrors),\n };\n}\n\n/**\n * Creates a client error for network/timeout issues\n */\nexport function createNetworkError(error: unknown): ClientError {\n if (error instanceof Error) {\n if (error.name === \"AbortError\" || error.message.includes(\"timeout\")) {\n return {\n kind: \"client-error\",\n isSuccess: false,\n message: \"Request timed out\",\n type: InsurUpClientErrorType.Timeout,\n error: error,\n };\n }\n\n const messageLower = error.message.toLowerCase();\n if (\n error.name === \"TypeError\" ||\n messageLower.includes(\"fetch\") ||\n messageLower.includes(\"network\") ||\n messageLower.includes(\"failed\") ||\n messageLower.includes(\"econn\") ||\n messageLower.includes(\"enotfound\")\n ) {\n return {\n kind: \"client-error\",\n isSuccess: false,\n message: \"HTTP request failed\",\n type: InsurUpClientErrorType.HttpRequestFailed,\n error: error,\n };\n }\n\n // Default other Error instances to HttpRequestFailed for better DX\n return {\n kind: \"client-error\",\n isSuccess: false,\n message: \"HTTP request failed\",\n type: InsurUpClientErrorType.HttpRequestFailed,\n error: error,\n };\n }\n\n return {\n kind: \"client-error\",\n isSuccess: false,\n message: \"Unknown error occurred\",\n type: InsurUpClientErrorType.Unknown,\n error: error,\n };\n}\n\n/**\n * Creates a client error for JSON serialization issues\n */\nexport function createSerializationError(error: unknown): ClientError {\n return {\n kind: \"client-error\",\n isSuccess: false,\n message:\n error instanceof Error\n ? error.message\n : \"Failed to serialize request to JSON\",\n type: InsurUpClientErrorType.JsonSerialization,\n error: error,\n };\n}\n\n/**\n * Creates a client error for JSON deserialization issues\n */\nexport function createDeserializationError(error: unknown): ClientError {\n return {\n kind: \"client-error\",\n isSuccess: false,\n message: \"Failed to parse response JSON\",\n type: InsurUpClientErrorType.JsonDeserialization,\n error: error,\n };\n}\n\n/**\n * Creates a client error for null/empty responses when data was expected\n */\nexport function createNullResponseError(): ClientError {\n return {\n kind: \"client-error\",\n isSuccess: false,\n message: \"Response was empty or null when data was expected\",\n type: InsurUpClientErrorType.NullResponse,\n };\n}\n\n/**\n * Creates a client error for unexpected empty/no-content responses\n * Used when an endpoint that should return data receives 204 or empty body\n */\nexport function createUnexpectedNoContentError(): ClientError {\n return {\n kind: \"client-error\",\n isSuccess: false,\n message: \"Expected response data but received no content\",\n type: InsurUpClientErrorType.UnexpectedNoContent,\n };\n}\n\nexport function extractError(\n error: Error,\n): ClientError | ServerError | GraphQLErrors {\n if (error instanceof InsurUpError) {\n return error.error;\n }\n\n return {\n kind: \"client-error\",\n isSuccess: false,\n message: error.message,\n type: InsurUpClientErrorType.Unknown,\n } as ClientError;\n}\n\n/**\n * Custom InsurUp error class that extends the standard Error\n */\nexport class InsurUpError extends Error {\n /**\n * The original client, server, or GraphQL error object\n */\n public readonly error: ClientError | ServerError | GraphQLErrors;\n\n constructor(error: ClientError | ServerError | GraphQLErrors) {\n super(error.message);\n this.name = \"InsurUpError\";\n this.error = error;\n }\n}\n","/**\n * @fileoverview InsurUp Result Types - Type-safe discriminated unions for operation results\n * @description Type-safe discriminated unions for operation results\n */\n\nimport { InsurUpError } from \"./errors.js\";\nimport {\n InsurUpClientErrorType,\n InsurUpServerErrorType,\n InsurUpGraphQLErrorCode,\n} from \"./error-types.js\";\n\n/**\n * Represents a validation error that occurred during request processing\n */\nexport interface ValidationError {\n /**\n * The name of the property that failed validation\n * The name of the property.\n */\n readonly propertyName: string;\n\n /**\n * The error message describing what went wrong\n * The error message\n */\n readonly errorMessage: string;\n\n /**\n * The property value that caused the validation failure\n * The property value that caused the failure.\n */\n readonly attemptedValue: unknown;\n}\n\n// Re-export error types for convenience\nexport {\n InsurUpClientErrorType,\n InsurUpServerErrorType,\n InsurUpGraphQLErrorCode,\n};\n\n/**\n * Represents a successful operation with data\n */\nexport interface Success<T> {\n readonly kind: \"success\";\n readonly isSuccess: true;\n readonly message: \"Success\";\n readonly data: T;\n}\n\n/**\n * Represents a successful operation without data (e.g., 204 No Content)\n */\nexport interface SuccessNoContent {\n readonly kind: \"success\";\n readonly isSuccess: true;\n readonly message: \"Success\";\n}\n\n/**\n * Represents an error response from the server (4xx and 5xx HTTP status codes)\n */\nexport interface ServerError {\n readonly kind: \"server-error\";\n readonly isSuccess: false;\n readonly message: string;\n readonly type: InsurUpServerErrorType;\n readonly typeString: string;\n readonly title: string;\n readonly detail: string;\n readonly instance: string;\n readonly status: number;\n readonly codes: readonly string[];\n readonly traceId: string | undefined;\n readonly template: string;\n readonly templateArgs: Readonly<Record<string, unknown>>;\n readonly suggestions: readonly string[];\n readonly validationErrors: readonly ValidationError[];\n}\n\n/**\n * Represents a client-side error (exceptions, null JSON responses, etc.)\n */\nexport interface ClientError {\n readonly kind: \"client-error\";\n readonly isSuccess: false;\n readonly message: string;\n readonly type: InsurUpClientErrorType;\n readonly error?: unknown;\n}\n\n// ============================================\n// GraphQL Error Types\n// ============================================\n\n/**\n * Represents the location of an error in a GraphQL document\n */\nexport interface GraphQLErrorLocation {\n readonly line: number;\n readonly column: number;\n}\n\n/**\n * Extensions attached to GraphQL errors by the server\n * Contains structured error information from the backend error filter\n */\nexport interface GraphQLErrorExtensions {\n /** The error code (e.g., FORBIDDEN, UNAUTHORIZED, NOT_FOUND) */\n readonly code?: InsurUpGraphQLErrorCode;\n /** Trace ID for debugging/correlation */\n readonly traceId?: string;\n /** Array of error codes from the backend AppException */\n readonly codes?: readonly string[];\n /** Message template for localization */\n readonly template?: string;\n /** Arguments for the message template */\n readonly templateArgs?: Readonly<Record<string, unknown>>;\n /** Suggested actions or fixes */\n readonly suggestions?: readonly string[];\n /** Additional extension fields */\n readonly [key: string]: unknown;\n}\n\n/**\n * Represents a single GraphQL error item\n */\nexport interface GraphQLErrorItem {\n /** The error message */\n readonly message: string;\n /** Locations in the GraphQL document where the error occurred */\n readonly locations?: readonly GraphQLErrorLocation[];\n /** Path to the field that caused the error */\n readonly path?: readonly (string | number)[];\n /** Extensions containing additional error information */\n readonly extensions?: GraphQLErrorExtensions;\n}\n\n/**\n * Represents a GraphQL error response containing one or more errors\n */\nexport interface GraphQLErrors {\n readonly kind: \"graphql-error\";\n readonly isSuccess: false;\n /** First error message for convenience */\n readonly message: string;\n /** All GraphQL errors from the response */\n readonly errors: readonly GraphQLErrorItem[];\n}\n\n/**\n * Discriminated union representing the result of a GraphQL operation\n *\n * Similar to InsurUpResult but uses GraphQLErrors instead of ServerError\n * since GraphQL errors have a different schema and can contain multiple errors.\n *\n * @template T The type of the success data (void for no-content operations)\n */\nexport type InsurUpGraphQLResult<T = void> = T extends void\n ? SuccessNoContent | GraphQLErrors | ClientError\n : Success<T> | GraphQLErrors | ClientError;\n\n/**\n * Discriminated union representing the result of an InsurUp operation\n *\n * When called without a type parameter (InsurUpResult), represents a no-content result\n * where the success case has no data field.\n *\n * When called with a type parameter (InsurUpResult<T>), represents a result with data\n * where the success case has a data field of type T.\n *\n * @template T The type of the success data (void for no-content operations)\n */\nexport type InsurUpResult<T = void> = T extends void\n ? SuccessNoContent | ServerError | ClientError\n : Success<T> | ServerError | ClientError;\n\n/**\n * Creates a successful result with data\n */\nexport function createSuccess<T>(data: T): Success<T> {\n return {\n kind: \"success\",\n isSuccess: true,\n message: \"Success\",\n data,\n };\n}\n\n/**\n * Creates a successful result without data (for 204 No Content responses)\n */\nexport function createSuccessNoContent(): SuccessNoContent {\n return {\n kind: \"success\",\n isSuccess: true,\n message: \"Success\",\n };\n}\n\n/**\n * Helper type to extract data type from a Success result\n */\nexport type ExtractSuccessData<R> = R extends Success<infer T> ? T : never;\n\n/**\n * Extracts data from a successful result or throws an InsurUpError\n * Only works with InsurUpResult<T> where T is not void\n */\nexport function getDataOrThrow<T>(result: InsurUpResult<T>): T {\n if (result.isSuccess) {\n // When T is not void, result.isSuccess means result is Success<T>\n return (result as unknown as Success<T>).data;\n }\n throw new InsurUpError(result);\n}\n\n/**\n * Throws an InsurUpError if the result is not successful\n * Works with any InsurUpResult type\n */\nexport function throwIfError(\n result: InsurUpResult<unknown> | InsurUpResult,\n): void {\n if (result.isSuccess) {\n return;\n }\n throw new InsurUpError(result);\n}\n\n// ============================================\n// GraphQL Result Helpers\n// ============================================\n\n/**\n * Extracts data from a successful GraphQL result or throws an InsurUpError\n * Only works with InsurUpGraphQLResult<T> where T is not void\n */\nexport function getGraphQLDataOrThrow<T>(result: InsurUpGraphQLResult<T>): T {\n if (result.isSuccess) {\n return (result as unknown as Success<T>).data;\n }\n throw new InsurUpError(result);\n}\n\n/**\n * Throws an InsurUpError if the GraphQL result is not successful\n * Works with any InsurUpGraphQLResult type\n */\nexport function throwIfGraphQLError(\n result: InsurUpGraphQLResult<unknown> | InsurUpGraphQLResult,\n): void {\n if (result.isSuccess) {\n return;\n }\n throw new InsurUpError(result);\n}\n\n/**\n * Creates a GraphQL errors result from an array of GraphQL error items\n */\nexport function createGraphQLErrors(\n errors: readonly GraphQLErrorItem[],\n): GraphQLErrors {\n return {\n kind: \"graphql-error\",\n isSuccess: false,\n message: errors[0]?.message ?? \"Unknown GraphQL error\",\n errors,\n };\n}\n","/**\n * @fileoverview SDK Configuration - Default values and configuration constants\n * @description Default configuration values for the InsurUp SDK client\n */\n\nimport type {\n InsurUpClientOptions,\n RetryOptions,\n TokenProvider,\n RequestInterceptor,\n ResponseInterceptor,\n} from \"./options.js\";\n\n/**\n * Default retry options for transient failure handling\n * Based on standard exponential backoff defaults with InsurUp-specific settings\n */\nexport const DEFAULT_RETRY_OPTIONS: Required<RetryOptions> = {\n retries: 3,\n factor: 2,\n minTimeout: 1000,\n maxTimeout: 10000,\n randomize: true,\n backoffStrategy: \"exponential\",\n retryableStatusCodes: [408, 429, 500, 502, 503, 504],\n onFailedAttempt: () => {}, // No-op by default\n} as const;\n\n/**\n * Default logger implementation using console\n */\nexport const DEFAULT_LOGGER = {\n info: (message: string, data?: unknown) => {\n if (data !== undefined) {\n console.info(message, data);\n } else {\n console.info(message);\n }\n },\n warn: (message: string, data?: unknown) => {\n if (data !== undefined) {\n console.warn(message, data);\n } else {\n console.warn(message);\n }\n },\n error: (message: string, data?: unknown) => {\n if (data !== undefined) {\n console.error(message, data);\n } else {\n console.error(message);\n }\n },\n} as const;\n\n/**\n * Required client options type (tokenProvider, onRequest, onResponse, retry remain optional)\n */\nexport type RequiredClientOptions = Required<\n Omit<\n InsurUpClientOptions,\n \"tokenProvider\" | \"onRequest\" | \"onResponse\" | \"retry\"\n >\n> & {\n tokenProvider?: TokenProvider;\n onRequest?: RequestInterceptor;\n onResponse?: ResponseInterceptor;\n retry?: Required<RetryOptions>;\n};\n\n/**\n * Default configuration values for the InsurUp SDK client\n */\nexport const DEFAULT_CLIENT_OPTIONS: RequiredClientOptions = {\n baseUrl: \"https://api.insurup.com/api/\",\n customHeaders: {},\n userAgent: \"@insurup/sdk\",\n timeoutMs: 30000,\n logLevel: \"none\",\n logger: DEFAULT_LOGGER,\n retry: undefined,\n tokenProvider: undefined,\n onRequest: undefined,\n onResponse: undefined,\n} as const;\n\n/**\n * Merges user-provided options with defaults\n * @param options User-provided options\n * @returns Complete options object with defaults applied\n */\nexport function mergeWithDefaults(\n options?: InsurUpClientOptions,\n): RequiredClientOptions {\n return {\n baseUrl: options?.baseUrl ?? DEFAULT_CLIENT_OPTIONS.baseUrl,\n customHeaders: {\n ...DEFAULT_CLIENT_OPTIONS.customHeaders,\n ...options?.customHeaders,\n },\n userAgent: options?.userAgent ?? DEFAULT_CLIENT_OPTIONS.userAgent,\n timeoutMs: options?.timeoutMs ?? DEFAULT_CLIENT_OPTIONS.timeoutMs,\n logLevel: options?.logLevel ?? DEFAULT_CLIENT_OPTIONS.logLevel,\n logger: options?.logger ?? DEFAULT_CLIENT_OPTIONS.logger,\n retry: options?.retry\n ? { ...DEFAULT_RETRY_OPTIONS, ...options.retry }\n : undefined,\n tokenProvider: options?.tokenProvider,\n onRequest: options?.onRequest,\n onResponse: options?.onResponse,\n };\n}\n","/**\n * @fileoverview Lightweight retry utility for transient failure handling\n * @description Provides configurable backoff strategies with jitter, zero-dependency replacement for p-retry\n */\n\nimport type { RetryOptions } from \"./options.js\";\n\n/**\n * Executes a function with configurable backoff retry logic\n * @template T The return type of the function\n * @param fn The function to execute, receives attempt number (1-based)\n * @param options Retry configuration options\n * @returns Promise resolving to the function's result\n * @throws The last error encountered if all retry attempts fail\n */\nexport async function withRetry<T>(\n fn: (attemptNumber: number) => Promise<T>,\n options: Required<RetryOptions>,\n): Promise<T> {\n const {\n retries,\n factor,\n minTimeout,\n maxTimeout,\n randomize,\n backoffStrategy,\n onFailedAttempt,\n } = options;\n\n let attempt = 1;\n\n while (true) {\n try {\n return await fn(attempt);\n } catch (error) {\n const isLastAttempt = attempt > retries;\n\n if (isLastAttempt) {\n throw error;\n }\n\n // Calculate delay based on backoff strategy\n let delay: number;\n switch (backoffStrategy) {\n case \"linear\":\n delay = minTimeout * attempt;\n break;\n case \"constant\":\n delay = minTimeout;\n break;\n case \"exponential\":\n default:\n delay = minTimeout * Math.pow(factor, attempt - 1);\n }\n\n // Apply jitter if enabled\n if (randomize) {\n // Random factor between 1 and 2, matching p-retry behavior\n delay *= 1 + Math.random();\n }\n\n // Cap at maxTimeout\n delay = Math.min(delay, maxTimeout);\n\n // Notify callback\n if (onFailedAttempt) {\n onFailedAttempt({\n attemptNumber: attempt,\n retriesLeft: retries - attempt + 1,\n name: error instanceof Error ? error.name : \"Error\",\n message: error instanceof Error ? error.message : String(error),\n error: error instanceof Error ? error : new Error(String(error)),\n });\n }\n\n // Wait before next attempt\n await new Promise((resolve) => setTimeout(resolve, delay));\n\n attempt++;\n }\n }\n}\n","/**\n * @fileoverview HTTP Transport Layer - Fetch-based HTTP client\n * @description Cross-environment HTTP transport with timeout support and error handling\n */\n\nimport type { InsurUpResult } from \"../core/result.js\";\nimport {\n createSuccess,\n createSuccessNoContent,\n InsurUpClientErrorType,\n} from \"../core/result.js\";\nimport {\n parseServerError,\n createNetworkError,\n createSerializationError,\n createDeserializationError,\n createUnexpectedNoContentError,\n} from \"../core/errors.js\";\nimport type {\n InsurUpClientOptions,\n RequestConfig,\n RequestOptions,\n} from \"../core/options.js\";\nimport {\n mergeWithDefaults,\n type RequiredClientOptions,\n} from \"../core/config.js\";\nimport { withRetry } from \"../core/retry.js\";\n\n/**\n * HTTP method types\n */\nexport type HttpMethod = \"GET\" | \"POST\" | \"PUT\" | \"DELETE\" | \"PATCH\";\n\n/**\n * Valid request body types for HTTP requests\n */\nexport type RequestBody = unknown | FormData;\n\n/**\n * Error type that built-in retry can understand\n */\ninterface RetryableError extends Error {\n result: InsurUpResult<unknown> | InsurUpResult;\n attemptNumber: number;\n}\n\n/**\n * HTTP transport class providing fetch-based request capabilities\n * with environment detection and timeout support\n */\nexport class HttpTransport {\n private readonly options: RequiredClientOptions;\n\n constructor(options?: InsurUpClientOptions) {\n this.options = mergeWithDefaults(options);\n }\n\n /**\n * Sends an HTTP request and returns the parsed result\n * @template T The expected response type (void for no-content operations)\n * @param method HTTP method\n * @param path Relative path (will be prefixed with baseUrl)\n * @param body Optional request body\n * @param options Optional request options (headers, signal, timeoutMs)\n * @param expectContent Whether the response should contain data (internal use)\n * @returns Promise resolving to InsurUpResult<T>\n */\n private async sendInternal<T>(\n method: HttpMethod,\n path: string,\n body?: RequestBody,\n options?: RequestOptions,\n expectContent: boolean = true,\n ): Promise<InsurUpResult<T> | InsurUpResult> {\n const startTime = Date.now();\n const url = `${this.options.baseUrl.replace(/\\/$/, \"\")}/${path.replace(/^\\//, \"\")}`;\n\n // Build initial request config for interceptors\n let requestConfig: RequestConfig = {\n url,\n method,\n headers: { ...this.options.customHeaders, ...options?.headers },\n body,\n };\n\n // Call request interceptor if provided\n if (this.options.onRequest) {\n try {\n requestConfig = await this.options.onRequest(requestConfig);\n } catch (error) {\n if (this.options.logLevel !== \"none\") {\n this.options.logger.warn(\"Request interceptor failed:\", error);\n }\n }\n }\n\n this.logRequest(method, path, body, options?.headers);\n\n const executeRequest = async (\n attemptNumber: number,\n ): Promise<InsurUpResult<T> | InsurUpResult> => {\n try {\n const result = await this.sendSingleRequest<T>(\n requestConfig.method as HttpMethod,\n path,\n requestConfig.body,\n {\n headers: requestConfig.headers,\n signal: options?.signal,\n timeoutMs: options?.timeoutMs,\n },\n expectContent,\n );\n\n // If it's a success, return it\n if (result.kind === \"success\") {\n return result;\n }\n\n // Check if this error should be retried\n if (this.shouldRetryResult(result)) {\n const error = new Error(result.message) as RetryableError;\n error.result = result;\n error.attemptNumber = attemptNumber;\n\n throw error;\n }\n\n // Non-retryable error, return it directly\n return result;\n } catch (rawError) {\n // Handle raw errors from fetch (like timeout errors)\n const networkError = createNetworkError(rawError);\n\n // Don't retry timeout errors\n if (networkError.type === InsurUpClientErrorType.Timeout) {\n return networkError;\n }\n\n // Only retry HttpRequestFailed errors\n if (\n networkError.type === InsurUpClientErrorType.HttpRequestFailed &&\n this.options.retry\n ) {\n const error = new Error(networkError.message) as RetryableError;\n error.result = networkError;\n error.attemptNumber = attemptNumber;\n\n throw error;\n }\n\n // Non-retryable error, return it directly\n return networkError;\n }\n };\n\n try {\n let result: InsurUpResult<T> | InsurUpResult;\n\n if (this.options.retry) {\n result = await withRetry(executeRequest, {\n ...this.options.retry,\n onFailedAttempt: (error) => {\n const originalError = error.error as RetryableError;\n if (originalError.result) {\n this.logRetry(error.attemptNumber, originalError.result);\n }\n\n // Call user's onFailedAttempt if provided\n if (this.options.retry?.onFailedAttempt) {\n this.options.retry.onFailedAttempt(error);\n }\n },\n });\n } else {\n result = await executeRequest(1);\n }\n\n const duration = Date.now() - startTime;\n this.logResponse(\"SUCCESS\", duration, 1, result);\n\n // Call response interceptor if provided\n if (this.options.onResponse) {\n try {\n return (await this.options.onResponse(\n result as InsurUpResult<unknown>,\n requestConfig,\n )) as InsurUpResult<T> | InsurUpResult;\n } catch (error) {\n if (this.options.logLevel !== \"none\") {\n this.options.logger.warn(\"Response interceptor failed:\", error);\n }\n }\n }\n\n return result;\n } catch (error) {\n const duration = Date.now() - startTime;\n // If it's our custom error with a result, use that\n const retryableError = error as RetryableError;\n if (retryableError.result) {\n this.logResponse(\n \"ERROR\",\n duration,\n retryableError.attemptNumber || 1,\n retryableError.result,\n );\n\n // Call response interceptor for errors too\n if (this.options.onResponse) {\n try {\n return (await this.options.onResponse(\n retryableError.result as InsurUpResult<unknown>,\n requestConfig,\n )) as InsurUpResult<T> | InsurUpResult;\n } catch (interceptorError) {\n if (this.options.logLevel !== \"none\") {\n this.options.logger.warn(\n \"Response interceptor failed:\",\n interceptorError,\n );\n }\n }\n }\n\n return retryableError.result as InsurUpResult<T> | InsurUpResult;\n }\n\n // Otherwise, it's a network error\n const networkError = createNetworkError(error);\n this.logResponse(\"ERROR\", duration, 1, networkError);\n\n // Call response interceptor for network errors too\n if (this.options.onResponse) {\n try {\n return (await this.options.onResponse(\n networkError as InsurUpResult<unknown>,\n requestConfig,\n )) as InsurUpResult<T> | InsurUpResult;\n } catch (interceptorError) {\n if (this.options.logLevel !== \"none\") {\n this.options.logger.warn(\n \"Response interceptor failed:\",\n interceptorError,\n );\n }\n }\n }\n\n return networkError;\n }\n }\n\n /**\n * Sends a single HTTP request without retry logic\n */\n private async sendSingleRequest<T>(\n method: HttpMethod,\n path: string,\n body?: RequestBody,\n options?: RequestOptions,\n expectContent: boolean = true,\n ): Promise<InsurUpResult<T> | InsurUpResult> {\n const url = `${this.options.baseUrl.replace(/\\/$/, \"\")}/${path.replace(/^\\//, \"\")}`;\n const requestHeaders = await this.buildHeaders(options?.headers);\n\n // Serialize request body\n let serializedBody: string | FormData | null = null;\n if (body) {\n if (body instanceof FormData) {\n // Don't serialize FormData - let browser set Content-Type with boundary\n serializedBody = body;\n } else {\n try {\n serializedBody = JSON.stringify(body);\n // Set Content-Type header for JSON requests\n if (!this.hasContentTypeHeader(requestHeaders)) {\n requestHeaders[\"Content-Type\"] = \"application/json\";\n }\n } catch (error) {\n return createSerializationError(error);\n }\n }\n }\n\n // Create AbortController for timeout\n const controller = new AbortController();\n const timeoutId = setTimeout(\n () => controller.abort(),\n options?.timeoutMs ?? this.options.timeoutMs,\n );\n\n // Bridge external signal (if provided) to our controller\n let signalCleanup: (() => void) | undefined;\n if (options?.signal) {\n if (options.signal.aborted) {\n controller.abort();\n } else {\n const abortHandler = () => controller.abort();\n options.signal.addEventListener(\"abort\", abortHandler, { once: true });\n signalCleanup = () =>\n options.signal!.removeEventListener(\"abort\", abortHandler);\n }\n }\n\n let response: Response;\n try {\n response = await fetch(url, {\n method,\n headers: requestHeaders,\n body: serializedBody,\n signal: controller.signal,\n });\n } finally {\n clearTimeout(timeoutId);\n signalCleanup?.();\n }\n\n return await this.handleResponse<T>(response, expectContent);\n }\n\n /**\n * Convenience method for GET requests - always expects content\n * @param path Relative path (will be prefixed with baseUrl)\n * @param options Optional request options (headers, signal, timeoutMs)\n */\n async get<T>(\n path: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<T>> {\n return this.sendInternal<T>(\"GET\", path, null, options, true) as Promise<\n InsurUpResult<T>\n >;\n }\n\n /**\n * POST request expecting a response with data\n * @param path Relative path (will be prefixed with baseUrl)\n * @param data Optional request body\n * @param options Optional request options (headers, signal, timeoutMs)\n * @returns Promise resolving to InsurUpResult<T> with response data\n */\n async post<T>(\n path: string,\n data?: RequestBody,\n options?: RequestOptions,\n ): Promise<InsurUpResult<T>> {\n return this.sendInternal<T>(\"POST\", path, data, options, true) as Promise<\n InsurUpResult<T>\n >;\n }\n\n /**\n * POST request expecting no response content (204 No Content)\n * @param path Relative path (will be prefixed with baseUrl)\n * @param data Optional request body\n * @param options Optional request options (headers, signal, timeoutMs)\n * @returns Promise resolving to InsurUpResult (no data)\n */\n async postNoContent(\n path: string,\n data?: RequestBody,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.sendInternal(\n \"POST\",\n path,\n data,\n options,\n false,\n ) as Promise<InsurUpResult>;\n }\n\n /**\n * PUT request expecting a response with data\n * @param path Relative path (will be prefixed with baseUrl)\n * @param data Optional request body\n * @param options Optional request options (headers, signal, timeoutMs)\n * @returns Promise resolving to InsurUpResult<T> with response data\n */\n async put<T>(\n path: string,\n data?: RequestBody,\n options?: RequestOptions,\n ): Promise<InsurUpResult<T>> {\n return this.sendInternal<T>(\"PUT\", path, data, options, true) as Promise<\n InsurUpResult<T>\n >;\n }\n\n /**\n * PUT request expecting no response content (204 No Content)\n * @param path Relative path (will be prefixed with baseUrl)\n * @param data Optional request body\n * @param options Optional request options (headers, signal, timeoutMs)\n * @returns Promise resolving to InsurUpResult (no data)\n */\n async putNoContent(\n path: string,\n data?: RequestBody,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.sendInternal(\n \"PUT\",\n path,\n data,\n options,\n false,\n ) as Promise<InsurUpResult>;\n }\n\n /**\n * PATCH request expecting a response with data\n * @param path Relative path (will be prefixed with baseUrl)\n * @param data Optional request body\n * @param options Optional request options (headers, signal, timeoutMs)\n * @returns Promise resolving to InsurUpResult<T> with response data\n */\n async patch<T>(\n path: string,\n data?: RequestBody,\n options?: RequestOptions,\n ): Promise<InsurUpResult<T>> {\n return this.sendInternal<T>(\"PATCH\", path, data, options, true) as Promise<\n InsurUpResult<T>\n >;\n }\n\n /**\n * PATCH request expecting no response content (204 No Content)\n * @param path Relative path (will be prefixed with baseUrl)\n * @param data Optional request body\n * @param options Optional request options (headers, signal, timeoutMs)\n * @returns Promise resolving to InsurUpResult (no data)\n */\n async patchNoContent(\n path: string,\n data?: RequestBody,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.sendInternal(\n \"PATCH\",\n path,\n data,\n options,\n false,\n ) as Promise<InsurUpResult>;\n }\n\n /**\n * DELETE request expecting a response with data\n * @param path Relative path (will be prefixed with baseUrl)\n * @param options Optional request options (headers, signal, timeoutMs)\n * @returns Promise resolving to InsurUpResult<T> with response data\n */\n async delete<T>(\n path: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<T>> {\n return this.sendInternal<T>(\"DELETE\", path, null, options, true) as Promise<\n InsurUpResult<T>\n >;\n }\n\n /**\n * DELETE request expecting no response content (204 No Content)\n * @param path Relative path (will be prefixed with baseUrl)\n * @param options Optional request options (headers, signal, timeoutMs)\n * @returns Promise resolving to InsurUpResult (no data)\n */\n async deleteNoContent(\n path: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.sendInternal(\n \"DELETE\",\n path,\n null,\n options,\n false,\n ) as Promise<InsurUpResult>;\n }\n\n /**\n * Downloads a binary file as a Blob\n * Use this for downloading documents, images, or other binary content\n * @param path Relative path (will be prefixed with baseUrl)\n * @param options Optional request options (headers, signal, timeoutMs)\n * @returns Promise resolving to InsurUpResult<Blob>\n */\n async getBlob(\n path: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<Blob>> {\n const url = `${this.options.baseUrl.replace(/\\/$/, \"\")}/${path.replace(/^\\//, \"\")}`;\n const requestHeaders = await this.buildHeaders(options?.headers);\n\n // Build request config for interceptors\n let requestConfig: RequestConfig = {\n url,\n method: \"GET\",\n headers: requestHeaders,\n };\n\n // Call request interceptor if provided\n if (this.options.onRequest) {\n try {\n requestConfig = await this.options.onRequest(requestConfig);\n } catch (error) {\n if (this.options.logLevel !== \"none\") {\n this.options.logger.warn(\"Request interceptor failed:\", error);\n }\n }\n }\n\n this.logRequest(\"GET\", path, undefined, options?.headers);\n\n // Create AbortController for timeout\n const controller = new AbortController();\n const timeoutId = setTimeout(\n () => controller.abort(),\n options?.timeoutMs ?? this.options.timeoutMs,\n );\n\n // Bridge external signal (if provided) to our controller\n let signalCleanup: (() => void) | undefined;\n if (options?.signal) {\n if (options.signal.aborted) {\n controller.abort();\n } else {\n const abortHandler = () => controller.abort();\n options.signal.addEventListener(\"abort\", abortHandler, { once: true });\n signalCleanup = () =>\n options.signal!.removeEventListener(\"abort\", abortHandler);\n }\n }\n\n let response: Response;\n try {\n response = await fetch(url, {\n method: \"GET\",\n headers: requestConfig.headers,\n signal: controller.signal,\n });\n } catch (error) {\n // Cleanup is handled by finally block\n const networkError = createNetworkError(error);\n\n // Call response interceptor for errors\n if (this.options.onResponse) {\n try {\n return await this.options.onResponse(networkError, requestConfig);\n } catch (interceptorError) {\n if (this.options.logLevel !== \"none\") {\n this.options.logger.warn(\n \"Response interceptor failed:\",\n interceptorError,\n );\n }\n }\n }\n\n return networkError;\n } finally {\n clearTimeout(timeoutId);\n signalCleanup?.();\n }\n\n // Handle non-success HTTP status codes\n if (!response.ok) {\n const errorText = await response.text();\n const serverError = parseServerError(response, errorText);\n\n // Call response interceptor for errors\n if (this.options.onResponse) {\n try {\n return await this.options.onResponse(serverError, requestConfig);\n } catch (interceptorError) {\n if (this.options.logLevel !== \"none\") {\n this.options.logger.warn(\n \"Response interceptor failed:\",\n interceptorError,\n );\n }\n }\n }\n\n return serverError;\n }\n\n // Return the blob\n try {\n const blob = await response.blob();\n const result = createSuccess(blob);\n\n // Call response interceptor\n if (this.options.onResponse) {\n try {\n return await this.options.onResponse(result, requestConfig);\n } catch (interceptorError) {\n if (this.options.logLevel !== \"none\") {\n this.options.logger.warn(\n \"Response interceptor failed:\",\n interceptorError,\n );\n }\n }\n }\n\n return result;\n } catch (error) {\n const deserializationError = createDeserializationError(error);\n\n // Call response interceptor for errors\n if (this.options.onResponse) {\n try {\n return await this.options.onResponse(\n deserializationError,\n requestConfig,\n );\n } catch (interceptorError) {\n if (this.options.logLevel !== \"none\") {\n this.options.logger.warn(\n \"Response interceptor failed:\",\n interceptorError,\n );\n }\n }\n }\n\n return deserializationError;\n }\n }\n\n /**\n * Builds request headers including defaults and custom headers\n * Invokes token provider if available and adds Authorization header\n */\n private async buildHeaders(\n additionalHeaders?: Record<string, string>,\n ): Promise<Record<string, string>> {\n const headers: Record<string, string> = {\n ...this.options.customHeaders,\n ...additionalHeaders,\n };\n\n // Set User-Agent in environments where it's allowed (Node.js)\n // Use type-safe check for browser environment\n const isBrowser =\n typeof globalThis === \"object\" && \"window\" in globalThis;\n if (!isBrowser && this.options.userAgent) {\n headers[\"User-Agent\"] = this.options.userAgent;\n }\n\n // Add Authorization header if token provider is available\n if (this.options.tokenProvider) {\n try {\n const token = await this.options.tokenProvider();\n if (token) {\n headers[\"Authorization\"] = `Bearer ${token}`;\n }\n } catch (error) {\n // Log token provider error but don't fail the request\n if (this.options.logLevel !== \"none\") {\n this.options.logger.warn(\"Token provider failed:\", error);\n }\n }\n }\n\n return headers;\n }\n\n /**\n * Checks if Content-Type header is present (case-insensitive)\n */\n private hasContentTypeHeader(headers: Record<string, string>): boolean {\n return Object.keys(headers).some(\n (key) => key.toLowerCase() === \"content-type\",\n );\n }\n\n /**\n * Checks if a content type is a valid JSON content type\n */\n private isJsonContentType(contentType: string): boolean {\n const lowerContentType = contentType.toLowerCase();\n return (\n lowerContentType.includes(\"application/json\") ||\n lowerContentType.includes(\"application/vnd.api+json\") ||\n lowerContentType.includes(\"application/hal+json\") ||\n lowerContentType.includes(\"application/problem+json\") ||\n lowerContentType.includes(\"text/json\") ||\n /^application\\/.*\\+json/i.test(contentType)\n );\n }\n\n /**\n * Handles HTTP response and converts to InsurUpResult\n * @param response The fetch Response object\n * @param expectContent Whether the caller expects response data\n */\n private async handleResponse<T>(\n response: Response,\n expectContent: boolean,\n ): Promise<InsurUpResult<T> | InsurUpResult> {\n // Handle non-success HTTP status codes first\n if (!response.ok) {\n const errorText = await response.text();\n return parseServerError(response, errorText);\n }\n\n // No Content responses (204, 205)\n if (response.status === 204 || response.status === 205) {\n if (expectContent) {\n return createUnexpectedNoContentError();\n }\n return createSuccessNoContent();\n }\n\n // Get response text first to determine if it's empty\n const responseText = await response.text();\n\n // Handle empty response body\n if (!responseText.trim()) {\n if (expectContent) {\n return createUnexpectedNoContentError();\n }\n return createSuccessNoContent();\n }\n\n // For non-empty responses, validate Content-Type\n const contentType = response.headers.get(\"content-type\");\n if (contentType && !this.isJsonContentType(contentType)) {\n return createDeserializationError(\n new Error(`Expected JSON response but got ${contentType}`),\n );\n }\n\n // Parse the JSON response\n return this.parseSuccessResponse<T>(responseText);\n }\n\n /**\n * Parses successful JSON response body\n */\n private parseSuccessResponse<T>(\n responseText: string,\n ): InsurUpResult<T> | InsurUpResult {\n try {\n const data = JSON.parse(responseText) as T;\n return createSuccess(data);\n } catch (error) {\n return createDeserializationError(error);\n }\n }\n\n /**\n * Determines if a result should be retried\n */\n private shouldRetryResult(\n result: InsurUpResult<unknown> | InsurUpResult,\n ): boolean {\n if (!this.options.retry) {\n return false;\n }\n\n // Retry server errors with retryable status codes\n if (result.kind === \"server-error\") {\n return this.options.retry.retryableStatusCodes.includes(result.status);\n }\n\n // Retry client errors for network issues but not timeouts\n if (result.kind === \"client-error\") {\n return result.type === InsurUpClientErrorType.HttpRequestFailed;\n }\n\n return false;\n }\n\n /**\n * Logs outgoing request details\n */\n private logRequest(\n method: HttpMethod,\n path: string,\n body?: RequestBody,\n headers?: Record<string, string>,\n ): void {\n if (this.options.logLevel === \"none\") {\n return;\n }\n\n const url = `${this.options.baseUrl.replace(/\\/$/, \"\")}/${path.replace(/^\\//, \"\")}`;\n\n if (this.options.logLevel === \"basic\") {\n this.options.logger.info(`${method} ${url}`);\n } else if (this.options.logLevel === \"detailed\") {\n // Only compute sanitized values when detailed logging is enabled\n const sanitizedHeaders = this.sanitizeHeaders(headers);\n const sanitizedBody = this.sanitizeBody(body);\n this.options.logger.info(`Request: ${method} ${url}`, {\n headers: sanitizedHeaders,\n body: sanitizedBody,\n });\n }\n }\n\n /**\n * Logs response details\n */\n private logResponse(\n status: \"SUCCESS\" | \"ERROR\",\n duration: number,\n attempt: number,\n result: InsurUpResult<unknown> | InsurUpResult,\n ): void {\n if (this.options.logLevel === \"none\") {\n return;\n }\n\n const attemptInfo = attempt > 1 ? ` (attempt ${attempt})` : \"\";\n\n if (this.options.logLevel === \"basic\") {\n if (status === \"SUCCESS\") {\n this.options.logger.info(`${status} in ${duration}ms${attemptInfo}`);\n } else {\n this.options.logger.error(`${status} in ${duration}ms${attemptInfo}`);\n }\n } else if (this.options.logLevel === \"detailed\") {\n // Only compute sanitized values when detailed logging is enabled\n if (status === \"SUCCESS\") {\n const data =\n result.kind === \"success\" && \"data\" in result\n ? this.sanitizeResponseData(result.data)\n : undefined;\n this.options.logger.info(\n `Response: ${status} in ${duration}ms${attemptInfo}`,\n { data },\n );\n } else {\n const sanitizedError = this.sanitizeError(result);\n this.options.logger.error(\n `Response: ${status} in ${duration}ms${attemptInfo}`,\n { error: sanitizedError },\n );\n }\n }\n }\n\n /**\n * Logs retry attempt\n */\n private logRetry(\n attemptNumber: number,\n result: InsurUpResult<unknown> | InsurUpResult,\n ): void {\n if (this.options.logLevel === \"none\") {\n return;\n }\n\n const reason =\n result.kind === \"server-error\"\n ? `HTTP ${result.status}`\n : result.kind === \"client-error\"\n ? result.type\n : \"Unknown error\";\n\n this.options.logger.warn(\n `Retry attempt ${attemptNumber} failed due to: ${reason}`,\n );\n }\n\n /**\n * Sanitizes headers for logging (removes sensitive information)\n */\n private sanitizeHeaders(\n headers?: Record<string, string>,\n ): Record<string, string> | undefined {\n if (!headers) {\n return undefined;\n }\n\n const sanitized: Record<string, string> = {};\n const sensitiveHeaders = [\n \"authorization\",\n \"cookie\",\n \"x-api-key\",\n \"x-auth-token\",\n ];\n\n for (const [key, value] of Object.entries(headers)) {\n const lowerKey = key.toLowerCase();\n if (sensitiveHeaders.includes(lowerKey)) {\n sanitized[key] = \"[REDACTED]\";\n } else {\n sanitized[key] = value;\n }\n }\n\n return sanitized;\n }\n\n /**\n * Sanitizes request body for logging with memory-efficient handling\n */\n private sanitizeBody(body?: RequestBody): unknown {\n if (!body) {\n return undefined;\n }\n\n // Handle FormData\n if (body instanceof FormData) {\n return \"[FormData body]\";\n }\n\n // Handle string bodies efficiently\n if (typeof body === \"string\") {\n if (body.length > 10000) {\n return \"[Large string body - truncated for logging]\";\n }\n return body.length > 1000\n ? `${body.substring(0, 1000)}... [truncated]`\n : body;\n }\n\n // Handle primitive types\n if (typeof body === \"number\" || typeof body === \"boolean\") {\n return body;\n }\n\n // For objects/arrays, use memory-efficient serialization\n try {\n // Quick size estimation to avoid expensive stringification of large objects\n if (this.isLargeObject(body)) {\n return \"[Large object body - truncated for logging]\";\n }\n\n const stringified = JSON.stringify(body);\n return stringified.length > 1000\n ? `${stringified.substring(0, 1000)}... [truncated]`\n : body;\n } catch {\n return \"[Unable to serialize body]\";\n }\n }\n\n /**\n * Efficiently estimates if an object is large without full serialization\n */\n private isLargeObject(obj: unknown): boolean {\n if (!obj || typeof obj !== \"object\") {\n return false;\n }\n\n try {\n // Quick heuristic: count properties and nested levels\n let propertyCount = 0;\n let maxDepth = 0;\n\n const countProperties = (item: unknown, depth = 0): boolean => {\n if (depth > 3) return true; // Too deep\n if (propertyCount > 50) return true; // Too many properties\n\n maxDepth = Math.max(maxDepth, depth);\n\n if (Array.isArray(item)) {\n if (item.length > 100) return true; // Large array\n for (let i = 0; i < Math.min(item.length, 10); i++) {\n if (countProperties(item[i], depth + 1)) return true;\n }\n } else if (item && typeof item === \"object\") {\n const keys = Object.keys(item);\n propertyCount += keys.length;\n\n for (const key of keys.slice(0, 10)) {\n // Check first 10 properties\n if (\n countProperties((item as Record<string, unknown>)[key], depth + 1)\n )\n return true;\n }\n }\n\n return false;\n };\n\n return countProperties(obj);\n } catch {\n // If estimation fails, assume it might be large\n return true;\n }\n }\n\n /**\n * Sanitizes response data for logging with memory-efficient handling\n */\n private sanitizeResponseData(data: unknown): unknown {\n if (data === null || data === undefined) {\n return data;\n }\n\n try {\n // Use the same efficient large object detection\n if (this.isLargeObject(data)) {\n return \"[Large response data - truncated for logging]\";\n }\n\n const stringified = JSON.stringify(data);\n return stringified.length > 1000\n ? `${stringified.substring(0, 1000)}... [truncated]`\n : data;\n } catch {\n return \"[Unable to serialize response data]\";\n }\n }\n\n /**\n * Sanitizes error information for logging\n */\n private sanitizeError(\n result: InsurUpResult<unknown> | InsurUpResult,\n ): unknown {\n if (result.kind === \"server-error\") {\n return {\n type: result.type,\n status: result.status,\n title: result.title,\n detail: result.detail,\n traceId: result.traceId,\n };\n }\n\n if (result.kind === \"client-error\") {\n return {\n type: result.type,\n message: result.message,\n };\n }\n\n return { message: \"Unknown error type\" };\n }\n}\n","/**\n * @fileoverview GraphQL Transport Layer - Fetch-based GraphQL client\n * @description GraphQL transport with error handling and type safety\n */\n\nimport type {\n InsurUpGraphQLResult,\n GraphQLErrorItem,\n GraphQLErrorExtensions,\n GraphQLErrorLocation,\n} from \"../core/result.js\";\nimport {\n createSuccess,\n createGraphQLErrors,\n InsurUpGraphQLErrorCode,\n} from \"../core/result.js\";\nimport { createDeserializationError } from \"../core/errors.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport type { HttpTransport } from \"./http.js\";\n\n/**\n * Raw GraphQL error from the server response\n */\ninterface RawGraphQLError {\n message: string;\n locations?: Array<{ line: number; column: number }>;\n path?: (string | number)[];\n extensions?: Record<string, unknown>;\n}\n\n/**\n * GraphQL response structure\n */\nexport interface GraphQLResponse<T> {\n data?: T;\n errors?: RawGraphQLError[];\n}\n\n/**\n * GraphQL request payload\n */\nexport interface GraphQLRequest {\n query: string;\n variables?: Record<string, unknown>;\n operationName?: string;\n}\n\n/**\n * Maps a raw error code string to the InsurUpGraphQLErrorCode enum\n */\nfunction mapGraphQLErrorCode(code: unknown): InsurUpGraphQLErrorCode {\n if (typeof code !== \"string\") {\n return InsurUpGraphQLErrorCode.Unknown;\n }\n\n const upperCode = code.toUpperCase();\n\n switch (upperCode) {\n case \"FORBIDDEN\":\n return InsurUpGraphQLErrorCode.Forbidden;\n case \"UNAUTHORIZED\":\n return InsurUpGraphQLErrorCode.Unauthorized;\n case \"NOT_FOUND\":\n return InsurUpGraphQLErrorCode.NotFound;\n case \"BAD_REQUEST\":\n return InsurUpGraphQLErrorCode.BadRequest;\n case \"CONFLICT\":\n return InsurUpGraphQLErrorCode.Conflict;\n case \"NOT_SUPPORTED\":\n return InsurUpGraphQLErrorCode.NotSupported;\n case \"UPSTREAM_ERROR\":\n return InsurUpGraphQLErrorCode.UpstreamError;\n case \"INTERNAL_ERROR\":\n return InsurUpGraphQLErrorCode.InternalError;\n case \"VALIDATION_ERROR\":\n return InsurUpGraphQLErrorCode.ValidationError;\n case \"FILTER_REQUIRED\":\n return InsurUpGraphQLErrorCode.FilterRequired;\n case \"FILTER_MAX_SPAN_EXCEEDED\":\n return InsurUpGraphQLErrorCode.FilterMaxSpanExceeded;\n default:\n return InsurUpGraphQLErrorCode.Unknown;\n }\n}\n\n/**\n * Parses raw extensions into typed GraphQLErrorExtensions\n */\nfunction parseExtensions(\n raw: Record<string, unknown> | undefined,\n): GraphQLErrorExtensions | undefined {\n if (!raw) {\n return undefined;\n }\n\n const extensions: GraphQLErrorExtensions = {\n ...raw,\n code: mapGraphQLErrorCode(raw.code),\n traceId: typeof raw.traceId === \"string\" ? raw.traceId : undefined,\n codes: Array.isArray(raw.codes)\n ? (raw.codes.filter((c) => typeof c === \"string\") as string[])\n : undefined,\n template: typeof raw.template === \"string\" ? raw.template : undefined,\n templateArgs:\n typeof raw.templateArgs === \"object\" && raw.templateArgs !== null\n ? (raw.templateArgs as Record<string, unknown>)\n : undefined,\n suggestions: Array.isArray(raw.suggestions)\n ? (raw.suggestions.filter((s) => typeof s === \"string\") as string[])\n : undefined,\n };\n\n return extensions;\n}\n\n/**\n * Parses raw GraphQL errors into typed GraphQLErrorItem array\n */\nfunction parseGraphQLErrors(rawErrors: RawGraphQLError[]): GraphQLErrorItem[] {\n return rawErrors.map((error): GraphQLErrorItem => {\n const locations: GraphQLErrorLocation[] | undefined = error.locations?.map(\n (loc) => ({\n line: loc.line,\n column: loc.column,\n }),\n );\n\n return {\n message: error.message,\n locations,\n path: error.path,\n extensions: parseExtensions(error.extensions),\n };\n });\n}\n\n/**\n * GraphQL transport class providing typed query execution\n */\nexport class GraphQLTransport {\n constructor(private readonly http: HttpTransport) {}\n\n /**\n * Executes a GraphQL query or mutation\n * @param query The GraphQL query string\n * @param variables Optional variables for the query\n * @param options Optional request options\n * @returns Promise resolving to InsurUpGraphQLResult<T>\n */\n async query<T>(\n query: string,\n variables?: Record<string, unknown>,\n options?: RequestOptions,\n ): Promise<InsurUpGraphQLResult<T>> {\n const payload: GraphQLRequest = {\n query,\n variables,\n };\n\n // Use the existing HTTP transport to send the POST request\n const result = await this.http.post<GraphQLResponse<T>>(\n \"graphql\",\n payload,\n options,\n );\n\n // Handle transport-level errors (network, timeout, etc.)\n if (!result.isSuccess) {\n // Pass through both server errors and client errors\n return result as InsurUpGraphQLResult<T>;\n }\n\n const response = result.data;\n\n // Handle GraphQL-level errors\n if (response.errors && response.errors.length > 0) {\n const parsedErrors = parseGraphQLErrors(response.errors);\n return createGraphQLErrors(parsedErrors) as InsurUpGraphQLResult<T>;\n }\n\n // If no data and no errors, something is wrong with the response\n if (!response.data) {\n return createDeserializationError(\n new Error(\"GraphQL response contained no data and no errors\"),\n ) as InsurUpGraphQLResult<T>;\n }\n\n return createSuccess(response.data) as InsurUpGraphQLResult<T>;\n }\n}\n","/**\n * @fileoverview InsurUp API Endpoints - API endpoint definitions\n * @description API endpoint definitions with identical names and render functions\n */\n\n/**\n * Contact form endpoints\n */\nexport const contactForm = {\n submit: \"contact-form\",\n} as const;\n\n/**\n * Agent management endpoints\n */\nexport const agents = {\n getCurrentAgent: \"agents/me\",\n updateCurrentAgent: \"agents/me\",\n reSyncCurrentAgentWithInsurance: \"agents/me/re-sync\",\n\n insuranceCompanies: {\n getMyInsuranceCompanies: \"agents/me/insurance-companies\",\n addInsuranceCompanyToAgent: \"agents/me/insurance-companies\",\n\n getBranches: {\n definition:\n \"agents/me/insurance-companies/{AgentInsuranceCompanyId}/branches\",\n render: (agentInsuranceCompanyId: string): string =>\n \"agents/me/insurance-companies/{AgentInsuranceCompanyId}/branches\".replace(\n \"{AgentInsuranceCompanyId}\",\n encodeURIComponent(agentInsuranceCompanyId),\n ),\n },\n\n getConnection: {\n definition:\n \"agents/me/insurance-companies/{AgentInsuranceCompanyId}/connection\",\n render: (agentInsuranceCompanyId: string): string =>\n \"agents/me/insurance-companies/{AgentInsuranceCompanyId}/connection\".replace(\n \"{AgentInsuranceCompanyId}\",\n encodeURIComponent(agentInsuranceCompanyId),\n ),\n },\n\n updateConnection: {\n definition:\n \"agents/me/insurance-companies/{AgentInsuranceCompanyId}/connection\",\n render: (agentInsuranceCompanyId: string): string =>\n \"agents/me/insurance-companies/{AgentInsuranceCompanyId}/connection\".replace(\n \"{AgentInsuranceCompanyId}\",\n encodeURIComponent(agentInsuranceCompanyId),\n ),\n },\n\n updateBranches: {\n definition:\n \"agents/me/insurance-companies/{AgentInsuranceCompanyId}/branches\",\n render: (agentInsuranceCompanyId: string): string =>\n \"agents/me/insurance-companies/{AgentInsuranceCompanyId}/branches\".replace(\n \"{AgentInsuranceCompanyId}\",\n encodeURIComponent(agentInsuranceCompanyId),\n ),\n },\n\n reSyncAgentInsuranceCompanyWithInsurance: {\n definition:\n \"agents/me/insurance-companies/{AgentInsuranceCompanyId}/re-sync\",\n render: (agentInsuranceCompanyId: string): string =>\n \"agents/me/insurance-companies/{AgentInsuranceCompanyId}/re-sync\".replace(\n \"{AgentInsuranceCompanyId}\",\n encodeURIComponent(agentInsuranceCompanyId),\n ),\n },\n\n remove: {\n definition: \"agents/me/insurance-companies/{AgentInsuranceCompanyId}\",\n render: (agentInsuranceCompanyId: string): string =>\n \"agents/me/insurance-companies/{AgentInsuranceCompanyId}\".replace(\n \"{AgentInsuranceCompanyId}\",\n encodeURIComponent(agentInsuranceCompanyId),\n ),\n },\n },\n} as const;\n\n/**\n * Insurance company endpoints\n */\nexport const insuranceCompanies = {\n getInsuranceCompanies: \"insurance-companies\",\n\n getInsuranceCompanyProducts: {\n definition: \"insurance-companies/{InsuranceCompanyId}/products\",\n render: (insuranceCompanyId: number): string =>\n \"insurance-companies/{InsuranceCompanyId}/products\".replace(\n \"{InsuranceCompanyId}\",\n encodeURIComponent(insuranceCompanyId.toString()),\n ),\n },\n\n getAllProducts: \"insurance-companies/products\",\n\n connectionFields: {\n getAgentBasedConnectionFieldsByCompanyId: {\n definition:\n \"insurance-companies/{InsuranceCompanyId}/connection-fields:agent-based\",\n render: (insuranceCompanyId: number): string =>\n \"insurance-companies/{InsuranceCompanyId}/connection-fields:agent-based\".replace(\n \"{InsuranceCompanyId}\",\n encodeURIComponent(insuranceCompanyId.toString()),\n ),\n },\n },\n} as const;\n\n/**\n * Resource keys endpoints\n */\nexport const resourceKeys = {\n getAll: \"resource-keys\",\n} as const;\n\n/**\n * Customer management endpoints\n */\nexport const customers = {\n createCustomer: \"customers\",\n getCurrentCustomer: \"customers/me\",\n externalLookup: \"customers/external-lookup\",\n\n setCustomerRepresentative: {\n definition: \"customers/{CustomerId}/representative\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/representative\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n\n getCustomer: {\n definition: \"customers/{CustomerId}\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n\n updateCustomer: {\n definition: \"customers/{CustomerId}\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n\n deleteCustomer: {\n definition: \"customers/{CustomerId}\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n\n getHealthInfo: {\n definition: \"customers/{CustomerId}/health-info\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/health-info\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n\n updateHealthInfo: {\n definition: \"customers/{CustomerId}/health-info\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/health-info\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n\n emails: {\n addCustomerEmail: {\n definition: \"customers/{CustomerId}/emails\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/emails\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n\n removeCustomerEmail: {\n definition: \"customers/{CustomerId}/emails/{Email}\",\n render: (request: { customerId: string; email: string }): string =>\n \"customers/{CustomerId}/emails/{Email}\"\n .replace(\"{CustomerId}\", encodeURIComponent(request.customerId))\n .replace(\"{Email}\", encodeURIComponent(request.email)),\n },\n\n changePrimaryCustomerEmail: {\n definition: \"customers/{CustomerId}/emails/{Email}/primary\",\n render: (request: { customerId: string; email: string }): string =>\n \"customers/{CustomerId}/emails/{Email}/primary\"\n .replace(\"{CustomerId}\", encodeURIComponent(request.customerId))\n .replace(\"{Email}\", encodeURIComponent(request.email)),\n },\n\n getCustomerEmails: {\n definition: \"customers/{CustomerId}/emails\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/emails\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n },\n\n phoneNumbers: {\n addCustomerPhoneNumber: {\n definition: \"customers/{CustomerId}/phone-numbers\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/phone-numbers\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n\n removeCustomerPhoneNumber: {\n definition:\n \"customers/{CustomerId}/phone-numbers/{CountryCode}-{PhoneNumber}\",\n render: (request: {\n customerId: string;\n countryCode: number;\n phoneNumber: string;\n }): string =>\n \"customers/{CustomerId}/phone-numbers/{CountryCode}-{PhoneNumber}\"\n .replace(\"{CustomerId}\", encodeURIComponent(request.customerId))\n .replace(\n \"{CountryCode}\",\n encodeURIComponent(request.countryCode.toString()),\n )\n .replace(\"{PhoneNumber}\", encodeURIComponent(request.phoneNumber)),\n },\n\n changePrimaryCustomerPhoneNumber: {\n definition:\n \"customers/{CustomerId}/phone-numbers/{CountryCode}-{PhoneNumber}/primary\",\n render: (request: {\n customerId: string;\n countryCode: number;\n phoneNumber: string;\n }): string =>\n \"customers/{CustomerId}/phone-numbers/{CountryCode}-{PhoneNumber}/primary\"\n .replace(\"{CustomerId}\", encodeURIComponent(request.customerId))\n .replace(\n \"{CountryCode}\",\n encodeURIComponent(request.countryCode.toString()),\n )\n .replace(\"{PhoneNumber}\", encodeURIComponent(request.phoneNumber)),\n },\n\n getCustomerPhoneNumbers: {\n definition: \"customers/{CustomerId}/phone-numbers\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/phone-numbers\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n },\n\n contactFlows: {\n getCustomerContactFlows: {\n definition: \"customers/{CustomerId}/contact-flows\",\n render: (customerId: string, caseRef?: string | null): string => {\n const base = \"customers/{CustomerId}/contact-flows\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n );\n return caseRef\n ? base + \"?caseRef=\" + encodeURIComponent(caseRef)\n : base;\n },\n },\n\n createContactFlow: {\n definition: \"customers/{CustomerId}/contact-flows\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/contact-flows\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n\n endContactFlow: {\n definition: \"customers/{CustomerId}/contact-flows/{ContactFlowId}/end\",\n render: (customerId: string, contactFlowId: string): string =>\n \"customers/{CustomerId}/contact-flows/{ContactFlowId}/end\"\n .replace(\"{CustomerId}\", encodeURIComponent(customerId))\n .replace(\"{ContactFlowId}\", encodeURIComponent(contactFlowId)),\n },\n },\n\n contacts: {\n getCustomerContacts: {\n definition: \"customers/{CustomerId}/contacts\",\n render: (customerId: string, caseRef?: string | null): string => {\n const base = \"customers/{CustomerId}/contacts\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n );\n return caseRef\n ? base + \"?caseRef=\" + encodeURIComponent(caseRef)\n : base;\n },\n },\n\n create: {\n definition: \"customers/{CustomerId}/contacts\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/contacts\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n },\n\n setCustomerBranch: {\n definition: \"customers/{CustomerId}/branch\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/branch\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n\n addresses: {\n create: {\n definition: \"customers/{CustomerId}/addresses\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/addresses\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n update: {\n definition: \"customers/{CustomerId}/addresses/{AddressId}\",\n render: (customerId: string, addressId: string): string =>\n \"customers/{CustomerId}/addresses/{AddressId}\"\n .replace(\"{CustomerId}\", encodeURIComponent(customerId))\n .replace(\"{AddressId}\", encodeURIComponent(addressId)),\n },\n getById: {\n definition: \"customers/{CustomerId}/addresses/{AddressId}\",\n render: (customerId: string, addressId: string): string =>\n \"customers/{CustomerId}/addresses/{AddressId}\"\n .replace(\"{CustomerId}\", encodeURIComponent(customerId))\n .replace(\"{AddressId}\", encodeURIComponent(addressId)),\n },\n getAll: {\n definition: \"customers/{CustomerId}/addresses\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/addresses\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n delete: {\n definition: \"customers/{CustomerId}/addresses/{AddressId}\",\n render: (customerId: string, addressId: string): string =>\n \"customers/{CustomerId}/addresses/{AddressId}\"\n .replace(\"{CustomerId}\", encodeURIComponent(customerId))\n .replace(\"{AddressId}\", encodeURIComponent(addressId)),\n },\n },\n\n consents: {\n give: {\n definition: \"customers/{CustomerId}/consents\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/consents\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n revoke: {\n definition: \"customers/{CustomerId}/consents/revoke\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/consents/revoke\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n getAll: {\n definition: \"customers/{CustomerId}/consents\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/consents\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n },\n} as const;\n\n/**\n * Address parameter endpoints\n */\nexport const addressParameters = {\n queryCities: \"address-parameters/cities\",\n\n queryDistricts: {\n definition: \"address-parameters/districts\",\n render: (request: { cityReference: string }): string =>\n \"address-parameters/districts?cityReference={cityReference}\".replace(\n \"{cityReference}\",\n request.cityReference,\n ),\n },\n\n queryTowns: {\n definition: \"address-parameters/towns\",\n render: (request: { districtReference: string }): string =>\n \"address-parameters/towns?districtReference={districtReference}\".replace(\n \"{districtReference}\",\n request.districtReference,\n ),\n },\n\n queryNeighbourhoods: {\n definition: \"address-parameters/neighbourhoods\",\n render: (request: { townReference: string }): string =>\n \"address-parameters/neighbourhoods?townReference={townReference}\".replace(\n \"{townReference}\",\n request.townReference,\n ),\n },\n\n queryStreets: {\n definition: \"address-parameters/streets\",\n render: (request: { neighbourhoodReference: string }): string =>\n \"address-parameters/streets?neighbourhoodReference={neighbourhoodReference}\".replace(\n \"{neighbourhoodReference}\",\n request.neighbourhoodReference,\n ),\n },\n\n queryBuildings: {\n definition: \"address-parameters/buildings\",\n render: (request: { streetReference: string }): string =>\n \"address-parameters/buildings?streetReference={streetReference}\".replace(\n \"{streetReference}\",\n request.streetReference,\n ),\n },\n\n queryApartments: {\n definition: \"address-parameters/apartments\",\n render: (request: { buildingReference: string }): string =>\n \"address-parameters/apartments?buildingReference={buildingReference}\".replace(\n \"{buildingReference}\",\n request.buildingReference,\n ),\n },\n} as const;\n\n/**\n * Vehicle parameter endpoints\n */\nexport const vehicleParameters = {\n queryBrands: \"vehicle-parameters/brands\",\n\n queryModels: {\n definition: \"vehicle-parameters/models\",\n render: (request: { brandReference: string; year: number }): string =>\n \"vehicle-parameters/models?brandReference={brandReference}&year={year}\"\n .replace(\"{brandReference}\", encodeURIComponent(request.brandReference))\n .replace(\"{year}\", encodeURIComponent(request.year.toString())),\n },\n} as const;\n\n/**\n * Vehicle endpoints\n */\nexport const vehicles = {\n getCurrentCustomerVehicles: \"customers/me/vehicles\",\n\n externalLookup: {\n definition: \"customers/{CustomerId}/vehicles/external-lookup\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/vehicles/external-lookup\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n\n create: {\n definition: \"customers/{CustomerId}/vehicles\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/vehicles\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n\n update: {\n definition: \"customers/{CustomerId}/vehicles/{VehicleId}\",\n render: (customerId: string, vehicleId: string): string =>\n \"customers/{CustomerId}/vehicles/{VehicleId}\"\n .replace(\"{CustomerId}\", encodeURIComponent(customerId))\n .replace(\"{VehicleId}\", encodeURIComponent(vehicleId)),\n },\n\n delete: {\n definition: \"customers/{CustomerId}/vehicles/{VehicleId}\",\n render: (customerId: string, vehicleId: string): string =>\n \"customers/{CustomerId}/vehicles/{VehicleId}\"\n .replace(\"{CustomerId}\", encodeURIComponent(customerId))\n .replace(\"{VehicleId}\", encodeURIComponent(vehicleId)),\n },\n\n get: {\n definition: \"customers/{CustomerId}/vehicles/{VehicleId}\",\n render: (customerId: string, vehicleId: string): string =>\n \"customers/{CustomerId}/vehicles/{VehicleId}\"\n .replace(\"{CustomerId}\", encodeURIComponent(customerId))\n .replace(\"{VehicleId}\", encodeURIComponent(vehicleId)),\n },\n\n getCustomerVehicles: {\n definition: \"customers/{CustomerId}/vehicles\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/vehicles\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n} as const;\n\n/**\n * Insurance services endpoints\n */\nexport const insuranceServices = {\n queryVehicleByBrandCode: \"insurance-services/query-vehicle-by-brand-code\",\n} as const;\n\n/**\n * Property endpoints\n */\nexport const properties = {\n getPropertyAddressByPropertyNumber:\n \"properties/query-address-by-property-number\",\n queryPropertyByDaskOldPolicy: \"properties/query-property-by-dask-old-policy\",\n getCurrentCustomerProperties: \"customers/me/properties\",\n\n getAll: {\n definition: \"customers/{CustomerId}/properties\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/properties\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n\n create: {\n definition: \"customers/{CustomerId}/properties\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/properties\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n\n getById: {\n definition: \"customers/{CustomerId}/properties/{PropertyId}\",\n render: (customerId: string, propertyId: string): string =>\n \"customers/{CustomerId}/properties/{PropertyId}\"\n .replace(\"{CustomerId}\", encodeURIComponent(customerId))\n .replace(\"{PropertyId}\", encodeURIComponent(propertyId)),\n },\n\n update: {\n definition: \"customers/{CustomerId}/properties/{PropertyId}\",\n render: (customerId: string, propertyId: string): string =>\n \"customers/{CustomerId}/properties/{PropertyId}\"\n .replace(\"{CustomerId}\", encodeURIComponent(customerId))\n .replace(\"{PropertyId}\", encodeURIComponent(propertyId)),\n },\n\n delete: {\n definition: \"customers/{CustomerId}/properties/{PropertyId}\",\n render: (customerId: string, propertyId: string): string =>\n \"customers/{CustomerId}/properties/{PropertyId}\"\n .replace(\"{CustomerId}\", encodeURIComponent(customerId))\n .replace(\"{PropertyId}\", encodeURIComponent(propertyId)),\n },\n} as const;\n\n/**\n * Proposal endpoints\n */\nexport const proposals = {\n create: \"proposals\",\n\n getProposalById: {\n definition: \"proposals/{ProposalId}\",\n render: (proposalId: string): string =>\n \"proposals/{ProposalId}\".replace(\n \"{ProposalId}\",\n encodeURIComponent(proposalId),\n ),\n },\n\n getProposalSnapshot: {\n definition: \"proposals/{ProposalId}/snapshot\",\n render: (proposalId: string): string =>\n \"proposals/{ProposalId}/snapshot\".replace(\n \"{ProposalId}\",\n encodeURIComponent(proposalId),\n ),\n },\n\n getProposalCoverage: {\n definition: \"proposals/{ProposalId}/coverage\",\n render: (proposalId: string): string =>\n \"proposals/{ProposalId}/coverage\".replace(\n \"{ProposalId}\",\n encodeURIComponent(proposalId),\n ),\n },\n\n getProposalProductCoverage: {\n definition: \"proposals/{ProposalId}/products/{ProposalProductId}/coverage\",\n render: (proposalId: string, proposalProductId: string): string =>\n \"proposals/{ProposalId}/products/{ProposalProductId}/coverage\"\n .replace(\"{ProposalId}\", encodeURIComponent(proposalId))\n .replace(\"{ProposalProductId}\", encodeURIComponent(proposalProductId)),\n },\n\n retryFailedProposalProduct: {\n definition: \"proposals/{ProposalId}/products/{ProposalProductId}/retry\",\n render: (proposalId: string, proposalProductId: string): string =>\n \"proposals/{ProposalId}/products/{ProposalProductId}/retry\"\n .replace(\"{ProposalId}\", encodeURIComponent(proposalId))\n .replace(\"{ProposalProductId}\", encodeURIComponent(proposalProductId)),\n },\n\n getProposalProductPremiumDetail: {\n definition:\n \"proposals/{ProposalId}/products/{ProposalProductId}/premium-detail/{InstallmentNumber}\",\n render: (\n proposalId: string,\n proposalProductId: string,\n installmentNumber: number,\n ): string =>\n \"proposals/{ProposalId}/products/{ProposalProductId}/premium-detail/{InstallmentNumber}\"\n .replace(\"{ProposalId}\", encodeURIComponent(proposalId))\n .replace(\"{ProposalProductId}\", encodeURIComponent(proposalProductId))\n .replace(\n \"{InstallmentNumber}\",\n encodeURIComponent(installmentNumber.toString()),\n ),\n },\n\n purchaseProposalProductSync: {\n definition:\n \"proposals/{ProposalId}/products/{ProposalProductId}/purchase/sync\",\n render: (proposalId: string, proposalProductId: string): string =>\n \"proposals/{ProposalId}/products/{ProposalProductId}/purchase/sync\"\n .replace(\"{ProposalId}\", encodeURIComponent(proposalId))\n .replace(\"{ProposalProductId}\", encodeURIComponent(proposalProductId)),\n },\n\n purchaseProposalProductAsync: {\n definition:\n \"proposals/{ProposalId}/products/{ProposalProductId}/purchase/async\",\n render: (proposalId: string, proposalProductId: string): string =>\n \"proposals/{ProposalId}/products/{ProposalProductId}/purchase/async\"\n .replace(\"{ProposalId}\", encodeURIComponent(proposalId))\n .replace(\"{ProposalProductId}\", encodeURIComponent(proposalProductId)),\n },\n\n reviseProposal: {\n definition: \"proposals/{ProposalId}/revise\",\n render: (proposalId: string): string =>\n \"proposals/{ProposalId}/revise\".replace(\n \"{ProposalId}\",\n encodeURIComponent(proposalId),\n ),\n },\n\n reviseProposalProduct: {\n definition: \"proposals/{ProposalId}/products/{ProposalProductId}/revise\",\n render: (proposalId: string, proposalProductId: string): string =>\n \"proposals/{ProposalId}/products/{ProposalProductId}/revise\"\n .replace(\"{ProposalId}\", encodeURIComponent(proposalId))\n .replace(\"{ProposalProductId}\", encodeURIComponent(proposalProductId)),\n },\n\n fetchProposalProductDocument: {\n definition: \"proposals/{ProposalId}/products/{ProposalProductId}/document\",\n render: (proposalId: string, proposalProductId: string): string =>\n \"proposals/{ProposalId}/products/{ProposalProductId}/document\"\n .replace(\"{ProposalId}\", encodeURIComponent(proposalId))\n .replace(\"{ProposalProductId}\", encodeURIComponent(proposalProductId)),\n },\n\n fetchProposalInformationFormDocument: {\n definition:\n \"proposals/{ProposalId}/products/{ProposalProductId}/information-form\",\n render: (proposalId: string, proposalProductId: string): string =>\n \"proposals/{ProposalId}/products/{ProposalProductId}/information-form\"\n .replace(\"{ProposalId}\", encodeURIComponent(proposalId))\n .replace(\"{ProposalProductId}\", encodeURIComponent(proposalProductId)),\n },\n\n sendProposalProductDocument: {\n definition:\n \"proposals/{ProposalId}/products/{ProposalProductId}/document/send\",\n render: (proposalId: string, proposalProductId: string): string =>\n \"proposals/{ProposalId}/products/{ProposalProductId}/document/send\"\n .replace(\"{ProposalId}\", encodeURIComponent(proposalId))\n .replace(\"{ProposalProductId}\", encodeURIComponent(proposalProductId)),\n },\n\n sendProposalInformationFormDocument: {\n definition:\n \"proposals/{ProposalId}/products/{ProposalProductId}/information-form/send\",\n render: (proposalId: string, proposalProductId: string): string =>\n \"proposals/{ProposalId}/products/{ProposalProductId}/information-form/send\"\n .replace(\"{ProposalId}\", encodeURIComponent(proposalId))\n .replace(\"{ProposalProductId}\", encodeURIComponent(proposalProductId)),\n },\n\n generateCompareProposalProductsPdf: {\n definition: \"proposals/{ProposalId}/products/compare-pdf\",\n render: (proposalId: string): string =>\n \"proposals/{ProposalId}/products/compare-pdf\".replace(\n \"{ProposalId}\",\n encodeURIComponent(proposalId),\n ),\n },\n\n sendCompareProposalProductsPdf: {\n definition: \"proposals/{ProposalId}/products/compare-pdf/send\",\n render: (proposalId: string): string =>\n \"proposals/{ProposalId}/products/compare-pdf/send\".replace(\n \"{ProposalId}\",\n encodeURIComponent(proposalId),\n ),\n },\n\n setProposalRepresentative: {\n definition: \"proposals/{ProposalId}/representative\",\n render: (proposalId: string): string =>\n \"proposals/{ProposalId}/representative\".replace(\n \"{ProposalId}\",\n encodeURIComponent(proposalId),\n ),\n },\n\n setProposalBranch: {\n definition: \"proposals/{ProposalId}/branch\",\n render: (proposalId: string): string =>\n \"proposals/{ProposalId}/branch\".replace(\n \"{ProposalId}\",\n encodeURIComponent(proposalId),\n ),\n },\n\n generateCustomerProposalDocumentPdf: {\n definition: \"proposals/{ProposalId}/customer-document-pdf\",\n render: (proposalId: string): string =>\n \"proposals/{ProposalId}/customer-document-pdf\".replace(\n \"{ProposalId}\",\n encodeURIComponent(proposalId),\n ),\n },\n\n getProposalConversionTrend: {\n definition: \"proposals/analytics/conversion-trend\",\n },\n} as const;\n\n/**\n * Policy endpoints\n */\nexport const policies = {\n getPolicyDetail: {\n definition: \"policies/{PolicyId}\",\n render: (policyId: string): string =>\n \"policies/{PolicyId}\".replace(\"{PolicyId}\", encodeURIComponent(policyId)),\n },\n\n fetchPolicyDocument: {\n definition: \"policies/{PolicyId}/document\",\n render: (policyId: string): string =>\n \"policies/{PolicyId}/document\".replace(\n \"{PolicyId}\",\n encodeURIComponent(policyId),\n ),\n },\n\n sendPolicyDocument: {\n definition: \"policies/{PolicyId}/document/send\",\n render: (policyId: string): string =>\n \"policies/{PolicyId}/document/send\".replace(\n \"{PolicyId}\",\n encodeURIComponent(policyId),\n ),\n },\n\n setPolicyRepresentative: {\n definition: \"policies/{PolicyId}/representative\",\n render: (policyId: string): string =>\n \"policies/{PolicyId}/representative\".replace(\n \"{PolicyId}\",\n encodeURIComponent(policyId),\n ),\n },\n\n setPolicyBranch: {\n definition: \"policies/{PolicyId}/branch\",\n render: (policyId: string): string =>\n \"policies/{PolicyId}/branch\".replace(\n \"{PolicyId}\",\n encodeURIComponent(policyId),\n ),\n },\n\n createManualPolicy: {\n definition: \"policies/manual\",\n },\n\n updateManualPolicy: {\n definition: \"policies/manual/{PolicyId}\",\n render: (policyId: string): string =>\n \"policies/manual/{PolicyId}\".replace(\n \"{PolicyId}\",\n encodeURIComponent(policyId),\n ),\n },\n\n getPolicyCountAndPremiumAnalytics: {\n definition: \"policies/analytics/count-and-premium\",\n },\n\n getPolicyRenewalAnalytics: {\n definition: \"policies/analytics/renewal\",\n },\n\n getPolicyDistributionByBranch: {\n definition: \"policies/analytics/distribution-by-branch\",\n },\n\n getRepresentativeEarningsAnalytics: {\n definition: \"policies/analytics/representative-earnings\",\n },\n} as const;\n\n/**\n * Policy transfer endpoints\n */\nexport const policyTransfers = {\n create: \"policy-transfers\",\n\n getPolicyTransferDetail: {\n definition: \"policy-transfers/{PolicyTransferId}\",\n render: (policyTransferId: string): string =>\n \"policy-transfers/{PolicyTransferId}\".replace(\n \"{PolicyTransferId}\",\n encodeURIComponent(policyTransferId),\n ),\n },\n\n getPolicyTransferTriggerDetail: {\n definition:\n \"policy-transfers/{PolicyTransferId}/triggers/{PolicyTransferTriggerId}\",\n render: (\n policyTransferId: string,\n policyTransferTriggerId: string,\n ): string =>\n \"policy-transfers/{PolicyTransferId}/triggers/{PolicyTransferTriggerId}\"\n .replace(\"{PolicyTransferId}\", encodeURIComponent(policyTransferId))\n .replace(\n \"{PolicyTransferTriggerId}\",\n encodeURIComponent(policyTransferTriggerId),\n ),\n },\n\n triggerPolicyTransfer: {\n definition: \"policy-transfers/{PolicyTransferId}/trigger\",\n render: (policyTransferId: string): string =>\n \"policy-transfers/{PolicyTransferId}/trigger\".replace(\n \"{PolicyTransferId}\",\n encodeURIComponent(policyTransferId),\n ),\n },\n} as const;\n\n/**\n * File policy transfer endpoints\n */\nexport const filePolicyTransfers = {\n create: \"file-policy-transfers\",\n\n getFilePolicyTransferDetail: {\n definition: \"file-policy-transfers/{FilePolicyTransferId}\",\n render: (filePolicyTransferId: string): string =>\n \"file-policy-transfers/{FilePolicyTransferId}\".replace(\n \"{FilePolicyTransferId}\",\n encodeURIComponent(filePolicyTransferId),\n ),\n },\n} as const;\n\n/**\n * Coverage choice endpoints\n */\nexport const coverageChoices = {\n getKaskoCoverageChoices: {\n definition: \"coverage-choices:kasko\",\n render: (vehicleUtilizationStyle?: string): string =>\n vehicleUtilizationStyle !== undefined\n ? \"coverage-choices:kasko?vehicleUtilizationStyle={vehicleUtilizationStyle}\".replace(\n \"{vehicleUtilizationStyle}\",\n encodeURIComponent(vehicleUtilizationStyle),\n )\n : \"coverage-choices:kasko\",\n },\n\n getKonutCoverageChoices: {\n definition: \"coverage-choices:konut\",\n render: (): string => \"coverage-choices:konut\",\n },\n\n getImmCoverageChoices: {\n definition: \"coverage-choices:imm\",\n render: (): string => \"coverage-choices:imm\",\n },\n\n getTssCoverageChoices: {\n definition: \"coverage-choices:tss\",\n render: (): string => \"coverage-choices:tss\",\n },\n} as const;\n\n/**\n * Agent setup request endpoints\n */\nexport const agentSetupRequests = {\n complete: \"agent-setup-requests/complete\",\n create: \"agent-setup-requests\",\n getAll: \"agent-setup-requests\",\n enter: \"agent-setup-requests/enter\",\n\n getAgentSetupRequestById: {\n definition: \"agent-setup-requests/{Id}\",\n render: (id: string): string =>\n \"agent-setup-requests/{Id}\".replace(\"{Id}\", encodeURIComponent(id)),\n },\n\n disableAgentSetupRequest: {\n definition: \"agent-setup-requests/{Id}/disable\",\n render: (id: string): string =>\n \"agent-setup-requests/{Id}/disable\".replace(\n \"{Id}\",\n encodeURIComponent(id),\n ),\n },\n} as const;\n\n/**\n * Agent user endpoints\n */\nexport const agentUsers = {\n forgotPassword: \"agent-users/forgot-password\",\n resetPassword: \"agent-users/reset-password\",\n checkAgentUserForgotPasswordToken: \"agent-users/check-forgot-password-token\",\n me: \"agent-users/me\",\n meRobotCode: \"agent-users/me/robot-code\",\n invite: \"agent-users/invite\",\n updateMyUser: \"agent-users/me\",\n acceptInvite: \"agent-users/accept-invite\",\n updatePassword: \"agent-users/me/password\",\n\n reSendInvite: {\n definition: \"agent-users/{AgentUserId}/re-send-invite\",\n render: (userId: string): string =>\n \"agent-users/{AgentUserId}/re-send-invite\".replace(\n \"{AgentUserId}\",\n encodeURIComponent(userId),\n ),\n },\n\n deactivate: {\n definition: \"agent-users/{AgentUserId}/deactivate\",\n render: (userId: string): string =>\n \"agent-users/{AgentUserId}/deactivate\".replace(\n \"{AgentUserId}\",\n encodeURIComponent(userId),\n ),\n },\n\n activate: {\n definition: \"agent-users/{AgentUserId}/activate\",\n render: (userId: string): string =>\n \"agent-users/{AgentUserId}/activate\".replace(\n \"{AgentUserId}\",\n encodeURIComponent(userId),\n ),\n },\n\n delete: {\n definition: \"agent-users/{UserId}\",\n render: (userId: string): string =>\n \"agent-users/{UserId}\".replace(\"{UserId}\", encodeURIComponent(userId)),\n },\n\n getById: {\n definition: \"agent-users/{UserId}\",\n render: (userId: string): string =>\n \"agent-users/{UserId}\".replace(\"{UserId}\", encodeURIComponent(userId)),\n },\n\n checkAgentUserInviteCode: {\n definition: \"agent-users/check-invite-code\",\n render: (code: string): string =>\n \"agent-users/check-invite-code?code={code}\".replace(\n \"{code}\",\n encodeURIComponent(code),\n ),\n },\n\n update: {\n definition: \"agent-users/{Id}\",\n render: (userId: string): string =>\n \"agent-users/{Id}\".replace(\"{Id}\", encodeURIComponent(userId)),\n },\n\n migrate: {\n definition: \"agent-users/{AgentUserId}/migrate\",\n render: (agentUserId: string): string =>\n \"agent-users/{AgentUserId}/migrate\".replace(\n \"{AgentUserId}\",\n encodeURIComponent(agentUserId),\n ),\n },\n\n migrateAll: \"agent-users/migrate-all\",\n} as const;\n\n/**\n * Agent role endpoints\n */\nexport const agentRoles = {\n getAll: \"agent-roles\",\n create: \"agent-roles\",\n\n update: {\n definition: \"agent-roles/{Id}\",\n render: (agentRoleId: string): string =>\n \"agent-roles/{Id}\".replace(\"{Id}\", encodeURIComponent(agentRoleId)),\n },\n\n delete: {\n definition: \"agent-roles/{Id}\",\n render: (agentRoleId: string): string =>\n \"agent-roles/{Id}\".replace(\"{Id}\", encodeURIComponent(agentRoleId)),\n },\n\n getById: {\n definition: \"agent-roles/{Id}\",\n render: (agentRoleId: string): string =>\n \"agent-roles/{Id}\".replace(\"{Id}\", encodeURIComponent(agentRoleId)),\n },\n} as const;\n\n/**\n * Webhook endpoints\n */\nexport const webhooks = {\n getAll: \"webhooks\",\n create: \"webhooks\",\n\n getById: {\n definition: \"webhooks/{Id}\",\n render: (id: string): string =>\n \"webhooks/{Id}\".replace(\"{Id}\", encodeURIComponent(id)),\n },\n\n update: {\n definition: \"webhooks/{Id}\",\n render: (id: string): string =>\n \"webhooks/{Id}\".replace(\"{Id}\", encodeURIComponent(id)),\n },\n\n delete: {\n definition: \"webhooks/{Id}\",\n render: (id: string): string =>\n \"webhooks/{Id}\".replace(\"{Id}\", encodeURIComponent(id)),\n },\n\n deliveries: {\n getById: {\n definition: \"webhooks/{WebhookId}/deliveries/{WebhookDeliveryId}\",\n render: (webhookId: string, webhookDeliveryId: string): string =>\n \"webhooks/{WebhookId}/deliveries/{WebhookDeliveryId}\"\n .replace(\"{WebhookId}\", encodeURIComponent(webhookId))\n .replace(\n \"{WebhookDeliveryId}\",\n encodeURIComponent(webhookDeliveryId),\n ),\n },\n\n redeliver: {\n definition:\n \"webhooks/{WebhookId}/deliveries/{WebhookDeliveryId}/redeliver\",\n render: (webhookId: string, webhookDeliveryId: string): string =>\n \"webhooks/{WebhookId}/deliveries/{WebhookDeliveryId}/redeliver\"\n .replace(\"{WebhookId}\", encodeURIComponent(webhookId))\n .replace(\n \"{WebhookDeliveryId}\",\n encodeURIComponent(webhookDeliveryId),\n ),\n },\n },\n} as const;\n\n/**\n * Case management endpoints\n */\nexport const cases = {\n createNewSaleOpportunity: \"cases:new-sale-opportunity\",\n createCrossSaleOpportunity: \"cases:cross-sale-opportunity\",\n createCancel: \"cases:cancel\",\n createEndorsement: \"cases:endorsement\",\n createComplaint: \"cases:complaint\",\n\n assignRepresentative: {\n definition: \"cases/{Ref}/representative\",\n render: (ref: string): string =>\n \"cases/{Ref}/representative\".replace(\"{Ref}\", encodeURIComponent(ref)),\n },\n\n addNoteToCase: {\n definition: \"cases/{Ref}/notes\",\n render: (ref: string): string =>\n \"cases/{Ref}/notes\".replace(\"{Ref}\", encodeURIComponent(ref)),\n },\n\n changeChannel: {\n definition: \"cases/{Ref}/channel\",\n render: (ref: string): string =>\n \"cases/{Ref}/channel\".replace(\"{Ref}\", encodeURIComponent(ref)),\n },\n\n changeState: {\n definition: \"cases/{Ref}/state\",\n render: (ref: string): string =>\n \"cases/{Ref}/state\".replace(\"{Ref}\", encodeURIComponent(ref)),\n },\n\n getActivities: {\n definition: \"cases/{Ref}/activities\",\n render: (ref: string): string =>\n \"cases/{Ref}/activities\".replace(\"{Ref}\", encodeURIComponent(ref)),\n },\n\n getCaseByRef: {\n definition: \"cases/{Ref}\",\n render: (ref: string): string =>\n \"cases/{Ref}\".replace(\"{Ref}\", encodeURIComponent(ref)),\n },\n\n getProposals: {\n definition: \"cases/{Ref}/proposals\",\n render: (ref: string): string =>\n \"cases/{Ref}/proposals\".replace(\"{Ref}\", encodeURIComponent(ref)),\n },\n\n getPolicies: {\n definition: \"cases/{Ref}/policies\",\n render: (ref: string): string =>\n \"cases/{Ref}/policies\".replace(\"{Ref}\", encodeURIComponent(ref)),\n },\n\n setAsset: {\n definition: \"cases/{Ref}/asset\",\n render: (ref: string): string =>\n \"cases/{Ref}/asset\".replace(\"{Ref}\", encodeURIComponent(ref)),\n },\n\n setBranch: {\n definition: \"cases/{Ref}/branch\",\n render: (ref: string): string =>\n \"cases/{Ref}/branch\".replace(\"{Ref}\", encodeURIComponent(ref)),\n },\n\n getSalesOpportunityFunnelAnalytics: {\n definition: \"cases/analytics/sales-opportunity-funnel\",\n },\n\n getOpenCaseBacklogPivotAnalytics: {\n definition: \"cases/analytics/open-case-backlog-pivot\",\n },\n\n getFailedCasesReasonDistribution: {\n definition: \"cases/analytics/failed-cases-reason-distribution\",\n },\n\n communicationAutomations: {\n getAll: \"cases/communication-automations\",\n },\n\n getPriorityTemplates: \"cases/priority-templates\",\n} as const;\n\n/**\n * Coverage Groups endpoints for managing insurance coverage groups\n * Sigorta teminat gruplarını yönetmek için teminat grupları endpoint'leri\n */\nexport const coverageGroups = {\n getAll: \"coverage-groups\",\n create: \"coverage-groups\",\n\n update: {\n definition: \"coverage-groups/{Id}\",\n render: (id: string): string =>\n \"coverage-groups/{Id}\".replace(\"{Id}\", encodeURIComponent(id)),\n },\n\n delete: {\n definition: \"coverage-groups/{Id}\",\n render: (id: string): string =>\n \"coverage-groups/{Id}\".replace(\"{Id}\", encodeURIComponent(id)),\n },\n\n getById: {\n definition: \"coverage-groups/{Id}\",\n render: (id: string): string =>\n \"coverage-groups/{Id}\".replace(\"{Id}\", encodeURIComponent(id)),\n },\n} as const;\n\n/**\n * Release Notes endpoints\n */\nexport const releaseNotes = {\n getAll: \"release-notes\",\n} as const;\n\n/**\n * Banks endpoints\n */\nexport const banks = {\n getAll: \"banks\",\n\n getBranches: {\n definition: \"banks/{BankId}/branches\",\n render: (bankId: string): string =>\n \"banks/{BankId}/branches\".replace(\"{BankId}\", encodeURIComponent(bankId)),\n },\n} as const;\n\n/**\n * Financial Institutions endpoints\n */\nexport const financialInstitutions = {\n getAll: \"financial-institutions\",\n} as const;\n\n/**\n * Agent Branches endpoints\n */\nexport const agentBranches = {\n getAll: \"agent-branches\",\n create: \"agent-branches\",\n getById: {\n definition: \"agent-branches/{Id}\",\n render: (id: string): string =>\n \"agent-branches/{Id}\".replace(\"{Id}\", encodeURIComponent(id)),\n },\n update: {\n definition: \"agent-branches/{Id}\",\n render: (id: string): string =>\n \"agent-branches/{Id}\".replace(\"{Id}\", encodeURIComponent(id)),\n },\n delete: {\n definition: \"agent-branches/{Id}\",\n render: (id: string): string =>\n \"agent-branches/{Id}\".replace(\"{Id}\", encodeURIComponent(id)),\n },\n} as const;\n\n/**\n * Files endpoints\n */\nexport const files = {\n uploadPublicFile: \"files/upload-public\",\n} as const;\n\n/**\n * Languages endpoints\n */\nexport const languages = {\n getAll: \"languages\",\n} as const;\n\n/**\n * Templates endpoints\n */\nexport const templates = {\n getDefinitions: \"templates/definitions\",\n getAll: \"templates\",\n getByKey: {\n definition: \"templates/{Key}\",\n render: (key: string): string =>\n \"templates/{Key}\".replace(\"{Key}\", encodeURIComponent(key)),\n },\n update: {\n definition: \"templates/{Key}\",\n render: (key: string): string =>\n \"templates/{Key}\".replace(\"{Key}\", encodeURIComponent(key)),\n },\n delete: {\n definition: \"templates/{Key}\",\n render: (key: string): string =>\n \"templates/{Key}\".replace(\"{Key}\", encodeURIComponent(key)),\n },\n} as const;\n\n/**\n * B2C Configuration endpoints\n */\nexport const b2c = {\n configFields: {\n getAll: \"b2c/config-fields\",\n updateAll: \"b2c/config-fields\",\n },\n} as const;\n\n/**\n * Main endpoints export object\n */\nexport const endpoints = {\n customers,\n vehicles,\n vehicleParameters,\n insuranceServices,\n agents,\n insuranceCompanies,\n resourceKeys,\n releaseNotes,\n banks,\n financialInstitutions,\n policies,\n policyTransfers,\n filePolicyTransfers,\n cases,\n coverageGroups,\n webhooks,\n agentBranches,\n files,\n languages,\n templates,\n b2c,\n proposals,\n} as const;\n","import type { HttpTransport } from \"../client/http.js\";\nimport type { InsurUpResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport { agents } from \"../core/endpoints.js\";\nimport type {\n GetCurrentAgentResult,\n UpdateCurrentAgentRequest,\n GetMyAgentInsuranceCompaniesResult,\n GetAgentInsuranceCompanyBranchesResult,\n GetAgentInsuranceCompanyConnectionResult,\n AddInsuranceCompanyToAgentRequest,\n UpdateAgentInsuranceCompanyConnectionRequest,\n UpdateAgentInsuranceCompanyBranchesRequest,\n ReSyncAgentInsuranceCompanyWithInsuranceRequest,\n GetB2CConfigFieldsResult,\n UpdateB2CConfigFieldsRequest,\n} from \"@insurup/contracts\";\nimport { b2c } from \"../core/endpoints.js\";\n\n/**\n * Provides agent management operations for the InsurUp platform, enabling agents to manage their profile,\n * insurance company connections, and business relationships within the insurance ecosystem.\n *\n * InsurUp platformunda acente yönetimi işlemlerini sağlar; acentelerin profilerini, sigorta şirketi\n * bağlantılarını ve sigorta ekosistemi içindeki iş ilişkilerini yönetmelerine olanak tanır.\n */\nexport class InsurUpAgentClient {\n constructor(private readonly http: HttpTransport) {}\n\n /**\n * Retrieves the current agent's profile information including business details and configuration settings.\n *\n * Mevcut acentenin iş detayları ve yapılandırma ayarları dahil profil bilgilerini getirir.\n *\n * @returns Agent profile information / Acente profil bilgileri\n */\n async getCurrentAgent(\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCurrentAgentResult>> {\n return this.http.get<GetCurrentAgentResult>(\n agents.getCurrentAgent,\n options,\n );\n }\n\n /**\n * Updates the current agent's profile information such as business details, contact information, and operational preferences.\n *\n * Mevcut acentenin iş detayları, iletişim bilgileri ve operasyonel tercihleri gibi profil bilgilerini günceller.\n *\n * @param request Agent profile update data / Acente profil güncelleme verileri\n * @returns Operation result / İşlem sonucu\n */\n async updateCurrentAgent(\n request: UpdateCurrentAgentRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.putNoContent(agents.updateCurrentAgent, request, options);\n }\n\n /**\n * Retrieves all insurance companies that the current agent is affiliated with or has authorization to work with.\n *\n * Mevcut acentenin bağlı olduğu veya çalışma yetkisine sahip olduğu tüm sigorta şirketlerini getirir.\n *\n * @returns List of agent's insurance companies / Acentenin sigorta şirketleri listesi\n */\n async getAgentInsuranceCompaniesAsync(\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetMyAgentInsuranceCompaniesResult[]>> {\n return this.http.get<GetMyAgentInsuranceCompaniesResult[]>(\n agents.insuranceCompanies.getMyInsuranceCompanies,\n options,\n );\n }\n\n /**\n * Retrieves the available product branches (Kasko, TSS, IMM, DASK, etc.) for a specific insurance company that the agent can offer.\n *\n * Acentenin sunabileceği belirli bir sigorta şirketi için mevcut ürün dallarını (Kasko, TSS, İMM, DASK, vb.) getirir.\n *\n * @param agentInsuranceCompanyId Insurance company relationship identifier / Sigorta şirketi ilişki tanımlayıcısı\n * @returns Available product branches / Mevcut ürün dalları\n */\n async getAgentInsuranceCompanyBranchesAsync(\n agentInsuranceCompanyId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetAgentInsuranceCompanyBranchesResult[]>> {\n const endpoint = agents.insuranceCompanies.getBranches.render(\n agentInsuranceCompanyId,\n );\n return this.http.get<GetAgentInsuranceCompanyBranchesResult[]>(\n endpoint,\n options,\n );\n }\n\n /**\n * Retrieves the technical connection configuration and credentials for integrating with a specific insurance company's systems.\n *\n * Belirli bir sigorta şirketinin sistemleri ile entegrasyon için teknik bağlantı yapılandırması ve kimlik bilgilerini getirir.\n *\n * @param agentInsuranceCompanyId Insurance company relationship identifier / Sigorta şirketi ilişki tanımlayıcısı\n * @returns Connection configuration details / Bağlantı yapılandırma detayları\n */\n async getAgentInsuranceCompanyConnectionAsync(\n agentInsuranceCompanyId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetAgentInsuranceCompanyConnectionResult>> {\n const endpoint = agents.insuranceCompanies.getConnection.render(\n agentInsuranceCompanyId,\n );\n return this.http.get<GetAgentInsuranceCompanyConnectionResult>(\n endpoint,\n options,\n );\n }\n\n /**\n * Establishes a new business relationship between the agent and an insurance company, enabling the agent to offer that company's products.\n *\n * Acente ile sigorta şirketi arasında yeni bir iş ilişkisi kurar ve acentenin o şirketin ürünlerini sunmasına olanak tanır.\n *\n * @param request Insurance company association request / Sigorta şirketi ilişkilendirme talebi\n * @returns Operation result / İşlem sonucu\n */\n async addAgentInsuranceCompany(\n request: AddInsuranceCompanyToAgentRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n agents.insuranceCompanies.addInsuranceCompanyToAgent,\n request,\n options,\n );\n }\n\n /**\n * Removes the business relationship between the agent and an insurance company, terminating the agent's ability to offer that company's products.\n *\n * Acente ile sigorta şirketi arasındaki iş ilişkisini kaldırır ve acentenin o şirketin ürünlerini sunma yeteneğini sonlandırır.\n *\n * @param agentInsuranceCompanyId Insurance company relationship identifier to remove / Kaldırılacak sigorta şirketi ilişki tanımlayıcısı\n * @returns Operation result / İşlem sonucu\n */\n async removeAgentInsuranceCompany(\n agentInsuranceCompanyId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = agents.insuranceCompanies.remove.render(\n agentInsuranceCompanyId,\n );\n return this.http.deleteNoContent(endpoint, options);\n }\n\n /**\n * Updates the technical connection settings and credentials for integrating with an insurance company's API or systems.\n *\n * Bir sigorta şirketinin API'si veya sistemleri ile entegrasyon için teknik bağlantı ayarları ve kimlik bilgilerini günceller.\n *\n * @param request Connection configuration update request / Bağlantı yapılandırma güncelleme talebi\n * @returns Operation result / İşlem sonucu\n */\n async updateAgentInsuranceCompanyConnection(\n request: UpdateAgentInsuranceCompanyConnectionRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = agents.insuranceCompanies.updateConnection.render(\n request.agentInsuranceCompanyId,\n );\n return this.http.putNoContent(endpoint, request, options);\n }\n\n /**\n * Updates which product branches (Kasko, TSS, IMM, DASK, etc.) the agent is authorized to offer for a specific insurance company.\n *\n * Acentenin belirli bir sigorta şirketi için hangi ürün dallarını (Kasko, TSS, İMM, DASK, vb.) sunma yetkisine sahip olduğunu günceller.\n *\n * @param request Branch authorization update request / Şube yetkilendirme güncelleme talebi\n * @returns Operation result / İşlem sonucu\n */\n async updateAgentInsuranceCompanyBranches(\n request: UpdateAgentInsuranceCompanyBranchesRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = agents.insuranceCompanies.updateBranches.render(\n request.agentInsuranceCompanyId,\n );\n return this.http.putNoContent(endpoint, request, options);\n }\n\n /**\n * Re-synchronizes the agent's configuration and authorizations with the insurance company's systems to ensure data consistency and updated permissions.\n *\n * Veri tutarlılığını ve güncellenmiş izinleri sağlamak için acentenin yapılandırması ve yetkilendirmelerini sigorta şirketinin sistemleri ile yeniden senkronize eder.\n *\n * @param request Re-synchronization request details / Yeniden senkronizasyon talep detayları\n * @returns Operation result / İşlem sonucu\n */\n async reSyncAgentInsuranceCompanyWithInsurance(\n request: ReSyncAgentInsuranceCompanyWithInsuranceRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint =\n agents.insuranceCompanies.reSyncAgentInsuranceCompanyWithInsurance.render(\n request.agentInsuranceCompanyId,\n );\n return this.http.postNoContent(endpoint, request, options);\n }\n\n /**\n * Retrieves all B2C configuration fields that define the customizable settings and parameters for the agent's customer-facing interface.\n *\n * Acentenin müşteriye yönelik arayüzü için özelleştirilebilir ayarları ve parametreleri tanımlayan tüm B2C yapılandırma alanlarını getirir.\n *\n * @returns List of B2C configuration fields\n */\n async getB2CConfigFields(\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetB2CConfigFieldsResult>> {\n return this.http.get<GetB2CConfigFieldsResult>(\n b2c.configFields.getAll,\n options,\n );\n }\n\n /**\n * Updates all B2C configuration fields at once, allowing agents to customize their customer-facing interface settings and branding parameters.\n *\n * Tüm B2C yapılandırma alanlarını bir kerede günceller, acentelerin müşteriye yönelik arayüz ayarlarını ve marka parametrelerini özelleştirmelerine olanak tanır.\n *\n * @param request B2C configuration fields update data\n * @returns Operation result\n */\n async updateB2CConfigFields(\n request: UpdateB2CConfigFieldsRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.putNoContent(b2c.configFields.updateAll, request, options);\n }\n}\n","/**\n * @fileoverview Agent Branch Client - Agent branch management operations\n * @description Provides branch management operations for insurance agents\n */\n\nimport type { HttpTransport } from \"../client/http.js\";\nimport type { InsurUpResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport { agentBranches } from \"../core/endpoints.js\";\nimport type {\n CreateAgentBranchRequest,\n UpdateAgentBranchRequest,\n DeleteAgentBranchRequest,\n GetAgentBranchResult,\n GetAllAgentBranchesResult,\n} from \"@insurup/contracts\";\n\n/**\n * Provides branch management operations for insurance agents, enabling the creation and administration\n * of organizational branches within agency structures.\n */\nexport class InsurUpAgentBranchClient {\n constructor(private readonly http: HttpTransport) {}\n\n /**\n * Creates a new agent branch within the agency structure with optional parent branch relationship.\n *\n * Acente yapısı içinde isteğe bağlı üst şube ilişkisi ile yeni bir acente şubesi oluşturur.\n *\n * @param request Branch creation request with name and optional parent\n * @returns Created branch details\n */\n async createAgentBranch(\n request: CreateAgentBranchRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<string>> {\n return this.http.post<string>(agentBranches.create, request, options);\n }\n\n /**\n * Retrieves detailed information about a specific agent branch including its parent relationship.\n *\n * Belirli bir acente şubesi hakkında üst şube ilişkisi dahil detaylı bilgileri getirir.\n *\n * @param id Unique identifier of the agent branch\n * @returns Agent branch details\n */\n async getAgentBranchById(\n id: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetAgentBranchResult>> {\n const endpoint = agentBranches.getById.render(id);\n return this.http.get<GetAgentBranchResult>(endpoint, options);\n }\n\n /**\n * Retrieves all available agent branches within the current agency, showing the complete branch hierarchy.\n *\n * Mevcut acente içindeki tüm kullanılabilir acente şubelerini getirir ve tam şube hiyerarşisini gösterir.\n *\n * @returns List of all agent branches\n */\n async getAgentBranches(\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetAllAgentBranchesResult[]>> {\n return this.http.get<GetAllAgentBranchesResult[]>(\n agentBranches.getAll,\n options,\n );\n }\n\n /**\n * Updates an existing agent branch's name or parent branch relationship to reflect changing organizational needs.\n *\n * Değişen organizasyonel ihtiyaçları yansıtmak için mevcut bir acente şubesinin adını veya üst şube ilişkisini günceller.\n *\n * @param request Branch update request with modified details\n * @returns Operation result\n */\n async updateAgentBranch(\n request: UpdateAgentBranchRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = agentBranches.update.render(request.id);\n return this.http.putNoContent(endpoint, request, options);\n }\n\n /**\n * Removes an agent branch from the agency structure. The branch must not have any child branches.\n *\n * Acente yapısından bir acente şubesini kaldırır. Şubenin alt şubeleri olmamalıdır.\n *\n * @param request Branch deletion request\n * @returns Operation result\n */\n async deleteAgentBranch(\n request: DeleteAgentBranchRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = agentBranches.delete.render(request.id);\n return this.http.deleteNoContent(endpoint, options);\n }\n}\n","import type { HttpTransport } from \"../client/http.js\";\nimport type { InsurUpResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport { agentRoles } from \"../core/endpoints.js\";\nimport type {\n CreateAgentRoleRequest,\n UpdateAgentRoleRequest,\n DeleteAgentRoleRequest,\n GetAgentRoleByIdResult,\n GetAllAgentRolesResult,\n} from \"@insurup/contracts\";\n\n/**\n * Provides role management operations for insurance agents, enabling the creation and administration\n * of role-based access control within agency hierarchies and permission structures.\n *\n * Sigorta acenteleri için rol yönetimi işlemlerini sağlar; acente hiyerarşileri ve izin yapıları\n * içinde rol tabanlı erişim kontrolünün oluşturulması ve yönetimini mümkün kılar.\n */\nexport class InsurUpAgentRoleClient {\n constructor(private readonly http: HttpTransport) {}\n\n /**\n * Creates a new agent role with specified permissions and access levels for use within the agency structure.\n *\n * Acente yapısı içinde kullanım için belirtilen izinler ve erişim seviyeleri ile yeni bir acente rolü oluşturur.\n *\n * @param request Role creation request with permissions and configurations / İzinler ve yapılandırmalar ile rol oluşturma talebi\n * @returns Operation result / İşlem sonucu\n */\n async createAgentRole(\n request: CreateAgentRoleRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(agentRoles.create, request, options);\n }\n\n /**\n * Retrieves detailed information about a specific agent role including its permissions and access configurations.\n *\n * Belirli bir acente rolü hakkında izinleri ve erişim yapılandırmaları dahil detaylı bilgileri getirir.\n *\n * @param id Unique identifier of the agent role / Acente rolünün benzersiz tanımlayıcısı\n * @returns Agent role details / Acente rolü detayları\n */\n async getAgentRoleById(\n id: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetAgentRoleByIdResult>> {\n const endpoint = agentRoles.getById.render(id);\n return this.http.get<GetAgentRoleByIdResult>(endpoint, options);\n }\n\n /**\n * Retrieves all available agent roles within the current agency, showing the complete role hierarchy and permissions structure.\n *\n * Mevcut acente içindeki tüm kullanılabilir acente rollerini getirir ve tam rol hiyerarşisi ile izin yapısını gösterir.\n *\n * @returns List of all agent roles / Tüm acente rolleri listesi\n */\n async getAgentRoles(\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetAllAgentRolesResult[]>> {\n return this.http.get<GetAllAgentRolesResult[]>(agentRoles.getAll, options);\n }\n\n /**\n * Updates an existing agent role's permissions, access levels, or configuration settings to reflect changing organizational needs.\n *\n * Değişen organizasyonel ihtiyaçları yansıtmak için mevcut bir acente rolünün izinlerini, erişim seviyelerini veya yapılandırma ayarlarını günceller.\n *\n * @param request Role update request with modified permissions / Değiştirilmiş izinlerle rol güncelleme talebi\n * @returns Operation result / İşlem sonucu\n */\n async updateAgentRole(\n request: UpdateAgentRoleRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = agentRoles.update.render(request.id);\n return this.http.putNoContent(endpoint, request, options);\n }\n\n /**\n * Removes an agent role from the agency structure, ensuring proper cleanup of associated permissions and user assignments.\n *\n * Acente yapısından bir acente rolünü kaldırır ve ilişkili izinlerin ve kullanıcı atamalarının düzgün temizlenmesini sağlar.\n *\n * @param request Role deletion request / Rol silme talebi\n * @returns Operation result / İşlem sonucu\n */\n async deleteAgentRole(\n request: DeleteAgentRoleRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = agentRoles.delete.render(request.id);\n return this.http.deleteNoContent(endpoint, options);\n }\n}\n","import type { HttpTransport } from \"../client/http.js\";\nimport type { InsurUpResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport { agentSetupRequests } from \"../core/endpoints.js\";\nimport type {\n EnterAgentSetupRequestRequest,\n EnterAgentSetupRequestResult,\n CompleteAgentSetupRequestRequest,\n} from \"@insurup/contracts\";\n\n/**\n * Provides agent onboarding and setup operations for new insurance agents joining the InsurUp platform,\n * facilitating the complete registration and configuration process required for business operations.\n *\n * InsurUp platformuna katılan yeni sigorta acenteleri için acente katılım ve kurulum işlemlerini sağlar;\n * iş operasyonları için gereken tam kayıt ve yapılandırma sürecini kolaylaştırır.\n */\nexport class InsurUpAgentSetupClient {\n constructor(private readonly http: HttpTransport) {}\n\n /**\n * Initiates the agent setup process by submitting initial business information and required documentation for platform registration.\n *\n * Platform kaydı için ilk iş bilgilerini ve gerekli dokümantasyonu sunarak acente kurulum sürecini başlatır.\n *\n * @param request Agent setup initiation request with business details / İş detayları ile acente kurulum başlatma talebi\n * @returns Setup process identifier and next steps / Kurulum süreci tanımlayıcısı ve sonraki adımlar\n */\n async enterAgentSetupRequest(\n request: EnterAgentSetupRequestRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<EnterAgentSetupRequestResult>> {\n return this.http.post<EnterAgentSetupRequestResult>(\n agentSetupRequests.enter,\n request,\n options,\n );\n }\n\n /**\n * Finalizes the agent setup process by confirming all requirements are met and activating the agent's platform access.\n *\n * Tüm gereksinimlerin karşılandığını onaylayarak ve acentenin platform erişimini aktive ederek acente kurulum sürecini sonlandırır.\n *\n * @param request Setup completion request with final confirmations / Son onaylar ile kurulum tamamlama talebi\n * @returns Operation result / İşlem sonucu\n */\n async completeAgentSetupRequest(\n request: CompleteAgentSetupRequestRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n agentSetupRequests.complete,\n request,\n options,\n );\n }\n}\n","/**\n * @fileoverview Common Base Types - Core fundamental types, interfaces, and business enums\n * @description Core data structures and business-related enums used throughout the InsurUp platform\n */\n\n// ============================================================================\n// GENERAL BUSINESS ENUMS\n// ============================================================================\n\n/**\n * Communication and Sales Channel\n *\n * Enumeration of various channels through which customers can interact with the insurance company,\n * submit proposals, purchase policies, or receive support. Channels are essential for tracking customer\n * acquisition sources, calculating agent commissions, analyzing marketing effectiveness, and providing\n * appropriate service levels. Each channel may have different processing workflows, commission structures,\n * and service requirements in the insurance business operations.\n *\n * Müşterilerin sigorta şirketi ile etkileşime geçebileceği, teklif verebileceği, poliçe satın alabileceği\n * veya destek alabileceği çeşitli kanalların numaralandırması. Kanallar, müşteri kazanım kaynaklarını takip etmek,\n * acente komisyonlarını hesaplamak, pazarlama etkinliğini analiz etmek ve uygun hizmet seviyelerini sağlamak için\n * gereklidir. Her kanal, sigorta işletme operasyonlarında farklı işlem akışlarına, komisyon yapılarına ve\n * hizmet gereksinimlerine sahip olabilir.\n */\nexport enum Channel {\n /**\n * Unknown Channel Source / Bilinmeyen Kanal Kaynağı\n *\n * Default value used when the customer acquisition or interaction channel cannot be determined\n * or is not specified. This may occur with legacy data, incomplete records, or when channel\n * tracking systems fail to capture the source information. Requires manual review and\n * categorization for proper analytics and commission processing.\n *\n * Müşteri kazanımı veya etkileşim kanalı belirlenemediğinde veya belirtilmediğinde kullanılan\n * varsayılan değer. Bu durum eski veriler, eksik kayıtlar veya kanal takip sistemlerinin kaynak\n * bilgilerini yakalayamaması durumunda ortaya çıkabilir. Uygun analitik ve komisyon işleme için\n * manuel inceleme ve kategorilendirme gerektirir.\n */\n Unknown = \"UNKNOWN\",\n\n /**\n * Manual entry or direct agent input channel\n * Manuel giriş veya doğrudan acente girişi kanalı\n */\n Manual = \"MANUAL\",\n\n /**\n * Company website or web portal channel\n * Şirket web sitesi veya web portalı kanalı\n */\n Website = \"WEBSITE\",\n\n /**\n * Google Ads or Google advertising platform channel\n * Google Ads veya Google reklam platformu kanalı\n */\n GoogleAds = \"GOOGLE_ADS\",\n\n /**\n * Call center or telephone support channel\n * Çağrı merkezi veya telefon destek kanalı\n */\n CallCenter = \"CALL_CENTER\",\n\n /**\n * Social media platforms channel\n * Sosyal medya platformları kanalı\n */\n SocialMedia = \"SOCIAL_MEDIA\",\n\n /**\n * Mobile application channel\n * Mobil uygulama kanalı\n */\n MobileApp = \"MOBILE_APP\",\n\n /**\n * Offline proposal form or paper-based application channel\n * Çevrimdışı teklif formu veya kağıt tabanlı başvuru kanalı\n */\n OfflineProposalForm = \"OFFLINE_PROPOSAL_FORM\",\n\n /**\n * Field sales or door-to-door sales channel\n * Saha satışı veya kapı kapı satış kanalı\n */\n Field = \"FIELD\",\n\n /**\n * Print media advertising channel\n * Basılı medya reklam kanalı\n */\n PrintMedia = \"PRINT_MEDIA\",\n\n /**\n * Trade fairs, exhibitions, or promotional events channel\n * Ticaret fuarları, sergiler veya promosyon etkinlikleri kanalı\n */\n FairEvent = \"FAIR_EVENT\",\n\n /**\n * Business partner or affiliate marketing channel\n * İş ortağı veya bağlı pazarlama kanalı\n */\n BusinessPartner = \"BUSINESS_PARTNER\",\n\n /**\n * Automated chatbot or AI-powered customer service channel\n * Otomatik chatbot veya AI destekli müşteri hizmetleri kanalı\n */\n Chatbot = \"CHATBOT\",\n}\n\n/**\n * Insurance Asset Types\n *\n * Defines the primary categories of assets that can be covered under insurance policies.\n * This classification helps determine the appropriate insurance products, coverage terms,\n * risk assessment methods, and regulatory requirements for different types of insurable assets.\n *\n * Sigorta poliçeleri kapsamında kapsanabilecek varlıkların birincil kategorilerini tanımlar.\n * Bu sınıflandırma, farklı sigortalanabilir varlık türleri için uygun sigorta ürünleri, kapsam\n * koşulları, risk değerlendirme yöntemleri ve yasal gereksinimleri belirlemeye yardımcı olur.\n */\nexport enum AssetType {\n /**\n * Vehicle Assets / Araç Varlıkları\n *\n * All types of motorized vehicles that can be insured including passenger cars, motorcycles,\n * commercial vehicles, trucks, buses, and specialized equipment. Vehicle insurance typically\n * includes coverage for damage, theft, liability, and optional additional protections.\n *\n * Binek araçlar, motosikletler, ticari araçlar, kamyonlar, otobüsler ve özel ekipmanlar\n * dahil sigortalanabilecek tüm motorlu araç türleri. Araç sigortası genellikle hasar, hırsızlık,\n * sorumluluk ve isteğe bağlı ek korumalar için kapsam içerir.\n */\n Vehicle = \"VEHICLE\",\n /**\n * Property Assets / Konut Varlıkları\n *\n * Real estate properties that can be insured including residential homes, commercial buildings,\n * and their contents. Property insurance typically covers structural damage, theft, natural disasters,\n * and liability related to the property.\n *\n * Konut evleri, ticari binalar ve içerikleri dahil sigortalanabilecek gayrimenkul konutları.\n * Konut sigortası genellikle yapısal hasar, hırsızlık, doğal afetler ve konutla ilgili sorumluluk\n * kapsamlarını içerir.\n */\n Property = \"PROPERTY\",\n}\n\n/**\n * Customer Type Classification\n *\n * Defines the legal and regulatory classification of insurance customers based on their\n * entity type and residency status. This classification is crucial for determining applicable\n * insurance regulations, pricing models, documentation requirements, and legal procedures.\n * Different customer types may have varying coverage options, premium calculations, and\n * compliance requirements under Turkish insurance law and international regulations.\n *\n * Sigorta müşterilerinin yasal ve düzenleyici sınıflandırmasını varlık türü ve ikamet\n * durumuna göre tanımlar. Bu sınıflandırma, uygulanabilir sigorta düzenlemeleri, fiyatlandırma\n * modelleri, dokümantasyon gereksinimleri ve yasal prosedürleri belirlemek için çok önemlidir.\n * Farklı müşteri türleri, Türk sigorta hukuku ve uluslararası düzenlemeler altında değişen\n * kapsam seçenekleri, prim hesaplamaları ve uyumluluk gereksinimlerine sahip olabilir.\n */\nexport enum CustomerType {\n /**\n * Individual Customer / Bireysel Müşteri\n *\n * Represents a natural person (individual) who purchases insurance coverage for personal use.\n * This includes private individuals buying auto insurance, home insurance, life insurance, or\n * other personal lines of coverage. Individual customers typically have different documentation\n * requirements, coverage limits, and premium structures compared to corporate customers.\n * Subject to consumer protection laws and individual privacy regulations.\n *\n * Kişisel kullanım için sigorta kapsamı satın alan gerçek kişiyi (birey) temsil eder.\n * Bu, kasko sigortası, konut sigortası, hayat sigortası veya diğer kişisel kapsam türlerini\n * satın alan özel bireyleri içerir. Bireysel müşteriler genellikle kurumsal müşterilere\n * kıyasla farklı dokümantasyon gereksinimlerine, kapsam limitelerine ve prim yapılarına\n * sahiptir. Tüketici koruma yasaları ve bireysel gizlilik düzenlemelerine tabidir.\n */\n Individual = \"INDIVIDUAL\",\n /**\n * Corporate Customer / Kurumsal Müşteri\n *\n * Represents a legal entity such as a corporation, limited liability company, partnership,\n * or other business organization that purchases commercial insurance coverage. Corporate\n * customers typically require higher coverage limits, more complex policy structures, and\n * specialized commercial insurance products. Subject to commercial regulations and may have\n * different tax implications and reporting requirements.\n *\n * Ticari sigorta kapsamı satın alan şirket, limited şirket, ortaklık veya diğer iş\n * organizasyonları gibi tüzel kişiyi temsil eder. Kurumsal müşteriler genellikle daha yüksek\n * kapsam limitleri, daha karmaşık poliçe yapıları ve özelleşmiş ticari sigorta ürünleri\n * gerektirir. Ticari düzenlemelere tabidir ve farklı vergi etkileri ve raporlama\n * gereksinimlerine sahip olabilir.\n */\n Company = \"COMPANY\",\n /**\n * Foreign Customer / Yabancı Müşteri\n *\n * Represents a foreign national or non-resident individual/entity who purchases insurance\n * coverage. Foreign customers may have special documentation requirements, different identification\n * procedures, and specific regulatory considerations based on their country of origin and\n * residency status. May require additional compliance checks and have different coverage\n * options or restrictions depending on international agreements and local regulations.\n *\n * Sigorta kapsamı satın alan yabancı uyruklu veya yerleşik olmayan birey/kuruluşu temsil eder.\n * Yabancı müşteriler, köken ülkeleri ve ikamet durumlarına göre özel dokümantasyon gereksinimleri,\n * farklı kimlik doğrulama prosedürleri ve belirli düzenleyici değerlendirmelere sahip olabilir.\n * Uluslararası anlaşmalara ve yerel düzenlemelere bağlı olarak ek uyumluluk kontrolleri\n * gerektirebilir ve farklı kapsam seçenekleri veya kısıtlamaları olabilir.\n */\n Foreign = \"FOREIGN\",\n}\n\n/**\n * Insurance Product Branches\n *\n * Defines the comprehensive classification of insurance product branches available\n * in the Turkish insurance market. Each branch represents a distinct type of insurance\n * coverage with specific regulatory requirements, pricing models, coverage options,\n * and business rules. This classification is essential for proper product categorization,\n * regulatory compliance, and system functionality organization.\n *\n * Türk sigorta pazarında mevcut sigorta ürün dallarının kapsamlı sınıflandırmasını\n * tanımlar. Her dal, belirli düzenleyici gereksinimler, fiyatlandırma modelleri, kapsam\n * seçenekleri ve iş kuralları olan farklı bir sigorta kapsam türünü temsil eder.\n * Bu sınıflandırma, uygun ürün kategorizasyonu, düzenleyici uyum ve sistem işlevsellik\n * organizasyonu için gereklidir.\n */\nexport enum ProductBranch {\n /**\n * Comprehensive motor vehicle insurance (Kasko)\n * Kapsamlı motorlu araç sigortası (Kasko)\n */\n Kasko = \"KASKO\",\n\n /**\n * Compulsory Earthquake Insurance (DASK)\n * Zorunlu Deprem Sigortası (DASK)\n */\n Dask = \"DASK\",\n\n /**\n * Residential property insurance (Konut)\n * Konut sigortası\n */\n Konut = \"KONUT\",\n\n /**\n * Mandatory motor vehicle liability insurance (Trafik)\n * Zorunlu motorlu araç sorumluluk sigortası (Trafik)\n */\n Trafik = \"TRAFIK\",\n\n /**\n * Supplementary Health Insurance (TSS)\n * Tamamlayıcı Sağlık Sigortası (TSS)\n */\n Tss = \"TSS\",\n\n /**\n * Voluntary Financial Liability Insurance (İMM)\n * İhtiyari Mali Mesuliyet Sigortası (İMM)\n */\n Imm = \"IMM\",\n\n /**\n * Green Card international motor insurance\n * Yeşil Kart uluslararası motorlu araç sigortası\n */\n YesilKart = \"YESIL_KART\",\n\n /**\n * Personal accident insurance (Ferdi Kaza)\n * Ferdi kaza sigortası\n */\n FerdiKaza = \"FERDI_KAZA\",\n\n /**\n * Group life insurance (Grup Hayat)\n * Grup hayat sigortası\n */\n GrupHayat = \"GRUP_HAYAT\",\n\n /**\n * Health insurance (Sağlık)\n * Sağlık sigortası\n */\n Saglik = \"SAGLIK\",\n\n /**\n * Credit card and identity protection insurance\n * Kredi kartı ve kimlik koruma sigortası\n */\n KartKimlikKoruma = \"KART_KIMLIK_KORUMA\",\n\n /**\n * Third-party liability insurance\n * Üçüncü şahıs mali sorumluluk sigortası\n */\n UcuncuSahisMaliSorumluluk = \"UCUNCU_SAHIS_MALI_SORUMLULUK\",\n\n /**\n * Commercial property fire insurance\n * İşyeri yangın sigortası\n */\n IsyeriYangin = \"ISYERI_YANGIN\",\n\n /**\n * Travel insurance (Seyahat)\n * Seyahat sigortası\n */\n Seyahat = \"SEYAHAT\",\n\n /**\n * Electronic device insurance\n * Elektronik cihaz sigortası\n */\n ElektronikCihaz = \"ELEKTRONIK_CIHAZ\",\n\n /**\n * Pet insurance\n * Evcil hayvan sigortası\n */\n Pet = \"PET\",\n\n /**\n * Individual Retirement System (BES)\n * Bireysel Emeklilik Sistemi (BES)\n */\n Bes = \"BES\",\n\n /**\n * Construction all-risk insurance\n * İnşaat tüm riskler sigortası\n */\n InsaatAllRisk = \"INSAAT_ALL_RISK\",\n\n /**\n * Leasing all-risk insurance\n * Leasing tüm riskler sigortası\n */\n LeasingAllRisk = \"LEASING_ALL_RISK\",\n\n /**\n * Assembly/installation all-risk insurance\n * Montaj tüm riskler sigortası\n */\n MontajAllRisk = \"MONTAJ_ALL_RISK\",\n\n /**\n * Transportation/cargo insurance\n * Nakliyat sigortası\n */\n Nakliyat = \"NAKLIYAT\",\n\n /**\n * Private security financial liability insurance\n * Özel güvenlik mali sorumluluk sigortası\n */\n OzelGuvenlikMaliSorumluluk = \"OZEL_GUVENLIK_MALI_SORUMLULUK\",\n\n /**\n * Smart phone insurance\n * Akıllı telefon sigortası\n */\n AkilliTelefon = \"AKILLI_TELEFON\",\n\n /**\n * Hazardous materials liability insurance\n * Tehlikeli maddeler mali sorumluluk sigortası\n */\n TehlikeliMaddelerMaliSorumluluk = \"TEHLIKELI_MADDELER_MALI_SORUMLULUK\",\n\n /**\n * Yacht, boat, and pleasure craft insurance\n * Yat, gemi ve gezinti teknesi sigortası\n */\n YatGemiGezintiTeknesi = \"YAT_GEMI_GEZINTI_TEKNESI\",\n\n /**\n * Agricultural insurance\n * Tarım sigortası\n */\n Tarim = \"TARIM\",\n\n /**\n * Professional liability insurance\n * Mesleki sorumluluk sigortası\n */\n MeslekiSorumluluk = \"MESLEKI_SORUMLULUK\",\n\n /**\n * Credit insurance\n * Alacak sigortası\n */\n Alacak = \"ALACAK\",\n\n /**\n * Employer's liability insurance\n * İşveren mali mesuliyet sigortası\n */\n IsverenMaliMesuliyet = \"ISVEREN_MALI_MESULIYET\",\n\n /**\n * Engineering insurance\n * Mühendislik sigortası\n */\n Muhendislik = \"MUHENDISLIK\",\n\n /**\n * Legal protection insurance\n * Hukuksal koruma sigortası\n */\n HukuksalKoruma = \"HUKUKSAL_KORUMA\",\n\n /**\n * First Fire Residential Insurance\n * İlk ateş konut sigortası\n */\n IlkAtesKonut = \"ILK_ATES_KONUT\",\n\n /**\n * Surety Insurance\n * Kefalet sigortası\n */\n Kefalet = \"KEFALET\",\n}\n\n// ============================================================================\n// CORE INTERFACES AND TYPES\n// ============================================================================\n\n/**\n * Insurance parameter for location and reference data\n *\n * Standard structure for insurance-related parameters such as cities, districts,\n * vehicle models, and other reference data used throughout the platform.\n *\n * Şehirler, ilçeler, araç modelleri ve platform genelinde kullanılan diğer\n * referans verileri gibi sigortayla ilgili parametreler için standart yapı.\n */\nexport interface InsuranceParameter {\n /**\n * Parameter code / Parametre kodu\n */\n readonly value: string;\n\n /**\n * Parameter name / Parametre adı\n */\n readonly text: string;\n\n /**\n * Optional reference identifier / İsteğe bağlı referans tanımlayıcısı\n */\n readonly reference?: string;\n}\n\n/**\n * User reference information\n *\n * Standard structure for referencing users throughout the system including\n * agents, administrators, and other system users with their basic identification\n * and role information.\n *\n * Temel kimlik ve rol bilgileri ile acenteler, yöneticiler ve diğer sistem\n * kullanıcıları dahil olmak üzere sistem genelinde kullanıcılara referans\n * vermek için standart yapı.\n */\nexport interface UserReference {\n /**\n * User unique identifier / Kullanıcı benzersiz tanımlayıcısı\n */\n readonly id: string;\n\n /**\n * User display name / Kullanıcı görüntü adı\n */\n readonly name: string;\n\n /**\n * User role / Kullanıcı rolü\n */\n readonly role?: string;\n\n /**\n * User email address / Kullanıcı e-posta adresi\n */\n readonly email?: string;\n}\n\n/**\n * Credit Card Information\n *\n * Credit card details required for payment processing. Contains sensitive payment\n * information that must be handled securely according to PCI compliance standards.\n *\n * Ödeme işlemi için gerekli kredi kartı detayları. PCI uyumluluk standartlarına\n * göre güvenli şekilde işlenmesi gereken hassas ödeme bilgilerini içerir.\n */\nexport interface CreditCard {\n /**\n * Identity number of the cardholder (optional)\n * Kart sahibinin kimlik numarası (isteğe bağlı)\n */\n readonly identityNumber?: string | null;\n\n /**\n * Credit card number\n * Kredi kartı numarası\n */\n readonly number: string;\n\n /**\n * Card verification code (CVC/CVV)\n * Kart doğrulama kodu (CVC/CVV)\n */\n readonly cvc: string;\n\n /**\n * Expiry month (MM format)\n * Son kullanma ayı (AA formatı)\n */\n readonly expiryMonth: string;\n\n /**\n * Expiry year (YYYY format)\n * Son kullanma yılı (YYYY formatı)\n */\n readonly expiryYear: string;\n\n /**\n * Cardholder name\n * Kart sahibinin adı\n */\n readonly holderName: string;\n}\n\n/**\n * Currency Types\n */\nexport enum Currency {\n Unknown = \"UNKNOWN\",\n TurkishLira = \"TURKISH_LIRA\",\n UnitedStatesDollar = \"UNITED_STATES_DOLLAR\",\n Euro = \"EURO\",\n}\n\n/**\n * Payment Options\n *\n * Enumeration of payment methods and processing types available for insurance premium payments\n * and financial transactions. Each option represents a different payment flow with specific security\n * requirements, user interaction patterns, and technical implementations.\n *\n * Sigorta prim ödemeleri ve finansal işlemler için mevcut ödeme yöntemleri ve işleme türlerinin\n * numaralandırması. Her seçenek, belirli güvenlik gereksinimleri, kullanıcı etkileşim kalıpları\n * ve teknik uygulamalar ile farklı bir ödeme akışını temsil eder.\n */\nexport enum PaymentOption {\n /**\n * Unknown or unspecified payment option\n * Bilinmeyen veya belirtilmemiş ödeme seçeneği\n */\n Unknown = \"UNKNOWN\",\n\n /**\n * Synchronous credit card payment processing\n * Senkron kredi kartı ödeme işlemi\n */\n SyncCreditCard = \"SYNC_CREDIT_CARD\",\n\n /**\n * Synchronous open account payment processing\n * Senkron açık hesap ödeme işlemi\n */\n SyncOpenAccount = \"SYNC_OPEN_ACCOUNT\",\n\n /**\n * Asynchronous 3D Secure payment processing\n * Asenkron 3D Secure ödeme işlemi\n */\n Async3dSecure = \"ASYNC_3D_SECURE\",\n\n /**\n * Asynchronous insurance company redirect payment processing\n * Asenkron sigorta şirketi yönlendirme ödeme işlemi\n */\n AsyncInsuranceCompanyRedirect = \"ASYNC_INSURANCE_COMPANY_REDIRECT\",\n\n /**\n * Asynchronous third-party 3D Secure payment processing\n * Asenkron üçüncü taraf 3D Secure ödeme işlemi\n */\n AsyncThirdParty3dSecure = \"ASYNC_THIRD_PARTY_3D_SECURE\",\n}\n\n/**\n * Policy States\n *\n * Represents the current state of an insurance policy throughout its lifecycle.\n * Used to track policy status from active coverage to termination.\n *\n * Bir sigorta poliçesinin yaşam döngüsü boyunca mevcut durumunu temsil eder.\n * Poliçenin aktif teminat durumundan sonlandırılmasına kadar olan süreçte durumunu takip etmek için kullanılır.\n */\nexport enum PolicyState {\n /**\n * The policy is currently active and providing coverage\n * Poliçe şu anda aktif durumda ve teminat sağlıyor\n */\n Active = \"ACTIVE\",\n\n /**\n * The policy has reached its natural end date and is no longer providing coverage\n * Poliçe doğal bitiş tarihine ulaşmış ve artık teminat sağlamıyor\n */\n EndOfLife = \"END_OF_LIFE\",\n\n /**\n * The policy has been cancelled before its natural expiration date\n * Poliçe doğal bitiş tarihinden önce iptal edilmiş\n */\n Cancelled = \"CANCELLED\",\n}\n\n/**\n * Insurance Product Integration Type\n *\n * Defines the technical integration method used to connect with and process insurance\n * products. This classification determines the communication protocol, data exchange\n * method, and processing approach used for each insurance product offering. Critical\n * for system architecture, performance optimization, and maintenance strategies of\n * insurance product integrations.\n *\n * Sigorta ürünleri ile bağlantı kurmak ve işlemek için kullanılan teknik entegrasyon\n * yöntemini tanımlar. Bu sınıflandırma, her sigorta ürünü teklifi için kullanılan\n * iletişim protokolünü, veri alışverişi yöntemini ve işleme yaklaşımını belirler.\n * Sistem mimarisi, performans optimizasyonu ve sigorta ürünü entegrasyonlarının\n * bakım stratejileri için kritiktir.\n */\nexport enum InsuranceProductType {\n /**\n * Web service-based integration using API calls and real-time communication.\n *\n * Represents insurance products that integrate through web services, APIs, and\n * real-time communication protocols. This approach enables immediate data exchange,\n * real-time quotes, instant policy issuance, and immediate transaction processing.\n * Provides the best user experience with instant responses but requires stable\n * network connectivity and reliable external service availability.\n *\n * API çağrıları ve gerçek zamanlı iletişim kullanan web servis tabanlı entegrasyon.\n *\n * Web servisleri, API'ler ve gerçek zamanlı iletişim protokolleri aracılığıyla\n * entegre olan sigorta ürünlerini temsil eder. Bu yaklaşım, anında veri alışverişi,\n * gerçek zamanlı teklifler, anında poliçe düzenleme ve anında işlem işleme olanağı\n * sağlar. Anında yanıtlarla en iyi kullanıcı deneyimini sağlar ancak kararlı ağ\n * bağlantısı ve güvenilir harici servis kullanılabilirliği gerektirir.\n */\n WebService = \"WEB_SERVICE\",\n\n /**\n * Automated robot-based integration using screen scraping or automated processes.\n *\n * Represents insurance products that integrate through automated robot processes,\n * screen scraping, or browser automation. This approach is used when direct API\n * integration is not available and the system must interact with web interfaces\n * or legacy systems. May have slower response times and requires regular maintenance\n * to adapt to interface changes but enables integration with older systems.\n *\n * Ekran kazıma veya otomatik süreçler kullanan otomatik robot tabanlı entegrasyon.\n *\n * Otomatik robot süreçleri, ekran kazıma veya tarayıcı otomasyonu aracılığıyla\n * entegre olan sigorta ürünlerini temsil eder. Bu yaklaşım, doğrudan API entegrasyonu\n * mevcut olmadığında ve sistemin web arayüzleri veya eski sistemler ile etkileşim\n * kurması gerektiğinde kullanılır. Daha yavaş yanıt süreleri olabilir ve arayüz\n * değişikliklerine uyum sağlamak için düzenli bakım gerektirir ancak eski sistemlerle\n * entegrasyonu mümkün kılar.\n */\n Robot = \"ROBOT\",\n}\n\n/**\n * Customer Phone Number\n *\n * Represents a customer's phone number with country code for authentication and communication.\n * This structure is used throughout the platform for customer contact information and\n * multi-factor authentication processes.\n *\n * Müşterinin kimlik doğrulama ve iletişim için ülke kodu ile telefon numarasını temsil eder.\n * Bu yapı, müşteri iletişim bilgileri ve çok faktörlü kimlik doğrulama süreçleri için\n * platform genelinde kullanılır.\n */\nexport interface CustomerPhoneNumber {\n /**\n * Country calling code (e.g., 90 for Turkey)\n * Ülke arama kodu (örn. Türkiye için 90)\n */\n readonly countryCode: number;\n\n /**\n * Phone number without country code\n * Ülke kodu olmadan telefon numarası\n */\n readonly number: string;\n}\n","/**\n * @fileoverview Coverage-related Types and Enums - Insurance coverage types and related structures\n * @description Coverage types, values, and choices used throughout the InsurUp platform for insurance coverage configuration\n */\n\nimport type { ProductBranch } from \"./common.base.js\";\n\n/**\n * Represents different types of coverage values in insurance policies.\n * Used to define how coverage limits and benefits are calculated or applied.\n *\n * Sigorta poliçelerinde farklı teminat değeri türlerini temsil eder.\n * Teminat limitlerinin ve faydalarının nasıl hesaplandığını veya uygulandığını tanımlar.\n */\nexport type CoverageValue =\n | { $type: \"UNDEFINED\" }\n | { $type: \"INCLUDED\" }\n | { $type: \"NOT_INCLUDED\" }\n | { $type: \"MARKET_VALUE\" }\n | { $type: \"DECIMAL\"; value: number }\n | { $type: \"PERCENT\"; value: number }\n | { $type: \"LIMITLESS\" }\n | { $type: \"HIGHEST_LIMIT\" };\n\n/**\n * Generic class representing a collection of coverage options with a default selection.\n * Provides a standardized structure for defining available choices and default values for insurance coverage configurations.\n *\n * Varsayılan seçim ile teminat seçenekleri koleksiyonunu temsil eden genel sınıf.\n * Sigorta teminatı konfigürasyonları için mevcut seçenekleri ve varsayılan değerleri tanımlamak için standartlaştırılmış yapı sağlar.\n */\nexport interface CoverageChoices<T> {\n /**\n * The recommended default coverage option that is pre-selected for customers.\n * This value represents the most commonly chosen or recommended coverage level\n * based on risk assessment, regulatory requirements, or business strategy.\n * Customers can change this selection, but it serves as a starting point.\n *\n * Müşteriler için önceden seçilen önerilen varsayılan teminat seçeneği.\n * Bu değer, risk değerlendirmesi, düzenleyici gereksinimler veya iş stratejisine\n * dayalı olarak en yaygın seçilen veya önerilen teminat seviyesini temsil eder.\n * Müşteriler bu seçimi değiştirebilir, ancak başlangıç noktası olarak hizmet eder.\n */\n readonly default: T;\n\n /**\n * Complete array of all available coverage options that customers can choose from.\n * This includes the default option and all alternative coverage levels or types.\n * The array defines the full range of choices available for a specific coverage aspect,\n * enabling customers to customize their insurance according to their needs and budget.\n *\n * Müşterilerin seçebileceği tüm mevcut teminat seçeneklerinin tam dizisi.\n * Bu varsayılan seçeneği ve tüm alternatif teminat seviyelerini veya türlerini içerir.\n * Dizi, belirli bir teminat yönü için mevcut seçeneklerin tam aralığını tanımlar\n * ve müşterilerin ihtiyaçlarına ve bütçelerine göre sigortalarını özelleştirmelerini sağlar.\n */\n readonly values: readonly T[];\n}\n\n/**\n * Union type for all insurance coverage types.\n * Represents the different types of insurance coverage available in the system.\n *\n * Tüm sigorta teminat türleri için birleşim türü.\n * Sistemde mevcut farklı sigorta teminat türlerini temsil eder.\n */\nexport type Coverage =\n | KaskoCoverage\n | KonutCoverage\n | ImmCoverage\n | TssCoverage\n | EmptyCoverage;\n\n/**\n * Represents comprehensive auto insurance coverage (Kasko) in Turkish insurance system.\n * Kasko is a comprehensive coverage that protects against various risks including theft, collision, and damage.\n *\n * Türk sigorta sisteminde kapsamlı otomobil sigortası (Kasko) temsilini yapar.\n * Kasko, hırsızlık, çarpışma ve hasar dahil çeşitli risklere karşı koruyan kapsamlı bir teminattır.\n */\nexport interface KaskoCoverage {\n readonly productBranch: ProductBranch.Kasko;\n readonly immLimitiAyrimsiz?: CoverageValue;\n readonly ferdiKazaVefat?: CoverageValue;\n readonly ferdiKazaSakatlik?: CoverageValue;\n readonly ferdiKazaTedaviMasraflari?: CoverageValue;\n readonly anahtarKaybi?: CoverageValue;\n readonly maneviTazminat?: CoverageValue;\n readonly onarimServisTuru?: OnarimServisTuru;\n readonly yedekParcaTuru?: YedekParcaTuru;\n readonly camKirilmaMuafeyeti?: CoverageValue;\n readonly kiralikArac?: KiralikArac;\n readonly hukuksalKorumaAracaBagli?: CoverageValue;\n readonly ozelEsya?: CoverageValue;\n readonly sigaraMaddeZarari?: CoverageValue;\n readonly patlayiciMaddeZarari?: CoverageValue;\n readonly kemirgenZarari?: CoverageValue;\n readonly yukKaymasiZarari?: CoverageValue;\n readonly eskime?: CoverageValue;\n readonly hasarsizlikIndirimKoruma?: CoverageValue;\n readonly yurtdisiKasko?: CoverageValue;\n readonly aracCalinmasi?: CoverageValue;\n readonly anahtarCalinmasi?: CoverageValue;\n readonly hukuksalKorumaSurucuyeBagli?: CoverageValue;\n readonly miniOnarim?: CoverageValue;\n readonly yolYardim?: CoverageValue;\n readonly yanlisAkaryakitDolumu?: CoverageValue;\n readonly yanma?: CoverageValue;\n readonly carpma?: CoverageValue;\n readonly carpisma?: CoverageValue;\n readonly glkhhTeror?: CoverageValue;\n readonly grevLokavt?: CoverageValue;\n readonly dogalAfetler?: CoverageValue;\n readonly hirsizlik?: CoverageValue;\n}\n\n/**\n * Represents home insurance coverage (Konut Sigortası) in Turkish insurance system.\n * Home insurance provides comprehensive protection for residential properties and their contents against various risks.\n *\n * Türk sigorta sisteminde konut sigortası teminatını temsil eder.\n * Konut sigortası, konut konutları ve içeriklerini çeşitli risklere karşı kapsamlı koruma sağlar.\n */\nexport interface KonutCoverage {\n readonly productBranch: ProductBranch.Konut;\n readonly binaBedeli?: CoverageValue;\n readonly esyaBedeli?: CoverageValue;\n readonly elektronikCihazBedeli?: CoverageValue;\n readonly izolasyonBedeli?: CoverageValue;\n readonly camBedeli?: CoverageValue;\n readonly enflasyon?: CoverageValue;\n readonly metrekareInsaMaliyeti?: CoverageValue;\n}\n\n/**\n * Represents Voluntary Financial Liability (İMM - İhtiyari Mali Mesuliyet) insurance coverage in Turkish insurance system.\n * IMM provides additional liability coverage beyond the mandatory traffic insurance requirements.\n *\n * Türk sigorta sisteminde İhtiyari Mali Mesuliyet (İMM) sigortası teminatını temsil eder.\n * İMM, zorunlu trafik sigortası gereksinimlerinin ötesinde ek sorumluluk teminatı sağlar.\n */\nexport interface ImmCoverage {\n readonly productBranch: ProductBranch.Imm;\n readonly immLimitiAyrimsiz?: CoverageValue;\n readonly kiralikArac?: KiralikArac;\n readonly tasinanYuk?: TasinanYuk;\n}\n\n/**\n * Represents Turkish Complementary Health Insurance (TSS - Tamamlayıcı Sağlık Sigortası) coverage.\n * TSS provides additional coverage beyond the basic SGK (Social Security Institution) benefits,\n * offering enhanced access to private healthcare services and reduced out-of-pocket expenses.\n *\n * Türk Tamamlayıcı Sağlık Sigortası (TSS) teminatını temsil eder.\n * TSS, temel SGK (Sosyal Güvenlik Kurumu) faydalarının ötesinde ek teminat sağlar,\n * özel sağlık hizmetlerine gelişmiş erişim ve düşük cepten ödemeler sunar.\n */\nexport interface TssCoverage {\n readonly productBranch: ProductBranch.Tss;\n readonly hastaneAgi?: HastaneAgi;\n readonly saglikPaketi?: SaglikPaketi;\n}\n\n/**\n * Represents an empty coverage placeholder that contains no actual coverage benefits.\n * Used as a default or null object pattern implementation for coverage scenarios where no specific coverage is defined.\n *\n * Gerçek teminat faydaları içermeyen boş bir teminat yer tutucusunu temsil eder.\n * Belirli bir teminatın tanımlanmadığı teminat senaryoları için varsayılan veya null nesne deseni uygulaması olarak kullanılır.\n */\nexport interface EmptyCoverage {\n readonly productBranch: string;\n}\n\n/**\n * Types of repair services in Turkish insurance industry.\n * These terms are specific to Turkish insurance regulations and practices.\n *\n * Türk sigorta sektöründeki onarım servis türleri.\n * Bu terimler Türk sigorta düzenlemeleri ve uygulamalarına özeldir.\n */\nexport enum OnarimServisTuru {\n /**\n * Unspecified/undefined repair service type\n * Belirsiz/tanımsız onarım servis türü\n */\n Belirsiz = \"BELIRSIZ\",\n\n /**\n * Contracted private service - Private repair shops with insurance company contracts\n * Anlaşmalı özel servis - Sigorta şirketi ile anlaşmalı özel onarım atölyeleri\n */\n AnlasmaliOzelServis = \"ANLASMALI_OZEL_SERVIS\",\n\n /**\n * Contracted authorized service - Brand authorized services with insurance contracts\n * Anlaşmalı yetkili servis - Sigorta şirketi ile anlaşmalı marka yetkili servisleri\n */\n AnlasmaliYetkiliServis = \"ANLASMALI_YETKILI_SERVIS\",\n\n /**\n * Authorized service - Official brand authorized service centers\n * Yetkili servis - Resmi marka yetkili servis merkezleri\n */\n YetkiliServis = \"YETKILI_SERVIS\",\n\n /**\n * Private service - Independent repair shops\n * Özel servis - Bağımsız onarım atölyeleri\n */\n OzelServis = \"OZEL_SERVIS\",\n\n /**\n * Insured determines - Policy holder chooses the repair service\n * Sigortalı belirler - Poliçe sahibi onarım servisini kendisi seçer\n */\n SigortaliBelirler = \"SIGORTALI_BELIRLER\",\n}\n\n/**\n * Types of spare parts in Turkish insurance industry.\n * These classifications are specific to Turkish insurance regulations.\n *\n * Türk sigorta sektöründeki yedek parça türleri.\n * Bu sınıflandırmalar Türk sigorta düzenlemelerine özeldir.\n */\nexport enum YedekParcaTuru {\n /**\n * Unspecified/undefined spare part type\n * Belirsiz/tanımsız yedek parça türü\n */\n Belirsiz = \"BELIRSIZ\",\n\n /**\n * Original parts - Genuine manufacturer parts (OEM)\n * Orijinal parçalar - Gerçek üretici parçaları (OEM)\n */\n OrijinalParca = \"ORIJINAL_PARCA\",\n\n /**\n * Equivalent parts - Compatible aftermarket parts with equivalent quality\n * Eşdeğer parçalar - Eşdeğer kalitede uyumlu yan sanayi parçaları\n */\n EsdegerParca = \"ESDEGER_PARCA\",\n}\n\n/**\n * Represents rental vehicle information in Turkish insurance context.\n * \"Kiralık Araç\" is a specific concept in Turkish motor insurance.\n *\n * Türk sigorta bağlamında kiralık araç bilgilerini temsil eder.\n * \"Kiralık Araç\" Türk motorlu taşıt sigortasında özel bir kavramdır.\n */\nexport type KiralikArac =\n | { $type: \"NONE\" }\n | { $type: \"UNDEFINED\" }\n | {\n $type: \"DEFINED\";\n yillikKullanimSayisi?: number;\n tekSeferlikGunSayisi?: number;\n aracSegment?: AracSegment;\n };\n\n/**\n * Represents car classification segments used internationally in automotive industry.\n * The A-F classification system is a European standard adopted globally.\n *\n * Sigorta sınıflandırmasında kullanılan araç segmentlerini temsil eder.\n * Segmentler genellikle aracın boyutuna, fiyatına ve kategorisine göre belirlenir.\n */\nexport enum AracSegment {\n /**\n * A Segment - Mini and city cars (e.g., Fiat 500, Renault Twingo, Volkswagen Up)\n * A Segmenti - Mini ve şehir arabaları\n */\n A = \"A\",\n\n /**\n * B Segment - Small class cars (e.g., Ford Fiesta, Volkswagen Polo, Renault Clio)\n * B Segmenti - Küçük sınıf arabalar\n */\n B = \"B\",\n\n /**\n * C Segment - Mid-size cars (e.g., Volkswagen Golf, Ford Focus, Toyota Corolla)\n * C Segmenti - Orta sınıf arabalar\n */\n C = \"C\",\n\n /**\n * D Segment - Upper mid-size cars (e.g., Volkswagen Passat, Ford Mondeo, BMW 3 Series)\n * D Segmenti - Üst orta sınıf arabalar\n */\n D = \"D\",\n\n /**\n * E Segment - Upper class cars (e.g., BMW 5 Series, Mercedes E Series, Audi A6)\n * E Segmenti - Üst sınıf arabalar\n */\n E = \"E\",\n\n /**\n * F Segment - Luxury class cars (e.g., BMW 7 Series, Mercedes S Series, Audi A8)\n * F Segmenti - Lüks sınıf arabalar\n */\n F = \"F\",\n\n /**\n * The replacement vehicle must be in the same segment as the insured vehicle\n * Sigortalı aracın segmenti ne ise, ikame aracın da aynı segmentte olması gerekir\n */\n SegmenteSegment = \"SEGMENTE_SEGMENT\",\n}\n\n/**\n * Represents hospital network coverage levels in Turkish health insurance system.\n * Different network types provide varying levels of hospital partnerships and service coverage.\n *\n * Türk sağlık sigortası sisteminde hastane ağı kapsam seviyelerini temsil eder.\n * Farklı ağ türleri değişen hastane ortaklığı ve hizmet kapsam seviyeleri sunar.\n */\nexport enum HastaneAgi {\n /**\n * Unknown or undefined hospital network coverage.\n * Bilinmeyen veya tanımlanmamış hastane ağı kapsamı.\n */\n Bilinmiyor = \"BILINMIYOR\",\n\n /**\n * Narrow coverage hospital network with basic health services.\n * Temel sağlık hizmeti sunan dar kapsam hastane ağı.\n */\n DarKapsam = \"DAR_KAPSAM\",\n\n /**\n * Standard coverage hospital network with moderate service variety.\n * Orta düzeyde hizmet çeşitliliği sunan standart kapsam hastane ağı.\n */\n StandartKapsam = \"STANDART_KAPSAM\",\n\n /**\n * Wide coverage hospital network with comprehensive healthcare services.\n * Kapsamlı sağlık hizmetleri sunan geniş kapsam hastane ağı.\n */\n GenisKapsam = \"GENIS_KAPSAM\",\n}\n\n/**\n * Represents treatment types for Turkish complementary health insurance packages.\n * Defines whether coverage applies to inpatient-only or combined inpatient+outpatient treatment modalities.\n *\n * Türk tamamlayıcı sağlık sigortası paketleri için tedavi türlerini temsil eder.\n * Teminatın yatarak veya yatarak + ayakta tedavi modalitesinde geçerli olup olmadığını tanımlar.\n */\nexport enum SaglikPaketiTedaviSekli {\n /**\n * Unknown or undefined treatment type.\n * Bilinmeyen veya tanımlanmamış tedavi türü.\n */\n Bilinmiyor = \"BILINMIYOR\",\n\n /**\n * Inpatient treatment coverage only.\n * Sadece yatarak tedavi kapsamı.\n */\n Yatarak = \"YATARAK\",\n\n /**\n * Combined inpatient and outpatient treatment coverage.\n * Yatarak ve ayakta tedavi kapsamının birleşimi.\n */\n YatarakAyakta = \"YATARAK_AYAKTA\",\n}\n\n/**\n * Represents a health insurance package configuration for Turkish complementary health insurance.\n * Defines treatment coverage types and annual outpatient treatment limits.\n *\n * Türk tamamlayıcı sağlık sigortası için sağlık sigortası paketi konfigürasyonunu temsil eder.\n * Tedavi kapsam türlerini ve yıllık ayakta tedavi limitlerini tanımlar.\n */\nexport interface SaglikPaketi {\n /**\n * The treatment type covered by this health package.\n * Bu sağlık paketi tarafından kapsanan tedavi türü.\n */\n readonly tedaviSekli: SaglikPaketiTedaviSekli;\n\n /**\n * The annual limit for outpatient treatments.\n * Ayakta tedaviler için yıllık limit.\n */\n readonly ayaktaYillikTedaviSayisi?: number;\n}\n\n/**\n * Represents types of transported cargo for Turkish cargo insurance.\n *\n * Türk kargo sigortası için taşınan yük türlerini temsil eder.\n */\nexport enum TasinanYuk {\n /**\n * Undefined cargo type.\n * Belirsiz yük türü.\n */\n Belirsiz = \"BELIRSIZ\",\n\n /**\n * No specific cargo type.\n * Belirli bir yük türü yok.\n */\n Yok = \"YOK\",\n\n /**\n * Wood logs and lumber.\n * Ağaç kütükleri ve kereste.\n */\n AgacKutukleriveKereste = \"AGAC_KUTUKLERIVE_KERESTE\",\n\n /**\n * Fuel and petroleum products.\n * Akaryakıt ve petrol ürünleri.\n */\n Akaryakit = \"AKARYAKIT\",\n\n /**\n * Shoes and leather goods.\n * Ayakkabı ve saraciye ürünleri.\n */\n AyakkabiSaraciye = \"AYAKKABI_SARACIYE\",\n\n /**\n * Grocery and delicatessen products.\n * Bakkaliye ve şarküteri ürünleri.\n */\n BakkaliyeveSharkuteriUrunleri = \"BAKKALIYE_VE_SHARKUTERI_URUNLERI\",\n\n /**\n * All kinds of stationery materials.\n * Bilumum kırtasiye malzemeleri.\n */\n BilumumKirtasiyeMalzemeleri = \"BILUMUM_KIRTASIYE_MALZEMELERI\",\n\n /**\n * Bulk water and milk.\n * Dökme su ve süt.\n */\n DokmeSuveSut = \"DOKME_SU_VE_SUT\",\n\n /**\n * Carpet and rugs.\n * Halı ve kilim.\n */\n HaliveKilim = \"HALI_VE_KILIM\",\n\n /**\n * Raw, semi-finished and finished paper products.\n * Ham, yarı mamül ve mamül kağıt ürünleri.\n */\n HamYariMamulveMamulKagit = \"HAM_YARI_MAMUL_VE_MAMUL_KAGIT\",\n\n /**\n * Ready-mix concrete.\n * Hazır beton.\n */\n HazirBeton = \"HAZIR_BETON\",\n\n /**\n * All kinds of household appliances.\n * Her nevi ev aletleri.\n */\n HerNeviEvAletleri = \"HER_NEVI_EV_ALETLERI\",\n\n /**\n * All kinds of bulk coal and wood.\n * Her türlü dökme kömür ve odun.\n */\n HerTurluDokmeKomurvOdun = \"HER_TURLU_DOKME_KOMUR_V_ODUN\",\n\n /**\n * Cereals and legumes.\n * Hububat ve bakliyat.\n */\n HububatveBakliyat = \"HUBUBAT_VE_BAKLIYAT\",\n\n /**\n * Rough construction materials.\n * Kaba inşaat malzemeleri.\n */\n KabaInsaatMalzemeleri = \"KABA_INSAAT_MALZEMELERI\",\n\n /**\n * Tire and rubber products.\n * Lastik ve kauçuk ürünleri.\n */\n LastikKaucukUrunleri = \"LASTIK_KAUCUK_URUNLERI\",\n\n /**\n * Liquid chemical substances.\n * Likid kimyevi maddeler.\n */\n LikidKimyeviMadde = \"LIKID_KIMYEVI_MADDE\",\n\n /**\n * LPG gas cylinders.\n * LPG gaz tüpleri.\n */\n LpgGazTupu = \"LPG_GAZ_TUPU\",\n\n /**\n * Machine parts and spare parts.\n * Makine aksam ve yedekleri.\n */\n MakineAksamveYedekleri = \"MAKINE_AKSAM_VE_YEDEKLERI\",\n\n /**\n * Furniture materials.\n * Mobilya malzemesi.\n */\n MobilyaMalzemesi = \"MOBILYA_MALZEMESI\",\n\n /**\n * Various household items.\n * Muhtelif ev eşyası.\n */\n MuhtelifEvEsyasi = \"MUHTELIF_EV_ESYASI\",\n\n /**\n * Auto spare parts.\n * Oto yedek parçaları.\n */\n OtoYedekParcalari = \"OTO_YEDEK_PARCALARI\",\n\n /**\n * Plastic products.\n * Plastik mamülleri.\n */\n PlastikMamulleri = \"PLASTIK_MAMULLERI\",\n\n /**\n * Synthetic fiber products.\n * Sentetik elyaf ürünleri.\n */\n SentetikElyafUrunleri = \"SENTETIK_ELYAF_URUNLERI\",\n\n /**\n * Synthetic plastic paint products.\n * Sentetik plastik boya ürünleri.\n */\n SentetikPlastikBoyaUrunleri = \"SENTETIK_PLASTIK_BOYA_URUNLERI\",\n\n /**\n * Textile products.\n * Tekstil ürünleri.\n */\n TekstilUrunleri = \"TEKSTIL_URUNLERI\",\n\n /**\n * Cleaning materials.\n * Temizlik maddeleri.\n */\n TemizlikMaddeleri = \"TEMIZLIK_MADDELERI\",\n\n /**\n * Fresh fruits and vegetables.\n * Yaş meyve ve sebze.\n */\n YasMeyveveSebze = \"YAS_MEYVE_VE_SEBZE\",\n}\n\n/**\n * Checks if a value is a CoverageValue type\n */\nfunction isCoverageValue(value: unknown): value is CoverageValue {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"$type\" in value &&\n typeof (value as { $type: unknown }).$type === \"string\"\n );\n}\n\n/**\n * Dynamically merges coverage objects of the same product branch.\n * Handles UNDEFINED coverage values by giving precedence to non-UNDEFINED values.\n * Ensures all coverages have the same productBranch.\n */\nexport function mergeCoverage(...coverages: Coverage[]): Coverage {\n if (coverages.length === 0) {\n throw new Error(\"Cannot merge empty coverage array\");\n }\n\n // Filter out any null/undefined coverages\n const validCoverages = coverages.filter(\n (coverage): coverage is Coverage => coverage != null,\n );\n\n if (validCoverages.length === 0) {\n throw new Error(\"No valid coverages to merge\");\n }\n\n // Get the product branch from the first coverage\n const firstCoverage = validCoverages[0]!;\n const productBranch = firstCoverage.productBranch;\n\n // Validate that all coverages have the same product branch\n for (const coverage of validCoverages) {\n if (coverage.productBranch !== productBranch) {\n throw new Error(\n `All coverages must have the same productBranch. Expected: ${productBranch}, but found: ${coverage.productBranch}`,\n );\n }\n }\n\n // Helper function to merge coverage values with precedence rules\n const mergeCoverageValue = (\n values: (CoverageValue | undefined)[],\n ): CoverageValue | undefined => {\n const definedValues = values.filter(\n (value): value is CoverageValue => value != null,\n );\n\n if (definedValues.length === 0) {\n return undefined;\n }\n\n // Priority order: non-UNDEFINED values take precedence over UNDEFINED\n // If multiple non-UNDEFINED values exist, use the last one (later coverages override earlier ones)\n const nonUndefinedValues = definedValues.filter(\n (value) => value.$type !== \"UNDEFINED\",\n );\n\n if (nonUndefinedValues.length > 0) {\n // Return the last non-UNDEFINED value\n return nonUndefinedValues[nonUndefinedValues.length - 1];\n }\n\n // If all values are UNDEFINED, return UNDEFINED\n return { $type: \"UNDEFINED\" };\n };\n\n // Helper function to merge non-CoverageValue properties (use last defined value)\n const mergeProperty = <T>(values: (T | undefined)[]): T | undefined => {\n const definedValues = values.filter((value): value is T => value != null);\n return definedValues.length > 0\n ? definedValues[definedValues.length - 1]\n : undefined;\n };\n\n // Get all unique property keys from all coverages (excluding productBranch)\n const allKeys = new Set<string>();\n for (const coverage of validCoverages) {\n Object.keys(coverage).forEach((key) => {\n if (key !== \"productBranch\") {\n allKeys.add(key);\n }\n });\n }\n\n // Create the merged coverage object dynamically\n const merged: Record<string, unknown> = {\n productBranch,\n };\n\n // Merge each property dynamically\n for (const key of allKeys) {\n const values = validCoverages.map(\n (coverage) => (coverage as unknown as Record<string, unknown>)[key],\n );\n\n // Check if this property contains CoverageValue objects\n const sampleValue = values.find((v) => v != null);\n\n if (isCoverageValue(sampleValue)) {\n // Use CoverageValue merging logic\n merged[key] = mergeCoverageValue(values as (CoverageValue | undefined)[]);\n } else {\n // Use regular property merging logic\n merged[key] = mergeProperty(values);\n }\n }\n\n return merged as unknown as Coverage;\n}\n","/**\n * @fileoverview Common Policy Types - Policy transfer and policy-related types\n * @description Policy transfer enums and types used throughout the InsurUp platform\n */\n\n// ============================================================================\n// POLICY TRANSFER ENUMS\n// ============================================================================\n\n/**\n * Policy Transfer Trigger Status / Poliçe Transfer Tetikleme Durumu\n *\n * Represents the execution status of a policy transfer trigger operation.\n * This tracks the lifecycle of an automated policy transfer job from initiation\n * to completion. The status indicates whether the transfer process has started,\n * completed successfully, or failed during execution.\n *\n * Poliçe transfer tetikleme işleminin yürütme durumunu temsil eder.\n * Bu, otomatik poliçe transfer işinin başlatılmasından tamamlanmasına kadar olan\n * yaşam döngüsünü takip eder. Durum, transfer sürecinin başlatılıp başlatılmadığını,\n * başarıyla tamamlanıp tamamlanmadığını veya yürütme sırasında başarısız olup olmadığını gösterir.\n */\nexport enum PolicyTransferTriggerStatus {\n /**\n * The policy transfer process completed successfully without errors.\n * All policies within the specified date range were processed, and the transfer\n * operation finished without any critical failures. Individual policy transfers\n * may still have been skipped or failed, but the overall process completed.\n *\n * Poliçe transfer süreci hatasız olarak başarıyla tamamlandı.\n * Belirtilen tarih aralığındaki tüm poliçeler işlendi ve transfer işlemi\n * kritik herhangi bir başarısızlık olmadan bitti. Bireysel poliçe transferleri\n * yine de atlanmış veya başarısız olmuş olabilir, ancak genel süreç tamamlandı.\n */\n Succeeded = \"SUCCEEDED\",\n\n /**\n * The policy transfer process failed due to an error or exception.\n * This indicates that the transfer job encountered a critical error that prevented\n * it from completing successfully. This could be due to system connectivity issues,\n * authentication failures, or other technical problems that halted the process.\n *\n * Poliçe transfer süreci bir hata veya istisna nedeniyle başarısız oldu.\n * Bu, transfer işinin başarıyla tamamlanmasını engelleyen kritik bir hatayla\n * karşılaştığını gösterir. Bu, sistem bağlantı sorunları, kimlik doğrulama başarısızlıkları\n * veya süreci durduran diğer teknik sorunlar nedeniyle olabilir.\n */\n Failed = \"TRIGGER_STATUS_FAILED\",\n}\n\n/**\n * Policy Transfer Company Failure Reason / Poliçe Transfer Şirket Başarısızlık Nedeni\n *\n * Represents specific reasons why policy transfer from an insurance company failed during\n * the automated policy transfer process. This is used when attempting to retrieve and transfer\n * policies from one insurance company system to another. Company-level failures occur when\n * the source insurance company's system cannot provide the requested policy data.\n *\n * Otomatik poliçe transfer süreci sırasında sigorta şirketinden poliçe transferinin neden\n * başarısız olduğunu belirten özel nedenleri temsil eder. Bu, bir sigorta şirket sisteminden\n * diğerine poliçeleri almaya ve transfer etmeye çalışırken kullanılır. Şirket seviyesindeki\n * başarısızlıklar, kaynak sigorta şirketinin sistemi talep edilen poliçe verilerini sağlayamadığında oluşur.\n */\nexport enum PolicyTransferCompanyFailureReason {\n /**\n * An unknown or unspecified failure occurred during the policy transfer process from the company.\n * This is used as a fallback when the specific cause of failure cannot be determined or categorized.\n * It may indicate system errors, unexpected responses, or technical issues that don't fit\n * other specific failure categories.\n *\n * Şirketten poliçe transfer süreci sırasında bilinmeyen veya belirtilmemiş bir hata oluştu.\n * Bu, başarısızlığın özel nedeninin belirlenemediği veya kategorilendirilmediği durumlarda\n * yedek olarak kullanılır. Sistem hataları, beklenmeyen yanıtlar veya diğer özel\n * başarısızlık kategorilerine uymayan teknik sorunları gösterebilir.\n */\n Unknown = \"UNKNOWN\",\n\n /**\n * Failed to retrieve policies from the insurance company's system during the transfer process.\n * This occurs when the source company's API or data systems are unavailable, returning errors,\n * or the requested policy data cannot be accessed. This could be due to system downtime,\n * authentication issues, or data access restrictions.\n *\n * Transfer süreci sırasında sigorta şirketinin sisteminden poliçeler alınamadı.\n * Bu durum, kaynak şirketin API'si veya veri sistemleri kullanılamadığında, hata döndürdüğünde\n * veya talep edilen poliçe verilerine erişilemediğinde oluşur. Sistem kesintisi,\n * kimlik doğrulama sorunları veya veri erişim kısıtlamaları nedeniyle olabilir.\n */\n CouldNotFetchPolicies = \"COULD_NOT_FETCH_POLICIES\",\n}\n\n/**\n * Transferred Policy Status / Transfer Edilen Poliçe Durumu\n *\n * Represents the final status of an individual policy transfer operation.\n * This indicates whether a specific policy was successfully transferred, failed\n * during processing, or was intentionally skipped due to business rules or\n * data constraints. The status helps in reporting and auditing transfer results.\n *\n * Bireysel poliçe transfer işleminin nihai durumunu temsil eder.\n * Bu, belirli bir poliçenin başarıyla transfer edilip edilmediğini, işleme sırasında\n * başarısız olup olmadığını veya iş kuralları ya da veri kısıtlamaları nedeniyle\n * kasıtlı olarak atlanıp atlanmadığını gösterir. Durum, transfer sonuçlarının\n * raporlanması ve denetlenmesinde yardımcı olur.\n */\nexport enum TransferredPolicyStatus {\n /**\n * The policy was successfully transferred to the target system.\n * This indicates that all policy data, including customer information,\n * coverage details, and related records, were validated and imported\n * without errors. The policy is now available in the destination system.\n *\n * Poliçe hedef sisteme başarıyla transfer edildi.\n * Bu, müşteri bilgileri, teminat detayları ve ilgili kayıtlar da dahil olmak üzere\n * tüm poliçe verilerinin doğrulandığını ve hatasız olarak içe aktarıldığını gösterir.\n * Poliçe artık hedef sistemde kullanılabilir durumda.\n */\n Success = \"SUCCESS\",\n\n /**\n * The policy transfer failed due to validation errors or processing issues.\n * This occurs when the policy data doesn't meet validation requirements,\n * has missing or invalid information, or encounters system errors during\n * processing. The specific failure reason is typically recorded separately.\n *\n * Poliçe transfer doğrulama hataları veya işleme sorunları nedeniyle başarısız oldu.\n * Bu durum, poliçe verilerinin doğrulama gereksinimlerini karşılamaması,\n * eksik veya geçersiz bilgilere sahip olması veya işleme sırasında sistem\n * hatalarıyla karşılaşması durumunda oluşur. Özel başarısızlık nedeni genellikle ayrı olarak kaydedilir.\n */\n Failed = \"TRANSFER_FAILED\",\n\n /**\n * The policy was intentionally skipped during transfer due to business rules.\n * Unlike failed policies, skipped policies are bypassed for logical reasons\n * such as duplicate prevention, unsupported product types, or dependency\n * requirements. The specific skip reason is typically recorded separately.\n *\n * Poliçe iş kuralları nedeniyle transfer sırasında kasıtlı olarak atlandı.\n * Başarısız poliçelerin aksine, atlanan poliçeler yineleme önleme, desteklenmeyen\n * ürün türleri veya bağımlılık gereksinimleri gibi mantıksal nedenlerle atlanır.\n * Özel atlama nedeni genellikle ayrı olarak kaydedilir.\n */\n Skipped = \"TRANSFER_SKIPPED\",\n}\n\n/**\n * Transferred Policy Skip Reason / Transfer Edilen Poliçe Atlama Nedeni\n *\n * Represents reasons why a policy was skipped during the automated transfer process.\n * Unlike failures, skipped policies are intentionally bypassed due to business rules,\n * data constraints, or logical conditions that prevent processing. Skipped policies\n * help maintain data integrity and avoid duplicate or invalid transfers.\n *\n * Otomatik transfer süreci sırasında poliçenin neden atlandığını belirten nedenleri temsil eder.\n * Başarısızlıklardan farklı olarak, atlanan poliçeler iş kuralları, veri kısıtlamaları\n * veya işlemeyi engelleyen mantıksal koşullar nedeniyle kasıtlı olarak atlanır. Atlanan poliçeler\n * veri bütünlüğünü korumaya ve yinelenen veya geçersiz transferleri önlemeye yardımcı olur.\n */\nexport enum TransferredPolicySkipReason {\n /**\n * Unknown or unspecified reason for skipping the policy transfer.\n * This is used when the specific reason for skipping cannot be determined\n * or categorized into other skip reasons. It serves as a fallback value\n * for edge cases or unexpected conditions.\n *\n * Poliçe transferinin atlanması için bilinmeyen veya belirtilmemiş neden.\n * Bu, atlamanın özel nedeninin belirlenemediği veya diğer atlama nedenlerine\n * kategorilendirilemediği durumlarda kullanılır. Sınır durumları veya\n * beklenmeyen koşullar için yedek değer olarak hizmet eder.\n */\n Unknown = \"UNKNOWN\",\n\n /**\n * The policy has already been transferred previously and exists in the target system.\n * This prevents duplicate policy imports and maintains data integrity. The system\n * checks for existing policies using unique identifiers such as policy number,\n * renewal number, and insurance company information.\n *\n * Poliçe daha önce transfer edilmiş ve hedef sistemde mevcut.\n * Bu, yinelenen poliçe içe aktarımlarını önler ve veri bütünlüğünü korur. Sistem,\n * poliçe numarası, yenileme numarası ve sigorta şirket bilgileri gibi benzersiz\n * tanımlayıcıları kullanarak mevcut poliçeleri kontrol eder.\n */\n AlreadyTransferred = \"SKIP_ALREADY_TRANSFERRED\",\n\n /**\n * The previous version of the policy could not be found in the target system.\n * This occurs when transferring policy renewals or endorsements that depend on\n * a base policy version. Without the foundation policy, the renewal or endorsement\n * cannot be properly linked and is skipped to maintain referential integrity.\n *\n * Poliçenin önceki versiyonu hedef sistemde bulunamadı.\n * Bu durum, temel poliçe versiyonuna bağlı olan poliçe yenilemeleri veya zeylleri\n * transfer edilirken oluşur. Temel poliçe olmadan, yenileme veya zeyil düzgün şekilde\n * bağlanamaz ve referans bütünlüğünü korumak için atlanır.\n */\n PreviousVersionNotFound = \"PREVIOUS_VERSION_NOT_FOUND\",\n\n /**\n * The product branch is not supported by the target system.\n * This occurs when the source system contains insurance product types\n * (such as life, health, property, or motor insurance branches) that are not\n * configured or supported in the destination system. These policies are\n * skipped to avoid import errors.\n *\n * Ürün dalı hedef sistem tarafından desteklenmiyor.\n * Bu durum, kaynak sistemin hedef sistemde yapılandırılmamış veya desteklenmeyen\n * sigorta ürün türleri (hayat, sağlık, konut veya motorlu araç sigortası dalları gibi)\n * içermesi durumunda oluşur. Bu poliçeler içe aktarma hatalarını önlemek için atlanır.\n */\n ProductBranchNotSupported = \"PRODUCT_BRANCH_NOT_SUPPORTED\",\n\n /**\n * The specific product is not supported by the target system.\n * This occurs when the exact insurance product variant or configuration\n * from the source system doesn't have a corresponding mapping in the\n * destination system. Even if the general product branch is supported,\n * specific product configurations may not be transferable.\n *\n * Özel ürün hedef sistem tarafından desteklenmiyor.\n * Bu durum, kaynak sistemdeki tam sigorta ürün varyantı veya yapılandırmasının\n * hedef sistemde karşılık gelen eşlemesi bulunmadığında oluşur. Genel ürün dalı\n * desteklense bile, özel ürün yapılandırmaları transfer edilemeyebilir.\n */\n ProductNotSupported = \"PRODUCT_NOT_SUPPORTED\",\n}\n\n/**\n * Transferred Policy Failure Reason / Transfer Edilen Poliçe Başarısızlık Nedeni\n *\n * Represents specific reasons why an individual policy transfer failed during the automated\n * transfer process. This provides detailed categorization of policy-level failures that occur\n * when transferring individual policies from one system to another. Each reason helps identify\n * the specific data validation or processing issue that prevented successful policy import.\n *\n * Otomatik transfer süreci sırasında bireysel poliçe transferinin neden başarısız olduğunu\n * belirten özel nedenleri temsil eder. Bu, bir sistemden diğerine bireysel poliçe transferi\n * sırasında oluşan poliçe seviyesindeki başarısızlıkların ayrıntılı kategorizasyonunu sağlar.\n * Her neden, başarılı poliçe içe aktarımını engelleyen özel veri doğrulama veya işleme sorununu\n * belirlemeye yardımcı olur.\n */\nexport enum TransferredPolicyFailureReason {\n /**\n * An unknown or unspecified failure occurred during the individual policy transfer.\n * This is used when the specific cause of failure cannot be determined or categorized\n * into other failure reasons. It may indicate unexpected errors or edge cases\n * not covered by other specific failure categories.\n *\n * Bireysel poliçe transfer sırasında bilinmeyen veya belirtilmemiş bir hata oluştu.\n * Bu, başarısızlığın özel nedeninin belirlenemediği veya diğer başarısızlık nedenlerine\n * kategorilendirilemediği durumlarda kullanılır. Beklenmeyen hataları veya diğer özel\n * başarısızlık kategorileri kapsamında olmayan sınır durumları gösterebilir.\n */\n Unknown = \"UNKNOWN\",\n\n /**\n * The customer's identity number (T.C. Kimlik No) is invalid or incorrectly formatted.\n * This occurs when the Turkish citizenship number doesn't pass validation checks,\n * has incorrect length, contains invalid characters, or fails checksum validation.\n * Valid Turkish identity numbers must be 11 digits and pass specific algorithm checks.\n *\n * Müşterinin kimlik numarası (T.C. Kimlik No) geçersiz veya yanlış formatlı.\n * Bu durum, Türk vatandaşlık numarası doğrulama kontrollerini geçmediğinde,\n * yanlış uzunluğa sahip olduğunda, geçersiz karakterler içerdiğinde veya\n * kontrol toplamı doğrulamasını geçemediğinde oluşur. Geçerli Türk kimlik numaraları\n * 11 haneli olmalı ve belirli algoritma kontrollerini geçmelidir.\n */\n InvalidCustomerIdentityNumber = \"INVALID_CUSTOMER_IDENTITY_NUMBER\",\n\n /**\n * The customer's company title is invalid or missing for corporate customers.\n * This occurs when transferring policies for business entities and the company name\n * is empty, too short, contains invalid characters, or doesn't meet minimum\n * requirements for corporate entity identification.\n *\n * Kurumsal müşteriler için müşterinin şirket unvanı geçersiz veya eksik.\n * Bu durum, işletme kuruluşları için poliçe transferi yapılırken şirket adının\n * boş olması, çok kısa olması, geçersiz karakterler içermesi veya kurumsal\n * kuruluş tanımlaması için minimum gereksinimleri karşılamaması durumunda oluşur.\n */\n InvalidCustomerCompanyTitle = \"INVALID_CUSTOMER_COMPANY_TITLE\",\n\n /**\n * The customer's tax number is invalid or incorrectly formatted for corporate customers.\n * This occurs when the tax identification number doesn't meet the required format,\n * length, or validation rules for Turkish tax numbers. Valid tax numbers must be\n * 10 digits for companies or 11 digits for individual taxpayers.\n *\n * Kurumsal müşteriler için müşterinin vergi numarası geçersiz veya yanlış formatlı.\n * Bu durum, vergi kimlik numarasının Türk vergi numaraları için gerekli format,\n * uzunluk veya doğrulama kurallarını karşılamaması durumunda oluşur. Geçerli vergi numaraları\n * şirketler için 10 haneli veya bireysel mükellefler için 11 haneli olmalıdır.\n */\n InvalidCustomerTaxNumber = \"INVALID_CUSTOMER_TAX_NUMBER\",\n\n /**\n * The customer type is invalid or not supported by the target system.\n * This occurs when the customer classification (individual, corporate, etc.)\n * is not recognized or supported in the destination system, or when the\n * customer type field contains invalid values.\n *\n * Müşteri türü geçersiz veya hedef sistem tarafından desteklenmiyor.\n * Bu durum, müşteri sınıflandırmasının (bireysel, kurumsal, vb.) hedef sistemde\n * tanınmaması veya desteklenmemesi ya da müşteri türü alanının geçersiz\n * değerler içermesi durumunda oluşur.\n */\n InvalidCustomerType = \"INVALID_CUSTOMER_TYPE\",\n\n /**\n * The vehicle information is invalid or incomplete for motor insurance policies.\n * This can occur when vehicle identification data (chassis number, license plate,\n * engine number, model information) is missing, incorrectly formatted, or doesn't\n * match validation requirements for Turkish vehicle registration standards.\n *\n * Motorlu araç sigortası poliçeleri için araç bilgileri geçersiz veya eksik.\n * Bu durum, araç tanımlama verilerinin (şasi numarası, plaka, motor numarası,\n * model bilgileri) eksik olması, yanlış formatlanması veya Türk araç tescil\n * standartları için doğrulama gereksinimlerini karşılamaması durumunda oluşabilir.\n */\n InvalidVehicle = \"INVALID_VEHICLE\",\n\n /**\n * The property information is invalid or incomplete for property insurance policies.\n * This occurs when property details such as address, construction type, area,\n * or value information is missing, incorrectly formatted, or doesn't meet\n * validation requirements for property insurance coverage.\n *\n * Konut sigortası poliçeleri için konut bilgileri geçersiz veya eksik.\n * Bu durum, adres, yapı türü, alan veya değer bilgileri gibi konut detaylarının\n * eksik olması, yanlış formatlanması veya konut sigortası teminatı için\n * doğrulama gereksinimlerini karşılamaması durumunda oluşur.\n */\n InvalidProperty = \"INVALID_PROPERTY\",\n\n /**\n * The policy end date is invalid or in the wrong format.\n * This occurs when the policy expiration date is missing, not a valid date,\n * in an incorrect format, or doesn't make logical sense (e.g., end date\n * before start date). All policy dates must be valid and properly formatted.\n *\n * Poliçe bitiş tarihi geçersiz veya yanlış formatta.\n * Bu durum, poliçe son kullanma tarihinin eksik olması, geçerli bir tarih olmaması,\n * yanlış formatta olması veya mantıksal olarak anlam ifade etmemesi\n * (örneğin, bitiş tarihinin başlangıç tarihinden önce olması) durumunda oluşur.\n * Tüm poliçe tarihleri geçerli ve düzgün formatlanmış olmalıdır.\n */\n InvalidEndDate = \"INVALID_END_DATE\",\n\n /**\n * The policy start date is invalid or in the wrong format.\n * This occurs when the policy effective date is missing, not a valid date,\n * in an incorrect format, or doesn't make logical sense within the policy\n * context. Policy start dates must be valid and properly formatted dates.\n *\n * Poliçe başlangıç tarihi geçersiz veya yanlış formatta.\n * Bu durum, poliçe yürürlük tarihinin eksik olması, geçerli bir tarih olmaması,\n * yanlış formatta olması veya poliçe bağlamında mantıksal olarak anlam ifade\n * etmemesi durumunda oluşur. Poliçe başlangıç tarihleri geçerli ve düzgün\n * formatlanmış tarihler olmalıdır.\n */\n InvalidStartDate = \"INVALID_START_DATE\",\n\n /**\n * The proposal number is invalid or incorrectly formatted.\n * This occurs when the insurance proposal identifier doesn't meet the required\n * format, length, or validation rules. Proposal numbers must follow specific\n * formats defined by the insurance company or regulatory requirements.\n *\n * Teklif numarası geçersiz veya yanlış formatlı.\n * Bu durum, sigorta teklifi tanımlayıcısının gerekli format, uzunluk veya\n * doğrulama kurallarını karşılamaması durumunda oluşur. Teklif numaraları,\n * sigorta şirketi veya düzenleyici gereksinimler tarafından tanımlanan\n * belirli formatları takip etmelidir.\n */\n InvalidProposalNumber = \"INVALID_PROPOSAL_NUMBER\",\n\n /**\n * The premium amount is invalid or incorrectly formatted.\n * This occurs when the insurance premium value is negative, zero when it shouldn't be,\n * in an incorrect format, or doesn't meet validation rules for premium calculations.\n * Premium amounts must be valid positive monetary values.\n *\n * Prim tutarı geçersiz veya yanlış formatlı.\n * Bu durum, sigorta prim değerinin negatif olması, olmaması gereken durumlarda\n * sıfır olması, yanlış formatta olması veya prim hesaplamaları için doğrulama\n * kurallarını karşılamaması durumunda oluşur. Prim tutarları geçerli pozitif\n * parasal değerler olmalıdır.\n */\n InvalidPremium = \"INVALID_PREMIUM\",\n\n /**\n * The commission amount is invalid or incorrectly formatted.\n * This occurs when the agent commission value is negative when it shouldn't be,\n * exceeds the premium amount, or doesn't meet validation rules for commission\n * calculations. Commission amounts must be valid monetary values within acceptable ranges.\n *\n * Komisyon tutarı geçersiz veya yanlış formatlı.\n * Bu durum, acente komisyon değerinin olmaması gereken durumlarda negatif olması,\n * prim tutarını aşması veya komisyon hesaplamaları için doğrulama kurallarını\n * karşılamaması durumunda oluşur. Komisyon tutarları kabul edilebilir aralıklarda\n * geçerli parasal değerler olmalıdır.\n */\n InvalidCommission = \"INVALID_COMMISSION\",\n\n /**\n * The payment type is invalid or not supported by the target system.\n * This occurs when the payment method (cash, credit card, bank transfer, etc.)\n * is not recognized, supported, or properly formatted in the destination system.\n * All payment types must be valid and supported payment methods.\n *\n * Ödeme türü geçersiz veya hedef sistem tarafından desteklenmiyor.\n * Bu durum, ödeme yönteminin (nakit, kredi kartı, banka havalesi, vb.)\n * hedef sistemde tanınmaması, desteklenmemesi veya düzgün formatlanmaması\n * durumunda oluşur. Tüm ödeme türleri geçerli ve desteklenen ödeme yöntemleri olmalıdır.\n */\n InvalidPaymentType = \"INVALID_PAYMENT_TYPE\",\n\n /**\n * The insured customer information is invalid or incomplete.\n * This occurs when the person or entity that benefits from the insurance coverage\n * has missing, incorrectly formatted, or invalid personal information such as\n * name, contact details, or identification data.\n *\n * Sigortalı müşteri bilgileri geçersiz veya eksik.\n * Bu durum, sigorta teminatından yararlanan kişi veya kuruluşun ad, iletişim\n * bilgileri veya kimlik verileri gibi kişisel bilgilerinin eksik, yanlış\n * formatlanmış veya geçersiz olması durumunda oluşur.\n */\n InvalidInsuredCustomer = \"INVALID_INSURED_CUSTOMER\",\n\n /**\n * The insurer customer information is invalid or incomplete.\n * This occurs when the person or entity that purchases and pays for the insurance\n * policy (policyholder) has missing, incorrectly formatted, or invalid personal\n * information such as name, contact details, or identification data.\n *\n * Sigorta ettiren müşteri bilgileri geçersiz veya eksik.\n * Bu durum, sigorta poliçesini satın alan ve ödeyen kişi veya kuruluşun (poliçe sahibi)\n * ad, iletişim bilgileri veya kimlik verileri gibi kişisel bilgilerinin eksik,\n * yanlış formatlanmış veya geçersiz olması durumunda oluşur.\n */\n InvalidInsurerCustomer = \"INVALID_INSURER_CUSTOMER\",\n}\n","/**\n * @fileoverview Common Property Types - Property-related types and enums\n * @description Property data structures, models, and enums used throughout the InsurUp platform\n */\n\nimport type { InsuranceParameter } from \"./common.base.js\";\n\n// ============================================================================\n// PROPERTY-RELATED ENUMS\n// ============================================================================\n\n/**\n * Represents the construction material and structural type of a building.\n * Used to assess risk levels, determine insurance premiums, and evaluate earthquake resistance.\n *\n * Bir binanın yapı malzemesi ve yapısal türünü temsil eder.\n * Risk seviyelerini değerlendirmek, sigorta primlerini belirlemek ve deprem direncini değerlendirmek için kullanılır.\n */\nexport enum PropertyStructure {\n /**\n * Construction type is unknown or not yet determined.\n *\n * Yapı türü bilinmiyor veya henüz belirlenmedi.\n */\n Unknown = \"UNKNOWN\",\n\n /**\n * Steel-reinforced concrete construction - highest earthquake resistance.\n *\n * Betonarme yapı - en yüksek deprem direnci.\n */\n SteelReinforcedConcrete = \"STEEL_REINFORCED_CONCRETE\",\n\n /**\n * Other construction types including wood, brick, stone, or mixed materials.\n *\n * Ahşap, tuğla, taş veya karışık malzemeler dahil diğer yapı türleri.\n */\n Other = \"OTHER\",\n}\n\n/**\n * Represents the damage assessment levels for property structures.\n * Used to categorize the extent of damage sustained by buildings or properties.\n *\n * Konut yapıları için hasar değerlendirme seviyelerini temsil eder.\n * Binalar veya konutlar tarafından uğranılan hasarın boyutunu kategorize etmek için kullanılır.\n */\nexport enum PropertyDamageStatus {\n /**\n * Damage status is unknown or has not been assessed yet.\n *\n * Hasar durumu bilinmiyor veya henüz değerlendirilmedi.\n */\n Unknown = \"UNKNOWN\",\n\n /**\n * No damage detected or property is in perfect condition.\n *\n * Hasar tespit edilmedi veya konut mükemmel durumda.\n */\n None = \"NONE\",\n\n /**\n * Minor damage that does not affect structural integrity.\n *\n * Yapısal bütünlüğü etkilemeyen küçük hasar.\n */\n SlightlyDamaged = \"SLIGHTLY_DAMAGED\",\n\n /**\n * Moderate damage requiring significant repairs but structure remains sound.\n *\n * Önemli onarım gerektiren orta derecede hasar ancak yapı sağlam kalır.\n */\n ModeratelyDamaged = \"MODERATELY_DAMAGED\",\n\n /**\n * Severe damage compromising structural integrity and safety.\n *\n * Yapısal bütünlük ve güvenliği tehlikeye atan ciddi hasar.\n */\n SeverelyDamaged = \"SEVERELY_DAMAGED\",\n}\n\n/**\n * Represents how a property is utilized or occupied.\n * Defines the primary use case of the property which affects insurance risk assessment and premium calculation.\n *\n * Bir konutun nasıl kullanıldığını veya işgal edildiğini temsil eder.\n * Sigorta risk değerlendirmesini ve prim hesaplamasını etkileyen konutun birincil kullanım durumunu tanımlar.\n */\nexport enum PropertyUtilizationStyle {\n /**\n * Property usage is unknown or not yet determined.\n *\n * Konut kullanımı bilinmiyor veya henüz belirlenmedi.\n */\n Unknown = \"UNKNOWN\",\n\n /**\n * Residential property used as a home or dwelling.\n *\n * Ev veya yaşam yeri olarak kullanılan konut amaçlı konut.\n */\n House = \"HOUSE\",\n\n /**\n * Commercial property used for business operations.\n *\n * İş operasyonları için kullanılan ticari konut.\n */\n Business = \"BUSINESS\",\n\n /**\n * Other usage types including mixed-use, industrial, agricultural, or special purposes.\n *\n * Karma kullanım, sanayi, tarım veya özel amaçlar dahil diğer kullanım türleri.\n */\n Other = \"OTHER\",\n}\n\n/**\n * Represents the ownership relationship between a person and a property.\n * Defines whether the person owns the property or occupies it under a rental agreement.\n *\n * Bir kişi ile konut arasındaki konutiyet ilişkisini temsil eder.\n * Kişinin konutun sahibi olup olmadığını veya kira sözleşmesi kapsamında oturduğunu tanımlar.\n */\nexport enum PropertyOwnershipType {\n /**\n * Ownership type is unknown or not yet determined.\n *\n * Sahiplik türü bilinmiyor veya henüz belirlenmedi.\n */\n Unknown = \"UNKNOWN\",\n\n /**\n * The person legally owns the property and holds the title deed.\n *\n * Kişi konutun yasal sahibidir ve tapu senedine sahiptir.\n */\n Proprietor = \"PROPRIETOR\",\n\n /**\n * The person rents or leases the property under a rental agreement.\n *\n * Kişi kira sözleşmesi kapsamında konuta kiralar veya leasing yapar.\n */\n Tenant = \"TENANT\",\n}\n\n/**\n * Represents the types of financial institutions that can be designated as loss payees in insurance policies.\n * Used to specify who should receive insurance claim payments when there are outstanding loans or financing.\n *\n * Sigorta poliçelerinde hasar alacaklısı olarak belirlenebilecek finansal kurum türlerini temsil eder.\n * Ödenmemiş krediler veya finansman olduğunda sigorta hasar ödemelerini kimin alacağını belirtmek için kullanılır.\n */\nexport enum LossPayeeClauseType {\n /**\n * Bank as loss payee.\n *\n * Hasar alacaklısı olarak banka.\n */\n Bank = \"BANK\",\n\n /**\n * Financial institution as loss payee.\n *\n * Hasar alacaklısı olarak finansal kurum.\n */\n FinancialInstitution = \"FINANCIAL_INSTITUTION\",\n}\n\n// ============================================================================\n// PROPERTY-RELATED INTERFACES\n// ============================================================================\n\n/**\n * Represents floor information for a property including total floors in the building and the specific floor where the property is located.\n * Floor information is important for risk assessment, accessibility evaluation, and emergency evacuation planning.\n *\n * Binadaki toplam kat sayısı ve konutun bulunduğu belirli katı içeren bir konut için kat bilgilerini temsil eder.\n * Kat bilgileri risk değerlendirmesi, erişilebilirlik değerlendirmesi ve acil tahliye planlaması için önemlidir.\n */\nexport interface PropertyFloor {\n /**\n * The total number of floors in the building.\n *\n * Binadaki toplam kat sayısı.\n */\n totalFloors: number | null;\n\n /**\n * The specific floor where the property is located.\n *\n * Konutun bulunduğu belirli kat.\n */\n currentFloor: number | null;\n}\n\n/**\n * Represents a complete address structure for insured properties with hierarchical administrative divisions.\n * Property addresses are essential for risk assessment, policy issuance, and emergency response coordination.\n *\n * Sigortalı konutlar için hiyerarşik idari bölümlerle tam adres yapısını temsil eder.\n * Konut adresleri risk değerlendirmesi, poliçe düzenleme ve acil durum müdahale koordinasyonu için gereklidir.\n */\nexport interface PropertyAddress {\n /**\n * The city (il) where the property is located.\n *\n * Konutun bulunduğu il.\n */\n city: InsuranceParameter;\n\n /**\n * The district (ilçe) where the property is located.\n *\n * Konutun bulunduğu ilçe.\n */\n district: InsuranceParameter;\n\n /**\n * The town or municipality (belde) where the property is located.\n *\n * Konutun bulunduğu belde veya belediye.\n */\n town: InsuranceParameter;\n\n /**\n * The neighborhood (mahalle) where the property is located.\n *\n * Konutun bulunduğu mahalle.\n */\n neighborhood: InsuranceParameter;\n\n /**\n * The street where the property is located.\n *\n * Konutun bulunduğu sokak.\n */\n street: InsuranceParameter;\n\n /**\n * The building identifier where the property is located.\n *\n * Konutun bulunduğu bina tanımlayıcısı.\n */\n building: InsuranceParameter;\n\n /**\n * The apartment or unit identifier within the building.\n *\n * Bina içindeki daire veya birim tanımlayıcısı.\n */\n apartment: InsuranceParameter;\n}\n\n/**\n * Represents an existing DASK (Compulsory Earthquake Insurance) policy from Turkey's National Disaster Insurance Institution.\n * Used to reference previous earthquake insurance coverage when creating new policies or managing property records.\n *\n * Türkiye Doğal Afet Sigortaları Kurumu'ndan mevcut bir DASK (Zorunlu Deprem Sigortası) poliçesini temsil eder.\n * Yeni poliçeler oluştururken veya konut kayıtlarını yönetirken önceki deprem sigortası kapsamına referans vermek için kullanılır.\n */\nexport interface DaskOldPolicy {\n /**\n * The DASK policy number. Must be a positive number with maximum 15 digits.\n *\n * DASK poliçe numarası. Maksimum 15 haneli pozitif bir sayı olmalıdır.\n */\n number: number;\n\n /**\n * The end date of the existing DASK policy.\n *\n * Mevcut DASK poliçesinin bitiş tarihi.\n */\n endDate: string;\n}\n\n/**\n * Represents a loss payee clause that designates a financial institution as beneficiary for insurance claim payments.\n * Used when insured assets have outstanding financing to protect the lender's financial interest.\n *\n * Sigorta hasar ödemeleri için finansal kurumu lehtar olarak belirleyen hasar alacaklısı klozunu temsil eder.\n * Sigortalı varlıkların ödenmemiş finansmanı olduğunda borç verenin finansal çıkarını korumak için kullanılır.\n */\nexport interface LossPayeeClause {\n /**\n * Gets the type of loss payee clause.\n *\n * Hasar alacaklısı kloz türünü alır.\n */\n type: LossPayeeClauseType;\n\n /**\n * Gets the bank information (applicable when Type is Bank).\n *\n * Banka bilgilerini alır (Tür Banka olduğunda geçerlidir).\n */\n bank: unknown;\n\n /**\n * Gets the bank branch information (applicable when Type is Bank).\n *\n * Banka şube bilgilerini alır (Tür Banka olduğunda geçerlidir).\n */\n bankBranch: unknown;\n\n /**\n * Gets the financial institution information (applicable when Type is FinancialInstitution).\n *\n * Finansal kurum bilgilerini alır (Tür FinancialInstitution olduğunda geçerlidir).\n */\n financialInstitution: unknown;\n\n /**\n * Gets the credit agreement number if specified.\n *\n * Belirtilmişse kredi sözleşme numarasını alır.\n */\n creditAgreementNumber: string | null;\n}\n\n/**\n * Property Number\n * Konut Numarası\n *\n * Represents a unique property identification number used for official property registration and insurance documentation.\n * Property numbers are essential for precise property identification in government records and insurance systems.\n */\nexport interface PropertyNumber {\n /**\n * The 10-digit property identification number\n * 10 haneli konut kimlik numarası\n */\n readonly value: number; // long in C# but number in TypeScript\n}\n\n/**\n * Property Square Meter\n * Konut Metrekaresi\n *\n * Represents the square meter area of a property for insurance coverage calculation and risk assessment.\n * Property size is a fundamental factor in determining insurance premiums, coverage limits, and risk exposure.\n */\nexport interface PropertySquareMeter {\n /**\n * Square meter area value (10-10,000)\n * Metrekare alan değeri (10-10,000)\n */\n readonly value: number;\n}\n\n/**\n * Property Construction Year\n * Konut Yapım Yılı\n *\n * Represents the construction year of a property for insurance risk assessment and premium calculation.\n * Construction year is a critical factor in determining building standards, earthquake resistance, and overall structural integrity.\n */\nexport interface PropertyConstructionYear {\n /**\n * The construction year value (0 to current year)\n * Yapım yılı değeri (0 ile mevcut yıl arası)\n */\n readonly value: number;\n}\n\n/**\n * Property information snapshot for proposals\n * Teklifler için konut bilgisi anlık görüntüsü\n *\n * Represents comprehensive property information captured in insurance proposal snapshots.\n * Contains all physical, legal, and risk-related characteristics of a residential property.\n *\n * NOTE: This interface should match the exact C# ProposalSnapshotProperty structure.\n * Individual property types should be properly defined based on their C# counterparts.\n */\nexport interface ProposalSnapshotProperty {\n /**\n * Unique identifier for the property\n * Konut için benzersiz tanımlayıcı\n */\n readonly id: string;\n\n /**\n * Official property number for identification and legal purposes\n * Tanımlama ve yasal amaçlar için resmi konut numarası\n */\n readonly number: PropertyNumber;\n\n /**\n * Complete address information of the property\n * Konutun tam adres bilgileri\n */\n readonly address: PropertyAddress;\n\n /**\n * Total area of the property in square meters\n * Konutun metrekare cinsinden toplam alanı\n */\n readonly squareMeter: PropertySquareMeter;\n\n /**\n * Year when the property was constructed\n * Konutun inşa edildiği yıl\n */\n readonly constructionYear: PropertyConstructionYear;\n\n /**\n * Current damage status of the property\n * Konutun mevcut hasar durumu\n */\n readonly damageStatus: PropertyDamageStatus;\n\n /**\n * Floor information of the property within the building\n * Bina içindeki konutun kat bilgileri\n */\n readonly floor: PropertyFloor;\n\n /**\n * Structural characteristics and construction type\n * Yapısal özellikler ve inşaat tipi\n */\n readonly structure: PropertyStructure;\n\n /**\n * How the property is utilized\n * Konutun nasıl kullanıldığı\n */\n readonly utilizationStyle: PropertyUtilizationStyle;\n\n /**\n * Loss payee clause for financing arrangements\n * Finansman düzenlemeleri için lehtar klozu\n */\n readonly lossPayeeClause?: LossPayeeClause;\n\n /**\n * Ownership type of the property\n * Konutun sahiplik türü\n */\n readonly ownershipType: PropertyOwnershipType;\n\n /**\n * DASK old policy information\n * DASK eski poliçe bilgileri\n */\n readonly daskOldPolicy?: DaskOldPolicy;\n}\n","/**\n * @fileoverview Common Vehicle Types - Vehicle-related types and enums\n * @description Vehicle data structures, models, and enums used throughout the InsurUp platform\n */\n\nimport type { InsuranceParameter } from \"./common.base.js\";\nimport type { LossPayeeClause } from \"./common.property.js\";\n\n// ============================================================================\n// VEHICLE-RELATED ENUMS\n// ============================================================================\n\n/**\n * Vehicle Utilization Styles\n *\n * Comprehensive classification of vehicle usage patterns that determines insurance risk profiles,\n * premium calculations, and regulatory requirements. Different utilization styles have varying risk\n * factors including commercial vs. private use, passenger capacity, cargo types, and operational\n * environments. This classification is essential for proper underwriting and compliance with Turkish\n * traffic and insurance regulations.\n *\n * Sigorta risk profillerini, prim hesaplamalarını ve yasal gereksinimleri belirleyen araç\n * kullanım şekillerinin kapsamlı sınıflandırması. Farklı kullanım tarzları ticari vs. özel kullanım,\n * yolcu kapasitesi, kargo türleri ve operasyonel ortamlar dahil değişen risk faktörlerine sahiptir.\n * Bu sınıflandırma uygun sigorta aracılık hizmetleri ve Türk trafik ve sigorta yönetmeliklerine\n * uyum için gereklidir.\n */\nexport enum VehicleUtilizationStyle {\n /**\n * Vehicle utilization style is unknown or not yet determined.\n * Araç kullanım tarzı bilinmiyor veya henüz belirlenmedi.\n */\n Unknown = \"UNKNOWN\",\n\n /**\n * Private passenger car for personal transportation.\n * Kişisel ulaşım için özel binek otomobil.\n */\n PrivateCar = \"PRIVATE_CAR\",\n\n /**\n * Commercial taxi service for passenger transportation.\n * Yolcu taşımacılığı için ticari taksi hizmeti.\n */\n Taxi = \"TAXI\",\n\n /**\n * Route-based minibus service for scheduled passenger transport.\n * Planlı yolcu taşımacılığı için güzergah bazlı minibüs hizmeti.\n */\n RouteBasedMinibus = \"ROUTE_BASED_MINIBUS\",\n\n /**\n * Medium-sized bus for passenger transportation.\n * Yolcu taşımacılığı için orta boy otobüs.\n */\n MediumBus = \"MEDIUM_BUS\",\n\n /**\n * Large bus for high-capacity passenger transportation.\n * Yüksek kapasiteli yolcu taşımacılığı için büyük otobüs.\n */\n LargeBus = \"LARGE_BUS\",\n\n /**\n * Pickup truck for cargo and utility purposes.\n * Kargo ve hizmet amaçları için kamyonet.\n */\n PickupTruck = \"PICKUP_TRUCK\",\n\n /**\n * Panel van for cargo transportation.\n * Kargo taşımacılığı için panel van.\n */\n PanelVan = \"PANEL_VAN\",\n\n /**\n * Truck for heavy cargo transportation.\n * Ağır kargo taşımacılığı için kamyon.\n */\n Truck = \"TRUCK\",\n\n /**\n * Tractor unit for pulling trailers.\n * Römork çekmek için çekici.\n */\n Tractor = \"TRACTOR\",\n\n /**\n * Motorcycle for personal transportation.\n * Kişisel ulaşım için motosiklet.\n */\n Motorcycle = \"MOTORCYCLE\",\n\n /**\n * Rental car for temporary use.\n * Geçici kullanım için kiralık araç.\n */\n RentalCar = \"RENTAL_CAR\",\n\n /**\n * Armored vehicle for security and protection services.\n * Güvenlik ve koruma hizmetleri için zırhlı araç.\n */\n ArmoredVehicle = \"ARMORED_VEHICLE\",\n\n /**\n * Shared taxi minibus (dolmuş) for public transportation.\n * Toplu taşıma için dolmuş minibüs.\n */\n MinibusSharedTaxi = \"MINIBUS_SHARED_TAXI\",\n\n /**\n * Jeep for off-road and general purpose use.\n * Arazi ve genel amaçlı kullanım için jeep.\n */\n Jeep = \"JEEP\",\n\n /**\n * Sport Activity Vehicle (SAV) jeep for recreational use.\n * Rekreasyonel kullanım için Spor Aktivite Aracı (SAV) jeep.\n */\n JeepSAV = \"JEEP_SAV\",\n\n /**\n * Sport Utility Vehicle (SUV) jeep for versatile use.\n * Çok amaçlı kullanım için Spor Kullanım Aracı (SUV) jeep.\n */\n JeepSUV = \"JEEP_SUV\",\n\n /**\n * Hearse for funeral services.\n * Cenaze hizmetleri için cenaze arabası.\n */\n Hearse = \"HEARSE\",\n\n /**\n * Rental car with chauffeur service.\n * Şoförlü kiralık araç hizmeti.\n */\n ChauffeuredRentalCar = \"CHAUFFEURED_RENTAL_CAR\",\n\n /**\n * Operational rental for business fleet use.\n * İş filo kullanımı için operasyonel kiralık araç.\n */\n OperationalRental = \"OPERATIONAL_RENTAL\",\n\n /**\n * Private minibus for personal or family use.\n * Kişisel veya aile kullanımı için özel minibüs.\n */\n PrivateMinibus = \"PRIVATE_MINIBUS\",\n\n /**\n * Route minibus for scheduled public transportation.\n * Planlı toplu taşıma için güzergah minibüsü.\n */\n RouteMinibus = \"ROUTE_MINIBUS\",\n\n /**\n * Service minibus for employee or student transportation.\n * Çalışan veya öğrenci taşımacılığı için servis minibüsü.\n */\n ServiceMinibus = \"SERVICE_MINIBUS\",\n}\n\n/**\n * Vehicle Fuel Types\n *\n * Defines the various fuel types that vehicles can use, which affects insurance risk assessment,\n * premium calculations, and coverage terms. Different fuel types have varying risk profiles,\n * environmental considerations, and replacement costs that insurers must account for when\n * determining coverage and pricing.\n *\n * Araçların kullanabileceği çeşitli yakıt türlerini tanımlar, bu da sigorta risk değerlendirmesi,\n * prim hesaplamaları ve kapsam koşullarını etkiler. Farklı yakıt türlerinin değişen risk profilleri,\n * çevresel faktörleri ve ikame maliyetleri vardır, sigortacıların kapsam ve fiyatlandırma belirlerken\n * hesaba katması gereken faktörlerdir.\n */\nexport enum VehicleFuelType {\n /**\n * Gasoline-powered vehicles using petrol fuel.\n * Benzin yakıtı kullanan benzinli araçlar.\n */\n Gasoline = \"GASOLINE\",\n\n /**\n * Diesel-powered vehicles using diesel fuel.\n * Dizel yakıtı kullanan dizel araçlar.\n */\n Diesel = \"DIESEL\",\n\n /**\n * LPG (Liquefied Petroleum Gas) powered vehicles.\n * LPG (Sıvılaştırılmış Petrol Gazı) yakıtlı araçlar.\n */\n Lpg = \"LPG\",\n\n /**\n * Electric vehicles powered by battery systems.\n * Batarya sistemleri ile çalışan elektrikli araçlar.\n */\n Electric = \"ELECTRIC\",\n\n /**\n * Vehicles with both LPG and gasoline fuel systems.\n * Hem LPG hem benzin yakıt sistemine sahip araçlar.\n */\n LpgGasoline = \"LPG_GASOLINE\",\n\n /**\n * Hybrid vehicles combining electric and conventional fuel systems.\n * Elektrik ve geleneksel yakıt sistemlerini birleştiren hibrit araçlar.\n */\n Hybrid = \"HYBRID\",\n}\n\n/**\n * Vehicle Accessory Types\n *\n * Defines the categories of aftermarket accessories that can be added to vehicles and covered under\n * insurance policies. These accessories add value to the vehicle and require separate coverage consideration\n * for comprehensive insurance protection. Proper categorization helps determine accurate replacement costs.\n *\n * Araçlara eklenebilecek ve sigorta poliçeleri kapsamında kapsanabilecek sonradan eklenen aksesuar\n * kategorilerini tanımlar. Bu aksesuarlar araca değer katar ve kapsamlı sigorta koruması için ayrı\n * kapsam değerlendirmesi gerektirir. Uygun kategorizasyon doğru ikame maliyetlerini belirlemeye yardımcı olur.\n */\nexport enum VehicleAccessoryType {\n /**\n * Audio systems and sound equipment installed in the vehicle.\n * Araca monte edilen ses sistemleri ve ses ekipmanları.\n */\n Audio = \"audio\",\n\n /**\n * Display screens and navigation systems installed in the vehicle.\n * Araca monte edilen ekran ve navigasyon sistemleri.\n */\n Display = \"display\",\n\n /**\n * Other types of vehicle accessories not classified as audio or display systems.\n * Ses veya ekran sistemleri olarak sınıflandırılmayan diğer araç aksesuar türleri.\n */\n Other = \"other\",\n}\n\n// ============================================================================\n// VEHICLE-RELATED INTERFACES\n// ============================================================================\n\n/**\n * Vehicle fuel information\n *\n * Comprehensive fuel system information for vehicles including fuel type and LPG-specific\n * configurations. LPG vehicles require additional details such as whether the system is custom-installed\n * and the installation cost, which affects insurance coverage and premium calculations. This information\n * is crucial for proper risk assessment and coverage determination.\n *\n * Yakıt türü ve LPG'ye özgü konfigürasyonlar dahil araçlar için kapsamlı yakıt sistemi bilgileri.\n * LPG araçlar sistemin özel olarak monte edilip edilmediği ve montaj maliyeti gibi ek detaylar gerektirir,\n * bu da sigorta kapsamını ve prim hesaplamalarını etkiler. Bu bilgiler uygun risk değerlendirmesi ve\n * kapsam belirlenmesi için kritiktir.\n */\nexport interface VehicleFuel {\n /**\n * The fuel type of the vehicle.\n * Aracın yakıt türü.\n */\n readonly type: VehicleFuelType;\n\n /**\n * Whether the vehicle has a custom LPG installation (applicable for LPG and LPG-Gasoline vehicles).\n * Aracın özel LPG montajına sahip olup olmadığı (LPG ve LPG-Benzin araçları için geçerlidir).\n */\n readonly customLpg?: boolean | null;\n\n /**\n * The price of custom LPG installation if applicable.\n * Varsa özel LPG montajının fiyatı.\n */\n readonly customLpgPrice?: number | null;\n}\n\n/**\n * Vehicle license plate information\n *\n * Represents the Turkish vehicle license plate system consisting of a city code (1-81 representing\n * Turkish provinces) and an optional alphanumeric plate code (up to 6 characters). The city code\n * indicates the province where the vehicle was first registered. This information is essential for\n * vehicle identification, insurance coverage determination, and compliance with Turkish traffic regulations.\n *\n * Şehir kodu (Türk illerini temsil eden 1-81) ve isteğe bağlı alfanümerik plaka kodundan\n * (6 karaktere kadar) oluşan Türk araç plaka sistemini temsil eder. Şehir kodu, aracın ilk tescil\n * edildiği ili gösterir. Bu bilgiler araç tanımlaması, sigorta kapsamı belirlenmesi ve Türk trafik\n * yönetmeliklerine uyum için gereklidir.\n */\nexport interface VehiclePlate {\n /**\n * Turkish city code (1-81 representing provinces).\n * Türk şehir kodunu (illeri temsil eden 1-81).\n */\n readonly city: number;\n\n /**\n * Optional alphanumeric plate code (up to 6 characters).\n * İsteğe bağlı alfanümerik plaka kodu (6 karaktere kadar).\n */\n readonly code?: string | null;\n}\n\n/**\n * Vehicle registration document serial information\n *\n * Represents the serial number of vehicle registration documents used in the Turkish vehicle registration\n * system. This unique identifier consists of a 2-letter alphabetic code followed by a 6-digit numeric sequence.\n * The document serial is essential for vehicle identification in insurance processes, helping to verify the\n * legitimacy of vehicle registration and prevent fraud. It serves as a secondary identification method\n * alongside the chassis number.\n *\n * Türk araç tescil sisteminde kullanılan araç tescil belgelerinin seri numarasını temsil eder. Bu benzersiz\n * tanımlayıcı, 2 harfli alfabetik kod ve ardından 6 haneli sayısal diziden oluşur. Belge seri numarası,\n * sigorta süreçlerinde araç tanımlaması için gereklidir, araç tescilinin meşruiyetini doğrulamaya ve\n * dolandırıcılığı önlemeye yardımcı olur. Şasi numarasının yanında ikincil tanımlama yöntemi olarak hizmet eder.\n */\nexport interface VehicleDocumentSerial {\n /**\n * The 2-letter alphabetic code of the document serial.\n * Belge seri numarasının 2 harfli alfabetik kodu.\n */\n readonly code: string;\n\n /**\n * The 6-digit numeric part of the document serial.\n * Belge seri numarasının 6 haneli sayısal kısmı.\n */\n readonly number: string;\n}\n\n/**\n * Vehicle model information\n *\n * Complete vehicle identification including manufacturing year, brand, and specific model type.\n * This information is essential for insurance underwriting as it determines vehicle value, safety\n * ratings, theft risk, repair costs, and appropriate coverage terms. The combination of year,\n * brand, and type creates a unique vehicle profile for accurate risk assessment and pricing.\n *\n * Üretim yılı, marka ve belirli model türü dahil eksiksiz araç tanımlaması. Bu bilgiler,\n * araç değeri, güvenlik puanları, hırsızlık riski, tamir maliyetleri ve uygun kapsam koşullarını\n * belirlediği için sigorta aracılık hizmetleri için gereklidir. Yıl, marka ve tip kombinasyonu\n * doğru risk değerlendirmesi ve fiyatlandırma için benzersiz araç profili oluşturur.\n */\nexport interface VehicleModel {\n /**\n * The vehicle brand information.\n * Araç marka bilgileri.\n */\n readonly brand: InsuranceParameter;\n\n /**\n * The manufacturing year of the vehicle (must be between 1900 and current year).\n * Aracın üretim yılı (1900 ile mevcut yıl arasında olmalıdır).\n */\n readonly year: number;\n\n /**\n * The specific vehicle type/model information.\n * Belirli araç türü/model bilgileri.\n */\n readonly type: InsuranceParameter;\n}\n\n/**\n * Vehicle accessory base interface\n *\n * Base interface that defines the common structure for all types of vehicle accessories.\n * Vehicle accessories are aftermarket additions that increase the vehicle's value and may require\n * separate insurance coverage. This interface ensures proper categorization and value tracking for\n * insurance purposes.\n *\n * Tüm araç aksesuarı türleri için ortak yapıyı tanımlayan temel arayüz. Araç aksesuarları\n * aracın değerini artıran ve ayrı sigorta kapsamı gerektirebilecek sonradan eklenen ürünlerdir.\n * Bu arayüz sigorta amaçları için uygun kategorizasyon ve değer takibini sağlar.\n */\nexport interface VehicleAccessory {\n /**\n * The type of vehicle accessory.\n * Araç aksesuarının türü.\n */\n readonly $type: VehicleAccessoryType;\n\n /**\n * The total price/value of the accessory for insurance coverage calculation.\n * Sigorta kapsamı hesaplaması için aksesuarın toplam fiyatı/değeri.\n */\n readonly price: number;\n}\n\n/**\n * Vehicle previous insurance policy information\n *\n * Contains complete information about a vehicle's previous insurance coverage including policy numbers,\n * renewal information, insurance company details, and agent information. This data is crucial for\n * maintaining insurance continuity, determining no-claims bonuses, assessing risk history, and\n * preventing insurance fraud. Required for policy transfers and renewals in the Turkish insurance market.\n *\n * Poliçe numaraları, yenileme bilgileri, sigorta şirketi detayları ve acente bilgileri dahil\n * aracın önceki sigorta kapsamı hakkında eksiksiz bilgileri içerir. Bu veriler sigorta sürekliliğini\n * korumak, hasarsızlık indirimi belirlemek, risk geçmişini değerlendirmek ve sigorta dolandırıcılığını\n * önlemek için kritiktir. Türk sigorta piyasasında poliçe devri ve yenilemeler için gereklidir.\n */\nexport interface VehicleOldPolicy {\n /**\n * Insurance company's policy number (6-20 digits).\n * Sigorta şirketinin poliçe numarası (6-20 hane).\n */\n readonly insuranceCompanyPolicyNumber: number;\n\n /**\n * Insurance company's renewal number (0-9).\n * Sigorta şirketinin yenileme numarası (0-9).\n */\n readonly insuranceCompanyRenewalNumber: number;\n\n /**\n * Insurance company's reference code.\n * Sigorta şirketinin referans kodu.\n */\n readonly insuranceCompanyReference: string;\n\n /**\n * Agent number associated with the policy (3-18 digits).\n * Poliçe ile ilişkili acente numarası (3-18 hane).\n */\n readonly agentNumber: number;\n\n /**\n * Policy end date if available.\n * Varsa poliçe bitiş tarihi.\n */\n readonly endDate?: string | null;\n}\n\n/**\n * Vehicle Engine Information\n * Araç Motor Bilgileri\n *\n * Represents a vehicle engine number for unique engine identification and vehicle verification.\n * Used in insurance systems to accurately identify and track vehicle engines for coverage and claims.\n */\nexport interface VehicleEngine {\n /**\n * The engine number of the vehicle (6-40 characters)\n * Aracın motor numarası (6-40 karakter)\n */\n readonly number: string;\n}\n\n/**\n * Vehicle Chassis Information\n * Araç Şasi Bilgileri\n *\n * Represents a vehicle chassis number for unique vehicle identification.\n * Used in insurance systems to properly identify and track vehicles across policies and claims.\n */\nexport interface VehicleChassis {\n /**\n * The chassis number of the vehicle (4-17 characters)\n * Aracın şasi numarası (4-17 karakter)\n */\n readonly number: string;\n}\n\n/**\n * Vehicle Registration Date\n * Araç Tescil Tarihi\n *\n * Represents the official registration date of a vehicle in the Turkish vehicle registration system.\n * Used for determining vehicle age, depreciation calculations, and insurance coverage eligibility.\n */\nexport interface VehicleRegistrationDate {\n /**\n * The registration date value\n * Tescil tarihi değeri\n */\n readonly value: string; // DateOnly in C# - using string for JSON compatibility\n}\n\n/**\n * Vehicle Seat Number\n * Araç Koltuk Sayısı\n *\n * Represents the number of seats in a vehicle for insurance classification and premium calculation.\n * Used to determine vehicle category and appropriate coverage terms based on passenger capacity.\n */\nexport interface VehicleSeatNumber {\n /**\n * Number of seats in the vehicle (1-50)\n * Araçtaki koltuk sayısı (1-50)\n */\n readonly value: number; // byte in C# but number in TypeScript\n}\n\n/**\n * Vehicle information snapshot for proposals\n * Teklifler için araç bilgisi anlık görüntüsü\n *\n * Represents comprehensive vehicle information captured in insurance proposal snapshots.\n * Contains all physical, technical, and legal characteristics of a vehicle required for insurance underwriting.\n *\n * NOTE: This interface should match the exact C# ProposalSnapshotVehicle structure.\n * Individual property types should be properly defined based on their C# counterparts.\n */\nexport interface ProposalSnapshotVehicle {\n /**\n * Unique identifier for the vehicle\n * Araç için benzersiz tanımlayıcı\n */\n readonly id: string;\n\n /**\n * Vehicle license plate information\n * Araç plaka bilgileri\n */\n readonly plate: VehiclePlate;\n\n /**\n * Vehicle model information including make, model, and year\n * Marka, model ve yıl dahil araç model bilgileri\n */\n readonly model: VehicleModel;\n\n /**\n * How the vehicle is utilized (personal, commercial, taxi, etc.)\n * Aracın nasıl kullanıldığı (kişisel, ticari, taksi, vb.)\n */\n readonly utilizationStyle: VehicleUtilizationStyle;\n\n /**\n * Vehicle fuel type\n * Araç yakıt tipi\n */\n readonly fuel?: VehicleFuel;\n\n /**\n * Vehicle engine information\n * Araç motor bilgileri\n */\n readonly engine: VehicleEngine;\n\n /**\n * Vehicle chassis information\n * Araç şasi bilgileri\n */\n readonly chassis: VehicleChassis;\n\n /**\n * Vehicle registration date\n * Araç tescil tarihi\n */\n readonly registrationDate: VehicleRegistrationDate;\n\n /**\n * Number of seats in the vehicle\n * Araçtaki koltuk sayısı\n */\n readonly seatNumber: VehicleSeatNumber;\n\n /**\n * Vehicle accessories and additional equipment\n * Araç aksesuarları ve ek donanım\n */\n readonly accessories: VehicleAccessory[];\n\n /**\n * Vehicle document serial number\n * Araç belge seri numarası\n */\n readonly documentSerial?: VehicleDocumentSerial;\n\n /**\n * Information about existing vehicle insurance policy\n * Mevcut araç sigorta poliçesi bilgileri\n */\n readonly oldPolicy?: VehicleOldPolicy;\n\n /**\n * Loss payee clause for financing arrangements\n * Finansman düzenlemeleri için lehtar klozu\n */\n readonly lossPayeeClause?: LossPayeeClause;\n\n /**\n * Whether the vehicle has a valid license plate and document serial number\n * Aracın geçerli bir plakası ve belge seri numarası olup olmadığı\n */\n readonly hasPlate: boolean;\n}\n","/**\n * @fileoverview Date/Time Types\n * @description Common date and time types for the InsurUp TypeScript SDK\n */\n\n/**\n * DateTime class for handling ISO 8601 datetime strings.\n * Serializable to/from JSON as ISO 8601 string.\n *\n * @example\n * const dt = new DateTime(\"2024-01-15T10:30:00Z\");\n * dt.toDate(); // Native Date object\n * dt.toISOString(); // \"2024-01-15T10:30:00.000Z\"\n * JSON.stringify(dt); // \"\\\"2024-01-15T10:30:00.000Z\\\"\"\n *\n * // From native Date\n * const dt2 = DateTime.fromDate(new Date());\n */\nexport class DateTime {\n private readonly _value: Date;\n\n constructor(value: string | Date) {\n this._value = typeof value === \"string\" ? new Date(value) : value;\n }\n\n /** Creates DateTime from a native Date object */\n static fromDate(date: Date): DateTime {\n return new DateTime(date);\n }\n\n /** Creates DateTime from current time */\n static now(): DateTime {\n return new DateTime(new Date());\n }\n\n /** Returns the native Date object */\n toDate(): Date {\n return this._value;\n }\n\n /** Returns ISO 8601 string representation */\n toISOString(): string {\n return this._value.toISOString();\n }\n\n /** Returns ISO 8601 string (for JSON serialization) */\n toJSON(): string {\n return this.toISOString();\n }\n\n /** Returns ISO 8601 string */\n toString(): string {\n return this.toISOString();\n }\n\n /** Returns timestamp in milliseconds */\n valueOf(): number {\n return this._value.valueOf();\n }\n}\n\n/**\n * DateOnly class for handling date-only strings (YYYY-MM-DD format).\n * Serializable to/from JSON as YYYY-MM-DD string.\n *\n * @example\n * const date = new DateOnly(\"2024-01-15\");\n * date.toDate(); // Native Date object (at midnight UTC)\n * date.toString(); // \"2024-01-15\"\n * JSON.stringify(date); // \"\\\"2024-01-15\\\"\"\n *\n * // From native Date\n * const date2 = DateOnly.fromDate(new Date());\n */\nexport class DateOnly {\n private readonly _year: number;\n private readonly _month: number;\n private readonly _day: number;\n\n constructor(value: string | Date) {\n if (typeof value === \"string\") {\n const parts = value.split(\"-\").map(Number);\n this._year = parts[0] ?? 0;\n this._month = parts[1] ?? 1;\n this._day = parts[2] ?? 1;\n } else {\n this._year = value.getUTCFullYear();\n this._month = value.getUTCMonth() + 1;\n this._day = value.getUTCDate();\n }\n }\n\n /** Creates DateOnly from a native Date object */\n static fromDate(date: Date): DateOnly {\n return new DateOnly(date);\n }\n\n /** Creates DateOnly from current date */\n static today(): DateOnly {\n return new DateOnly(new Date());\n }\n\n /** Returns the native Date object (at midnight UTC) */\n toDate(): Date {\n return new Date(Date.UTC(this._year, this._month - 1, this._day));\n }\n\n /** Returns YYYY-MM-DD string representation */\n toString(): string {\n const y = this._year.toString().padStart(4, \"0\");\n const m = this._month.toString().padStart(2, \"0\");\n const d = this._day.toString().padStart(2, \"0\");\n return `${y}-${m}-${d}`;\n }\n\n /** Returns YYYY-MM-DD string (for JSON serialization) */\n toJSON(): string {\n return this.toString();\n }\n\n /** Returns timestamp in milliseconds */\n valueOf(): number {\n return this.toDate().valueOf();\n }\n\n /** Gets the year */\n get year(): number {\n return this._year;\n }\n\n /** Gets the month (1-12) */\n get month(): number {\n return this._month;\n }\n\n /** Gets the day (1-31) */\n get day(): number {\n return this._day;\n }\n}\n","/**\n * Customer management contracts for the InsurUp TypeScript SDK.\n *\n * Provides comprehensive customer management operations for handling customer profiles, contact information,\n * health data, communication flows, and external customer data integration within the insurance ecosystem.\n *\n * Sigorta ekosistemi içinde müşteri profilleri, iletişim bilgileri, sağlık verileri, iletişim akışları\n * ve harici müşteri veri entegrasyonunu yönetmek için kapsamlı müşteri yönetimi işlemlerini sağlar.\n */\n\nimport type { CustomerType } from \"./common.js\";\nimport type {\n InsuranceParameter,\n UserReference,\n CustomerPhoneNumber,\n PropertyAddress,\n} from \"./common.js\";\nimport type { DateTime, DateOnly } from \"./common.date.js\";\n\n// ============================================================================\n// ENUMS\n// ============================================================================\n\n/**\n * Gender enumeration\n */\nexport enum Gender {\n Unknown = \"UNKNOWN\",\n Male = \"MALE\",\n Female = \"FEMALE\",\n Other = \"OTHER\",\n}\n\n/**\n * Education status enumeration\n */\nexport enum EducationStatus {\n Unknown = \"UNKNOWN\",\n PrimarySchool = \"PRIMARY_SCHOOL\",\n MiddleSchool = \"MIDDLE_SCHOOL\",\n HighSchool = \"HIGH_SCHOOL\",\n University = \"UNIVERSITY\",\n Postgraduate = \"POSTGRADUATE\",\n Doctorate = \"DOCTORATE\",\n Other = \"OTHER\",\n}\n\n/**\n * Nationality enumeration\n */\nexport enum Nationality {\n Unknown = \"UNKNOWN\",\n Turk = \"TURK\",\n Other = \"OTHER\",\n}\n\n/**\n * Marital status enumeration\n */\nexport enum MaritalStatus {\n Unknown = \"UNKNOWN\",\n Single = \"SINGLE\",\n Married = \"MARRIED\",\n}\n\n/**\n * Job/occupation enumeration\n */\nexport enum Job {\n Unknown = \"UNKNOWN\",\n Banker = \"BANKER\",\n CorporateEmployee = \"CORPORATE_EMPLOYEE\",\n LtdEmployee = \"LTD_EMPLOYEE\",\n Police = \"POLICE\",\n MilitaryPersonnel = \"MILITARY_PERSONNEL\",\n RetiredSpouse = \"RETIRED_SPOUSE\",\n Teacher = \"TEACHER\",\n Doctor = \"DOCTOR\",\n Pharmacist = \"PHARMACIST\",\n Nurse = \"NURSE\",\n HealthcareWorker = \"HEALTHCARE_WORKER\",\n Lawyer = \"LAWYER\",\n Judge = \"JUDGE\",\n Prosecutor = \"PROSECUTOR\",\n Freelancer = \"FREELANCER\",\n Farmer = \"FARMER\",\n Instructor = \"INSTRUCTOR\",\n ReligiousOfficial = \"RELIGIOUS_OFFICIAL\",\n AssociationManager = \"ASSOCIATION_MANAGER\",\n Officer = \"OFFICER\",\n Retired = \"RETIRED\",\n Housewife = \"HOUSEWIFE\",\n}\n\n/**\n * Contact flow state enumeration.\n * Tracks the current status of a customer contact flow or communication workflow process.\n */\nexport enum ContactFlowState {\n /** The contact flow is currently active and in progress */\n Active = \"ACTIVE\",\n /** The contact flow has completed successfully */\n Succeeded = \"SUCCEEDED\",\n /** The contact flow has failed to complete successfully */\n Failed = \"FAILED\",\n}\n\n/**\n * Contact type enumeration.\n * Defines the specific communication method or channel used for customer interactions.\n */\nexport enum ContactType {\n /** Contact via telephone or phone call */\n PhoneCall = \"PHONE_CALL\",\n}\n\n/**\n * Contact state enumeration.\n * Tracks the execution status of planned customer contacts or communication attempts.\n */\nexport enum ContactState {\n /** The contact has been planned or scheduled but not yet executed */\n Planned = \"PLANNED\",\n /** The contact has been successfully executed or completed */\n Occurred = \"OCCURRED\",\n /** The contact was planned but did not occur as scheduled */\n NotOccurred = \"NOT_OCCURRED\",\n}\n\n/**\n * Surgery enumeration for health data\n */\nexport enum Surgery {\n Other = \"OTHER\",\n OrganTransplant = \"ORGAN_TRANSPLANT\",\n BoneMarrowTransplant = \"BONE_MARROW_TRANSPLANT\",\n HeartSurgery = \"HEART_SURGERY\",\n BrainSurgery = \"BRAIN_SURGERY\",\n}\n\n/**\n * Disease enumeration for health data\n */\nexport enum Disease {\n Other = \"OTHER\",\n KidneyFailure = \"KIDNEY_FAILURE\",\n Cancer = \"CANCER\",\n LiverDisease = \"LIVER_DISEASE\",\n HeartFailure = \"HEART_FAILURE\",\n HeartRhythmAndConductionDisorders = \"HEART_RHYTHM_AND_CONDUCTION_DISORDERS\",\n ImmuneSystemDisorders = \"IMMUNE_SYSTEM_DISORDERS\",\n}\n\n/**\n * Consent type enumeration for customer data processing permissions.\n * Used to track customer consent for data privacy regulations (KVKK/GDPR).\n */\nexport enum ConsentType {\n /** KVKK (Personal Data Protection Law) consent */\n KVKK = \"KVKK\",\n /** ETK (Electronic Commerce) consent */\n ETK = \"ETK\",\n}\n\n// ============================================================================\n// SUPPORTING TYPES\n// ============================================================================\n\n// === REQUEST CONTRACTS ===\n\n/**\n * Represents a request to create a new customer in the InsurUp system. Supports individual, foreign, and company customer types with comprehensive customer information.\n *\n * InsurUp sisteminde yeni müşteri oluşturma talebini temsil eder. Kapsamlı müşteri bilgileri ile bireysel, yabancı ve şirket müşteri türlerini destekler.\n */\nexport type CreateCustomerRequest =\n | CreateCustomerRequestIndividual\n | CreateCustomerRequestForeign\n | CreateCustomerRequestCompany;\n\n/**\n * Base interface for customer creation requests containing common fields.\n *\n * Ortak alanları içeren müşteri oluşturma talepleri için temel arayüz.\n */\ninterface CreateCustomerRequestBase {\n /**\n * Specifies the category of customer being created in the system. This determines which fields\n * are required and how the customer will be processed in insurance workflows. Each type has\n * specific identification requirements and regulatory compliance needs.\n *\n * Sistemde oluşturulan müşterinin kategorisini belirtir. Bu, hangi alanların zorunlu olduğunu\n * ve müşterinin sigorta iş akışlarında nasıl işleneceğini belirler. Her tür, özel kimlik gereksinimleri\n * ve yasal uyum ihtiyaçlarına sahiptir.\n */\n type: CustomerType;\n\n /**\n * Primary email address for customer communications, policy notifications, and digital document delivery.\n * This field is masked with redaction for data protection compliance. Email is used for sending policy documents,\n * renewal notices, claim updates, and other important insurance communications.\n *\n * Müşteri iletişimi, poliçe bildirimleri ve dijital belge teslimatı için birincil e-posta adresi.\n * Bu alan veri koruması uyumluluğu için maskeleme ile gizlenir. E-posta, poliçe belgelerini, yenileme\n * bildirimlerini, hasar güncellemelerini ve diğer önemli sigorta iletişimlerini göndermek için kullanılır.\n */\n email?: string | null;\n\n /**\n * Primary phone number for customer contact, emergency notifications, and customer service communications.\n * This field is masked for data protection compliance. Used for claim notifications, policy confirmations,\n * and urgent insurance-related communications.\n *\n * Müşteri iletişimi, acil durum bildirimleri ve müşteri hizmetleri iletişimi için birincil telefon numarası.\n * Bu alan veri koruması uyumluluğu için maskelenir. Hasar bildirimleri, poliçe onayları ve acil sigorta\n * ile ilgili iletişimler için kullanılır.\n */\n phoneNumber?: CustomerPhoneNumber | null;\n\n /**\n * Reference to the city where the customer is located. Used for risk assessment, pricing calculations,\n * and regional insurance regulations. Turkish cities are numbered 1-81 according to license plate codes,\n * which affects insurance premium calculations and coverage availability.\n *\n * Müşterinin bulunduğu şehir referansı. Risk değerlendirmesi, fiyatlandırma hesaplamaları ve bölgesel\n * sigorta düzenlemeleri için kullanılır. Türk şehirleri plaka kodlarına göre 1-81 arasında numaralandırılır,\n * bu da sigorta prim hesaplamalarını ve teminat kullanılabilirliğini etkiler.\n */\n cityReference?: string | null;\n\n /**\n * Reference to the district within the city where the customer is located. Provides more precise\n * location information for risk assessment and local insurance regulations. District-level data\n * helps determine specific hazard zones, theft rates, and other location-based risk factors.\n *\n * Müşterinin bulunduğu şehir içindeki ilçe referansı. Risk değerlendirmesi ve yerel sigorta\n * düzenlemeleri için daha kesin konum bilgisi sağlar. İlçe düzeyindeki veriler, belirli tehlike\n * bölgelerini, hırsızlık oranlarını ve diğer konum tabanlı risk faktörlerini belirlemeye yardımcı olur.\n */\n districtReference?: string | null;\n\n /**\n * Indicates whether the system should attempt to automatically populate missing customer information\n * from external data sources (e.g., government databases, credit bureaus). This feature helps streamline\n * customer onboarding by reducing manual data entry requirements while ensuring data accuracy.\n *\n * Sistemin eksik müşteri bilgilerini dış veri kaynaklarından (örn. devlet veritabanları, kredi büroları)\n * otomatik olarak doldurmaya çalışıp çalışmayacağını belirtir. Bu özellik, veri doğruluğunu sağlarken\n * manuel veri girişi gereksinimlerini azaltarak müşteri katılım sürecini kolaylaştırmaya yardımcı olur.\n */\n fillMissingFields: boolean;\n}\n\n/**\n * Specialized request for creating individual customers who are Turkish citizens. Requires Turkish\n * National Identity Number (TC Kimlik No) and supports comprehensive demographic information including\n * personal details, education, employment, and marital status. This information is essential for\n * insurance underwriting, risk assessment, and regulatory compliance in the Turkish insurance market.\n *\n * Türk vatandaşı olan bireysel müşteri oluşturma için özel talep. Türkiye Cumhuriyeti Kimlik Numarası\n * (TC Kimlik No) gerektirir ve kişisel detaylar, eğitim, istihdam ve medeni durum dahil kapsamlı demografik\n * bilgileri destekler. Bu bilgiler, Türk sigorta piyasasında sigorta sigortacılığı, risk değerlendirmesi\n * ve yasal uyum için gereklidir.\n */\nexport interface CreateCustomerRequestIndividual extends CreateCustomerRequestBase {\n type: CustomerType.Individual;\n\n /**\n * The 11-digit Turkish National Identity Number (TC Kimlik Numarası) that uniquely identifies\n * Turkish citizens. This is a mandatory field for individual customers and is used for identity\n * verification, government integrations, and regulatory compliance. The number is validated\n * against government databases to ensure authenticity.\n *\n * Türk vatandaşlarını benzersiz şekilde tanımlayan 11 haneli Türkiye Cumhuriyeti Kimlik Numarası.\n * Bu, bireysel müşteriler için zorunlu bir alandır ve kimlik doğrulama, devlet entegrasyonları ve\n * yasal uyum için kullanılır. Numara, otantikliği sağlamak için devlet veritabanlarına karşı doğrulanır.\n */\n identityNumber: string;\n\n /**\n * Complete name of the individual customer as registered in official documents. Used for policy\n * issuance, claim processing, and legal documentation. Must match official identification documents\n * for verification purposes.\n *\n * Resmi belgelerde kayıtlı olduğu şekliyle bireysel müşterinin tam adı. Poliçe düzenleme, hasar\n * işleme ve yasal belgelendirme için kullanılır. Doğrulama amacıyla resmi kimlik belgelerindeki\n * adla eşleşmesi gerekir.\n */\n fullName?: string | null;\n\n /**\n * Date of birth of the individual customer. Critical for age-based risk assessment, premium\n * calculations, and eligibility for certain insurance products. Used to verify identity and\n * ensure compliance with age-related insurance regulations.\n *\n * Bireysel müşterinin doğum tarihi. Yaş tabanlı risk değerlendirmesi, prim hesaplamaları ve\n * belirli sigorta ürünlerine uygunluk için kritiktir. Kimlik doğrulama ve yaşla ilgili sigorta\n * düzenlemelerine uyum sağlamak için kullanılır.\n */\n birthDate?: string | null;\n\n /**\n * Gender specification of the individual customer. Used for statistical analysis, actuarial\n * calculations, and certain insurance product eligibility. Some insurance products may have\n * gender-specific pricing or coverage options based on risk assessment data.\n *\n * Bireysel müşterinin cinsiyet belirtimi. İstatistiksel analiz, aktüeryal hesaplamalar ve belirli\n * sigorta ürün uygunluğu için kullanılır. Bazı sigorta ürünleri, risk değerlendirme verilerine dayalı\n * olarak cinsiyete özgü fiyatlandırma veya teminat seçeneklerine sahip olabilir.\n */\n gender?: Gender | null;\n\n /**\n * Current marital status of the individual customer. Affects certain insurance products, especially\n * life insurance beneficiary designations, family coverage options, and dependent coverage eligibility.\n * Important for household risk assessment and insurance planning.\n *\n * Bireysel müşterinin mevcut medeni durumu. Belirli sigorta ürünlerini, özellikle hayat sigortası\n * lehtar atamalarını, aile teminat seçeneklerini ve bağımlı teminat uygunluğunu etkiler. Hane halkı\n * risk değerlendirmesi ve sigorta planlaması için önemlidir.\n */\n maritalStatus?: MaritalStatus | null;\n\n /**\n * Nationality of the individual customer. Important for regulatory compliance, international\n * insurance coverage, and cross-border claim processing. Different nationalities may have\n * specific requirements or restrictions for certain insurance products.\n *\n * Bireysel müşterinin vatandaşlığı. Yasal uyum, uluslararası sigorta teminatı ve sınır ötesi\n * hasar işleme için önemlidir. Farklı vatandaşlıklar, belirli sigorta ürünleri için özel gereksinimler\n * veya kısıtlamalara sahip olabilir.\n */\n nationality?: Nationality | null;\n\n /**\n * Highest level of education completed by the individual customer. Used for demographic profiling,\n * risk assessment, and targeted insurance product recommendations. Education level can correlate\n * with income potential and insurance needs.\n *\n * Bireysel müşteri tarafından tamamlanan en yüksek eğitim seviyesi. Demografik profilleme, risk\n * değerlendirmesi ve hedefli sigorta ürün önerileri için kullanılır. Eğitim seviyesi, gelir potansiyeli\n * ve sigorta ihtiyaçları ile ilişkilendirilebilir.\n */\n educationStatus?: EducationStatus | null;\n\n /**\n * Current job or occupation of the individual customer. Critical for occupational risk assessment,\n * professional liability coverage, and industry-specific insurance needs. Certain high-risk occupations\n * may affect premium calculations or coverage availability.\n *\n * Bireysel müşterinin mevcut işi veya mesleği. Mesleki risk değerlendirmesi, mesleki sorumluluk\n * teminatı ve sektöre özgü sigorta ihtiyaçları için kritiktir. Belirli yüksek riskli meslekler,\n * prim hesaplamalarını veya teminat kullanılabilirliğini etkileyebilir.\n */\n job?: Job | null;\n}\n\n/**\n * Specialized request for creating customers who are foreign nationals residing in or visiting Turkey.\n * Requires foreign identification (passport number, foreign ID) and supports the same demographic\n * information as individual customers. Special considerations apply for foreign customers regarding\n * documentation requirements and regulatory compliance.\n *\n * Türkiye'de ikamet eden veya ziyaret eden yabancı vatandaş müşteriler oluşturma için özel talep.\n * Yabancı kimlik (pasaport numarası, yabancı kimlik) gerektirir ve bireysel müşterilerle aynı demografik\n * bilgileri destekler. Belgelendirme gereksinimleri ve yasal uyum konusunda yabancı müşteriler için\n * özel hususlar geçerlidir.\n */\nexport interface CreateCustomerRequestForeign extends CreateCustomerRequestBase {\n type: CustomerType.Foreign;\n\n /**\n * Foreign identification number such as passport number or foreign national ID number.\n * This is mandatory for foreign customers and is used for identity verification and regulatory\n * compliance for non-Turkish citizens seeking insurance coverage in Turkey.\n *\n * Pasaport numarası veya yabancı ulusal kimlik numarası gibi yabancı kimlik numarası.\n * Bu, yabancı müşteriler için zorunludur ve Türkiye'de sigorta teminatı arayan Türk olmayan\n * vatandaşlar için kimlik doğrulama ve yasal uyum için kullanılır.\n */\n identityNumber: string;\n\n /**\n * Complete name of the foreign customer as it appears on their passport or official foreign\n * identification documents. Must match identification documents for verification and policy issuance.\n *\n * Yabancı müşterinin pasaport veya resmi yabancı kimlik belgelerinde göründüğü şekliyle tam adı.\n * Doğrulama ve poliçe düzenleme için kimlik belgeleriyle eşleşmesi gerekir.\n */\n fullName?: string | null;\n\n /**\n * Date of birth of the foreign customer as recorded in their official identification documents.\n * Used for age verification, risk assessment, and eligibility determination for insurance products.\n *\n * Yabancı müşterinin resmi kimlik belgelerinde kayıtlı doğum tarihi. Yaş doğrulama, risk\n * değerlendirmesi ve sigorta ürünlerine uygunluk belirleme için kullanılır.\n */\n birthDate?: string | null;\n\n /**\n * Gender specification of the foreign customer for demographic profiling and insurance\n * product eligibility assessment.\n *\n * Demografik profilleme ve sigorta ürün uygunluk değerlendirmesi için yabancı müşterinin\n * cinsiyet belirtimi.\n */\n gender?: Gender | null;\n\n /**\n * Current marital status of the foreign customer, affecting coverage options and beneficiary\n * designations for insurance products.\n *\n * Yabancı müşterinin mevcut medeni durumu, sigorta ürünleri için teminat seçeneklerini ve\n * lehtar atamalarını etkiler.\n */\n maritalStatus?: MaritalStatus | null;\n\n /**\n * Country of citizenship for the foreign customer. Essential for international insurance\n * coverage, cross-border regulations, and diplomatic considerations.\n *\n * Yabancı müşterinin vatandaşlık ülkesi. Uluslararası sigorta teminatı, sınır ötesi düzenlemeler\n * ve diplomatik hususlar için gereklidir.\n */\n nationality?: Nationality | null;\n\n /**\n * Highest level of education completed by the foreign customer for demographic analysis\n * and insurance product recommendations.\n *\n * Demografik analiz ve sigorta ürün önerileri için yabancı müşteri tarafından tamamlanan\n * en yüksek eğitim seviyesi.\n */\n educationStatus?: EducationStatus | null;\n\n /**\n * Current job or occupation of the foreign customer for occupational risk assessment\n * and professional insurance needs evaluation.\n *\n * Mesleki risk değerlendirmesi ve profesyonel sigorta ihtiyaç değerlendirmesi için yabancı\n * müşterinin mevcut işi veya mesleği.\n */\n job?: Job | null;\n}\n\n/**\n * Specialized request for creating corporate customers and business entities. Requires tax number\n * for identification and company title for official records. Corporate customers have different\n * insurance needs, regulatory requirements, and risk profiles compared to individual customers.\n * Used for commercial insurance products and business-related coverage.\n *\n * Kurumsal müşteriler ve işletmeler oluşturma için özel talep. Kimlik için vergi numarası ve\n * resmi kayıtlar için şirket unvanı gerektirir. Kurumsal müşteriler, bireysel müşterilere kıyasla\n * farklı sigorta ihtiyaçları, yasal gereksinimler ve risk profillerine sahiptir. Ticari sigorta\n * ürünleri ve işletme ile ilgili teminatlar için kullanılır.\n */\nexport interface CreateCustomerRequestCompany extends CreateCustomerRequestBase {\n type: CustomerType.Company;\n\n /**\n * Official registered name of the company as it appears in commercial registry records.\n * Used for policy issuance, legal documentation, and official correspondence. Must match\n * trade registry records for verification and compliance purposes.\n *\n * Ticaret sicili kayıtlarında göründüğü şekliyle şirketin resmi tescilli adı. Poliçe düzenleme,\n * yasal belgelendirme ve resmi yazışmalar için kullanılır. Doğrulama ve uyum amacıyla ticaret\n * sicili kayıtlarıyla eşleşmesi gerekir.\n */\n title: string;\n\n /**\n * Official tax identification number of the company issued by Turkish tax authorities.\n * Essential for corporate identification, tax compliance, and business insurance regulations.\n * Used for invoicing, premium calculations, and regulatory reporting requirements.\n *\n * Türk vergi makamları tarafından verilen şirketin resmi vergi kimlik numarası. Kurumsal\n * kimlik, vergi uyumu ve işletme sigorta düzenlemeleri için gereklidir. Faturalama, prim\n * hesaplamaları ve yasal raporlama gereksinimleri için kullanılır.\n */\n taxNumber: string;\n}\n\n/**\n * Represents a request to retrieve detailed customer information from the InsurUp system.\n *\n * InsurUp sisteminden detaylı müşteri bilgilerini almak için talebi temsil eder.\n */\nexport interface GetCustomerRequest {\n /**\n * Unique identifier (GUID) of the customer whose detailed information is being requested.\n * This ID was assigned during customer creation and serves as the primary key for retrieving\n * the complete customer profile from the database.\n *\n * Detaylı bilgileri talep edilen müşterinin benzersiz tanımlayıcısı (GUID). Bu ID müşteri\n * oluşturma sırasında atanmıştır ve veritabanından tam müşteri profilini almak için birincil\n * anahtar görevi görür.\n */\n customerId: string;\n}\n\n/**\n * Represents a request to update existing customer information in the InsurUp system. Supports individual, foreign, and company customer types with comprehensive update capabilities.\n *\n * InsurUp sisteminde mevcut müşteri bilgilerini güncelleme talebini temsil eder. Kapsamlı güncelleme yetenekleri ile bireysel, yabancı ve şirket müşteri türlerini destekler.\n */\nexport type UpdateCustomerRequest =\n | UpdateCustomerRequestIndividual\n | UpdateCustomerRequestForeign\n | UpdateCustomerRequestCompany;\n\n/**\n * Base interface for customer update requests containing common fields.\n *\n * Ortak alanları içeren müşteri güncelleme talepleri için temel arayüz.\n */\ninterface UpdateCustomerRequestBase {\n type: CustomerType;\n id: string;\n cityReference?: string | null;\n districtReference?: string | null;\n primaryEmail?: string | null;\n primaryPhoneNumber?: CustomerPhoneNumber | null;\n fillMissingFields: boolean;\n}\n\n/**\n * Specialized update request for individual customers who are Turkish citizens.\n */\nexport interface UpdateCustomerRequestIndividual extends UpdateCustomerRequestBase {\n type: CustomerType.Individual;\n fullName?: string | null;\n birthDate?: string | null;\n gender?: Gender | null;\n maritalStatus?: MaritalStatus | null;\n nationality?: Nationality | null;\n educationStatus?: EducationStatus | null;\n job?: Job | null;\n}\n\n/**\n * Specialized update request for customers who are foreign nationals.\n */\nexport interface UpdateCustomerRequestForeign extends UpdateCustomerRequestBase {\n type: CustomerType.Foreign;\n fullName?: string | null;\n birthDate?: string | null;\n gender?: Gender | null;\n maritalStatus?: MaritalStatus | null;\n nationality?: Nationality | null;\n educationStatus?: EducationStatus | null;\n job?: Job | null;\n}\n\n/**\n * Specialized update request for corporate customers and business entities.\n */\nexport interface UpdateCustomerRequestCompany extends UpdateCustomerRequestBase {\n type: CustomerType.Company;\n title: string;\n taxNumber: string;\n}\n\n/**\n * Request to add a new email address to a customer's contact information.\n */\nexport interface AddCustomerEmailRequest {\n customerId: string;\n email: string;\n}\n\n/**\n * Request to remove an email address from a customer's contact information.\n */\nexport interface RemoveCustomerEmailRequest {\n customerId: string;\n email: string;\n}\n\n/**\n * Request to change the primary email address for a customer.\n */\nexport interface ChangePrimaryCustomerEmailRequest {\n customerId: string;\n email: string;\n}\n\n/**\n * Request to add a new phone number to a customer's contact information.\n */\nexport interface AddCustomerPhoneNumberRequest {\n customerId: string;\n phoneNumber: CustomerPhoneNumber;\n}\n\n/**\n * Request to remove a phone number from a customer's contact information.\n */\nexport interface RemoveCustomerPhoneNumberRequest {\n customerId: string;\n countryCode: number;\n phoneNumber: string;\n}\n\n/**\n * Request to change the primary phone number for a customer.\n */\nexport interface ChangePrimaryCustomerPhoneNumberRequest {\n customerId: string;\n countryCode: number;\n phoneNumber: string;\n}\n\n/**\n * Request to assign or change a customer's representative agent user.\n */\nexport interface SetCustomerRepresentativeRequest {\n customerId: string;\n representativeAgentUserId?: string | null;\n}\n\n/**\n * Request to retrieve comprehensive health information for a customer.\n */\nexport interface GetCustomerHealthInfoRequest {\n customerId: string;\n}\n\n/**\n * Request to update customer health information.\n */\nexport interface UpdateCustomerHealthInfoRequest {\n customerId: string;\n height?: number | null;\n weight?: number | null;\n surgeries: Surgery[];\n diseases: Disease[];\n}\n\n/**\n * Request to initiate a new customer contact flow.\n */\nexport interface CreateContactFlowRequest {\n customerId: string;\n name: string;\n}\n\n/**\n * Request to record a customer contact interaction.\n */\nexport interface CreateCustomerContactRequest {\n customerId: string;\n}\n\n/**\n * Request to complete and close a customer contact flow.\n */\nexport interface EndContactFlowRequest {\n customerId: string;\n contactFlowId: string;\n}\n\n/**\n * Request to retrieve all contact flows for a customer.\n */\nexport interface GetCustomerContactFlowsRequest {\n customerId: string;\n caseRef?: string | null;\n}\n\n/**\n * Request to retrieve all individual contact interactions for a customer.\n */\nexport interface GetCustomerContactsRequest {\n customerId: string;\n caseRef?: string | null;\n}\n\n/**\n * Represents a request to lookup customer information from external data sources.\n */\nexport type ExternalLookupCustomerRequest =\n | ExternalLookupCustomerRequestIndividual\n | ExternalLookupCustomerRequestCompany\n | ExternalLookupCustomerRequestForeign;\n\n/**\n * External lookup request for Turkish citizens using their National Identity Number.\n */\nexport interface ExternalLookupCustomerRequestIndividual {\n identityNumber: number;\n birthDate?: string | null;\n}\n\n/**\n * External lookup request for corporate entities using their tax identification number.\n */\nexport interface ExternalLookupCustomerRequestCompany {\n taxNumber: string;\n}\n\n/**\n * External lookup request for foreign nationals using their foreign identification documents.\n */\nexport interface ExternalLookupCustomerRequestForeign {\n identityNumber: string;\n birthDate: string;\n}\n\n// === RESPONSE CONTRACTS ===\n\n/**\n * Response returned after successfully creating a new customer.\n */\nexport interface CreateCustomerResult {\n id: string;\n}\n\n/**\n * Comprehensive response containing complete customer profile information.\n */\nexport type GetCustomerResult =\n | GetCustomerResultIndividual\n | GetCustomerResultForeign\n | GetCustomerResultCompany;\n\n/**\n * Base interface for customer response containing common fields.\n */\ninterface GetCustomerResultBase {\n id: string;\n type: CustomerType;\n primaryEmail?: string | null;\n primaryPhoneNumber?: CustomerPhoneNumber | null;\n city?: InsuranceParameter | null;\n district?: InsuranceParameter | null;\n createdAt: DateTime;\n createdBy: UserReference;\n representedBy?: UserReference | null;\n}\n\n/**\n * Response for individual customers who are Turkish citizens.\n */\nexport interface GetCustomerResultIndividual extends GetCustomerResultBase {\n type: CustomerType.Individual;\n fullName?: string | null;\n identityNumber: number;\n birthDate?: DateOnly | null;\n gender?: Gender | null;\n educationStatus?: EducationStatus | null;\n nationality?: Nationality | null;\n maritalStatus?: MaritalStatus | null;\n job?: Job | null;\n}\n\n/**\n * Response for customers who are foreign nationals.\n */\nexport interface GetCustomerResultForeign extends GetCustomerResultBase {\n type: CustomerType.Foreign;\n fullName?: string | null;\n identityNumber: string;\n birthDate?: DateOnly | null;\n gender?: Gender | null;\n educationStatus?: EducationStatus | null;\n nationality?: Nationality | null;\n maritalStatus?: MaritalStatus | null;\n job?: Job | null;\n}\n\n/**\n * Response for corporate customers and business entities.\n */\nexport interface GetCustomerResultCompany extends GetCustomerResultBase {\n type: CustomerType.Company;\n title: string;\n taxNumber: string;\n}\n\n/**\n * Response item representing a customer email address with primary status indicator.\n */\nexport interface GetCustomerEmailsResultItem {\n email: string;\n primary: boolean;\n}\n\n/**\n * Response item representing a customer phone number with primary status indicator.\n */\nexport interface GetCustomerPhoneNumbersResultItem {\n phoneNumber: CustomerPhoneNumber;\n primary: boolean;\n}\n\n/**\n * Response containing comprehensive health information for a customer.\n */\nexport interface GetCustomerHealthInfoResult {\n height?: number | null;\n weight?: number | null;\n surgeries: Surgery[];\n diseases: Disease[];\n}\n\n/**\n * Response item representing a customer contact flow.\n * Used to track the progress and outcome of customer communication workflows.\n */\nexport interface GetCustomerContactFlowsResultItem {\n /** Unique identifier for the contact flow */\n readonly id: string;\n /** Name of the contact flow */\n readonly name: string;\n /** Number of contacts in this flow */\n readonly contactsCount: number;\n /** Optional case reference associated with this flow */\n readonly caseRef?: string | null;\n /** Customer ID associated with this flow */\n readonly customerId: string;\n /** User who created this contact flow */\n readonly createdBy: UserReference;\n /** Timestamp when the flow was created */\n readonly createdAt: DateTime;\n /** Current state of the contact flow */\n readonly state: ContactFlowState;\n /** Date when the flow ended (if applicable) */\n readonly endedDate?: DateTime | null;\n}\n\n/**\n * Base interface for customer contact interactions.\n * Represents individual contact records within communication workflows.\n */\nexport interface GetCustomerContactsResultItem {\n /** Unique identifier for the contact */\n readonly id: string;\n /** Type of contact (e.g., phone call) */\n readonly type: ContactType;\n /** Current state of the contact */\n readonly state: ContactState;\n /** Customer ID associated with this contact */\n readonly customerId: string;\n /** Timestamp when the contact was created */\n readonly createdAt: DateTime;\n /** Time when the contact attempt was made */\n readonly attemptTime?: DateTime | null;\n /** Time when the contact started */\n readonly startTime?: DateTime | null;\n /** Time when the contact was planned for */\n readonly plannedTime?: DateTime | null;\n /** Optional flow ID if this contact belongs to a flow */\n readonly flowId?: string | null;\n /** Representative who handled this contact */\n readonly representative?: UserReference | null;\n /** User who created this contact record */\n readonly createdBy: UserReference;\n}\n\n/**\n * Phone call contact response item.\n * Extends the base contact with phone-specific properties.\n */\nexport interface PhoneCallContactResultItem extends GetCustomerContactsResultItem {\n /** Time when the call was hung up */\n readonly hangUpTime?: DateTime | null;\n}\n\n/**\n * Response containing external customer data retrieved from third-party sources.\n * Base interface containing common location properties for all customer types.\n */\nexport interface ExternalLookupCustomerResult {\n /** City information retrieved from external sources */\n readonly city?: InsuranceParameter | null;\n /** District information retrieved from external sources */\n readonly district?: InsuranceParameter | null;\n}\n\n/**\n * External lookup response for individual customers (Turkish citizens).\n * Contains personal information retrieved from government databases and identity verification services.\n */\nexport interface ExternalLookupIndividualCustomerResult extends ExternalLookupCustomerResult {\n /** Full legal name retrieved from official records */\n readonly fullName?: string | null;\n /** Gender information retrieved from official records */\n readonly gender?: Gender | null;\n /** Email address retrieved from external sources */\n readonly email?: string | null;\n /** Phone number retrieved from external sources */\n readonly phoneNumber?: CustomerPhoneNumber | null;\n /** Marital status retrieved from official records */\n readonly maritalStatus?: MaritalStatus | null;\n /** Date of birth retrieved from official records */\n readonly birthDate?: DateOnly | null;\n}\n\n/**\n * External lookup response for foreign customers (non-Turkish citizens).\n * Contains personal information retrieved from international identity verification services.\n */\nexport interface ExternalLookupForeignCustomerResult extends ExternalLookupCustomerResult {\n /** Full name retrieved from international verification services */\n readonly fullName?: string | null;\n /** Gender information retrieved from international sources */\n readonly gender?: Gender | null;\n /** Email address retrieved from external sources */\n readonly email?: string | null;\n /** Phone number retrieved from external sources */\n readonly phoneNumber?: CustomerPhoneNumber | null;\n /** Marital status retrieved from international records */\n readonly maritalStatus?: MaritalStatus | null;\n /** Date of birth retrieved from international sources */\n readonly birthDate?: DateOnly | null;\n}\n\n/**\n * External lookup response for company customers (corporate entities).\n * Contains corporate information retrieved from tax authority and commercial registry databases.\n */\nexport interface ExternalLookupCompanyCustomerResult extends ExternalLookupCustomerResult {\n /** Official registered business name */\n readonly title?: string | null;\n}\n\n// ============================================================================\n// BRANCH ASSIGNMENT TYPES\n// ============================================================================\n\n/**\n * Request to set customer branch\n */\nexport interface SetCustomerBranchRequest {\n readonly customerId: string;\n readonly branchId: string;\n}\n\n// ============================================================================\n// ADDRESS MANAGEMENT TYPES\n// ============================================================================\n\n/**\n * Request to create customer address\n */\nexport interface CreateCustomerAddressRequest {\n readonly customerId: string;\n readonly propertyNumber: number;\n readonly addressType: string;\n}\n\n/**\n * Response for created customer address\n */\nexport interface CreateCustomerAddressResult {\n readonly addressId: string;\n}\n\n/**\n * Request to update customer address\n */\nexport interface UpdateCustomerAddressRequest {\n readonly customerId: string;\n readonly addressId: string;\n readonly addressType: string;\n}\n\n/**\n * Response for customer address\n */\nexport interface GetCustomerAddressResult {\n readonly addressId: string;\n readonly propertyNumber: number;\n readonly addressType: string;\n readonly address: PropertyAddress;\n}\n\n// ============================================================================\n// CONSENT MANAGEMENT TYPES\n// ============================================================================\n\n/**\n * Request to give customer consent\n */\nexport interface GiveCustomerConsentRequest {\n readonly consentType: string;\n readonly consentDate: string;\n readonly source: string;\n}\n\n/**\n * Request to revoke customer consent\n */\nexport interface RevokeCustomerConsentRequest {\n readonly consentType: string;\n readonly revocationDate: string;\n}\n\n/**\n * Active consent\n */\nexport interface ActiveConsent {\n readonly consentType: string;\n readonly consentDate: string;\n readonly source: string;\n}\n\n/**\n * Consent history item\n */\nexport interface ConsentHistoryItem {\n readonly consentType: string;\n readonly action: string;\n readonly date: string;\n readonly source?: string;\n}\n\n/**\n * Response for customer consents\n */\nexport interface GetCustomerConsentsResult {\n readonly activeConsents: readonly ActiveConsent[];\n readonly consentHistory: readonly ConsentHistoryItem[];\n}\n","/**\n * @fileoverview Case Management Contracts - Case management operations\n * @description TypeScript contracts for case management operations\n */\n\nimport {\n Channel,\n AssetType,\n CustomerType,\n ProductBranch,\n Currency,\n PaymentOption,\n PolicyState\n} from \"./common.js\";\nimport type {\n InsuranceParameter,\n UserReference,\n VehicleEngine,\n VehicleChassis,\n VehicleRegistrationDate,\n VehicleSeatNumber,\n PropertyNumber,\n PropertySquareMeter,\n PropertyConstructionYear,\n\n CustomerEmail,\n BirthDate} from \"./common.js\";\nimport type { CustomerPhoneNumber } from \"./common.js\";\nimport type {\n VehicleModel,\n VehiclePlate,\n VehicleDocumentSerial,\n VehicleFuel,\n VehicleUtilizationStyle,\n PropertyDamageStatus,\n PropertyFloor,\n PropertyStructure,\n PropertyUtilizationStyle,\n PropertyOwnershipType,\n} from \"./common.js\";\n\n// ============================================================================\n// CASE-SPECIFIC ENUMS\n// ============================================================================\n\n/**\n * Insurance Case Types\n *\n * Primary categorization of insurance cases that defines the business context, processing workflows,\n * and service requirements for different customer interactions. Each case type has distinct business\n * rules, documentation requirements, approval processes, and success criteria. Essential for routing\n * cases to appropriate specialists, applying correct service level agreements, and ensuring\n * consistent handling procedures across the organization.\n *\n * Farklı müşteri etkileşimleri için iş bağlamını, işleme iş akışlarını ve hizmet gereksinimlerini\n * tanımlayan sigorta taleplerinin birincil kategorizasyonu. Her talep türünün kendine özgü iş kuralları,\n * belgelendirme gereksinimleri, onay süreçleri ve başarı kriterleri vardır. Talepleri uygun uzmanlara\n * yönlendirmek, doğru hizmet seviye anlaşmalarını uygulamak ve kuruluş genelinde tutarlı işleme\n * prosedürlerini sağlamak için gereklidir.\n */\nexport enum CaseType {\n /**\n * Sales opportunity case for new business acquisition or policy sales\n */\n SaleOpportunity = \"SALE_OPPORTUNITY\",\n /**\n * Policy endorsement case for modifications and changes\n */\n Endorsement = \"ENDORSEMENT\",\n /**\n * Policy cancellation case\n */\n Cancel = \"CANCEL\",\n /**\n * Customer complaint case\n */\n Complaint = \"COMPLAINT\",\n}\n\n/**\n * Case Main States\n */\nexport enum CaseMainState {\n Fail = \"FAIL\",\n Open = \"OPEN\",\n InProgress = \"IN_PROGRESS\",\n Success = \"SUCCESS\",\n}\n\n/**\n * Case Sub-States\n */\nexport enum CaseSubState {\n FailNoResponse = \"FAIL_NO_RESPONSE\",\n FailInvalidCase = \"FAIL_INVALID_CASE\",\n FailCustomerWithdrawn = \"FAIL_CUSTOMER_WITHDRAWN\",\n FailPaymentError = \"FAIL_PAYMENT_ERROR\",\n FailDeclinedCardInformation = \"FAIL_DECLINED_CARD_INFORMATION\",\n FailForeignUser = \"FAIL_FOREIGN_USER\",\n FailTakenElsewhere = \"FAIL_TAKEN_ELSEWHERE\",\n FailPriceTooHigh = \"FAIL_PRICE_TOO_HIGH\",\n FailAssetAcquisition = \"FAIL_ASSET_ACQUISITION\",\n FailAssetSold = \"FAIL_ASSET_SOLD\",\n FailUnresolved = \"FAIL_UNRESOLVED\",\n FailReferredToLegal = \"FAIL_REFERRED_TO_LEGAL\",\n FailCustomerUnsatisfied = \"FAIL_CUSTOMER_UNSATISFIED\",\n FailMissingDocuments = \"FAIL_MISSING_DOCUMENTS\",\n FailInsurerDenied = \"FAIL_INSURER_DENIED\",\n FailConditionsNotMet = \"FAIL_CONDITIONS_NOT_MET\",\n OpenInitial = \"OPEN_INITIAL\",\n OpenCollectingInformation = \"OPEN_COLLECTING_INFORMATION\",\n OpenDelayed = \"OPEN_DELAYED\",\n OpenWaiting = \"OPEN_WAITING\",\n InProgressUnderAnalysis = \"IN_PROGRESS_UNDER_ANALYSIS\",\n InProgressProposalPrepared = \"IN_PROGRESS_PROPOSAL_PREPARED\",\n InProgressAwaitingApproval = \"IN_PROGRESS_AWAITING_APPROVAL\",\n InProgressToBeRecontacted = \"IN_PROGRESS_TO_BE_RECONTACTED\",\n SuccessCompleted = \"SUCCESS_COMPLETED\",\n}\n\n/**\n * Case Status\n */\nexport enum CaseStatus {\n Open = \"OPEN\",\n Delayed = \"DELAYED\",\n Success = \"SUCCESS\",\n Fail = \"FAIL\",\n}\n\n/**\n * Represents specific subtypes of sales opportunity cases that categorize different sales scenarios and business development activities.\n * Sales opportunity subtypes help optimize sales processes and track different revenue streams and customer acquisition strategies.\n *\n * Farklı satış senaryolarını ve iş geliştirme faaliyetlerini kategorize eden satış fırsatı taleplerinin belirli alt türlerini temsil eder.\n * Satış fırsatı alt türleri, satış süreçlerini optimize etmeye ve farklı gelir akışları ile müşteri kazanım stratejilerini takip etmeye yardımcı olur.\n */\nexport enum SaleOpportunityCaseSubType {\n /**\n * New customer acquisition sale with first-time policy purchase.\n *\n * İlk kez poliçe satın alımı ile yeni müşteri kazanım satışı.\n */\n NewSale = \"NEW_SALE\",\n\n /**\n * Cross-selling additional products to existing customers.\n *\n * Mevcut müşterilere ek ürünlerin çapraz satışı.\n */\n CrossSale = \"CROSS_SALE\",\n\n /**\n * Policy renewal sale for existing coverage continuation.\n *\n * Mevcut teminatın devamı için poliçe yenileme satışı.\n */\n Renewal = \"RENEWAL\",\n}\n\n/**\n * Policy Cancellation Case Subtypes\n *\n * Enumeration of specific cancellation scenarios that require different processing workflows,\n * documentation requirements, and refund calculations. Each subtype represents a distinct reason\n * for policy termination with its own business rules, timing requirements, and administrative procedures.\n * Critical for ensuring proper handling of cancellation requests, calculating appropriate refunds,\n * and maintaining compliance with insurance regulations and customer service standards.\n *\n * Farklı işlem akışları, belgelendirme gereksinimleri ve iade hesaplamaları gerektiren belirli\n * iptal senaryolarının numaralandırması. Her alt tür, kendi iş kuralları, zamanlama gereksinimleri\n * ve idari prosedürleri ile farklı bir poliçe fesih nedenini temsil eder. İptal taleplerinin uygun\n * şekilde işlenmesi, uygun iadelerin hesaplanması ve sigorta düzenlemeleri ile müşteri hizmetleri\n * standartlarına uyumun sağlanması için kritiktir.\n */\nexport enum CancelCaseSubType {\n /**\n * Online Cancellation with Refund / İade ile Çevrimiçi İptal\n *\n * Policy cancellation initiated through digital channels (website, mobile app) with automatic\n * refund processing. This self-service option allows customers to cancel policies and receive\n * prorated refunds without agent intervention. Typically includes automated calculations for\n * cancellation fees, used coverage periods, and final refund amounts based on policy terms and conditions.\n *\n * Otomatik iade işlemi ile dijital kanallar (web sitesi, mobil uygulama) aracılığıyla başlatılan\n * poliçe iptali. Bu self-servis seçeneği, müşterilerin acente müdahalesi olmadan poliçeleri iptal etmelerini\n * ve oransal iadeler almalarını sağlar. Genellikle iptal ücretleri, kullanılan teminat dönemleri ve\n * poliçe şartlarına göre nihai iade tutarları için otomatik hesaplamaları içerir.\n */\n OnlineCancellationRefund = \"ONLINE_CANCELLATION_REFUND\",\n /**\n * MEB (Ministry of Education) Cancellation / MEB (Milli Eğitim Bakanlığı) İptali\n *\n * Policy cancellation required due to Ministry of Education regulations, typically related to\n * educational institution insurance requirements or student insurance policies. May involve special\n * regulatory compliance procedures and specific documentation requirements. Often processed with\n * expedited timelines to meet educational calendar requirements.\n *\n * Milli Eğitim Bakanlığı düzenlemeleri nedeniyle gereken poliçe iptali, genellikle eğitim kurumu\n * sigorta gereksinimleri veya öğrenci sigorta poliçeleri ile ilgilidir. Özel düzenleyici uyumluluk\n * prosedürleri ve belirli belgelendirme gereksinimlerini içerebilir. Genellikle eğitim takvimi\n * gereksinimlerini karşılamak için hızlandırılmış zaman çizelgeleri ile işlenir.\n */\n MebCancellation = \"MEB_CANCELLATION\",\n /**\n * Partial Policy Cancellation / Kısmi Poliçe İptali\n *\n * Cancellation of specific coverage components or partial termination of policy terms while\n * maintaining other active coverages. Requires careful calculation of prorated premiums and\n * adjustments to remaining policy terms. Common in scenarios where customers want to reduce\n * coverage levels or remove specific optional coverages while keeping basic protection active.\n *\n * Diğer aktif teminatları korurken belirli teminat bileşenlerinin iptali veya poliçe şartlarının\n * kısmi feshi. Oransal primlerin dikkatli hesaplanmasını ve kalan poliçe şartlarında ayarlamalar\n * yapılmasını gerektirir. Müşterilerin temel korumayı aktif tutarken teminat seviyelerini azaltmak\n * veya belirli isteğe bağlı teminatları kaldırmak istediği senaryolarda yaygındır.\n */\n PartialCancellation = \"PARTIAL_CANCELLATION\",\n /**\n * Cancellation from Sale Process / Satış Sürecinden İptal\n */\n CancellationFromSale = \"CANCELLATION_FROM_SALE\",\n /**\n * Cancellation Due to Collection Issues / Tahsilat Sorunları Nedeniyle İptal\n */\n CancellationDueToCollection = \"CANCELLATION_DUE_TO_COLLECTION\",\n /**\n * Cancellation Due to Damage / Hasar Nedeniyle İptal\n *\n * Policy termination following total loss or constructive total loss events where the insured\n * asset is deemed beyond economical repair. Involves coordination with claims processing, salvage\n * operations, and final settlement calculations. Requires careful handling of remaining premium\n * refunds and coordination with loss adjusters and repair facilities.\n *\n * Sigortalı varlığın ekonomik onarımın ötesinde kabul edildiği tam hasar veya yapıcı tam hasar\n * olaylarını takiben poliçe feshi. Hasar işleme, hurda işlemleri ve nihai uzlaşma hesaplamaları ile\n * koordinasyon içerir. Kalan prim iadelerinin dikkatli işlenmesini ve eksper ile onarım tesisleri\n * ile koordinasyonu gerektirir.\n */\n CancellationDueToDamage = \"CANCELLATION_DUE_TO_DAMAGE\",\n}\n\n/**\n * Customer Complaint Case Subtypes\n *\n * Categorization of customer complaints based on the nature of the issue and the area of\n * service or process involved. This classification enables proper routing of complaints to\n * specialized resolution teams, ensures appropriate handling procedures, and facilitates\n * regulatory reporting requirements. Essential for customer service quality management,\n * compliance monitoring, and operational improvement initiatives.\n *\n * Sorunun doğası ve dahil olan hizmet veya süreç alanına dayalı müşteri şikayetlerinin\n * kategorizasyonu. Bu sınıflandırma, şikayetlerin uzman çözüm ekiplerine uygun yönlendirilmesini\n * sağlar, uygun işleme prosedürlerini garanti eder ve düzenleyici raporlama gereksinimlerini\n * kolaylaştırır. Müşteri hizmetleri kalite yönetimi, uyumluluk izleme ve operasyonel iyileştirme\n * girişimleri için gereklidir.\n */\nexport enum ComplaintCaseSubType {\n /**\n * Consultant Error Complaint / Danışman Hatası Şikayeti\n *\n * Complaints regarding errors, misinformation, or inappropriate behavior by insurance\n * consultants or agents. Includes issues such as incorrect advice, misrepresentation of\n * policy terms, unprofessional conduct, or failure to provide adequate service.\n * Requires investigation of agent conduct and may involve disciplinary actions or additional training.\n *\n * Sigorta danışmanları veya acenteleri tarafından yapılan hatalar, yanlış bilgilendirme\n * veya uygunsuz davranışlar hakkında şikayetler. Yanlış tavsiye, poliçe şartlarının yanlış\n * sunumu, profesyonel olmayan davranış veya yeterli hizmet sağlayamama gibi sorunları içerir.\n * Acente davranışının araştırılmasını gerektirir ve disiplin eylemleri veya ek eğitim içerebilir.\n */\n ConsultantError = \"CONSULTANT_ERROR\",\n /**\n * Policy Operations Complaint / Poliçe Operasyonları Şikayeti\n *\n * Complaints related to policy administration, endorsements, renewals, or other\n * operational aspects of policy management. Includes issues with policy issuance,\n * documentation errors, processing delays, or system-related problems affecting\n * policy services. Requires review of operational procedures and system functionality.\n *\n * Poliçe yönetimi, zeyilnameler, yenilemeler veya poliçe yönetiminin diğer operasyonel\n * yönleri ile ilgili şikayetler. Poliçe düzenleme, belgelendirme hataları, işleme gecikmeleri\n * veya poliçe hizmetlerini etkileyen sistemle ilgili sorunları içerir. Operasyonel prosedürlerin\n * ve sistem işlevselliğinin gözden geçirilmesini gerektirir.\n */\n PolicyOperations = \"POLICY_OPERATIONS\",\n /**\n * Premium Collection Complaint / Prim Tahsilat Şikayeti\n *\n * Complaints regarding premium collection practices, payment processing issues,\n * or billing disputes. Includes problems with payment methods, incorrect billing amounts,\n * unauthorized charges, or aggressive collection practices. Requires review of billing\n * procedures and payment processing systems to ensure compliance with regulations.\n *\n * Prim tahsilat uygulamaları, ödeme işleme sorunları veya faturalandırma anlaşmazlıkları\n * ile ilgili şikayetler. Ödeme yöntemleri ile ilgili sorunlar, yanlış faturalandırma tutarları,\n * yetkisiz ücretlendirmeler veya agresif tahsilat uygulamalarını içerir. Düzenlemelere uyumu\n * sağlamak için faturalandırma prosedürleri ve ödeme işleme sistemlerinin gözden geçirilmesini gerektirir.\n */\n Collection = \"COLLECTION\",\n /**\n * Frequent Calls Complaint / Sık Arama Şikayeti\n *\n * Complaints about excessive or unwanted communications from the insurance company,\n * including too many phone calls, SMS messages, or emails. May involve marketing calls,\n * renewal reminders, or collection attempts that customers find intrusive or annoying.\n * Requires review of communication policies and customer preference settings.\n *\n * Sigorta şirketinden gelen aşırı veya istenmeyen iletişimler hakkında şikayetler,\n * çok fazla telefon görüşmesi, SMS mesajı veya e-posta dahil. Müşterilerin rahatsız edici\n * veya can sıkıcı bulduğu pazarlama aramaları, yenileme hatırlatmaları veya tahsilat\n * girişimlerini içerebilir. İletişim politikalarının ve müşteri tercih ayarlarının\n * gözden geçirilmesini gerektirir.\n */\n DueToFrequentCalls = \"DUE_TO_FREQUENT_CALLS\",\n /**\n * Fraud-Related Complaint / Dolandırıcılık İlgili Şikayet\n *\n * Complaints involving suspected fraudulent activities, either by company representatives\n * or third parties. Includes identity theft, unauthorized policy changes, false claims,\n * or misrepresentation of company services. Requires immediate investigation, potential\n * law enforcement involvement, and special handling procedures to protect customer interests.\n *\n * Şirket temsilcileri veya üçüncü şahıslar tarafından şüpheli dolandırıcılık faaliyetlerini\n * içeren şikayetler. Kimlik hırsızlığı, yetkisiz poliçe değişiklikleri, sahte talepler veya\n * şirket hizmetlerinin yanlış sunumu dahildir. Anında araştırma, potansiyel kolluk kuvvetleri\n * müdahalesi ve müşteri çıkarlarını korumak için özel işleme prosedürleri gerektirir.\n */\n Fraud = \"FRAUD\",\n /**\n * Damage/Claims Handling Complaint / Hasar/Talep İşleme Şikayeti\n *\n * Complaints regarding claims processing, damage assessment, settlement amounts,\n * or claims denial decisions. Includes issues with claims adjusters, repair quality,\n * settlement delays, or disagreements with damage evaluations. Requires review of\n * claims handling procedures and may involve independent assessments or re-evaluations.\n *\n * Hasar işleme, zarar değerlendirme, uzlaşma tutarları veya hasar red kararları ile\n * ilgili şikayetler. Eksperler, onarım kalitesi, uzlaşma gecikmeleri veya zarar değerlendirmeleri\n * ile anlaşmazlıkları içerir. Hasar işleme prosedürlerinin gözden geçirilmesini gerektirir\n * ve bağımsız değerlendirmeler veya yeniden değerlendirmeler içerebilir.\n */\n Damage = \"DAMAGE\",\n /**\n * Erroneous Transaction Complaint / Hatalı İşlem Şikayeti\n *\n * Complaints about incorrect financial transactions, system errors, or processing mistakes\n * that result in wrong charges, incorrect payments, or data inaccuracies. Requires\n * investigation of transaction records, system logs, and correction of any identified errors.\n * May involve financial adjustments or refunds to resolve customer concerns.\n *\n * Yanlış ücretlendirmeler, hatalı ödemeler veya veri yanlışlıkları ile sonuçlanan yanlış\n * finansal işlemler, sistem hataları veya işleme hatalarıyla ilgili şikayetler. İşlem kayıtları,\n * sistem günlükleri araştırması ve belirlenen hataların düzeltilmesini gerektirir. Müşteri\n * endişelerini çözmek için finansal ayarlamalar veya iadeler içerebilir.\n */\n ErroneousTransaction = \"ERRONEOUS_TRANSACTION\",\n /**\n * Operations Delay Complaint / Operasyon Gecikmesi Şikayeti\n *\n * Complaints about excessive delays in processing insurance operations such as\n * policy issuance, endorsements, claims processing, or customer service responses.\n * Requires analysis of processing times, identification of bottlenecks, and\n * implementation of process improvements to meet service level commitments.\n *\n * Poliçe düzenleme, zeyilnameler, hasar işleme veya müşteri hizmetleri yanıtları gibi\n * sigorta operasyonlarının işlenmesindeki aşırı gecikmelerle ilgili şikayetler. İşleme\n * sürelerinin analizi, darboğazların belirlenmesi ve hizmet seviye taahhütlerini karşılamak\n * için süreç iyileştirmelerinin uygulanmasını gerektirir.\n */\n DelayInOperations = \"DELAY_IN_OPERATIONS\",\n /**\n * Online Transaction Error Complaint / Çevrimiçi İşlem Hatası Şikayeti\n *\n * Complaints regarding technical issues with online platforms, mobile applications,\n * or digital transaction processing. Includes website malfunctions, payment gateway errors,\n * login problems, or system unavailability. Requires technical investigation and\n * coordination with IT teams to resolve platform issues.\n *\n * Çevrimiçi platformlar, mobil uygulamalar veya dijital işlem işlemesi ile ilgili teknik\n * sorunlarla ilgili şikayetler. Web sitesi arızaları, ödeme geçidi hataları, giriş sorunları\n * veya sistem kullanılabilirliği sorunlarını içerir. Platform sorunlarını çözmek için teknik\n * araştırma ve IT ekipleri ile koordinasyon gerektirir.\n */\n OnlineTransactionErrors = \"ONLINE_TRANSACTION_ERRORS\",\n /**\n * Cancellation Period Delay Complaint / İptal Dönemi Gecikmesi Şikayeti\n *\n * Complaints about excessive delays in processing policy cancellations or issuing\n * refunds within the required timeframes. Includes delays in calculating refund amounts,\n * processing cancellation requests, or transferring refund payments. May involve\n * regulatory compliance issues requiring immediate attention and resolution.\n *\n * Gerekli zaman dilimlerinde poliçe iptallerinin işlenmesi veya iadelerin yapılmasındaki\n * aşırı gecikmelerle ilgili şikayetler. İade tutarlarının hesaplanmasında, iptal taleplerinin\n * işlenmesinde veya iade ödemelerinin transferinde gecikmeleri içerir. Acil dikkat ve çözüm\n * gerektiren düzenleyici uyumluluk sorunları içerebilir.\n */\n DelayInCancellationPeriod = \"DELAY_IN_CANCELLATION_PERIOD\",\n /**\n * Non-Receipt of Policy Documents Complaint / Poliçe Belgeleri Almama Şikayeti\n *\n * Complaints about customers not receiving their policy documents, endorsements,\n * or other important insurance documentation. May involve postal delivery issues,\n * incorrect addresses, or system failures in document generation or distribution.\n * Requires investigation of delivery methods and reissuance of missing documents.\n *\n * Müşterilerin poliçe belgelerini, zeyilnamelerini veya diğer önemli sigorta belgelerini\n * almama konusundaki şikayetler. Posta teslim sorunları, yanlış adresler veya belge oluşturma\n * veya dağıtımında sistem arızalarını içerebilir. Teslim yöntemlerinin araştırılmasını ve\n * eksik belgelerin yeniden düzenlenmesini gerektirir.\n */\n NonReceiptOfPolicyOrEndorsement = \"NON_RECEIPT_OF_POLICY_OR_ENDORSEMENT\",\n /**\n * Non-Production of Policy Documents Complaint / Poliçe Belgeleri Üretmeme Şikayeti\n *\n * Complaints about the company's failure to generate, produce, or issue policy\n * documents or endorsements after coverage has been purchased or changes have been approved.\n * Requires investigation of document production systems and processes to ensure\n * timely issuance of all required documentation.\n *\n * Teminat satın alındıktan veya değişiklikler onaylandıktan sonra şirketin poliçe\n * belgelerini veya zeyilnamelerini üretmeme, oluşturmama veya düzenlememe konusundaki\n * şikayetler. Gerekli tüm belgelerin zamanında düzenlenmesini sağlamak için belge üretim\n * sistemleri ve süreçlerinin araştırılmasını gerektirir.\n */\n NonProductionOfPolicyOrEndorsement = \"NON_PRODUCTION_OF_POLICY_OR_ENDORSEMENT\",\n /**\n * Endorsement Operations Delay Complaint / Zeyilname Operasyonları Gecikmesi Şikayeti\n *\n * Complaints about excessive delays in processing policy endorsements, modifications,\n * or change requests. Includes delays in reviewing requests, obtaining approvals,\n * calculating premium adjustments, or implementing policy changes. Requires review\n * of endorsement workflows and resource allocation for timely processing.\n *\n * Poliçe zeyilnamelerinin, değişikliklerinin veya değişiklik taleplerinin işlenmesindeki\n * aşırı gecikmelerle ilgili şikayetler. Taleplerin incelenmesi, onay alınması, prim\n * ayarlamalarının hesaplanması veya poliçe değişikliklerinin uygulanmasındaki gecikmeleri\n * içerir. Zamanında işleme için zeyilname iş akışları ve kaynak tahsisinin gözden\n * geçirilmesini gerektirir.\n */\n DelayInEndorsementOperations = \"DELAY_IN_ENDORSEMENT_OPERATIONS\",\n /**\n * Erroneous Premium Collection Complaint / Hatalı Prim Tahsilatı Şikayeti\n *\n * Complaints about incorrect premium charges, wrong billing amounts, or unauthorized\n * premium collections. Includes overcharges, duplicate charges, or charges for cancelled\n * policies. Requires detailed investigation of billing records and correction of any\n * financial errors with appropriate refunds or adjustments.\n *\n * Yanlış prim ücretlendirmeleri, hatalı faturalandırma tutarları veya yetkisiz prim\n * tahsilatlarıyla ilgili şikayetler. Fazla ücretlendirmeler, çift ücretlendirmeler veya\n * iptal edilen poliçeler için ücretlendirmeler dahildir. Faturalandırma kayıtlarının\n * ayrıntılı araştırılmasını ve uygun iadeler veya ayarlamalarla finansal hataların\n * düzeltilmesini gerektirir.\n */\n ErroneousPremiumCollection = \"ERRONEOUS_PREMIUM_COLLECTION\",\n /**\n * Non-Delivery of Refund Receipt Complaint / İade Makbuzu Teslim Etmeme Şikayeti\n *\n * Complaints about not receiving official receipts or confirmation documents for\n * premium refunds or other financial adjustments. Important for customer record-keeping\n * and tax purposes. Requires investigation of document delivery processes and\n * reissuance of missing receipts or confirmations.\n *\n * Prim iadeleri veya diğer finansal ayarlamalar için resmi makbuzları veya onay\n * belgelerini almama konusundaki şikayetler. Müşteri kayıt tutma ve vergi amaçları için\n * önemlidir. Belge teslim süreçlerinin araştırılmasını ve eksik makbuz veya onayların\n * yeniden düzenlenmesini gerektirir.\n */\n NonDeliveryOfRefundReceipt = \"NON_DELIVERY_OF_REFUND_RECEIPT\",\n /**\n * Non-Refund of Premium Complaint / Prim İade Etmeme Şikayeti\n *\n * Complaints about the company's failure to process legitimate premium refunds\n * for cancelled policies, overpayments, or other valid refund situations. Requires\n * investigation of refund calculations, verification of entitlements, and processing\n * of any owed refunds according to policy terms and regulatory requirements.\n *\n * Şirketin iptal edilen poliçeler, fazla ödemeler veya diğer geçerli iade durumları\n * için meşru prim iadelerini işlemede başarısızlığı hakkında şikayetler. İade hesaplamalarının\n * araştırılmasını, hak sahipliğinin doğrulanmasını ve poliçe şartları ile düzenleyici\n * gereksinimlere göre borçlu olunan iadelerin işlenmesini gerektirir.\n */\n NonRefundOfPremium = \"NON_REFUND_OF_PREMIUM\",\n /**\n * Staff Attitude Complaint / Personel Tutumu Şikayeti\n *\n * Complaints about unprofessional behavior, poor attitude, or inappropriate conduct\n * by company staff members. Includes rudeness, unhelpfulness, discrimination, or\n * failure to provide courteous service. Requires investigation of staff interactions\n * and may involve coaching, training, or disciplinary actions.\n *\n * Şirket personeli tarafından profesyonel olmayan davranış, kötü tutum veya uygunsuz\n * davranışlar hakkında şikayetler. Kabalık, yardım etmeme, ayrımcılık veya nazik hizmet\n * sağlayamama dahildir. Personel etkileşimlerinin araştırılmasını gerektirir ve koçluk,\n * eğitim veya disiplin eylemlerini içerebilir.\n */\n StaffAttitude = \"STAFF_ATTITUDE\",\n /**\n * Insufficient or Erroneous Information Complaint / Yetersiz veya Hatalı Bilgi Şikayeti\n *\n * Complaints about incomplete, inaccurate, or misleading information provided by\n * the company regarding policies, procedures, coverage details, or customer rights.\n * Requires review of information sources, training materials, and communication\n * protocols to ensure accurate and complete information delivery.\n *\n * Şirket tarafından poliçeler, prosedürler, teminat detayları veya müşteri hakları\n * hakkında sağlanan eksik, yanlış veya yanıltıcı bilgilerle ilgili şikayetler.\n * Doğru ve eksiksiz bilgi teslimini sağlamak için bilgi kaynakları, eğitim materyalleri\n * ve iletişim protokollerinin gözden geçirilmesini gerektirir.\n */\n InsufficientOrErroneousInformation = \"INSUFFICIENT_OR_ERRONEOUS_INFORMATION\",\n /**\n * No Timely Response Complaint / Zamanında Yanıt Vermeme Şikayeti\n *\n * Complaints about the company's failure to respond to customer inquiries,\n * requests, or communications within reasonable or promised timeframes. Includes\n * delays in responding to emails, phone calls, or formal requests. Requires review\n * of response time standards and resource allocation for customer communications.\n *\n * Şirketin müşteri sorularına, taleplerine veya iletişimlerine makul veya vaat edilen\n * zaman dilimlerinde yanıt vermede başarısızlığı hakkında şikayetler. E-postalara, telefon\n * aramalarına veya resmi taleplere yanıt vermede gecikmeleri içerir. Yanıt süresi standartları\n * ve müşteri iletişimleri için kaynak tahsisinin gözden geçirilmesini gerektirir.\n */\n NoTimelyResponse = \"NO_TIMELY_RESPONSE\",\n}\n\n/**\n * Policy Endorsement Case Subtypes\n *\n * Categorization of policy endorsement requests based on the type of modification being made\n * to existing insurance coverage. Each subtype represents a specific type of policy change with\n * distinct processing requirements, documentation needs, and regulatory considerations.\n * Essential for workflow routing, approval processes, premium calculations, and maintaining\n * accurate policy records throughout the endorsement lifecycle.\n *\n * Mevcut sigorta teminatında yapılan değişiklik türüne dayalı poliçe zeyilname taleplerinin\n * kategorizasyonu. Her alt tür, kendine özgü işleme gereksinimleri, belgelendirme ihtiyaçları\n * ve düzenleyici hususları olan belirli bir poliçe değişiklik türünü temsil eder.\n * İş akışı yönlendirme, onay süreçleri, prim hesaplamaları ve zeyilname yaşam döngüsü boyunca\n * doğru poliçe kayıtlarının korunması için gereklidir.\n */\nexport enum EndorsementCaseSubType {\n /**\n * Vehicle Change Endorsement / Araç Değişikliği Zeyilnamesi\n *\n * Endorsement for replacing the currently insured vehicle with a different vehicle.\n * Involves vehicle inspection, value assessment, risk evaluation, and premium recalculation\n * based on the new vehicle's specifications. Requires documentation of the new vehicle's\n * details, ownership transfer, and potential adjustment of coverage limits and deductibles.\n *\n * Şu anda sigortalı olan aracın farklı bir araçla değiştirilmesi için zeyilname.\n * Araç muayenesi, değer takdiri, risk değerlendirmesi ve yeni aracın özelliklerine dayalı\n * prim yeniden hesaplamasını içerir. Yeni aracın detaylarının belgelenmesini, konutiyet\n * devri ve teminat limitleri ile muafiyetlerin potansiyel ayarlanmasını gerektirir.\n */\n VehicleChange = \"VEHICLE_CHANGE\",\n /**\n * Insured Value Increase Endorsement / Sigorta Değeri Artışı Zeyilnamesi\n *\n * Endorsement to increase the insured value or coverage limits of existing policies.\n * Common when asset values appreciate or when customers want enhanced protection.\n * Requires current value assessment, risk re-evaluation, and premium adjustment calculations.\n * May involve additional underwriting requirements for significant value increases.\n *\n * Mevcut poliçelerin sigorta değeri veya teminat limitlerini artırmak için zeyilname.\n * Varlık değerlerinin değer kazandığı veya müşterilerin gelişmiş koruma istediği durumlarda yaygındır.\n * Güncel değer takdiri, risk yeniden değerlendirmesi ve prim ayarlama hesaplamalarını gerektirir.\n * Önemli değer artışları için ek yüklenim gereksinimleri içerebilir.\n */\n ValueIncrease = \"VALUE_INCREASE\",\n /**\n * No-Claim Bonus Transfer Endorsement / Hasarsızlık Bonus Transfer Zeyilnamesi\n *\n * Endorsement to transfer no-claim discount history from a previous insurance company.\n * Requires verification of claim-free periods, validation of bonus entitlements, and\n * premium adjustments based on the transferred discount levels. Essential for competitive\n * pricing and customer retention when switching insurers.\n *\n * Önceki bir sigorta şirketinden hasarsızlık indirimi geçmişinin transferi için zeyilname.\n * Hasarsız dönemlerin doğrulanmasını, bonus haklarının onaylanmasını ve transfer edilen\n * indirim seviyelerine dayalı prim ayarlamalarını gerektirir. Sigortacı değiştirirken\n * rekabetçi fiyatlandırma ve müşteri elde tutma için gereklidir.\n */\n NoClaimBonusTransfer = \"NO_CLAIM_BONUS_TRANSFER\",\n /**\n * Coverage Modification Endorsement / Teminat Değişikliği Zeyilnamesi\n *\n * Endorsement for modifying existing coverage terms, adding or removing optional coverages,\n * or adjusting deductibles and policy limits. Requires careful documentation of changes,\n * risk assessment for new coverages, and accurate premium calculations. Common when\n * customers' needs change or when new coverage options become available.\n *\n * Mevcut teminat şartlarını değiştirmek, isteğe bağlı teminatları eklemek veya çıkarmak\n * ya da muafiyetleri ve poliçe limitlerini ayarlamak için zeyilname. Değişikliklerin dikkatli\n * belgelenmesini, yeni teminatlar için risk değerlendirmesi ve doğru prim hesaplamalarını gerektirir.\n * Müşterilerin ihtiyaçları değiştiğinde veya yeni teminat seçenekleri mevcut olduğunda yaygındır.\n */\n CoverageChange = \"COVERAGE_CHANGE\",\n /**\n * Vehicle Usage Type Change Endorsement / Araç Kullanım Türü Değişikliği Zeyilnamesi\n *\n * Endorsement for changing the declared usage of the insured vehicle, such as from\n * private use to commercial use or vice versa. Requires risk re-assessment based on\n * the new usage pattern, premium adjustments, and potential coverage modifications.\n * Critical for maintaining accurate risk profiles and appropriate pricing.\n *\n * Sigortalı aracın beyan edilen kullanımının değiştirilmesi için zeyilname, örneğin\n * özel kullanımdan ticari kullanıma veya tam tersi. Yeni kullanım modeline dayalı risk\n * yeniden değerlendirmesi, prim ayarlamaları ve potansiyel teminat değişikliklerini gerektirir.\n * Doğru risk profillerinin korunması ve uygun fiyatlandırma için kritiktir.\n */\n UsageTypeChange = \"USAGE_TYPE_CHANGE\",\n /**\n * Policy Transfer Request Endorsement / Poliçe Transfer Talebi Zeyilnamesi\n *\n * Endorsement for transferring policy ownership from one party to another, commonly\n * occurring in vehicle sales or asset transfers. Requires verification of new owner details,\n * creditworthiness assessment, risk evaluation, and legal documentation of ownership transfer.\n * May involve premium adjustments based on the new owner's risk profile.\n *\n * Poliçe sahipliğinin bir taraftan diğerine transferi için zeyilname, genellikle araç\n * satışları veya varlık transferlerinde gerçekleşir. Yeni sahip detaylarının doğrulanmasını,\n * kredi güvenilirliği değerlendirmesi, risk değerlendirmesi ve konutiyet transferinin yasal\n * belgelenmesini gerektirir. Yeni sahibin risk profiline dayalı prim ayarlamaları içerebilir.\n */\n TransferRequest = \"TRANSFER_REQUEST\",\n /**\n * License Plate Change Endorsement / Plaka Değişikliği Zeyilnamesi\n *\n * Endorsement for updating the license plate number of the insured vehicle due to\n * registration changes, plate renewal, or administrative requirements. Requires verification\n * of new registration documents and updating policy records accordingly. Typically a\n * straightforward administrative change with minimal impact on premiums or coverage.\n *\n * Tescil değişiklikleri, plaka yenileme veya idari gereksinimler nedeniyle sigortalı\n * aracın plaka numarasının güncellenmesi için zeyilname. Yeni tescil belgelerinin doğrulanmasını\n * ve poliçe kayıtlarının buna göre güncellenmesini gerektirir. Genellikle primler veya\n * teminat üzerinde minimal etkisi olan basit bir idari değişikliktir.\n */\n LicensePlateChange = \"LICENSE_PLATE_CHANGE\",\n /**\n * Vehicle Brand and Model Change Endorsement / Araç Marka ve Model Değişikliği Zeyilnamesi\n *\n * Endorsement for correcting or updating the vehicle brand and model information in\n * the policy records. May occur due to initial data entry errors or vehicle modifications.\n * Requires verification of correct vehicle specifications, risk re-assessment based on\n * actual vehicle characteristics, and potential premium adjustments.\n *\n * Poliçe kayıtlarındaki araç marka ve model bilgilerinin düzeltilmesi veya güncellenmesi\n * için zeyilname. İlk veri giriş hataları veya araç modifikasyonları nedeniyle ortaya çıkabilir.\n * Doğru araç spesifikasyonlarının doğrulanmasını, gerçek araç özelliklerine dayalı risk\n * yeniden değerlendirmesi ve potansiyel prim ayarlamalarını gerektirir.\n */\n BrandModelChange = \"BRAND_MODEL_CHANGE\",\n /**\n * Engine and Chassis Number Change Endorsement / Motor ve Şasi Numarası Değişikliği Zeyilnamesi\n *\n * Endorsement for updating engine and chassis identification numbers due to vehicle\n * repairs, engine replacement, or administrative corrections. Requires verification of\n * new identification numbers, documentation from authorized service centers, and\n * anti-fraud checks to ensure vehicle authenticity and prevent identity fraud.\n *\n * Araç onarımları, motor değişimi veya idari düzeltmeler nedeniyle motor ve şasi\n * tanımlama numaralarının güncellenmesi için zeyilname. Yeni tanımlama numaralarının\n * doğrulanmasını, yetkili servis merkezlerinden belgelendirme ve araç otantikliğini\n * sağlamak ve kimlik dolandırıcılığını önlemek için dolandırıcılık karşıtı kontrolleri gerektirir.\n */\n EngineChassisNumberChange = \"ENGINE_CHASSIS_NUMBER_CHANGE\",\n /**\n * Contact and Address Change Endorsement / İletişim ve Adres Değişikliği Zeyilnamesi\n *\n * Endorsement for updating policyholder contact information including address, phone\n * numbers, and email addresses. Important for maintaining accurate communication channels\n * and ensuring proper delivery of policy documents and notices. May affect premium\n * calculations if the address change impacts risk assessment (e.g., different geographic risk zones).\n *\n * Adres, telefon numaraları ve e-posta adresleri dahil olmak üzere poliçe sahibi\n * iletişim bilgilerinin güncellenmesi için zeyilname. Doğru iletişim kanallarının korunması\n * ve poliçe belgelerinin ve bildirimlerin uygun şekilde teslim edilmesi için önemlidir.\n * Adres değişikliği risk değerlendirmesini etkiliyorsa (örn. farklı coğrafi risk bölgeleri)\n * prim hesaplamalarını etkileyebilir.\n */\n ContactAddressChange = \"CONTACT_ADDRESS_CHANGE\",\n /**\n * Other Endorsement Types / Diğer Zeyilname Türleri\n *\n * Catch-all category for endorsement requests that don't fit into predefined specific\n * categories. These may include unique policy modifications, special coverage requests,\n * or new types of changes not yet standardized in the system. Requires case-by-case\n * evaluation and may need special approval processes.\n *\n * Önceden tanımlanmış belirli kategorilere uymayan zeyilname talepleri için genel kategori.\n * Bunlar benzersiz poliçe değişikliklerini, özel teminat taleplerini veya sistemde henüz\n * standartlaştırılmamış yeni değişiklik türlerini içerebilir. Talebe özel değerlendirme\n * gerektirir ve özel onay süreçlerine ihtiyaç duyabilir.\n */\n Other = \"OTHER\",\n /**\n * Pledgee Correction and Addition Endorsement / Rehinli Düzeltme ve Ekleme Zeyilnamesi\n *\n * Endorsement for adding, removing, or correcting pledgee (lien holder) information on\n * the policy. Common when vehicles are financed, refinanced, or loans are paid off.\n * Requires verification of financial institution details, loan documentation, and\n * proper legal authorization for changes. Critical for ensuring proper claim payment procedures.\n *\n * Poliçe üzerinde rehinli (rehin alacaklısı) bilgilerinin eklenmesi, çıkarılması veya\n * düzeltilmesi için zeyilname. Araçlar finanse edildiğinde, yeniden finanse edildiğinde\n * veya krediler ödendiğinde yaygındır. Finansal kurum detaylarının doğrulanmasını, kredi\n * belgelendirmesi ve değişiklikler için uygun yasal yetkilendirmeyi gerektirir.\n * Uygun hasar ödeme prosedürlerinin sağlanması için kritiktir.\n */\n PledgeeCorrectionAddition = \"PLEDGEE_CORRECTION_ADDITION\",\n}\n\n/**\n * Case Activity Actions\n */\nexport enum CaseActivityAction {\n Created = \"CREATED\",\n Updated = \"UPDATED\",\n StateChanged = \"STATE_CHANGED\",\n ChannelChanged = \"CHANNEL_CHANGED\",\n RepresentativeAssigned = \"REPRESENTATIVE_ASSIGNED\",\n NoteAdded = \"NOTE_ADDED\",\n AssetSet = \"ASSET_SET\",\n PolicyAdded = \"POLICY_ADDED\",\n ProposalAdded = \"PROPOSAL_ADDED\",\n PolicyEndDateSet = \"POLICY_END_DATE_SET\",\n CustomerUpdated = \"CUSTOMER_UPDATED\",\n AssetUpdated = \"ASSET_UPDATED\",\n PriorityAssessed = \"PRIORITY_ASSESSED\",\n ProposalProductPurchaseAttempted = \"PROPOSAL_PRODUCT_PURCHASE_ATTEMPTED\",\n}\n\n// Re-export enums for backward compatibility with existing imports\nexport {\n Channel,\n AssetType,\n CustomerType,\n ProductBranch,\n Currency,\n PaymentOption,\n PolicyState,\n};\n\n// ============================================================================\n// REQUEST TYPES\n// ============================================================================\n\n/**\n * Represents a request to retrieve comprehensive case information by case reference number.\n * Used to fetch detailed case data including status, customer information, and associated policies.\n *\n * Talep referans numarası ile kapsamlı talep bilgilerini almak için kullanılan istek.\n * Durum, müşteri bilgileri ve ilişkili poliçeler dahil olmak üzere detaylı talep verilerini getirmek için kullanılır.\n */\nexport interface GetCaseByRefRequest {\n /**\n * Case Reference Number / Talep Referans Numarası\n *\n * EN: The unique reference identifier assigned to the insurance case. This alphanumeric reference\n * is used across InsurUp's systems to track and identify specific cases throughout their lifecycle.\n * Case references are typically formatted for easy customer communication and internal tracking.\n *\n * TR: Sigorta talebine atanan benzersiz referans tanımlayıcısı. Bu alfanümerik referans,\n * InsurUp'ın sistemlerinde belirli talepleri yaşam döngüleri boyunca takip etmek ve tanımlamak\n * için kullanılır. Talep referansları genellikle kolay müşteri iletişimi ve iç takip için formatlanır.\n */\n readonly ref: string;\n}\n\n/**\n * Represents a request to assign or change the representative agent user for an insurance case.\n * Used to delegate case responsibility to specific agents for customer service and case management.\n *\n * Sigorta talebi için temsilci acente kullanıcısını atamak veya değiştirmek için kullanılan istek.\n * Müşteri hizmetleri ve talep yönetimi için talep sorumluluğunu belirli acentelere devretmek için kullanılır.\n */\nexport interface AssignCaseRepresentativeRequest {\n /**\n * Case Reference Number / Talep Referans Numarası\n *\n * EN: The unique reference identifier of the insurance case for which to assign or change\n * the responsible representative agent. This reference ensures the assignment is applied\n * to the correct case in the system.\n *\n * TR: Sorumlu temsilci acentenin atanacağı veya değiştirileceği sigorta talebinin benzersiz\n * referans tanımlayıcısı. Bu referans, atamanın sistemde doğru talebe uygulanmasını sağlar.\n */\n readonly ref: string;\n\n /**\n * Representative Agent User ID / Temsilci Acente Kullanıcı Kimliği\n *\n * EN: The unique GUID identifier of the agent user who will be assigned as the case representative.\n * This agent will become responsible for handling customer communications, case progression,\n * and decision-making related to the case. Set to null to unassign the current representative,\n * leaving the case without a specific assigned agent.\n *\n * TR: Talep temsilcisi olarak atanacak acente kullanıcısının benzersiz GUID tanımlayıcısı.\n * Bu acente, müşteri iletişimleri, talep ilerlemesi ve talep ile ilgili karar verme süreçlerinden\n * sorumlu olacaktır. Mevcut temsilciyi atamadan çıkarmak ve talebi belirli bir atanmış acente\n * olmadan bırakmak için null olarak ayarlayın.\n */\n readonly representativeAgentUserId?: string | null;\n}\n\n/**\n * Represents a request to change the communication channel of an existing insurance case.\n * Used to update how the case is handled based on customer preference or operational requirements.\n *\n * Mevcut bir sigorta talebinin iletişim kanalını değiştirmek için kullanılan istek.\n * Müşteri tercihi veya operasyonel gereksinimler temelinde talebin nasıl işleneceğini güncellemek için kullanılır.\n */\nexport interface ChangeCaseChannelRequest {\n /**\n * Case Reference Number / Talep Referans Numarası\n *\n * EN: The unique reference identifier of the insurance case for which to change the communication\n * channel. This reference ensures the channel change is applied to the correct case and properly\n * tracked in the system for audit and historical purposes.\n *\n * TR: İletişim kanalının değiştirileceği sigorta talebinin benzersiz referans tanımlayıcısı.\n * Bu referans, kanal değişikliğinin doğru talebe uygulanmasını ve denetim ve tarihsel amaçlar\n * için sistemde uygun şekilde takip edilmesini sağlar.\n */\n readonly ref: string;\n\n /**\n * New Communication Channel / Yeni İletişim Kanalı\n *\n * EN: The communication channel to which the case should be transferred. This determines how\n * the case will be processed, routed, and handled going forward. Different channels may have\n * different service levels, processing priorities, and communication protocols. The change\n * affects all subsequent case interactions and workflow routing.\n *\n * TR: Talebin aktarılacağı iletişim kanalı. Bu, talebin bundan sonra nasıl işleneceği,\n * yönlendirileceği ve ele alınacağını belirler. Farklı kanalların farklı hizmet seviyeleri,\n * işleme öncelikleri ve iletişim protokolleri olabilir. Değişiklik, sonraki tüm talep\n * etkileşimlerini ve iş akışı yönlendirmesini etkiler.\n */\n readonly channel: Channel;\n}\n\n/**\n * Represents a request to change the main and sub-state of an existing insurance case.\n * Used to progress cases through their lifecycle with appropriate status tracking and optional notes.\n *\n * Mevcut bir sigorta talebinin ana ve alt durumunu değiştirmek için kullanılan istek.\n * Talepleri uygun durum takibi ve isteğe bağlı notlarla yaşam döngüleri boyunca ilerletmek için kullanılır.\n */\nexport interface ChangeCaseStateRequest {\n /**\n * Case Reference Number / Talep Referans Numarası\n *\n * EN: The unique reference identifier of the case for which to change the state.\n *\n * TR: Durumunun değiştirileceği talebin benzersiz referans tanımlayıcısı.\n */\n readonly ref: string;\n\n /**\n * New Main State / Yeni Ana Durum\n *\n * EN: The new main state to which the case should be transitioned.\n *\n * TR: Talebin geçiş yapacağı yeni ana durum.\n */\n readonly mainState: CaseMainState;\n\n /**\n * New Sub-State / Yeni Alt Durum\n *\n * EN: The new sub-state to which the case should be transitioned.\n *\n * TR: Talebin geçiş yapacağı yeni alt durum.\n */\n readonly subState: CaseSubState;\n\n /**\n * Optional Note / İsteğe Bağlı Not\n *\n * EN: Optional note explaining the reason for the state change.\n *\n * TR: Durum değişikliğinin nedenini açıklayan isteğe bağlı not.\n */\n readonly note?: string;\n}\n\n/**\n * Represents a request to create a new cancellation case for an existing insurance policy.\n * Used to initiate policy cancellation workflows for customer-requested or administrative cancellations.\n *\n * Mevcut bir sigorta poliçesi için yeni iptal talebi oluşturmak için kullanılan istek.\n * Müşteri talebine bağlı veya idari iptal işlemleri için poliçe iptal iş akışlarını başlatmak için kullanılır.\n */\nexport interface CreateCancelCaseRequest {\n /**\n * Policy Unique Identifier / Poliçe Benzersiz Tanımlayıcısı\n *\n * EN: The unique identifier of the insurance policy that is subject to cancellation.\n * This policy must be in an active state to be eligible for cancellation. The system\n * will validate policy status and customer authorization before processing the cancellation request.\n *\n * TR: İptalin konusu olan sigorta poliçesinin benzersiz tanımlayıcısı. Bu poliçe iptal\n * için uygun olmak üzere aktif durumda olmalıdır. Sistem, iptal talebini işlemeden önce\n * poliçe durumunu ve müşteri yetkisini doğrulayacaktır.\n */\n readonly policyId: string;\n\n /**\n * Cancellation Sub-Type / İptal Alt Türü\n *\n * EN: The specific category of cancellation being requested, which determines the appropriate\n * processing procedures, refund calculations, and regulatory requirements. Different cancellation\n * types may have different timelines, fees, and customer communication requirements.\n *\n * TR: Talep edilen iptalin belirli kategorisi; uygun işleme prosedürleri, iade hesaplamaları\n * ve düzenleyici gereksinimleri belirler. Farklı iptal türlerinin farklı zaman çizelgeleri,\n * ücretleri ve müşteri iletişimi gereksinimleri olabilir.\n */\n readonly subType: CancelCaseSubType;\n\n /**\n * Communication Channel / İletişim Kanalı\n *\n * EN: The channel through which the customer submitted the cancellation request. This information\n * helps ensure appropriate response methods and processing timelines based on channel-specific\n * service level agreements. Some channels may require additional verification steps.\n * Defaults to Unknown if not specified.\n *\n * TR: Müşterinin iptal talebini gönderdiği kanal. Bu bilgi, kanala özel hizmet seviyesi\n * anlaşmalarına dayalı uygun yanıt yöntemleri ve işleme zaman çizelgelerini sağlamaya yardımcı olur.\n * Bazı kanallar ek doğrulama adımları gerektirebilir. Belirtilmezse Bilinmeyen olarak\n * varsayılan değer alır.\n */\n readonly channel?: Channel;\n}\n\n/**\n * Represents a request to create a new complaint case for a customer.\n * Used to initiate customer complaint resolution workflows for service issues, claim disputes, or other concerns.\n *\n * Bir müşteri için yeni şikayet talebi oluşturmak için kullanılan istek.\n * Hizmet sorunları, hasar uyuşmazlıkları veya diğer endişeler için müşteri şikayet çözüm iş akışlarını başlatmak için kullanılır.\n */\nexport interface CreateComplaintCaseRequest {\n /**\n * Customer Unique Identifier / Müşteri Benzersiz Tanımlayıcısı\n *\n * EN: The unique identifier of the customer filing the complaint.\n *\n * TR: Şikayeti dosyalayan müşterinin benzersiz tanımlayıcısı.\n */\n readonly customerId: string;\n\n /**\n * Complaint Sub-Type / Şikayet Alt Türü\n *\n * EN: The specific category of complaint being filed.\n *\n * TR: Dosyalanan şikayetin belirli kategorisi.\n */\n readonly subType: ComplaintCaseSubType;\n\n /**\n * Communication Channel / İletişim Kanalı\n *\n * EN: The channel through which the complaint was received.\n *\n * TR: Şikayetin alındığı kanal.\n */\n readonly channel?: Channel;\n\n /**\n * Asset Type / Varlık Türü\n *\n * EN: The type of asset related to the complaint, if applicable.\n *\n * TR: Varsa, şikayet ile ilgili varlığın türü.\n */\n readonly assetType?: AssetType;\n\n /**\n * Asset ID / Varlık Kimliği\n *\n * EN: The unique identifier of the asset related to the complaint, if applicable.\n *\n * TR: Varsa, şikayet ile ilgili varlığın benzersiz tanımlayıcısı.\n */\n readonly assetId?: string;\n\n /**\n * Product Branch / Ürün Dalı\n *\n * EN: The insurance product branch related to the complaint.\n *\n * TR: Şikayet ile ilgili sigorta ürün dalı.\n */\n readonly productBranch?: ProductBranch;\n}\n\n/**\n * Represents a request to create a new cross-sale opportunity case derived from an existing case.\n * Used to identify and pursue additional insurance product sales opportunities for existing customers.\n *\n * Mevcut bir talepten türetilen yeni çapraz satış fırsatı talebi oluşturmak için kullanılan istek.\n * Mevcut müşteriler için ek sigorta ürünü satış fırsatlarını belirlemek ve takip etmek için kullanılır.\n */\nexport interface CreateCrossSaleOpportunityCaseRequest {\n /**\n * Source Case Identifier / Kaynak Talep Tanımlayıcısı\n *\n * EN: The unique identifier of the existing case that generated this cross-sale opportunity.\n * This creates a link between the original case and the new sales opportunity, enabling\n * better tracking of sales funnel effectiveness and customer journey analytics.\n *\n * TR: Bu çapraz satış fırsatını oluşturan mevcut talebin benzersiz tanımlayıcısı.\n * Bu, orijinal talep ile yeni satış fırsatı arasında bir bağlantı oluşturarak satış\n * hunisi etkinliğinin ve müşteri yolculuğu analitiğinin daha iyi takibini sağlar.\n */\n readonly sourceCaseId: string;\n\n /**\n * Customer Unique Identifier / Müşteri Benzersiz Tanımlayıcısı\n *\n * EN: The unique GUID identifier of the customer who is the subject of this cross-sale opportunity.\n * This should typically be the same customer from the source case, allowing the sales team\n * to leverage existing customer relationships and knowledge for additional sales.\n *\n * TR: Bu çapraz satış fırsatının konusu olan müşterinin benzersiz GUID tanımlayıcısı.\n * Bu genellikle kaynak talepteki aynı müşteri olmalıdır; satış ekibinin mevcut müşteri\n * ilişkilerini ve bilgilerini ek satışlar için kullanmasına olanak tanır.\n */\n readonly customerId: string;\n\n /**\n * Asset Type / Varlık Türü\n *\n * EN: The type of asset related to the cross-sale opportunity, if applicable.\n *\n * TR: Varsa, çapraz satış fırsatı ile ilgili varlığın türü.\n */\n readonly assetType?: AssetType;\n\n /**\n * Asset ID / Varlık Kimliği\n *\n * EN: The unique identifier of the asset related to the cross-sale opportunity, if applicable.\n *\n * TR: Varsa, çapraz satış fırsatı ile ilgili varlığın benzersiz tanımlayıcısı.\n */\n readonly assetId?: string;\n\n /**\n * Insurance Product Branch / Sigorta Ürün Dalı\n *\n * EN: The specific insurance product branch that represents the cross-sale opportunity.\n * This should be different from the original case's product branch to represent an\n * additional product offering that complements the customer's existing insurance portfolio.\n *\n * TR: Çapraz satış fırsatını temsil eden belirli sigorta ürün dalı. Bu, müşterinin mevcut\n * sigorta portföyünü tamamlayan ek bir ürün teklifini temsil etmek üzere orijinal talebin\n * ürün dalından farklı olmalıdır.\n */\n readonly productBranch: ProductBranch;\n\n /**\n * Communication Channel / İletişim Kanalı\n *\n * EN: The channel through which the cross-sale opportunity will be pursued. This may be\n * the same channel as the source case or a different channel based on the customer's\n * preferences and the nature of the additional product being offered.\n * Defaults to Unknown if not specified.\n *\n * TR: Çapraz satış fırsatının takip edileceği kanal. Bu, kaynak talep ile aynı kanal\n * veya müşterinin tercihleri ve sunulan ek ürünün doğasına göre farklı bir kanal olabilir.\n * Belirtilmezse Bilinmeyen olarak varsayılan değer alır.\n */\n readonly channel?: Channel;\n}\n\n/**\n * Represents a request to create an endorsement case for policy modifications or updates requested by the customer.\n * Used to initiate policy change workflows for coverage modifications, beneficiary updates, or other policy amendments.\n *\n * Müşteri tarafından talep edilen poliçe değişiklikleri veya güncellemeler için zeyilname talebi oluşturmak için kullanılan istek.\n * Teminat değişiklikleri, lehtar güncellemeleri veya diğer poliçe değişiklikleri için poliçe değişiklik iş akışlarını başlatmak için kullanılır.\n */\nexport interface CreateEndorsementCaseRequest {\n /**\n * Policy Unique Identifier / Poliçe Benzersiz Tanımlayıcısı\n *\n * EN: The unique identifier of the insurance policy that is subject to endorsement.\n *\n * TR: Zeyilnamenin konusu olan sigorta poliçesinin benzersiz tanımlayıcısı.\n */\n readonly policyId: string;\n\n /**\n * Endorsement Sub-Type / Zeyilname Alt Türü\n *\n * EN: The specific category of endorsement being requested.\n *\n * TR: Talep edilen zeyilnamenin belirli kategorisi.\n */\n readonly subType: EndorsementCaseSubType;\n\n /**\n * Communication Channel / İletişim Kanalı\n *\n * EN: The channel through which the endorsement request was received.\n *\n * TR: Zeyilname talebinin alındığı kanal.\n */\n readonly channel?: Channel;\n}\n\n/**\n * Represents a request to create a new sale opportunity case to track potential insurance sales to prospective customers.\n * Used to initiate sales workflows for new customers or existing customers seeking additional coverage.\n *\n * Potansiyel müşterilere olası sigorta satışlarını takip etmek için yeni satış fırsatı talebi oluşturmak için kullanılan istek.\n * Yeni müşteriler veya ek teminat arayan mevcut müşteriler için satış iş akışlarını başlatmak için kullanılır.\n */\nexport interface CreateNewSaleOpportunityCaseRequest {\n /**\n * Customer Unique Identifier / Müşteri Benzersiz Tanımlayıcısı\n *\n * EN: The unique identifier of the customer for whom the sale opportunity is being created.\n *\n * TR: Satış fırsatının oluşturulduğu müşterinin benzersiz tanımlayıcısı.\n */\n readonly customerId: string;\n\n /**\n * Asset Type / Varlık Türü\n *\n * EN: The type of asset related to the sale opportunity, if applicable.\n *\n * TR: Varsa, satış fırsatı ile ilgili varlığın türü.\n */\n readonly assetType?: AssetType;\n\n /**\n * Asset ID / Varlık Kimliği\n *\n * EN: The unique identifier of the asset related to the sale opportunity, if applicable.\n *\n * TR: Varsa, satış fırsatı ile ilgili varlığın benzersiz tanımlayıcısı.\n */\n readonly assetId?: string;\n\n /**\n * Insurance Product Branch / Sigorta Ürün Dalı\n *\n * EN: The specific insurance product branch for which the sale opportunity is being created.\n *\n * TR: Satış fırsatının oluşturulduğu belirli sigorta ürün dalı.\n */\n readonly productBranch: ProductBranch;\n\n /**\n * Communication Channel / İletişim Kanalı\n *\n * EN: The channel through which the sale opportunity will be pursued.\n *\n * TR: Satış fırsatının takip edileceği kanal.\n */\n readonly channel?: Channel;\n}\n\n/**\n * Represents a request to add a note or comment to an existing insurance case.\n * Used to record important information, observations, or communication details during case processing.\n *\n * Mevcut bir sigorta talebine not veya yorum eklemek için kullanılan istek.\n * Talep işleme sırasında önemli bilgileri, gözlemleri veya iletişim detaylarını kaydetmek için kullanılır.\n */\nexport interface AddNoteToCaseRequest {\n /**\n * Case Reference Number / Talep Referans Numarası\n *\n * EN: The unique reference identifier of the insurance case to which the note will be added.\n * This reference ensures the note is properly associated with the correct case for historical\n * tracking and audit purposes.\n *\n * TR: Notun ekleneceği sigorta talebinin benzersiz referans tanımlayıcısı.\n * Bu referans, notun tarihsel takip ve denetim amaçları için doğru talep ile uygun şekilde\n * ilişkilendirilmesini sağlar.\n */\n readonly ref: string;\n\n /**\n * Note Content / Not İçeriği\n *\n * EN: The textual content of the note to be added to the case. This can include observations,\n * decisions, communication summaries, action items, or any other relevant information that\n * should be recorded as part of the case documentation. The note will be timestamped and\n * associated with the user who created it.\n *\n * TR: Talebe eklenecek notun metin içeriği. Bu, gözlemler, kararlar, iletişim özetleri,\n * eylem öğeleri veya talep dokümantasyonunun bir parçası olarak kaydedilmesi gereken diğer\n * ilgili bilgileri içerebilir. Not, zaman damgası ile işaretlenecek ve onu oluşturan kullanıcı\n * ile ilişkilendirilecektir.\n */\n readonly note: string;\n}\n\n/**\n * Represents a request to set or update the asset associated with an existing case.\n * Used to link a specific asset (vehicle or property) to the case for proper tracking and management.\n *\n * Mevcut bir talebe varlık (asset) atamak veya güncellemek için kullanılan istek.\n * Uygun takip ve yönetim için belirli bir varlığı (araç veya emlak) talebe bağlamak için kullanılır.\n */\nexport interface SetCaseAssetRequest {\n /**\n * Case Reference Number / Talep Referans Numarası\n *\n * EN: The unique reference identifier of the case for which to set the asset.\n * This reference ensures the asset is associated with the correct case and properly\n * tracked in the system for audit and historical purposes.\n *\n * TR: Varlığın ayarlanacağı talebin benzersiz referans tanımlayıcısı.\n * Bu referans, varlığın doğru talebe ilişkilendirilmesini ve denetim ve tarihsel amaçlar\n * için sistemde uygun şekilde takip edilmesini sağlar.\n */\n readonly ref: string;\n\n /**\n * Asset Identifier / Varlık Tanımlayıcısı\n *\n * EN: The unique identifier of the asset (vehicle or property) to be linked to the case.\n * This ID corresponds to an existing asset in the customer's portfolio and is used for\n * case tracking, customer service, and relationship management.\n *\n * TR: Talebe bağlanacak varlığın (araç veya emlak) benzersiz tanımlayıcısı.\n * Bu ID, müşterinin portföyündeki mevcut bir varlığa karşılık gelir ve talep takibi,\n * müşteri hizmetleri ve ilişki yönetimi için kullanılır.\n */\n readonly assetId: string;\n\n /**\n * Asset Type / Varlık Türü\n *\n * EN: The type of asset being linked to the case (e.g., Vehicle, Property). This determines\n * the specific processing workflows, data requirements, and management procedures that apply\n * to the case. Different asset types may have different handling processes and requirements.\n *\n * TR: Talebe bağlanan varlığın türü (örneğin, Araç, Emlak). Bu, talebe uygulanan belirli\n * işlem iş akışlarını, veri gereksinimlerini ve yönetim prosedürlerini belirler. Farklı varlık\n * türlerinin farklı işleme süreçleri ve gereksinimleri olabilir.\n */\n readonly assetType: AssetType;\n}\n\n// ============================================================================\n// RESPONSE TYPES\n// ============================================================================\n\n/**\n * Base class for case information responses returned when retrieving case details by reference number.\n * Provides common case properties and serves as a polymorphic base for specific case type responses.\n *\n * Referans numarası ile talep detayları alınırken döndürülen talep bilgi yanıtları için temel sınıf.\n * Ortak talep özelliklerini sağlar ve belirli talep türü yanıtları için polimorfik temel olarak hizmet eder.\n */\nexport type GetCaseByRefResult =\n | GetSaleOpportunityCaseResult\n | GetCancelCaseResult\n | GetEndorsementCaseResult\n | GetComplaintCaseResult;\n\ninterface GetCaseByRefResultBase {\n /**\n * Case Unique Identifier / Talep Benzersiz Tanımlayıcısı\n *\n * EN: The unique system-generated identifier for the insurance case. This ID is used\n * internally for data relationships and API operations throughout InsurUp's systems.\n *\n * TR: Sigorta talebi için sistem tarafından oluşturulan benzersiz tanımlayıcı. Bu kimlik,\n * InsurUp'ın sistemleri boyunca veri ilişkileri ve API operasyonları için dahili olarak kullanılır.\n */\n readonly id: string;\n\n /**\n * Case Reference Number / Talep Referans Numarası\n *\n * EN: The human-readable reference number assigned to the case for customer communication\n * and internal tracking. This reference is used in all customer-facing communications\n * and is typically formatted for easy verbal communication.\n *\n * TR: Müşteri iletişimi ve iç takip için talebe atanan insan tarafından okunabilir referans\n * numarası. Bu referans, müşteriye yönelik tüm iletişimlerde kullanılır ve genellikle kolay\n * sözlü iletişim için formatlanır.\n */\n readonly ref: string;\n\n /**\n * Case Type Category / Talep Tür Kategorisi\n *\n * EN: The primary category of the case, which determines the overall processing workflow\n * and business rules applied to the case throughout its lifecycle.\n *\n * TR: Talebin yaşam döngüsü boyunca uygulanan genel işleme iş akışını ve iş kurallarını\n * belirleyen talebin birincil kategorisi.\n */\n readonly type: CaseType;\n\n /**\n * Case Status / Talep Durumu\n *\n * EN: The current operational status of the case, indicating whether it is active,\n * completed, or in another state that affects how it should be processed.\n *\n * TR: Talebin mevcut operasyonel durumu; aktif, tamamlanmış veya nasıl işlenmesi\n * gerektiğini etkileyen başka bir durumda olup olmadığını gösterir.\n */\n readonly status: CaseStatus;\n\n /**\n * Case Main State / Talep Ana Durumu\n *\n * EN: The primary state category of the case in its workflow progression, representing\n * the high-level phase of case processing.\n *\n * TR: Talep iş akışı ilerlemesindeki talebin birincil durum kategorisi; talep işlemenin\n * üst düzey aşamasını temsil eder.\n */\n readonly mainState: CaseMainState;\n\n /**\n * Case Sub-State / Talep Alt Durumu\n *\n * EN: The specific sub-state within the main state category, providing granular\n * details about the exact phase of case processing.\n *\n * TR: Ana durum kategorisi içindeki belirli alt durum; talep işlemenin tam aşaması\n * hakkında ayrıntılı detaylar sağlar.\n */\n readonly subState: CaseSubState;\n\n /**\n * Customer Unique Identifier / Müşteri Benzersiz Tanımlayıcısı\n *\n * EN: The unique identifier of the customer who is the subject of this case.\n * This links the case to customer profiles and history within InsurUp's system.\n *\n * TR: Bu talebin konusu olan müşterinin benzersiz tanımlayıcısı. Bu, talebi\n * InsurUp'ın sistemindeki müşteri profilleri ve geçmişi ile ilişkilendirir.\n */\n readonly customerId: string;\n\n /**\n * Customer Type / Müşteri Türü\n *\n * EN: The classification of the customer, such as individual or corporate,\n * which affects processing rules and regulatory requirements.\n *\n * TR: Bireysel veya kurumsal gibi müşterinin sınıflandırması; işleme kurallarını\n * ve düzenleyici gereksinimleri etkiler.\n */\n readonly customerType: CustomerType;\n\n /**\n * Customer Name / Müşteri Adı\n *\n * EN: The name of the customer associated with this case, used for identification\n * and communication purposes. May be null if customer information is restricted.\n *\n * TR: Bu talep ile ilişkili müşterinin adı; tanımlama ve iletişim amaçları için\n * kullanılır. Müşteri bilgileri kısıtlıysa null olabilir.\n */\n readonly customerName?: string | null;\n\n /**\n * Base Product Branch / Temel Ürün Dalı\n *\n * EN: The primary insurance product branch that this case relates to, if applicable.\n * This helps categorize the case and determine appropriate handling procedures.\n *\n * TR: Bu talebin ilgili olduğu birincil sigorta ürün dalı (varsa). Bu, talebi\n * kategorize etmeye ve uygun işleme prosedürlerini belirlemeye yardımcı olur.\n */\n readonly baseProductBranch?: ProductBranch;\n\n /**\n * Asset Type / Varlık Türü\n *\n * EN: The type of asset associated with this case, if applicable.\n *\n * TR: Bu talep ile ilişkili varlığın türü (varsa).\n */\n readonly assetType?: AssetType;\n\n /**\n * Asset ID / Varlık Kimliği\n *\n * EN: The unique identifier of the asset associated with this case, if applicable.\n *\n * TR: Bu talep ile ilişkili varlığın benzersiz tanımlayıcısı (varsa).\n */\n readonly assetId?: string;\n\n /**\n * Case Creation Timestamp / Talep Oluşturma Zaman Damgası\n *\n * EN: The date and time when the case was initially created in the system.\n * Used for tracking case age, SLA compliance, and reporting purposes.\n *\n * TR: Talebin sistemde ilk oluşturulduğu tarih ve saat. Talep yaşı takibi,\n * SLA uyumluluğu ve raporlama amaçları için kullanılır.\n */\n readonly createdAt: string;\n\n /**\n * Case Creator User Reference / Talep Oluşturan Kullanıcı Referansı\n *\n * EN: Reference to the user who initially created this case, including their\n * identification and role information for audit and tracking purposes.\n *\n * TR: Bu talebi ilk oluşturan kullanıcıya referans; denetim ve takip amaçları\n * için tanımlama ve rol bilgilerini içerir.\n */\n readonly createdBy: UserReference;\n\n /**\n * Assigned Representative User Reference / Atanmış Temsilci Kullanıcı Referansı\n *\n * EN: Reference to the user currently assigned as the case representative, if any.\n * This person is responsible for handling customer communications and case progression.\n *\n * TR: Şu anda talep temsilcisi olarak atanmış kullanıcıya referans (varsa). Bu kişi,\n * müşteri iletişimleri ve talep ilerlemesini yönetmekten sorumludur.\n */\n readonly representedBy?: UserReference;\n\n /**\n * Communication Channel / İletişim Kanalı\n *\n * EN: The channel through which the case was originally initiated, affecting\n * handling procedures and service level agreements.\n *\n * TR: Talebin ilk başlatıldığı kanal; işleme prosedürleri ve hizmet seviyesi\n * anlaşmalarını etkiler.\n */\n readonly channel: Channel;\n\n /**\n * Source Case Identifier / Kaynak Talep Tanımlayıcısı\n *\n * EN: The identifier of the original case from which this case was derived,\n * if applicable. Used for tracking case relationships and workflows.\n *\n * TR: Bu talebin türetildiği orijinal talebin tanımlayıcısı (varsa). Talep\n * ilişkileri ve iş akışlarını takip etmek için kullanılır.\n */\n readonly sourceCaseId?: string;\n\n /**\n * Source Case Reference Number / Kaynak Talep Referans Numarası\n *\n * EN: The reference number of the original case from which this case was derived,\n * if applicable. Used for customer communication and case traceability.\n *\n * TR: Bu talebin türetildiği orijinal talebin referans numarası (varsa). Müşteri\n * iletişimi ve talep izlenebilirliği için kullanılır.\n */\n readonly sourceCaseRef?: string;\n\n /**\n * Policy End Date / Poliçe Bitiş Tarihi\n *\n * EN: The end date of the policy relevant to this case, if applicable.\n * Used for timing decisions and renewal-related case processing.\n *\n * TR: Bu talep ile ilgili poliçenin bitiş tarihi (varsa). Zamanlama kararları\n * ve yenileme ile ilgili talep işleme için kullanılır.\n */\n readonly policyEndDate?: string;\n\n /**\n * Associated Policy IDs / İlişkili Poliçe Kimlikleri\n *\n * EN: Array of policy identifiers that are associated with or relevant to this case.\n * These policies may be directly affected by case actions or referenced for context.\n *\n * TR: Bu talep ile ilişkili veya ilgili poliçe tanımlayıcıları dizisi. Bu poliçeler,\n * talep eylemlerinden doğrudan etkilenebilir veya bağlam için referans alınabilir.\n */\n readonly policyIds: readonly string[];\n\n /**\n * Associated Proposal IDs / İlişkili Teklif Kimlikleri\n *\n * EN: Array of proposal identifiers that are associated with or relevant to this case.\n * These proposals may be generated as part of the case or referenced for comparison.\n *\n * TR: Bu talep ile ilişkili veya ilgili teklif tanımlayıcıları dizisi. Bu teklifler,\n * talebin bir parçası olarak oluşturulabilir veya karşılaştırma için referans alınabilir.\n */\n readonly proposalIds: readonly string[];\n\n /**\n * Case Notes / Talep Notları\n *\n * EN: Array of notes that have been added to this case throughout its lifecycle.\n * These notes provide additional context, decisions, and communication history.\n *\n * TR: Bu talebe yaşam döngüsü boyunca eklenmiş notlar dizisi. Bu notlar ek bağlam,\n * kararlar ve iletişim geçmişi sağlar.\n */\n readonly notes: readonly Note[];\n\n /**\n * Case Priority Assessment / Talep Öncelik Değerlendirmesi\n *\n * EN: Contains the priority assessment information for the case, including the total score,\n * detailed rule information, and assessment timestamp. This helps determine case handling\n * urgency and resource allocation.\n *\n * TR: Toplam puan, detaylı kural bilgileri ve değerlendirme zaman damgası dahil olmak üzere\n * talebin öncelik değerlendirme bilgilerini içerir. Bu, talep işleme aciliyeti ve kaynak\n * tahsisini belirlemeye yardımcı olur.\n */\n readonly priority?: CasePriorityResult;\n}\n\nexport interface GetSaleOpportunityCaseResult extends GetCaseByRefResultBase {\n readonly type: CaseType.SaleOpportunity;\n readonly caseSubType: SaleOpportunityCaseSubType;\n}\n\nexport interface GetCancelCaseResult extends GetCaseByRefResultBase {\n readonly type: CaseType.Cancel;\n readonly caseSubType: CancelCaseSubType;\n readonly policyId: string;\n}\n\nexport interface GetEndorsementCaseResult extends GetCaseByRefResultBase {\n readonly type: CaseType.Endorsement;\n readonly caseSubType: EndorsementCaseSubType;\n readonly policyId: string;\n}\n\nexport interface GetComplaintCaseResult extends GetCaseByRefResultBase {\n readonly type: CaseType.Complaint;\n readonly caseSubType: ComplaintCaseSubType;\n}\n\n/**\n * Represents case priority assessment information including score and rule details.\n * Puan ve kural detayları dahil olmak üzere talep öncelik değerlendirme bilgilerini temsil eder.\n */\nexport interface CasePriorityResult {\n /**\n * Total Priority Score / Toplam Öncelik Puanı\n *\n * EN: The calculated total priority score for the case based on all applicable rules.\n * Higher scores indicate higher priority and urgency for case handling.\n *\n * TR: Geçerli tüm kurallara dayalı olarak talep için hesaplanan toplam öncelik puanı.\n * Daha yüksek puanlar talep işleme için daha yüksek öncelik ve aciliyeti gösterir.\n */\n readonly totalScore: number;\n\n /**\n * Priority Rule Hits / Öncelik Kuralı Eşleşmeleri\n *\n * EN: Array of detailed information about priority rules that were triggered during\n * the assessment, including user-friendly labels, descriptions, and scores.\n *\n * TR: Değerlendirme sırasında tetiklenen öncelik kuralları hakkında kullanıcı dostu\n * etiketler, açıklamalar ve puanlar dahil olmak üzere detaylı bilgi dizisi.\n */\n readonly ruleHits: readonly CasePriorityRuleHitDetail[];\n\n /**\n * Assessment Timestamp / Değerlendirme Zaman Damgası\n *\n * EN: The date and time when the priority assessment was last calculated for this case.\n * Used for tracking assessment currency and audit purposes.\n *\n * TR: Bu talep için öncelik değerlendirmesinin son hesaplandığı tarih ve saat.\n * Değerlendirme güncelliğini takip etmek ve denetim amaçları için kullanılır.\n */\n readonly assessedAt: string;\n}\n\n/**\n * Details about a case priority rule hit including user-friendly information.\n * Kullanıcı dostu bilgiler dahil olmak üzere talep öncelik kuralı eşleşmesi hakkında detaylar.\n */\nexport interface CasePriorityRuleHitDetail {\n /**\n * Rule System Name / Kural Sistem Adı\n *\n * EN: The internal system identifier for the priority rule. This is used by\n * the system for rule execution and configuration.\n *\n * TR: Öncelik kuralı için dahili sistem tanımlayıcısı. Bu, kural yürütme\n * ve yapılandırma için sistem tarafından kullanılır.\n */\n readonly name: string;\n\n /**\n * Rule Display Label / Kural Görüntü Etiketi\n *\n * EN: A user-friendly, localized label for the rule that can be displayed\n * in user interfaces to help users understand which rule was applied.\n *\n * TR: Hangi kuralın uygulandığını kullanıcıların anlamasına yardımcı olmak\n * için kullanıcı arayüzlerinde görüntülenebilen kullanıcı dostu, yerelleştirilmiş\n * kural etiketi.\n */\n readonly label: string;\n\n /**\n * Rule Description / Kural Açıklaması\n *\n * EN: A detailed, user-friendly description explaining what the rule does,\n * when it applies, and how it affects case priority calculation.\n *\n * TR: Kuralın ne yaptığını, ne zaman uygulandığını ve talep öncelik hesaplamasını\n * nasıl etkilediğini açıklayan detaylı, kullanıcı dostu açıklama.\n */\n readonly description: string;\n\n /**\n * Rule Score Contribution / Kural Puan Katkısı\n *\n * EN: The score value that this rule contributed to the total case priority score.\n * Higher values indicate higher priority impact.\n *\n * TR: Bu kuralın toplam talep öncelik puanına katkı sağladığı puan değeri.\n * Daha yüksek değerler daha yüksek öncelik etkisini gösterir.\n */\n readonly score: number;\n}\n\n/**\n * Represents a note added to a case with timestamp and creator information.\n * Zaman damgası ve oluşturucu bilgisi ile talebe eklenen bir notu temsil eder.\n */\nexport interface Note {\n /**\n * Note Content / Not İçeriği\n *\n * EN: The textual content of the note added to the case. This can include observations,\n * decisions, communication summaries, or any other relevant information.\n *\n * TR: Talebe eklenen notun metin içeriği. Bu, gözlemler, kararlar, iletişim özetleri\n * veya diğer ilgili bilgileri içerebilir.\n */\n readonly note: string;\n\n /**\n * Note Creation Timestamp / Not Oluşturma Zaman Damgası\n *\n * EN: The date and time when the note was added to the case. Used for\n * chronological ordering and audit trail purposes.\n *\n * TR: Notun talebe eklendiği tarih ve saat. Kronolojik sıralama ve denetim\n * izi amaçları için kullanılır.\n */\n readonly createdAt: string;\n\n /**\n * Note Creator User Reference / Not Oluşturan Kullanıcı Referansı\n *\n * EN: Reference to the user who created this note, including their identification\n * and role information for accountability and audit purposes.\n *\n * TR: Bu notu oluşturan kullanıcıya referans; hesap verebilirlik ve denetim\n * amaçları için tanımlama ve rol bilgilerini içerir.\n */\n readonly createdBy: UserReference;\n}\n\n/**\n * Response class containing comprehensive information about an insurance policy associated with a case.\n * Provides detailed policy data including financial information, customer details, and asset-specific properties.\n *\n * Bir talep ile ilişkili sigorta poliçesi hakkında kapsamlı bilgi içeren yanıt sınıfı.\n * Finansal bilgiler, müşteri detayları ve varlığa özel özellikler dahil olmak üzere detaylı poliçe verisi sağlar.\n */\nexport interface CasePolicyResult {\n /**\n * Policy Unique Identifier / Poliçe Benzersiz Tanımlayıcısı\n */\n readonly id: string;\n\n /**\n * Insurer Customer Identifier / Sigortalayan Müşteri Tanımlayıcısı\n */\n readonly insurerCustomerId: string;\n\n /**\n * Insured Customer Identifier / Sigortalı Müşteri Tanımlayıcısı\n */\n readonly insuredCustomerId: string;\n\n /**\n * Premium Payment Installment Number / Prim Ödeme Taksit Numarası\n */\n readonly installmentNumber?: number;\n\n /**\n * Insurance Product Branch / Sigorta Ürün Dalı\n */\n readonly productBranch: ProductBranch;\n\n /**\n * Net Premium Amount / Net Prim Tutarı\n */\n readonly netPremium: number;\n\n /**\n * Gross Premium Amount / Brüt Prim Tutarı\n */\n readonly grossPremium: number;\n\n /**\n * Commission Amount / Komisyon Tutarı\n */\n readonly commission?: number;\n\n /**\n * Payment Option / Ödeme Seçeneği\n */\n readonly paymentType: PaymentOption;\n\n /**\n * Policy Currency / Poliçe Para Birimi\n */\n readonly currency: Currency;\n\n /**\n * Insurance Company Proposal Number / Sigorta Şirketi Teklif Numarası\n */\n readonly insuranceCompanyProposalNumber: string;\n\n /**\n * Policy Creation Timestamp / Poliçe Oluşturma Zaman Damgası\n */\n readonly createdAt: string;\n\n /**\n * Policy Start Date / Poliçe Başlangıç Tarihi\n */\n readonly startDate: string;\n\n /**\n * Policy End Date / Poliçe Bitiş Tarihi\n */\n readonly endDate: string;\n\n /**\n * Policy State / Poliçe Durumu\n */\n readonly state: PolicyState;\n\n /**\n * Insured Customer Name / Sigortalı Müşteri Adı\n */\n readonly insuredCustomerName?: string;\n\n /**\n * Insurer Customer Name / Sigortalayan Müşteri Adı\n */\n readonly insurerCustomerName?: string;\n\n /**\n * Insurance Product Identifier / Sigorta Ürün Tanımlayıcısı\n */\n readonly productId: string;\n\n /**\n * Insurance Product Name / Sigorta Ürün Adı\n */\n readonly productName: string;\n\n /**\n * Insurance Company Identifier / Sigorta Şirketi Tanımlayıcısı\n */\n readonly insuranceCompanyId: string;\n\n /**\n * Insurance Company Name / Sigorta Şirketi Adı\n */\n readonly insuranceCompanyName: string;\n\n /**\n * Insurance Company Logo URL / Sigorta Şirketi Logo URL'si\n */\n readonly insuranceCompanyLogo?: string;\n\n /**\n * Insurance Company Policy Number / Sigorta Şirketi Poliçe Numarası\n */\n readonly insuranceCompanyPolicyNumber: string;\n\n /**\n * Insured Customer Identity / Sigortalı Müşteri Kimliği\n */\n readonly insuredCustomerIdentity: string;\n\n /**\n * Insurer Customer Identity / Sigortalayan Müşteri Kimliği\n */\n readonly insurerCustomerIdentity: string;\n\n /**\n * Insured Customer Type / Sigortalı Müşteri Türü\n */\n readonly insuredCustomerType: CustomerType;\n\n /**\n * Insurer Customer City / Sigortalayan Müşteri Şehri\n */\n readonly insurerCustomerCity?: InsuranceParameter;\n\n /**\n * Insured Customer City / Sigortalı Müşteri Şehri\n */\n readonly insuredCustomerCity?: InsuranceParameter;\n\n /**\n * Insurer Customer District / Sigortalayan Müşteri İlçesi\n */\n readonly insurerCustomerDistrict?: InsuranceParameter;\n\n /**\n * Insured Customer District / Sigortalı Müşteri İlçesi\n */\n readonly insuredCustomerDistrict?: InsuranceParameter;\n\n /**\n * Insurer Customer Birth Date / Sigortalayan Müşteri Doğum Tarihi\n */\n readonly insurerCustomerBirthDate?: string;\n\n /**\n * Vehicle Model Information / Araç Model Bilgisi\n */\n readonly vehicleModel?: VehicleModel;\n\n /**\n * Vehicle Plate Information / Araç Plaka Bilgisi\n */\n readonly vehiclePlate?: VehiclePlate;\n\n /**\n * Vehicle Document Serial / Araç Belge Serisi\n */\n readonly vehicleDocumentSerial?: VehicleDocumentSerial;\n\n /**\n * Vehicle Fuel Type / Araç Yakıt Türü\n */\n readonly vehicleFuel?: VehicleFuel;\n\n /**\n * Insured Customer Birth Date / Sigortalı Müşteri Doğum Tarihi\n */\n readonly insuredCustomerBirthDate?: string;\n\n /**\n * Policy Creator User Reference / Poliçe Oluşturan Kullanıcı Referansı\n */\n readonly createdBy: UserReference;\n\n /**\n * Property Number / Mülk Numarası\n */\n readonly propertyNumber?: number;\n\n /**\n * Old DASK Policy Number / Eski DASK Poliçe Numarası\n */\n readonly daskOldPolicyNumber?: number;\n\n /**\n * Current DASK Policy Number / Mevcut DASK Poliçe Numarası\n */\n readonly daskPolicyNumber?: string;\n}\n\n/**\n * Response class containing comprehensive information about an insurance proposal associated with a case.\n * Provides detailed proposal data including product information, customer details, and success metrics.\n *\n * Bir talep ile ilişkili sigorta teklifi hakkında kapsamlı bilgi içeren yanıt sınıfı.\n * Ürün bilgileri, müşteri detayları ve başarı metrikleri dahil olmak üzere detaylı teklif verisi sağlar.\n */\nexport interface CaseProposalResult {\n /**\n * Proposal Unique Identifier / Teklif Benzersiz Tanımlayıcısı\n */\n readonly id: string;\n\n /**\n * Insurer Customer Identifier / Sigortalayan Müşteri Tanımlayıcısı\n */\n readonly insurerCustomerId: string;\n\n /**\n * Insured Customer Identifier / Sigortalı Müşteri Tanımlayıcısı\n */\n readonly insuredCustomerId: string;\n\n /**\n * Insurance Product Branch / Sigorta Ürün Dalı\n */\n readonly productBranch: ProductBranch;\n\n /**\n * Proposal State / Teklif Durumu\n */\n readonly state: string; // ProposalState enum\n\n /**\n * Total Products Count / Toplam Ürün Sayısı\n */\n readonly productsCount: number;\n\n /**\n * Successful Products Count / Başarılı Ürün Sayısı\n */\n readonly succeedProductsCount: number;\n\n /**\n * Agent User Creator Reference / Acente Kullanıcı Oluşturucu Referansı\n */\n readonly agentUserCreatedBy: UserReference;\n\n /**\n * Insured Customer Name / Sigortalı Müşteri Adı\n */\n readonly insuredCustomerName: string;\n\n /**\n * Insured Customer Identity / Sigortalı Müşteri Kimliği\n */\n readonly insuredCustomerIdentity: string;\n\n /**\n * Insured Customer Type / Sigortalı Müşteri Türü\n */\n readonly insuredCustomerType: CustomerType;\n\n /**\n * Insured Customer City / Sigortalı Müşteri Şehri\n */\n readonly insuredCustomerCity?: InsuranceParameter;\n\n /**\n * Insured Customer District / Sigortalı Müşteri İlçesi\n */\n readonly insuredCustomerDistrict?: InsuranceParameter;\n\n /**\n * Vehicle Model Information / Araç Model Bilgisi\n */\n readonly vehicleModel?: VehicleModel;\n\n /**\n * Vehicle Plate Information / Araç Plaka Bilgisi\n */\n readonly vehiclePlate?: VehiclePlate;\n\n /**\n * Vehicle Document Serial / Araç Belge Serisi\n */\n readonly vehicleDocumentSerial?: VehicleDocumentSerial;\n\n /**\n * Vehicle Fuel Type / Araç Yakıt Türü\n */\n readonly vehicleFuel?: VehicleFuel;\n\n /**\n * Insured Customer Birth Date / Sigortalı Müşteri Doğum Tarihi\n */\n readonly insuredCustomerBirthDate?: string;\n\n /**\n * Proposal Success Rate / Teklif Başarı Oranı\n */\n readonly successRate: number;\n\n /**\n * Lowest Premium Amount / En Düşük Prim Tutarı\n */\n readonly lowestPremium?: number;\n\n /**\n * Highest Premium Amount / En Yüksek Prim Tutarı\n */\n readonly highestPremium?: number;\n\n /**\n * Vehicle Utilization Style / Araç Kullanım Biçimi\n */\n readonly utilizationStyle?: string; // VehicleUtilizationStyle enum\n\n /**\n * Proposal Creation Timestamp / Teklif Oluşturma Zaman Damgası\n */\n readonly createdAt: string;\n}\n\n/**\n * Base class for case activity responses that represent different types of actions performed on insurance cases.\n * Provides common activity properties and serves as a polymorphic base for specific activity type responses.\n *\n * Sigorta talepleri üzerinde gerçekleştirilen farklı eylem türlerini temsil eden talep aktivite yanıtları için temel sınıf.\n * Ortak aktivite özelliklerini sağlar ve belirli aktivite türü yanıtları için polimorfik temel olarak hizmet eder.\n */\nexport type CaseActivityResult =\n | CaseCreatedActivityResult\n | CasePolicyAddedActivityResult\n | CaseProposalAddedActivityResult\n | CaseRepresentativeAssignedActivityResult\n | CaseChannelChangedActivityResult\n | CaseStateChangedActivityResult\n | CasePolicyEndDateSetActivityResult\n | CaseCustomerUpdatedActivityResult\n | CaseAssetUpdatedActivityResult\n | CaseNoteAddedActivityResult\n | CasePriorityAssessedActivityResult\n | CaseProposalProductPurchaseAttemptedActivityResult;\n\ninterface CaseActivityResultBase {\n /**\n * Case Activity Action / Talep Aktivite Eylemi\n *\n * EN: The specific action or event type that this activity represents in the case lifecycle.\n * This determines the nature of the change or event that occurred and how it should be\n * interpreted in the context of case management and audit trails.\n *\n * TR: Bu aktivitenin talep yaşam döngüsünde temsil ettiği belirli eylem veya olay türü.\n * Bu, meydana gelen değişiklik veya olayın doğasını ve talep yönetimi ve denetim izleri\n * bağlamında nasıl yorumlanması gerektiğini belirler.\n */\n readonly action: CaseActivityAction;\n\n /**\n * Activity Timestamp / Aktivite Zaman Damgası\n *\n * EN: The date and time when this activity was performed on the case. Used for\n * chronological ordering of activities, audit trails, and timeline analysis.\n *\n * TR: Bu aktivitenin talep üzerinde gerçekleştirildiği tarih ve saat. Aktivitelerin\n * kronolojik sıralaması, denetim izleri ve zaman çizelgesi analizi için kullanılır.\n */\n readonly createdAt: string;\n\n /**\n * Activity Performer User Reference / Aktivite Gerçekleştiren Kullanıcı Referansı\n *\n * EN: Reference to the user who performed this activity, including their identification\n * and role information for accountability and audit purposes.\n *\n * TR: Bu aktiviteyi gerçekleştiren kullanıcıya referans; hesap verebilirlik ve denetim\n * amaçları için tanımlama ve rol bilgilerini içerir.\n */\n readonly createdBy: UserReference;\n}\n\nexport interface CaseCreatedActivityResult extends CaseActivityResultBase {\n readonly action: CaseActivityAction.Created;\n readonly channel: Channel;\n readonly representative?: UserReference;\n}\n\nexport interface CasePolicyAddedActivityResult extends CaseActivityResultBase {\n readonly action: CaseActivityAction.PolicyAdded;\n readonly policyId: string;\n readonly policyCreatedBy: UserReference;\n}\n\nexport interface CaseProposalAddedActivityResult extends CaseActivityResultBase {\n readonly action: CaseActivityAction.ProposalAdded;\n readonly proposalId: string;\n readonly proposalCreatedBy: UserReference;\n}\n\nexport interface CaseRepresentativeAssignedActivityResult extends CaseActivityResultBase {\n readonly action: CaseActivityAction.RepresentativeAssigned;\n readonly oldRepresentative?: UserReference;\n readonly newRepresentative?: UserReference;\n}\n\nexport interface CaseChannelChangedActivityResult extends CaseActivityResultBase {\n readonly action: CaseActivityAction.ChannelChanged;\n readonly oldChannel: Channel;\n readonly newChannel: Channel;\n}\n\nexport interface CaseStateChangedActivityResult extends CaseActivityResultBase {\n readonly action: CaseActivityAction.StateChanged;\n readonly oldMainState: CaseMainState;\n readonly oldSubState: CaseSubState;\n readonly newMainState: CaseMainState;\n readonly newSubState: CaseSubState;\n}\n\nexport interface CasePolicyEndDateSetActivityResult extends CaseActivityResultBase {\n readonly action: CaseActivityAction.PolicyEndDateSet;\n readonly oldPolicyEndDate?: string;\n readonly newPolicyEndDate?: string;\n}\n\nexport interface CaseCustomerUpdatedActivityResult extends CaseActivityResultBase {\n readonly action: CaseActivityAction.CustomerUpdated;\n readonly oldCustomerName?: string;\n readonly newCustomerName?: string;\n readonly oldCustomerIdentity?: string;\n readonly newCustomerIdentity?: string;\n readonly oldCustomerCity?: InsuranceParameter;\n readonly newCustomerCity?: InsuranceParameter;\n readonly oldCustomerDistrict?: InsuranceParameter;\n readonly newCustomerDistrict?: InsuranceParameter;\n readonly oldCustomerPrimaryPhoneNumber?: CustomerPhoneNumber;\n readonly newCustomerPrimaryPhoneNumber?: CustomerPhoneNumber;\n readonly oldCustomerPrimaryEmail?: CustomerEmail;\n readonly newCustomerPrimaryEmail?: CustomerEmail;\n readonly oldCustomerBirthDate?: BirthDate;\n readonly newCustomerBirthDate?: BirthDate;\n}\n\nexport interface CaseAssetUpdatedActivityResult extends CaseActivityResultBase {\n readonly action: CaseActivityAction.AssetUpdated;\n readonly oldAssetId?: string;\n readonly newAssetId?: string;\n readonly oldVehiclePlate?: VehiclePlate;\n readonly newVehiclePlate?: VehiclePlate;\n readonly oldVehicleModel?: VehicleModel;\n readonly newVehicleModel?: VehicleModel;\n readonly oldVehicleUtilizationStyle?: VehicleUtilizationStyle;\n readonly newVehicleUtilizationStyle?: VehicleUtilizationStyle;\n readonly oldVehicleEngine?: VehicleEngine;\n readonly newVehicleEngine?: VehicleEngine;\n readonly oldVehicleChassis?: VehicleChassis;\n readonly newVehicleChassis?: VehicleChassis;\n readonly oldVehicleRegistrationDate?: VehicleRegistrationDate;\n readonly newVehicleRegistrationDate?: VehicleRegistrationDate;\n readonly oldVehicleFuel?: VehicleFuel;\n readonly newVehicleFuel?: VehicleFuel;\n readonly oldVehicleSeatNumber?: VehicleSeatNumber;\n readonly newVehicleSeatNumber?: VehicleSeatNumber;\n readonly oldVehicleDocumentSerial?: VehicleDocumentSerial;\n readonly newVehicleDocumentSerial?: VehicleDocumentSerial;\n readonly oldPropertyNumber?: PropertyNumber;\n readonly newPropertyNumber?: PropertyNumber;\n readonly oldPropertySquareMeter?: PropertySquareMeter;\n readonly newPropertySquareMeter?: PropertySquareMeter;\n readonly oldPropertyConstructionYear?: PropertyConstructionYear;\n readonly newPropertyConstructionYear?: PropertyConstructionYear;\n readonly oldPropertyDamageStatus?: PropertyDamageStatus;\n readonly newPropertyDamageStatus?: PropertyDamageStatus;\n readonly oldPropertyFloor?: PropertyFloor;\n readonly newPropertyFloor?: PropertyFloor;\n readonly oldPropertyStructure?: PropertyStructure;\n readonly newPropertyStructure?: PropertyStructure;\n readonly oldPropertyUtilizationStyle?: PropertyUtilizationStyle;\n readonly newPropertyUtilizationStyle?: PropertyUtilizationStyle;\n readonly oldPropertyOwnershipType?: PropertyOwnershipType;\n readonly newPropertyOwnershipType?: PropertyOwnershipType;\n}\n\nexport interface CaseNoteAddedActivityResult extends CaseActivityResultBase {\n readonly action: CaseActivityAction.NoteAdded;\n readonly note: string;\n}\n\nexport interface CasePriorityAssessedActivityResult extends CaseActivityResultBase {\n readonly action: CaseActivityAction.PriorityAssessed;\n readonly oldTotalScore?: number;\n readonly oldRuleHits?: readonly CasePriorityRuleHitDetail[];\n readonly newTotalScore: number;\n readonly newRuleHits: readonly CasePriorityRuleHitDetail[];\n}\n\nexport interface CaseProposalProductPurchaseAttemptedActivityResult extends CaseActivityResultBase {\n readonly action: CaseActivityAction.ProposalProductPurchaseAttempted;\n readonly proposalId: string;\n readonly proposalProductId: string;\n readonly insuranceProductId: number;\n readonly installmentNumber: number;\n readonly attemptedTime: string;\n readonly success: boolean;\n readonly errorMessage?: string;\n readonly channel: Channel;\n readonly paymentOption: PaymentOption;\n}\n\n// ============================================================================\n// SUPPORTING TYPES\n// ============================================================================\n\n// UserReference, InsuranceParameter, and vehicle types are imported from './common'\n\n// ============================================================================\n// BRANCH ASSIGNMENT TYPES\n// ============================================================================\n\n/**\n * Request to set case branch\n */\nexport interface SetCaseBranchRequest {\n readonly ref: string;\n readonly branchId: string;\n}\n\n// ============================================================================\n// ANALYTICS TYPES\n// ============================================================================\n\n/**\n * Request for sales opportunity funnel analytics\n */\nexport interface GetSalesOpportunityFunnelAnalyticsRequest {\n readonly startDate?: string;\n readonly endDate?: string;\n}\n\n/**\n * Funnel stage data\n */\nexport interface FunnelStage {\n readonly stage: string;\n readonly count: number;\n readonly percentage: number;\n}\n\n/**\n * Response for sales opportunity funnel analytics\n */\nexport interface GetSalesOpportunityFunnelAnalyticsResult {\n readonly stages: readonly FunnelStage[];\n}\n\n/**\n * Request for open case backlog pivot analytics\n */\nexport interface GetOpenCaseBacklogPivotAnalyticsRequest {\n readonly filters?: object;\n}\n\n/**\n * Backlog pivot data\n */\nexport interface BacklogPivotData {\n readonly type: string;\n readonly subtype: string;\n readonly count: number;\n}\n\n/**\n * Response for open case backlog pivot analytics\n */\nexport interface GetOpenCaseBacklogPivotAnalyticsResult {\n readonly pivotData: readonly BacklogPivotData[];\n}\n\n/**\n * Request for failed cases reason distribution\n */\nexport interface GetFailedCasesReasonDistributionRequest {\n readonly startDate?: string;\n readonly endDate?: string;\n}\n\n/**\n * Reason distribution data\n */\nexport interface ReasonDistribution {\n readonly reason: string;\n readonly count: number;\n readonly percentage: number;\n}\n\n/**\n * Response for failed cases reason distribution\n */\nexport interface GetFailedCasesReasonDistributionResult {\n readonly reasons: readonly ReasonDistribution[];\n}\n\n// ============================================================================\n// COMMUNICATION AUTOMATION TYPES\n// ============================================================================\n\n/**\n * Automation argument\n */\nexport interface AutomationArgument {\n readonly key: string;\n readonly type: string;\n readonly required: boolean;\n}\n\n/**\n * Case communication automation result\n */\nexport interface CaseCommunicationAutomationResult {\n readonly id: string;\n readonly name: string;\n readonly arguments: readonly AutomationArgument[];\n}\n\n// ============================================================================\n// PRIORITY TEMPLATE TYPES\n// ============================================================================\n\n/**\n * Priority template\n */\nexport interface PriorityTemplate {\n readonly id: string;\n readonly name: string;\n readonly description?: string;\n}\n\n/**\n * Response for case priority templates\n */\nexport interface GetCasePriorityTemplatesResult {\n readonly templates: readonly PriorityTemplate[];\n}\n","import type { ProductBranch, Channel } from \"./common.js\";\nimport type {\n CaseType,\n SaleOpportunityCaseSubType,\n CancelCaseSubType,\n EndorsementCaseSubType,\n ComplaintCaseSubType,\n} from \"./cases.js\";\n\n/**\n * Represents the robotic process automation (RPA) deployment modes available for agents.\n * Defines how and where automated processes and software robots operate within the agent's infrastructure.\n *\n * Acenteler için mevcut robotik süreç otomasyonu (RPA) dağıtım modlarını temsil eder.\n * Otomatik süreçlerin ve yazılım robotlarının acente altyapısı içinde nasıl ve nerede çalıştığını tanımlar.\n */\nexport enum RobotMode {\n /**\n * No robotic process automation is enabled.\n * All processes are handled manually by human operators.\n *\n * Robotik süreç otomasyonu etkin değil.\n * Tüm süreçler insan operatörler tarafından manuel olarak yürütülür.\n */\n None = \"NONE\",\n\n /**\n * Robotic automation runs on desktop computers within the agent's local environment.\n * Robots operate on individual workstations with direct user interaction capabilities.\n *\n * Robotik otomasyon acente yerel ortamında masaüstü bilgisayarlarda çalışır.\n * Robotlar doğrudan kullanıcı etkileşim yetenekleri ile bireysel iş istasyonlarında çalışır.\n */\n Desktop = \"DESKTOP\",\n\n /**\n * Robotic automation runs on centralized servers with 24/7 unattended operation.\n * Robots operate independently without direct human intervention in a server environment.\n *\n * Robotik otomasyon 7/24 gözetimsiz çalışma ile merkezi sunucularda çalışır.\n * Robotlar sunucu ortamında doğrudan insan müdahalesi olmadan bağımsız olarak çalışır.\n */\n Server = \"SERVER\",\n}\n\n/**\n * Represents the different modes available for automatically assigning cases to representatives.\n * Defines how new cases are distributed among available representatives within an agent's organization.\n *\n * Temsilcilere case'lerin otomatik olarak atanması için mevcut farklı modları temsil eder.\n * Yeni case'lerin acente organizasyonu içindeki mevcut temsilciler arasında nasıl dağıtıldığını tanımlar.\n */\nexport enum CaseRepresentativeAssignmentMode {\n /**\n * No automatic assignment is performed.\n * Cases remain unassigned and must be manually assigned by administrators.\n *\n * Hiçbir otomatik atama yapılmaz.\n * Case'ler atanmamış kalır ve yöneticiler tarafından manuel olarak atanmalıdır.\n */\n None = \"NONE\",\n\n /**\n * Cases are randomly distributed among eligible representatives.\n * Each new case is assigned to a randomly selected representative who meets the criteria.\n *\n * Case'ler uygun temsilciler arasında rastgele dağıtılır.\n * Her yeni case, kriterleri karşılayan rastgele seçilmiş bir temsilciye atanır.\n */\n Random = \"RANDOM\",\n\n /**\n * Cases are distributed equally among representatives using round-robin algorithm.\n * Representatives take turns receiving cases to ensure balanced workload distribution.\n *\n * Case'ler round-robin algoritması kullanılarak temsilciler arasında eşit olarak dağıtılır.\n * Temsilciler dengeli iş yükü dağılımını sağlamak için sırayla case alırlar.\n */\n RoundRobin = \"ROUND_ROBIN\",\n\n /**\n * Cases are distributed based on insurance branch importance weights.\n * Representatives receive cases based on their current workload calculated by importance scores of assigned cases.\n *\n * Case'ler sigorta branşı önem ağırlıklarına göre dağıtılır.\n * Temsilciler, atanmış case'lerin önem puanlarıyla hesaplanan mevcut iş yüklerine göre case alırlar.\n */\n BranchImportanceBalance = \"BRANCH_IMPORTANCE_BALANCE\",\n}\n\n/**\n * Represents the synchronization status between agent systems and insurance company platforms.\n * Tracks the current state of data synchronization for agent appointments, products, and configurations.\n *\n * Acente sistemleri ile sigorta şirketi platformları arasındaki senkronizasyon durumunu temsil eder.\n * Acente randevuları, ürünler ve konfigürasyonlar için veri senkronizasyonunun mevcut durumunu takip eder.\n */\nexport enum InsuranceSyncState {\n /**\n * Synchronization is currently in progress or queued for processing.\n * The system is attempting to sync data with the insurance company.\n *\n * Senkronizasyon şu anda devam ediyor veya işlem için sıraya alındı.\n * Sistem sigorta şirketi ile veri senkronizasyonu yapmaya çalışıyor.\n */\n Pending = \"PENDING\",\n\n /**\n * Synchronization with the insurance company has failed.\n * Manual intervention or retry may be required to resolve the issue.\n *\n * Sigorta şirketi ile senkronizasyon başarısız oldu.\n * Sorunu çözmek için manuel müdahale veya yeniden deneme gerekebilir.\n */\n Failed = \"FAILED\",\n\n /**\n * Synchronization with the insurance company has completed successfully.\n * All data is up-to-date and systems are fully operational.\n *\n * Sigorta şirketi ile senkronizasyon başarıyla tamamlandı.\n * Tüm veriler güncel ve sistemler tamamen operasyonel.\n */\n Succeed = \"SUCCEED\",\n}\n\n/**\n * Represents the integration method types used by agents to connect with insurance companies.\n * Defines how agents interface with insurance company systems for quotes, policies, and data exchange.\n *\n * Acentelerin sigorta şirketleri ile bağlantı kurmak için kullandığı entegrasyon yöntem türlerini temsil eder.\n * Acentelerin teklif, poliçe ve veri alışverişi için sigorta şirketi sistemleri ile nasıl arayüz kuracağını tanımlar.\n */\nexport enum AgentInsuranceCompanyType {\n /**\n * Integration through web service APIs and online portals.\n * Enables real-time data exchange through standard web protocols.\n *\n * Web servis API'leri ve çevrimiçi portallar aracılığıyla entegrasyon.\n * Standart web protokolleri aracılığıyla gerçek zamanlı veri alışverişi sağlar.\n */\n WebService = \"WEB_SERVICE\",\n\n /**\n * Integration through robotic process automation (RPA) and automated form filling.\n * Uses software robots to interact with insurance company systems automatically.\n *\n * Robotik süreç otomasyonu (RPA) ve otomatik form doldurma yoluyla entegrasyon.\n * Sigorta şirketi sistemleri ile otomatik etkileşim için yazılım robotları kullanır.\n */\n Robot = \"ROBOT\",\n}\n\n/**\n * SMS implementation types available for agent integrations.\n *\n * Acente entegrasyonları için mevcut SMS uygulama türleri.\n */\nexport enum SmsImplementation {\n Default = \"Default\",\n Teknomart = \"Teknomart\",\n ArtiKurumsal = \"ArtiKurumsal\",\n Verimor = \"Verimor\",\n}\n\n/**\n * Call center implementation types available for agent integrations.\n *\n * Acente entegrasyonları için mevcut çağrı merkezi uygulama türleri.\n */\nexport enum CallCenterImplementation {\n None = \"None\",\n AloTech = \"AloTech\",\n}\n\n/**\n * Agent user state enumeration.\n * Tracks the activation state of an agent user account.\n *\n * Acente kullanıcısı durum enum'u.\n * Acente kullanıcı hesabının aktivasyon durumunu takip eder.\n */\nexport enum AgentUserState {\n /** User account is pending activation / Kullanıcı hesabı aktivasyon bekliyor */\n Pending = \"PENDING\",\n /** User account is active and operational / Kullanıcı hesabı aktif ve çalışır durumda */\n Active = \"ACTIVE\",\n /** User account is inactive or disabled / Kullanıcı hesabı inaktif veya devre dışı */\n Inactive = \"INACTIVE\",\n}\n\n/**\n * Base class for SMS service integration options.\n *\n * SMS hizmet entegrasyon seçenekleri için temel sınıf.\n */\n/**\n * Union type for all SMS agent options\n * Tüm SMS acente seçenekleri için birleşim türü\n */\nexport type SmsAgentOptions =\n | {\n readonly implementation: SmsImplementation.Default;\n }\n | {\n readonly implementation: SmsImplementation.Teknomart;\n readonly sender: string;\n readonly username: string;\n readonly password: string;\n }\n | {\n readonly implementation: SmsImplementation.ArtiKurumsal;\n readonly companyCode: string;\n readonly username: string;\n readonly password: string;\n readonly originator: string;\n }\n | {\n readonly implementation: SmsImplementation.Verimor;\n readonly username: string;\n readonly password: string;\n readonly sourceAddr: string;\n };\n\n/**\n * Union type for all call center agent options\n * Tüm çağrı merkezi acente seçenekleri için birleşim türü\n */\nexport type CallCenterAgentOptions =\n | ({\n readonly implementation: CallCenterImplementation.None;\n } & CallCenterAgentOptionsBase)\n | ({\n readonly implementation: CallCenterImplementation.AloTech;\n readonly clientSecret: string;\n readonly clientId: string;\n readonly campaignKeyMappings: CampaignKeyMapping[];\n readonly listName: string;\n } & CallCenterAgentOptionsBase);\n\ntype CallCenterAgentOptionsBase = {\n readonly tenant: string;\n};\n\n/**\n * Campaign key mapping for AloTech call center integration.\n *\n * AloTech çağrı merkezi entegrasyonu için kampanya anahtar eşleme.\n */\nexport interface CampaignKeyMapping {\n readonly campaignKey: string;\n readonly productBranch: ProductBranch | null;\n readonly caseType: CaseType | null;\n}\n\n/**\n * Represents phone number information with country code.\n *\n * Ülke kodu ile telefon numarası bilgilerini temsil eder.\n */\nexport interface PhoneNumber {\n /**\n * The phone number without country code.\n *\n * Ülke kodu olmadan telefon numarası.\n */\n readonly number: string;\n\n /**\n * The international country code for the phone number.\n *\n * Telefon numarası için uluslararası ülke kodu.\n */\n readonly countryCode: number;\n}\n\n/**\n * Case priority rule definition model.\n *\n * Case öncelik kuralı tanım modeli.\n */\nexport interface CasePriorityRuleDefinition {\n readonly name: string;\n readonly score: number;\n readonly branches: readonly ProductBranch[];\n readonly caseTypes: readonly CaseType[];\n readonly saleOpportunityCaseSubTypes: readonly SaleOpportunityCaseSubType[];\n readonly cancelCaseSubTypes: readonly CancelCaseSubType[];\n readonly endorsementCaseSubTypes: readonly EndorsementCaseSubType[];\n readonly complaintCaseSubTypes: readonly ComplaintCaseSubType[];\n readonly channels: readonly Channel[];\n readonly arguments: Record<string, unknown>;\n}\n\n/**\n * Represents a product branch with its authorized products for the agent.\n *\n * Acente için yetkili ürünler ile bir ürün dalını temsil eder.\n */\nexport interface Branch {\n /**\n * The insurance product branch category.\n *\n * Sigorta ürün dalı kategorisi.\n */\n readonly productBranch: ProductBranch;\n\n /**\n * Array of specific product identifiers within the branch that the agent can sell.\n *\n * Acentenin satabileceği dal içindeki belirli ürün tanımlayıcıları dizisi.\n */\n readonly productIds: readonly number[];\n}\n\n// Request contracts\n\n/**\n * Represents a request to update the current agent's profile information and operational settings.\n * Allows agents to modify their business details, contact information, and system configurations.\n *\n * Geçerli acentenin profil bilgilerini ve operasyonel ayarlarını güncelleme talebini temsil eder.\n * Acentelerin iş detaylarını, iletişim bilgilerini ve sistem yapılandırmalarını değiştirmesine olanak tanır.\n */\nexport interface UpdateCurrentAgentRequest {\n /**\n * The updated name of the agent.\n *\n * Acentenin güncellenmiş adı.\n */\n readonly name: string;\n\n /**\n * The updated phone number information for the agent.\n *\n * Acente için güncellenmiş telefon numarası bilgileri.\n */\n readonly phoneNumber: PhoneNumber | null;\n\n /**\n * The email address of the agent for business communications and notifications.\n *\n * Acentenin iş iletişimleri ve bildirimler için email adresi.\n */\n readonly email: string | null;\n\n /**\n * The automation mode for the agent's operations.\n *\n * Acentenin operasyonları için otomasyon modu.\n */\n readonly robotMode: RobotMode;\n\n /**\n * Optional call center integration options for the agent.\n *\n * Acente için isteğe bağlı çağrı merkezi entegrasyon seçenekleri.\n */\n readonly callCenterOptions: CallCenterAgentOptions | null;\n\n /**\n * Optional SMS service integration options for the agent.\n *\n * Acente için isteğe bağlı SMS hizmet entegrasyon seçenekleri.\n */\n readonly smsOptions: SmsAgentOptions | null;\n\n /**\n * The case representative assignment mode for automatic case distribution.\n *\n * Otomatik case dağıtımı için case atama modu.\n */\n readonly caseRepresentativeAssignmentMode: CaseRepresentativeAssignmentMode | null;\n\n /**\n * The list of allowed role names for case representative assignment.\n *\n * Case ataması için izin verilen rol adlarının listesi.\n */\n readonly caseRepresentativeAssignmentAllowedRoles: readonly string[];\n\n readonly casePriorityRuleDefinitions: readonly CasePriorityRuleDefinition[];\n}\n\n/**\n * Represents a request to add an insurance company connection to an agent.\n * Establishes a business relationship and authorizes the agent to sell the company's products.\n *\n * Bir acenteye sigorta şirketi bağlantısı ekleme talebini temsil eder.\n * İş ilişkisi kurar ve acenteyi şirketin ürünlerini satma konusunda yetkilendirir.\n */\nexport interface AddInsuranceCompanyToAgentRequest {\n /**\n * The unique identifier of the insurance company to be added.\n *\n * Eklenecek sigorta şirketinin benzersiz tanımlayıcısı.\n */\n readonly insuranceCompanyId: number;\n\n /**\n * The type of relationship between the agent and insurance company.\n *\n * Acente ile sigorta şirketi arasındaki ilişki türü.\n */\n readonly type: AgentInsuranceCompanyType;\n\n /**\n * The connection configuration fields for integrating with the insurance company's systems.\n *\n * Sigorta şirketinin sistemleri ile entegrasyon için bağlantı yapılandırma alanları.\n */\n readonly connectionFields: Record<string, string>;\n\n /**\n * Array of product branches and their associated products that the agent is authorized to sell.\n *\n * Acentenin satma yetkisine sahip olduğu ürün dalları ve ilişkili ürünler dizisi.\n */\n readonly branches: readonly Branch[];\n}\n\n/**\n * Represents a request to retrieve the product branches and authorizations for an agent's insurance company connection.\n * Used to view which insurance products the agent is authorized to sell from a specific insurance company.\n *\n * Bir acentenin sigorta şirketi bağlantısı için ürün dalları ve yetkilendirmelerini getirme talebini temsil eder.\n * Acentenin belirli bir sigorta şirketinden satma yetkisine sahip olduğu sigorta ürünlerini görüntülemek için kullanılır.\n */\nexport interface GetAgentInsuranceCompanyBranchesRequest {\n /**\n * The unique identifier of the agent-insurance company relationship to retrieve branches for.\n *\n * Dalları getirilecek acente-sigorta şirketi ilişkisinin benzersiz tanımlayıcısı.\n */\n readonly agentInsuranceCompanyId: string;\n}\n\n/**\n * Represents a request to retrieve the connection configuration for an agent's insurance company integration.\n * Used to view technical connection parameters and credentials for system integration.\n *\n * Bir acentenin sigorta şirketi entegrasyonu için bağlantı yapılandırmasını getirme talebini temsil eder.\n * Sistem entegrasyonu için teknik bağlantı parametrelerini ve kimlik bilgilerini görüntülemek için kullanılır.\n */\nexport interface GetAgentInsuranceCompanyConnectionRequest {\n /**\n * The unique identifier of the agent-insurance company relationship to retrieve connection details for.\n *\n * Bağlantı detayları getirilecek acente-sigorta şirketi ilişkisinin benzersiz tanımlayıcısı.\n */\n readonly agentInsuranceCompanyId: string;\n}\n\n/**\n * Represents a request to update the connection configuration for an agent's insurance company integration.\n * Modifies technical connection parameters and credentials for system integration.\n *\n * Bir acentenin sigorta şirketi entegrasyonu için bağlantı yapılandırmasını güncelleme talebini temsil eder.\n * Sistem entegrasyonu için teknik bağlantı parametrelerini ve kimlik bilgilerini değiştirir.\n */\nexport interface UpdateAgentInsuranceCompanyConnectionRequest {\n /**\n * The unique identifier of the agent-insurance company relationship to update.\n *\n * Güncellenecek acente-sigorta şirketi ilişkisinin benzersiz tanımlayıcısı.\n */\n readonly agentInsuranceCompanyId: string;\n\n /**\n * Updated connection configuration fields for integrating with the insurance company's systems.\n *\n * Sigorta şirketinin sistemleri ile entegrasyon için güncellenmiş bağlantı yapılandırma alanları.\n */\n readonly connectionFields: Record<string, string>;\n}\n\n/**\n * Represents a request to update the product branches and authorizations for an agent's insurance company connection.\n * Modifies which insurance products the agent is authorized to sell from a specific insurance company.\n *\n * Bir acentenin sigorta şirketi bağlantısı için ürün dalları ve yetkilendirmelerini güncelleme talebini temsil eder.\n * Acentenin belirli bir sigorta şirketinden satma yetkisine sahip olduğu sigorta ürünlerini değiştirir.\n */\nexport interface UpdateAgentInsuranceCompanyBranchesRequest {\n /**\n * The unique identifier of the agent-insurance company relationship to update.\n *\n * Güncellenecek acente-sigorta şirketi ilişkisinin benzersiz tanımlayıcısı.\n */\n readonly agentInsuranceCompanyId: string;\n\n /**\n * Array of updated product branches and their associated products that the agent is authorized to sell.\n *\n * Acentenin satma yetkisine sahip olduğu güncellenmiş ürün dalları ve ilişkili ürünler dizisi.\n */\n readonly branches: readonly Branch[];\n}\n\n/**\n * Represents a request to re-synchronize an agent's insurance company connection with the insurance company's systems.\n * Triggers a fresh data synchronization to ensure consistency between systems.\n *\n * Bir acentenin sigorta şirketi bağlantısını sigorta şirketinin sistemleri ile yeniden senkronize etme talebini temsil eder.\n * Sistemler arasında tutarlılığı sağlamak için yeni bir veri senkronizasyonu tetikler.\n */\nexport interface ReSyncAgentInsuranceCompanyWithInsuranceRequest {\n /**\n * The unique identifier of the agent-insurance company relationship to re-sync.\n *\n * Yeniden senkronize edilecek acente-sigorta şirketi ilişkisinin benzersiz tanımlayıcısı.\n */\n readonly agentInsuranceCompanyId: string;\n}\n\n// Response contracts\n\n/**\n * Represents the response containing the current agent's profile information and operational settings.\n * Returns comprehensive agent details including business information and system configurations.\n *\n * Geçerli acentenin profil bilgileri ve operasyonel ayarlarını içeren yanıtı temsil eder.\n * İş bilgileri ve sistem yapılandırmaları dahil olmak üzere kapsamlı acente detaylarını döndürür.\n */\nexport interface GetCurrentAgentResult {\n /**\n * The name of the agent.\n *\n * Acentenin adı.\n */\n readonly name: string;\n\n /**\n * The plate number of the agent's registered vehicle (if applicable).\n *\n * Acentenin kayıtlı aracının plaka numarası (varsa).\n */\n readonly plateNo: string | null;\n\n /**\n * The tax number of the agent for business and regulatory purposes.\n *\n * İş ve düzenleyici amaçlar için acentenin vergi numarası.\n */\n readonly taxNumber: string;\n\n /**\n * The contact phone number information for the agent.\n *\n * Acente için iletişim telefon numarası bilgileri.\n */\n readonly phoneNumber: PhoneNumber | null;\n\n /**\n * The email address of the agent for business communications and notifications.\n *\n * Acentenin iş iletişimleri ve bildirimler için email adresi.\n */\n readonly email: string | null;\n\n /**\n * The automation mode for the agent's operations.\n *\n * Acentenin operasyonları için otomasyon modu.\n */\n readonly robotMode: RobotMode;\n\n /**\n * The call center integration configuration for the agent.\n *\n * Acente için çağrı merkezi entegrasyon yapılandırması.\n */\n readonly callCenterOptions: CallCenterAgentOptions | null;\n\n /**\n * The SMS service integration configuration for the agent.\n *\n * Acente için SMS hizmet entegrasyon yapılandırması.\n */\n readonly smsOptions: SmsAgentOptions | null;\n\n /**\n * The case representative assignment mode for automatic case distribution.\n *\n * Otomatik case dağıtımı için case atama modu.\n */\n readonly caseRepresentativeAssignmentMode: CaseRepresentativeAssignmentMode | null;\n\n /**\n * The list of allowed role names for case representative assignment.\n *\n * Case ataması için izin verilen rol adlarının listesi.\n */\n readonly caseRepresentativeAssignmentAllowedRoles: readonly string[];\n\n /**\n * Case priority rule definitions configured for the agent. Empty means no rules.\n */\n readonly casePriorityRuleDefinitions: readonly CasePriorityRuleDefinition[];\n}\n\n/**\n * Represents a single insurance company connection item for an agent in the insurance companies list response.\n * Contains comprehensive information about the agent's relationship with an insurance company.\n *\n * Sigorta şirketleri liste yanıtında bir acente için tek bir sigorta şirketi bağlantı öğesini temsil eder.\n * Acentenin bir sigorta şirketi ile ilişkisi hakkında kapsamlı bilgiler içerir.\n */\nexport interface GetMyAgentInsuranceCompaniesResult {\n /**\n * The unique identifier of the agent-insurance company relationship.\n *\n * Acente-sigorta şirketi ilişkisinin benzersiz tanımlayıcısı.\n */\n readonly id: string;\n\n /**\n * The identifier of the insurance company.\n *\n * Sigorta şirketinin tanımlayıcısı.\n */\n readonly insuranceCompanyId: number;\n\n /**\n * The name of the insurance company.\n *\n * Sigorta şirketinin adı.\n */\n readonly insuranceCompanyName: string;\n\n /**\n * Array of product branches that the agent is authorized to sell from this insurance company.\n *\n * Acentenin bu sigorta şirketinden satma yetkisine sahip olduğu ürün dalları dizisi.\n */\n readonly productBranches: readonly ProductBranch[];\n\n /**\n * The current synchronization status with the insurance company's systems.\n *\n * Sigorta şirketinin sistemleri ile mevcut senkronizasyon durumu.\n */\n readonly insuranceSyncState: InsuranceSyncState;\n\n /**\n * The type of business relationship between the agent and insurance company.\n *\n * Acente ile sigorta şirketi arasındaki iş ilişkisinin türü.\n */\n readonly type: AgentInsuranceCompanyType;\n\n /**\n * The connection configuration fields for integrating with the insurance company's systems.\n *\n * Sigorta şirketinin sistemleri ile entegrasyon için bağlantı yapılandırma alanları.\n */\n readonly connectionFields: Record<string, string>;\n\n /**\n * The permissions for this agent role.\n *\n * Bu rol için kesinleşmiş izinler dizisi. Permissions parametresi null ise,\n * bu özellik boş bir dizi döndürür ve sistem genelinde izin atamalarının\n * tutarlı şekilde işlenmesini sağlar.\n */\n readonly permissions: readonly string[];\n}\n\n/**\n * Represents the response containing product branch information for an agent's insurance company connection.\n * Returns the authorized product categories and specific products that the agent can sell.\n *\n * Bir acentenin sigorta şirketi bağlantısı için ürün dalı bilgilerini içeren yanıtı temsil eder.\n * Acentenin satabileceği yetkili ürün kategorilerini ve belirli ürünlerini döndürür.\n */\nexport interface GetAgentInsuranceCompanyBranchesResult {\n /**\n * The insurance product branch category that the agent is authorized to sell.\n *\n * Acentenin satma yetkisine sahip olduğu sigorta ürün dalı kategorisi.\n */\n readonly productBranch: ProductBranch;\n\n /**\n * Array of specific product identifiers within the branch that the agent can sell.\n *\n * Acentenin satabileceği dal içindeki belirli ürün tanımlayıcıları dizisi.\n */\n readonly productIds: number[];\n}\n\n/**\n * Represents the response containing connection configuration for an agent's insurance company integration.\n * Returns the technical connection parameters and credentials used for system integration.\n *\n * Bir acentenin sigorta şirketi entegrasyonu için bağlantı yapılandırmasını içeren yanıtı temsil eder.\n * Sistem entegrasyonu için kullanılan teknik bağlantı parametrelerini ve kimlik bilgilerini döndürür.\n */\nexport interface GetAgentInsuranceCompanyConnectionResult {\n /**\n * The connection configuration fields for integrating with the insurance company's systems.\n *\n * Sigorta şirketinin sistemleri ile entegrasyon için bağlantı yapılandırma alanları.\n */\n readonly connectionFields: Record<string, string>;\n}\n\n// Agent Role Contracts\n\n/**\n * Represents a request to create a new role within an agent organization with specific permissions.\n * This defines a custom role that can be assigned to agent users for access control.\n *\n * Belirli izinlerle acente organizasyonu içinde yeni bir rol oluşturma isteğini temsil eder.\n * Bu, erişim kontrolü için acente kullanıcılarına atanabilecek özel bir rol tanımlar.\n */\nexport interface CreateAgentRoleRequest {\n /**\n * The name of the role to be created within the agent organization.\n * This name should be descriptive and unique within the organization to help\n * administrators identify the role's purpose. Role names are used in user\n * management interfaces and role assignment operations.\n *\n * Acente organizasyonu içinde oluşturulacak rolün adı. Bu ad açıklayıcı\n * ve organizasyon içinde benzersiz olmalıdır, böylece yöneticilerin rolün\n * amacını belirlemesine yardımcı olur. Rol adları kullanıcı yönetimi\n * arayüzlerinde ve rol atama operasyonlarında kullanılır.\n */\n readonly roleName: string;\n\n /**\n * The finalized array of permissions for this role. If the Permissions parameter\n * was null, this property returns an empty array, ensuring consistent handling\n * of permission assignments throughout the system.\n *\n * Bu rol için kesinleşmiş izinler dizisi. Permissions parametresi null ise,\n * bu özellik boş bir dizi döndürür ve sistem genelinde izin atamalarının\n * tutarlı şekilde işlenmesini sağlar.\n */\n readonly permissions: string[];\n}\n\n/**\n * Represents a request to update an existing agent role's permissions, access levels, or configuration settings.\n * This modifies role details and affects all users assigned to this role.\n *\n * Mevcut bir acente rolünün izinlerini, erişim seviyelerini veya yapılandırma ayarlarını güncelleme isteğini temsil eder.\n * Bu, rol detaylarını değiştirir ve bu role atanan tüm kullanıcıları etkiler.\n */\nexport interface UpdateAgentRoleRequest {\n /**\n * The unique identifier of the agent role that should be updated.\n * This ID is used to locate the specific role within the agent organization\n * and apply the requested changes to its configuration and permissions.\n *\n * Güncellenmesi gereken acente rolünün benzersiz tanımlayıcısı.\n * Bu ID, acente organizasyonu içindeki belirli rolü bulmak ve\n * konfigürasyonuna ve izinlerine istenen değişiklikleri uygulamak için kullanılır.\n */\n readonly id: string;\n\n /**\n * The new name to be assigned to the agent role. This name should be\n * descriptive and unique within the organization to help administrators\n * identify the role's purpose and distinguish it from other roles.\n *\n * Acente rolüne atanacak yeni ad. Bu ad açıklayıcı ve organizasyon\n * içinde benzersiz olmalıdır, böylece yöneticilerin rolün amacını\n * belirlemesine ve diğer rollerden ayırt etmesine yardımcı olur.\n */\n readonly name: string;\n\n /**\n * The updated array of permission identifiers that define what actions users with this role\n * can perform. This completely replaces the role's current permissions. If null or empty,\n * the role will have minimal default permissions. Changes affect all users assigned to this role.\n *\n * Bu role sahip kullanıcıların hangi eylemleri gerçekleştirebileceğini tanımlayan güncellenmiş\n * izin tanımlayıcıları dizisi. Bu, rolün mevcut izinlerini tamamen değiştirir. Null veya boş ise,\n * rol minimal varsayılan izinlere sahip olacaktır. Değişiklikler bu role atanan tüm kullanıcıları etkiler.\n */\n readonly permissions: string[] | null;\n}\n\n/**\n * Represents a request to permanently delete an agent role from the organization.\n * This removes the role and affects all users who were assigned to this role.\n *\n * Acente rolünü organizasyondan kalıcı olarak silme isteğini temsil eder.\n * Bu, rolü kaldırır ve bu role atanan tüm kullanıcıları etkiler.\n */\nexport interface DeleteAgentRoleRequest {\n /**\n * The unique identifier of the agent role that should be permanently deleted.\n * This ID is used to locate the specific role within the agent organization\n * and remove it from the system along with all its associated permissions and user assignments.\n *\n * Kalıcı olarak silinmesi gereken acente rolünün benzersiz tanımlayıcısı.\n * Bu ID, acente organizasyonu içindeki belirli rolü bulmak ve\n * ilişkili tüm izinleri ve kullanıcı atamalarıyla birlikte sistemden kaldırmak için kullanılır.\n */\n readonly id: string;\n}\n\n/**\n * Represents detailed information about a specific agent role retrieved by its unique identifier.\n * This provides comprehensive role configuration and permission details.\n *\n * Benzersiz tanımlayıcısı ile alınan belirli bir acente rolü hakkında detaylı bilgileri temsil eder.\n * Bu, kapsamlı rol konfigürasyonu ve izin detaylarını sağlar.\n */\nexport interface GetAgentRoleByIdResult {\n /**\n * The unique identifier for this agent role within the organization.\n * This ID serves as the primary reference for all role-related operations\n * and is used across the platform for role identification and management.\n *\n * Bu acente rolünün organizasyon içindeki benzersiz tanımlayıcısı.\n * Bu ID, tüm rolle ilgili operasyonlar için birincil referans olarak\n * hizmet verir ve platform genelinde rol tanımlaması ve yönetimi için kullanılır.\n */\n readonly id: string;\n\n /**\n * The human-readable name that identifies this role within the agent organization.\n * This name represents the role's purpose and responsibilities and is used throughout\n * the system for role identification and user assignment operations.\n *\n * Bu rolü acente organizasyonu içinde tanımlayan insan tarafından okunabilir ad.\n * Bu ad rolün amacını ve sorumluluklarını temsil eder ve sistem genelinde\n * rol tanımlaması ve kullanıcı atama operasyonları için kullanılır.\n */\n readonly name: string;\n\n /**\n * Complete collection of permission identifiers that define what actions users with this role\n * can perform within the system. These permissions control access to specific features,\n * data operations, and administrative functions across the agent organization.\n *\n * Bu role sahip kullanıcıların sistem içinde hangi eylemleri gerçekleştirebileceğini\n * tanımlayan izin tanımlayıcılarının tam koleksiyonu. Bu izinler acente organizasyonu\n * genelinde belirli özelliklere, veri operasyonlarına ve yönetici fonksiyonlarına erişimi kontrol eder.\n */\n readonly permissions: string[];\n\n /**\n * The timestamp when this agent role was initially created. This information\n * is useful for auditing purposes and understanding the evolution of the\n * organization's role structure over time.\n *\n * Bu acente rolünün ilk olarak oluşturulduğu zaman damgası. Bu bilgi\n * denetim amaçları ve organizasyonun rol yapısının zaman içindeki gelişimini\n * anlamak için yararlıdır.\n */\n readonly createdAt: string;\n\n /**\n * The timestamp when this agent role was last modified. Null if the role\n * has never been updated since creation. This helps track recent changes\n * and maintenance activities on the role configuration.\n *\n * Bu acente rolünün son değiştirildiği zaman damgası. Rol oluşturulduktan\n * sonra hiç güncellenmemişse null. Bu, rol konfigürasyonundaki son değişiklikleri\n * ve bakım faaliyetlerini takip etmeye yardımcı olur.\n */\n readonly updatedAt: string | null;\n\n /**\n * The unique identifier of the user who originally created this agent role.\n * This information is important for audit trails and understanding who\n * established the role within the organization.\n *\n * Bu acente rolünü orijinal olarak oluşturan kullanıcının benzersiz tanımlayıcısı.\n * Bu bilgi denetim izleri ve organizasyon içinde rolü kimin kurduğunu anlamak için önemlidir.\n */\n readonly createdById: string;\n\n /**\n * The unique identifier of the user who last modified this agent role.\n * Null if the role has never been updated since creation. This helps identify\n * who made recent changes to the role configuration.\n *\n * Bu acente rolünü son değiştiren kullanıcının benzersiz tanımlayıcısı.\n * Rol oluşturulduktan sonra hiç güncellenmemişse null. Bu, rol konfigürasyonunda\n * son değişiklikleri kimin yaptığını belirlemeye yardımcı olur.\n */\n readonly updatedById: string | null;\n\n /**\n * The display name of the user who originally created this agent role.\n * This provides a human-readable reference to the role creator for\n * administrative interfaces and audit reports.\n *\n * Bu acente rolünü orijinal olarak oluşturan kullanıcının görüntü adı.\n * Bu, yönetici arayüzleri ve denetim raporları için rol oluşturucusuna\n * insan tarafından okunabilir referans sağlar.\n */\n readonly createdByName: string;\n\n /**\n * The display name of the user who last modified this agent role.\n * Null if the role has never been updated since creation. This provides\n * a human-readable reference to the last modifier for administrative tracking.\n *\n * Bu acente rolünü son değiştiren kullanıcının görüntü adı. Rol oluşturulduktan\n * sonra hiç güncellenmemişse null. Bu, yönetici takibi için son değiştirici için\n * insan tarafından okunabilir referans sağlar.\n */\n readonly updatedByName: string | null;\n}\n\n/**\n * Represents response data for an agent role in a list of all roles within the organization.\n * This provides essential role information for administrative overview and management.\n *\n * Organizasyon içindeki tüm rollerin listesinde bir acente rolü için yanıt verilerini temsil eder.\n * Bu, yönetici görünümü ve yönetimi için temel rol bilgilerini sağlar.\n */\nexport interface GetAllAgentRolesResult {\n /**\n * The unique identifier for this agent role within the organization.\n * This ID serves as the primary reference for role management operations,\n * user assignments, and permission configurations.\n *\n * Bu acente rolünün organizasyon içindeki benzersiz tanımlayıcısı.\n * Bu ID, rol yönetimi operasyonları, kullanıcı atamaları ve izin\n * konfigürasyonları için birincil referans olarak hizmet verir.\n */\n readonly id: string;\n\n /**\n * The human-readable name that identifies this role within the agent organization.\n * This name should be descriptive and help administrators understand the role's\n * purpose and scope of responsibilities.\n *\n * Bu rolü acente organizasyonu içinde tanımlayan insan tarafından okunabilir ad.\n * Bu ad açıklayıcı olmalı ve yöneticilerin rolün amacını ve sorumluluk kapsamını\n * anlamalarına yardımcı olmalıdır.\n */\n readonly name: string;\n\n /**\n * Collection of permission identifiers that define what actions users with this role\n * can perform within the system. These permissions control access to specific features,\n * data operations, and administrative functions across the agent organization.\n *\n * Bu role sahip kullanıcıların sistem içinde hangi eylemleri gerçekleştirebileceğini\n * tanımlayan izin tanımlayıcıları koleksiyonu. Bu izinler acente organizasyonu genelinde\n * belirli özelliklere, veri operasyonlarına ve yönetici fonksiyonlarına erişimi kontrol eder.\n */\n readonly permissions: string[];\n\n /**\n * The timestamp when this agent role was initially created. This information\n * is useful for auditing purposes and understanding the evolution of the\n * organization's role structure over time.\n *\n * Bu acente rolünün ilk olarak oluşturulduğu zaman damgası. Bu bilgi\n * denetim amaçları ve organizasyonun rol yapısının zaman içindeki gelişimini\n * anlamak için yararlıdır.\n */\n readonly createdAt: string;\n\n /**\n * The timestamp when this agent role was last modified. Null if the role\n * has never been updated since creation. This helps track recent changes\n * and maintenance activities on the role configuration.\n *\n * Bu acente rolünün son değiştirildiği zaman damgası. Rol oluşturulduktan\n * sonra hiç güncellenmemişse null. Bu, rol konfigürasyonundaki son değişiklikleri\n * ve bakım faaliyetlerini takip etmeye yardımcı olur.\n */\n readonly updatedAt: string | null;\n\n /**\n * The unique identifier of the user who originally created this agent role.\n * This information is important for audit trails and understanding who\n * established the role within the organization.\n *\n * Bu acente rolünü orijinal olarak oluşturan kullanıcının benzersiz tanımlayıcısı.\n * Bu bilgi denetim izleri ve organizasyon içinde rolü kimin kurduğunu anlamak için önemlidir.\n */\n readonly createdById: string;\n\n /**\n * The unique identifier of the user who last modified this agent role.\n * Null if the role has never been updated since creation. This helps identify\n * who made recent changes to the role configuration.\n *\n * Bu acente rolünü son değiştiren kullanıcının benzersiz tanımlayıcısı.\n * Rol oluşturulduktan sonra hiç güncellenmemişse null. Bu, rol konfigürasyonunda\n * son değişiklikleri kimin yaptığını belirlemeye yardımcı olur.\n */\n readonly updatedById: string | null;\n\n /**\n * The display name of the user who originally created this agent role.\n * This provides a human-readable reference to the role creator for\n * administrative interfaces and audit reports.\n *\n * Bu acente rolünü orijinal olarak oluşturan kullanıcının görüntü adı.\n * Bu, yönetici arayüzleri ve denetim raporları için rol oluşturucusuna\n * insan tarafından okunabilir referans sağlar.\n */\n readonly createdByName: string;\n\n /**\n * The display name of the user who last modified this agent role.\n * Null if the role has never been updated since creation. This provides\n * a human-readable reference to the last modifier for administrative tracking.\n *\n * Bu acente rolünü son değiştiren kullanıcının görüntü adı. Rol oluşturulduktan\n * sonra hiç güncellenmemişse null. Bu, yönetici takibi için son değiştirici için\n * insan tarafından okunabilir referans sağlar.\n */\n readonly updatedByName: string | null;\n}\n\n// Agent Setup Contracts\n\n/**\n * Represents a request to enter an agent setup process using a provided access code.\n * This validates the code and initiates the agent registration workflow.\n *\n * Sağlanan erişim kodu kullanarak acente kurulum sürecine girme isteğini temsil eder.\n * Bu, kodu doğrular ve acente kayıt iş akışını başlatır.\n */\nexport interface EnterAgentSetupRequestRequest {\n /**\n * The unique access code associated with an agent setup request. This code is generated\n * when an administrator creates a setup request and is shared with prospective agents to\n * begin their registration process. The code must be valid and not expired for access to be granted.\n *\n * Bir acente kurulum talebi ile ilişkili benzersiz erişim kodu. Bu kod, bir yönetici\n * kurulum talebi oluşturduğunda üretilir ve kayıt süreçlerini başlatmaları için potansiyel\n * acentelerle paylaşılır. Erişim verilmesi için kodun geçerli ve süresi dolmamış olması gerekir.\n */\n readonly code: string;\n}\n\n/**\n * Represents the response when successfully entering an agent setup request process.\n * Contains the human-readable label associated with the validated setup request.\n *\n * Acente kurulum talebi sürecine başarıyla girildiğinde verilen yanıtı temsil eder.\n * Doğrulanan kurulum talebi ile ilişkili insan tarafından okunabilir etiketi içerir.\n */\nexport interface EnterAgentSetupRequestResult {\n /**\n * The descriptive label associated with the validated agent setup request.\n * This label was originally set when the setup request was created by an administrator\n * and helps identify the specific onboarding process or campaign that the agent is entering.\n *\n * Doğrulanan acente kurulum talebi ile ilişkili açıklayıcı etiket.\n * Bu etiket orijinal olarak bir yönetici tarafından kurulum talebi oluşturulduğunda\n * ayarlanmıştır ve acentenin girdiği belirli onboarding sürecini veya kampanyayı\n * tanımlamaya yardımcı olur.\n */\n readonly label: string;\n}\n\n/**\n * Represents a request to complete an agent setup process with comprehensive agent and user information.\n * This finalizes the agent onboarding workflow by creating both the agent entity and associated user account.\n *\n * Kapsamlı acente ve kullanıcı bilgileri ile acente kurulum sürecini tamamlama isteğini temsil eder.\n * Bu, hem acente varlığını hem de ilişkili kullanıcı hesabını oluşturarak acente onboarding iş akışını sonlandırır.\n */\nexport interface CompleteAgentSetupRequestRequest {\n /**\n * The unique access code that was generated when the agent setup request was created.\n * This code validates that the completion request corresponds to a valid, active setup process.\n * Must match an existing, non-expired setup request for successful completion.\n *\n * Acente kurulum talebi oluşturulduğunda üretilen benzersiz erişim kodu.\n * Bu kod, tamamlama talebinin geçerli, aktif bir kurulum sürecine karşılık geldiğini doğrular.\n * Başarılı tamamlama için mevcut, süresi dolmamış bir kurulum talebiyle eşleşmelidir.\n */\n readonly code: string;\n\n /**\n * Complete agent profile including business information, insurance company connections,\n * and product branch assignments. This defines the agent's operational capabilities\n * and system permissions within InsurUp's platform.\n *\n * İş bilgileri, sigorta şirketi bağlantıları ve ürün dalı atamalarını içeren\n * tam acente profili. Bu, acentenin InsurUp platformu içindeki operasyonel yeteneklerini\n * ve sistem yetkilerini tanımlar.\n */\n readonly agent: Agent;\n\n /**\n * Primary user account details for the agent's main administrative user.\n * This user will have full access to the agent's operations and serve as the\n * primary contact for system communications and management activities.\n *\n * Acentenin ana yönetici kullanıcısı için birincil kullanıcı hesabı detayları.\n * Bu kullanıcı acentenin operasyonlarına tam erişime sahip olacak ve sistem\n * iletişimleri ile yönetim faaliyetleri için birincil iletişim noktası olarak hizmet verecek.\n */\n readonly agentUser: AgentUser;\n}\n\n// Agent User Contracts\n\n/**\n * Represents a request to invite a new user to join an agent organization.\n * This initiates the user invitation workflow with role assignments and creates a pending user account.\n *\n * Acente organizasyonuna katılması için yeni bir kullanıcıyı davet etme isteğini temsil eder.\n * Bu, rol atamaları ile kullanıcı davet iş akışını başlatır ve beklemedeki kullanıcı hesabı oluşturur.\n */\nexport interface InviteAgentUserRequest {\n /**\n * The email address of the person being invited to join the agent organization.\n * This address will receive the invitation email and will serve as the primary\n * identifier for the user account. Must be unique within the system and will be\n * used for authentication and account management purposes.\n *\n * Acente organizasyonuna katılmaya davet edilen kişinin e-posta adresi.\n * Bu adres davet e-postasını alacak ve kullanıcı hesabı için birincil tanımlayıcı\n * olarak hizmet verecektir. Sistem içinde benzersiz olmalı ve kimlik doğrulama\n * ve hesap yönetimi amaçları için kullanılacaktır.\n */\n readonly email: string;\n\n /**\n * The first name of the person being invited to join the agent organization.\n * This information is used for personalization in invitation emails and will be\n * part of the user's profile once they accept the invitation and join the organization.\n *\n * Acente organizasyonuna katılmaya davet edilen kişinin adı.\n * Bu bilgi davet e-postalarında kişiselleştirme için kullanılır ve daveti kabul\n * edip organizasyona katıldıklarında kullanıcının profilinin bir parçası olacaktır.\n */\n readonly firstName: string;\n\n /**\n * The last name (surname) of the person being invited to join the agent organization.\n * Combined with the first name, this provides complete identification for the invited user\n * and is used in communication and user management within the organization.\n *\n * Acente organizasyonuna katılmaya davet edilen kişinin soyadı.\n * Ad ile birleştirildiğinde, davet edilen kullanıcı için tam kimlik sağlar ve\n * organizasyon içinde iletişim ve kullanıcı yönetiminde kullanılır.\n */\n readonly lastName: string;\n\n /**\n * Collection of role names that will be assigned to the user once they accept the invitation.\n * These roles determine the user's permissions and access levels within the agent organization.\n * Roles control what operations the user can perform and which parts of the system they can access.\n * An empty array means the user will have minimal default permissions.\n *\n * Kullanıcının daveti kabul etmesi durumunda atanacak rol adlarının koleksiyonu.\n * Bu roller, kullanıcının acente organizasyonu içindeki izinlerini ve erişim seviyelerini belirler.\n * Roller kullanıcının hangi operasyonları gerçekleştirebileceğini ve sistemin hangi bölümlerine\n * erişebileceğini kontrol eder. Boş dizi, kullanıcının minimal varsayılan izinlere sahip olacağı anlamına gelir.\n */\n readonly roles: string[];\n}\n\n/**\n * Represents a request to accept an agent user invitation and complete the registration process.\n * This activates a pending user account and sets the initial password.\n *\n * Acente kullanıcı davetini kabul etme ve kayıt sürecini tamamlama isteğini temsil eder.\n * Bu, beklemedeki kullanıcı hesabını aktifleştirir ve başlangıç şifresini ayarlar.\n */\nexport interface AcceptAgentUserInviteRequest {\n /**\n * The unique invitation code that was sent to the user's email when they were\n * invited to join the agent organization. This code validates the invitation\n * and ensures that only the intended recipient can accept the invitation and\n * create their account.\n *\n * Kullanıcının acente organizasyonuna katılmaya davet edildiğinde e-postasına\n * gönderilen benzersiz davet kodu. Bu kod daveti doğrular ve yalnızca hedeflenen\n * alıcının daveti kabul edebilmesini ve hesabını oluşturabilmesini sağlar.\n */\n readonly code: string;\n\n /**\n * The password that will be set for the new agent user account. This password\n * should meet the system's security requirements and will be used for future\n * authentication. The user should be encouraged to change this password after\n * their first login for enhanced security.\n *\n * Yeni acente kullanıcı hesabı için ayarlanacak şifre. Bu şifre sistemin\n * güvenlik gereksinimlerini karşılamalı ve gelecekteki kimlik doğrulamaları için\n * kullanılacaktır. Gelişmiş güvenlik için kullanıcının ilk girişinden sonra\n * bu şifreyi değiştirmesi teşvik edilmelidir.\n */\n readonly password: string;\n}\n\n/**\n * Represents a request for an agent user to update their own profile information.\n * This allows users to modify their personal details without administrative intervention.\n *\n * Acente kullanıcısının kendi profil bilgilerini güncelleme isteğini temsil eder.\n * Bu, kullanıcıların yönetici müdahalesi olmadan kişisel detaylarını değiştirmelerine olanak tanır.\n */\nexport interface UpdateMyAgentUserRequest {\n /**\n * The new first name that the user wants to set for their profile.\n * This information is used for identification and personalization throughout\n * the system and will be displayed in user interfaces and communications.\n *\n * Kullanıcının profili için ayarlamak istediği yeni ad. Bu bilgi sistem\n * genelinde kimlik belirleme ve kişiselleştirme için kullanılır ve kullanıcı\n * arayüzleri ile iletişimlerde görüntülenecektir.\n */\n readonly firstName: string;\n\n /**\n * The new last name (surname) that the user wants to set for their profile.\n * Combined with the first name, this provides complete updated identification\n * for the user within the agent organization and system communications.\n *\n * Kullanıcının profili için ayarlamak istediği yeni soyad. Ad ile birleştirildiğinde,\n * acente organizasyonu ve sistem iletişimleri içinde kullanıcı için tam güncellenmiş\n * kimlik sağlar.\n */\n readonly lastName: string;\n}\n\n/**\n * Represents a request to update an existing agent user's profile information and security settings.\n * This modifies user details, role assignments, and two-factor authentication configuration.\n *\n * Mevcut bir acente kullanıcısının profil bilgilerini ve güvenlik ayarlarını güncelleme isteğini temsil eder.\n * Bu, kullanıcı detaylarını, rol atamalarını ve iki faktörlü kimlik doğrulama konfigürasyonunu değiştirir.\n */\nexport interface UpdateAgentUserRequest {\n /**\n * The unique identifier of the agent user whose information should be updated.\n * This ID is used to locate the specific user account within the agent organization\n * and apply the requested changes to their profile and settings.\n *\n * Bilgileri güncellenmesi gereken acente kullanıcısının benzersiz tanımlayıcısı.\n * Bu ID, acente organizasyonu içindeki belirli kullanıcı hesabını bulmak ve\n * profiline ve ayarlarına istenen değişiklikleri uygulamak için kullanılır.\n */\n readonly id: string;\n\n /**\n * The new first name to be assigned to the agent user. This information\n * is used for identification and personalization throughout the system and\n * will be reflected in user interfaces and communications.\n *\n * Acente kullanıcısına atanacak yeni ad. Bu bilgi sistem genelinde\n * kimlik belirleme ve kişiselleştirme için kullanılır ve kullanıcı arayüzleri\n * ile iletişimlerde yansıtılacaktır.\n */\n readonly firstName: string;\n\n /**\n * The new last name (surname) to be assigned to the agent user.\n * Combined with the first name, this provides complete updated identification\n * for the user within the agent organization.\n *\n * Acente kullanıcısına atanacak yeni soyad. Ad ile birleştirildiğinde,\n * acente organizasyonu içinde kullanıcı için tam güncellenmiş kimlik sağlar.\n */\n readonly lastName: string;\n\n /**\n * The complete set of roles to be assigned to the agent user after the update.\n * This replaces the user's current role assignments and determines their new\n * permissions and access levels within the agent organization. All existing roles\n * are removed and replaced with the roles specified in this array.\n *\n * Güncelleme sonrasında acente kullanıcısına atanacak tam rol seti.\n * Bu, kullanıcının mevcut rol atamalarını değiştirir ve acente organizasyonu\n * içindeki yeni izinlerini ve erişim seviyelerini belirler. Mevcut tüm roller\n * kaldırılır ve bu dizide belirtilen rollerle değiştirilir.\n */\n readonly roles: string[];\n\n /**\n * Specifies whether two-factor authentication (2FA) should be enabled or disabled\n * for this agent user. When enabled, the user will be required to provide a second\n * form of authentication (such as a mobile app code) in addition to their password\n * when logging in, providing enhanced security for their account.\n *\n * Bu acente kullanıcısı için iki faktörlü kimlik doğrulamanın (2FA) etkinleştirilip\n * etkinleştirilmeyeceğini belirtir. Etkinleştirildiğinde, kullanıcının giriş yaparken\n * şifresine ek olarak ikinci bir kimlik doğrulama biçimi (mobil uygulama kodu gibi)\n * sağlaması gerekecek ve hesabı için gelişmiş güvenlik sağlayacaktır.\n */\n readonly twoFactorEnabled: boolean;\n}\n\n/**\n * Represents a request for an agent user to change their own password by providing their current password.\n * This enables users to update their authentication credentials securely.\n *\n * Acente kullanıcısının mevcut şifresini sağlayarak kendi şifresini değiştirme isteğini temsil eder.\n * Bu, kullanıcıların kimlik doğrulama bilgilerini güvenli bir şekilde güncellemelerini sağlar.\n */\nexport interface UpdateAgentUserPasswordRequest {\n /**\n * The user's current password that must be provided for verification before\n * the password can be changed. This security measure ensures that only the\n * authenticated user can modify their password and prevents unauthorized access.\n *\n * Şifre değiştirilebilmesi için doğrulama amacıyla sağlanması gereken kullanıcının\n * mevcut şifresi. Bu güvenlik önlemi, yalnızca kimliği doğrulanan kullanıcının\n * şifresini değiştirebilmesini sağlar ve yetkisiz erişimi önler.\n */\n readonly currentPassword: string;\n\n /**\n * The new password that will replace the user's current password. This password\n * should meet the system's security requirements including minimum length, complexity,\n * and character requirements. Once set, the user will use this password for\n * future authentication to their account.\n *\n * Kullanıcının mevcut şifresinin yerini alacak yeni şifre. Bu şifre, minimum\n * uzunluk, karmaşıklık ve karakter gereksinimleri dahil olmak üzere sistemin\n * güvenlik gereksinimlerini karşılamalıdır. Ayarlandıktan sonra kullanıcı,\n * hesabına gelecekteki kimlik doğrulamaları için bu şifreyi kullanacaktır.\n */\n readonly newPassword: string;\n}\n\n/**\n * Represents comprehensive information about a specific agent user retrieved from the system.\n * This response contains detailed user profile data, role assignments, and security settings.\n *\n * Sistemden alınan belirli bir acente kullanıcısı hakkında kapsamlı bilgileri temsil eder.\n * Bu yanıt detaylı kullanıcı profil verileri, rol atamaları ve güvenlik ayarlarını içerir.\n */\nexport interface GetAgentUserResult {\n /**\n * The unique identifier for this agent user within the system.\n * This ID serves as the primary reference for all user-related operations\n * and is used across the platform for user identification and management.\n *\n * Bu acente kullanıcısının sistem içindeki benzersiz tanımlayıcısı.\n * Bu ID, tüm kullanıcı ile ilgili operasyonlar için birincil referans olarak\n * hizmet verir ve platform genelinde kullanıcı tanımlaması ve yönetimi için kullanılır.\n */\n readonly id: string;\n\n /**\n * The first name of the agent user as stored in their profile.\n * This information is used for personalization and identification\n * throughout the system and in communications with the user.\n *\n * Acente kullanıcısının profilinde saklanan adı.\n * Bu bilgi sistem genelinde kişiselleştirme ve kimlik belirleme\n * ve kullanıcıyla iletişimlerde kullanılır.\n */\n readonly firstName: string;\n\n /**\n * The last name (surname) of the agent user as stored in their profile.\n * Combined with the first name, this provides complete identification\n * for the user within the agent organization.\n *\n * Acente kullanıcısının profilinde saklanan soyadı.\n * Ad ile birleştirildiğinde, acente organizasyonu içinde kullanıcı\n * için tam kimlik sağlar.\n */\n readonly lastName: string;\n\n /**\n * The email address associated with the agent user account.\n * This serves as the primary identifier for authentication and\n * is used for system communications and notifications.\n *\n * Acente kullanıcı hesabıyla ilişkili e-posta adresi.\n * Bu, kimlik doğrulama için birincil tanımlayıcı olarak hizmet verir\n * ve sistem iletişimleri ve bildirimleri için kullanılır.\n */\n readonly email: string;\n\n /**\n * Collection of role names that have been assigned to this agent user.\n * These roles determine the user's access levels and permissions within\n * the agent organization. Each role represents a set of capabilities\n * and responsibilities within the system.\n *\n * Bu acente kullanıcısına atanan rol adlarının koleksiyonu.\n * Bu roller, kullanıcının acente organizasyonu içindeki erişim seviyelerini\n * ve izinlerini belirler. Her rol, sistem içinde bir dizi yetenek ve\n * sorumluluğu temsil eder.\n */\n readonly roles: string[];\n\n /**\n * Collection of permission identifiers that this user has been granted\n * through their assigned roles. These permissions define what specific actions\n * and operations the user can perform within the agent organization's systems.\n *\n * Bu kullanıcının atanan rolleri aracılığıyla kendisine verilen izin\n * tanımlayıcıları koleksiyonu. Bu izinler, kullanıcının acente organizasyonunun\n * sistemleri içinde hangi belirli eylemleri ve operasyonları gerçekleştirebileceğini tanımlar.\n */\n readonly permissions: string[];\n\n /**\n * The name of the agent organization that this user is a member of.\n * This provides organizational context and helps identify which agent\n * business the user represents and works for.\n *\n * Bu kullanıcının üyesi olduğu acente organizasyonunun adı.\n * Bu, organizasyonel bağlam sağlar ve kullanıcının hangi acente işletmesini\n * temsil ettiğini ve için çalıştığını belirlemeye yardımcı olur.\n */\n readonly agentName: string;\n\n /**\n * Boolean flag indicating whether two-factor authentication (2FA) is\n * currently enabled for this agent user. When true, the user must provide\n * a second form of authentication in addition to their password when logging in.\n *\n * Bu acente kullanıcısı için iki faktörlü kimlik doğrulamanın (2FA) şu anda\n * etkin olup olmadığını gösteren boolean bayrağı. True olduğunda, kullanıcı\n * giriş yaparken şifresine ek olarak ikinci bir kimlik doğrulama biçimi sağlamalıdır.\n */\n readonly twoFactorEnabled: boolean;\n\n /**\n * The call center implementation configuration assigned to this agent user.\n * This determines which call center system or integration the user will use\n * for customer communications and support operations within their role.\n *\n * Bu acente kullanıcısına atanan çağrı merkezi uygulama konfigürasyonu.\n * Bu, kullanıcının rolü dahilinde müşteri iletişimleri ve destek operasyonları\n * için hangi çağrı merkezi sistemini veya entegrasyonunu kullanacağını belirler.\n */\n readonly callCenterImplementation: CallCenterImplementation;\n}\n\n/**\n * Represents the response containing the robot automation code for the current agent user.\n * This code is used for robotic process automation and API integrations.\n *\n * Mevcut acente kullanıcısı için robot otomasyon kodunu içeren yanıtı temsil eder.\n * Bu kod robotik süreç otomasyonu ve API entegrasyonları için kullanılır.\n */\nexport interface GetMyAgentUserRobotCodeResult {\n /**\n * The unique robot automation code assigned to the current agent user.\n * This code is used to identify and authenticate automated processes, API calls,\n * and robotic process automation workflows that operate on behalf of the user.\n * Essential for integration with external systems and automated business processes.\n *\n * Mevcut acente kullanıcısına atanan benzersiz robot otomasyon kodu.\n * Bu kod, kullanıcı adına çalışan otomatik süreçleri, API çağrılarını ve\n * robotik süreç otomasyonu iş akışlarını tanımlamak ve kimlik doğrulamak için kullanılır.\n * Harici sistemlerle entegrasyon ve otomatik iş süreçleri için gereklidir.\n */\n readonly robotCode: string;\n}\n\n// Agent Setup Models\n\n/**\n * Represents comprehensive agent business information and operational configuration.\n *\n * Kapsamlı acente iş bilgilerini ve operasyonel konfigürasyonu temsil eder.\n */\nexport interface Agent {\n /**\n * The official legal name under which the agent or agency operates.\n * This name is used for official documentation, contracts, and legal identification\n * within the insurance system. Must match official business registration records.\n *\n * Acentenin veya acenteliğin faaliyet gösterdiği resmi yasal adı.\n * Bu ad resmi belgeler, sözleşmeler ve sigorta sistemi içindeki yasal kimlik\n * için kullanılır. Resmi iş kayıt kayıtlarıyla eşleşmelidir.\n */\n readonly name: string;\n\n /**\n * License plate number of the company vehicle used by the agent for business operations.\n * This is optional and used for identification and tracking purposes when the agent\n * operates with a designated company vehicle for field work and client visits.\n *\n * Acentenin iş operasyonları için kullandığı şirket aracının plaka numarası.\n * Bu isteğe bağlıdır ve acente saha çalışması ve müşteri ziyaretleri için\n * belirlenmiş şirket aracı ile çalıştığında kimlik ve takip amaçları için kullanılır.\n */\n readonly plateNo: string | null;\n\n /**\n * Official tax identification number required for legal compliance and financial reporting.\n * This number is essential for tax obligations, official documentation, and regulatory\n * compliance within Turkey's business and insurance regulatory framework.\n *\n * Yasal uyumluluk ve mali raporlama için gerekli resmi vergi kimlik numarası.\n * Bu numara vergi yükümlülükleri, resmi belgeler ve Türkiye'nin iş ve sigorta\n * düzenleyici çerçevesi içindeki mevzuat uyumluluğu için gereklidir.\n */\n readonly taxNumber: string;\n\n /**\n * Primary contact phone number for business communications with the agent.\n * This number is used for customer service, technical support, and official\n * communications from InsurUp and partner insurance companies.\n *\n * Acente ile iş iletişimi için birincil iletişim telefonu numarası.\n * Bu numara müşteri hizmetleri, teknik destek ve InsurUp ile partner\n * sigorta şirketlerinden resmi iletişimler için kullanılır.\n */\n readonly phoneNumber: PhoneNumber | null;\n\n /**\n * Array of insurance company relationships and technical integrations for the agent.\n * Each connection defines which insurance company the agent works with, the type of\n * relationship, connection credentials, and specific product branches they can offer.\n *\n * Acente için sigorta şirketi ilişkileri ve teknik entegrasyonların dizisi.\n * Her bağlantı acentenin hangi sigorta şirketi ile çalıştığını, ilişki türünü,\n * bağlantı kimlik bilgilerini ve sunabilecekleri belirli ürün dallarını tanımlar.\n */\n readonly companies: Company[];\n\n /**\n * Defines the level of automated processing and robotic process automation (RPA)\n * capabilities enabled for this agent. This determines which automated workflows\n * and AI-assisted processes the agent can utilize for improved efficiency.\n *\n * Bu acente için etkinleştirilen otomatik işlem seviyesini ve robotik süreç\n * otomasyonu (RPA) yeteneklerini tanımlar. Bu, acentenin geliştirilmiş verimlilik\n * için hangi otomatik iş akışlarını ve AI destekli süreçleri kullanabileceğini belirler.\n */\n readonly robotMode: RobotMode;\n}\n\n/**\n * Defines a specific relationship between the agent and an insurance company,\n * including integration credentials, product branch permissions, and technical\n * connection parameters required for automated policy processing.\n *\n * Acente ile sigorta şirketi arasındaki belirli ilişkiyi, entegrasyon kimlik\n * bilgilerini, ürün dalı izinlerini ve otomatik poliçe işleme için gerekli\n * teknik bağlantı parametrelerini tanımlar.\n */\nexport interface Company {\n /**\n * Defines the nature of the business relationship between the agent and insurance company.\n * This determines the agent's authority level, commission structure, and operational\n * permissions within the specific insurance company's systems and processes.\n *\n * Acente ile sigorta şirketi arasındaki iş ilişkisinin doğasını tanımlar.\n * Bu, acentenin yetki seviyesini, komisyon yapısını ve belirli sigorta şirketinin\n * sistemleri ve süreçleri içindeki operasyonel izinlerini belirler.\n */\n readonly type: AgentInsuranceCompanyType;\n\n /**\n * The unique system identifier for the insurance company that the agent will\n * be connected to. This ID references the insurance company's profile and\n * integration configuration within InsurUp's platform.\n *\n * Acentenin bağlanacağı sigorta şirketinin benzersiz sistem tanımlayıcısı.\n * Bu ID, sigorta şirketinin InsurUp platformu içindeki profilini ve\n * entegrasyon konfigürasyonunu referans alır.\n */\n readonly insuranceCompanyId: number;\n\n /**\n * Dictionary of technical parameters and credentials required for establishing\n * automated integration with the insurance company's systems. These fields typically\n * include API keys, authentication tokens, endpoint URLs, and other connection-specific\n * configuration required for automated policy processing and data exchange.\n *\n * Sigorta şirketinin sistemleri ile otomatik entegrasyon kurmak için gerekli\n * teknik parametreler ve kimlik bilgileri sözlüğü. Bu alanlar genellikle API anahtarları,\n * kimlik doğrulama tokenları, endpoint URL'leri ve otomatik poliçe işleme ve\n * veri alışverişi için gerekli diğer bağlantıya özgü konfigürasyonları içerir.\n */\n readonly connectionFields: Record<string, string>;\n\n /**\n * Array of insurance product branches and specific products that the agent is\n * authorized to sell from this insurance company. Each branch defines a category\n * of insurance products (like auto, health, property) and the specific product\n * variants within that category that the agent can offer to customers.\n *\n * Acentenin bu sigorta şirketinden satma yetkisine sahip olduğu sigorta ürün\n * dalları ve belirli ürünlerin dizisi. Her dal bir sigorta ürün kategorisini\n * (otomobil, sağlık, emlak gibi) ve o kategori içinde acentenin müşterilere\n * sunabileceği belirli ürün varyantlarını tanımlar.\n */\n readonly branches: Branch[];\n}\n\n/**\n * Defines the primary user account that will be created for the agent's main administrative user.\n * This account serves as the primary access point for the agent to manage their operations,\n * view reports, process policies, and interact with InsurUp's platform features.\n *\n * Acentenin ana yönetici kullanıcısı için oluşturulacak birincil kullanıcı hesabını tanımlar.\n * Bu hesap, acentenin operasyonlarını yönetmesi, raporları görüntülemesi, poliçeleri işlemesi\n * ve InsurUp platform özelliklerini kullanması için birincil erişim noktası olarak hizmet verir.\n */\nexport interface AgentUser {\n /**\n * The first name of the person who will serve as the primary agent user.\n * This information is used for personalization, communication, and identification\n * purposes within the system and in correspondence with customers and partners.\n *\n * Birincil acente kullanıcısı olarak hizmet verecek kişinin adı.\n * Bu bilgi sistem içinde ve müşteriler ve partnerlerle yazışmalarda\n * kişiselleştirme, iletişim ve kimlik belirleme amaçları için kullanılır.\n */\n readonly firstName: string;\n\n /**\n * The last name (surname) of the person who will serve as the primary agent user.\n * Combined with the first name, this provides complete identification for the user\n * and is used in official communications and system records.\n *\n * Birincil acente kullanıcısı olarak hizmet verecek kişinin soyadı.\n * Ad ile birleştirildiğinde, kullanıcı için tam kimlik sağlar ve\n * resmi iletişimlerde ve sistem kayıtlarında kullanılır.\n */\n readonly lastName: string;\n\n /**\n * The email address that will be used for account authentication, system notifications,\n * and official communications. This serves as the primary identifier for login purposes\n * and must be unique within the system. All important system communications will be sent to this address.\n *\n * Hesap kimlik doğrulaması, sistem bildirimleri ve resmi iletişimler için kullanılacak\n * e-posta adresi. Bu, giriş amaçları için birincil tanımlayıcı olarak hizmet verir ve\n * sistem içinde benzersiz olmalıdır. Tüm önemli sistem iletişimleri bu adrese gönderilecektir.\n */\n readonly email: string;\n\n /**\n * The initial password for the agent user account. This password will be used for\n * the first login and should meet security requirements. The user should be encouraged\n * to change this password after their first successful login for enhanced security.\n *\n * Acente kullanıcı hesabı için başlangıç şifresi. Bu şifre ilk giriş için kullanılacak\n * ve güvenlik gereksinimlerini karşılamalıdır. Gelişmiş güvenlik için kullanıcının\n * ilk başarılı girişinden sonra bu şifreyi değiştirmesi teşvik edilmelidir.\n */\n readonly password: string;\n}\n\n// ============================================================================\n// B2C CONFIGURATION TYPES\n// ============================================================================\n\n/**\n * Enumeration of B2C configuration field types\n */\nexport enum B2CConfigFieldType {\n Object = 1,\n Array = 2,\n Text = 3,\n Number = 4,\n Boolean = 5,\n File = 6,\n Color = 7,\n ProductBranch = 8,\n Icon = 9,\n InsuranceCompany = 10,\n MultiLineText = 11,\n InsuranceProduct = 12,\n}\n\n/**\n * Base interface for B2C configuration fields\n */\nexport interface B2CConfigFieldBase {\n readonly name: string;\n readonly labelResourceKey?: string | null;\n readonly descriptionResourceKey?: string | null;\n}\n\n/**\n * B2C configuration field for text input\n */\nexport interface TextB2CConfigField extends B2CConfigFieldBase {\n readonly type: B2CConfigFieldType.Text;\n}\n\n/**\n * B2C configuration field for multi-line text input\n */\nexport interface MultiLineTextB2CConfigField extends B2CConfigFieldBase {\n readonly type: B2CConfigFieldType.MultiLineText;\n}\n\n/**\n * B2C configuration field for numeric input\n */\nexport interface NumberB2CConfigField extends B2CConfigFieldBase {\n readonly type: B2CConfigFieldType.Number;\n}\n\n/**\n * B2C configuration field for boolean input\n */\nexport interface BooleanB2CConfigField extends B2CConfigFieldBase {\n readonly type: B2CConfigFieldType.Boolean;\n}\n\n/**\n * B2C configuration field for file upload\n */\nexport interface FileB2CConfigField extends B2CConfigFieldBase {\n readonly type: B2CConfigFieldType.File;\n readonly allowedExtensions: readonly string[];\n}\n\n/**\n * B2C configuration field for color selection\n */\nexport interface ColorB2CConfigField extends B2CConfigFieldBase {\n readonly type: B2CConfigFieldType.Color;\n}\n\n/**\n * B2C configuration field for product branch selection\n */\nexport interface ProductBranchB2CConfigField extends B2CConfigFieldBase {\n readonly type: B2CConfigFieldType.ProductBranch;\n}\n\n/**\n * B2C configuration field for icon selection\n */\nexport interface IconB2CConfigField extends B2CConfigFieldBase {\n readonly type: B2CConfigFieldType.Icon;\n}\n\n/**\n * B2C configuration field for insurance company selection\n */\nexport interface InsuranceCompanyB2CConfigField extends B2CConfigFieldBase {\n readonly type: B2CConfigFieldType.InsuranceCompany;\n}\n\n/**\n * B2C configuration field for insurance product selection\n */\nexport interface InsuranceProductB2CConfigField extends B2CConfigFieldBase {\n readonly type: B2CConfigFieldType.InsuranceProduct;\n}\n\n/**\n * B2C configuration field for nested objects\n */\nexport interface ObjectB2CConfigField extends B2CConfigFieldBase {\n readonly type: B2CConfigFieldType.Object;\n readonly children: readonly B2CConfigField[];\n}\n\n/**\n * B2C configuration field for arrays of items\n */\nexport interface ArrayB2CConfigField extends B2CConfigFieldBase {\n readonly type: B2CConfigFieldType.Array;\n readonly itemType: B2CConfigField;\n}\n\n/**\n * Union type for all B2C configuration fields\n */\nexport type B2CConfigField =\n | TextB2CConfigField\n | MultiLineTextB2CConfigField\n | NumberB2CConfigField\n | BooleanB2CConfigField\n | FileB2CConfigField\n | ColorB2CConfigField\n | ProductBranchB2CConfigField\n | IconB2CConfigField\n | InsuranceCompanyB2CConfigField\n | InsuranceProductB2CConfigField\n | ObjectB2CConfigField\n | ArrayB2CConfigField;\n\n/**\n * Response containing B2C configuration fields\n */\nexport interface GetB2CConfigFieldsResult {\n readonly fields: readonly B2CConfigField[];\n}\n\n/**\n * Request to update B2C configuration fields\n */\nexport interface UpdateB2CConfigFieldsRequest {\n readonly fields: readonly B2CConfigField[];\n}\n\n// ============================================================================\n// MIGRATION TYPES\n// ============================================================================\n\n/**\n * Response containing migration result for all agent users\n */\nexport interface MigrateAllAgentUsersResult {\n readonly migratedCount: number;\n}\n","/**\n * Defines webhook events that can be triggered during the insurance proposal and policy lifecycle.\n * Each event represents a significant state change that external systems may need to be notified about.\n *\n * Sigorta teklifi ve poliçe yaşam döngüsü sırasında tetiklenebilecek webhook olaylarını tanımlar.\n * Her olay, harici sistemlerin bilgilendirilmesi gerekebilecek önemli bir durum değişikliğini temsil eder.\n */\nexport enum WebhookEvent {\n /**\n * Triggered when a proposal premium calculation is received and processed successfully.\n *\n * Teklif prim hesaplaması alındığında ve başarıyla işlendiğinde tetiklenir.\n */\n ProposalPremiumReceived = \"proposal_premium.received\",\n\n /**\n * Triggered when a proposal premium purchase process is initiated.\n *\n * Teklif prim satın alma süreci başlatıldığında tetiklenir.\n */\n ProposalPremiumPurchasing = \"proposal_premium.purchasing\",\n\n /**\n * Triggered when a proposal premium purchase process is completed successfully.\n *\n * Teklif prim satın alma süreci başarıyla tamamlandığında tetiklenir.\n */\n ProposalPremiumPurchased = \"proposal_premium.purchased\",\n\n /**\n * Triggered when a proposal premium purchase process fails.\n *\n * Teklif prim satın alma süreci başarısız olduğunda tetiklenir.\n */\n ProposalPremiumPurchaseFailed = \"proposal_premium.purchase_failed\",\n\n /**\n * Triggered when an insurance policy is created in the system.\n *\n * Sistemde bir sigorta poliçesi oluşturulduğunda tetiklenir.\n */\n PolicyCreated = \"policy.created\",\n\n /**\n * Triggered when an existing insurance policy is updated or modified.\n *\n * Mevcut bir sigorta poliçesi güncellendiğinde veya değiştirildiğinde tetiklenir.\n */\n PolicyUpdated = \"policy.updated\",\n}\n\n// Webhook Contracts\n\n/**\n * Request contract for creating a new webhook endpoint to receive real-time event notifications.\n * Configures event subscriptions and security settings for automated system integrations.\n *\n * Gerçek zamanlı olay bildirimlerini almak için yeni webhook endpoint'i oluşturmak üzere istek sözleşmesi.\n * Otomatik sistem entegrasyonları için olay abonelikleri ve güvenlik ayarlarını yapılandırır.\n */\nexport interface CreateWebhookRequest {\n /**\n * The complete URL where InsurUp will send HTTP POST requests containing event notifications.\n * This endpoint must be publicly accessible, support HTTPS for security, and be capable of\n * handling JSON payloads. The receiving system should respond with appropriate HTTP status codes\n * to indicate successful receipt and processing of webhook notifications.\n *\n * InsurUp'un olay bildirimlerini içeren HTTP POST isteklerini göndereceği tam URL.\n * Bu endpoint herkese açık erişilebilir olmalı, güvenlik için HTTPS'i desteklemeli ve\n * JSON payload'larını işleyebilmelidir. Alıcı sistem, webhook bildirimlerinin başarılı\n * alınması ve işlenmesini belirtmek için uygun HTTP durum kodları ile yanıt vermelidir.\n */\n readonly url: string;\n\n /**\n * Array of specific event types that this webhook endpoint will be notified about.\n * Events can include policy changes, claim updates, payment confirmations, customer registrations,\n * and other significant activities within the InsurUp platform. Only events specified in this array\n * will trigger notifications to the configured URL, allowing for precise control over data flow.\n *\n * Bu webhook endpoint'inin bilgilendirilecegi belirli olay türlerinin dizisi.\n * Olaylar poliçe değişiklikleri, hasar güncellemeleri, ödeme onayları, müşteri kayıtları ve\n * InsurUp platformu içindeki diğer önemli etkinlikleri içerebilir. Yalnızca bu dizide belirtilen\n * olaylar yapılandırılmış URL'ye bildirim tetikleyecek, bu da veri akışı üzerinde hassas kontrol sağlar.\n */\n readonly events: WebhookEvent[];\n\n /**\n * Optional secret key used to generate HMAC signatures for webhook payloads, enabling\n * the receiving system to verify that notifications are genuinely from InsurUp and haven't been\n * tampered with during transmission. When provided, InsurUp will include a signature header\n * with each webhook delivery that can be validated using this secret.\n *\n * Webhook payload'ları için HMAC imzaları oluşturmak üzere kullanılan isteğe bağlı gizli anahtar,\n * alıcı sistemin bildirimlerin gerçekten InsurUp'tan geldiğini ve iletim sırasında değiştirilmediğini\n * doğrulamasını sağlar. Sağlandığında, InsurUp her webhook teslimi ile bu gizli anahtar kullanılarak\n * doğrulanabilecek bir imza başlığı ekleyecektir.\n */\n readonly secret: string | null;\n}\n\n/**\n * Response contract containing the result of a successful webhook endpoint creation.\n * Returns the unique identifier of the newly created webhook for management and reference purposes.\n *\n * Başarılı webhook endpoint oluşturmanın sonucunu içeren yanıt sözleşmesi.\n * Yönetim ve referans amaçları için yeni oluşturulan webhook'un benzersiz tanımlayıcısını döndürür.\n */\nexport interface CreateWebhookResult {\n /**\n * The unique identifier assigned to the newly created webhook endpoint.\n * This ID serves as the primary reference for all future operations involving this webhook,\n * including configuration updates, event delivery monitoring, redelivery requests, and deletion.\n * Store this identifier securely for webhook management and integration monitoring purposes.\n *\n * Yeni oluşturulan webhook endpoint'ine atanan benzersiz tanımlayıcı.\n * Bu ID, yapılandırma güncellemeleri, olay teslimat izleme, yeniden teslimat talepleri ve silme\n * dahil olmak üzere bu webhook'u içeren gelecekteki tüm işlemler için birincil referans görevi görür.\n * Webhook yönetimi ve entegrasyon izleme amaçları için bu tanımlayıcıyı güvenli bir şekilde saklayın.\n */\n readonly id: string;\n}\n\n/**\n * Response contract containing comprehensive information about a specific webhook endpoint.\n * Provides complete webhook configuration details for management and monitoring purposes.\n *\n * Belirli bir webhook endpoint'i hakkında kapsamlı bilgi içeren yanıt sözleşmesi.\n * Yönetim ve izleme amaçları için tam webhook yapılandırma detaylarını sağlar.\n */\nexport interface GetWebhookByIdResult {\n /**\n * The unique identifier of the webhook endpoint in the InsurUp platform.\n * This ID is used for all webhook management operations including updates, deletion,\n * and delivery monitoring. It serves as the primary reference for this specific webhook configuration.\n *\n * InsurUp platformundaki webhook endpoint'inin benzersiz tanımlayıcısı.\n * Bu ID, güncellemeler, silme ve teslimat izleme dahil tüm webhook yönetim işlemleri için kullanılır.\n * Bu belirli webhook yapılandırması için birincil referans görevi görür.\n */\n readonly id: string;\n\n /**\n * The configured URL where InsurUp sends HTTP POST requests containing event notifications.\n * This is the endpoint that receives webhook deliveries and must be accessible to InsurUp's\n * notification system. The URL configuration is essential for successful webhook operation.\n *\n * InsurUp'un olay bildirimlerini içeren HTTP POST isteklerini gönderdiği yapılandırılmış URL.\n * Bu, webhook teslimatlarını alan ve InsurUp'un bildirim sistemine erişilebilir olması gereken endpoint'tir.\n * URL yapılandırması başarılı webhook işlemi için olmazsa olmazdır.\n */\n readonly url: string;\n\n /**\n * Array of specific event types that this webhook endpoint is configured to receive notifications about.\n * These events represent the various activities within the InsurUp platform that will trigger\n * webhook deliveries to the configured URL. Only events in this list will generate notifications\n * for this particular webhook endpoint.\n *\n * Bu webhook endpoint'inin bildirim almak üzere yapılandırıldığı belirli olay türlerinin dizisi.\n * Bu olaylar, yapılandırılmış URL'ye webhook teslimatlarını tetikleyecek InsurUp platformu içindeki\n * çeşitli etkinlikleri temsil eder. Yalnızca bu listedeki olaylar bu belirli webhook endpoint'i için\n * bildirimler oluşturacaktır.\n */\n readonly events: WebhookEvent[];\n\n /**\n * Optional secret key configured for this webhook to enable payload verification through HMAC signatures.\n * When a secret is configured, InsurUp includes signature headers with webhook deliveries that can be\n * validated by the receiving system to ensure authenticity and integrity of the webhook notifications.\n * This field may be null if no secret verification is configured.\n *\n * HMAC imzaları aracılığıyla payload doğrulamasını etkinleştirmek için bu webhook için yapılandırılan\n * isteğe bağlı gizli anahtar. Bir gizli anahtar yapılandırıldığında, InsurUp webhook teslimatları ile\n * alıcı sistem tarafından webhook bildirimlerinin gerçekliğini ve bütünlüğünü sağlamak için doğrulanabilecek\n * imza başlıkları ekler. Gizli doğrulama yapılandırılmamışsa bu alan null olabilir.\n */\n readonly secret: string | null;\n}\n\n/**\n * Response contract containing summary information about webhook endpoints for listing and overview purposes.\n * Provides essential webhook details for management dashboards and monitoring interfaces.\n *\n * Listeleme ve genel bakış amaçları için webhook endpoint'leri hakkında özet bilgi içeren yanıt sözleşmesi.\n * Yönetim panoları ve izleme arayüzleri için temel webhook detaylarını sağlar.\n */\nexport interface GetWebhooksResult {\n /**\n * The unique identifier of the webhook endpoint in the InsurUp platform.\n * This ID is the primary reference for this webhook and can be used for detailed retrieval,\n * updates, deletion, and delivery monitoring operations through other API endpoints.\n *\n * InsurUp platformundaki webhook endpoint'inin benzersiz tanımlayıcısı.\n * Bu ID, bu webhook için birincil referanstır ve diğer API endpoint'leri aracılığıyla\n * detaylı alma, güncelleme, silme ve teslimat izleme işlemleri için kullanılabilir.\n */\n readonly id: string;\n\n /**\n * The configured URL where InsurUp delivers webhook notifications for this endpoint.\n * This is the destination where HTTP POST requests containing event data are sent.\n * Having this information in the summary view helps administrators quickly identify\n * and verify webhook endpoint destinations.\n *\n * InsurUp'un bu endpoint için webhook bildirimlerini teslim ettiği yapılandırılmış URL.\n * Bu, olay verilerini içeren HTTP POST isteklerinin gönderildiği hedeftir.\n * Bu bilginin özet görünümde bulunması, yöneticilerin webhook endpoint hedeflerini\n * hızlı bir şekilde tanımlamasına ve doğrulamasına yardımcı olur.\n */\n readonly url: string;\n\n /**\n * Array of specific event types that this webhook endpoint will receive notifications about.\n * This summary information helps administrators understand the scope of each webhook's\n * responsibilities and ensures proper event distribution across different integration endpoints.\n * Essential for managing event routing and avoiding notification gaps.\n *\n * Bu webhook endpoint'inin bildirim alacağı belirli olay türlerinin dizisi.\n * Bu özet bilgi, yöneticilerin her webhook'un sorumluluklarının kapsamını anlamasına\n * ve farklı entegrasyon endpoint'leri arasında uygun olay dağıtımını sağlamasına yardımcı olur.\n * Olay yönlendirmesini yönetmek ve bildirim boşluklarını önlemek için olmazsa olmazdır.\n */\n readonly events: WebhookEvent[];\n\n /**\n * Indicates the presence of a secret key configuration for webhook payload verification.\n * While the actual secret value is not exposed in list views for security reasons,\n * this field shows whether HMAC signature verification is enabled for this webhook endpoint.\n * This information helps administrators verify security configurations at a glance.\n *\n * Webhook payload doğrulaması için gizli anahtar yapılandırmasının varlığını gösterir.\n * Gerçek gizli değer güvenlik nedenleriyle liste görünümlerinde gösterilmezken,\n * bu alan bu webhook endpoint'i için HMAC imza doğrulamasının etkin olup olmadığını gösterir.\n * Bu bilgi, yöneticilerin güvenlik yapılandırmalarını bir bakışta doğrulamasına yardımcı olur.\n */\n readonly secret: string | null;\n\n /**\n * The total number of webhook delivery attempts that have been made for this endpoint\n * since its creation. This metric provides a quick overview of webhook activity levels\n * and helps administrators identify highly active endpoints, unused webhooks,\n * or endpoints that may need attention due to high failure rates.\n *\n * Bu endpoint için oluşturulduğundan beri yapılan toplam webhook teslimat deneme sayısı.\n * Bu metrik, webhook etkinlik seviyelerinin hızlı bir genel görünümünü sağlar ve\n * yöneticilerin çok aktif endpoint'leri, kullanılmayan webhook'ları veya yüksek başarısızlık\n * oranları nedeniyle dikkat gerektirebilecek endpoint'leri belirlemesine yardımcı olur.\n */\n readonly deliveryCount: number;\n}\n\n/**\n * Request contract for updating an existing webhook endpoint configuration.\n * Allows modification of URL, event subscriptions, and security settings for webhook integrations.\n *\n * Mevcut webhook endpoint yapılandırmasını güncellemek için istek sözleşmesi.\n * Webhook entegrasyonları için URL, olay abonelikleri ve güvenlik ayarlarının değiştirilmesine olanak tanır.\n */\nexport interface UpdateWebhookRequest {\n /**\n * The unique identifier of the webhook endpoint that will be updated with the new configuration.\n * This identifier is used to locate the specific webhook in the system and ensure that\n * the correct webhook configuration is modified with the provided updates.\n *\n * Yeni yapılandırma ile güncellenecek webhook endpoint'inin benzersiz tanımlayıcısı.\n * Bu tanımlayıcı, sistemde belirli webhook'u bulmak ve doğru webhook yapılandırmasının\n * sağlanan güncellemelerle değiştirilmesini sağlamak için kullanılır.\n */\n readonly id: string;\n\n /**\n * The new URL where InsurUp will send HTTP POST requests containing event notifications.\n * This updated endpoint must be publicly accessible, support HTTPS for security, and be capable\n * of handling JSON payloads. All future webhook deliveries will be sent to this new URL\n * instead of the previous configuration.\n *\n * InsurUp'un olay bildirimlerini içeren HTTP POST isteklerini göndereceği yeni URL.\n * Bu güncellenmiş endpoint herkese açık erişilebilir olmalı, güvenlik için HTTPS'i desteklemeli\n * ve JSON payload'larını işleyebilmelidir. Gelecekteki tüm webhook teslimatları önceki yapılandırma\n * yerine bu yeni URL'ye gönderilecektir.\n */\n readonly url: string;\n\n /**\n * Updated array of specific event types that this webhook endpoint will be notified about.\n * This replaces the previous event subscriptions entirely, so all desired events must be included.\n * Events can include policy changes, claim updates, payment confirmations, customer registrations,\n * and other significant activities within the InsurUp platform.\n *\n * Bu webhook endpoint'inin bilgilendirilecegi güncellenmiş belirli olay türlerinin dizisi.\n * Bu, önceki olay aboneliklerini tamamen değiştirir, bu nedenle istenen tüm olaylar dahil edilmelidir.\n * Olaylar poliçe değişiklikleri, hasar güncellemeleri, ödeme onayları, müşteri kayıtları ve\n * InsurUp platformu içindeki diğer önemli etkinlikleri içerebilir.\n */\n readonly events: WebhookEvent[];\n\n /**\n * Updated optional secret key used to generate HMAC signatures for webhook payloads.\n * This replaces any existing secret configuration. When provided, InsurUp will use this new secret\n * for all future webhook deliveries to generate signature headers for payload verification.\n * Set to null to remove secret-based verification entirely.\n *\n * Webhook payload'ları için HMAC imzaları oluşturmak üzere kullanılan güncellenmiş isteğe bağlı gizli anahtar.\n * Bu, mevcut herhangi bir gizli yapılandırmayı değiştirir. Sağlandığında, InsurUp payload doğrulaması için\n * imza başlıkları oluşturmak üzere gelecekteki tüm webhook teslimatları için bu yeni gizli anahtarı kullanacaktır.\n * Gizli anahtar tabanlı doğrulamayı tamamen kaldırmak için null olarak ayarlayın.\n */\n readonly secret: string | null;\n}\n\n/**\n * Response contract containing detailed information about a specific webhook delivery attempt.\n * Provides comprehensive delivery metrics, payload data, and response details for troubleshooting and monitoring.\n *\n * Belirli bir webhook teslimat denemesi hakkında detaylı bilgi içeren yanıt sözleşmesi.\n * Sorun giderme ve izleme için kapsamlı teslimat metrikleri, payload verisi ve yanıt detayları sağlar.\n */\nexport interface GetWebhookDeliveryResult {\n /**\n * The unique identifier of this specific delivery attempt.\n * This ID can be used to track and reference this particular webhook delivery\n * for monitoring, troubleshooting, and audit purposes.\n *\n * Bu belirli teslimat denemesinin benzersiz tanımlayıcısı.\n * Bu ID, izleme, sorun giderme ve denetim amaçları için bu belirli webhook\n * teslimatını takip etmek ve referans almak için kullanılabilir.\n */\n readonly id: string;\n\n /**\n * The URL where InsurUp attempted to deliver the webhook notification.\n * This shows the exact endpoint that was contacted for this delivery attempt,\n * which is essential for diagnosing connectivity or configuration issues.\n *\n * InsurUp'un webhook bildirimini teslim etmeye çalıştığı URL.\n * Bu, bu teslimat denemesi için iletişim kurulan tam endpoint'i gösterir,\n * bu da bağlantı veya yapılandırma sorunlarını teşhis etmek için olmazsa olmazdır.\n */\n readonly webhookUrl: string;\n\n /**\n * The specific type of event that occurred in the InsurUp platform and triggered this webhook delivery.\n * This information helps identify what business activity caused the webhook notification\n * and is useful for understanding event patterns and delivery correlations.\n *\n * InsurUp platformunda gerçekleşen ve bu webhook teslimatını tetikleyen belirli olay türü.\n * Bu bilgi, hangi iş etkinliğinin webhook bildirimini tetiklediğini belirlemeye yardımcı olur\n * ve olay desenlerini ve teslimat korelasyonlarını anlamak için faydalıdır.\n */\n readonly event: WebhookEvent;\n\n /**\n * The timestamp when the delivery attempt was made.\n *\n * Teslimat denemesinin yapıldığı zaman damgası.\n */\n readonly deliveredAt: string;\n\n /**\n * The HTTP status code returned by the receiving endpoint.\n *\n * Alıcı endpoint tarafından döndürülen HTTP durum kodu.\n */\n readonly responseStatusCode: number | null;\n\n /**\n * The response body returned by the receiving endpoint.\n *\n * Alıcı endpoint tarafından döndürülen yanıt gövdesi.\n */\n readonly responseBody: string | null;\n\n /**\n * The total time elapsed from when InsurUp initiated the webhook delivery request\n * to when the response was received (or the request timed out), measured in milliseconds.\n * This metric is important for monitoring webhook performance and identifying slow-responding endpoints.\n *\n * InsurUp'un webhook teslimat isteğini başlattığı andan yanıtın alındığı ana kadar\n * (veya isteğin zaman aşımına uğradığı ana kadar) geçen toplam süre, milisaniye cinsinden ölçülür.\n * Bu metrik, webhook performansını izlemek ve yavaş yanıt veren endpoint'leri belirlemek için önemlidir.\n */\n readonly durationMs: number;\n\n /**\n * Boolean indicator showing whether the webhook delivery was considered successful.\n * Success is typically determined by receiving a 2xx HTTP status code from the receiving endpoint\n * within the allowed timeout period. This flag provides a quick way to assess delivery status\n * without examining detailed response codes.\n *\n * Webhook teslimatının başarılı kabul edilip edilmediğini gösteren boolean göstergesi.\n * Başarı genellikle izin verilen zaman aşımı süresinde alıcı endpoint'ten 2xx HTTP durum kodu\n * alınmasıyla belirlenir. Bu bayrak, detaylı yanıt kodlarını incelemeden teslimat durumunu\n * değerlendirmek için hızlı bir yol sağlar.\n */\n readonly isSuccess: boolean;\n}\n","/**\n * @fileoverview Proposal Contract Types - Request and response types for proposal management\n * @description All contract types for proposal operations including creation, revision, purchase, and document management\n */\n\nimport type {\n ProductBranch,\n Channel,\n UserReference,\n Currency,\n PaymentOption,\n Coverage,\n CreditCard,\n InsuranceProductType,\n InsuranceParameter,\n CustomerType,\n CustomerEmail,\n IndividualCustomerIdentityNumber,\n BirthDate,\n TaxNumber,\n ForeignCustomerIdentityNumber,\n PersonHeight,\n PersonWeight,\n ProposalSnapshotVehicle,\n ProposalSnapshotProperty,\n} from \"./common.js\";\nimport type { CustomerPhoneNumber } from \"./common.js\";\nimport type { Gender, Job, Surgery, Disease } from \"./customers.js\";\nimport type { DaskOldPolicy } from \"./common.js\";\n\n// ============================================================================\n// PROPOSAL ENUMS\n// ============================================================================\n\n/**\n * Proposal State\n *\n * Represents the current state of an insurance proposal in its lifecycle.\n * Used to track proposal status from creation to completion or expiration.\n *\n * Bir sigorta teklifinin yaşam döngüsündeki mevcut durumunu temsil eder.\n * Teklif durumunu oluşturulmasından tamamlanmasına kadar takip etmek için kullanılır.\n */\nexport enum ProposalState {\n /**\n * The proposal is waiting for processing\n * Teklif işleme için bekliyor\n */\n Waiting = \"WAITING\",\n\n /**\n * The proposal is active and available for purchase\n * Teklif aktif ve satın alınabilir\n */\n Active = \"ACTIVE\",\n\n /**\n * The proposal purchase process is in progress\n * Teklif satın alma süreci devam ediyor\n */\n Purchasing = \"PURCHASING\",\n\n /**\n * The proposal has been purchased and converted to a policy\n * Teklif satın alınmış ve poliçeye dönüştürülmüş\n */\n Purchased = \"PURCHASED\",\n\n /**\n * The proposal processing has failed\n * Teklif işleme başarısız oldu\n */\n Failed = \"FAILED\",\n}\n\n/**\n * Proposal Product State\n *\n * Represents the processing state of an individual insurance product within a proposal.\n * Tracks the status of product quote generation and processing.\n *\n * Bir teklif içindeki bireysel sigorta ürününün işleme durumunu temsil eder.\n * Ürün teklif oluşturma ve işleme durumunu takip eder.\n */\nexport enum ProposalProductState {\n /**\n * The product is waiting for processing or pricing\n * Ürün işleme veya fiyatlandırma için bekliyor\n */\n Waiting = \"WAITING\",\n\n /**\n * The product processing has failed\n * Ürün işleme başarısız oldu\n */\n Failed = \"FAILED\",\n\n /**\n * The product has been successfully processed and priced\n * Ürün başarıyla işlendi ve fiyatlandırıldı\n */\n Active = \"ACTIVE\",\n\n /**\n * The product purchase is currently in progress\n * Ürün satın alma işlemi şu anda devam ediyor\n */\n Purchasing = \"PURCHASING\",\n\n /**\n * The product has been successfully purchased\n * Ürün başarıyla satın alındı\n */\n Purchased = \"PURCHASED\",\n}\n\n// ============================================================================\n// PROPOSAL SNAPSHOT TYPES\n// ============================================================================\n\n// ============================================================================\n// CUSTOMER TYPES FOR PROPOSAL SNAPSHOTS\n// ============================================================================\n\n/**\n * Union type for all customer snapshot types in proposals\n * Tekliflerdeki tüm müşteri anlık görüntü türleri için birleşim türü\n */\nexport type ProposalSnapshotCustomer =\n | ({\n readonly type: CustomerType.Individual;\n readonly identityNumber: IndividualCustomerIdentityNumber;\n readonly birthDate: BirthDate;\n readonly job?: Job;\n readonly gender?: Gender;\n readonly fullName: string;\n } & ProposalSnapshotCustomerBase)\n | ({\n readonly type: CustomerType.Company;\n readonly title: string;\n readonly taxNumber: TaxNumber;\n } & ProposalSnapshotCustomerBase)\n | ({\n readonly type: CustomerType.Foreign;\n readonly identityNumber: ForeignCustomerIdentityNumber;\n readonly birthDate: BirthDate;\n readonly job?: Job;\n readonly gender?: Gender;\n readonly fullName: string;\n } & ProposalSnapshotCustomerBase);\n\ntype ProposalSnapshotCustomerBase = {\n readonly id: string;\n readonly name: string;\n readonly city?: InsuranceParameter;\n readonly district?: InsuranceParameter;\n readonly email?: CustomerEmail;\n readonly phoneNumber?: CustomerPhoneNumber;\n};\n\n// ============================================================================\n// PROPOSAL SNAPSHOT TYPES\n// ============================================================================\n\n/**\n * Union type for all proposal snapshot types\n * Tüm teklif anlık görüntü türleri için birleşim türü\n */\nexport type ProposalSnapshot =\n | ({\n readonly productBranch: ProductBranch.Tss;\n readonly height?: PersonHeight;\n readonly weight?: PersonWeight;\n readonly surgeries: Surgery[];\n readonly diseases: Disease[];\n } & ProposalSnapshotBase)\n | ({\n readonly productBranch: ProductBranch.Kasko;\n readonly vehicle: ProposalSnapshotVehicle;\n } & ProposalSnapshotBase)\n | ({\n readonly productBranch: ProductBranch.Trafik;\n readonly vehicle: ProposalSnapshotVehicle;\n } & ProposalSnapshotBase)\n | ({\n readonly productBranch: ProductBranch.Imm;\n readonly vehicle: ProposalSnapshotVehicle;\n } & ProposalSnapshotBase)\n | ({\n readonly productBranch: ProductBranch.Konut;\n readonly property: ProposalSnapshotProperty;\n } & ProposalSnapshotBase)\n | ({\n readonly productBranch: ProductBranch.Dask;\n readonly property: ProposalSnapshotProperty;\n readonly oldPolicy?: DaskOldPolicy;\n } & ProposalSnapshotBase);\n\ntype ProposalSnapshotBase = {\n readonly insurerCustomer: ProposalSnapshotCustomer;\n readonly insuredCustomer: ProposalSnapshotCustomer;\n readonly isInsuredCustomerSameAsInsurerCustomer: boolean;\n};\n\n// ============================================================================\n// REQUEST TYPES\n// ============================================================================\n\n/**\n * Union type for all proposal creation requests\n * Tüm teklif oluşturma talepleri için birleşim türü\n */\nexport type CreateProposalRequest =\n | ({\n readonly $type: \"kasko\";\n readonly productBranch: ProductBranch.Kasko;\n readonly vehicleId: string;\n readonly coverage?: Extract<\n Coverage,\n { productBranch: ProductBranch.Kasko }\n > | null;\n } & CreateProposalRequestBase)\n | ({\n readonly $type: \"dask\";\n readonly productBranch: ProductBranch.Dask;\n readonly propertyId: string;\n } & CreateProposalRequestBase)\n | ({\n readonly $type: \"konut\";\n readonly productBranch: ProductBranch.Konut;\n readonly propertyId: string;\n readonly coverage?: Extract<\n Coverage,\n { productBranch: ProductBranch.Konut }\n > | null;\n } & CreateProposalRequestBase)\n | ({\n readonly $type: \"trafik\";\n readonly productBranch: ProductBranch.Trafik;\n readonly vehicleId: string;\n } & CreateProposalRequestBase)\n | ({\n readonly $type: \"tss\";\n readonly productBranch: ProductBranch.Tss;\n readonly coverage?: Extract<\n Coverage,\n { productBranch: ProductBranch.Tss }\n > | null;\n } & CreateProposalRequestBase)\n | ({\n readonly $type: \"imm\";\n readonly productBranch: ProductBranch.Imm;\n readonly vehicleId: string;\n readonly coverage?: Extract<\n Coverage,\n { productBranch: ProductBranch.Imm }\n > | null;\n } & CreateProposalRequestBase);\n\ntype CreateProposalRequestBase = {\n readonly insurerCustomerId: string;\n readonly insuredCustomerId: string;\n readonly coverageGroupIds?: string[] | null;\n readonly channel: Channel;\n};\n\n/**\n * Get Proposal Product Premium Detail Request\n *\n * Request to retrieve detailed premium information for a specific insurance product and installment option.\n *\n * Belirli bir sigorta ürünü ve taksit seçeneği için detaylı prim bilgilerini alma talebi.\n */\nexport interface GetProposalProductPremiumDetailRequest {\n /**\n * The unique identifier of the proposal\n * Teklifin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * The unique identifier of the product within the proposal\n * Teklif içindeki ürünün benzersiz tanımlayıcısı\n */\n readonly proposalProductId: string;\n\n /**\n * The number of installments for the premium calculation\n * Prim hesaplaması için taksit sayısı\n */\n readonly installmentNumber: number;\n}\n\n/**\n * Purchase Proposal Product Sync Request\n *\n * Polymorphic request for synchronous proposal product purchase with different payment methods.\n *\n * Farklı ödeme yöntemleri ile senkron teklif ürün satın alma için polimorfik istek.\n */\nexport interface PurchaseProposalProductSyncRequest {\n /**\n * Unique identifier of the proposal containing the product to be purchased\n * Satın alınacak ürünü içeren teklifin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * Unique identifier of the specific product within the proposal to be purchased\n * Satın alınacak teklif içindeki belirli ürünün benzersiz tanımlayıcısı\n */\n readonly proposalProductId: string;\n\n /**\n * Number of installments for the premium payment plan\n * Prim ödeme planı için taksit sayısı\n */\n readonly installmentNumber: number;\n}\n\n/**\n * Credit Card Purchase Request\n * Kredi kartı satın alma talebi\n */\nexport interface PurchaseProposalProductSyncCreditCardRequest extends PurchaseProposalProductSyncRequest {\n /**\n * Credit card information for payment processing\n * Ödeme işlemi için kredi kartı bilgileri\n */\n readonly card: CreditCard;\n}\n\n/**\n * Open Account Purchase Request\n * Açık hesap satın alma talebi\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface PurchaseProposalProductSyncOpenAccountRequest extends PurchaseProposalProductSyncRequest {\n // No additional properties for open account payment\n // Açık hesap ödemesi için ek özellik yok\n}\n\n/**\n * Purchase Proposal Product Async Request\n *\n * Request to purchase an insurance product from a proposal using asynchronous processing.\n *\n * Asenkron işleme kullanarak bir tekliften sigorta ürünü satın alma talebi.\n */\nexport interface PurchaseProposalProductAsyncRequest {\n /**\n * Unique identifier of the insurance proposal containing the product to purchase\n * Satın alınacak ürünü içeren sigorta teklifinin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * Unique identifier of the specific product within the proposal to purchase\n * Satın alınacak teklif içindeki belirli ürünün benzersiz tanımlayıcısı\n */\n readonly proposalProductId: string;\n\n /**\n * Number of installments for the premium payment schedule\n * Prim ödeme programı için taksit sayısı\n */\n readonly installmentNumber: number;\n\n /**\n * URL where the customer should be redirected after completing the payment process\n * Ödeme sürecini tamamladıktan sonra müşterinin yönlendirilmesi gereken URL\n */\n readonly callbackUrl: string;\n}\n\n/**\n * 3D Secure Async Purchase Request\n * 3D Secure asenkron satın alma talebi\n */\nexport interface PurchaseProposalProductAsync3DSecureRequest extends PurchaseProposalProductAsyncRequest {\n /**\n * Credit card information for processing the payment\n * Ödemeyi işlemek için kredi kartı bilgileri\n */\n readonly card: CreditCard;\n}\n\n/**\n * Insurance Company Redirect Async Purchase Request\n * Sigorta şirketi yönlendirme asenkron satın alma talebi\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface PurchaseProposalProductAsyncInsuranceCompanyRedirectRequest extends PurchaseProposalProductAsyncRequest {\n // No additional properties for insurance company redirect\n // Sigorta şirketi yönlendirmesi için ek özellik yok\n}\n\n/**\n * Get Proposal Product Coverage Request\n *\n * Request to retrieve coverage details for a specific insurance product within a proposal.\n *\n * Bir teklif içindeki belirli bir sigorta ürünü için teminat detaylarını alma talebi.\n */\nexport interface GetProposalProductCoverageRequest {\n /**\n * The unique identifier of the proposal\n * Teklifin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * The unique identifier of the product within the proposal\n * Teklif içindeki ürünün benzersiz tanımlayıcısı\n */\n readonly proposalProductId: string;\n}\n\n/**\n * Revise Proposal Request\n *\n * Request to revise an existing insurance proposal with updated coverage options.\n *\n * Mevcut bir sigorta teklifini güncellenmiş teminat seçenekleri ile revize etme talebi.\n */\nexport interface ReviseProposalRequest {\n /**\n * The unique identifier of the proposal to revise\n * Revize edilecek teklifin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * The updated coverage configuration, or null to keep existing coverage\n * Güncellenmiş teminat konfigürasyonu veya mevcut teminatı korumak için null\n */\n readonly coverage?: Coverage | null;\n}\n\n/**\n * Revise Proposal Product Request\n *\n * Request to revise a specific insurance product within a proposal with updated parameters.\n *\n * Bir teklif içindeki belirli bir sigorta ürününü güncellenmiş parametrelerle revize etme talebi.\n */\nexport interface ReviseProposalProductRequest {\n /**\n * The unique identifier of the proposal\n * Teklifin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * The unique identifier of the product to revise\n * Revize edilecek ürünün benzersiz tanımlayıcısı\n */\n readonly proposalProductId: string;\n\n /**\n * The optional guarantee group identifier to apply\n * Uygulanacak isteğe bağlı garanti grubu tanımlayıcısı\n */\n readonly guaranteeGroupId?: string | null;\n\n /**\n * The updated coverage configuration, or null to keep existing coverage\n * Güncellenmiş teminat konfigürasyonu veya mevcut teminatı korumak için null\n */\n readonly coverage?: Coverage | null;\n}\n\n/**\n * Fetch Proposal Product Document Request\n *\n * Request to fetch a specific proposal product document.\n *\n * Belirli bir teklif ürün belgesini alma talebi.\n */\nexport interface FetchProposalProductDocumentRequest {\n /**\n * The unique identifier of the proposal\n * Teklifin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * The unique identifier of the product within the proposal\n * Teklif içindeki ürünün benzersiz tanımlayıcısı\n */\n readonly proposalProductId: string;\n}\n\n/**\n * Fetch Proposal Information Form Document Request\n *\n * Request to fetch the information form document for a proposal.\n *\n * Bir teklif için bilgi formu belgesini alma talebi.\n */\nexport interface FetchProposalInformationFormDocumentRequest {\n /**\n * The unique identifier of the proposal\n * Teklifin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * The unique identifier of the product within the proposal\n * Teklif içindeki ürünün benzersiz tanımlayıcısı\n */\n readonly proposalProductId: string;\n}\n\n/**\n * Send Proposal Product Document Request\n *\n * Request to send a specific proposal product document to a customer via communication channels.\n *\n * Müşteriye iletişim kanalları aracılığıyla belirli bir teklif ürün belgesi gönderme talebi.\n */\nexport interface SendProposalProductDocumentRequest {\n /**\n * Unique identifier of the insurance proposal\n * Sigorta teklifinin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * Unique identifier of the specific product within the proposal\n * Teklif içindeki belirli ürünün benzersiz tanımlayıcısı\n */\n readonly proposalProductId: string;\n\n /**\n * Customer identifier for document delivery\n * Belge teslimatı için müşteri tanımlayıcısı\n */\n readonly customerId: string;\n\n /**\n * Communication method and details for document delivery\n * Belge teslimatı için iletişim yöntemi ve detayları\n */\n readonly communication: Communication;\n}\n\n/**\n * Communication Method Base\n *\n * Abstract base class defining the contract for different communication methods.\n *\n * Farklı iletişim yöntemleri için sözleşmeyi tanımlayan soyut temel sınıf.\n */\n/**\n * Union type for all communication methods\n * Tüm iletişim yöntemleri için birleşim türü\n */\nexport type Communication =\n | {\n readonly type: \"email\";\n readonly email: string;\n }\n | {\n readonly type: \"sms\";\n readonly phoneNumber: CustomerPhoneNumber;\n };\n\n/**\n * Send Proposal Information Form Document Request\n *\n * Request to send the information form document to a customer.\n *\n * Müşteriye bilgi formu belgesini gönderme talebi.\n */\nexport interface SendProposalInformationFormDocumentRequest {\n /**\n * Unique identifier of the insurance proposal\n * Sigorta teklifinin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * Unique identifier of the specific product within the proposal\n * Teklif içindeki belirli ürünün benzersiz tanımlayıcısı\n */\n readonly proposalProductId: string;\n\n /**\n * Customer identifier for document delivery\n * Belge teslimatı için müşteri tanımlayıcısı\n */\n readonly customerId: string;\n\n /**\n * Communication method and details for document delivery\n * Belge teslimatı için iletişim yöntemi ve detayları\n */\n readonly communication: Communication;\n}\n\n/**\n * Generate Compare Proposal Products PDF Request\n *\n * Request to generate a comparison PDF document for multiple proposal products.\n *\n * Birden fazla teklif ürünü için karşılaştırma PDF belgesi oluşturma talebi.\n */\nexport interface GenerateCompareProposalProductsPdfRequest {\n /**\n * Unique identifier of the insurance proposal\n * Sigorta teklifinin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * Array of product identifiers to include in the comparison\n * Karşılaştırmaya dahil edilecek ürün tanımlayıcıları dizisi\n */\n readonly proposalProductIds: readonly string[];\n\n /**\n * Array of coverage field names to exclude from the comparison document\n * Karşılaştırma belgesinden hariç tutulacak teminat alan adları dizisi\n */\n readonly excludedCoverageFields: readonly string[];\n}\n\n/**\n * Send Compare Proposal Products PDF Request\n *\n * Request to send a comparison PDF document of multiple proposal products to a customer.\n *\n * Müşteriye birden fazla teklif ürününün karşılaştırma PDF belgesini gönderme talebi.\n */\nexport interface SendCompareProposalProductsPdfRequest {\n /**\n * Unique identifier of the insurance proposal\n * Sigorta teklifinin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * Array of product identifiers to include in the comparison\n * Karşılaştırmaya dahil edilecek ürün tanımlayıcıları dizisi\n */\n readonly proposalProductIds: readonly string[];\n\n /**\n * Array of coverage field names to exclude from the comparison document\n * Karşılaştırma belgesinden hariç tutulacak teminat alan adları dizisi\n */\n readonly excludedCoverageFields: readonly string[];\n\n /**\n * Customer identifier for document delivery\n * Belge teslimatı için müşteri tanımlayıcısı\n */\n readonly customerId: string;\n\n /**\n * Communication method and details for document delivery\n * Belge teslimatı için iletişim yöntemi ve detayları\n */\n readonly communication: SendCompareProposalCommunication;\n}\n\n/**\n * Send Compare Proposal Communication Method Base\n *\n * Abstract base class defining the contract for different communication methods for comparison documents.\n *\n * Karşılaştırma belgeleri için farklı iletişim yöntemleri için sözleşmeyi tanımlayan soyut temel sınıf.\n */\n/**\n * Union type for all compare proposal communication methods\n * Tüm karşılaştırma teklifi iletişim yöntemleri için birleşim türü\n */\nexport type SendCompareProposalCommunication =\n | {\n readonly type: \"email\";\n readonly email: string;\n }\n | {\n readonly type: \"sms\";\n readonly phoneNumber: CustomerPhoneNumber;\n };\n\n/**\n * Set Proposal Representative Request\n *\n * Request to assign or change the representative agent for an insurance proposal.\n *\n * Bir sigorta teklifi için temsilci acente atama veya değiştirme talebi.\n */\nexport interface SetProposalRepresentativeRequest {\n /**\n * The unique identifier of the proposal\n * Teklifin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * The user ID of the agent to assign as representative, or null to remove assignment\n * Temsilci olarak atanacak acentenin kullanıcı ID'si veya atamayı kaldırmak için null\n */\n readonly representativeAgentUserId?: string | null;\n}\n\n/**\n * Retry Failed Proposal Product Request\n *\n * Request to retry processing of a failed insurance product within a proposal.\n *\n * Bir teklif içindeki başarısız sigorta ürününün işlenmesini yeniden deneme talebi.\n */\nexport interface RetryFailedProposalProductRequest {\n /**\n * The unique identifier of the proposal\n * Teklifin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * The unique identifier of the failed product to retry\n * Yeniden denenecek başarısız ürünün benzersiz tanımlayıcısı\n */\n readonly proposalProductId: string;\n}\n\n// ============================================================================\n// RESPONSE TYPES\n// ============================================================================\n\n/**\n * Create Proposal Response\n *\n * Response returned after successfully creating a new insurance proposal.\n *\n * Yeni bir sigorta teklifini başarıyla oluşturduktan sonra döndürülen yanıt.\n */\nexport interface CreateProposalResult {\n /**\n * Unique identifier of the newly created insurance proposal\n * Yeni oluşturulan sigorta teklifinin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n}\n\n/**\n * Get Proposal By ID Response\n *\n * Response for retrieving detailed information about a specific insurance proposal by its ID.\n *\n * Belirli bir sigorta teklifinin ID'sine göre detaylı bilgilerini alma yanıtı.\n */\nexport interface GetProposalByIdResult {\n /**\n * Unique identifier of the insurance proposal\n * Sigorta teklifinin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * Insurance product branch that this proposal belongs to\n * Bu teklifin ait olduğu sigorta ürün dalı\n */\n readonly productBranch: ProductBranch;\n\n /**\n * Total number of insurance products included in this proposal\n * Bu teklifte yer alan toplam sigorta ürün sayısı\n */\n readonly totalProductsCount: number;\n\n /**\n * Number of insurance products that successfully generated quotes\n * Başarıyla teklif üreten sigorta ürün sayısı\n */\n readonly succeedProductsCount: number;\n\n /**\n * Reference to the agent user who created this proposal\n * Bu teklifi oluşturan acente kullanıcısına referans\n */\n readonly agentUserCreatedBy: UserReference;\n\n /**\n * Reference to the representative handling this proposal, if any\n * Varsa, bu teklifi işleyen temsilciye referans\n */\n readonly representedBy?: UserReference | null;\n\n /**\n * Timestamp when this proposal was created\n * Bu teklifin oluşturulduğu zaman damgası\n */\n readonly createdAt: string;\n\n /**\n * Current state of the proposal in the processing workflow\n * İşleme iş akışındaki teklifin mevcut durumu\n */\n readonly state: ProposalState;\n\n /**\n * Sales channel through which this proposal was created\n * Bu teklifin oluşturulduğu satış kanalı\n */\n readonly channel: Channel;\n\n /**\n * Lowest premium amount among all successful product quotes\n * Tüm başarılı ürün teklifleri arasındaki en düşük prim tutarı\n */\n readonly lowestPremium?: number | null;\n\n /**\n * Customer ID of the insurance policy holder/payer\n * Sigorta poliçe sahibi/ödeyicisinin müşteri ID'si\n */\n readonly insurerCustomerId: string;\n\n /**\n * Customer ID of the person/entity being insured\n * Sigortalanan kişi/kuruluşun müşteri ID'si\n */\n readonly insuredCustomerId: string;\n\n /**\n * Highest premium amount among all successful product quotes\n * Tüm başarılı ürün teklifleri arasındaki en yüksek prim tutarı\n */\n readonly highestPremium?: number | null;\n\n /**\n * Initial coverage configuration specified when creating the proposal\n * Teklif oluşturulurken belirtilen başlangıç teminat konfigürasyonu\n */\n readonly initialCoverage?: Coverage | null;\n\n /**\n * Collection of insurance products and their quotes from various companies\n * Çeşitli şirketlerden sigorta ürünleri ve tekliflerinin koleksiyonu\n */\n readonly products: readonly {\n /**\n * Unique identifier for this product quote\n * Bu ürün teklifinin benzersiz tanımlayıcısı\n */\n readonly id: string;\n\n /**\n * Identifier of the insurance company providing this quote\n * Bu teklifi sunan sigorta şirketinin tanımlayıcısı\n */\n readonly insuranceCompanyId: number;\n\n /**\n * Identifier of the specific insurance product\n * Belirli sigorta ürününün tanımlayıcısı\n */\n readonly productId: number;\n\n /**\n * Premium calculations for different payment installments\n * Farklı ödeme taksitleri için prim hesaplamaları\n */\n readonly premiums: readonly {\n /**\n * The installment number for this premium calculation\n * Bu prim hesaplaması için taksit numarası\n */\n readonly installmentNumber: number;\n\n /**\n * Net premium amount before taxes and fees\n * Vergi ve ücretler öncesi net prim tutarı\n */\n readonly netPremium: number;\n\n /**\n * Total premium amount including all taxes and fees\n * Tüm vergi ve ücretler dahil toplam prim tutarı\n */\n readonly grossPremium: number;\n\n /**\n * Commission amount for the agent or intermediary\n * Acente veya aracı için komisyon tutarı\n */\n readonly commission: number;\n\n /**\n * Exchange rate used for currency conversion if applicable\n * Uygulanabilirse döviz kuru dönüştürme için kullanılan kur\n */\n readonly exchangeRate: number;\n\n /**\n * Currency in which this premium is calculated\n * Bu primin hesaplandığı para birimi\n */\n readonly currency: Currency;\n\n /**\n * Insurance company's internal proposal or quote number\n * Sigorta şirketinin dahili teklif veya fiyat teklifi numarası\n */\n readonly insuranceCompanyProposalNumber?: string | null;\n }[];\n\n /**\n * Current processing state of this product quote\n * Bu ürün teklifinin mevcut işleme durumu\n */\n readonly state: ProposalProductState;\n\n /**\n * Indicates if this product requires manual investigation by the insurance company\n * Bu ürünün sigorta şirketi tarafından manuel inceleme gerektirip gerektirmediğini gösterir\n */\n readonly needsInvestigationByCompany: boolean;\n\n /**\n * Indicates if a vocational discount is applied to this quote\n * Bu teklife mesleki indirim uygulanıp uygulanmadığını gösterir\n */\n readonly hasVocationalDiscount: boolean;\n\n /**\n * Indicates if an undamaged/no-claims discount is applied\n * Hasarsızlık/talepsizlik indiriminin uygulanıp uygulanmadığını gösterir\n */\n readonly hasUndamagedDiscount: boolean;\n\n /**\n * Indicates if this product quote has been revised\n * Bu ürün teklifinin revize edilip edilmediğini gösterir\n */\n readonly revised: boolean;\n\n /**\n * Policy identifier if this product has been purchased\n * Bu ürün satın alınmışsa poliçe tanımlayıcısı\n */\n readonly policyId?: string | null;\n\n /**\n * Error message if the product quote failed\n * Ürün teklifi başarısız olursa hata mesajı\n */\n readonly errorMessage?: string | null;\n\n /**\n * Coverage as provided by the insurance service provider\n * Sigorta hizmet sağlayıcısı tarafından sağlanan teminat\n */\n readonly insuranceServiceProviderCoverage?: Coverage | null;\n\n /**\n * Coverage configuration used for PDF document generation\n * PDF belge oluşturma için kullanılan teminat konfigürasyonu\n */\n readonly pdfCoverage?: Coverage | null;\n\n /**\n * Original coverage requested for this specific product\n * Bu belirli ürün için talep edilen orijinal teminat\n */\n readonly initialCoverage?: Coverage | null;\n\n /**\n * Name of the insurance company providing this quote\n * Bu teklifi sunan sigorta şirketinin adı\n */\n readonly insuranceCompanyName: string;\n\n /**\n * Logo URL or identifier for the insurance company\n * Sigorta şirketi için logo URL'si veya tanımlayıcısı\n */\n readonly insuranceCompanyLogo?: string | null;\n\n /**\n * Name of the insurance product\n * Sigorta ürününün adı\n */\n readonly productName: string;\n\n /**\n * Type/category of the insurance product\n * Sigorta ürününün türü/kategorisi\n */\n readonly productType: InsuranceProductType;\n\n /**\n * Identifier of the coverage group this product belongs to\n * Bu ürünün ait olduğu teminat grubunun tanımlayıcısı\n */\n readonly coverageGroupId?: string | null;\n\n /**\n * Name of the coverage group this product belongs to\n * Bu ürünün ait olduğu teminat grubunun adı\n */\n readonly coverageGroupName?: string | null;\n\n /**\n * Payment options supported by this insurance product\n * Bu sigorta ürünü tarafından desteklenen ödeme seçenekleri\n */\n readonly supportedPaymentOptions: readonly PaymentOption[];\n }[];\n\n /**\n * Snapshot of the customer and asset data at the time of proposal creation\n * Teklif oluşturma anındaki müşteri ve varlık verilerinin anlık görüntüsü\n */\n readonly snapshot: ProposalSnapshot;\n\n /**\n * Coverage groups available for this proposal type\n * Bu teklif türü için mevcut teminat grupları\n */\n readonly coverageGroups: readonly {\n /**\n * Unique identifier for this coverage group\n * Bu teminat grubunun benzersiz tanımlayıcısı\n */\n readonly id: string;\n\n /**\n * Coverage configuration for this group\n * Bu grup için teminat konfigürasyonu\n */\n readonly coverage: Coverage;\n\n /**\n * Display name for this coverage group\n * Bu teminat grubunun görüntüleme adı\n */\n readonly name: string;\n }[];\n}\n\n/**\n * Get Proposal Product Premium Detail Response\n *\n * Detailed premium information for a specific insurance product within a proposal.\n *\n * Bir teklif içindeki belirli bir sigorta ürünü için detaylı prim bilgileri.\n */\nexport interface GetProposalProductPremiumDetailResult {\n /**\n * Unique identifier of the insurance proposal\n * Sigorta teklifinin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * Unique identifier of the specific product within the proposal\n * Teklif içindeki belirli ürünün benzersiz tanımlayıcısı\n */\n readonly proposalProductId: string;\n\n /**\n * Customer ID of the policy holder who will pay the premiums\n * Primleri ödeyecek poliçe sahibinin müşteri ID'si\n */\n readonly insurerCustomerId: string;\n\n /**\n * Customer ID of the person/entity being insured\n * Sigortalanan kişi/kuruluşun müşteri ID'si\n */\n readonly insuredCustomerId: string;\n\n /**\n * The installment number for this premium calculation\n * Bu prim hesaplaması için taksit numarası\n */\n readonly installmentNumber: number;\n\n /**\n * Internal identifier used by the insurance services system\n * Sigorta hizmetleri sistemi tarafından kullanılan dahili tanımlayıcı\n */\n readonly insuranceServicesProposalId: string;\n\n /**\n * Internal identifier for the premium calculation in insurance services\n * Sigorta hizmetlerinde prim hesaplaması için dahili tanımlayıcı\n */\n readonly insuranceServicesPremiumId: string;\n\n /**\n * Insurance company's internal proposal or quote number\n * Sigorta şirketinin dahili teklif veya fiyat teklifi numarası\n */\n readonly insuranceCompanyProposalNumber?: string | null;\n}\n\n/**\n * Purchase Proposal Product Sync Response\n *\n * Response for synchronous purchase of an insurance product from a proposal.\n *\n * Bir tekliften sigorta ürününün senkron satın alınması için yanıt.\n */\nexport interface PurchaseProposalProductSyncResult {\n /**\n * The unique identifier of the newly created insurance policy\n * Yeni oluşturulan sigorta poliçesinin benzersiz tanımlayıcısı\n */\n readonly policyId: string;\n}\n\n/**\n * Purchase Proposal Product Async Response\n *\n * Response for asynchronous purchase of an insurance product from a proposal.\n *\n * Bir tekliften sigorta ürününün asenkron satın alınması için yanıt.\n */\nexport interface PurchaseProposalProductAsyncResult {\n /**\n * URL where the customer should be redirected to complete the purchase\n * Müşterinin satın almayı tamamlamak için yönlendirilmesi gereken URL\n */\n readonly redirectUrl: string;\n}\n\n/**\n * Get Proposal Product Coverage Response\n *\n * Response containing coverage details for a specific insurance product within a proposal.\n *\n * Bir teklif içindeki belirli bir sigorta ürünü için teminat detaylarını içeren yanıt.\n */\nexport interface GetProposalProductCoverageResult {\n /**\n * The complete coverage configuration for the requested insurance product\n * Talep edilen sigorta ürünü için tam teminat konfigürasyonu\n */\n readonly coverage: Coverage;\n}\n\n/**\n * Revise Proposal Response\n *\n * Response after successfully revising an existing insurance proposal.\n *\n * Mevcut bir sigorta teklifini başarıyla revize ettikten sonraki yanıt.\n */\nexport interface ReviseProposalResult {\n /**\n * The unique identifier of the revised proposal\n * Revize edilmiş teklifin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n}\n\n/**\n * Fetch Proposal Product Document Response\n *\n * Response containing URL for accessing a specific proposal product document.\n *\n * Belirli bir teklif ürün belgesine erişim için URL içeren yanıt.\n */\nexport interface FetchProposalProductDocumentResult {\n /**\n * The URL to access or download the proposal product document\n * Teklif ürün belgesine erişmek veya indirmek için URL\n */\n readonly url: string;\n}\n\n/**\n * Fetch Proposal Information Form Document Response\n *\n * Response containing URL for accessing the proposal information form document.\n *\n * Teklif bilgi formu belgesine erişim için URL içeren yanıt.\n */\nexport interface FetchProposalInformationFormDocumentResult {\n /**\n * The URL to access or download the proposal information form document\n * Teklif bilgi formu belgesine erişmek veya indirmek için URL\n */\n readonly url: string;\n}\n\n/**\n * Generate Compare Proposal Products PDF Result\n *\n * Result of generating a comparison PDF document for multiple proposal products.\n *\n * Birden fazla teklif ürünü için karşılaştırma PDF belgesi oluşturma sonucu.\n */\nexport interface GenerateCompareProposalProductsPdfResult {\n /**\n * The URL to access or download the generated comparison PDF document\n * Oluşturulan karşılaştırma PDF belgesine erişmek veya indirmek için URL\n */\n readonly url: string;\n}\n\n// ============================================================================\n// BRANCH ASSIGNMENT TYPES\n// ============================================================================\n\n/**\n * Request to set proposal branch\n */\nexport interface SetProposalBranchRequest {\n readonly proposalId: string;\n readonly branchId: string;\n}\n\n// ============================================================================\n// CUSTOMER PROPOSAL DOCUMENT TYPES\n// ============================================================================\n\n/**\n * Request to generate customer proposal document PDF\n */\nexport interface GenerateCustomerProposalDocumentPdfRequest {\n readonly proposalId: string;\n readonly proposalProductIds: readonly string[];\n}\n\n/**\n * Response for generated customer proposal document PDF\n */\nexport interface GenerateCustomerProposalDocumentPdfResult {\n readonly url: string;\n}\n\n// ============================================================================\n// CONVERSION ANALYTICS TYPES\n// ============================================================================\n\n/**\n * Request for proposal conversion trend analytics\n */\nexport interface GetProposalConversionTrendRequest {\n readonly startDate: string;\n readonly endDate: string;\n}\n\n/**\n * Conversion data point\n */\nexport interface ConversionDataPoint {\n readonly date: string;\n readonly proposalCount: number;\n readonly policyCount: number;\n readonly conversionRate: number;\n}\n\n/**\n * Response for proposal conversion trend analytics\n */\nexport interface GetProposalConversionTrendResult {\n readonly timeSeries: readonly ConversionDataPoint[];\n readonly conversionRate: number;\n}\n","/**\n * @fileoverview Common GraphQL Types\n * @description Shared types for GraphQL operations including pagination and connection patterns\n */\n\n// Re-export date types from common location\nexport { DateTime, DateOnly } from \"../common.date.js\";\nimport type { DateTime, DateOnly } from \"../common.date.js\";\n\n/**\n * Information about pagination in a connection.\n */\nexport interface PageInfo {\n /**\n * Indicates whether more edges exist following the set defined by the clients arguments.\n */\n hasNextPage: boolean;\n\n /**\n * Indicates whether more edges exist prior the set defined by the clients arguments.\n */\n hasPreviousPage: boolean;\n\n /**\n * When paginating backwards, the cursor to continue.\n */\n startCursor?: string | null;\n\n /**\n * When paginating forwards, the cursor to continue.\n */\n endCursor?: string | null;\n}\n\n/**\n * Information about the offset pagination.\n */\nexport interface CollectionSegmentInfo {\n /**\n * Indicates whether more items exist following the set defined by the clients arguments.\n */\n hasNextPage: boolean;\n\n /**\n * Indicates whether more items exist prior the set defined by the clients arguments.\n */\n hasPreviousPage: boolean;\n}\n\n/**\n * Generic interface for a connection edge\n */\nexport interface Edge<T> {\n /**\n * A cursor for use in pagination.\n */\n cursor: string;\n\n /**\n * The item at the end of the edge.\n */\n node?: T | null;\n}\n\n/**\n * Generic interface for a connection\n */\nexport interface Connection<T> {\n /**\n * Information to aid in pagination.\n */\n pageInfo: PageInfo;\n\n /**\n * A list of edges.\n */\n edges?: Edge<T>[] | null;\n\n /**\n * A flattened list of the nodes.\n */\n nodes?: (T | null)[] | null;\n\n /**\n * Identifies the total count of items in the connection.\n * Only present when includeTotalCount is true (default).\n */\n totalCount: number;\n}\n\n/**\n * Connection type with optional totalCount (when includeTotalCount is false)\n */\nexport interface ConnectionWithOptionalCount<T>\n extends Omit<Connection<T>, \"totalCount\"> {\n totalCount?: number;\n}\n\n/**\n * Sort direction enum\n */\nexport enum SortEnumType {\n ASC = \"ASC\",\n DESC = \"DESC\",\n}\n\n/**\n * Score modification options. Specify either boost or constant, but not both.\n */\nexport interface SearchScoreInput {\n /**\n * Multiply the score by a given value or by the value of a numeric field\n */\n boost?: number | null;\n\n /**\n * Replace the score with a constant value\n */\n constant?: number | null;\n}\n\n/**\n * Input for text search operations with optional score modification\n */\nexport interface SearchTextInput {\n /**\n * The search query string\n */\n value: string;\n\n /**\n * Optional score modification options\n */\n score?: SearchScoreInput | null;\n}\n\n// === Filter Operation Inputs ===\n\nexport interface BooleanOperationFilterInput {\n eq?: boolean | null;\n neq?: boolean | null;\n}\n\nexport interface StringOperationFilterInput {\n and?: StringOperationFilterInput[] | null;\n or?: StringOperationFilterInput[] | null;\n eq?: string | null;\n neq?: string | null;\n contains?: string | null;\n ncontains?: string | null;\n in?: (string | null)[] | null;\n nin?: (string | null)[] | null;\n startsWith?: string | null;\n nstartsWith?: string | null;\n endsWith?: string | null;\n nendsWith?: string | null;\n}\n\nexport interface IntOperationFilterInput {\n eq?: number | null;\n neq?: number | null;\n in?: (number | null)[] | null;\n nin?: (number | null)[] | null;\n gt?: number | null;\n ngt?: number | null;\n gte?: number | null;\n ngte?: number | null;\n lt?: number | null;\n nlt?: number | null;\n lte?: number | null;\n nlte?: number | null;\n}\n\nexport interface FloatOperationFilterInput {\n eq?: number | null;\n neq?: number | null;\n in?: (number | null)[] | null;\n nin?: (number | null)[] | null;\n gt?: number | null;\n ngt?: number | null;\n gte?: number | null;\n ngte?: number | null;\n lt?: number | null;\n nlt?: number | null;\n lte?: number | null;\n nlte?: number | null;\n}\n\n/** Acceptable date/time value for filter inputs */\ntype DateTimeValue = string | DateTime | Date;\n\n/** Acceptable date-only value for filter inputs */\ntype DateOnlyValue = string | DateOnly | Date;\n\nexport interface DateTimeOperationFilterInput {\n eq?: DateTimeValue | null;\n neq?: DateTimeValue | null;\n in?: (DateTimeValue | null)[] | null;\n nin?: (DateTimeValue | null)[] | null;\n gt?: DateTimeValue | null;\n ngt?: DateTimeValue | null;\n gte?: DateTimeValue | null;\n ngte?: DateTimeValue | null;\n lt?: DateTimeValue | null;\n nlt?: DateTimeValue | null;\n lte?: DateTimeValue | null;\n nlte?: DateTimeValue | null;\n}\n\nexport interface LocalDateOperationFilterInput {\n eq?: DateOnlyValue | null;\n neq?: DateOnlyValue | null;\n in?: (DateOnlyValue | null)[] | null;\n nin?: (DateOnlyValue | null)[] | null;\n gt?: DateOnlyValue | null;\n ngt?: DateOnlyValue | null;\n gte?: DateOnlyValue | null;\n ngte?: DateOnlyValue | null;\n lt?: DateOnlyValue | null;\n nlt?: DateOnlyValue | null;\n lte?: DateOnlyValue | null;\n nlte?: DateOnlyValue | null;\n}\n\nexport interface UuidOperationFilterInput {\n eq?: string | null;\n neq?: string | null;\n in?: (string | null)[] | null;\n nin?: (string | null)[] | null;\n gt?: string | null;\n ngt?: string | null;\n gte?: string | null;\n ngte?: string | null;\n lt?: string | null;\n nlt?: string | null;\n lte?: string | null;\n nlte?: string | null;\n}\n\n// === Search Operation Inputs ===\n\nexport interface SearchStringOperationFilterInput {\n and?: SearchStringOperationFilterInput[] | null;\n or?: SearchStringOperationFilterInput[] | null;\n eq?: string | null;\n neq?: string | null;\n in?: (string | null)[] | null;\n nin?: (string | null)[] | null;\n textSearch?: SearchTextInput | null;\n wildcard?: SearchTextInput | null;\n autocomplete?: SearchTextInput | null;\n}\n\n// === Generic Filter/Search Input Types ===\n\n/**\n * Generic enum filter input. Works with any enum type.\n */\nexport interface EnumOperationFilterInput<T> {\n eq?: T | null;\n neq?: T | null;\n in?: (T | null)[] | null;\n nin?: (T | null)[] | null;\n}\n\n/**\n * Generic list/array filter input. Used for filtering array fields.\n */\nexport interface ListFilterInputType<T> {\n all?: T | null;\n none?: T | null;\n some?: T | null;\n any?: boolean | null;\n}\n\n/**\n * Maps TypeScript types to their corresponding GraphQL filter input types.\n * - DateTime → DateTimeOperationFilterInput\n * - DateOnly → LocalDateOperationFilterInput\n * - Date → DateTimeOperationFilterInput\n * - string → StringOperationFilterInput\n * - number → IntOperationFilterInput\n * - boolean → BooleanOperationFilterInput\n * - arrays → ListFilterInputType with recursive ModelFilterInput\n * - objects → recursive ModelFilterInput\n * - enums → EnumOperationFilterInput\n */\nexport type FilterInputForType<T> = T extends DateTime\n ? DateTimeOperationFilterInput\n : T extends DateOnly\n ? LocalDateOperationFilterInput\n : T extends Date\n ? DateTimeOperationFilterInput\n : T extends string\n ? StringOperationFilterInput\n : T extends number\n ? IntOperationFilterInput\n : T extends boolean\n ? BooleanOperationFilterInput\n : T extends unknown[]\n ? ListFilterInputType<ModelFilterInput<UnwrapArray<T>>>\n : T extends Record<string, unknown>\n ? ModelFilterInput<T>\n : EnumOperationFilterInput<NonNullable<T>>;\n\n/**\n * Auto-generates a filter input type from any model.\n * Includes and/or combinators and maps each field to its appropriate filter type.\n *\n * @example\n * type CustomerFilter = ModelFilterInput<QueryCustomerModel>;\n * // Generates: { and?, or?, id?, name?, type?, agentBranch?, consents?, ... }\n */\nexport type ModelFilterInput<T> = {\n and?: ModelFilterInput<T>[] | null;\n or?: ModelFilterInput<T>[] | null;\n} & {\n [K in keyof T]?: FilterInputForType<NonNullable<T[K]>> | null;\n};\n\n/**\n * Maps TypeScript types to their corresponding GraphQL search input types.\n * Similar to FilterInputForType but uses SearchStringOperationFilterInput for strings.\n * Dates use the same filter inputs as in FilterInputForType.\n */\nexport type SearchInputForType<T> = T extends DateTime\n ? DateTimeOperationFilterInput\n : T extends DateOnly\n ? LocalDateOperationFilterInput\n : T extends Date\n ? DateTimeOperationFilterInput\n : T extends string\n ? SearchStringOperationFilterInput\n : T extends number\n ? IntOperationFilterInput\n : T extends boolean\n ? BooleanOperationFilterInput\n : T extends unknown[]\n ? ListFilterInputType<ModelSearchInput<UnwrapArray<T>>>\n : T extends Record<string, unknown>\n ? ModelSearchInput<T>\n : EnumOperationFilterInput<NonNullable<T>>;\n\n/**\n * Auto-generates a search input type from any model.\n * Similar to ModelFilterInput but uses search-specific string operations.\n *\n * @example\n * type CustomerSearch = ModelSearchInput<QueryCustomerModel>;\n */\nexport type ModelSearchInput<T> = {\n and?: ModelSearchInput<T>[] | null;\n or?: ModelSearchInput<T>[] | null;\n} & {\n [K in keyof T]?: SearchInputForType<NonNullable<T[K]>> | null;\n};\n\n/**\n * Generic query options for GraphQL connection queries.\n * Includes pagination, filtering, searching, and sorting.\n */\nexport interface GetQueryOptions<\n TFieldKey extends string = string,\n TFilter = unknown,\n TSearch = unknown,\n TSort = unknown,\n> {\n /** Fields to select from the query */\n select?: TFieldKey[];\n /** Returns the first _n_ elements from the list */\n first?: number | null;\n /** Returns the elements in the list that come after the specified cursor */\n after?: string | null;\n /** Returns the last _n_ elements from the list */\n last?: number | null;\n /** Returns the elements in the list that come before the specified cursor */\n before?: string | null;\n /** Search criteria */\n search?: TSearch | null;\n /** Filter criteria */\n filter?: TFilter | null;\n /** Sort order */\n order?: TSort[] | null;\n /**\n * Whether to include totalCount in the response.\n * Set to false to improve query performance when count is not needed.\n * @default true\n */\n includeTotalCount?: boolean;\n}\n\n// === Field Selection Utility Types ===\n\n/**\n * Extracts element type from arrays, unwraps nullable types.\n */\ntype UnwrapType<T> = T extends (infer E)[] ? E : NonNullable<T>;\n\n/**\n * Checks if a type is a nested object (not primitive/Date/DateTime/DateOnly).\n */\ntype IsNestedObject<T> = T extends\n | string\n | number\n | boolean\n | Date\n | DateTime\n | DateOnly\n | null\n | undefined\n ? false\n : T extends object\n ? true\n : false;\n\n/**\n * Generic utility to create field keys with nested dot-notation paths.\n * - Primitive fields: \"id\", \"name\" (as-is)\n * - Objects/Arrays: ONLY nested paths allowed, e.g. \"agentBranch.id\", \"consents.consentType\"\n * - Parent keys alone (\"agentBranch\", \"consents\") are NOT in the union\n *\n * @example\n * interface User {\n * id: string;\n * profile: { name: string; age: number };\n * tags: { label: string }[];\n * }\n * type UserFieldKey = DeepFieldKeys<User>;\n * // Result: \"id\" | \"profile.name\" | \"profile.age\" | \"tags.label\"\n */\nexport type DeepFieldKeys<T> = {\n [K in keyof T]-?: K extends string\n ? IsNestedObject<UnwrapType<T[K]>> extends true\n ? `${K}.${keyof UnwrapType<T[K]> & string}`\n : K\n : never;\n}[keyof T];\n\n/**\n * Extracts the parent key from a nested field path (e.g., \"agentBranch.id\" -> \"agentBranch\")\n */\nexport type ExtractParent<T extends string> =\n T extends `${infer Parent}.${string}` ? Parent : never;\n\n/**\n * Checks if a field key is a nested path\n */\nexport type IsNestedPath<T extends string> = T extends `${string}.${string}`\n ? true\n : false;\n\n/**\n * Extracts simple (non-nested) field keys from an array\n */\nexport type SimpleFields<T extends readonly string[]> = {\n [K in T[number]]: IsNestedPath<K> extends false ? K : never;\n}[T[number]];\n\n/**\n * Gets all unique parent keys from nested paths in an array\n */\nexport type NestedParents<T extends readonly string[]> = {\n [K in T[number]]: ExtractParent<K>;\n}[T[number]];\n\n/**\n * Gets all nested keys for a specific parent from an array\n */\nexport type NestedKeysForParent<\n T extends readonly string[],\n Parent extends string,\n> = {\n [K in T[number]]: K extends `${Parent}.${infer Key}` ? Key : never;\n}[T[number]];\n\n/**\n * Helper to unwrap array element type\n */\nexport type UnwrapArray<T> = T extends (infer E)[] ? E : T;\n\n/**\n * Generic helper type to pick selected fields from a model.\n * Handles both simple fields and nested paths:\n * - Simple fields: picked directly from Model\n * - Nested paths: parent field is included with picked nested fields\n */\nexport type PickFields<Model, T extends readonly string[]> = {\n // Simple fields\n [K in SimpleFields<T> & keyof Model]: Model[K];\n} & {\n // Nested object fields (non-array)\n [K in NestedParents<T> & keyof Model as Model[K] extends\n | unknown[]\n | null\n | undefined\n ? never\n : K]?: Pick<\n NonNullable<Model[K]>,\n NestedKeysForParent<T, K> & keyof NonNullable<Model[K]>\n > | null;\n} & {\n // Nested array fields\n [K in NestedParents<T> & keyof Model as Model[K] extends unknown[]\n ? K\n : never]: Pick<\n UnwrapArray<Model[K]>,\n NestedKeysForParent<T, K> & keyof UnwrapArray<Model[K]>\n >[];\n};\n\n/**\n * Builds GraphQL field selection string from field keys with dot-notation support.\n * Groups nested field paths by their parent.\n *\n * @example\n * buildFieldSelection([\"id\", \"name\", \"agentBranch.id\", \"agentBranch.name\"])\n * // Returns: \"id\\nname\\nagentBranch { id name }\"\n *\n * @param fields Array of field keys (can include dot-notation for nested fields)\n * @param indent Indentation string for formatting (default: 12 spaces)\n */\nexport function buildFieldSelection(\n fields: readonly string[],\n indent = \" \",\n): string {\n const simpleFields: string[] = [];\n const nestedFields: Map<string, string[]> = new Map();\n\n for (const field of fields) {\n const dotIndex = field.indexOf(\".\");\n if (dotIndex !== -1) {\n const parent = field.slice(0, dotIndex);\n const nested = field.slice(dotIndex + 1);\n if (!nestedFields.has(parent)) {\n nestedFields.set(parent, []);\n }\n nestedFields.get(parent)!.push(nested);\n } else {\n simpleFields.push(field);\n }\n }\n\n const selections: string[] = [...simpleFields];\n\n for (const [parent, nestedKeys] of nestedFields) {\n selections.push(`${parent} { ${nestedKeys.join(\" \")} }`);\n }\n\n return selections.join(`\\n${indent}`);\n}\n","/**\n * @fileoverview Customer GraphQL Types\n * @description Types for querying customers via GraphQL\n */\n\nimport type {\n Connection,\n Edge,\n SortEnumType,\n DeepFieldKeys,\n PickFields,\n ModelFilterInput,\n ModelSearchInput,\n GetQueryOptions,\n} from \"./common.js\";\nimport type { DateTime, DateOnly } from \"../common.date.js\";\n\nimport type { CustomerType } from \"../common.js\";\nimport type {\n ConsentType,\n EducationStatus,\n Gender,\n Job,\n MaritalStatus,\n Nationality,\n} from \"../customers.js\";\n\n// === Output Types ===\n\nexport interface CustomerAgentBranchInfo {\n id: string;\n name: string;\n parentId?: string | null;\n parentName?: string | null;\n}\n\nexport interface QueryCustomerConsentModel {\n consentType: ConsentType;\n isActive: boolean;\n}\n\nexport interface QueryCustomerModel {\n agentBranch?: CustomerAgentBranchInfo | null;\n agentBranchId?: string | null;\n id: string;\n name?: string | null;\n identityNumber?: string | null;\n taxNumber?: string | null;\n type: CustomerType;\n primaryEmail?: string | null;\n primaryPhoneNumber?: string | null;\n primaryPhoneNumberCountryCode?: number | null;\n cityText?: string | null;\n cityValue?: string | null;\n districtText?: string | null;\n districtValue?: string | null;\n createdAt: DateTime;\n birthDate?: DateOnly | null;\n gender?: Gender | null;\n educationStatus?: EducationStatus | null;\n nationality?: Nationality | null;\n maritalStatus?: MaritalStatus | null;\n job?: Job | null;\n passportNumber?: string | null;\n searchScore?: number | null;\n consents: QueryCustomerConsentModel[];\n}\n\n// === Filter/Search/Sort Inputs (auto-generated from model) ===\n\n/**\n * Filter input for QueryCustomerModel.\n * Auto-generated from model fields using ModelFilterInput.\n */\nexport type QueryCustomerModelFilterInput =\n ModelFilterInput<QueryCustomerModel>;\n\n/**\n * Search input for QueryCustomerModel.\n * Auto-generated from model fields using ModelSearchInput.\n */\nexport type QueryCustomerModelSearchInput =\n ModelSearchInput<QueryCustomerModel>;\n\n/**\n * Sort input for QueryCustomerModel.\n * Note: Sort fields are explicitly defined as they may differ from model fields.\n */\nexport interface QueryCustomerModelSortInput {\n name?: SortEnumType | null;\n createdAt?: SortEnumType | null;\n birthDate?: SortEnumType | null;\n searchScore?: SortEnumType | null;\n}\n\n// === Connection Types ===\n\nexport type CustomersEdge = Edge<QueryCustomerModel>;\nexport type CustomersConnection<\n TFields extends readonly CustomerFieldKey[] = readonly CustomerFieldKey[],\n> = Connection<PickCustomerFields<TFields>>;\n\n// === Select Options ===\n\n/**\n * All available field keys for QueryCustomerModel with nested dot-notation paths.\n * - Primitive fields: \"id\", \"name\", etc. (as-is)\n * - Objects/Arrays: ONLY nested paths allowed, e.g. \"agentBranch.id\", \"consents.consentType\"\n * - Parent keys alone (\"agentBranch\", \"consents\") are NOT allowed\n */\nexport type CustomerFieldKey = DeepFieldKeys<QueryCustomerModel>;\n\n/**\n * Runtime array of all customer field keys including nested paths.\n */\nexport const ALL_CUSTOMER_FIELDS = [\n // Primitive fields\n \"agentBranchId\",\n \"id\",\n \"name\",\n \"identityNumber\",\n \"taxNumber\",\n \"type\",\n \"primaryEmail\",\n \"primaryPhoneNumber\",\n \"primaryPhoneNumberCountryCode\",\n \"cityText\",\n \"cityValue\",\n \"districtText\",\n \"districtValue\",\n \"createdAt\",\n \"birthDate\",\n \"gender\",\n \"educationStatus\",\n \"nationality\",\n \"maritalStatus\",\n \"job\",\n \"passportNumber\",\n \"searchScore\",\n // Nested agentBranch fields\n \"agentBranch.id\",\n \"agentBranch.name\",\n \"agentBranch.parentId\",\n \"agentBranch.parentName\",\n // Nested consents fields\n \"consents.consentType\",\n \"consents.isActive\",\n] as const satisfies readonly CustomerFieldKey[];\n\n/**\n * Helper type to pick selected fields from QueryCustomerModel.\n * Uses the generic PickFields utility from common.ts.\n */\nexport type PickCustomerFields<T extends readonly CustomerFieldKey[]> =\n PickFields<QueryCustomerModel, T>;\n\n/**\n * Type-safe connection result based on selected fields\n */\nexport interface SelectedCustomersConnection<\n TFields extends CustomerFieldKey[],\n> extends Omit<CustomersConnection, \"nodes\" | \"edges\"> {\n nodes?: (PickCustomerFields<TFields> | null)[] | null;\n edges?:\n | (Omit<CustomersEdge, \"node\"> & {\n node?: PickCustomerFields<TFields> | null;\n })[]\n | null;\n}\n\n/**\n * Options for getCustomers query.\n * Extends GetQueryOptions with customer-specific types.\n */\nexport interface GetCustomersOptions<\n TFields extends CustomerFieldKey[] = CustomerFieldKey[],\n> extends GetQueryOptions<\n CustomerFieldKey,\n QueryCustomerModelFilterInput,\n QueryCustomerModelSearchInput,\n QueryCustomerModelSortInput\n> {\n /** Fields to select from the query. If not provided, all fields are returned. */\n select?: TFields;\n}\n","/**\n * @fileoverview Policy GraphQL Types\n * @description Types for querying policies via GraphQL\n */\n\nimport type {\n Connection,\n Edge,\n SortEnumType,\n DeepFieldKeys,\n PickFields,\n ModelFilterInput,\n ModelSearchInput,\n GetQueryOptions,\n} from \"./common.js\";\nimport type { DateTime, DateOnly } from \"../common.date.js\";\n\nimport type {\n ProductBranch,\n Currency,\n PaymentOption,\n PolicyState,\n Channel,\n CustomerType,\n} from \"../common.js\";\nimport type { VehicleFuelType } from \"../common.vehicle.js\";\n\n// === Output Types ===\n\nexport interface PolicyAgentBranchInfo {\n id: string;\n name: string;\n parentId?: string | null;\n parentName?: string | null;\n}\n\nexport interface PolicyUserReference {\n id: string;\n name: string;\n email?: string | null;\n userType?: UserType | null;\n}\n\nexport enum UserType {\n None = \"NONE\",\n AdminPanel = \"ADMIN_PANEL\",\n Agent = \"AGENT\",\n Customer = \"CUSTOMER\",\n}\n\nexport interface QueryPoliciesResult {\n agentBranch?: PolicyAgentBranchInfo | null;\n agentBranchId?: string | null;\n id: string;\n insurerCustomerId: string;\n insuredCustomerId: string;\n installmentNumber?: number | null;\n productBranch: ProductBranch;\n netPremium?: number | null;\n grossPremium?: number | null;\n commission?: number | null;\n paymentType: PaymentOption;\n currency: Currency;\n insuranceCompanyProposalNumber: string;\n insuranceCompanyPolicyNumber: string;\n createdAt: DateTime;\n startDate: DateOnly;\n endDate: DateOnly;\n arrangementDate?: DateOnly | null;\n insuredCustomerName?: string | null;\n insuredCustomerIdentityNumber?: string | null;\n insuredCustomerTaxNumber?: string | null;\n insuredCustomerType: CustomerType;\n insuredCustomerCityText?: string | null;\n insuredCustomerCityValue?: string | null;\n insuredCustomerDistrictText?: string | null;\n insuredCustomerDistrictValue?: string | null;\n insuredCustomerBirthDate?: DateOnly | null;\n insurerCustomerName?: string | null;\n insurerCustomerIdentityNumber?: string | null;\n insurerCustomerTaxNumber?: string | null;\n insurerCustomerCityText?: string | null;\n insurerCustomerCityValue?: string | null;\n insurerCustomerDistrictText?: string | null;\n insurerCustomerDistrictValue?: string | null;\n insurerCustomerBirthDate?: DateOnly | null;\n vehiclePlateCode?: string | null;\n vehiclePlateCity?: number | null;\n vehicleDocumentSerialCode?: string | null;\n vehicleDocumentSerialNumber?: string | null;\n vehicleModelBrandText?: string | null;\n vehicleModelBrandValue?: string | null;\n vehicleModelTypeText?: string | null;\n vehicleModelTypeValue?: string | null;\n vehicleModelYear?: number | null;\n vehicleFuelType?: VehicleFuelType | null;\n productId?: number | null;\n productName?: string | null;\n insuranceCompanyId: number;\n insuranceCompanyName: string;\n insuranceCompanyLogo?: string | null;\n state: PolicyState;\n createdBy: PolicyUserReference;\n representedBy?: PolicyUserReference | null;\n propertyNumber?: number | null;\n daskOldPolicyNumber?: number | null;\n daskPolicyNumber?: string | null;\n vehicleId?: string | null;\n propertyId?: string | null;\n channel: Channel;\n campaign?: string | null;\n}\n\n// === Filter/Search/Sort Inputs (auto-generated from model) ===\n\n/**\n * Filter input for QueryPoliciesResult.\n * Auto-generated from model fields using ModelFilterInput.\n */\nexport type QueryPoliciesResultFilterInput =\n ModelFilterInput<QueryPoliciesResult>;\n\n/**\n * Search input for QueryPoliciesResult.\n * Auto-generated from model fields using ModelSearchInput.\n */\nexport type QueryPoliciesResultSearchInput =\n ModelSearchInput<QueryPoliciesResult>;\n\n/**\n * Sort input for QueryPoliciesResult.\n * Note: Sort fields are explicitly defined as they may differ from model fields.\n */\nexport interface QueryPoliciesResultSortInput {\n netPremium?: SortEnumType | null;\n grossPremium?: SortEnumType | null;\n createdAt?: SortEnumType | null;\n startDate?: SortEnumType | null;\n endDate?: SortEnumType | null;\n arrangementDate?: SortEnumType | null;\n vehicleModelYear?: SortEnumType | null;\n}\n\n// === Connection Types ===\n\nexport type PoliciesEdge = Edge<QueryPoliciesResult>;\nexport type PoliciesConnection<\n TFields extends readonly PolicyFieldKey[] = readonly PolicyFieldKey[],\n> = Connection<PickPolicyFields<TFields>>;\n\n// === Select Options ===\n\n/**\n * All available field keys for QueryPoliciesResult with nested dot-notation paths.\n */\nexport type PolicyFieldKey = DeepFieldKeys<QueryPoliciesResult>;\n\n/**\n * Runtime array of all policy field keys including nested paths.\n */\nexport const ALL_POLICY_FIELDS = [\n // Primitive fields\n \"agentBranchId\",\n \"id\",\n \"insurerCustomerId\",\n \"insuredCustomerId\",\n \"installmentNumber\",\n \"productBranch\",\n \"netPremium\",\n \"grossPremium\",\n \"commission\",\n \"paymentType\",\n \"currency\",\n \"insuranceCompanyProposalNumber\",\n \"insuranceCompanyPolicyNumber\",\n \"createdAt\",\n \"startDate\",\n \"endDate\",\n \"arrangementDate\",\n \"insuredCustomerName\",\n \"insuredCustomerIdentityNumber\",\n \"insuredCustomerTaxNumber\",\n \"insuredCustomerType\",\n \"insuredCustomerCityText\",\n \"insuredCustomerCityValue\",\n \"insuredCustomerDistrictText\",\n \"insuredCustomerDistrictValue\",\n \"insuredCustomerBirthDate\",\n \"insurerCustomerName\",\n \"insurerCustomerIdentityNumber\",\n \"insurerCustomerTaxNumber\",\n \"insurerCustomerCityText\",\n \"insurerCustomerCityValue\",\n \"insurerCustomerDistrictText\",\n \"insurerCustomerDistrictValue\",\n \"insurerCustomerBirthDate\",\n \"vehiclePlateCode\",\n \"vehiclePlateCity\",\n \"vehicleDocumentSerialCode\",\n \"vehicleDocumentSerialNumber\",\n \"vehicleModelBrandText\",\n \"vehicleModelBrandValue\",\n \"vehicleModelTypeText\",\n \"vehicleModelTypeValue\",\n \"vehicleModelYear\",\n \"vehicleFuelType\",\n \"productId\",\n \"productName\",\n \"insuranceCompanyId\",\n \"insuranceCompanyName\",\n \"insuranceCompanyLogo\",\n \"state\",\n \"propertyNumber\",\n \"daskOldPolicyNumber\",\n \"daskPolicyNumber\",\n \"vehicleId\",\n \"propertyId\",\n \"channel\",\n \"campaign\",\n // Nested agentBranch fields\n \"agentBranch.id\",\n \"agentBranch.name\",\n \"agentBranch.parentId\",\n \"agentBranch.parentName\",\n // Nested createdBy fields\n \"createdBy.id\",\n \"createdBy.name\",\n \"createdBy.email\",\n \"createdBy.userType\",\n // Nested representedBy fields\n \"representedBy.id\",\n \"representedBy.name\",\n \"representedBy.email\",\n \"representedBy.userType\",\n] as const satisfies readonly PolicyFieldKey[];\n\n/**\n * Helper type to pick selected fields from QueryPoliciesResult.\n */\nexport type PickPolicyFields<T extends readonly PolicyFieldKey[]> = PickFields<\n QueryPoliciesResult,\n T\n>;\n\n/**\n * Type-safe connection result based on selected fields\n */\nexport interface SelectedPoliciesConnection<\n TFields extends PolicyFieldKey[],\n> extends Omit<PoliciesConnection, \"nodes\" | \"edges\"> {\n nodes?: (PickPolicyFields<TFields> | null)[] | null;\n edges?:\n | (Omit<PoliciesEdge, \"node\"> & {\n node?: PickPolicyFields<TFields> | null;\n })[]\n | null;\n}\n\n/**\n * Options for getPolicies query.\n * Extends GetQueryOptions with policy-specific types.\n */\nexport interface GetPoliciesOptions<\n TFields extends PolicyFieldKey[] = PolicyFieldKey[],\n> extends GetQueryOptions<\n PolicyFieldKey,\n QueryPoliciesResultFilterInput,\n QueryPoliciesResultSearchInput,\n QueryPoliciesResultSortInput\n> {\n /** Fields to select from the query. If not provided, all fields are returned. */\n select?: TFields;\n}\n","/**\n * @fileoverview Proposal GraphQL Types\n * @description Types for querying proposals via GraphQL\n */\n\nimport type {\n Connection,\n Edge,\n SortEnumType,\n DeepFieldKeys,\n PickFields,\n ModelFilterInput,\n ModelSearchInput,\n GetQueryOptions,\n} from \"./common.js\";\nimport type { DateTime, DateOnly } from \"../common.date.js\";\n\nimport type { ProductBranch, Channel, CustomerType } from \"../common.js\";\nimport type { VehicleFuelType, VehicleUtilizationStyle } from \"../common.vehicle.js\";\nimport type { ProposalState } from \"../proposals.js\";\nimport type { UserType } from \"./policies.js\";\n\n// === Output Types ===\n\nexport interface ProposalAgentBranchInfo {\n id: string;\n name: string;\n parentId?: string | null;\n parentName?: string | null;\n}\n\nexport interface ProposalUserReference {\n id: string;\n name: string;\n email?: string | null;\n userType?: UserType | null;\n}\n\nexport interface QueryProposalsResult {\n agentBranch?: ProposalAgentBranchInfo | null;\n agentBranchId?: string | null;\n id: string;\n productBranch: ProductBranch;\n state: ProposalState;\n insurerCustomerId: string;\n insuredCustomerId: string;\n productsCount: number;\n succeedProductsCount: number;\n createdAt: DateTime;\n agentUserCreatedBy: ProposalUserReference;\n successRate: number;\n insuredCustomerName: string;\n insuredCustomerIdentityNumber?: string | null;\n insuredCustomerTaxNumber?: string | null;\n insuredCustomerType: CustomerType;\n lowestPremium?: number | null;\n highestPremium?: number | null;\n channel: Channel;\n insuredCustomerCityText?: string | null;\n insuredCustomerCityValue?: string | null;\n insuredCustomerDistrictText?: string | null;\n insuredCustomerDistrictValue?: string | null;\n insuredCustomerPhoneNumber?: string | null;\n insuredCustomerPhoneNumberCountryCode?: number | null;\n insuredCustomerEmail?: string | null;\n vehiclePlateCode?: string | null;\n vehiclePlateCity?: number | null;\n vehicleDocumentSerialCode?: string | null;\n vehicleDocumentSerialNumber?: string | null;\n vehicleModelBrandText?: string | null;\n vehicleModelBrandValue?: string | null;\n vehicleModelTypeText?: string | null;\n vehicleModelTypeValue?: string | null;\n vehicleModelYear?: number | null;\n vehicleFuelType?: VehicleFuelType | null;\n utilizationStyle?: VehicleUtilizationStyle | null;\n insuredCustomerBirthDate?: DateOnly | null;\n vehicleId?: string | null;\n propertyId?: string | null;\n}\n\n// === Filter/Search/Sort Inputs (auto-generated from model) ===\n\n/**\n * Filter input for QueryProposalsResult.\n * Auto-generated from model fields using ModelFilterInput.\n */\nexport type QueryProposalsResultFilterInput =\n ModelFilterInput<QueryProposalsResult>;\n\n/**\n * Search input for QueryProposalsResult.\n * Auto-generated from model fields using ModelSearchInput.\n */\nexport type QueryProposalsResultSearchInput =\n ModelSearchInput<QueryProposalsResult>;\n\n/**\n * Sort input for QueryProposalsResult.\n * Note: Sort fields are explicitly defined as they may differ from model fields.\n */\nexport interface QueryProposalsResultSortInput {\n createdAt?: SortEnumType | null;\n vehicleModelYear?: SortEnumType | null;\n}\n\n// === Connection Types ===\n\nexport type ProposalsEdge = Edge<QueryProposalsResult>;\nexport type ProposalsConnection<\n TFields extends readonly ProposalFieldKey[] = readonly ProposalFieldKey[],\n> = Connection<PickProposalFields<TFields>>;\n\n// === Select Options ===\n\n/**\n * All available field keys for QueryProposalsResult with nested dot-notation paths.\n */\nexport type ProposalFieldKey = DeepFieldKeys<QueryProposalsResult>;\n\n/**\n * Runtime array of all proposal field keys including nested paths.\n */\nexport const ALL_PROPOSAL_FIELDS = [\n // Primitive fields\n \"agentBranchId\",\n \"id\",\n \"productBranch\",\n \"state\",\n \"insurerCustomerId\",\n \"insuredCustomerId\",\n \"productsCount\",\n \"succeedProductsCount\",\n \"createdAt\",\n \"successRate\",\n \"insuredCustomerName\",\n \"insuredCustomerIdentityNumber\",\n \"insuredCustomerTaxNumber\",\n \"insuredCustomerType\",\n \"lowestPremium\",\n \"highestPremium\",\n \"channel\",\n \"insuredCustomerCityText\",\n \"insuredCustomerCityValue\",\n \"insuredCustomerDistrictText\",\n \"insuredCustomerDistrictValue\",\n \"insuredCustomerPhoneNumber\",\n \"insuredCustomerPhoneNumberCountryCode\",\n \"insuredCustomerEmail\",\n \"vehiclePlateCode\",\n \"vehiclePlateCity\",\n \"vehicleDocumentSerialCode\",\n \"vehicleDocumentSerialNumber\",\n \"vehicleModelBrandText\",\n \"vehicleModelBrandValue\",\n \"vehicleModelTypeText\",\n \"vehicleModelTypeValue\",\n \"vehicleModelYear\",\n \"vehicleFuelType\",\n \"utilizationStyle\",\n \"insuredCustomerBirthDate\",\n \"vehicleId\",\n \"propertyId\",\n // Nested agentBranch fields\n \"agentBranch.id\",\n \"agentBranch.name\",\n \"agentBranch.parentId\",\n \"agentBranch.parentName\",\n // Nested agentUserCreatedBy fields\n \"agentUserCreatedBy.id\",\n \"agentUserCreatedBy.name\",\n \"agentUserCreatedBy.email\",\n \"agentUserCreatedBy.userType\",\n] as const satisfies readonly ProposalFieldKey[];\n\n/**\n * Helper type to pick selected fields from QueryProposalsResult.\n */\nexport type PickProposalFields<T extends readonly ProposalFieldKey[]> =\n PickFields<QueryProposalsResult, T>;\n\n/**\n * Type-safe connection result based on selected fields\n */\nexport interface SelectedProposalsConnection<\n TFields extends ProposalFieldKey[],\n> extends Omit<ProposalsConnection, \"nodes\" | \"edges\"> {\n nodes?: (PickProposalFields<TFields> | null)[] | null;\n edges?:\n | (Omit<ProposalsEdge, \"node\"> & {\n node?: PickProposalFields<TFields> | null;\n })[]\n | null;\n}\n\n/**\n * Options for getProposals query.\n * Extends GetQueryOptions with proposal-specific types.\n */\nexport interface GetProposalsOptions<\n TFields extends ProposalFieldKey[] = ProposalFieldKey[],\n> extends GetQueryOptions<\n ProposalFieldKey,\n QueryProposalsResultFilterInput,\n QueryProposalsResultSearchInput,\n QueryProposalsResultSortInput\n> {\n /** Fields to select from the query. If not provided, all fields are returned. */\n select?: TFields;\n}\n","/**\n * @fileoverview Case GraphQL Types\n * @description Types for querying cases via GraphQL\n */\n\nimport type {\n Connection,\n Edge,\n SortEnumType,\n DeepFieldKeys,\n PickFields,\n ModelFilterInput,\n ModelSearchInput,\n GetQueryOptions,\n} from \"./common.js\";\nimport type { DateTime, DateOnly } from \"../common.date.js\";\n\nimport type { ProductBranch, Channel, CustomerType, AssetType } from \"../common.js\";\nimport type { VehicleFuelType, VehicleUtilizationStyle } from \"../common.vehicle.js\";\nimport type {\n PropertyDamageStatus,\n PropertyStructure,\n PropertyUtilizationStyle,\n PropertyOwnershipType,\n} from \"../common.property.js\";\nimport type {\n CaseType,\n CaseStatus,\n CaseMainState,\n CaseSubState,\n SaleOpportunityCaseSubType,\n CancelCaseSubType,\n EndorsementCaseSubType,\n ComplaintCaseSubType,\n} from \"../cases.js\";\nimport type { Job } from \"../customers.js\";\nimport type { UserType } from \"./policies.js\";\n\n// === Output Types ===\n\nexport interface CaseAgentBranchInfo {\n id: string;\n name: string;\n parentId?: string | null;\n parentName?: string | null;\n}\n\nexport interface PriorityRuleHit {\n label: string;\n description: string;\n ruleName?: string | null;\n score: number;\n}\n\nexport interface QueryCaseModel {\n agentBranch?: CaseAgentBranchInfo | null;\n agentBranchId?: string | null;\n id: string;\n ref: string;\n type: CaseType;\n status: CaseStatus;\n cancelSubType?: CancelCaseSubType | null;\n saleOpportunitySubType?: SaleOpportunityCaseSubType | null;\n endorsementSubType?: EndorsementCaseSubType | null;\n complaintSubType?: ComplaintCaseSubType | null;\n mainState: CaseMainState;\n subState: CaseSubState;\n productBranch?: ProductBranch | null;\n channel?: Channel | null;\n createdAt: DateTime;\n createdByName: string;\n createdById: string;\n createdByEmail?: string | null;\n createdByType?: UserType | null;\n representedByName?: string | null;\n representedById?: string | null;\n representedByEmail?: string | null;\n representedByType?: UserType | null;\n policyEndDate?: DateOnly | null;\n assetType?: AssetType | null;\n assetId?: string | null;\n sourceCaseId?: string | null;\n policyCount: number;\n proposalCount: number;\n lastProposalDate?: DateTime | null;\n lastPolicyDate?: DateTime | null;\n lastUpdateDate?: DateTime | null;\n lastUpdatedByName?: string | null;\n lastUpdatedById?: string | null;\n lastUpdatedByEmail?: string | null;\n lastUpdatedByType?: UserType | null;\n priorityScore?: number | null;\n priorityRuleHits?: PriorityRuleHit[] | null;\n customerId?: string | null;\n customerName?: string | null;\n customerType?: CustomerType | null;\n customerIdentity?: string | null;\n customerCityText?: string | null;\n customerCityValue?: string | null;\n customerDistrictText?: string | null;\n customerDistrictValue?: string | null;\n customerPrimaryPhoneNumber?: string | null;\n customerPrimaryPhoneCountryCode?: number | null;\n customerPrimaryEmail?: string | null;\n customerBirthDate?: DateOnly | null;\n customerPassportNumber?: string | null;\n customerJob?: Job | null;\n vehiclePlateCode?: string | null;\n vehiclePlateCity?: number | null;\n vehicleModelBrandText?: string | null;\n vehicleModelBrandValue?: string | null;\n vehicleModelTypeText?: string | null;\n vehicleModelTypeValue?: string | null;\n vehicleModelYear?: number | null;\n vehicleUtilizationStyle?: VehicleUtilizationStyle | null;\n vehicleEngineNumber?: string | null;\n vehicleChassisNumber?: string | null;\n vehicleRegistrationDate?: DateOnly | null;\n vehicleFuelType?: VehicleFuelType | null;\n vehicleSeatNumber?: number | null;\n vehicleDocumentSerialCode?: string | null;\n vehicleDocumentSerialNumber?: string | null;\n propertyNumber?: number | null;\n propertySquareMeter?: number | null;\n propertyConstructionYear?: number | null;\n propertyDamageStatus?: PropertyDamageStatus | null;\n propertyFloorNumber?: number | null;\n propertyStructure?: PropertyStructure | null;\n propertyUtilizationStyle?: PropertyUtilizationStyle | null;\n propertyOwnershipType?: PropertyOwnershipType | null;\n propertyDaskPolicyNumber?: string | null;\n advertisingSource?: string | null;\n advertisingCampaign?: string | null;\n searchScore?: number | null;\n}\n\n// === Filter/Search/Sort Inputs (auto-generated from model) ===\n\n/**\n * Filter input for QueryCaseModel.\n * Auto-generated from model fields using ModelFilterInput.\n */\nexport type QueryCaseModelFilterInput = ModelFilterInput<QueryCaseModel>;\n\n/**\n * Search input for QueryCaseModel.\n * Auto-generated from model fields using ModelSearchInput.\n */\nexport type QueryCaseModelSearchInput = ModelSearchInput<QueryCaseModel>;\n\n/**\n * Sort input for QueryCaseModel.\n * Note: Sort fields are explicitly defined as they may differ from model fields.\n */\nexport interface QueryCaseModelSortInput {\n createdAt?: SortEnumType | null;\n policyEndDate?: SortEnumType | null;\n policyCount?: SortEnumType | null;\n proposalCount?: SortEnumType | null;\n lastProposalDate?: SortEnumType | null;\n lastPolicyDate?: SortEnumType | null;\n lastUpdateDate?: SortEnumType | null;\n priorityScore?: SortEnumType | null;\n customerBirthDate?: SortEnumType | null;\n vehicleModelYear?: SortEnumType | null;\n vehicleRegistrationDate?: SortEnumType | null;\n propertyConstructionYear?: SortEnumType | null;\n searchScore?: SortEnumType | null;\n}\n\n// === Connection Types ===\n\nexport type CasesEdge = Edge<QueryCaseModel>;\nexport type CasesConnection<\n TFields extends readonly CaseFieldKey[] = readonly CaseFieldKey[],\n> = Connection<PickCaseFields<TFields>>;\n\n// === Select Options ===\n\n/**\n * All available field keys for QueryCaseModel with nested dot-notation paths.\n */\nexport type CaseFieldKey = DeepFieldKeys<QueryCaseModel>;\n\n/**\n * Runtime array of all case field keys including nested paths.\n */\nexport const ALL_CASE_FIELDS = [\n // Primitive fields\n \"agentBranchId\",\n \"id\",\n \"ref\",\n \"type\",\n \"status\",\n \"cancelSubType\",\n \"saleOpportunitySubType\",\n \"endorsementSubType\",\n \"complaintSubType\",\n \"mainState\",\n \"subState\",\n \"productBranch\",\n \"channel\",\n \"createdAt\",\n \"createdByName\",\n \"createdById\",\n \"createdByEmail\",\n \"createdByType\",\n \"representedByName\",\n \"representedById\",\n \"representedByEmail\",\n \"representedByType\",\n \"policyEndDate\",\n \"assetType\",\n \"assetId\",\n \"sourceCaseId\",\n \"policyCount\",\n \"proposalCount\",\n \"lastProposalDate\",\n \"lastPolicyDate\",\n \"lastUpdateDate\",\n \"lastUpdatedByName\",\n \"lastUpdatedById\",\n \"lastUpdatedByEmail\",\n \"lastUpdatedByType\",\n \"priorityScore\",\n \"customerId\",\n \"customerName\",\n \"customerType\",\n \"customerIdentity\",\n \"customerCityText\",\n \"customerCityValue\",\n \"customerDistrictText\",\n \"customerDistrictValue\",\n \"customerPrimaryPhoneNumber\",\n \"customerPrimaryPhoneCountryCode\",\n \"customerPrimaryEmail\",\n \"customerBirthDate\",\n \"customerPassportNumber\",\n \"customerJob\",\n \"vehiclePlateCode\",\n \"vehiclePlateCity\",\n \"vehicleModelBrandText\",\n \"vehicleModelBrandValue\",\n \"vehicleModelTypeText\",\n \"vehicleModelTypeValue\",\n \"vehicleModelYear\",\n \"vehicleUtilizationStyle\",\n \"vehicleEngineNumber\",\n \"vehicleChassisNumber\",\n \"vehicleRegistrationDate\",\n \"vehicleFuelType\",\n \"vehicleSeatNumber\",\n \"vehicleDocumentSerialCode\",\n \"vehicleDocumentSerialNumber\",\n \"propertyNumber\",\n \"propertySquareMeter\",\n \"propertyConstructionYear\",\n \"propertyDamageStatus\",\n \"propertyFloorNumber\",\n \"propertyStructure\",\n \"propertyUtilizationStyle\",\n \"propertyOwnershipType\",\n \"propertyDaskPolicyNumber\",\n \"advertisingSource\",\n \"advertisingCampaign\",\n \"searchScore\",\n // Nested agentBranch fields\n \"agentBranch.id\",\n \"agentBranch.name\",\n \"agentBranch.parentId\",\n \"agentBranch.parentName\",\n // Nested priorityRuleHits fields\n \"priorityRuleHits.label\",\n \"priorityRuleHits.description\",\n \"priorityRuleHits.ruleName\",\n \"priorityRuleHits.score\",\n] as const satisfies readonly CaseFieldKey[];\n\n/**\n * Helper type to pick selected fields from QueryCaseModel.\n */\nexport type PickCaseFields<T extends readonly CaseFieldKey[]> = PickFields<\n QueryCaseModel,\n T\n>;\n\n/**\n * Type-safe connection result based on selected fields\n */\nexport interface SelectedCasesConnection<\n TFields extends CaseFieldKey[],\n> extends Omit<CasesConnection, \"nodes\" | \"edges\"> {\n nodes?: (PickCaseFields<TFields> | null)[] | null;\n edges?:\n | (Omit<CasesEdge, \"node\"> & {\n node?: PickCaseFields<TFields> | null;\n })[]\n | null;\n}\n\n/**\n * Options for getCases query.\n * Extends GetQueryOptions with case-specific types.\n */\nexport interface GetCasesOptions<\n TFields extends CaseFieldKey[] = CaseFieldKey[],\n> extends GetQueryOptions<\n CaseFieldKey,\n QueryCaseModelFilterInput,\n QueryCaseModelSearchInput,\n QueryCaseModelSortInput\n> {\n /** Fields to select from the query. If not provided, all fields are returned. */\n select?: TFields;\n}\n","/**\n * @fileoverview Agent User GraphQL Types\n * @description Types for querying agent users via GraphQL\n */\n\nimport type {\n Connection,\n Edge,\n SortEnumType,\n DeepFieldKeys,\n PickFields,\n ModelFilterInput,\n ModelSearchInput,\n GetQueryOptions,\n} from \"./common.js\";\nimport type { DateTime } from \"../common.date.js\";\nimport type { AgentUserState } from \"../agents.js\";\n\n// === Output Types ===\n\nexport interface AgentUserRoleInfo {\n id: string;\n name: string;\n isAdmin: boolean;\n}\n\nexport interface AgentUserBranchInfo {\n id: string;\n name: string;\n parentId?: string | null;\n parentName?: string | null;\n level: number;\n hierarchy: string;\n}\n\nexport interface QueryAgentUserResult {\n id: string;\n email: string;\n firstName: string;\n lastName: string;\n name: string;\n phoneNumber?: string | null;\n phoneNumberCountryCode?: number | null;\n state: AgentUserState;\n createdAt?: DateTime | null;\n lastLoginAt?: DateTime | null;\n roles?: AgentUserRoleInfo[] | null;\n branches?: AgentUserBranchInfo[] | null;\n}\n\n// === Filter/Search/Sort Inputs (auto-generated from model) ===\n\n/**\n * Filter input for QueryAgentUserResult.\n * Auto-generated from model fields using ModelFilterInput.\n */\nexport type QueryAgentUserResultFilterInput =\n ModelFilterInput<QueryAgentUserResult>;\n\n/**\n * Search input for QueryAgentUserResult.\n * Auto-generated from model fields using ModelSearchInput.\n */\nexport type QueryAgentUserResultSearchInput =\n ModelSearchInput<QueryAgentUserResult>;\n\n/**\n * Sort input for QueryAgentUserResult.\n * Note: Sort fields are explicitly defined as they may differ from model fields.\n */\nexport interface QueryAgentUserResultSortInput {\n email?: SortEnumType | null;\n firstName?: SortEnumType | null;\n lastName?: SortEnumType | null;\n name?: SortEnumType | null;\n state?: SortEnumType | null;\n createdAt?: SortEnumType | null;\n lastLoginAt?: SortEnumType | null;\n}\n\n// === Connection Types ===\n\nexport type AgentUsersEdge = Edge<QueryAgentUserResult>;\nexport type AgentUsersConnection<\n TFields extends readonly AgentUserFieldKey[] = readonly AgentUserFieldKey[],\n> = Connection<PickAgentUserFields<TFields>>;\n\n// === Select Options ===\n\n/**\n * All available field keys for QueryAgentUserResult with nested dot-notation paths.\n */\nexport type AgentUserFieldKey = DeepFieldKeys<QueryAgentUserResult>;\n\n/**\n * Runtime array of all agent user field keys including nested paths.\n */\nexport const ALL_AGENT_USER_FIELDS = [\n // Primitive fields\n \"id\",\n \"email\",\n \"firstName\",\n \"lastName\",\n \"name\",\n \"phoneNumber\",\n \"phoneNumberCountryCode\",\n \"state\",\n \"createdAt\",\n \"lastLoginAt\",\n // Nested roles fields\n \"roles.id\",\n \"roles.name\",\n \"roles.isAdmin\",\n // Nested branches fields\n \"branches.id\",\n \"branches.name\",\n \"branches.parentId\",\n \"branches.parentName\",\n \"branches.level\",\n \"branches.hierarchy\",\n] as const satisfies readonly AgentUserFieldKey[];\n\n/**\n * Helper type to pick selected fields from QueryAgentUserResult.\n */\nexport type PickAgentUserFields<T extends readonly AgentUserFieldKey[]> =\n PickFields<QueryAgentUserResult, T>;\n\n/**\n * Type-safe connection result based on selected fields\n */\nexport interface SelectedAgentUsersConnection<\n TFields extends AgentUserFieldKey[],\n> extends Omit<AgentUsersConnection, \"nodes\" | \"edges\"> {\n nodes?: (PickAgentUserFields<TFields> | null)[] | null;\n edges?:\n | (Omit<AgentUsersEdge, \"node\"> & {\n node?: PickAgentUserFields<TFields> | null;\n })[]\n | null;\n}\n\n/**\n * Options for getAgentUsers query.\n * Extends GetQueryOptions with agent user-specific types.\n */\nexport interface GetAgentUsersOptions<\n TFields extends AgentUserFieldKey[] = AgentUserFieldKey[],\n> extends GetQueryOptions<\n AgentUserFieldKey,\n QueryAgentUserResultFilterInput,\n QueryAgentUserResultSearchInput,\n QueryAgentUserResultSortInput\n> {\n /** Fields to select from the query. If not provided, all fields are returned. */\n select?: TFields;\n}\n","/**\n * @fileoverview Policy Transfer GraphQL Types\n * @description Types for querying policy transfers via GraphQL\n */\n\nimport type {\n Connection,\n Edge,\n SortEnumType,\n DeepFieldKeys,\n PickFields,\n ModelFilterInput,\n ModelSearchInput,\n GetQueryOptions,\n} from \"./common.js\";\nimport type { DateTime } from \"../common.date.js\";\n\n// === Output Types ===\n\nexport interface QueryPolicyTransfersResult {\n id: string;\n startDate?: DateTime | null;\n endDate?: DateTime | null;\n insuranceCompanyCount: number;\n policyTransferTriggerCount: number;\n policyCount: number;\n}\n\n// === Filter/Search/Sort Inputs (auto-generated from model) ===\n\n/**\n * Filter input for QueryPolicyTransfersResult.\n * Auto-generated from model fields using ModelFilterInput.\n */\nexport type QueryPolicyTransfersResultFilterInput =\n ModelFilterInput<QueryPolicyTransfersResult>;\n\n/**\n * Search input for QueryPolicyTransfersResult.\n * Auto-generated from model fields using ModelSearchInput.\n */\nexport type QueryPolicyTransfersResultSearchInput =\n ModelSearchInput<QueryPolicyTransfersResult>;\n\n/**\n * Sort input for QueryPolicyTransfersResult.\n * Note: Sort fields are explicitly defined as they may differ from model fields.\n */\nexport interface QueryPolicyTransfersResultSortInput {\n startDate?: SortEnumType | null;\n endDate?: SortEnumType | null;\n insuranceCompanyCount?: SortEnumType | null;\n policyTransferTriggerCount?: SortEnumType | null;\n policyCount?: SortEnumType | null;\n}\n\n// === Connection Types ===\n\nexport type PolicyTransfersEdge = Edge<QueryPolicyTransfersResult>;\nexport type PolicyTransfersConnection<\n TFields extends readonly PolicyTransferFieldKey[] =\n readonly PolicyTransferFieldKey[],\n> = Connection<PickPolicyTransferFields<TFields>>;\n\n// === Select Options ===\n\n/**\n * All available field keys for QueryPolicyTransfersResult.\n */\nexport type PolicyTransferFieldKey = DeepFieldKeys<QueryPolicyTransfersResult>;\n\n/**\n * Runtime array of all policy transfer field keys.\n */\nexport const ALL_POLICY_TRANSFER_FIELDS = [\n \"id\",\n \"startDate\",\n \"endDate\",\n \"insuranceCompanyCount\",\n \"policyTransferTriggerCount\",\n \"policyCount\",\n] as const satisfies readonly PolicyTransferFieldKey[];\n\n/**\n * Helper type to pick selected fields from QueryPolicyTransfersResult.\n */\nexport type PickPolicyTransferFields<\n T extends readonly PolicyTransferFieldKey[],\n> = PickFields<QueryPolicyTransfersResult, T>;\n\n/**\n * Type-safe connection result based on selected fields\n */\nexport interface SelectedPolicyTransfersConnection<\n TFields extends PolicyTransferFieldKey[],\n> extends Omit<PolicyTransfersConnection, \"nodes\" | \"edges\"> {\n nodes?: (PickPolicyTransferFields<TFields> | null)[] | null;\n edges?:\n | (Omit<PolicyTransfersEdge, \"node\"> & {\n node?: PickPolicyTransferFields<TFields> | null;\n })[]\n | null;\n}\n\n/**\n * Options for getPolicyTransfers query.\n * Extends GetQueryOptions with policy transfer-specific types.\n */\nexport interface GetPolicyTransfersOptions<\n TFields extends PolicyTransferFieldKey[] = PolicyTransferFieldKey[],\n> extends GetQueryOptions<\n PolicyTransferFieldKey,\n QueryPolicyTransfersResultFilterInput,\n QueryPolicyTransfersResultSearchInput,\n QueryPolicyTransfersResultSortInput\n> {\n /** Fields to select from the query. If not provided, all fields are returned. */\n select?: TFields;\n}\n","/**\n * @fileoverview File Policy Transfer GraphQL Types\n * @description Types for querying file policy transfers via GraphQL\n */\n\nimport type {\n Connection,\n Edge,\n SortEnumType,\n DeepFieldKeys,\n PickFields,\n ModelFilterInput,\n ModelSearchInput,\n GetQueryOptions,\n} from \"./common.js\";\nimport type { DateTime } from \"../common.date.js\";\nimport type { UserType } from \"./policies.js\";\n\n// === Output Types ===\n\nexport interface FilePolicyTransferUserReference {\n id: string;\n name: string;\n email?: string | null;\n userType?: UserType | null;\n}\n\nexport interface QueryFilePolicyTransfersResult {\n id: string;\n insuranceCompanyId: number;\n insuranceCompanyName?: string | null;\n insuranceCompanyLogo?: string | null;\n fileName?: string | null;\n fileUrl?: string | null;\n createdAt: DateTime;\n createdBy: FilePolicyTransferUserReference;\n totalPolicyCount?: number | null;\n completedPolicyCount?: number | null;\n failedPolicyCount?: number | null;\n}\n\n// === Filter/Search/Sort Inputs (auto-generated from model) ===\n\n/**\n * Filter input for QueryFilePolicyTransfersResult.\n * Auto-generated from model fields using ModelFilterInput.\n */\nexport type QueryFilePolicyTransfersResultFilterInput =\n ModelFilterInput<QueryFilePolicyTransfersResult>;\n\n/**\n * Search input for QueryFilePolicyTransfersResult.\n * Auto-generated from model fields using ModelSearchInput.\n */\nexport type QueryFilePolicyTransfersResultSearchInput =\n ModelSearchInput<QueryFilePolicyTransfersResult>;\n\n/**\n * Sort input for QueryFilePolicyTransfersResult.\n * Note: Sort fields are explicitly defined as they may differ from model fields.\n */\nexport interface QueryFilePolicyTransfersResultSortInput {\n createdAt?: SortEnumType | null;\n insuranceCompanyId?: SortEnumType | null;\n totalPolicyCount?: SortEnumType | null;\n completedPolicyCount?: SortEnumType | null;\n failedPolicyCount?: SortEnumType | null;\n}\n\n// === Connection Types ===\n\nexport type FilePolicyTransfersEdge = Edge<QueryFilePolicyTransfersResult>;\nexport type FilePolicyTransfersConnection<\n TFields extends readonly FilePolicyTransferFieldKey[] =\n readonly FilePolicyTransferFieldKey[],\n> = Connection<PickFilePolicyTransferFields<TFields>>;\n\n// === Select Options ===\n\n/**\n * All available field keys for QueryFilePolicyTransfersResult with nested dot-notation paths.\n */\nexport type FilePolicyTransferFieldKey =\n DeepFieldKeys<QueryFilePolicyTransfersResult>;\n\n/**\n * Runtime array of all file policy transfer field keys including nested paths.\n */\nexport const ALL_FILE_POLICY_TRANSFER_FIELDS = [\n // Primitive fields\n \"id\",\n \"insuranceCompanyId\",\n \"insuranceCompanyName\",\n \"insuranceCompanyLogo\",\n \"fileName\",\n \"fileUrl\",\n \"createdAt\",\n \"totalPolicyCount\",\n \"completedPolicyCount\",\n \"failedPolicyCount\",\n // Nested createdBy fields\n \"createdBy.id\",\n \"createdBy.name\",\n \"createdBy.email\",\n \"createdBy.userType\",\n] as const satisfies readonly FilePolicyTransferFieldKey[];\n\n/**\n * Helper type to pick selected fields from QueryFilePolicyTransfersResult.\n */\nexport type PickFilePolicyTransferFields<\n T extends readonly FilePolicyTransferFieldKey[],\n> = PickFields<QueryFilePolicyTransfersResult, T>;\n\n/**\n * Type-safe connection result based on selected fields\n */\nexport interface SelectedFilePolicyTransfersConnection<\n TFields extends FilePolicyTransferFieldKey[],\n> extends Omit<FilePolicyTransfersConnection, \"nodes\" | \"edges\"> {\n nodes?: (PickFilePolicyTransferFields<TFields> | null)[] | null;\n edges?:\n | (Omit<FilePolicyTransfersEdge, \"node\"> & {\n node?: PickFilePolicyTransferFields<TFields> | null;\n })[]\n | null;\n}\n\n/**\n * Options for getFilePolicyTransfers query.\n * Extends GetQueryOptions with file policy transfer-specific types.\n */\nexport interface GetFilePolicyTransfersOptions<\n TFields extends FilePolicyTransferFieldKey[] = FilePolicyTransferFieldKey[],\n> extends GetQueryOptions<\n FilePolicyTransferFieldKey,\n QueryFilePolicyTransfersResultFilterInput,\n QueryFilePolicyTransfersResultSearchInput,\n QueryFilePolicyTransfersResultSortInput\n> {\n /** Fields to select from the query. If not provided, all fields are returned. */\n select?: TFields;\n}\n","/**\n * @fileoverview Webhook Delivery GraphQL Types\n * @description Types for querying webhook deliveries via GraphQL\n */\n\nimport type {\n Connection,\n Edge,\n SortEnumType,\n DeepFieldKeys,\n PickFields,\n ModelFilterInput,\n ModelSearchInput,\n GetQueryOptions,\n} from \"./common.js\";\nimport type { DateTime } from \"../common.date.js\";\nimport type { WebhookEvent } from \"../webhooks.js\";\n\n// === Enums ===\n\n/**\n * Webhook Delivery State\n * Represents the current status of a webhook delivery attempt\n */\nexport enum WebhookDeliveryState {\n Pending = \"PENDING\",\n Success = \"SUCCESS\",\n Failed = \"FAILED\",\n}\n\n// === Output Types ===\n\nexport interface QueryWebhookDeliveryResult {\n id: string;\n webhookId: string;\n webhookName?: string | null;\n event: WebhookEvent;\n state: WebhookDeliveryState;\n responseStatusCode?: number | null;\n createdAt: DateTime;\n completedAt?: DateTime | null;\n retryCount: number;\n}\n\n// === Filter/Search/Sort Inputs (auto-generated from model) ===\n\n/**\n * Filter input for QueryWebhookDeliveryResult.\n * Auto-generated from model fields using ModelFilterInput.\n */\nexport type QueryWebhookDeliveryResultFilterInput =\n ModelFilterInput<QueryWebhookDeliveryResult>;\n\n/**\n * Search input for QueryWebhookDeliveryResult.\n * Auto-generated from model fields using ModelSearchInput.\n */\nexport type QueryWebhookDeliveryResultSearchInput =\n ModelSearchInput<QueryWebhookDeliveryResult>;\n\n/**\n * Sort input for QueryWebhookDeliveryResult.\n * Note: Sort fields are explicitly defined as they may differ from model fields.\n */\nexport interface QueryWebhookDeliveryResultSortInput {\n event?: SortEnumType | null;\n state?: SortEnumType | null;\n responseStatusCode?: SortEnumType | null;\n createdAt?: SortEnumType | null;\n completedAt?: SortEnumType | null;\n retryCount?: SortEnumType | null;\n}\n\n// === Connection Types ===\n\nexport type WebhookDeliveriesEdge = Edge<QueryWebhookDeliveryResult>;\nexport type WebhookDeliveriesConnection<\n TFields extends readonly WebhookDeliveryFieldKey[] =\n readonly WebhookDeliveryFieldKey[],\n> = Connection<PickWebhookDeliveryFields<TFields>>;\n\n// === Select Options ===\n\n/**\n * All available field keys for QueryWebhookDeliveryResult.\n */\nexport type WebhookDeliveryFieldKey = DeepFieldKeys<QueryWebhookDeliveryResult>;\n\n/**\n * Runtime array of all webhook delivery field keys.\n */\nexport const ALL_WEBHOOK_DELIVERY_FIELDS = [\n \"id\",\n \"webhookId\",\n \"webhookName\",\n \"event\",\n \"state\",\n \"responseStatusCode\",\n \"createdAt\",\n \"completedAt\",\n \"retryCount\",\n] as const satisfies readonly WebhookDeliveryFieldKey[];\n\n/**\n * Helper type to pick selected fields from QueryWebhookDeliveryResult.\n */\nexport type PickWebhookDeliveryFields<\n T extends readonly WebhookDeliveryFieldKey[],\n> = PickFields<QueryWebhookDeliveryResult, T>;\n\n/**\n * Type-safe connection result based on selected fields\n */\nexport interface SelectedWebhookDeliveriesConnection<\n TFields extends WebhookDeliveryFieldKey[],\n> extends Omit<WebhookDeliveriesConnection, \"nodes\" | \"edges\"> {\n nodes?: (PickWebhookDeliveryFields<TFields> | null)[] | null;\n edges?:\n | (Omit<WebhookDeliveriesEdge, \"node\"> & {\n node?: PickWebhookDeliveryFields<TFields> | null;\n })[]\n | null;\n}\n\n/**\n * Options for getWebhookDeliveries query.\n * Extends GetQueryOptions with webhook delivery-specific types.\n */\nexport interface GetWebhookDeliveriesOptions<\n TFields extends WebhookDeliveryFieldKey[] = WebhookDeliveryFieldKey[],\n> extends GetQueryOptions<\n WebhookDeliveryFieldKey,\n QueryWebhookDeliveryResultFilterInput,\n QueryWebhookDeliveryResultSearchInput,\n QueryWebhookDeliveryResultSortInput\n> {\n /** Fields to select from the query. If not provided, all fields are returned. */\n select?: TFields;\n}\n","import type { HttpTransport } from \"../client/http.js\";\nimport type { GraphQLTransport } from \"../client/graphql.js\";\nimport type { InsurUpResult, InsurUpGraphQLResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport { agentUsers } from \"../core/endpoints.js\";\nimport {\n ALL_AGENT_USER_FIELDS,\n type AgentUserFieldKey,\n type GetAgentUsersOptions,\n type AgentUsersConnection,\n} from \"@insurup/contracts\";\nimport { buildFieldSelection } from \"@insurup/contracts\";\nimport type {\n GetAgentUserResult,\n UpdateMyAgentUserRequest,\n InviteAgentUserRequest,\n AcceptAgentUserInviteRequest,\n UpdateAgentUserRequest,\n UpdateAgentUserPasswordRequest,\n GetMyAgentUserRobotCodeResult,\n MigrateAllAgentUsersResult,\n} from \"@insurup/contracts\";\n\n/**\n * Provides comprehensive user management operations for insurance agency staff, enabling agencies to manage\n * their team members, permissions, and access control within the InsurUp platform ecosystem.\n *\n * Sigorta acente personeli için kapsamlı kullanıcı yönetimi işlemlerini sağlar; acentelerin InsurUp platform\n * ekosistemi içinde ekip üyelerini, izinlerini ve erişim kontrolünü yönetmesine olanak tanır.\n */\nexport class InsurUpAgentUserClient {\n constructor(\n private readonly http: HttpTransport,\n private readonly graphql?: GraphQLTransport,\n ) {}\n\n /**\n * Retrieves the current agent user's profile information including personal details and platform settings.\n *\n * Mevcut acente kullanıcısının kişisel detayları ve platform ayarları dahil profil bilgilerini getirir.\n *\n * @returns Current agent user profile / Mevcut acente kullanıcı profili\n */\n async getMyAgentUser(\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetAgentUserResult>> {\n return this.http.get<GetAgentUserResult>(agentUsers.me, options);\n }\n\n /**\n * Updates the current agent user's profile information such as contact details and preferences.\n *\n * Mevcut acente kullanıcısının iletişim detayları ve tercihleri gibi profil bilgilerini günceller.\n *\n * @param request Profile update request / Profil güncelleme talebi\n * @returns Operation result / İşlem sonucu\n */\n async updateMyAgentUser(\n request: UpdateMyAgentUserRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.putNoContent(agentUsers.updateMyUser, request, options);\n }\n\n /**\n * Sends an invitation to a new user to join the agency team with specified role and permissions.\n *\n * Belirtilen rol ve izinlerle acente takımına katılması için yeni bir kullanıcıya davetiye gönderir.\n *\n * @param request User invitation request with role and contact information / Rol ve iletişim bilgileri ile kullanıcı davet talebi\n * @returns Operation result / İşlem sonucu\n */\n async inviteAgentUser(\n request: InviteAgentUserRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(agentUsers.invite, request, options);\n }\n\n /**\n * Activates an agent user account, granting them access to the platform and enabling their permissions.\n *\n * Bir acente kullanıcı hesabını aktive eder, platform erişimi verir ve izinlerini etkinleştirir.\n *\n * @param agentUserId Unique identifier of the agent user to activate / Aktive edilecek acente kullanıcısının benzersiz tanımlayıcısı\n * @returns Operation result / İşlem sonucu\n */\n async activateAgentUser(\n agentUserId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = agentUsers.activate.render(agentUserId);\n return this.http.postNoContent(endpoint, undefined, options);\n }\n\n /**\n * Deactivates an agent user account, suspending their access while preserving their profile data.\n *\n * Bir acente kullanıcı hesabını deaktive eder, profil verilerini korurken erişimlerini askıya alır.\n *\n * @param agentUserId Unique identifier of the agent user to deactivate / Deaktive edilecek acente kullanıcısının benzersiz tanımlayıcısı\n * @returns Operation result / İşlem sonucu\n */\n async deactivateAgentUser(\n agentUserId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = agentUsers.deactivate.render(agentUserId);\n return this.http.postNoContent(endpoint, undefined, options);\n }\n\n /**\n * Validates an agent user invitation code to ensure it is legitimate and has not expired.\n *\n * Bir acente kullanıcı davet kodunun meşru olduğunu ve süresinin dolmadığını doğrular.\n *\n * @param code Invitation code to validate / Doğrulanacak davet kodu\n * @returns Operation result / İşlem sonucu\n */\n async checkAgentUserInviteCode(\n code: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = agentUsers.checkAgentUserInviteCode.render(code);\n // Note: GET always expects content, but this validation endpoint may return 204\n // If this causes issues, the API should be updated to return a response body\n return this.http.get<void>(endpoint, options) as Promise<InsurUpResult>;\n }\n\n /**\n * Permanently removes an agent user account and all associated data from the agency.\n *\n * Bir acente kullanıcı hesabını ve tüm ilişkili verileri acenteden kalıcı olarak kaldırır.\n *\n * @param agentUserId Unique identifier of the agent user to delete / Silinecek acente kullanıcısının benzersiz tanımlayıcısı\n * @returns Operation result / İşlem sonucu\n */\n async deleteAgentUser(\n agentUserId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = agentUsers.delete.render(agentUserId);\n return this.http.deleteNoContent(endpoint, options);\n }\n\n /**\n * Retrieves detailed information about a specific agent user including their role and current status.\n *\n * Belirli bir acente kullanıcısı hakkında rolü ve mevcut durumu dahil detaylı bilgileri getirir.\n *\n * @param agentUserId Unique identifier of the agent user / Acente kullanıcısının benzersiz tanımlayıcısı\n * @returns Agent user details / Acente kullanıcı detayları\n */\n async getAgentUserById(\n agentUserId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetAgentUserResult>> {\n const endpoint = agentUsers.getById.render(agentUserId);\n return this.http.get<GetAgentUserResult>(endpoint, options);\n }\n\n /**\n * Resends an invitation email to an agent user who may not have received or lost their original invitation.\n *\n * Orijinal davetiyesini almamış veya kaybetmiş olabilecek bir acente kullanıcısına davet e-postasını yeniden gönderir.\n *\n * @param agentUserId Unique identifier of the agent user to resend invitation / Davetiyesi yeniden gönderilecek acente kullanıcısının benzersiz tanımlayıcısı\n * @returns Operation result / İşlem sonucu\n */\n async reSendInviteAgentUser(\n agentUserId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = agentUsers.reSendInvite.render(agentUserId);\n return this.http.postNoContent(endpoint, undefined, options);\n }\n\n /**\n * Accepts an agent user invitation and completes the registration process for the new team member.\n *\n * Bir acente kullanıcı davetiyesini kabul eder ve yeni ekip üyesi için kayıt sürecini tamamlar.\n *\n * @param request Invitation acceptance request with user details / Kullanıcı detayları ile davetiye kabul talebi\n * @returns Operation result / İşlem sonucu\n */\n async acceptAgentUserInvite(\n request: AcceptAgentUserInviteRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(agentUsers.acceptInvite, request, options);\n }\n\n /**\n * Updates an agent user's profile information, role assignments, or access permissions by an administrator.\n *\n * Bir yönetici tarafından acente kullanıcısının profil bilgilerini, rol atamalarını veya erişim izinlerini günceller.\n *\n * @param request User update request with modified information / Değiştirilmiş bilgilerle kullanıcı güncelleme talebi\n * @returns Operation result / İşlem sonucu\n */\n async updateAgentUser(\n request: UpdateAgentUserRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = agentUsers.update.render(request.id);\n return this.http.putNoContent(endpoint, request, options);\n }\n\n /**\n * Updates an agent user's password for enhanced security or when requested by the user.\n *\n * Gelişmiş güvenlik için veya kullanıcı tarafından talep edildiğinde acente kullanıcısının şifresini günceller.\n *\n * @param request Password update request / Şifre güncelleme talebi\n * @returns Operation result / İşlem sonucu\n */\n async updateAgentUserPassword(\n request: UpdateAgentUserPasswordRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.putNoContent(agentUsers.updatePassword, request, options);\n }\n\n /**\n * Retrieves the current agent user's robot/automation code for API integrations and automated operations.\n *\n * API entegrasyonları ve otomatik işlemler için mevcut acente kullanıcısının robot/otomasyon kodunu getirir.\n *\n * @returns Agent user robot code / Acente kullanıcı robot kodu\n */\n async getMyAgentUserRobotCode(\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetMyAgentUserRobotCodeResult>> {\n return this.http.get<GetMyAgentUserRobotCodeResult>(\n agentUsers.meRobotCode,\n options,\n );\n }\n\n /**\n * Migrates an agent user from the legacy authentication system to the AuthServer.\n * Creates an auth user and links it via AuthUserId field. A password reset email will be sent.\n *\n * Acente kullanıcısını eski kimlik doğrulama sisteminden AuthServer'a taşır.\n * Auth kullanıcısı oluşturur ve AuthUserId alanı ile bağlar. Şifre sıfırlama e-postası gönderilir.\n *\n * @param agentUserId Unique identifier of the agent user to migrate / Taşınacak acente kullanıcısının benzersiz tanımlayıcısı\n * @returns Operation result / İşlem sonucu\n */\n async migrateAgentUser(\n agentUserId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = agentUsers.migrate.render(agentUserId);\n return this.http.postNoContent(endpoint, undefined, options);\n }\n\n /**\n * Migrates all agent users in the current tenant that haven't been migrated yet.\n *\n * Henüz taşınmamış mevcut kiracıdaki tüm acente kullanıcılarını taşır.\n *\n * @returns Response with the count of migrated users / Taşınan kullanıcı sayısı ile yanıt\n */\n async migrateAllAgentUsers(\n options?: RequestOptions,\n ): Promise<InsurUpResult<MigrateAllAgentUsersResult>> {\n return this.http.post<MigrateAllAgentUsersResult>(\n agentUsers.migrateAll,\n undefined,\n options,\n );\n }\n\n // ============================================================================\n // GRAPHQL QUERIES\n // ============================================================================\n\n /**\n * Queries agent users using GraphQL with advanced filtering, searching, sorting, and field selection.\n * Supports cursor-based pagination and type-safe field selection.\n *\n * Gelişmiş filtreleme, arama, sıralama ve alan seçimi ile GraphQL kullanarak acente kullanıcılarını sorgular.\n * İmleç tabanlı sayfalama ve tip-güvenli alan seçimini destekler.\n *\n * @example\n * // Basic query with all fields\n * const result = await client.agentUsers.getAgentUsers({ first: 10 });\n *\n * @example\n * // Type-safe field selection\n * const result = await client.agentUsers.getAgentUsers({\n * select: ['id', 'email', 'name', 'state'] as const,\n * first: 10,\n * filter: { state: { eq: AgentUserState.Active } }\n * });\n *\n * @param requestOptions Query options including pagination, filters, search, and field selection\n * @returns Paginated connection of agent users with type-narrowed fields\n */\n async getAgentUsers<const TFields extends AgentUserFieldKey[]>(\n requestOptions?: GetAgentUsersOptions<TFields>,\n options?: RequestOptions,\n ): Promise<InsurUpGraphQLResult<AgentUsersConnection<TFields>>> {\n if (!this.graphql) {\n throw new Error(\n \"GraphQL transport is not available. Ensure the client is properly initialized.\",\n );\n }\n\n const fields = (requestOptions?.select ??\n ALL_AGENT_USER_FIELDS) as AgentUserFieldKey[];\n const fieldSelection = buildFieldSelection(fields);\n\n const query = `\n query GetAgentUsers(\n $first: Int\n $after: String\n $last: Int\n $before: String\n $search: searching_QueryAgentUserResultFilterInput\n $filter: filtering_QueryAgentUserResultFilterInput\n $order: [sorting_QueryAgentUserResultSortInput!]\n ) {\n agentUsersNew(\n first: $first\n after: $after\n last: $last\n before: $before\n search: $search\n filter: $filter\n order: $order\n ) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n totalCount\n edges {\n cursor\n node {\n ${fieldSelection}\n }\n }\n }\n }\n `;\n\n const variables = {\n first: requestOptions?.first,\n after: requestOptions?.after,\n last: requestOptions?.last,\n before: requestOptions?.before,\n search: requestOptions?.search,\n filter: requestOptions?.filter,\n order: requestOptions?.order,\n };\n\n const result = await this.graphql.query<{\n agentUsersNew: Omit<AgentUsersConnection, \"nodes\">;\n }>(query, variables, options);\n\n if (!result.isSuccess) {\n return result as InsurUpGraphQLResult<AgentUsersConnection<TFields>>;\n }\n\n // Derive nodes from edges\n const edges = result.data.agentUsersNew.edges;\n const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;\n\n return {\n ...result,\n data: {\n ...result.data.agentUsersNew,\n nodes,\n },\n } as InsurUpGraphQLResult<AgentUsersConnection<TFields>>;\n }\n}\n","/**\n * Customer management client for the InsurUp TypeScript SDK.\n */\n\nimport type { HttpTransport } from \"../client/http.js\";\nimport type { GraphQLTransport } from \"../client/graphql.js\";\nimport type { InsurUpResult, InsurUpGraphQLResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport { endpoints } from \"../core/endpoints.js\";\nimport type {\n CreateCustomerRequest,\n CreateCustomerResult,\n GetCustomerResult,\n UpdateCustomerRequest,\n AddCustomerEmailRequest,\n RemoveCustomerEmailRequest,\n ChangePrimaryCustomerEmailRequest,\n GetCustomerEmailsResultItem,\n AddCustomerPhoneNumberRequest,\n RemoveCustomerPhoneNumberRequest,\n ChangePrimaryCustomerPhoneNumberRequest,\n GetCustomerPhoneNumbersResultItem,\n SetCustomerRepresentativeRequest,\n GetCustomerHealthInfoResult,\n UpdateCustomerHealthInfoRequest,\n CreateContactFlowRequest,\n CreateCustomerContactRequest,\n EndContactFlowRequest,\n GetCustomerContactFlowsResultItem,\n GetCustomerContactsResultItem,\n ExternalLookupCustomerRequest,\n ExternalLookupCustomerResult,\n SetCustomerBranchRequest,\n CreateCustomerAddressRequest,\n CreateCustomerAddressResult,\n UpdateCustomerAddressRequest,\n GetCustomerAddressResult,\n GiveCustomerConsentRequest,\n RevokeCustomerConsentRequest,\n GetCustomerConsentsResult,\n} from \"@insurup/contracts\";\nimport {\n ALL_CUSTOMER_FIELDS,\n CustomerType,\n type CustomerFieldKey,\n type GetCustomersOptions,\n type CustomersConnection,\n} from \"@insurup/contracts\";\nimport { buildFieldSelection } from \"@insurup/contracts\";\n\n/**\n * Customer management client providing comprehensive customer lifecycle management.\n */\nexport class InsurUpCustomerClient {\n constructor(\n private readonly http: HttpTransport,\n private readonly graphql?: GraphQLTransport,\n ) {}\n\n /**\n * Creates a new customer profile with essential personal and contact information.\n */\n async createCustomer(\n request: CreateCustomerRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<CreateCustomerResult>> {\n // Transform request: type -> $type with lowercase discriminator for API\n const { type, ...rest } = request;\n\n let $type: string;\n switch (type) {\n case CustomerType.Individual:\n $type = \"individual\";\n break;\n case CustomerType.Company:\n $type = \"company\";\n break;\n case CustomerType.Foreign:\n $type = \"foreign\";\n break;\n }\n\n return this.http.post<CreateCustomerResult>(\n endpoints.customers.createCustomer,\n { $type, ...rest },\n options,\n );\n }\n\n /**\n * Retrieves detailed information about a specific customer.\n */\n async getCustomer(\n customerId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCustomerResult>> {\n return this.http.get<GetCustomerResult>(\n endpoints.customers.getCustomer.render(customerId),\n options,\n );\n }\n\n /**\n * Retrieves the profile information of the currently authenticated customer.\n */\n async getCurrentCustomer(\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCustomerResult>> {\n return this.http.get<GetCustomerResult>(\n endpoints.customers.getCurrentCustomer,\n options,\n );\n }\n\n /**\n * Updates existing customer profile information.\n */\n async updateCustomer(\n request: UpdateCustomerRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.putNoContent(\n endpoints.customers.updateCustomer.render(request.id),\n request,\n options,\n );\n }\n\n /**\n * Permanently removes a customer profile and all associated data.\n */\n async deleteCustomer(\n customerId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.deleteNoContent(\n endpoints.customers.deleteCustomer.render(customerId),\n options,\n );\n }\n\n /**\n * Retrieves all email addresses associated with a customer.\n */\n async getCustomerEmails(\n customerId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCustomerEmailsResultItem[]>> {\n return this.http.get<GetCustomerEmailsResultItem[]>(\n endpoints.customers.emails.getCustomerEmails.render(customerId),\n options,\n );\n }\n\n /**\n * Adds a new email address to a customer's contact information.\n */\n async addCustomerEmail(\n request: AddCustomerEmailRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.customers.emails.addCustomerEmail.render(request.customerId),\n request,\n options,\n );\n }\n\n /**\n * Removes an email address from a customer's contact information.\n */\n async removeCustomerEmail(\n request: RemoveCustomerEmailRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.deleteNoContent(\n endpoints.customers.emails.removeCustomerEmail.render(request),\n options,\n );\n }\n\n /**\n * Changes the primary email address for a customer.\n */\n async changePrimaryCustomerEmail(\n request: ChangePrimaryCustomerEmailRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.customers.emails.changePrimaryCustomerEmail.render(request),\n undefined,\n options,\n );\n }\n\n /**\n * Retrieves all phone numbers associated with a customer.\n */\n async getCustomerPhoneNumbers(\n customerId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCustomerPhoneNumbersResultItem[]>> {\n return this.http.get<GetCustomerPhoneNumbersResultItem[]>(\n endpoints.customers.phoneNumbers.getCustomerPhoneNumbers.render(\n customerId,\n ),\n options,\n );\n }\n\n /**\n * Adds a new phone number to a customer's contact information.\n */\n async addCustomerPhoneNumber(\n request: AddCustomerPhoneNumberRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.customers.phoneNumbers.addCustomerPhoneNumber.render(\n request.customerId,\n ),\n request,\n options,\n );\n }\n\n /**\n * Removes a phone number from a customer's contact information.\n */\n async removeCustomerPhoneNumber(\n request: RemoveCustomerPhoneNumberRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.deleteNoContent(\n endpoints.customers.phoneNumbers.removeCustomerPhoneNumber.render(\n request,\n ),\n options,\n );\n }\n\n /**\n * Changes the primary phone number for a customer.\n */\n async changePrimaryCustomerPhoneNumber(\n request: ChangePrimaryCustomerPhoneNumberRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.customers.phoneNumbers.changePrimaryCustomerPhoneNumber.render(\n request,\n ),\n undefined,\n options,\n );\n }\n\n /**\n * Assigns a specific agent representative to manage a customer's account.\n */\n async setCustomerRepresentative(\n request: SetCustomerRepresentativeRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.customers.setCustomerRepresentative.render(request.customerId),\n request,\n options,\n );\n }\n\n /**\n * Assigns or changes the branch for a customer to organize customer segmentation and reporting.\n *\n * Müşteri segmentasyonu ve raporlama için müşterinin şubesini atar veya değiştirir.\n *\n * @param request Branch assignment request / Şube atama talebi\n * @returns Operation result / İşlem sonucu\n */\n async setCustomerBranch(\n request: SetCustomerBranchRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.customers.setCustomerBranch.render(request.customerId),\n request,\n options,\n );\n }\n\n // Address management methods\n\n /**\n * Creates a new customer address record using property number as the single source of truth.\n *\n * Tek doğruluk kaynağı olarak konut numarasını kullanarak yeni müşteri adres kaydı oluşturur.\n *\n * @param request Address creation request / Adres oluşturma talebi\n * @returns Created address information / Oluşturulan adres bilgileri\n */\n async createCustomerAddress(\n request: CreateCustomerAddressRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<CreateCustomerAddressResult>> {\n return this.http.post<CreateCustomerAddressResult>(\n endpoints.customers.addresses.create.render(request.customerId),\n request,\n options,\n );\n }\n\n /**\n * Updates the type classification of an existing customer address.\n *\n * Mevcut bir müşteri adresinin tür sınıflandırmasını günceller.\n *\n * @param request Address update request / Adres güncelleme talebi\n * @returns Operation result / İşlem sonucu\n */\n async updateCustomerAddress(\n request: UpdateCustomerAddressRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.putNoContent(\n endpoints.customers.addresses.update.render(\n request.customerId,\n request.addressId,\n ),\n request,\n options,\n );\n }\n\n /**\n * Retrieves detailed information about a specific customer address.\n *\n * Belirli bir müşteri adresi hakkında detaylı bilgileri getirir.\n *\n * @param customerId Unique identifier of the customer / Müşterinin benzersiz tanımlayıcısı\n * @param addressId Unique identifier of the address / Adresin benzersiz tanımlayıcısı\n * @returns Address details / Adres detayları\n */\n async getCustomerAddressById(\n customerId: string,\n addressId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCustomerAddressResult>> {\n return this.http.get<GetCustomerAddressResult>(\n endpoints.customers.addresses.getById.render(customerId, addressId),\n options,\n );\n }\n\n /**\n * Retrieves all addresses owned by a specific customer for comprehensive address management.\n *\n * Kapsamlı adres yönetimi için belirli bir müşteriye ait tüm adresleri getirir.\n *\n * @param customerId Unique identifier of the customer / Müşterinin benzersiz tanımlayıcısı\n * @returns Customer addresses / Müşteri adresleri\n */\n async getCustomerAddresses(\n customerId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCustomerAddressResult[]>> {\n return this.http.get<GetCustomerAddressResult[]>(\n endpoints.customers.addresses.getAll.render(customerId),\n options,\n );\n }\n\n /**\n * Deletes a customer address from their address collection.\n *\n * Müşterinin adres koleksiyonundan bir adresi siler.\n *\n * @param customerId Unique identifier of the customer / Müşterinin benzersiz tanımlayıcısı\n * @param addressId Unique identifier of the address to delete / Silinecek adresin benzersiz tanımlayıcısı\n * @returns Operation result / İşlem sonucu\n */\n async deleteCustomerAddress(\n customerId: string,\n addressId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.deleteNoContent(\n endpoints.customers.addresses.delete.render(customerId, addressId),\n options,\n );\n }\n\n // Consent management methods\n\n /**\n * Records customer consent for data processing or marketing communications in compliance with KVKK/ETK regulations.\n *\n * KVKK/ETK düzenlemelerine uygun olarak veri işleme veya pazarlama iletişimleri için müşteri iznini kaydeder.\n *\n * @param customerId Unique identifier of the customer / Müşterinin benzersiz tanımlayıcısı\n * @param request Consent recording request / İzin kayıt talebi\n * @returns Operation result / İşlem sonucu\n */\n async giveCustomerConsent(\n customerId: string,\n request: GiveCustomerConsentRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.customers.consents.give.render(customerId),\n request,\n options,\n );\n }\n\n /**\n * Revokes a previously granted customer consent in accordance with customer data rights.\n *\n * Müşteri veri hakları uyarınca önceden verilmiş bir müşteri iznini geri çeker.\n *\n * @param customerId Unique identifier of the customer / Müşterinin benzersiz tanımlayıcısı\n * @param request Consent revocation request / İzin geri çekme talebi\n * @returns Operation result / İşlem sonucu\n */\n async revokeCustomerConsent(\n customerId: string,\n request: RevokeCustomerConsentRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.customers.consents.revoke.render(customerId),\n request,\n options,\n );\n }\n\n /**\n * Retrieves both active consent states and complete consent history for a customer in a single optimized API call.\n *\n * Müşterinin hem aktif izin durumlarını hem de tam izin geçmişini tek bir optimize edilmiş API çağrısında getirir.\n *\n * @param customerId Unique identifier of the customer / Müşterinin benzersiz tanımlayıcısı\n * @returns Active consent states and complete history / Aktif izin durumları ve tam geçmiş\n */\n async getCustomerConsents(\n customerId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCustomerConsentsResult>> {\n return this.http.get<GetCustomerConsentsResult>(\n endpoints.customers.consents.getAll.render(customerId),\n options,\n );\n }\n\n /**\n * Retrieves comprehensive health information for a customer.\n */\n async getCustomerHealthInfo(\n customerId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCustomerHealthInfoResult>> {\n return this.http.get<GetCustomerHealthInfoResult>(\n endpoints.customers.getHealthInfo.render(customerId),\n options,\n );\n }\n\n /**\n * Updates customer health information.\n */\n async updateCustomerHealthInfo(\n request: UpdateCustomerHealthInfoRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.putNoContent(\n endpoints.customers.updateHealthInfo.render(request.customerId),\n request,\n options,\n );\n }\n\n /**\n * Initiates a new customer contact flow.\n */\n async createCustomerContactFlow(\n request: CreateContactFlowRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.customers.contactFlows.createContactFlow.render(\n request.customerId,\n ),\n request,\n options,\n );\n }\n\n /**\n * Records a customer contact interaction.\n */\n async createCustomerContact(\n request: CreateCustomerContactRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.customers.contacts.create.render(request.customerId),\n request,\n options,\n );\n }\n\n /**\n * Completes and closes a customer contact flow.\n */\n async endCustomerContactFlow(\n request: EndContactFlowRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.customers.contactFlows.endContactFlow.render(\n request.customerId,\n request.contactFlowId,\n ),\n request,\n options,\n );\n }\n\n /**\n * Retrieves all contact flows for a customer.\n */\n async getCustomerContactFlows(\n customerId: string,\n caseRef?: string | null,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCustomerContactFlowsResultItem[]>> {\n return this.http.get<GetCustomerContactFlowsResultItem[]>(\n endpoints.customers.contactFlows.getCustomerContactFlows.render(\n customerId,\n caseRef,\n ),\n options,\n );\n }\n\n /**\n * Retrieves all individual contact interactions for a customer.\n */\n async getCustomerContacts(\n customerId: string,\n caseRef?: string | null,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCustomerContactsResultItem[]>> {\n return this.http.get<GetCustomerContactsResultItem[]>(\n endpoints.customers.contacts.getCustomerContacts.render(\n customerId,\n caseRef,\n ),\n options,\n );\n }\n\n /**\n * Performs external customer data lookup.\n */\n async externalLookupCustomer(\n request: ExternalLookupCustomerRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<ExternalLookupCustomerResult>> {\n return this.http.post<ExternalLookupCustomerResult>(\n endpoints.customers.externalLookup,\n request,\n options,\n );\n }\n\n // ============================================\n // GraphQL Methods\n // ============================================\n\n /**\n * Retrieves a paginated list of customers using GraphQL with type-safe field selection.\n *\n * GraphQL kullanarak tip güvenli alan seçimi ile sayfalanmış müşteri listesi getirir.\n *\n * @example\n * // Get all fields\n * const result = await client.customers.getCustomers({ first: 10 });\n *\n * @example\n * // Type-safe field selection\n * const result = await client.customers.getCustomers({\n * select: ['id', 'name', 'type', 'primaryEmail'] as const,\n * first: 10,\n * filter: { type: { eq: CustomerType.INDIVIDUAL } }\n * });\n * // result.data.nodes[0].id - ✓ string\n * // result.data.nodes[0].name - ✓ string | null\n * // result.data.nodes[0].type - ✓ CustomerType\n * // result.data.nodes[0].birthDate - ✗ TypeScript Error!\n *\n * @param requestOptions Query options including pagination, filters, search, and field selection\n * @returns Paginated connection of customers with type-narrowed fields\n */\n async getCustomers<const TFields extends CustomerFieldKey[]>(\n requestOptions?: GetCustomersOptions<TFields>,\n options?: RequestOptions,\n ): Promise<InsurUpGraphQLResult<CustomersConnection<TFields>>> {\n if (!this.graphql) {\n throw new Error(\n \"GraphQL transport is not available. Ensure the client is properly initialized.\",\n );\n }\n\n const fields = (requestOptions?.select ??\n ALL_CUSTOMER_FIELDS) as CustomerFieldKey[];\n const fieldSelection = buildFieldSelection(fields);\n const includeTotalCount = requestOptions?.includeTotalCount !== false;\n\n const query = `\n query GetCustomers(\n $first: Int\n $after: String\n $last: Int\n $before: String\n $search: searching_QueryCustomerModelFilterInput\n $filter: filtering_QueryCustomerModelFilterInput\n $order: [sorting_QueryCustomerModelSortInput!]\n ) {\n customersNew(\n first: $first\n after: $after\n last: $last\n before: $before\n search: $search\n filter: $filter\n order: $order\n ) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n ${includeTotalCount ? \"totalCount\" : \"\"}\n edges {\n cursor\n node {\n ${fieldSelection}\n }\n }\n }\n }\n `;\n\n const variables: Record<string, unknown> = {};\n\n // Default to first: 50 if no pagination params provided\n if (\n requestOptions?.first === undefined &&\n requestOptions?.last === undefined\n ) {\n variables.first = 50;\n } else {\n if (requestOptions?.first !== undefined)\n variables.first = requestOptions.first;\n if (requestOptions?.last !== undefined)\n variables.last = requestOptions.last;\n }\n\n if (requestOptions?.after !== undefined)\n variables.after = requestOptions.after;\n if (requestOptions?.before !== undefined)\n variables.before = requestOptions.before;\n if (requestOptions?.search !== undefined)\n variables.search = requestOptions.search;\n if (requestOptions?.filter !== undefined)\n variables.filter = requestOptions.filter;\n if (requestOptions?.order !== undefined)\n variables.order = requestOptions.order;\n\n const result = await this.graphql.query<{\n customersNew: Omit<CustomersConnection, \"nodes\">;\n }>(query, variables, options);\n\n if (!result.isSuccess) {\n return result as InsurUpGraphQLResult<CustomersConnection<TFields>>;\n }\n\n // Derive nodes from edges\n const edges = result.data.customersNew.edges;\n const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;\n\n // Return the customersNew data with derived nodes\n return {\n ...result,\n data: {\n ...result.data.customersNew,\n nodes,\n },\n } as InsurUpGraphQLResult<CustomersConnection<TFields>>;\n }\n}\n","/**\n * @fileoverview Vehicle Client Implementation\n * @description Provides comprehensive vehicle management operations for handling customer vehicles, vehicle data lookups,\n * brand and model queries, and vehicle-based insurance operations within the automotive insurance ecosystem.\n */\n\nimport type { HttpTransport } from \"../client/http.js\";\nimport type { InsurUpResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport type { InsuranceParameter } from \"@insurup/contracts\";\nimport type {\n CreateCustomerVehicleRequest,\n CreateCustomerVehicleResult,\n UpdateCustomerVehicleRequest,\n GetCustomerVehicleResult,\n GetCustomerVehiclesRequest,\n GetCustomerVehiclesResult,\n ExternalLookupVehicleRequest,\n ExternalLookupVehicleResult,\n QueryVehicleModelTypesRequest,\n QueryVehicleByBrandCodeRequest,\n QueryVehicleByBrandCodeResult,\n} from \"@insurup/contracts\";\nimport { endpoints } from \"../core/endpoints.js\";\n\n/**\n * Vehicle Management Client\n *\n * Specialized client for managing customer vehicles and automotive industry data within the InsurUp platform.\n * Handles vehicle lifecycle management, chassis number validations, external vehicle data lookups, brand and model\n * queries, and vehicle-based insurance operations. Essential for agencies offering vehicle insurance products including\n * Kasko (comprehensive vehicle insurance), TSS (traffic insurance), and IMM (voluntary financial liability) coverage,\n * requiring accurate vehicle identification, validation, and market data integration for proper risk assessment and pricing.\n *\n * InsurUp platformu içinde müşteri araçları ve otomotiv sektörü verilerini yönetmek için özelleşmiş istemci.\n * Araç yaşam döngüsü yönetimi, şasi numarası doğrulamaları, harici araç veri aramaları, marka ve model sorguları ve\n * araç tabanlı sigorta operasyonlarını yönetir. Kasko (kasko araç sigortası), TSS (trafik sigortası) ve İMM (ihtiyari\n * mali mesuliyet) teminatı dahil araç sigortası ürünleri sunan ve uygun risk değerlendirmesi ile fiyatlandırma için\n * doğru araç tanımlaması, doğrulama ve pazar veri entegrasyonu gerektiren acenteler için olmazsa olmazdır.\n */\nexport class InsurUpVehicleClient {\n constructor(private readonly http: HttpTransport) {}\n\n /**\n * Adds a new vehicle to a customer's profile with complete vehicle information including chassis number and specifications.\n *\n * Şasi numarası ve özellikler dahil tam araç bilgileri ile müşterinin profiline yeni araç ekler.\n *\n * @param request Vehicle creation request with vehicle details / Araç detayları ile araç oluşturma talebi\n * @returns Created vehicle information / Oluşturulan araç bilgileri\n */\n async addCustomerVehicle(\n request: CreateCustomerVehicleRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<CreateCustomerVehicleResult>> {\n const path = endpoints.vehicles.create.render(request.customerId);\n return this.http.post<CreateCustomerVehicleResult>(path, request, options);\n }\n\n /**\n * Updates existing customer vehicle information including modifications, ownership changes, or specification updates.\n *\n * Modifikasyonlar, sahiplik değişiklikleri veya özellik güncellemeleri dahil mevcut müşteri araç bilgilerini günceller.\n *\n * @param request Vehicle update request / Araç güncelleme talebi\n * @returns Operation result / İşlem sonucu\n */\n async updateCustomerVehicle(\n request: UpdateCustomerVehicleRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const path = endpoints.vehicles.update.render(\n request.customerId,\n request.vehicleId,\n );\n return this.http.putNoContent(path, request, options);\n }\n\n /**\n * Retrieves detailed information about a specific customer vehicle including its insurance history and current status.\n *\n * Belirli bir müşteri aracı hakkında sigorta geçmişi ve mevcut durumu dahil detaylı bilgileri getirir.\n *\n * @param customerId Unique identifier of the customer / Müşterinin benzersiz tanımlayıcısı\n * @param vehicleId Unique identifier of the vehicle / Aracın benzersiz tanımlayıcısı\n * @returns Vehicle details / Araç detayları\n */\n async getCustomerVehicle(\n customerId: string,\n vehicleId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCustomerVehicleResult>> {\n const path = endpoints.vehicles.get.render(customerId, vehicleId);\n return this.http.get<GetCustomerVehicleResult>(path, options);\n }\n\n /**\n * Retrieves all vehicles owned by a specific customer for comprehensive vehicle portfolio management.\n *\n * Kapsamlı araç portföy yönetimi için belirli bir müşterinin sahip olduğu tüm araçları getirir.\n *\n * @param request Customer vehicles query request / Müşteri araçları sorgu talebi\n * @returns List of customer vehicles / Müşteri araçları listesi\n */\n async getCustomerVehicles(\n request: GetCustomerVehiclesRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCustomerVehiclesResult[]>> {\n const path = endpoints.vehicles.getCustomerVehicles.render(\n request.customerId,\n );\n return this.http.get<GetCustomerVehiclesResult[]>(path, options);\n }\n\n /**\n * Permanently removes a customer vehicle record from the system with proper data cleanup and insurance impact assessment.\n *\n * Uygun veri temizliği ve sigorta etki değerlendirmesi ile müşteri araç kaydını sistemden kalıcı olarak kaldırır.\n *\n * @param customerId Unique identifier of the customer / Müşterinin benzersiz tanımlayıcısı\n * @param vehicleId Unique identifier of the vehicle / Aracın benzersiz tanımlayıcısı\n * @returns Operation result / İşlem sonucu\n */\n async deleteCustomerVehicle(\n customerId: string,\n vehicleId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const path = endpoints.vehicles.delete.render(customerId, vehicleId);\n return this.http.deleteNoContent(path, options);\n }\n\n /**\n * Performs external vehicle data lookup using chassis number or license plate to retrieve official vehicle information.\n *\n * Resmi araç bilgilerini almak için şasi numarası veya plaka kullanarak harici araç veri araması yapar.\n *\n * @param request External vehicle lookup request / Harici araç arama talebi\n * @returns External vehicle data / Harici araç verileri\n */\n async externalLookupVehicle(\n request: ExternalLookupVehicleRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<ExternalLookupVehicleResult>> {\n const path = endpoints.vehicles.externalLookup.render(request.customerId);\n return this.http.post<ExternalLookupVehicleResult>(path, request, options);\n }\n\n /**\n * Retrieves all available vehicle brands for vehicle selection and registration purposes.\n *\n * Araç seçimi ve kayıt amaçları için mevcut tüm araç markalarını getirir.\n *\n * @returns List of vehicle brands / Araç markaları listesi\n */\n async queryVehicleBrands(\n options?: RequestOptions,\n ): Promise<InsurUpResult<InsuranceParameter[]>> {\n const path = endpoints.vehicleParameters.queryBrands;\n return this.http.get<InsuranceParameter[]>(path, options);\n }\n\n /**\n * Retrieves all vehicle models for a specific brand including different model years and specifications.\n *\n * Farklı model yılları ve özellikler dahil belirli bir marka için tüm araç modellerini getirir.\n *\n * @param request Vehicle model query request / Araç modeli sorgu talebi\n * @returns List of vehicle models / Araç modelleri listesi\n */\n async queryVehicleModels(\n request: QueryVehicleModelTypesRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<InsuranceParameter[]>> {\n const path = endpoints.vehicleParameters.queryModels.render(request);\n return this.http.get<InsuranceParameter[]>(path, options);\n }\n\n /**\n * Queries vehicle information using a specific brand code to retrieve detailed brand and model specifications.\n *\n * Detaylı marka ve model özelliklerini almak için belirli bir marka kodu kullanarak araç bilgilerini sorgular.\n *\n * @param brandCode Vehicle brand code for query / Sorgu için araç marka kodu\n * @returns Vehicle brand information / Araç marka bilgileri\n */\n async queryVehicleByBrandCode(\n brandCode: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<QueryVehicleByBrandCodeResult>> {\n const path = endpoints.insuranceServices.queryVehicleByBrandCode;\n const request: QueryVehicleByBrandCodeRequest = { brandCode };\n return this.http.post<QueryVehicleByBrandCodeResult>(\n path,\n request,\n options,\n );\n }\n}\n","/**\n * Property Management Client\n *\n * Provides comprehensive property management operations for handling customer properties, Turkish address hierarchy queries,\n * DASK earthquake insurance lookups, and property-based insurance operations within the real estate insurance ecosystem.\n *\n * Gayrimenkul sigorta ekosistemi içinde müşteri mülklerini yönetme, Türk adres hiyerarşisi sorguları, DASK deprem\n * sigortası aramaları ve mülk tabanlı sigorta operasyonları için kapsamlı mülk yönetimi işlemlerini sağlar.\n */\n\nimport type { HttpTransport } from \"../client/http.js\";\nimport type { InsurUpResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport type { InsuranceParameter } from \"@insurup/contracts\";\nimport type {\n // Address parameter requests\n QueryDistrictsRequest,\n QueryTownsRequest,\n QueryNeighbourhoodsRequest,\n QueryStreetsRequest,\n QueryBuildingsRequest,\n QueryApartmentsRequest,\n\n // Property management requests\n CreateCustomerPropertyRequest,\n UpdateCustomerPropertyRequest,\n GetPropertyAddressByPropertyNumberRequest,\n\n // Property management responses\n CreateCustomerPropertyResult,\n GetCustomerPropertyByIdResult,\n GetAllCustomerPropertiesResult,\n QueryPropertyByDaskOldPolicyResult,\n} from \"@insurup/contracts\";\nimport type { PropertyAddress } from \"@insurup/contracts\";\nimport { addressParameters, properties } from \"../core/endpoints.js\";\n\n/**\n * Property Management Client\n *\n * Specialized client for managing customer properties and Turkish address system integration within the InsurUp platform.\n * Handles the complete Turkish administrative address hierarchy (City→District→Town→Neighborhood→Street→Building→Apartment),\n * customer property lifecycle management, DASK earthquake insurance policy lookups, and property-based insurance operations.\n * Essential for agencies offering property insurance products including home insurance (Konut), earthquake insurance (DASK),\n * and commercial property coverage, requiring precise address validation and property identification within Turkey's\n * administrative structure.\n *\n * InsurUp platformu içinde müşteri mülkleri ve Türk adres sistemi entegrasyonunu yönetmek için özelleşmiş istemci.\n * Tam Türk idari adres hiyerarşisini (Şehir→İlçe→Kasaba→Mahalle→Sokak→Bina→Daire), müşteri mülk yaşam döngüsü yönetimini,\n * DASK deprem sigortası poliçe aramalarını ve mülk tabanlı sigorta operasyonlarını yönetir. Ev sigortası (Konut), deprem\n * sigortası (DASK) ve ticari mülk teminatı dahil mülk sigortası ürünleri sunan ve Türkiye'nin idari yapısı içinde hassas\n * adres doğrulaması ve mülk tanımlaması gerektiren acenteler için olmazsa olmazdır.\n */\nexport class InsurUpPropertyClient {\n constructor(private readonly http: HttpTransport) {}\n\n // ===== LOCATION/ADDRESS QUERY METHODS =====\n\n /**\n * Retrieves all cities (provinces) in Turkey for address selection and property location identification.\n *\n * Adres seçimi ve mülk konum tanımlaması için Türkiye'deki tüm şehirleri (illeri) getirir.\n *\n * @returns List of Turkish cities / Türk şehirleri listesi\n */\n async queryCities(\n options?: RequestOptions,\n ): Promise<InsurUpResult<InsuranceParameter[]>> {\n return this.http.get<InsuranceParameter[]>(\n addressParameters.queryCities,\n options,\n );\n }\n\n /**\n * Retrieves all districts within a specific city following the Turkish administrative hierarchy.\n *\n * Türk idari hiyerarşisini takip ederek belirli bir şehir içindeki tüm ilçeleri getirir.\n *\n * @param request District query request with city selection / Şehir seçimi ile ilçe sorgu talebi\n * @returns List of districts in the selected city / Seçilen şehirdeki ilçeler listesi\n */\n async queryDistricts(\n request: QueryDistrictsRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<InsuranceParameter[]>> {\n return this.http.get<InsuranceParameter[]>(\n addressParameters.queryDistricts.render(request),\n options,\n );\n }\n\n /**\n * Retrieves all towns within a specific district for precise administrative location identification.\n *\n * Hassas idari konum tanımlaması için belirli bir ilçe içindeki tüm kasabaları getirir.\n *\n * @param request Town query request with district selection / İlçe seçimi ile kasaba sorgu talebi\n * @returns List of towns in the selected district / Seçilen ilçedeki kasabalar listesi\n */\n async queryTowns(\n request: QueryTownsRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<InsuranceParameter[]>> {\n return this.http.get<InsuranceParameter[]>(\n addressParameters.queryTowns.render(request),\n options,\n );\n }\n\n /**\n * Retrieves all neighborhoods within a specific administrative area for detailed address specification.\n *\n * Detaylı adres belirtimi için belirli bir idari alan içindeki tüm mahalleleri getirir.\n *\n * @param request Neighborhood query request / Mahalle sorgu talebi\n * @returns List of neighborhoods / Mahalleler listesi\n */\n async queryNeighborhoods(\n request: QueryNeighbourhoodsRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<InsuranceParameter[]>> {\n return this.http.get<InsuranceParameter[]>(\n addressParameters.queryNeighbourhoods.render(request),\n options,\n );\n }\n\n /**\n * Retrieves all streets within a specific neighborhood for complete address formation.\n *\n * Tam adres oluşturma için belirli bir mahalle içindeki tüm sokakları getirir.\n *\n * @param request Street query request / Sokak sorgu talebi\n * @returns List of streets / Sokaklar listesi\n */\n async queryStreets(\n request: QueryStreetsRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<InsuranceParameter[]>> {\n return this.http.get<InsuranceParameter[]>(\n addressParameters.queryStreets.render(request),\n options,\n );\n }\n\n /**\n * Retrieves all buildings on a specific street for precise property identification and addressing.\n *\n * Hassas mülk tanımlaması ve adresleme için belirli bir sokaktaki tüm binaları getirir.\n *\n * @param request Building query request / Bina sorgu talebi\n * @returns List of buildings / Binalar listesi\n */\n async queryBuildings(\n request: QueryBuildingsRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<InsuranceParameter[]>> {\n return this.http.get<InsuranceParameter[]>(\n addressParameters.queryBuildings.render(request),\n options,\n );\n }\n\n /**\n * Retrieves all apartments within a specific building for individual property unit identification.\n *\n * Bireysel mülk birimi tanımlaması için belirli bir bina içindeki tüm daireleri getirir.\n *\n * @param request Apartment query request / Daire sorgu talebi\n * @returns List of apartments / Daireler listesi\n */\n async queryApartments(\n request: QueryApartmentsRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<InsuranceParameter[]>> {\n return this.http.get<InsuranceParameter[]>(\n addressParameters.queryApartments.render(request),\n options,\n );\n }\n\n // ===== PROPERTY MANAGEMENT METHODS =====\n\n /**\n * Creates a new customer property record with complete address information and property characteristics for insurance purposes.\n *\n * Sigorta amaçları için tam adres bilgileri ve mülk özellikleri ile yeni müşteri mülk kaydı oluşturur.\n *\n * @param request Property creation request with details / Detaylar ile mülk oluşturma talebi\n * @returns Created property information / Oluşturulan mülk bilgileri\n */\n async createCustomerProperty(\n request: CreateCustomerPropertyRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<CreateCustomerPropertyResult>> {\n return this.http.post<CreateCustomerPropertyResult>(\n properties.create.render(request.customerId),\n request,\n options,\n );\n }\n\n /**\n * Updates existing customer property information including address changes, structural modifications, or usage updates.\n *\n * Adres değişiklikleri, yapısal değişiklikler veya kullanım güncellemeleri dahil mevcut müşteri mülk bilgilerini günceller.\n *\n * @param request Property update request / Mülk güncelleme talebi\n * @returns Operation result / İşlem sonucu\n */\n async updateCustomerProperty(\n request: UpdateCustomerPropertyRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.putNoContent(\n properties.update.render(request.customerId, request.propertyId),\n request,\n options,\n );\n }\n\n /**\n * Retrieves detailed information about a specific customer property including its insurance history and characteristics.\n *\n * Belirli bir müşteri mülkü hakkında sigorta geçmişi ve özellikleri dahil detaylı bilgileri getirir.\n *\n * @param customerId Unique identifier of the customer / Müşterinin benzersiz tanımlayıcısı\n * @param propertyId Unique identifier of the property / Mülkün benzersiz tanımlayıcısı\n * @returns Property details / Mülk detayları\n */\n async getCustomerPropertyById(\n customerId: string,\n propertyId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCustomerPropertyByIdResult>> {\n return this.http.get<GetCustomerPropertyByIdResult>(\n properties.getById.render(customerId, propertyId),\n options,\n );\n }\n\n /**\n * Retrieves all properties owned by a specific customer for comprehensive property portfolio management.\n *\n * Kapsamlı mülk portföy yönetimi için belirli bir müşterinin sahip olduğu tüm mülkleri getirir.\n *\n * @param customerId Unique identifier of the customer / Müşterinin benzersiz tanımlayıcısı\n * @returns List of customer properties / Müşteri mülkleri listesi\n */\n async getCustomerProperties(\n customerId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetAllCustomerPropertiesResult[]>> {\n return this.http.get<GetAllCustomerPropertiesResult[]>(\n properties.getAll.render(customerId),\n options,\n );\n }\n\n /**\n * Permanently removes a customer property record from the system with proper data cleanup and insurance impact assessment.\n *\n * Uygun veri temizliği ve sigorta etki değerlendirmesi ile müşteri mülk kaydını sistemden kalıcı olarak kaldırır.\n *\n * @param customerId Unique identifier of the customer / Müşterinin benzersiz tanımlayıcısı\n * @param propertyId Unique identifier of the property / Mülkün benzersiz tanımlayıcısı\n * @returns Operation result / İşlem sonucu\n */\n async deleteCustomerProperty(\n customerId: string,\n propertyId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.deleteNoContent(\n properties.delete.render(customerId, propertyId),\n options,\n );\n }\n\n /**\n * Retrieves property address information using the official Turkish property registration number for verification purposes.\n *\n * Doğrulama amaçları için resmi Türk mülk kayıt numarasını kullanarak mülk adres bilgilerini getirir.\n *\n * @param propertyNumber Official Turkish property registration number / Resmi Türk mülk kayıt numarası\n * @returns Property address information / Mülk adres bilgileri\n */\n async getPropertyAddressByPropertyNumber(\n propertyNumber: number,\n options?: RequestOptions,\n ): Promise<InsurUpResult<PropertyAddress>> {\n return this.http.post<PropertyAddress>(\n properties.getPropertyAddressByPropertyNumber,\n {\n propertyNumber,\n } satisfies GetPropertyAddressByPropertyNumberRequest,\n options,\n );\n }\n\n /**\n * Queries property information using an existing DASK earthquake insurance policy number for cross-reference and continuity.\n *\n * Çapraz referans ve süreklilik için mevcut DASK deprem sigortası poliçe numarasını kullanarak mülk bilgilerini sorgular.\n *\n * @param daskPolicyNumber DASK earthquake insurance policy number / DASK deprem sigortası poliçe numarası\n * @returns Property information from DASK records / DASK kayıtlarından mülk bilgileri\n */\n async queryPropertyByDaskOldPolicy(\n daskPolicyNumber: number,\n options?: RequestOptions,\n ): Promise<InsurUpResult<QueryPropertyByDaskOldPolicyResult>> {\n return this.http.post<QueryPropertyByDaskOldPolicyResult>(\n properties.queryPropertyByDaskOldPolicy,\n { daskPolicyNumber },\n options,\n );\n }\n}\n","/**\n * @fileoverview Policy Management Client - Comprehensive policy operations\n * @description Provides comprehensive policy management operations for handling active insurance policies,\n * document generation, customer communications, representative assignments, and policy transfer processes\n */\n\nimport type { HttpTransport } from \"../client/http.js\";\nimport type { GraphQLTransport } from \"../client/graphql.js\";\nimport type { InsurUpResult, InsurUpGraphQLResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport type {\n GetPolicyDetailRequest,\n GetPolicyDetailResult,\n FetchPolicyDocumentRequest,\n FetchPolicyDocumentResult,\n SendPolicyDocumentRequest,\n SetPolicyRepresentativeRequest,\n SetPolicyBranchRequest,\n CreateManualPolicyRequest,\n CreateManualPolicyResult,\n UpdateManualPolicyRequest,\n GetPolicyCountAndPremiumAnalyticsRequest,\n GetPolicyCountAndPremiumAnalyticsResult,\n GetPolicyRenewalAnalyticsRequest,\n GetPolicyRenewalAnalyticsResult,\n GetPolicyDistributionByBranchRequest,\n GetPolicyDistributionByBranchResult,\n GetRepresentativeEarningsAnalyticsRequest,\n GetRepresentativeEarningsAnalyticsResult,\n} from \"@insurup/contracts\";\nimport type {\n GetPolicyTransferDetailRequest,\n GetPolicyTransferDetailResult,\n GetPolicyTransferTriggerDetailRequest,\n GetPolicyTransferTriggerDetailResult,\n CreatePolicyTransferRequest,\n TriggerPolicyTransferRequest,\n CreateFilePolicyTransferRequest,\n GetFilePolicyTransferDetailRequest,\n GetFilePolicyTransferDetailResult,\n} from \"@insurup/contracts\";\nimport { endpoints } from \"../core/endpoints.js\";\nimport {\n ALL_POLICY_FIELDS,\n type PolicyFieldKey,\n type GetPoliciesOptions,\n type PoliciesConnection,\n} from \"@insurup/contracts\";\nimport {\n ALL_POLICY_TRANSFER_FIELDS,\n type PolicyTransferFieldKey,\n type GetPolicyTransfersOptions,\n type PolicyTransfersConnection,\n} from \"@insurup/contracts\";\nimport {\n ALL_FILE_POLICY_TRANSFER_FIELDS,\n type FilePolicyTransferFieldKey,\n type GetFilePolicyTransfersOptions,\n type FilePolicyTransfersConnection,\n} from \"@insurup/contracts\";\nimport { buildFieldSelection } from \"@insurup/contracts\";\n\n/**\n * Policy Management Client / Poliçe Yönetimi İstemcisi\n *\n * Central client for managing active insurance policies throughout their lifecycle from issuance to expiration.\n * Handles policy documentation, customer communication, representative management, and complex policy transfer operations\n * including bulk transfers and file-based transfers. Essential for agencies that need to maintain comprehensive policy\n * administration, ensure proper documentation delivery to customers, manage policy ownership changes, and coordinate\n * policy transfers between different systems or agents while maintaining audit trails and regulatory compliance.\n *\n * Düzenlenmesinden sona ermesine kadar aktif sigorta poliçelerini yaşam döngüleri boyunca yönetmek için merkezi istemci.\n * Poliçe dokümantasyonu, müşteri iletişimi, temsilci yönetimi ve toplu transferler ile dosya tabanlı transferler dahil\n * karmaşık poliçe transfer operasyonlarını yönetir. Kapsamlı poliçe yönetimi sürdürmesi, müşterilere uygun dokümantasyon\n * teslimatını sağlaması, poliçe sahiplik değişikliklerini yönetmesi ve denetim izleri ile düzenleyici uyumu korurken\n * farklı sistemler veya acenteler arasında poliçe transferlerini koordine etmesi gereken acenteler için olmazsa olmazdır.\n */\nexport class InsurUpPolicyClient {\n constructor(\n private readonly http: HttpTransport,\n private readonly graphql?: GraphQLTransport,\n ) {}\n\n /**\n * Retrieves comprehensive details of a specific policy including coverage information, premium details, and current status.\n *\n * Teminat bilgileri, prim detayları ve mevcut durum dahil belirli bir poliçenin kapsamlı detaylarını getirir.\n *\n * @param request - Policy detail request with policy ID\n * @returns Detailed policy information\n */\n async getPolicyDetail(\n request: GetPolicyDetailRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetPolicyDetailResult>> {\n return this.http.get<GetPolicyDetailResult>(\n endpoints.policies.getPolicyDetail.render(request.policyId),\n options,\n );\n }\n\n /**\n * Fetches the official policy document from the insurance company's systems for customer delivery or records.\n *\n * Müşteri teslimatı veya kayıtlar için sigorta şirketinin sistemlerinden resmi poliçe belgesini getirir.\n *\n * @param request - Policy document fetch request with policy ID\n * @returns Policy document data\n */\n async fetchPolicyDocument(\n request: FetchPolicyDocumentRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<FetchPolicyDocumentResult>> {\n return this.http.get<FetchPolicyDocumentResult>(\n endpoints.policies.fetchPolicyDocument.render(request.policyId),\n options,\n );\n }\n\n /**\n * Sends the policy document directly to the customer via email or other communication channels for their records.\n *\n * Poliçe belgesini müşterinin kayıtları için e-posta veya diğer iletişim kanalları aracılığıyla doğrudan müşteriye gönderir.\n *\n * @param request - Document delivery request\n * @returns Operation result\n */\n async sendPolicyDocumentToCustomer(\n request: SendPolicyDocumentRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.policies.sendPolicyDocument.render(request.policyId),\n request,\n options,\n );\n }\n\n /**\n * Assigns or updates the representative responsible for managing a specific policy and customer relationship.\n *\n * Belirli bir poliçeyi ve müşteri ilişkisini yönetmekten sorumlu temsilciyi atar veya günceller.\n *\n * @param request - Representative assignment request\n * @returns Operation result\n */\n async setPolicyRepresentative(\n request: SetPolicyRepresentativeRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.policies.setPolicyRepresentative.render(request.policyId),\n request,\n options,\n );\n }\n\n /**\n * Assigns or changes the branch for a policy to organize policy segmentation and reporting.\n *\n * Poliçe segmentasyonu ve raporlama için poliçenin şubesini atar veya değiştirir.\n *\n * @param request Branch assignment request / Şube atama talebi\n * @returns Operation result / İşlem sonucu\n */\n async setPolicyBranch(\n request: SetPolicyBranchRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.policies.setPolicyBranch.render(request.policyId),\n request,\n options,\n );\n }\n\n /**\n * Creates a new manual policy through the agent panel without insurance services integration.\n *\n * Sigorta hizmetleri entegrasyonu olmadan acente paneli üzerinden yeni manuel poliçe oluşturur.\n *\n * @param request Manual policy creation request / Manuel poliçe oluşturma talebi\n * @returns Created policy identifier / Oluşturulan poliçe tanımlayıcısı\n */\n async createManualPolicy(\n request: CreateManualPolicyRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<CreateManualPolicyResult>> {\n return this.http.post<CreateManualPolicyResult>(\n endpoints.policies.createManualPolicy.definition,\n request,\n options,\n );\n }\n\n /**\n * Updates an existing manual policy through the agent panel and creates a new policy version for tracking changes.\n *\n * Acente paneli üzerinden mevcut manuel poliçeyi günceller ve değişiklikleri takip etmek için yeni poliçe versiyonu oluşturur.\n *\n * @param request Manual policy update request / Manuel poliçe güncelleme talebi\n * @returns Operation result / İşlem sonucu\n */\n async updateManualPolicy(\n request: UpdateManualPolicyRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.putNoContent(\n endpoints.policies.updateManualPolicy.render(request.policyId),\n request,\n options,\n );\n }\n\n /**\n * Retrieves comprehensive policy count and gross premium analytics with flexible filtering and grouping options.\n * Provides time series data, summary KPIs, and optional grouping by product branch or insurance company.\n *\n * Esnek filtreleme ve gruplama seçenekleri ile kapsamlı poliçe adedi ve brüt prim analitiği getirir.\n * Zaman serisi verileri, özet KPI'lar ve isteğe bağlı ürün branşı veya sigorta şirketine göre gruplama sağlar.\n *\n * @param request Analytics request with filters and grouping options / Filtreler ve gruplama seçenekleri ile analitik talebi\n * @returns Comprehensive analytics data including KPIs, time series, and grouped data / KPI'lar, zaman serisi ve gruplanmış veriler dahil kapsamlı analitik verileri\n */\n async getPolicyCountAndPremiumAnalytics(\n request: GetPolicyCountAndPremiumAnalyticsRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetPolicyCountAndPremiumAnalyticsResult>> {\n return this.http.post<GetPolicyCountAndPremiumAnalyticsResult>(\n endpoints.policies.getPolicyCountAndPremiumAnalytics.definition,\n request,\n options,\n );\n }\n\n /**\n * Retrieves stacked daily renewal analytics for policies with RenewalNumber greater than zero.\n * Provides branch segmented counts together with total and peak KPIs.\n *\n * RenewalNumber değeri sıfırdan büyük olan poliçeler için günlük yenileme analitiği sağlar.\n * Branş bazlı yığılmış adetler ile toplam ve pik KPI değerlerini döner.\n *\n * @param request Renewal analytics request with filtering options / Filtre seçenekleri ile yenileme analitiği isteği\n * @returns Renewal analytics response / Yenileme analitiği yanıtı\n */\n async getPolicyRenewalAnalytics(\n request: GetPolicyRenewalAnalyticsRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetPolicyRenewalAnalyticsResult>> {\n return this.http.post<GetPolicyRenewalAnalyticsResult>(\n endpoints.policies.getPolicyRenewalAnalytics.definition,\n request,\n options,\n );\n }\n\n /**\n * Retrieves policy distribution by branch analytics data.\n * Provides aggregated counts, gross premiums, and percentage shares grouped by product branch.\n *\n * Branş bazında poliçe dağılımı analitik verilerini getirir.\n * Ürün branşına göre gruplanmış toplam adetler, brüt primler ve yüzde payları sağlar.\n *\n * @param request Distribution analytics request with filtering options / Filtre seçenekleri ile dağılım analitiği isteği\n * @returns Distribution analytics response / Dağılım analitiği yanıtı\n */\n async getPolicyDistributionByBranch(\n request: GetPolicyDistributionByBranchRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetPolicyDistributionByBranchResult>> {\n return this.http.post<GetPolicyDistributionByBranchResult>(\n endpoints.policies.getPolicyDistributionByBranch.definition,\n request,\n options,\n );\n }\n\n /**\n * Retrieves representative earnings analytics data.\n * Provides earnings breakdown grouped by representative for performance tracking.\n *\n * Temsilci kazanç analitik verilerini getirir.\n * Performans takibi için temsilciye göre gruplanmış kazanç dökümü sağlar.\n *\n * @param request Representative earnings analytics request with filtering options / Filtre seçenekleri ile temsilci kazanç analitiği isteği\n * @returns Representative earnings analytics response / Temsilci kazanç analitiği yanıtı\n */\n async getRepresentativeEarningsAnalytics(\n request: GetRepresentativeEarningsAnalyticsRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetRepresentativeEarningsAnalyticsResult>> {\n return this.http.post<GetRepresentativeEarningsAnalyticsResult>(\n endpoints.policies.getRepresentativeEarningsAnalytics.definition,\n request,\n options,\n );\n }\n\n /**\n * Retrieves detailed information about a specific policy transfer process including status and progress tracking.\n *\n * Durum ve ilerleme takibi dahil belirli bir poliçe transfer süreciyle ilgili detaylı bilgileri getirir.\n *\n * @param request - Policy transfer detail request\n * @returns Policy transfer details\n */\n async getPolicyTransferDetail(\n request: GetPolicyTransferDetailRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetPolicyTransferDetailResult>> {\n return this.http.get<GetPolicyTransferDetailResult>(\n endpoints.policyTransfers.getPolicyTransferDetail.render(\n request.policyTransferId,\n ),\n options,\n );\n }\n\n /**\n * Retrieves specific trigger details for a policy transfer process to understand execution conditions and timing.\n *\n * Yürütme koşulları ve zamanlamasını anlamak için poliçe transfer sürecinin belirli tetikleyici detaylarını getirir.\n *\n * @param request - Policy transfer trigger detail request\n * @returns Transfer trigger details\n */\n async getPolicyTransferTriggerDetail(\n request: GetPolicyTransferTriggerDetailRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetPolicyTransferTriggerDetailResult>> {\n return this.http.get<GetPolicyTransferTriggerDetailResult>(\n endpoints.policyTransfers.getPolicyTransferTriggerDetail.render(\n request.policyTransferId,\n request.policyTransferTriggerId,\n ),\n options,\n );\n }\n\n /**\n * Creates a new policy transfer request to move policies between agents, agencies, or systems with proper validation.\n *\n * Uygun doğrulama ile poliçeleri acenteler, acenteler veya sistemler arasında taşımak için yeni poliçe transfer talebi oluşturur.\n *\n * @param request - Policy transfer creation request\n * @returns Created transfer identifier\n */\n async createPolicyTransfer(\n request: CreatePolicyTransferRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<string>> {\n return this.http.post<string>(\n endpoints.policyTransfers.create,\n request,\n options,\n );\n }\n\n /**\n * Executes a prepared policy transfer, initiating the actual movement of policies according to the transfer configuration.\n *\n * Hazırlanmış poliçe transferini yürütür ve transfer yapılandırmasına göre poliçelerin gerçek hareketini başlatır.\n *\n * @param request - Policy transfer trigger request\n * @returns Operation result\n */\n async triggerPolicyTransfer(\n request: TriggerPolicyTransferRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.policyTransfers.triggerPolicyTransfer.render(\n request.policyTransferId,\n ),\n request,\n options,\n );\n }\n\n /**\n * Creates a file-based policy transfer by uploading a file containing policy information for bulk transfer operations.\n *\n * Toplu transfer işlemleri için poliçe bilgilerini içeren dosya yükleyerek dosya tabanlı poliçe transferi oluşturur.\n *\n * @param request - File-based transfer request\n * @param file - File containing policy data\n * @param fileName - Name of the uploaded file\n * @returns Operation result\n */\n async createFilePolicyTransfer(\n request: CreateFilePolicyTransferRequest,\n file: File,\n fileName: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n // Create FormData for multipart file upload\n const formData = new FormData();\n formData.append(\n \"insuranceCompanyId\",\n request.insuranceCompanyId.toString(),\n );\n formData.append(\"file\", file, fileName);\n\n return this.http.postNoContent(\n endpoints.filePolicyTransfers.create,\n formData,\n options,\n );\n }\n\n /**\n * Retrieves detailed information about a file-based policy transfer including processing status and results.\n *\n * İşleme durumu ve sonuçları dahil dosya tabanlı poliçe transferi hakkında detaylı bilgileri getirir.\n *\n * @param request - File policy transfer detail request\n * @returns File transfer details\n */\n async getFilePolicyTransferDetail(\n request: GetFilePolicyTransferDetailRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetFilePolicyTransferDetailResult>> {\n return this.http.get<GetFilePolicyTransferDetailResult>(\n endpoints.filePolicyTransfers.getFilePolicyTransferDetail.render(\n request.filePolicyTransferId,\n ),\n options,\n );\n }\n\n // ============================================================================\n // GRAPHQL QUERIES\n // ============================================================================\n\n /**\n * Queries policies using GraphQL with advanced filtering, searching, sorting, and field selection.\n * Supports cursor-based pagination and type-safe field selection.\n *\n * Gelişmiş filtreleme, arama, sıralama ve alan seçimi ile GraphQL kullanarak poliçeleri sorgular.\n * İmleç tabanlı sayfalama ve tip-güvenli alan seçimini destekler.\n *\n * @example\n * // Basic query with all fields\n * const result = await client.policies.getPolicies({ first: 10 });\n *\n * @example\n * // Type-safe field selection\n * const result = await client.policies.getPolicies({\n * select: ['id', 'productBranch', 'grossPremium', 'state'] as const,\n * first: 10,\n * filter: { state: { eq: PolicyState.Active } }\n * });\n *\n * @param requestOptions Query options including pagination, filters, search, and field selection\n * @returns Paginated connection of policies with type-narrowed fields\n */\n async getPolicies<const TFields extends PolicyFieldKey[]>(\n requestOptions?: GetPoliciesOptions<TFields>,\n options?: RequestOptions,\n ): Promise<InsurUpGraphQLResult<PoliciesConnection<TFields>>> {\n if (!this.graphql) {\n throw new Error(\n \"GraphQL transport is not available. Ensure the client is properly initialized.\",\n );\n }\n\n const fields = (requestOptions?.select ??\n ALL_POLICY_FIELDS) as PolicyFieldKey[];\n const fieldSelection = buildFieldSelection(fields);\n const includeTotalCount = requestOptions?.includeTotalCount !== false;\n\n const query = `\n query GetPolicies(\n $first: Int\n $after: String\n $last: Int\n $before: String\n $search: searching_QueryPoliciesResultFilterInput\n $filter: filtering_QueryPoliciesResultFilterInput\n $order: [sorting_QueryPoliciesResultSortInput!]\n ) {\n policiesNew(\n first: $first\n after: $after\n last: $last\n before: $before\n search: $search\n filter: $filter\n order: $order\n ) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n ${includeTotalCount ? \"totalCount\" : \"\"}\n edges {\n cursor\n node {\n ${fieldSelection}\n }\n }\n }\n }\n `;\n\n const variables = {\n first: requestOptions?.first,\n after: requestOptions?.after,\n last: requestOptions?.last,\n before: requestOptions?.before,\n search: requestOptions?.search,\n filter: requestOptions?.filter,\n order: requestOptions?.order,\n };\n\n const result = await this.graphql.query<{\n policiesNew: Omit<PoliciesConnection, \"nodes\">;\n }>(query, variables, options);\n\n if (!result.isSuccess) {\n return result as InsurUpGraphQLResult<PoliciesConnection<TFields>>;\n }\n\n // Derive nodes from edges\n const edges = result.data.policiesNew.edges;\n const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;\n\n return {\n ...result,\n data: {\n ...result.data.policiesNew,\n nodes,\n },\n } as InsurUpGraphQLResult<PoliciesConnection<TFields>>;\n }\n\n /**\n * Queries policy transfers using GraphQL with advanced filtering, searching, sorting, and field selection.\n * Supports cursor-based pagination and type-safe field selection.\n *\n * Gelişmiş filtreleme, arama, sıralama ve alan seçimi ile GraphQL kullanarak poliçe transferlerini sorgular.\n * İmleç tabanlı sayfalama ve tip-güvenli alan seçimini destekler.\n *\n * @example\n * // Basic query with all fields\n * const result = await client.policies.getPolicyTransfers({ first: 10 });\n *\n * @param requestOptions Query options including pagination, filters, search, and field selection\n * @returns Paginated connection of policy transfers with type-narrowed fields\n */\n async getPolicyTransfers<const TFields extends PolicyTransferFieldKey[]>(\n requestOptions?: GetPolicyTransfersOptions<TFields>,\n options?: RequestOptions,\n ): Promise<InsurUpGraphQLResult<PolicyTransfersConnection<TFields>>> {\n if (!this.graphql) {\n throw new Error(\n \"GraphQL transport is not available. Ensure the client is properly initialized.\",\n );\n }\n\n const fields = (requestOptions?.select ??\n ALL_POLICY_TRANSFER_FIELDS) as PolicyTransferFieldKey[];\n const fieldSelection = buildFieldSelection(fields);\n\n const query = `\n query GetPolicyTransfers(\n $first: Int\n $after: String\n $last: Int\n $before: String\n $search: searching_QueryPolicyTransfersResultFilterInput\n $filter: filtering_QueryPolicyTransfersResultFilterInput\n $order: [sorting_QueryPolicyTransfersResultSortInput!]\n ) {\n policyTransfersNew(\n first: $first\n after: $after\n last: $last\n before: $before\n search: $search\n filter: $filter\n order: $order\n ) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n totalCount\n edges {\n cursor\n node {\n ${fieldSelection}\n }\n }\n }\n }\n `;\n\n const variables = {\n first: requestOptions?.first,\n after: requestOptions?.after,\n last: requestOptions?.last,\n before: requestOptions?.before,\n search: requestOptions?.search,\n filter: requestOptions?.filter,\n order: requestOptions?.order,\n };\n\n const result = await this.graphql.query<{\n policyTransfersNew: Omit<PolicyTransfersConnection, \"nodes\">;\n }>(query, variables, options);\n\n if (!result.isSuccess) {\n return result as InsurUpGraphQLResult<PolicyTransfersConnection<TFields>>;\n }\n\n // Derive nodes from edges\n const edges = result.data.policyTransfersNew.edges;\n const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;\n\n return {\n ...result,\n data: {\n ...result.data.policyTransfersNew,\n nodes,\n },\n } as InsurUpGraphQLResult<PolicyTransfersConnection<TFields>>;\n }\n\n /**\n * Queries file policy transfers using GraphQL with advanced filtering, searching, sorting, and field selection.\n * Supports cursor-based pagination and type-safe field selection.\n *\n * Gelişmiş filtreleme, arama, sıralama ve alan seçimi ile GraphQL kullanarak dosya bazlı poliçe transferlerini sorgular.\n * İmleç tabanlı sayfalama ve tip-güvenli alan seçimini destekler.\n *\n * @example\n * // Basic query with all fields\n * const result = await client.policies.getFilePolicyTransfers({ first: 10 });\n *\n * @param requestOptions Query options including pagination, filters, search, and field selection\n * @returns Paginated connection of file policy transfers with type-narrowed fields\n */\n async getFilePolicyTransfers<\n const TFields extends FilePolicyTransferFieldKey[],\n >(\n requestOptions?: GetFilePolicyTransfersOptions<TFields>,\n options?: RequestOptions,\n ): Promise<InsurUpGraphQLResult<FilePolicyTransfersConnection<TFields>>> {\n if (!this.graphql) {\n throw new Error(\n \"GraphQL transport is not available. Ensure the client is properly initialized.\",\n );\n }\n\n const fields = (requestOptions?.select ??\n ALL_FILE_POLICY_TRANSFER_FIELDS) as FilePolicyTransferFieldKey[];\n const fieldSelection = buildFieldSelection(fields);\n\n const query = `\n query GetFilePolicyTransfers(\n $first: Int\n $after: String\n $last: Int\n $before: String\n $search: searching_QueryFilePolicyTransfersResultFilterInput\n $filter: filtering_QueryFilePolicyTransfersResultFilterInput\n $order: [sorting_QueryFilePolicyTransfersResultSortInput!]\n ) {\n filePolicyTransfersNew(\n first: $first\n after: $after\n last: $last\n before: $before\n search: $search\n filter: $filter\n order: $order\n ) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n totalCount\n edges {\n cursor\n node {\n ${fieldSelection}\n }\n }\n }\n }\n `;\n\n const variables = {\n first: requestOptions?.first,\n after: requestOptions?.after,\n last: requestOptions?.last,\n before: requestOptions?.before,\n search: requestOptions?.search,\n filter: requestOptions?.filter,\n order: requestOptions?.order,\n };\n\n const result = await this.graphql.query<{\n filePolicyTransfersNew: Omit<FilePolicyTransfersConnection, \"nodes\">;\n }>(query, variables, options);\n\n if (!result.isSuccess) {\n return result as InsurUpGraphQLResult<\n FilePolicyTransfersConnection<TFields>\n >;\n }\n\n // Derive nodes from edges\n const edges = result.data.filePolicyTransfersNew.edges;\n const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;\n\n return {\n ...result,\n data: {\n ...result.data.filePolicyTransfersNew,\n nodes,\n },\n } as InsurUpGraphQLResult<FilePolicyTransfersConnection<TFields>>;\n }\n}\n","/**\n * @fileoverview Case Management Client - Direct port from DefaultInsurUpClient.Case.cs\n * @description TypeScript client for case management operations\n */\n\nimport { cases } from \"../core/endpoints.js\";\nimport type { InsurUpResult, InsurUpGraphQLResult } from \"../core/result.js\";\nimport type { HttpTransport } from \"../client/http.js\";\nimport type { GraphQLTransport } from \"../client/graphql.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport {\n ALL_CASE_FIELDS,\n type CaseFieldKey,\n type GetCasesOptions,\n type CasesConnection,\n} from \"@insurup/contracts\";\nimport { buildFieldSelection } from \"@insurup/contracts\";\nimport type {\n // Request types\n AssignCaseRepresentativeRequest,\n ChangeCaseChannelRequest,\n ChangeCaseStateRequest,\n CreateCancelCaseRequest,\n CreateComplaintCaseRequest,\n CreateCrossSaleOpportunityCaseRequest,\n CreateEndorsementCaseRequest,\n CreateNewSaleOpportunityCaseRequest,\n AddNoteToCaseRequest,\n SetCaseAssetRequest,\n SetCaseBranchRequest,\n GetSalesOpportunityFunnelAnalyticsRequest,\n GetOpenCaseBacklogPivotAnalyticsRequest,\n GetFailedCasesReasonDistributionRequest,\n // Response types\n GetCaseByRefResult,\n CasePolicyResult,\n CaseActivityResult,\n CaseProposalResult,\n GetSalesOpportunityFunnelAnalyticsResult,\n GetOpenCaseBacklogPivotAnalyticsResult,\n GetFailedCasesReasonDistributionResult,\n CaseCommunicationAutomationResult,\n GetCasePriorityTemplatesResult,\n} from \"@insurup/contracts\";\n\n/**\n * Case Management Client\n *\n * Central client for managing all types of customer cases and requests within the InsurUp platform. Handles various\n * case types including policy cancellations, customer complaints, cross-sale opportunities, endorsement requests, and\n * new sale opportunities. Provides comprehensive workflow management including case representative assignment, status tracking, activity\n * logging, and representative management. Essential for agencies that need to maintain organized customer service operations\n * and ensure proper follow-up on all customer interactions and business opportunities.\n *\n * InsurUp platformu içinde her türlü müşteri talebi ve isteğini yönetmek için merkezi istemci. Poliçe iptalleri,\n * müşteri şikayetleri, çapraz satış fırsatları, zeyilname talepleri ve yeni satış fırsatları dahil çeşitli talep türlerini\n * yönetir. Talep atama, durum takibi, aktivite kaydı ve temsilci yönetimi dahil kapsamlı iş akışı yönetimi sağlar.\n * Düzenli müşteri hizmet operasyonlarını sürdürmesi ve tüm müşteri etkileşimleri ile iş fırsatlarında uygun takibi\n * sağlaması gereken acenteler için olmazsa olmazdır.\n */\nexport class InsurUpCaseClient {\n constructor(\n private readonly http: HttpTransport,\n private readonly graphql?: GraphQLTransport,\n ) {}\n\n /**\n * Assigns a case representative to handle a specific customer case, ensuring proper ownership and accountability.\n *\n * Belirli bir müşteri talebini ele almak için talep temsilcisi atar ve uygun sahiplik ile hesap verebilirliği sağlar.\n *\n * @param request Case representative assignment request with representative details / Temsilci detayları ile talep atama talebi\n * @returns Operation result / İşlem sonucu\n */\n async assignCaseRepresentative(\n request: AssignCaseRepresentativeRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = cases.assignRepresentative.render(request.ref);\n return await this.http.putNoContent(endpoint, request, options);\n }\n\n /**\n * Changes the communication channel for a case to redirect it to appropriate department or platform.\n *\n * Bir talebin iletişim kanalını değiştirerek uygun departman veya platforma yönlendirir.\n *\n * @param request Channel change request / Kanal değişiklik talebi\n * @returns Operation result / İşlem sonucu\n */\n async changeCaseChannel(\n request: ChangeCaseChannelRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = cases.changeChannel.render(request.ref);\n return await this.http.putNoContent(endpoint, request, options);\n }\n\n /**\n * Updates the status of a case to reflect its current progress in the resolution workflow.\n *\n * Çözüm iş akışındaki mevcut ilerlemesini yansıtmak için talebin durumunu günceller.\n *\n * @param request Status change request / Durum değişiklik talebi\n * @returns Operation result / İşlem sonucu\n */\n async changeCaseState(\n request: ChangeCaseStateRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = cases.changeState.render(request.ref);\n return await this.http.putNoContent(endpoint, request, options);\n }\n\n /**\n * Creates a policy cancellation case when a customer requests to terminate their insurance coverage.\n *\n * Müşteri sigorta teminatını sonlandırma talebinde bulunduğunda poliçe iptal talebi oluşturur.\n *\n * @param request Cancellation case creation request / İptal talebi oluşturma talebi\n * @returns Created case identifier / Oluşturulan talep tanımlayıcısı\n */\n async createCancelCase(\n request: CreateCancelCaseRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<string>> {\n return await this.http.post<string>(cases.createCancel, request, options);\n }\n\n /**\n * Creates a complaint case to handle customer dissatisfaction or service issues requiring resolution.\n *\n * Müşteri memnuniyetsizliği veya çözüm gerektiren hizmet sorunlarını ele almak için şikayet talebi oluşturur.\n *\n * @param request Complaint case creation request / Şikayet talebi oluşturma talebi\n * @returns Created case identifier / Oluşturulan talep tanımlayıcısı\n */\n async createComplaintCase(\n request: CreateComplaintCaseRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<string>> {\n return await this.http.post<string>(\n cases.createComplaint,\n request,\n options,\n );\n }\n\n /**\n * Creates a cross-sale opportunity case to track potential additional insurance products for existing customers.\n *\n * Mevcut müşteriler için potansiyel ek sigorta ürünlerini takip etmek üzere çapraz satış fırsatı talebi oluşturur.\n *\n * @param request Cross-sale opportunity creation request / Çapraz satış fırsatı oluşturma talebi\n * @returns Created case identifier / Oluşturulan talep tanımlayıcısı\n */\n async createCrossSaleOpportunityCase(\n request: CreateCrossSaleOpportunityCaseRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<string>> {\n return await this.http.post<string>(\n cases.createCrossSaleOpportunity,\n request,\n options,\n );\n }\n\n /**\n * Creates an endorsement case for policy modifications or updates requested by the customer.\n *\n * Müşteri tarafından talep edilen poliçe değişiklikleri veya güncellemeler için zeyilname talebi oluşturur.\n *\n * @param request Endorsement case creation request / Zeyilname talebi oluşturma talebi\n * @returns Created case identifier / Oluşturulan talep tanımlayıcısı\n */\n async createEndorsementCase(\n request: CreateEndorsementCaseRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<string>> {\n return await this.http.post<string>(\n cases.createEndorsement,\n request,\n options,\n );\n }\n\n /**\n * Creates a new sale opportunity case to track potential insurance sales to prospective customers.\n *\n * Potansiyel müşterilere olası sigorta satışlarını takip etmek için yeni satış fırsatı talebi oluşturur.\n *\n * @param request New sale opportunity creation request / Yeni satış fırsatı oluşturma talebi\n * @returns Created case identifier / Oluşturulan talep tanımlayıcısı\n */\n async createNewSaleOpportunityCase(\n request: CreateNewSaleOpportunityCaseRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<string>> {\n return await this.http.post<string>(\n cases.createNewSaleOpportunity,\n request,\n options,\n );\n }\n\n /**\n * Retrieves all policies associated with a specific case for comprehensive case context and decision making.\n *\n * Kapsamlı talep bağlamı ve karar verme için belirli bir talep ile ilişkili tüm poliçeleri getirir.\n *\n * @param ref Case reference identifier / Talep referans tanımlayıcısı\n * @returns Associated policies / İlişkili poliçeler\n */\n async getCasePolicies(\n ref: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<CasePolicyResult[]>> {\n const endpoint = cases.getPolicies.render(ref);\n return await this.http.get<CasePolicyResult[]>(endpoint, options);\n }\n\n /**\n * Retrieves the complete activity history for a case showing all actions, updates, and communications.\n *\n * Tüm eylemleri, güncellemeleri ve iletişimleri gösteren talep için tam aktivite geçmişini getirir.\n *\n * @param ref Case reference identifier / Talep referans tanımlayıcısı\n * @returns Case activity history / Talep aktivite geçmişi\n */\n async getCaseActivities(\n ref: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<CaseActivityResult[]>> {\n const endpoint = cases.getActivities.render(ref);\n return await this.http.get<CaseActivityResult[]>(endpoint, options);\n }\n\n /**\n * Retrieves detailed information about a specific case including status, assigned representative, and progress.\n *\n * Belirli bir talep hakkında durum, atanan temsilci ve ilerleme dahil detaylı bilgileri getirir.\n *\n * @param ref Case reference identifier / Talep referans tanımlayıcısı\n * @returns Detailed case information / Detaylı talep bilgileri\n */\n async getCaseByRef(\n ref: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCaseByRefResult>> {\n const endpoint = cases.getCaseByRef.render(ref);\n return await this.http.get<GetCaseByRefResult>(endpoint, options);\n }\n\n /**\n * Retrieves all proposals associated with a specific case to understand related insurance quotations.\n *\n * İlgili sigorta tekliflerini anlamak için belirli bir talep ile ilişkili tüm teklifleri getirir.\n *\n * @param ref Case reference identifier / Talep referans tanımlayıcısı\n * @returns Associated proposals / İlişkili teklifler\n */\n async getCaseProposals(\n ref: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<CaseProposalResult[]>> {\n const endpoint = cases.getProposals.render(ref);\n return await this.http.get<CaseProposalResult[]>(endpoint, options);\n }\n\n /**\n * Adds a note or comment to a case for documentation, communication, or progress tracking purposes.\n *\n * Dokümantasyon, iletişim veya ilerleme takibi amaçları için talepe not veya yorum ekler.\n *\n * @param request Note addition request / Not ekleme talebi\n * @returns Operation result / İşlem sonucu\n */\n async addNoteToCase(\n request: AddNoteToCaseRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = cases.addNoteToCase.render(request.ref);\n return await this.http.putNoContent(endpoint, request, options);\n }\n\n /**\n * Sets or updates the asset associated with a case for proper tracking and management.\n *\n * Uygun takip ve yönetim için taleple ilişkili varlığı ayarlar veya günceller.\n *\n * @param request Asset assignment request / Varlık atama talebi\n * @returns Operation result / İşlem sonucu\n */\n async setCaseAsset(\n request: SetCaseAssetRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = cases.setAsset.render(request.ref);\n return await this.http.putNoContent(endpoint, request, options);\n }\n\n /**\n * Assigns or changes the branch for a case to organize case segmentation and reporting.\n *\n * Talep segmentasyonu ve raporlama için talebin şubesini atar veya değiştirir.\n *\n * @param request Branch assignment request / Şube atama talebi\n * @returns Operation result / İşlem sonucu\n */\n async setCaseBranch(\n request: SetCaseBranchRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = cases.setBranch.render(request.ref);\n return await this.http.putNoContent(endpoint, request, options);\n }\n\n /**\n * Retrieves analytics for the New Sales Opportunity Lifecycle Funnel dashboard widget.\n *\n * Yeni Satış Fırsatı Yaşam Döngüsü Hunisi gösterge paneli bileşeni için analitik verileri getirir.\n *\n * @param request Analytics request with filtering options / Filtreleme seçenekleri içeren analitik isteği\n * @returns Funnel analytics response / Huni analitiği yanıtı\n */\n async getSalesOpportunityFunnelAnalytics(\n request: GetSalesOpportunityFunnelAnalyticsRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetSalesOpportunityFunnelAnalyticsResult>> {\n return await this.http.post<GetSalesOpportunityFunnelAnalyticsResult>(\n cases.getSalesOpportunityFunnelAnalytics.definition,\n request,\n options,\n );\n }\n\n /**\n * Retrieves backlog analytics that pivot open cases by type and subtype for dashboard reporting.\n *\n * Gösterge paneli raporlaması için açık talepleri tür ve alt tür bazında pivotlayan backlog analitiğini getirir.\n *\n * @param request Backlog pivot analytics request / Backlog pivot analitiği isteği\n * @returns Backlog pivot analytics response / Backlog pivot analitiği yanıtı\n */\n async getOpenCaseBacklogPivotAnalytics(\n request: GetOpenCaseBacklogPivotAnalyticsRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetOpenCaseBacklogPivotAnalyticsResult>> {\n return await this.http.post<GetOpenCaseBacklogPivotAnalyticsResult>(\n cases.getOpenCaseBacklogPivotAnalytics.definition,\n request,\n options,\n );\n }\n\n /**\n * Retrieves failed cases reason distribution analytics for conversion improvement analysis.\n *\n * Dönüşüm iyileştirme analizi için başarısız taleplerin neden dağılımı analitiğini getirir.\n *\n * @param request Failed cases reason distribution analytics request / Başarısız talep neden dağılımı analitiği isteği\n * @returns Failed cases reason distribution analytics response / Başarısız talep neden dağılımı analitiği yanıtı\n */\n async getFailedCasesReasonDistribution(\n request: GetFailedCasesReasonDistributionRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetFailedCasesReasonDistributionResult>> {\n return await this.http.post<GetFailedCasesReasonDistributionResult>(\n cases.getFailedCasesReasonDistribution.definition,\n request,\n options,\n );\n }\n\n /**\n * Retrieves all available case communication automation configurations with their argument definitions.\n *\n * Argüman tanımları ile birlikte mevcut tüm talep iletişim otomasyonu yapılandırmalarını getirir.\n *\n * @returns Available communication automations / Mevcut iletişim otomasyonları\n */\n async getAllCaseCommunicationAutomations(\n options?: RequestOptions,\n ): Promise<InsurUpResult<CaseCommunicationAutomationResult[]>> {\n return await this.http.get<CaseCommunicationAutomationResult[]>(\n cases.communicationAutomations.getAll,\n options,\n );\n }\n\n /**\n * Retrieves all available case priority templates for agent configuration.\n *\n * Acente yapılandırması için mevcut tüm talep öncelik şablonlarını getirir.\n *\n * @returns Available case priority templates / Mevcut talep öncelik şablonları\n */\n async getCasePriorityTemplates(\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCasePriorityTemplatesResult>> {\n return await this.http.get<GetCasePriorityTemplatesResult>(\n cases.getPriorityTemplates,\n options,\n );\n }\n\n // ============================================================================\n // GRAPHQL QUERIES\n // ============================================================================\n\n /**\n * Queries cases using GraphQL with advanced filtering, searching, sorting, and field selection.\n * Supports cursor-based pagination and type-safe field selection.\n *\n * Gelişmiş filtreleme, arama, sıralama ve alan seçimi ile GraphQL kullanarak talepleri sorgular.\n * İmleç tabanlı sayfalama ve tip-güvenli alan seçimini destekler.\n *\n * @example\n * // Basic query with all fields\n * const result = await client.cases.getCases({ first: 10 });\n *\n * @example\n * // Type-safe field selection\n * const result = await client.cases.getCases({\n * select: ['id', 'ref', 'type', 'status', 'mainState'] as const,\n * first: 10,\n * filter: { type: { eq: CaseType.NewSaleOpportunity } }\n * });\n *\n * @param requestOptions Query options including pagination, filters, search, and field selection\n * @returns Paginated connection of cases with type-narrowed fields\n */\n async getCases<const TFields extends CaseFieldKey[]>(\n requestOptions?: GetCasesOptions<TFields>,\n options?: RequestOptions,\n ): Promise<InsurUpGraphQLResult<CasesConnection<TFields>>> {\n if (!this.graphql) {\n throw new Error(\n \"GraphQL transport is not available. Ensure the client is properly initialized.\",\n );\n }\n\n const fields = (requestOptions?.select ??\n ALL_CASE_FIELDS) as CaseFieldKey[];\n const fieldSelection = buildFieldSelection(fields);\n\n const query = `\n query GetCases(\n $first: Int\n $after: String\n $last: Int\n $before: String\n $search: searching_QueryCaseModelFilterInput\n $filter: filtering_QueryCaseModelFilterInput\n $order: [sorting_QueryCaseModelSortInput!]\n ) {\n casesNew(\n first: $first\n after: $after\n last: $last\n before: $before\n search: $search\n filter: $filter\n order: $order\n ) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n totalCount\n edges {\n cursor\n node {\n ${fieldSelection}\n }\n }\n }\n }\n `;\n\n const variables = {\n first: requestOptions?.first,\n after: requestOptions?.after,\n last: requestOptions?.last,\n before: requestOptions?.before,\n search: requestOptions?.search,\n filter: requestOptions?.filter,\n order: requestOptions?.order,\n };\n\n const result = await this.graphql.query<{\n casesNew: Omit<CasesConnection, \"nodes\">;\n }>(query, variables, options);\n\n if (!result.isSuccess) {\n return result as InsurUpGraphQLResult<CasesConnection<TFields>>;\n }\n\n // Derive nodes from edges\n const edges = result.data.casesNew.edges;\n const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;\n\n return {\n ...result,\n data: {\n ...result.data.casesNew,\n nodes,\n },\n } as InsurUpGraphQLResult<CasesConnection<TFields>>;\n }\n}\n","import type { HttpTransport } from \"../client/http.js\";\nimport type { GraphQLTransport } from \"../client/graphql.js\";\nimport type { InsurUpResult, InsurUpGraphQLResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport { webhooks } from \"../core/endpoints.js\";\nimport {\n ALL_WEBHOOK_DELIVERY_FIELDS,\n type WebhookDeliveryFieldKey,\n type GetWebhookDeliveriesOptions,\n type WebhookDeliveriesConnection,\n} from \"@insurup/contracts\";\nimport { buildFieldSelection } from \"@insurup/contracts\";\nimport type {\n CreateWebhookRequest,\n CreateWebhookResult,\n GetWebhookByIdResult,\n GetWebhooksResult,\n UpdateWebhookRequest,\n GetWebhookDeliveryResult,\n} from \"@insurup/contracts\";\n\n/**\n * Provides comprehensive webhook management operations for configuring event notifications, monitoring delivery status,\n * and managing external system integrations within the InsurUp platform ecosystem.\n *\n * InsurUp platform ekosistemi içinde olay bildirimlerini yapılandırma, teslimat durumunu izleme ve\n * harici sistem entegrasyonlarını yönetmek için kapsamlı webhook yönetimi işlemlerini sağlar.\n */\nexport class InsurUpWebhookClient {\n constructor(\n private readonly http: HttpTransport,\n private readonly graphql?: GraphQLTransport,\n ) {}\n\n /**\n * Creates a new webhook configuration to receive event notifications from the InsurUp platform.\n *\n * InsurUp platformundan olay bildirimleri almak için yeni webhook yapılandırması oluşturur.\n *\n * @param request Webhook creation request with endpoint and event configurations / Endpoint ve olay yapılandırmaları ile webhook oluşturma talebi\n * @returns Created webhook information / Oluşturulan webhook bilgileri\n */\n async createWebhook(\n request: CreateWebhookRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<CreateWebhookResult>> {\n return this.http.post<CreateWebhookResult>(\n webhooks.create,\n request,\n options,\n );\n }\n\n /**\n * Retrieves detailed information about a specific webhook including its configuration and current status.\n *\n * Belirli bir webhook hakkında yapılandırması ve mevcut durumu dahil detaylı bilgileri getirir.\n *\n * @param webhookId Unique identifier of the webhook / Webhook'un benzersiz tanımlayıcısı\n * @returns Webhook configuration details / Webhook yapılandırma detayları\n */\n async getWebhookById(\n webhookId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetWebhookByIdResult>> {\n const endpoint = webhooks.getById.render(webhookId);\n return this.http.get<GetWebhookByIdResult>(endpoint, options);\n }\n\n /**\n * Retrieves all webhooks configured for the current agent or organization for comprehensive webhook management.\n *\n * Kapsamlı webhook yönetimi için mevcut acente veya organizasyon için yapılandırılmış tüm webhook'ları getirir.\n *\n * @returns List of configured webhooks / Yapılandırılmış webhook'lar listesi\n */\n async getWebhooks(\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetWebhooksResult[]>> {\n return this.http.get<GetWebhooksResult[]>(webhooks.getAll, options);\n }\n\n /**\n * Updates an existing webhook configuration including endpoint URL, event subscriptions, or authentication settings.\n *\n * Endpoint URL'si, olay abonelikleri veya kimlik doğrulama ayarları dahil mevcut webhook yapılandırmasını günceller.\n *\n * @param request Webhook update request with modified configuration / Değiştirilmiş yapılandırma ile webhook güncelleme talebi\n * @returns Operation result / İşlem sonucu\n */\n async updateWebhook(\n request: UpdateWebhookRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = webhooks.update.render(request.id);\n return this.http.putNoContent(endpoint, request, options);\n }\n\n /**\n * Permanently removes a webhook configuration, stopping all future event notifications to the specified endpoint.\n *\n * Webhook yapılandırmasını kalıcı olarak kaldırır ve belirtilen endpoint'e gelecekteki tüm olay bildirimlerini durdurur.\n *\n * @param webhookId Unique identifier of the webhook to delete / Silinecek webhook'un benzersiz tanımlayıcısı\n * @returns Operation result / İşlem sonucu\n */\n async deleteWebhook(\n webhookId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = webhooks.delete.render(webhookId);\n return this.http.deleteNoContent(endpoint, options);\n }\n\n /**\n * Retrieves detailed information about a specific webhook delivery including delivery status, response, and timing.\n *\n * Teslimat durumu, yanıt ve zamanlama dahil belirli bir webhook teslimatı hakkında detaylı bilgileri getirir.\n *\n * @param webhookId Unique identifier of the webhook / Webhook'un benzersiz tanımlayıcısı\n * @param webhookDeliveryId Unique identifier of the delivery attempt / Teslimat denemesinin benzersiz tanımlayıcısı\n * @returns Webhook delivery details / Webhook teslimat detayları\n */\n async getWebhookDelivery(\n webhookId: string,\n webhookDeliveryId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetWebhookDeliveryResult>> {\n const endpoint = webhooks.deliveries.getById.render(\n webhookId,\n webhookDeliveryId,\n );\n return this.http.get<GetWebhookDeliveryResult>(endpoint, options);\n }\n\n /**\n * Manually retries a failed webhook event delivery to attempt successful notification delivery.\n *\n * Başarılı bildirim teslimatını denemek için başarısız webhook olay teslimatını manuel olarak yeniden dener.\n *\n * @param webhookId Unique identifier of the webhook / Webhook'un benzersiz tanımlayıcısı\n * @param webhookDeliveryId Unique identifier of the delivery to retry / Yeniden denenecek teslimatın benzersiz tanımlayıcısı\n * @returns Operation result / İşlem sonucu\n */\n async redeliverWebhookEvent(\n webhookId: string,\n webhookDeliveryId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = webhooks.deliveries.redeliver.render(\n webhookId,\n webhookDeliveryId,\n );\n return this.http.postNoContent(endpoint, undefined, options);\n }\n\n // ============================================================================\n // GRAPHQL QUERIES\n // ============================================================================\n\n /**\n * Queries webhook deliveries using GraphQL with advanced filtering, searching, sorting, and field selection.\n * Supports cursor-based pagination and type-safe field selection.\n *\n * Gelişmiş filtreleme, arama, sıralama ve alan seçimi ile GraphQL kullanarak webhook teslimatlarını sorgular.\n * İmleç tabanlı sayfalama ve tip-güvenli alan seçimini destekler.\n *\n * @example\n * // Basic query with all fields\n * const result = await client.webhooks.getWebhookDeliveries({ first: 10 });\n *\n * @example\n * // Type-safe field selection with filter\n * const result = await client.webhooks.getWebhookDeliveries({\n * select: ['id', 'webhookId', 'event', 'state'] as const,\n * first: 10,\n * filter: { state: { eq: WebhookDeliveryState.Failed } }\n * });\n *\n * @param requestOptions Query options including pagination, filters, search, and field selection\n * @returns Paginated connection of webhook deliveries with type-narrowed fields\n */\n async getWebhookDeliveries<const TFields extends WebhookDeliveryFieldKey[]>(\n requestOptions?: GetWebhookDeliveriesOptions<TFields>,\n options?: RequestOptions,\n ): Promise<InsurUpGraphQLResult<WebhookDeliveriesConnection<TFields>>> {\n if (!this.graphql) {\n throw new Error(\n \"GraphQL transport is not available. Ensure the client is properly initialized.\",\n );\n }\n\n const fields = (requestOptions?.select ??\n ALL_WEBHOOK_DELIVERY_FIELDS) as WebhookDeliveryFieldKey[];\n const fieldSelection = buildFieldSelection(fields);\n\n const query = `\n query GetWebhookDeliveries(\n $first: Int\n $after: String\n $last: Int\n $before: String\n $search: searching_QueryWebhookDeliveryResultFilterInput\n $filter: filtering_QueryWebhookDeliveryResultFilterInput\n $order: [sorting_QueryWebhookDeliveryResultSortInput!]\n ) {\n webhookDeliveriesNew(\n first: $first\n after: $after\n last: $last\n before: $before\n search: $search\n filter: $filter\n order: $order\n ) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n totalCount\n edges {\n cursor\n node {\n ${fieldSelection}\n }\n }\n }\n }\n `;\n\n const variables = {\n first: requestOptions?.first,\n after: requestOptions?.after,\n last: requestOptions?.last,\n before: requestOptions?.before,\n search: requestOptions?.search,\n filter: requestOptions?.filter,\n order: requestOptions?.order,\n };\n\n const result = await this.graphql.query<{\n webhookDeliveriesNew: Omit<WebhookDeliveriesConnection, \"nodes\">;\n }>(query, variables, options);\n\n if (!result.isSuccess) {\n return result as InsurUpGraphQLResult<\n WebhookDeliveriesConnection<TFields>\n >;\n }\n\n // Derive nodes from edges\n const edges = result.data.webhookDeliveriesNew.edges;\n const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;\n\n return {\n ...result,\n data: {\n ...result.data.webhookDeliveriesNew,\n nodes,\n },\n } as InsurUpGraphQLResult<WebhookDeliveriesConnection<TFields>>;\n }\n}\n","/**\n * @fileoverview Coverage Management Client - Client for managing insurance coverage configurations\n * @description Provides coverage management operations for configuring insurance product coverages, managing coverage groups, and retrieving available coverage options\n */\n\nimport type { HttpTransport } from \"../client/http.js\";\nimport type { InsurUpResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport { coverageGroups, coverageChoices } from \"../core/endpoints.js\";\nimport type {\n CreateCoverageGroupRequest,\n UpdateCoverageGroupRequest,\n DeleteCoverageGroupRequest,\n GetCoverageGroupByIdResult,\n GetCoverageGroupsResultItem,\n KaskoCoverageChoices,\n KonutCoverageChoices,\n TssCoverageChoices,\n ImmCoverageChoices,\n CompanyCoverageChoices,\n} from \"@insurup/contracts\";\nimport type { VehicleUtilizationStyle } from \"@insurup/contracts\";\n\n/**\n * Provides coverage management operations for configuring insurance product coverages, managing coverage groups,\n * and retrieving available coverage options for different insurance branches within the InsurUp platform.\n *\n * InsurUp platformu içinde sigorta ürün teminatlarını yapılandırma, teminat gruplarını yönetme ve farklı\n * sigorta dalları için mevcut teminat seçeneklerini alma konularında teminat yönetimi işlemlerini sağlar.\n */\nexport class InsurUpCoverageClient {\n constructor(private readonly http: HttpTransport) {}\n\n /**\n * Creates a new coverage group to organize and standardize coverage offerings across multiple insurance products.\n *\n * Birden fazla sigorta ürününde teminat tekliflerini organize etmek ve standartlaştırmak için yeni teminat grubu oluşturur.\n *\n * @param request Coverage group creation request / Teminat grubu oluşturma talebi\n * @returns Operation result / İşlem sonucu\n */\n async createCoverageGroup(\n request: CreateCoverageGroupRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(coverageGroups.create, request, options);\n }\n\n /**\n * Updates an existing coverage group's configuration, coverage options, or applicable insurance products.\n *\n * Mevcut bir teminat grubunun yapılandırmasını, teminat seçeneklerini veya uygulanabilir sigorta ürünlerini günceller.\n *\n * @param request Coverage group update request / Teminat grubu güncelleme talebi\n * @returns Operation result / İşlem sonucu\n */\n async updateCoverageGroup(\n request: UpdateCoverageGroupRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.putNoContent(\n coverageGroups.update.render(request.id),\n request,\n options,\n );\n }\n\n /**\n * Removes a coverage group from the system, ensuring proper cleanup of associated coverage configurations.\n *\n * Sistemden bir teminat grubunu kaldırır ve ilişkili teminat yapılandırmalarının düzgün temizlenmesini sağlar.\n *\n * @param request Coverage group deletion request / Teminat grubu silme talebi\n * @returns Operation result / İşlem sonucu\n */\n async deleteCoverageGroup(\n request: DeleteCoverageGroupRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.deleteNoContent(\n coverageGroups.delete.render(request.id),\n options,\n );\n }\n\n /**\n * Retrieves detailed information about a specific coverage group including its coverage options and configurations.\n *\n * Belirli bir teminat grubu hakkında teminat seçenekleri ve yapılandırmaları dahil detaylı bilgileri getirir.\n *\n * @param coverageGroupId Unique identifier of the coverage group / Teminat grubunun benzersiz tanımlayıcısı\n * @returns Coverage group details / Teminat grubu detayları\n */\n async getCoverageGroupById(\n coverageGroupId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCoverageGroupByIdResult>> {\n return this.http.get(\n coverageGroups.getById.render(coverageGroupId),\n options,\n );\n }\n\n /**\n * Retrieves all available coverage groups within the agency for comprehensive coverage management overview.\n *\n * Kapsamlı teminat yönetimi genel bakışı için acente içindeki tüm mevcut teminat gruplarını getirir.\n *\n * @returns List of all coverage groups / Tüm teminat grupları listesi\n */\n async getAllCoverageGroups(\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCoverageGroupsResultItem[]>> {\n return this.http.get(coverageGroups.getAll, options);\n }\n\n /**\n * Retrieves available Kasko (comprehensive vehicle insurance) coverage options and configurations for proposal generation.\n *\n * Teklif oluşturma için mevcut Kasko (kasko araç sigortası) teminat seçenekleri ve yapılandırmalarını getirir.\n *\n * @param vehicleUtilizationStyle Optional vehicle utilization style filter / İsteğe bağlı araç kullanım stili filtresi\n * @returns Kasko coverage choices grouped by insurance company / Sigorta şirketine göre gruplanmış Kasko teminat seçenekleri\n */\n async getKaskoCoverageChoices(\n vehicleUtilizationStyle?: VehicleUtilizationStyle,\n options?: RequestOptions,\n ): Promise<InsurUpResult<CompanyCoverageChoices<KaskoCoverageChoices>[]>> {\n const endpoint = coverageChoices.getKaskoCoverageChoices.render(\n vehicleUtilizationStyle,\n );\n return this.http.get<CompanyCoverageChoices<KaskoCoverageChoices>[]>(\n endpoint,\n options,\n );\n }\n\n /**\n * Retrieves available Konut (home/property insurance) coverage options including DASK earthquake insurance configurations.\n *\n * DASK deprem sigortası yapılandırmaları dahil mevcut Konut (ev/mülk sigortası) teminat seçeneklerini getirir.\n *\n * @returns Konut coverage choices grouped by insurance company / Sigorta şirketine göre gruplanmış Konut teminat seçenekleri\n */\n async getKonutCoverageChoices(\n options?: RequestOptions,\n ): Promise<InsurUpResult<CompanyCoverageChoices<KonutCoverageChoices>[]>> {\n return this.http.get<CompanyCoverageChoices<KonutCoverageChoices>[]>(\n coverageChoices.getKonutCoverageChoices.render(),\n options,\n );\n }\n\n /**\n * Retrieves available TSS (Traffic Insurance) coverage options for mandatory and voluntary vehicle liability insurance.\n *\n * Zorunlu ve ihtiyari araç sorumluluk sigortası için mevcut TSS (Trafik Sigortası) teminat seçeneklerini getirir.\n *\n * @returns TSS coverage choices grouped by insurance company / Sigorta şirketine göre gruplanmış TSS teminat seçenekleri\n */\n async getTssCoverageChoices(\n options?: RequestOptions,\n ): Promise<InsurUpResult<CompanyCoverageChoices<TssCoverageChoices>[]>> {\n return this.http.get<CompanyCoverageChoices<TssCoverageChoices>[]>(\n coverageChoices.getTssCoverageChoices.render(),\n options,\n );\n }\n\n /**\n * Retrieves available IMM (Voluntary Financial Liability) coverage options for extended liability protection beyond mandatory insurance.\n *\n * Zorunlu sigortanın ötesinde genişletilmiş sorumluluk koruması için mevcut İMM (İhtiyari Mali Mesuliyet) teminat seçeneklerini getirir.\n *\n * @returns IMM coverage choices grouped by insurance company / Sigorta şirketine göre gruplanmış İMM teminat seçenekleri\n */\n async getImmCoverageChoices(\n options?: RequestOptions,\n ): Promise<InsurUpResult<CompanyCoverageChoices<ImmCoverageChoices>[]>> {\n return this.http.get<CompanyCoverageChoices<ImmCoverageChoices>[]>(\n coverageChoices.getImmCoverageChoices.render(),\n options,\n );\n }\n}\n","import type { HttpTransport } from \"../client/http.js\";\nimport type { InsurUpResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport { endpoints } from \"../core/endpoints.js\";\nimport type {\n ResourceKey,\n InsuranceCompany,\n InsuranceProduct,\n GetAgentBasedConnectionFieldsByCompanyIdResultItem,\n GetAllReleaseNotesResultItem,\n Bank,\n BankBranch,\n FinancialInstitution,\n} from \"@insurup/contracts\";\n\n/**\n * Provides comprehensive insurance industry data access for retrieving insurance companies, products, resource keys,\n * release notes, and financial institution information essential for platform operations and integrations.\n *\n * Platform operasyonları ve entegrasyonları için gerekli sigorta şirketleri, ürünler, kaynak anahtarları,\n * sürüm notları ve finansal kurum bilgilerini almak üzere kapsamlı sigorta sektörü veri erişimi sağlar.\n *\n * **Insurance Industry Data Client / Sigorta Sektörü Veri İstemcisi**\n *\n * EN: Central client for accessing comprehensive insurance industry reference data and platform configuration information.\n * Provides access to insurance companies, their products, localization resources, platform release notes, banking\n * institutions, and financial service providers. Essential for agencies that need to stay updated with insurance\n * market offerings, configure platform integrations, access multilingual resources, and integrate with banking\n * systems for premium collection and policy financing operations.\n *\n * TR: Kapsamlı sigorta sektörü referans verilerine ve platform yapılandırma bilgilerine erişim için merkezi istemci.\n * Sigorta şirketleri, ürünleri, yerelleştirme kaynakları, platform sürüm notları, bankacılık kurumları ve finansal\n * hizmet sağlayıcılarına erişim sağlar. Sigorta pazar teklifleri ile güncel kalması, platform entegrasyonlarını\n * yapılandırması, çok dilli kaynaklara erişmesi ve prim tahsilatı ile poliçe finansman operasyonları için bankacılık\n * sistemleri ile entegrasyon yapması gereken acenteler için olmazsa olmazdır.\n */\nexport class InsurUpInsuranceClient {\n constructor(private readonly http: HttpTransport) {}\n\n /**\n * Retrieves all available resource keys for localization and multi-language support within the platform.\n *\n * Platform içinde yerelleştirme ve çoklu dil desteği için mevcut tüm kaynak anahtarlarını getirir.\n *\n * @returns List of resource keys for localization / Yerelleştirme için kaynak anahtarları listesi\n */\n async getResourceKeys(\n options?: RequestOptions,\n ): Promise<InsurUpResult<ResourceKey[]>> {\n return this.http.get<ResourceKey[]>(endpoints.resourceKeys.getAll, options);\n }\n\n /**\n * Retrieves all insurance companies available on the platform for agent partnerships and product offerings.\n *\n * Acente ortaklıkları ve ürün teklifleri için platformda bulunan tüm sigorta şirketlerini getirir.\n *\n * @returns List of insurance companies / Sigorta şirketleri listesi\n */\n async getInsuranceCompanies(\n options?: RequestOptions,\n ): Promise<InsurUpResult<InsuranceCompany[]>> {\n return this.http.get<InsuranceCompany[]>(\n endpoints.insuranceCompanies.getInsuranceCompanies,\n options,\n );\n }\n\n /**\n * Retrieves all insurance products offered by a specific insurance company including their features and coverage options.\n *\n * Belirli bir sigorta şirketinin sunduğu tüm sigorta ürünlerini özellikleri ve teminat seçenekleri dahil getirir.\n *\n * @param insuranceCompanyId Unique identifier of the insurance company / Sigorta şirketinin benzersiz tanımlayıcısı\n * @returns List of insurance products / Sigorta ürünleri listesi\n */\n async getInsuranceCompanyProducts(\n insuranceCompanyId: number,\n options?: RequestOptions,\n ): Promise<InsurUpResult<InsuranceProduct[]>> {\n const path =\n endpoints.insuranceCompanies.getInsuranceCompanyProducts.render(\n insuranceCompanyId,\n );\n return this.http.get<InsuranceProduct[]>(path, options);\n }\n\n /**\n * Retrieves all insurance products from all companies on the platform including their features and coverage options.\n *\n * Platformdaki tüm şirketlerden mevcut tüm sigorta ürünlerini özellikleri ve teminat seçenekleri dahil getirir.\n *\n * @returns List of all insurance products / Tüm sigorta ürünleri listesi\n */\n async getAllProducts(\n options?: RequestOptions,\n ): Promise<InsurUpResult<InsuranceProduct[]>> {\n return this.http.get<InsuranceProduct[]>(\n endpoints.insuranceCompanies.getAllProducts,\n options,\n );\n }\n\n /**\n * Retrieves agent-specific connection fields and requirements for integrating with a particular insurance company's systems.\n *\n * Belirli bir sigorta şirketinin sistemleri ile entegrasyon için acente özel bağlantı alanları ve gereksinimlerini getirir.\n *\n * @param insuranceCompanyId Unique identifier of the insurance company / Sigorta şirketinin benzersiz tanımlayıcısı\n * @returns Connection field requirements / Bağlantı alanı gereksinimleri\n */\n async getCompanyConnectionFields(\n insuranceCompanyId: number,\n options?: RequestOptions,\n ): Promise<\n InsurUpResult<GetAgentBasedConnectionFieldsByCompanyIdResultItem[]>\n > {\n const path =\n endpoints.insuranceCompanies.connectionFields.getAgentBasedConnectionFieldsByCompanyId.render(\n insuranceCompanyId,\n );\n return this.http.get<GetAgentBasedConnectionFieldsByCompanyIdResultItem[]>(\n path,\n options,\n );\n }\n\n /**\n * Retrieves all platform release notes including new features, bug fixes, and important updates for system awareness.\n *\n * Sistem farkındalığı için yeni özellikler, hata düzeltmeleri ve önemli güncellemeler dahil tüm platform sürüm notlarını getirir.\n *\n * @returns Platform release notes / Platform sürüm notları\n */\n async getAllReleaseNotes(\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetAllReleaseNotesResultItem[]>> {\n return this.http.get<GetAllReleaseNotesResultItem[]>(\n endpoints.releaseNotes.getAll,\n options,\n );\n }\n\n /**\n * Retrieves all banks available for premium collection, policy financing, and customer payment processing operations.\n *\n * Prim tahsilatı, poliçe finansmanı ve müşteri ödeme işleme operasyonları için mevcut tüm bankaları getirir.\n *\n * @returns List of banks / Bankalar listesi\n */\n async getBanks(options?: RequestOptions): Promise<InsurUpResult<Bank[]>> {\n return this.http.get<Bank[]>(endpoints.banks.getAll, options);\n }\n\n /**\n * Retrieves all branches for a specific bank to enable precise payment routing and customer service location matching.\n *\n * Hassas ödeme yönlendirmesi ve müşteri hizmet konumu eşleştirmesi için belirli bir bankanın tüm şubelerini getirir.\n *\n * @param bankId Unique identifier of the bank / Bankanın benzersiz tanımlayıcısı\n * @returns List of bank branches / Banka şubeleri listesi\n */\n async getBankBranches(\n bankId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<BankBranch[]>> {\n const path = endpoints.banks.getBranches.render(bankId);\n return this.http.get<BankBranch[]>(path, options);\n }\n\n /**\n * Retrieves all financial institutions including banks, credit unions, and other financial service providers for comprehensive payment options.\n *\n * Kapsamlı ödeme seçenekleri için bankalar, kredi birlikleri ve diğer finansal hizmet sağlayıcıları dahil tüm finansal kurumları getirir.\n *\n * @returns List of financial institutions / Finansal kurumlar listesi\n */\n async getFinancialInstitutions(\n options?: RequestOptions,\n ): Promise<InsurUpResult<FinancialInstitution[]>> {\n return this.http.get<FinancialInstitution[]>(\n endpoints.financialInstitutions.getAll,\n options,\n );\n }\n}\n","/**\n * @fileoverview Proposal Client - Comprehensive proposal management operations\n * @description Provides comprehensive proposal management operations for creating insurance proposals, managing proposal lifecycle,\n * document generation, product purchasing, and comparison tools within the insurance sales process.\n */\n\nimport type { HttpTransport } from \"../client/http.js\";\nimport type { GraphQLTransport } from \"../client/graphql.js\";\nimport type { InsurUpResult, InsurUpGraphQLResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport { endpoints } from \"../core/endpoints.js\";\nimport {\n ALL_PROPOSAL_FIELDS,\n type ProposalFieldKey,\n type GetProposalsOptions,\n type ProposalsConnection,\n} from \"@insurup/contracts\";\nimport { buildFieldSelection } from \"@insurup/contracts\";\nimport type {\n CreateProposalRequest,\n CreateProposalResult,\n GetProposalByIdResult,\n GetProposalProductPremiumDetailResult,\n PurchaseProposalProductSyncRequest,\n PurchaseProposalProductSyncResult,\n PurchaseProposalProductAsyncRequest,\n PurchaseProposalProductAsyncResult,\n GetProposalProductCoverageResult,\n ReviseProposalRequest,\n ReviseProposalResult,\n ReviseProposalProductRequest,\n FetchProposalProductDocumentRequest,\n FetchProposalProductDocumentResult,\n FetchProposalInformationFormDocumentRequest,\n FetchProposalInformationFormDocumentResult,\n SendProposalProductDocumentRequest,\n SendProposalInformationFormDocumentRequest,\n GenerateCompareProposalProductsPdfRequest,\n GenerateCompareProposalProductsPdfResult,\n SendCompareProposalProductsPdfRequest,\n SetProposalRepresentativeRequest,\n RetryFailedProposalProductRequest,\n GenerateCustomerProposalDocumentPdfRequest,\n GenerateCustomerProposalDocumentPdfResult,\n SetProposalBranchRequest,\n GetProposalConversionTrendRequest,\n GetProposalConversionTrendResult,\n} from \"@insurup/contracts\";\n\n/**\n * Proposal Management Client / Teklif Yönetimi İstemcisi\n *\n * Central client for managing the complete insurance proposal lifecycle from creation to policy conversion. Handles\n * proposal generation, product comparison, premium calculations, document management, customer communication, and the\n * purchasing process for various insurance products. Provides both synchronous and asynchronous purchasing options,\n * comprehensive document generation including comparison PDFs, and proposal revision capabilities. Essential for\n * agencies that need to create competitive insurance proposals, manage customer decision processes, and convert\n * proposals into active policies while maintaining detailed audit trails and customer communication records.\n *\n * Oluşturmadan poliçe dönüştürmeye kadar tam sigorta teklif yaşam döngüsünü yönetmek için merkezi istemci.\n * Teklif oluşturma, ürün karşılaştırması, prim hesaplamaları, belge yönetimi, müşteri iletişimi ve çeşitli sigorta\n * ürünleri için satın alma sürecini yönetir. Hem senkron hem de asenkron satın alma seçenekleri, karşılaştırma PDF'leri\n * dahil kapsamlı belge oluşturma ve teklif revizyon yetenekleri sağlar. Rekabetçi sigorta teklifleri oluşturması,\n * müşteri karar süreçlerini yönetmesi ve detaylı denetim izleri ile müşteri iletişim kayıtlarını korurken teklifleri\n * aktif poliçelere dönüştürmesi gereken acenteler için olmazsa olmazdır.\n */\nexport class InsurUpProposalClient {\n constructor(\n private readonly http: HttpTransport,\n private readonly graphql?: GraphQLTransport,\n ) {}\n\n /**\n * Creates a new insurance proposal with customer information, coverage selections, and product options for quotation.\n *\n * Fiyat teklifi için müşteri bilgileri, teminat seçimleri ve ürün seçenekleri ile yeni sigorta teklifi oluşturur.\n *\n * @param request - Proposal creation request with customer and coverage details / Müşteri ve teminat detayları ile teklif oluşturma talebi\n * @returns Created proposal information / Oluşturulan teklif bilgileri\n */\n async createProposal(\n request: CreateProposalRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<CreateProposalResult>> {\n return this.http.post<CreateProposalResult>(\n endpoints.proposals.create,\n request,\n options,\n );\n }\n\n /**\n * Retries a failed proposal product calculation or processing to attempt resolution of temporary issues.\n *\n * Geçici sorunların çözümünü denemek için başarısız teklif ürün hesaplama veya işlemesini yeniden dener.\n *\n * @param proposalId - Unique identifier of the proposal / Teklifin benzersiz tanımlayıcısı\n * @param proposalProductId - Unique identifier of the proposal product / Teklif ürününün benzersiz tanımlayıcısı\n * @returns Operation result / İşlem sonucu\n */\n async retryFailedProposalProduct(\n proposalId: string,\n proposalProductId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const request: RetryFailedProposalProductRequest = {\n proposalId,\n proposalProductId,\n };\n return this.http.postNoContent(\n endpoints.proposals.retryFailedProposalProduct.render(\n proposalId,\n proposalProductId,\n ),\n request,\n options,\n );\n }\n\n /**\n * Retrieves comprehensive details of a specific proposal including all products, coverage options, and pricing information.\n *\n * Tüm ürünler, teminat seçenekleri ve fiyatlandırma bilgileri dahil belirli bir teklifin kapsamlı detaylarını getirir.\n *\n * @param proposalId - Unique identifier of the proposal / Teklifin benzersiz tanımlayıcısı\n * @returns Detailed proposal information / Detaylı teklif bilgileri\n */\n async getProposalDetail(\n proposalId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetProposalByIdResult>> {\n return this.http.get<GetProposalByIdResult>(\n endpoints.proposals.getProposalById.render(proposalId),\n options,\n );\n }\n\n /**\n * Retrieves detailed premium breakdown information for a specific proposal product including installment options.\n *\n * Taksit seçenekleri dahil belirli bir teklif ürünü için detaylı prim dağılım bilgilerini getirir.\n *\n * @param proposalId - Unique identifier of the proposal / Teklifin benzersiz tanımlayıcısı\n * @param proposalProductId - Unique identifier of the proposal product / Teklif ürününün benzersiz tanımlayıcısı\n * @param installmentNumber - Installment option number / Taksit seçenek numarası\n * @returns Premium breakdown details / Prim dağılım detayları\n */\n async getProposalProductPremiumDetail(\n proposalId: string,\n proposalProductId: string,\n installmentNumber: number,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetProposalProductPremiumDetailResult>> {\n return this.http.get<GetProposalProductPremiumDetailResult>(\n endpoints.proposals.getProposalProductPremiumDetail.render(\n proposalId,\n proposalProductId,\n installmentNumber,\n ),\n options,\n );\n }\n\n /**\n * Purchases a proposal product synchronously, converting it to an active policy with immediate confirmation.\n *\n * Teklif ürününü senkron olarak satın alır ve anında onay ile aktif poliçeye dönüştürür.\n *\n * @param request - Synchronous purchase request / Senkron satın alma talebi\n * @returns Purchase confirmation with policy details / Poliçe detayları ile satın alma onayı\n */\n async purchaseProposalProductSync(\n request: PurchaseProposalProductSyncRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<PurchaseProposalProductSyncResult>> {\n return this.http.post<PurchaseProposalProductSyncResult>(\n endpoints.proposals.purchaseProposalProductSync.render(\n request.proposalId,\n request.proposalProductId,\n ),\n request,\n options,\n );\n }\n\n /**\n * Initiates an asynchronous purchase process for a proposal product, allowing for background processing and later confirmation.\n *\n * Arka plan işleme ve sonraki onay için teklif ürünü için asenkron satın alma sürecini başlatır.\n *\n * @param request - Asynchronous purchase request / Asenkron satın alma talebi\n * @returns Purchase initiation confirmation / Satın alma başlatma onayı\n */\n async purchaseProposalProductAsync(\n request: PurchaseProposalProductAsyncRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<PurchaseProposalProductAsyncResult>> {\n return this.http.post<PurchaseProposalProductAsyncResult>(\n endpoints.proposals.purchaseProposalProductAsync.render(\n request.proposalId,\n request.proposalProductId,\n ),\n request,\n options,\n );\n }\n\n /**\n * Retrieves detailed coverage configuration for a specific proposal product including all coverage options and limits.\n *\n * Tüm teminat seçenekleri ve limitleri dahil belirli bir teklif ürünü için detaylı teminat yapılandırmasını getirir.\n *\n * @param proposalId - Unique identifier of the proposal / Teklifin benzersiz tanımlayıcısı\n * @param proposalProductId - Unique identifier of the proposal product / Teklif ürününün benzersiz tanımlayıcısı\n * @returns Coverage configuration details / Teminat yapılandırma detayları\n */\n async getProposalProductCoverage(\n proposalId: string,\n proposalProductId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetProposalProductCoverageResult>> {\n return this.http.get<GetProposalProductCoverageResult>(\n endpoints.proposals.getProposalProductCoverage.render(\n proposalId,\n proposalProductId,\n ),\n options,\n );\n }\n\n /**\n * Creates a revised version of an existing proposal with updated information, coverage changes, or customer modifications.\n *\n * Güncellenmiş bilgiler, teminat değişiklikleri veya müşteri değişiklikleri ile mevcut teklifin revize edilmiş versiyonunu oluşturur.\n *\n * @param request - Proposal revision request / Teklif revizyon talebi\n * @returns Revised proposal information / Revize edilmiş teklif bilgileri\n */\n async reviseProposal(\n request: ReviseProposalRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<ReviseProposalResult>> {\n return this.http.post<ReviseProposalResult>(\n endpoints.proposals.reviseProposal.render(request.proposalId),\n request,\n options,\n );\n }\n\n /**\n * Revises a specific product within a proposal with updated coverage options, limits, or pricing parameters.\n *\n * Güncellenmiş teminat seçenekleri, limitler veya fiyatlandırma parametreleri ile teklif içindeki belirli ürünü revize eder.\n *\n * @param request - Product revision request / Ürün revizyon talebi\n * @returns Operation result / İşlem sonucu\n */\n async reviseProposalProduct(\n request: ReviseProposalProductRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.proposals.reviseProposalProduct.render(\n request.proposalId,\n request.proposalProductId,\n ),\n request,\n options,\n );\n }\n\n /**\n * Fetches the official proposal document for a specific product from the insurance company's systems.\n *\n * Sigorta şirketinin sistemlerinden belirli bir ürün için resmi teklif belgesini getirir.\n *\n * @param request - Document fetch request / Belge getirme talebi\n * @returns Proposal document data / Teklif belgesi verisi\n */\n async fetchProposalProductDocument(\n request: FetchProposalProductDocumentRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<FetchProposalProductDocumentResult>> {\n return this.http.get<FetchProposalProductDocumentResult>(\n endpoints.proposals.fetchProposalProductDocument.render(\n request.proposalId,\n request.proposalProductId,\n ),\n options,\n );\n }\n\n /**\n * Fetches the information form document that contains detailed product information and terms for customer review.\n *\n * Müşteri incelemesi için detaylı ürün bilgileri ve şartları içeren bilgi formu belgesini getirir.\n *\n * @param request - Information form document request / Bilgi formu belgesi talebi\n * @returns Information form document data / Bilgi formu belgesi verisi\n */\n async fetchProposalInformationFormDocument(\n request: FetchProposalInformationFormDocumentRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<FetchProposalInformationFormDocumentResult>> {\n return this.http.get<FetchProposalInformationFormDocumentResult>(\n endpoints.proposals.fetchProposalInformationFormDocument.render(\n request.proposalId,\n request.proposalProductId,\n ),\n options,\n );\n }\n\n /**\n * Sends the proposal product document directly to the customer via email or other communication channels.\n *\n * Teklif ürün belgesini e-posta veya diğer iletişim kanalları aracılığıyla doğrudan müşteriye gönderir.\n *\n * @param request - Document delivery request / Belge teslim talebi\n * @returns Operation result / İşlem sonucu\n */\n async sendProposalProductDocument(\n request: SendProposalProductDocumentRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.proposals.sendProposalProductDocument.render(\n request.proposalId,\n request.proposalProductId,\n ),\n request,\n options,\n );\n }\n\n /**\n * Sends the information form document to the customer for detailed product review and decision making.\n *\n * Detaylı ürün incelemesi ve karar verme için bilgi formu belgesini müşteriye gönderir.\n *\n * @param request - Information form delivery request / Bilgi formu teslim talebi\n * @returns Operation result / İşlem sonucu\n */\n async sendProposalInformationFormDocument(\n request: SendProposalInformationFormDocumentRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.proposals.sendProposalInformationFormDocument.render(\n request.proposalId,\n request.proposalProductId,\n ),\n request,\n options,\n );\n }\n\n /**\n * Generates a comparative PDF document showing multiple proposal products side-by-side for customer decision support.\n *\n * Müşteri karar desteği için birden fazla teklif ürününü yan yana gösteren karşılaştırmalı PDF belgesi oluşturur.\n *\n * @param request - Comparison PDF generation request / Karşılaştırma PDF oluşturma talebi\n * @returns Generated comparison document / Oluşturulan karşılaştırma belgesi\n */\n async generateCompareProposalProductsPdf(\n request: GenerateCompareProposalProductsPdfRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GenerateCompareProposalProductsPdfResult>> {\n return this.http.post<GenerateCompareProposalProductsPdfResult>(\n endpoints.proposals.generateCompareProposalProductsPdf.render(\n request.proposalId,\n ),\n request,\n options,\n );\n }\n\n /**\n * Sends the proposal comparison PDF document to the customer to facilitate informed decision making between insurance options.\n *\n * Sigorta seçenekleri arasında bilinçli karar vermeyi kolaylaştırmak için teklif karşılaştırma PDF belgesini müşteriye gönderir.\n *\n * @param request - Comparison PDF delivery request / Karşılaştırma PDF teslim talebi\n * @returns Operation result / İşlem sonucu\n */\n async sendCompareProposalProductsPdf(\n request: SendCompareProposalProductsPdfRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.proposals.sendCompareProposalProductsPdf.render(\n request.proposalId,\n ),\n request,\n options,\n );\n }\n\n /**\n * Generates a professional PDF document containing selected proposal products for customer presentation.\n *\n * Müşteri sunumu için seçilen teklif ürünlerini içeren profesyonel bir PDF belgesi oluşturur.\n *\n * @param request Customer proposal document generation request / Müşteri teklif belgesi oluşturma talebi\n * @returns Generated document URL / Oluşturulan belge URL'i\n */\n async generateCustomerProposalDocumentPdf(\n request: GenerateCustomerProposalDocumentPdfRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GenerateCustomerProposalDocumentPdfResult>> {\n return this.http.post<GenerateCustomerProposalDocumentPdfResult>(\n endpoints.proposals.generateCustomerProposalDocumentPdf.render(\n request.proposalId,\n ),\n request,\n options,\n );\n }\n\n /**\n * Assigns or changes the branch for a proposal to organize proposal segmentation and reporting.\n *\n * Teklif segmentasyonu ve raporlama için teklifin şubesini atar veya değiştirir.\n *\n * @param request Branch assignment request / Şube atama talebi\n * @returns Operation result / İşlem sonucu\n */\n async setProposalBranch(\n request: SetProposalBranchRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.proposals.setProposalBranch.render(request.proposalId),\n request,\n options,\n );\n }\n\n /**\n * Retrieves proposal-to-policy conversion trend analytics as a time series.\n *\n * Tekliften poliçeye dönüşüm trendi analitiğini zaman serisi olarak getirir.\n *\n * @param request Conversion trend analytics request / Dönüşüm trendi analitik isteği\n * @returns Conversion trend analytics response / Dönüşüm trendi analitiği yanıtı\n */\n async getProposalConversionTrend(\n request: GetProposalConversionTrendRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetProposalConversionTrendResult>> {\n return this.http.post<GetProposalConversionTrendResult>(\n endpoints.proposals.getProposalConversionTrend.definition,\n request,\n options,\n );\n }\n\n /**\n * Assigns or updates the representative responsible for managing a specific proposal and customer relationship.\n *\n * Belirli bir teklifi ve müşteri ilişkisini yönetmekten sorumlu temsilciyi atar veya günceller.\n *\n * @param request - Representative assignment request / Temsilci atama talebi\n * @returns Operation result / İşlem sonucu\n */\n async setProposalRepresentative(\n request: SetProposalRepresentativeRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.proposals.setProposalRepresentative.render(request.proposalId),\n request,\n options,\n );\n }\n\n // ============================================================================\n // GRAPHQL QUERIES\n // ============================================================================\n\n /**\n * Queries proposals using GraphQL with advanced filtering, searching, sorting, and field selection.\n * Supports cursor-based pagination and type-safe field selection.\n *\n * Gelişmiş filtreleme, arama, sıralama ve alan seçimi ile GraphQL kullanarak teklifleri sorgular.\n * İmleç tabanlı sayfalama ve tip-güvenli alan seçimini destekler.\n *\n * @example\n * // Basic query with all fields\n * const result = await client.proposals.getProposals({ first: 10 });\n *\n * @example\n * // Type-safe field selection\n * const result = await client.proposals.getProposals({\n * select: ['id', 'productBranch', 'state', 'insuredCustomerName'] as const,\n * first: 10,\n * filter: { state: { eq: ProposalState.Active } }\n * });\n *\n * @param requestOptions Query options including pagination, filters, search, and field selection\n * @returns Paginated connection of proposals with type-narrowed fields\n */\n async getProposals<const TFields extends ProposalFieldKey[]>(\n requestOptions?: GetProposalsOptions<TFields>,\n options?: RequestOptions,\n ): Promise<InsurUpGraphQLResult<ProposalsConnection<TFields>>> {\n if (!this.graphql) {\n throw new Error(\n \"GraphQL transport is not available. Ensure the client is properly initialized.\",\n );\n }\n\n const fields = (requestOptions?.select ??\n ALL_PROPOSAL_FIELDS) as ProposalFieldKey[];\n const fieldSelection = buildFieldSelection(fields);\n\n const query = `\n query GetProposals(\n $first: Int\n $after: String\n $last: Int\n $before: String\n $search: searching_QueryProposalsResultFilterInput\n $filter: filtering_QueryProposalsResultFilterInput\n $order: [sorting_QueryProposalsResultSortInput!]\n ) {\n proposalsNew(\n first: $first\n after: $after\n last: $last\n before: $before\n search: $search\n filter: $filter\n order: $order\n ) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n totalCount\n edges {\n cursor\n node {\n ${fieldSelection}\n }\n }\n }\n }\n `;\n\n const variables = {\n first: requestOptions?.first,\n after: requestOptions?.after,\n last: requestOptions?.last,\n before: requestOptions?.before,\n search: requestOptions?.search,\n filter: requestOptions?.filter,\n order: requestOptions?.order,\n };\n\n const result = await this.graphql.query<{\n proposalsNew: Omit<ProposalsConnection, \"nodes\">;\n }>(query, variables, options);\n\n if (!result.isSuccess) {\n return result as InsurUpGraphQLResult<ProposalsConnection<TFields>>;\n }\n\n // Derive nodes from edges\n const edges = result.data.proposalsNew.edges;\n const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;\n\n return {\n ...result,\n data: {\n ...result.data.proposalsNew,\n nodes,\n },\n } as InsurUpGraphQLResult<ProposalsConnection<TFields>>;\n }\n}\n","/**\n * @fileoverview File Client - File upload operations\n * @description Provides file management operations for the InsurUp platform\n */\n\nimport type { HttpTransport } from \"../client/http.js\";\nimport type { InsurUpResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport { files } from \"../core/endpoints.js\";\nimport type {\n UploadPublicFileRequest,\n UploadPublicFileResult,\n} from \"@insurup/contracts\";\n\n/**\n * Provides file management operations for the InsurUp platform, enabling agents to upload and manage files\n * within the insurance ecosystem.\n */\nexport class InsurUpFileClient {\n constructor(private readonly http: HttpTransport) {}\n\n /**\n * Uploads a file to public storage and returns the file URL for public access.\n * Maximum file size is 1MB. Only available for agent users.\n *\n * Bir dosyayı genel depolamaya yükler ve genel erişim için dosya URL'sini döndürür.\n * Maksimum dosya boyutu 1MB'dir. Sadece acente kullanıcıları için kullanılabilir.\n *\n * @param request Upload configuration including optional path\n * @param file File content\n * @param fileName Name of the file\n * @returns File URL and path information\n */\n async uploadPublicFile(\n request: UploadPublicFileRequest,\n file: File,\n fileName: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<UploadPublicFileResult>> {\n const formData = new FormData();\n formData.append(\"file\", file, fileName);\n\n if (request.path) {\n formData.append(\"path\", request.path);\n }\n\n return this.http.post<UploadPublicFileResult>(\n files.uploadPublicFile,\n formData,\n options,\n );\n }\n}\n","/**\n * @fileoverview Language Client - Language and localization operations\n * @description Provides language and localization operations for retrieving available languages\n */\n\nimport type { HttpTransport } from \"../client/http.js\";\nimport type { InsurUpResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport { languages } from \"../core/endpoints.js\";\nimport type { LanguageResult } from \"@insurup/contracts\";\n\n/**\n * Provides language and localization operations for retrieving available languages in the InsurUp platform.\n * Essential for multi-language support and internationalization features.\n */\nexport class InsurUpLanguageClient {\n constructor(private readonly http: HttpTransport) {}\n\n /**\n * Retrieves all available languages in the system for localization and internationalization purposes.\n * Returns language information including language codes, native names, and English names.\n *\n * Yerelleştirme ve uluslararasılaştırma amaçları için sistemdeki tüm kullanılabilir dilleri getirir.\n * Dil kodları, yerel adlar ve İngilizce adlar dahil dil bilgilerini döndürür.\n *\n * @returns List of all available languages\n */\n async getLanguages(\n options?: RequestOptions,\n ): Promise<InsurUpResult<LanguageResult[]>> {\n return this.http.get<LanguageResult[]>(languages.getAll, options);\n }\n}\n","/**\n * @fileoverview Template Client - Template management operations\n * @description Provides template management operations for the InsurUp platform\n */\n\nimport type { HttpTransport } from \"../client/http.js\";\nimport type { InsurUpResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport { templates } from \"../core/endpoints.js\";\nimport type {\n GetTemplateDefinitionsResult,\n QueryTemplatesResult,\n GetTemplateByKeyResult,\n UpdateTemplateRequest,\n DeleteTemplateRequest,\n} from \"@insurup/contracts\";\n\n/**\n * Provides template management operations for the InsurUp platform, enabling agents to retrieve and update\n * document templates, email templates, and other content templates used in insurance workflows.\n */\nexport class InsurUpTemplateClient {\n constructor(private readonly http: HttpTransport) {}\n\n /**\n * Retrieves all template definitions with their JSON schemas and metadata.\n * These definitions describe the structure and data models for all template types available in the system.\n * Only accessible by admin panel users and agent users with appropriate permissions.\n *\n * Tüm şablon tanımlarını JSON şemaları ve meta verileriyle getirir.\n * Bu tanımlar, sistemde mevcut tüm şablon türleri için yapı ve veri modellerini açıklar.\n * Sadece yönetici panel kullanıcıları ve uygun izinlere sahip acente kullanıcıları tarafından erişilebilir.\n *\n * @returns List of all template definitions\n */\n async getTemplateDefinitions(\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetTemplateDefinitionsResult[]>> {\n return this.http.get<GetTemplateDefinitionsResult[]>(\n templates.getDefinitions,\n options,\n );\n }\n\n /**\n * Retrieves all available templates in the system with their metadata and content.\n * Only accessible by admin panel users and agent users with appropriate permissions.\n *\n * Sistemdeki tüm kullanılabilir şablonları meta verileri ve içerikleriyle getirir.\n * Sadece yönetici panel kullanıcıları ve uygun izinlere sahip acente kullanıcıları tarafından erişilebilir.\n *\n * @returns List of all templates with their details\n */\n async getAllTemplates(\n options?: RequestOptions,\n ): Promise<InsurUpResult<QueryTemplatesResult[]>> {\n return this.http.get<QueryTemplatesResult[]>(templates.getAll, options);\n }\n\n /**\n * Retrieves a specific template by its unique key for a particular language.\n * Returns the complete template including content and JSON schema for data validation.\n *\n * Belirli bir dil için benzersiz anahtarına göre belirli bir şablonu getirir.\n * Veri doğrulama için içerik ve JSON şeması dahil tam şablonu döndürür.\n *\n * @param key Unique identifier key of the template\n * @param languageId Language identifier for template localization\n * @returns Complete template information\n */\n async getTemplateByKey(\n key: string,\n languageId: number,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetTemplateByKeyResult>> {\n const endpoint = `${templates.getByKey.render(key)}?languageId=${languageId}`;\n return this.http.get<GetTemplateByKeyResult>(endpoint, options);\n }\n\n /**\n * Updates an existing template with new content, name, description, and localization settings.\n * Allows administrators to maintain and modify templates used throughout the insurance platform.\n *\n * Mevcut bir şablonu yeni içerik, ad, açıklama ve yerelleştirme ayarlarıyla günceller.\n * Yöneticilerin sigorta platformu boyunca kullanılan şablonları sürdürmesine ve değiştirmesine olanak tanır.\n *\n * @param request Template update request with new content and metadata\n * @returns Operation result\n */\n async updateTemplate(\n request: UpdateTemplateRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = templates.update.render(request.key);\n return this.http.putNoContent(endpoint, request, options);\n }\n\n /**\n * Deletes a template owned by the current agent user.\n * Only agent users can delete templates they own. Templates with null AgentId or different AgentId cannot be deleted.\n *\n * Mevcut acente kullanıcısına ait bir şablonu siler.\n * Sadece acente kullanıcıları kendi şablonlarını silebilir. Null AgentId'ye sahip veya farklı AgentId'ye sahip şablonlar silinemez.\n *\n * @param request Template delete request with key and language ID\n * @returns Operation result\n */\n async deleteTemplate(\n request: DeleteTemplateRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = `${templates.delete.render(request.key)}?languageId=${request.languageId}`;\n return this.http.deleteNoContent(endpoint, options);\n }\n}\n","/**\n * @fileoverview Default InsurUp Client - Main SDK client implementation\n * @description Main SDK client implementation\n */\n\nimport { HttpTransport } from \"./http.js\";\nimport { GraphQLTransport } from \"./graphql.js\";\nimport type { InsurUpClientOptions } from \"../core/options.js\";\n\n// Import specialized clients\nimport { InsurUpAgentClient } from \"../clients/agent.js\";\nimport { InsurUpAgentBranchClient } from \"../clients/agentBranch.js\";\nimport { InsurUpAgentRoleClient } from \"../clients/agentRole.js\";\nimport { InsurUpAgentSetupClient } from \"../clients/agentSetup.js\";\nimport { InsurUpAgentUserClient } from \"../clients/agentUser.js\";\nimport { InsurUpCustomerClient } from \"../clients/customer.js\";\nimport { InsurUpVehicleClient } from \"../clients/vehicle.js\";\nimport { InsurUpPropertyClient } from \"../clients/property.js\";\nimport { InsurUpPolicyClient } from \"../clients/policy.js\";\nimport { InsurUpCaseClient } from \"../clients/case.js\";\nimport { InsurUpWebhookClient } from \"../clients/webhook.js\";\nimport { InsurUpCoverageClient } from \"../clients/coverage.js\";\nimport { InsurUpInsuranceClient } from \"../clients/insurance.js\";\nimport { InsurUpProposalClient } from \"../clients/proposal.js\";\nimport { InsurUpFileClient } from \"../clients/file.js\";\nimport { InsurUpLanguageClient } from \"../clients/language.js\";\nimport { InsurUpTemplateClient } from \"../clients/template.js\";\n\n/**\n * Main unified client providing comprehensive access to all InsurUp platform operations.\n * Aggregates specialized client interfaces for authentication, agent management, customer operations,\n * vehicle and property insurance, coverage management, and policy administration.\n */\nexport class DefaultInsurUpClient {\n private readonly http: HttpTransport;\n private readonly graphql: GraphQLTransport;\n\n /**\n * Agent Management Client\n *\n * Provides agent management operations for handling agent profiles, insurance company connections,\n * and business relationships within the insurance ecosystem.\n */\n public readonly agents: InsurUpAgentClient;\n\n /**\n * Agent Branch Management Client\n *\n * Provides branch management operations for insurance agents, enabling the creation and administration\n * of organizational branches within agency structures.\n */\n public readonly agentBranches: InsurUpAgentBranchClient;\n\n /**\n * Agent Role Management Client\n *\n * Provides role management operations for insurance agents, enabling the creation and administration\n * of role-based access control within agency hierarchies and permission structures.\n */\n public readonly agentRoles: InsurUpAgentRoleClient;\n\n /**\n * Agent Setup Client\n *\n * Provides agent onboarding and setup operations for new insurance agents joining the InsurUp platform,\n * facilitating the complete registration and configuration process required for business operations.\n */\n public readonly agentSetup: InsurUpAgentSetupClient;\n\n /**\n * Agent User Management Client\n *\n * Provides comprehensive user management operations for insurance agency staff, enabling agencies to manage\n * their team members, permissions, and access control within the InsurUp platform ecosystem.\n */\n public readonly agentUsers: InsurUpAgentUserClient;\n\n /**\n * Customer Management Client\n *\n * Provides comprehensive customer management operations for handling customer profiles, contact information,\n * health data, communication flows, and external customer data integration.\n */\n public readonly customers: InsurUpCustomerClient;\n\n /**\n * Vehicle Management Client\n *\n * Provides comprehensive vehicle management operations for handling customer vehicles, vehicle data lookups,\n * brand and model queries, and vehicle-based insurance operations within the automotive insurance ecosystem.\n */\n public readonly vehicles: InsurUpVehicleClient;\n\n /**\n * Property Management Client\n *\n * Provides comprehensive property management operations for handling customer properties, Turkish address hierarchy queries,\n * DASK earthquake insurance lookups, and property-based insurance operations within the real estate insurance ecosystem.\n */\n public readonly properties: InsurUpPropertyClient;\n\n /**\n * Policy Management Client\n *\n * Provides comprehensive policy management operations for handling insurance policies, policy documents,\n * representative assignments, and policy administration.\n */\n public readonly policies: InsurUpPolicyClient;\n\n /**\n * Case Management Client\n *\n * Provides comprehensive case management operations for handling customer service requests, claims processing,\n * sales opportunities, and complaint resolution within the insurance workflow.\n */\n public readonly cases: InsurUpCaseClient;\n\n /**\n * Webhook Management Client\n *\n * Provides comprehensive webhook management operations for configuring event notifications, monitoring delivery status,\n * and managing external system integrations within the InsurUp platform ecosystem.\n */\n public readonly webhooks: InsurUpWebhookClient;\n\n /**\n * Coverage Management Client\n *\n * Provides coverage management operations for configuring insurance product coverages, managing coverage groups,\n * and retrieving available coverage options for different insurance branches within the InsurUp platform.\n */\n public readonly coverage: InsurUpCoverageClient;\n\n /**\n * Insurance Industry Data Client\n *\n * Provides comprehensive insurance industry data access for retrieving insurance companies, products, resource keys,\n * release notes, and financial institution information essential for platform operations and integrations.\n */\n public readonly insurance: InsurUpInsuranceClient;\n\n /**\n * Proposal Management Client\n *\n * Provides comprehensive proposal management operations for creating insurance proposals, managing proposal lifecycle,\n * document generation, product purchasing, and comparison tools within the insurance sales process.\n */\n public readonly proposals: InsurUpProposalClient;\n\n /**\n * File Management Client\n *\n * Provides file management operations for the InsurUp platform, enabling agents to upload and manage files\n * within the insurance ecosystem.\n */\n public readonly files: InsurUpFileClient;\n\n /**\n * Language Management Client\n *\n * Provides language and localization operations for retrieving available languages in the InsurUp platform.\n * Essential for multi-language support and internationalization features.\n */\n public readonly languages: InsurUpLanguageClient;\n\n /**\n * Template Management Client\n *\n * Provides template management operations for the InsurUp platform, enabling agents to retrieve and update\n * document templates, email templates, and other content templates used in insurance workflows.\n */\n public readonly templates: InsurUpTemplateClient;\n\n public readonly options: InsurUpClientOptions;\n\n constructor(options?: InsurUpClientOptions) {\n this.http = new HttpTransport(options);\n this.graphql = new GraphQLTransport(this.http);\n this.options = options || {};\n\n // Initialize all specialized clients\n this.agents = new InsurUpAgentClient(this.http);\n this.agentBranches = new InsurUpAgentBranchClient(this.http);\n this.agentRoles = new InsurUpAgentRoleClient(this.http);\n this.agentSetup = new InsurUpAgentSetupClient(this.http);\n this.agentUsers = new InsurUpAgentUserClient(this.http, this.graphql);\n this.customers = new InsurUpCustomerClient(this.http, this.graphql);\n this.vehicles = new InsurUpVehicleClient(this.http);\n this.properties = new InsurUpPropertyClient(this.http);\n this.policies = new InsurUpPolicyClient(this.http, this.graphql);\n this.cases = new InsurUpCaseClient(this.http, this.graphql);\n this.webhooks = new InsurUpWebhookClient(this.http, this.graphql);\n this.coverage = new InsurUpCoverageClient(this.http);\n this.insurance = new InsurUpInsuranceClient(this.http);\n this.proposals = new InsurUpProposalClient(this.http, this.graphql);\n this.files = new InsurUpFileClient(this.http);\n this.languages = new InsurUpLanguageClient(this.http);\n this.templates = new InsurUpTemplateClient(this.http);\n }\n}\n"],"mappings":"wOA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PA,EAAA,WAAa,cACbA,EAAA,MAAQ,QACRA,EAAA,SAAW,WAJDA,IAAAA,IAAA,CAAA,CAAA,EAqHCC,GAAoB,CAE/B,gBACA,KACA,oBACA,oBACA,oBACA,gBACA,aACA,eACA,aACA,cACA,WACA,iCACA,+BACA,YACA,YACA,UACA,kBACA,sBACA,gCACA,2BACA,sBACA,0BACA,2BACA,8BACA,+BACA,2BACA,sBACA,gCACA,2BACA,0BACA,2BACA,8BACA,+BACA,2BACA,mBACA,mBACA,4BACA,8BACA,wBACA,yBACA,uBACA,wBACA,mBACA,kBACA,YACA,cACA,qBACA,uBACA,uBACA,QACA,iBACA,sBACA,mBACA,YACA,aACA,UACA,WAEA,iBACA,mBACA,uBACA,yBAEA,eACA,iBACA,kBACA,qBAEA,mBACA,qBACA,sBACA,wBACF,EC/GaC,GAAsB,CAEjC,gBACA,KACA,gBACA,QACA,oBACA,oBACA,gBACA,uBACA,YACA,cACA,sBACA,gCACA,2BACA,sBACA,gBACA,iBACA,UACA,0BACA,2BACA,8BACA,+BACA,6BACA,wCACA,uBACA,mBACA,mBACA,4BACA,8BACA,wBACA,yBACA,uBACA,wBACA,mBACA,kBACA,mBACA,2BACA,YACA,aAEA,iBACA,mBACA,uBACA,yBAEA,wBACA,0BACA,2BACA,6BACF,ECcaC,GAAkB,CAE7B,gBACA,KACA,MACA,OACA,SACA,gBACA,yBACA,qBACA,mBACA,YACA,WACA,gBACA,UACA,YACA,gBACA,cACA,iBACA,gBACA,oBACA,kBACA,qBACA,oBACA,gBACA,YACA,UACA,eACA,cACA,gBACA,mBACA,iBACA,iBACA,oBACA,kBACA,qBACA,oBACA,gBACA,aACA,eACA,eACA,mBACA,mBACA,oBACA,uBACA,wBACA,6BACA,kCACA,uBACA,oBACA,yBACA,cACA,mBACA,mBACA,wBACA,yBACA,uBACA,wBACA,mBACA,0BACA,sBACA,uBACA,0BACA,kBACA,oBACA,4BACA,8BACA,iBACA,sBACA,2BACA,uBACA,sBACA,oBACA,2BAC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,WAAa,IAAIC,EAAuB,KAAK,IAAI,EACtD,KAAK,WAAa,IAAIC,EAAwB,KAAK,IAAI,EACvD,KAAK,WAAa,IAAIC,EAAuB,KAAK,KAAM,KAAK,OAAO,EACpE,KAAK,UAAY,IAAIC,EAAsB,KAAK,KAAM,KAAK,OAAO,EAClE,KAAK,SAAW,IAAIC,EAAqB,KAAK,IAAI,EAClD,KAAK,WAAa,IAAIC,EAAsB,KAAK,IAAI,EACrD,KAAK,SAAW,IAAIC,EAAoB,KAAK,KAAM,KAAK,OAAO,EAC/D,KAAK,MAAQ,IAAIC,EAAkB,KAAK,KAAM,KAAK,OAAO,EAC1D,KAAK,SAAW,IAAIC,EAAqB,KAAK,KAAM,KAAK,OAAO,EAChE,KAAK,SAAW,IAAIC,EAAsB,KAAK,IAAI,EACnD,KAAK,UAAY,IAAIC,EAAuB,KAAK,IAAI,EACrD,KAAK,UAAY,IAAIC,EAAsB,KAAK,KAAM,KAAK,OAAO,EAClE,KAAK,MAAQ,IAAIC,EAAkB,KAAK,IAAI,EAC5C,KAAK,UAAY,IAAIC,EAAsB,KAAK,IAAI,EACpD,KAAK,UAAY,IAAIC,EAAsB,KAAK,IAAI,CACtD,CACF","names":["package_default","VERSION","package_default","InsurUpClientErrorType","InsurUpServerErrorType","InsurUpGraphQLErrorCode","ERROR_TYPE_URLS","mapServerErrorType","typeString","normalizedType","parseValidationErrors","validationErrors","error","parseServerError","response","responseBody","errorData","parsed","type","createNetworkError","messageLower","createSerializationError","createDeserializationError","createUnexpectedNoContentError","extractError","error","InsurUpError","__publicField","createSuccess","data","createSuccessNoContent","getDataOrThrow","result","InsurUpError","throwIfError","getGraphQLDataOrThrow","throwIfGraphQLError","createGraphQLErrors","errors","DEFAULT_RETRY_OPTIONS","DEFAULT_LOGGER","message","data","DEFAULT_CLIENT_OPTIONS","mergeWithDefaults","options","withRetry","fn","options","retries","factor","minTimeout","maxTimeout","randomize","backoffStrategy","onFailedAttempt","attempt","error","delay","resolve","HttpTransport","options","__publicField","mergeWithDefaults","method","path","body","expectContent","startTime","requestConfig","error","executeRequest","attemptNumber","result","rawError","networkError","createNetworkError","withRetry","originalError","duration","retryableError","interceptorError","url","requestHeaders","serializedBody","createSerializationError","controller","timeoutId","signalCleanup","abortHandler","response","data","errorText","serverError","parseServerError","blob","createSuccess","deserializationError","createDeserializationError","additionalHeaders","headers","token","key","contentType","lowerContentType","createUnexpectedNoContentError","createSuccessNoContent","responseText","sanitizedHeaders","sanitizedBody","status","attempt","attemptInfo","sanitizedError","reason","sanitized","sensitiveHeaders","value","lowerKey","stringified","obj","propertyCount","maxDepth","countProperties","item","depth","i","keys","mapGraphQLErrorCode","code","parseExtensions","raw","c","s","parseGraphQLErrors","rawErrors","error","locations","loc","GraphQLTransport","http","query","variables","options","payload","result","response","parsedErrors","createGraphQLErrors","createSuccess","createDeserializationError","endpoints_exports","__export","addressParameters","agentBranches","agentRoles","agentSetupRequests","agentUsers","agents","b2c","banks","cases","contactForm","coverageChoices","coverageGroups","customers","endpoints","filePolicyTransfers","files","financialInstitutions","insuranceCompanies","insuranceServices","languages","policies","policyTransfers","properties","proposals","releaseNotes","resourceKeys","templates","vehicleParameters","vehicles","webhooks","agentInsuranceCompanyId","insuranceCompanyId","customerId","request","caseRef","base","contactFlowId","addressId","vehicleId","propertyId","proposalId","proposalProductId","installmentNumber","policyId","policyTransferId","policyTransferTriggerId","filePolicyTransferId","vehicleUtilizationStyle","id","userId","code","agentUserId","agentRoleId","webhookId","webhookDeliveryId","ref","bankId","key","InsurUpAgentClient","http","options","agents","request","agentInsuranceCompanyId","endpoint","b2c","InsurUpAgentBranchClient","http","request","options","agentBranches","id","endpoint","InsurUpAgentRoleClient","http","request","options","agentRoles","id","endpoint","InsurUpAgentSetupClient","http","request","options","agentSetupRequests","Channel","AssetType","CustomerType","ProductBranch","Currency","PaymentOption","PolicyState","InsuranceProductType","OnarimServisTuru","YedekParcaTuru","AracSegment","HastaneAgi","SaglikPaketiTedaviSekli","TasinanYuk","isCoverageValue","value","mergeCoverage","coverages","validCoverages","coverage","productBranch","mergeCoverageValue","values","definedValues","nonUndefinedValues","mergeProperty","allKeys","key","merged","sampleValue","v","PolicyTransferTriggerStatus","PolicyTransferCompanyFailureReason","TransferredPolicyStatus","TransferredPolicySkipReason","TransferredPolicyFailureReason","PropertyStructure","PropertyDamageStatus","PropertyUtilizationStyle","PropertyOwnershipType","LossPayeeClauseType","VehicleUtilizationStyle","VehicleFuelType","VehicleAccessoryType","DateTime","_DateTime","__publicField","date","DateOnly","_DateOnly","parts","y","m","d","Gender","EducationStatus","Nationality","MaritalStatus","Job","ContactFlowState","ContactType","ContactState","Surgery","Disease","ConsentType","CaseType","CaseMainState","CaseSubState","CaseStatus","SaleOpportunityCaseSubType","CancelCaseSubType","ComplaintCaseSubType","EndorsementCaseSubType","CaseActivityAction","RobotMode","CaseRepresentativeAssignmentMode","InsuranceSyncState","AgentInsuranceCompanyType","SmsImplementation","CallCenterImplementation","AgentUserState","B2CConfigFieldType","WebhookEvent","ProposalState","ProposalProductState","SortEnumType","buildFieldSelection","fields","indent","simpleFields","nestedFields","field","dotIndex","parent","nested","selections","nestedKeys","ALL_CUSTOMER_FIELDS","UserType","ALL_POLICY_FIELDS","ALL_PROPOSAL_FIELDS","ALL_CASE_FIELDS","ALL_AGENT_USER_FIELDS","ALL_POLICY_TRANSFER_FIELDS","ALL_FILE_POLICY_TRANSFER_FIELDS","WebhookDeliveryState","ALL_WEBHOOK_DELIVERY_FIELDS","InsurUpAgentUserClient","http","graphql","options","agentUsers","request","agentUserId","endpoint","code","requestOptions","fields","ALL_AGENT_USER_FIELDS","query","buildFieldSelection","variables","result","nodes","edge","InsurUpCustomerClient","http","graphql","request","options","type","rest","$type","CustomerType","endpoints","customerId","addressId","caseRef","requestOptions","fields","ALL_CUSTOMER_FIELDS","fieldSelection","buildFieldSelection","query","variables","result","nodes","edge","InsurUpVehicleClient","http","request","options","path","endpoints","customerId","vehicleId","brandCode","InsurUpPropertyClient","http","options","addressParameters","request","properties","customerId","propertyId","propertyNumber","daskPolicyNumber","InsurUpPolicyClient","http","graphql","request","options","endpoints","file","fileName","formData","requestOptions","fields","ALL_POLICY_FIELDS","fieldSelection","buildFieldSelection","query","variables","result","nodes","edge","ALL_POLICY_TRANSFER_FIELDS","ALL_FILE_POLICY_TRANSFER_FIELDS","InsurUpCaseClient","http","graphql","request","options","endpoint","cases","ref","requestOptions","fields","ALL_CASE_FIELDS","query","buildFieldSelection","variables","result","nodes","edge","InsurUpWebhookClient","http","graphql","request","options","webhooks","webhookId","endpoint","webhookDeliveryId","requestOptions","fields","ALL_WEBHOOK_DELIVERY_FIELDS","query","buildFieldSelection","variables","result","nodes","edge","InsurUpCoverageClient","http","request","options","coverageGroups","coverageGroupId","vehicleUtilizationStyle","endpoint","coverageChoices","InsurUpInsuranceClient","http","options","endpoints","insuranceCompanyId","path","bankId","InsurUpProposalClient","http","graphql","request","options","endpoints","proposalId","proposalProductId","installmentNumber","requestOptions","fields","ALL_PROPOSAL_FIELDS","query","buildFieldSelection","variables","result","nodes","edge","InsurUpFileClient","http","request","file","fileName","options","formData","files","InsurUpLanguageClient","http","options","languages","InsurUpTemplateClient","http","options","templates","key","languageId","endpoint","request","DefaultInsurUpClient","options","__publicField","HttpTransport","GraphQLTransport","InsurUpAgentClient","InsurUpAgentBranchClient","InsurUpAgentRoleClient","InsurUpAgentSetupClient","InsurUpAgentUserClient","InsurUpCustomerClient","InsurUpVehicleClient","InsurUpPropertyClient","InsurUpPolicyClient","InsurUpCaseClient","InsurUpWebhookClient","InsurUpCoverageClient","InsurUpInsuranceClient","InsurUpProposalClient","InsurUpFileClient","InsurUpLanguageClient","InsurUpTemplateClient"]}
1
+ {"version":3,"sources":["../package.json","../src/version.ts","../src/core/error-types.ts","../src/core/errors.ts","../src/core/result.ts","../src/core/config.ts","../src/core/retry.ts","../src/client/http.ts","../src/client/graphql.ts","../src/core/endpoints.ts","../src/clients/agent.ts","../src/clients/agentBranch.ts","../src/clients/agentRole.ts","../src/clients/agentSetup.ts","../../contracts/src/common.base.ts","../../contracts/src/common.coverage.ts","../../contracts/src/common.policy.ts","../../contracts/src/common.property.ts","../../contracts/src/common.vehicle.ts","../../contracts/src/common.date.ts","../../contracts/src/customers.ts","../../contracts/src/cases.ts","../../contracts/src/agents.ts","../../contracts/src/webhooks.ts","../../contracts/src/proposals.ts","../../contracts/src/graphql/common.ts","../../contracts/src/graphql/customers.ts","../../contracts/src/graphql/policies.ts","../../contracts/src/graphql/proposals.ts","../../contracts/src/graphql/cases.ts","../../contracts/src/graphql/agentUsers.ts","../../contracts/src/graphql/policyTransfers.ts","../../contracts/src/graphql/filePolicyTransfers.ts","../../contracts/src/graphql/webhookDeliveries.ts","../src/clients/agentUser.ts","../src/clients/customer.ts","../src/clients/vehicle.ts","../src/clients/property.ts","../src/clients/policy.ts","../src/clients/case.ts","../src/clients/webhook.ts","../src/clients/coverage.ts","../src/clients/insurance.ts","../src/clients/proposal.ts","../src/clients/file.ts","../src/clients/language.ts","../src/clients/template.ts","../src/client/client.ts"],"sourcesContent":["{\n \"name\": \"@insurup/sdk\",\n \"version\": \"0.1.8\",\n \"description\": \"Type-safe TypeScript SDK for the InsurUp insurance platform with GraphQL support. Tree-shakeable, works everywhere.\",\n \"keywords\": [\n \"insurup\",\n \"insurance\",\n \"sdk\",\n \"typescript\",\n \"api-client\",\n \"graphql\",\n \"policy\",\n \"claims\",\n \"coverage\",\n \"vehicle-insurance\",\n \"property-insurance\"\n ],\n \"author\": \"InsurUp Team\",\n \"license\": \"MIT\",\n \"homepage\": \"https://github.com/InsurUp/ts-toolkit#readme\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/InsurUp/ts-toolkit.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/InsurUp/ts-toolkit/issues\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"type\": \"module\",\n \"sideEffects\": false,\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"files\": [\n \"dist\"\n ],\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\",\n \"default\": \"./dist/index.js\"\n },\n \"./browser\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.browser.js\",\n \"default\": \"./dist/index.browser.js\"\n }\n },\n \"scripts\": {\n \"build\": \"tsup\",\n \"build:tsc\": \"tsc\",\n \"check-types\": \"tsc --noEmit\",\n \"dev\": \"tsup --watch\",\n \"docs\": \"typedoc\",\n \"lint\": \"eslint src test --max-warnings 0\",\n \"test\": \"vitest run\",\n \"test:watch\": \"vitest\",\n \"test:coverage\": \"vitest run --coverage\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"devDependencies\": {\n \"@eslint/js\": \"^9.39.2\",\n \"@vitest/coverage-v8\": \"^4.0.17\",\n \"eslint\": \"^9.39.2\",\n \"eslint-config-prettier\": \"^10.1.8\",\n \"eslint-plugin-prettier\": \"^5.5.5\",\n \"msw\": \"^2.12.7\",\n \"prettier\": \"^3.8.0\",\n \"tsup\": \"^8.5.1\",\n \"typedoc\": \"^0.28.16\",\n \"typescript\": \"^5.9.3\",\n \"typescript-eslint\": \"^8.53.1\",\n \"vitest\": \"^4.0.17\"\n },\n \"dependencies\": {\n \"@insurup/contracts\": \"workspace:*\"\n }\n}\n","/**\n * SDK version information.\n * @module version\n */\n\nimport pkg from \"../package.json\" with { type: \"json\" };\n\n/**\n * The current version of the InsurUp SDK.\n * This value is automatically derived from package.json.\n */\nexport const VERSION: string = pkg.version;\n","/**\n * @fileoverview Error Type Enums - Foundational error types used across the SDK\n * @description Centralized error type definitions to avoid circular dependencies\n */\n\n/**\n * Client-side error types that can occur during API operations\n */\nexport enum InsurUpClientErrorType {\n Unknown = \"Unknown\",\n JsonSerialization = \"JsonSerialization\",\n JsonDeserialization = \"JsonDeserialization\",\n NullResponse = \"NullResponse\",\n Timeout = \"Timeout\",\n HttpRequestFailed = \"HttpRequestFailed\",\n UnexpectedNoContent = \"UnexpectedNoContent\",\n GraphQLError = \"GraphQLError\",\n}\n\n/**\n * Server-side error types from HTTP responses\n */\nexport enum InsurUpServerErrorType {\n Unknown = \"Unknown\",\n AccessDenied = \"AccessDenied\",\n BusinessValidation = \"BusinessValidation\",\n FeatureNotSupported = \"FeatureNotSupported\",\n InputValidation = \"InputValidation\",\n ResourceDuplicate = \"ResourceDuplicate\",\n ResourceInvalidState = \"ResourceInvalidState\",\n ResourceNotFound = \"ResourceNotFound\",\n EndpointNotFound = \"EndpointNotFound\",\n UnsupportedMediaType = \"UnsupportedMediaType\",\n MethodNotAllowed = \"MethodNotAllowed\",\n Unauthorized = \"Unauthorized\",\n Upstream = \"Upstream\",\n}\n\n/**\n * GraphQL error codes from the server\n * These match the error codes set by the GraphQL error filter on the backend\n */\nexport enum InsurUpGraphQLErrorCode {\n /** Access denied - user lacks permission */\n Forbidden = \"FORBIDDEN\",\n /** Authentication required or invalid */\n Unauthorized = \"UNAUTHORIZED\",\n /** Requested resource not found */\n NotFound = \"NOT_FOUND\",\n /** Invalid input or business validation failure */\n BadRequest = \"BAD_REQUEST\",\n /** Resource conflict (duplicate or invalid state) */\n Conflict = \"CONFLICT\",\n /** Feature not supported */\n NotSupported = \"NOT_SUPPORTED\",\n /** Upstream service error */\n UpstreamError = \"UPSTREAM_ERROR\",\n /** Internal server error */\n InternalError = \"INTERNAL_ERROR\",\n /** GraphQL validation error */\n ValidationError = \"VALIDATION_ERROR\",\n /** Filter is required for this query */\n FilterRequired = \"FILTER_REQUIRED\",\n /** Filter time span exceeds maximum allowed */\n FilterMaxSpanExceeded = \"FILTER_MAX_SPAN_EXCEEDED\",\n /** Unknown error code */\n Unknown = \"UNKNOWN\",\n}\n","/**\n * @fileoverview Error handling and mapping utilities\n * @description Error type mapping and parsing logic\n */\n\nimport {\n InsurUpServerErrorType,\n InsurUpClientErrorType,\n} from \"./error-types.js\";\nimport type {\n ValidationError} from \"./result.js\";\nimport {\n type ServerError,\n type ClientError,\n type GraphQLErrors,\n} from \"./result.js\";\n\n/**\n * Error type URLs from the API\n */\nconst ERROR_TYPE_URLS = {\n \"https://api.insurup.com/problems/access-denied\":\n InsurUpServerErrorType.AccessDenied,\n \"https://api.insurup.com/problems/business-validation\":\n InsurUpServerErrorType.BusinessValidation,\n \"https://api.insurup.com/problems/feature-not-supported\":\n InsurUpServerErrorType.FeatureNotSupported,\n \"https://api.insurup.com/problems/input-validation\":\n InsurUpServerErrorType.InputValidation,\n \"https://api.insurup.com/problems/resource-duplicate\":\n InsurUpServerErrorType.ResourceDuplicate,\n \"https://api.insurup.com/problems/resource-invalid-state\":\n InsurUpServerErrorType.ResourceInvalidState,\n \"https://api.insurup.com/problems/resource-not-found\":\n InsurUpServerErrorType.ResourceNotFound,\n \"https://api.insurup.com/problems/endpoint-not-found\":\n InsurUpServerErrorType.EndpointNotFound,\n \"https://api.insurup.com/problems/unauthorized\":\n InsurUpServerErrorType.Unauthorized,\n \"https://api.insurup.com/problems/upstream-service\":\n InsurUpServerErrorType.Upstream,\n \"https://api.insurup.com/problems/unsupported-media-type\":\n InsurUpServerErrorType.UnsupportedMediaType,\n \"https://api.insurup.com/problems/method-not-allowed\":\n InsurUpServerErrorType.MethodNotAllowed,\n} as const;\n\n/**\n * Interface representing the server error response structure\n */\ninterface ServerErrorResponse {\n type?: string;\n title?: string;\n detail?: string;\n instance?: string;\n status?: number;\n codes?: string[];\n traceId?: string;\n template?: string;\n templateArgs?: Record<string, unknown>;\n suggestions?: string[];\n validationErrors?: Array<{\n propertyName?: string;\n errorMessage?: string;\n attemptedValue?: unknown;\n }>;\n}\n\n/**\n * Maps a server error type string to the corresponding enum value\n */\nfunction mapServerErrorType(typeString: string): InsurUpServerErrorType {\n const normalizedType = typeString.toLowerCase().trim();\n return (\n ERROR_TYPE_URLS[normalizedType as keyof typeof ERROR_TYPE_URLS] ??\n InsurUpServerErrorType.Unknown\n );\n}\n\n/**\n * Parses validation errors from server response\n */\nfunction parseValidationErrors(\n validationErrors?: Array<{\n propertyName?: string;\n errorMessage?: string;\n attemptedValue?: unknown;\n }>,\n): ValidationError[] {\n if (!validationErrors || !Array.isArray(validationErrors)) {\n return [];\n }\n\n return validationErrors\n .filter((error): error is NonNullable<typeof error> => error != null)\n .map(\n (error): ValidationError => ({\n propertyName: error.propertyName ?? \"\",\n errorMessage: error.errorMessage ?? \"\",\n attemptedValue: error.attemptedValue ?? null,\n }),\n );\n}\n\n/**\n * Parses server error response and creates a ServerError object\n */\nexport function parseServerError(\n response: Response,\n responseBody: string,\n): ServerError {\n let errorData: ServerErrorResponse = {};\n\n // Try to parse JSON response body\n try {\n if (responseBody.trim()) {\n const parsed = JSON.parse(responseBody) as unknown;\n if (typeof parsed === \"object\" && parsed !== null) {\n errorData = parsed as ServerErrorResponse;\n }\n }\n } catch {\n // If JSON parsing fails, create minimal error info from response\n }\n\n const typeString =\n errorData.type ?? \"https://api.insurup.com/problems/unknown\";\n const type = mapServerErrorType(typeString);\n\n return {\n kind: \"server-error\",\n isSuccess: false,\n message:\n errorData.detail ?? (response.statusText || \"Unknown server error\"),\n type,\n typeString,\n title: errorData.title ?? `HTTP ${response.status}`,\n detail: errorData.detail ?? (response.statusText || \"Unknown server error\"),\n instance: errorData.instance ?? \"\",\n status: errorData.status ?? response.status,\n codes: errorData.codes ?? [],\n traceId: errorData.traceId ?? undefined,\n template: errorData.template ?? \"\",\n templateArgs: errorData.templateArgs ?? {},\n suggestions: errorData.suggestions ?? [],\n validationErrors: parseValidationErrors(errorData.validationErrors),\n };\n}\n\n/**\n * Creates a client error for network/timeout issues\n */\nexport function createNetworkError(error: unknown): ClientError {\n if (error instanceof Error) {\n if (error.name === \"AbortError\" || error.message.includes(\"timeout\")) {\n return {\n kind: \"client-error\",\n isSuccess: false,\n message: \"Request timed out\",\n type: InsurUpClientErrorType.Timeout,\n error: error,\n };\n }\n\n const messageLower = error.message.toLowerCase();\n if (\n error.name === \"TypeError\" ||\n messageLower.includes(\"fetch\") ||\n messageLower.includes(\"network\") ||\n messageLower.includes(\"failed\") ||\n messageLower.includes(\"econn\") ||\n messageLower.includes(\"enotfound\")\n ) {\n return {\n kind: \"client-error\",\n isSuccess: false,\n message: \"HTTP request failed\",\n type: InsurUpClientErrorType.HttpRequestFailed,\n error: error,\n };\n }\n\n // Default other Error instances to HttpRequestFailed for better DX\n return {\n kind: \"client-error\",\n isSuccess: false,\n message: \"HTTP request failed\",\n type: InsurUpClientErrorType.HttpRequestFailed,\n error: error,\n };\n }\n\n return {\n kind: \"client-error\",\n isSuccess: false,\n message: \"Unknown error occurred\",\n type: InsurUpClientErrorType.Unknown,\n error: error,\n };\n}\n\n/**\n * Creates a client error for JSON serialization issues\n */\nexport function createSerializationError(error: unknown): ClientError {\n return {\n kind: \"client-error\",\n isSuccess: false,\n message:\n error instanceof Error\n ? error.message\n : \"Failed to serialize request to JSON\",\n type: InsurUpClientErrorType.JsonSerialization,\n error: error,\n };\n}\n\n/**\n * Creates a client error for JSON deserialization issues\n */\nexport function createDeserializationError(error: unknown): ClientError {\n return {\n kind: \"client-error\",\n isSuccess: false,\n message: \"Failed to parse response JSON\",\n type: InsurUpClientErrorType.JsonDeserialization,\n error: error,\n };\n}\n\n/**\n * Creates a client error for null/empty responses when data was expected\n */\nexport function createNullResponseError(): ClientError {\n return {\n kind: \"client-error\",\n isSuccess: false,\n message: \"Response was empty or null when data was expected\",\n type: InsurUpClientErrorType.NullResponse,\n };\n}\n\n/**\n * Creates a client error for unexpected empty/no-content responses\n * Used when an endpoint that should return data receives 204 or empty body\n */\nexport function createUnexpectedNoContentError(): ClientError {\n return {\n kind: \"client-error\",\n isSuccess: false,\n message: \"Expected response data but received no content\",\n type: InsurUpClientErrorType.UnexpectedNoContent,\n };\n}\n\nexport function extractError(\n error: Error,\n): ClientError | ServerError | GraphQLErrors {\n if (error instanceof InsurUpError) {\n return error.error;\n }\n\n return {\n kind: \"client-error\",\n isSuccess: false,\n message: error.message,\n type: InsurUpClientErrorType.Unknown,\n } as ClientError;\n}\n\n/**\n * Custom InsurUp error class that extends the standard Error\n */\nexport class InsurUpError extends Error {\n /**\n * The original client, server, or GraphQL error object\n */\n public readonly error: ClientError | ServerError | GraphQLErrors;\n\n constructor(error: ClientError | ServerError | GraphQLErrors) {\n super(error.message);\n this.name = \"InsurUpError\";\n this.error = error;\n }\n}\n","/**\n * @fileoverview InsurUp Result Types - Type-safe discriminated unions for operation results\n * @description Type-safe discriminated unions for operation results\n */\n\nimport { InsurUpError } from \"./errors.js\";\nimport {\n InsurUpClientErrorType,\n InsurUpServerErrorType,\n InsurUpGraphQLErrorCode,\n} from \"./error-types.js\";\n\n/**\n * Represents a validation error that occurred during request processing\n */\nexport interface ValidationError {\n /**\n * The name of the property that failed validation\n * The name of the property.\n */\n readonly propertyName: string;\n\n /**\n * The error message describing what went wrong\n * The error message\n */\n readonly errorMessage: string;\n\n /**\n * The property value that caused the validation failure\n * The property value that caused the failure.\n */\n readonly attemptedValue: unknown;\n}\n\n// Re-export error types for convenience\nexport {\n InsurUpClientErrorType,\n InsurUpServerErrorType,\n InsurUpGraphQLErrorCode,\n};\n\n/**\n * Represents a successful operation with data\n */\nexport interface Success<T> {\n readonly kind: \"success\";\n readonly isSuccess: true;\n readonly message: \"Success\";\n readonly data: T;\n}\n\n/**\n * Represents a successful operation without data (e.g., 204 No Content)\n */\nexport interface SuccessNoContent {\n readonly kind: \"success\";\n readonly isSuccess: true;\n readonly message: \"Success\";\n}\n\n/**\n * Represents an error response from the server (4xx and 5xx HTTP status codes)\n */\nexport interface ServerError {\n readonly kind: \"server-error\";\n readonly isSuccess: false;\n readonly message: string;\n readonly type: InsurUpServerErrorType;\n readonly typeString: string;\n readonly title: string;\n readonly detail: string;\n readonly instance: string;\n readonly status: number;\n readonly codes: readonly string[];\n readonly traceId: string | undefined;\n readonly template: string;\n readonly templateArgs: Readonly<Record<string, unknown>>;\n readonly suggestions: readonly string[];\n readonly validationErrors: readonly ValidationError[];\n}\n\n/**\n * Represents a client-side error (exceptions, null JSON responses, etc.)\n */\nexport interface ClientError {\n readonly kind: \"client-error\";\n readonly isSuccess: false;\n readonly message: string;\n readonly type: InsurUpClientErrorType;\n readonly error?: unknown;\n}\n\n// ============================================\n// GraphQL Error Types\n// ============================================\n\n/**\n * Represents the location of an error in a GraphQL document\n */\nexport interface GraphQLErrorLocation {\n readonly line: number;\n readonly column: number;\n}\n\n/**\n * Extensions attached to GraphQL errors by the server\n * Contains structured error information from the backend error filter\n */\nexport interface GraphQLErrorExtensions {\n /** The error code (e.g., FORBIDDEN, UNAUTHORIZED, NOT_FOUND) */\n readonly code?: InsurUpGraphQLErrorCode;\n /** Trace ID for debugging/correlation */\n readonly traceId?: string;\n /** Array of error codes from the backend AppException */\n readonly codes?: readonly string[];\n /** Message template for localization */\n readonly template?: string;\n /** Arguments for the message template */\n readonly templateArgs?: Readonly<Record<string, unknown>>;\n /** Suggested actions or fixes */\n readonly suggestions?: readonly string[];\n /** Additional extension fields */\n readonly [key: string]: unknown;\n}\n\n/**\n * Represents a single GraphQL error item\n */\nexport interface GraphQLErrorItem {\n /** The error message */\n readonly message: string;\n /** Locations in the GraphQL document where the error occurred */\n readonly locations?: readonly GraphQLErrorLocation[];\n /** Path to the field that caused the error */\n readonly path?: readonly (string | number)[];\n /** Extensions containing additional error information */\n readonly extensions?: GraphQLErrorExtensions;\n}\n\n/**\n * Represents a GraphQL error response containing one or more errors\n */\nexport interface GraphQLErrors {\n readonly kind: \"graphql-error\";\n readonly isSuccess: false;\n /** First error message for convenience */\n readonly message: string;\n /** All GraphQL errors from the response */\n readonly errors: readonly GraphQLErrorItem[];\n}\n\n/**\n * Discriminated union representing the result of a GraphQL operation\n *\n * Similar to InsurUpResult but uses GraphQLErrors instead of ServerError\n * since GraphQL errors have a different schema and can contain multiple errors.\n *\n * @template T The type of the success data (void for no-content operations)\n */\nexport type InsurUpGraphQLResult<T = void> = T extends void\n ? SuccessNoContent | GraphQLErrors | ClientError\n : Success<T> | GraphQLErrors | ClientError;\n\n/**\n * Discriminated union representing the result of an InsurUp operation\n *\n * When called without a type parameter (InsurUpResult), represents a no-content result\n * where the success case has no data field.\n *\n * When called with a type parameter (InsurUpResult<T>), represents a result with data\n * where the success case has a data field of type T.\n *\n * @template T The type of the success data (void for no-content operations)\n */\nexport type InsurUpResult<T = void> = T extends void\n ? SuccessNoContent | ServerError | ClientError\n : Success<T> | ServerError | ClientError;\n\n/**\n * Creates a successful result with data\n */\nexport function createSuccess<T>(data: T): Success<T> {\n return {\n kind: \"success\",\n isSuccess: true,\n message: \"Success\",\n data,\n };\n}\n\n/**\n * Creates a successful result without data (for 204 No Content responses)\n */\nexport function createSuccessNoContent(): SuccessNoContent {\n return {\n kind: \"success\",\n isSuccess: true,\n message: \"Success\",\n };\n}\n\n/**\n * Helper type to extract data type from a Success result\n */\nexport type ExtractSuccessData<R> = R extends Success<infer T> ? T : never;\n\n/**\n * Extracts data from a successful result or throws an InsurUpError\n * Only works with InsurUpResult<T> where T is not void\n */\nexport function getDataOrThrow<T>(result: InsurUpResult<T>): T {\n if (result.isSuccess) {\n // When T is not void, result.isSuccess means result is Success<T>\n return (result as unknown as Success<T>).data;\n }\n throw new InsurUpError(result);\n}\n\n/**\n * Throws an InsurUpError if the result is not successful\n * Works with any InsurUpResult type\n */\nexport function throwIfError(\n result: InsurUpResult<unknown> | InsurUpResult,\n): void {\n if (result.isSuccess) {\n return;\n }\n throw new InsurUpError(result);\n}\n\n// ============================================\n// GraphQL Result Helpers\n// ============================================\n\n/**\n * Extracts data from a successful GraphQL result or throws an InsurUpError\n * Only works with InsurUpGraphQLResult<T> where T is not void\n */\nexport function getGraphQLDataOrThrow<T>(result: InsurUpGraphQLResult<T>): T {\n if (result.isSuccess) {\n return (result as unknown as Success<T>).data;\n }\n throw new InsurUpError(result);\n}\n\n/**\n * Throws an InsurUpError if the GraphQL result is not successful\n * Works with any InsurUpGraphQLResult type\n */\nexport function throwIfGraphQLError(\n result: InsurUpGraphQLResult<unknown> | InsurUpGraphQLResult,\n): void {\n if (result.isSuccess) {\n return;\n }\n throw new InsurUpError(result);\n}\n\n/**\n * Creates a GraphQL errors result from an array of GraphQL error items\n */\nexport function createGraphQLErrors(\n errors: readonly GraphQLErrorItem[],\n): GraphQLErrors {\n return {\n kind: \"graphql-error\",\n isSuccess: false,\n message: errors[0]?.message ?? \"Unknown GraphQL error\",\n errors,\n };\n}\n","/**\n * @fileoverview SDK Configuration - Default values and configuration constants\n * @description Default configuration values for the InsurUp SDK client\n */\n\nimport type {\n InsurUpClientOptions,\n RetryOptions,\n TokenProvider,\n RequestInterceptor,\n ResponseInterceptor,\n} from \"./options.js\";\n\n/**\n * Default retry options for transient failure handling\n * Based on standard exponential backoff defaults with InsurUp-specific settings\n */\nexport const DEFAULT_RETRY_OPTIONS: Required<RetryOptions> = {\n retries: 3,\n factor: 2,\n minTimeout: 1000,\n maxTimeout: 10000,\n randomize: true,\n backoffStrategy: \"exponential\",\n retryableStatusCodes: [408, 429, 500, 502, 503, 504],\n onFailedAttempt: () => {}, // No-op by default\n} as const;\n\n/**\n * Default logger implementation using console\n */\nexport const DEFAULT_LOGGER = {\n info: (message: string, data?: unknown) => {\n if (data !== undefined) {\n console.info(message, data);\n } else {\n console.info(message);\n }\n },\n warn: (message: string, data?: unknown) => {\n if (data !== undefined) {\n console.warn(message, data);\n } else {\n console.warn(message);\n }\n },\n error: (message: string, data?: unknown) => {\n if (data !== undefined) {\n console.error(message, data);\n } else {\n console.error(message);\n }\n },\n} as const;\n\n/**\n * Required client options type (tokenProvider, onRequest, onResponse, retry remain optional)\n */\nexport type RequiredClientOptions = Required<\n Omit<\n InsurUpClientOptions,\n \"tokenProvider\" | \"onRequest\" | \"onResponse\" | \"retry\"\n >\n> & {\n tokenProvider?: TokenProvider;\n onRequest?: RequestInterceptor;\n onResponse?: ResponseInterceptor;\n retry?: Required<RetryOptions>;\n};\n\n/**\n * Default configuration values for the InsurUp SDK client\n */\nexport const DEFAULT_CLIENT_OPTIONS: RequiredClientOptions = {\n baseUrl: \"https://api.insurup.com/api/\",\n customHeaders: {},\n userAgent: \"@insurup/sdk\",\n timeoutMs: 30000,\n logLevel: \"none\",\n logger: DEFAULT_LOGGER,\n retry: undefined,\n tokenProvider: undefined,\n onRequest: undefined,\n onResponse: undefined,\n} as const;\n\n/**\n * Merges user-provided options with defaults\n * @param options User-provided options\n * @returns Complete options object with defaults applied\n */\nexport function mergeWithDefaults(\n options?: InsurUpClientOptions,\n): RequiredClientOptions {\n return {\n baseUrl: options?.baseUrl ?? DEFAULT_CLIENT_OPTIONS.baseUrl,\n customHeaders: {\n ...DEFAULT_CLIENT_OPTIONS.customHeaders,\n ...options?.customHeaders,\n },\n userAgent: options?.userAgent ?? DEFAULT_CLIENT_OPTIONS.userAgent,\n timeoutMs: options?.timeoutMs ?? DEFAULT_CLIENT_OPTIONS.timeoutMs,\n logLevel: options?.logLevel ?? DEFAULT_CLIENT_OPTIONS.logLevel,\n logger: options?.logger ?? DEFAULT_CLIENT_OPTIONS.logger,\n retry: options?.retry\n ? { ...DEFAULT_RETRY_OPTIONS, ...options.retry }\n : undefined,\n tokenProvider: options?.tokenProvider,\n onRequest: options?.onRequest,\n onResponse: options?.onResponse,\n };\n}\n","/**\n * @fileoverview Lightweight retry utility for transient failure handling\n * @description Provides configurable backoff strategies with jitter, zero-dependency replacement for p-retry\n */\n\nimport type { RetryOptions } from \"./options.js\";\n\n/**\n * Executes a function with configurable backoff retry logic\n * @template T The return type of the function\n * @param fn The function to execute, receives attempt number (1-based)\n * @param options Retry configuration options\n * @returns Promise resolving to the function's result\n * @throws The last error encountered if all retry attempts fail\n */\nexport async function withRetry<T>(\n fn: (attemptNumber: number) => Promise<T>,\n options: Required<RetryOptions>,\n): Promise<T> {\n const {\n retries,\n factor,\n minTimeout,\n maxTimeout,\n randomize,\n backoffStrategy,\n onFailedAttempt,\n } = options;\n\n let attempt = 1;\n\n while (true) {\n try {\n return await fn(attempt);\n } catch (error) {\n const isLastAttempt = attempt > retries;\n\n if (isLastAttempt) {\n throw error;\n }\n\n // Calculate delay based on backoff strategy\n let delay: number;\n switch (backoffStrategy) {\n case \"linear\":\n delay = minTimeout * attempt;\n break;\n case \"constant\":\n delay = minTimeout;\n break;\n case \"exponential\":\n default:\n delay = minTimeout * Math.pow(factor, attempt - 1);\n }\n\n // Apply jitter if enabled\n if (randomize) {\n // Random factor between 1 and 2, matching p-retry behavior\n delay *= 1 + Math.random();\n }\n\n // Cap at maxTimeout\n delay = Math.min(delay, maxTimeout);\n\n // Notify callback\n if (onFailedAttempt) {\n onFailedAttempt({\n attemptNumber: attempt,\n retriesLeft: retries - attempt + 1,\n name: error instanceof Error ? error.name : \"Error\",\n message: error instanceof Error ? error.message : String(error),\n error: error instanceof Error ? error : new Error(String(error)),\n });\n }\n\n // Wait before next attempt\n await new Promise((resolve) => setTimeout(resolve, delay));\n\n attempt++;\n }\n }\n}\n","/**\n * @fileoverview HTTP Transport Layer - Fetch-based HTTP client\n * @description Cross-environment HTTP transport with timeout support and error handling\n */\n\nimport type { InsurUpResult } from \"../core/result.js\";\nimport {\n createSuccess,\n createSuccessNoContent,\n InsurUpClientErrorType,\n} from \"../core/result.js\";\nimport {\n parseServerError,\n createNetworkError,\n createSerializationError,\n createDeserializationError,\n createUnexpectedNoContentError,\n} from \"../core/errors.js\";\nimport type {\n InsurUpClientOptions,\n RequestConfig,\n RequestOptions,\n} from \"../core/options.js\";\nimport {\n mergeWithDefaults,\n type RequiredClientOptions,\n} from \"../core/config.js\";\nimport { withRetry } from \"../core/retry.js\";\n\n/**\n * HTTP method types\n */\nexport type HttpMethod = \"GET\" | \"POST\" | \"PUT\" | \"DELETE\" | \"PATCH\";\n\n/**\n * Valid request body types for HTTP requests\n */\nexport type RequestBody = unknown | FormData;\n\n/**\n * Error type that built-in retry can understand\n */\ninterface RetryableError extends Error {\n result: InsurUpResult<unknown> | InsurUpResult;\n attemptNumber: number;\n}\n\n/**\n * HTTP transport class providing fetch-based request capabilities\n * with environment detection and timeout support\n */\nexport class HttpTransport {\n private readonly options: RequiredClientOptions;\n\n constructor(options?: InsurUpClientOptions) {\n this.options = mergeWithDefaults(options);\n }\n\n /**\n * Sends an HTTP request and returns the parsed result\n * @template T The expected response type (void for no-content operations)\n * @param method HTTP method\n * @param path Relative path (will be prefixed with baseUrl)\n * @param body Optional request body\n * @param options Optional request options (headers, signal, timeoutMs)\n * @param expectContent Whether the response should contain data (internal use)\n * @returns Promise resolving to InsurUpResult<T>\n */\n private async sendInternal<T>(\n method: HttpMethod,\n path: string,\n body?: RequestBody,\n options?: RequestOptions,\n expectContent: boolean = true,\n ): Promise<InsurUpResult<T> | InsurUpResult> {\n const startTime = Date.now();\n const url = `${this.options.baseUrl.replace(/\\/$/, \"\")}/${path.replace(/^\\//, \"\")}`;\n\n // Build initial request config for interceptors\n let requestConfig: RequestConfig = {\n url,\n method,\n headers: { ...this.options.customHeaders, ...options?.headers },\n body,\n };\n\n // Call request interceptor if provided\n if (this.options.onRequest) {\n try {\n requestConfig = await this.options.onRequest(requestConfig);\n } catch (error) {\n if (this.options.logLevel !== \"none\") {\n this.options.logger.warn(\"Request interceptor failed:\", error);\n }\n }\n }\n\n this.logRequest(method, path, body, options?.headers);\n\n const executeRequest = async (\n attemptNumber: number,\n ): Promise<InsurUpResult<T> | InsurUpResult> => {\n try {\n const result = await this.sendSingleRequest<T>(\n requestConfig.method as HttpMethod,\n path,\n requestConfig.body,\n {\n headers: requestConfig.headers,\n signal: options?.signal,\n timeoutMs: options?.timeoutMs,\n },\n expectContent,\n );\n\n // If it's a success, return it\n if (result.kind === \"success\") {\n return result;\n }\n\n // Check if this error should be retried\n if (this.shouldRetryResult(result)) {\n const error = new Error(result.message) as RetryableError;\n error.result = result;\n error.attemptNumber = attemptNumber;\n\n throw error;\n }\n\n // Non-retryable error, return it directly\n return result;\n } catch (rawError) {\n // Handle raw errors from fetch (like timeout errors)\n const networkError = createNetworkError(rawError);\n\n // Don't retry timeout errors\n if (networkError.type === InsurUpClientErrorType.Timeout) {\n return networkError;\n }\n\n // Only retry HttpRequestFailed errors\n if (\n networkError.type === InsurUpClientErrorType.HttpRequestFailed &&\n this.options.retry\n ) {\n const error = new Error(networkError.message) as RetryableError;\n error.result = networkError;\n error.attemptNumber = attemptNumber;\n\n throw error;\n }\n\n // Non-retryable error, return it directly\n return networkError;\n }\n };\n\n try {\n let result: InsurUpResult<T> | InsurUpResult;\n\n if (this.options.retry) {\n result = await withRetry(executeRequest, {\n ...this.options.retry,\n onFailedAttempt: (error) => {\n const originalError = error.error as RetryableError;\n if (originalError.result) {\n this.logRetry(error.attemptNumber, originalError.result);\n }\n\n // Call user's onFailedAttempt if provided\n if (this.options.retry?.onFailedAttempt) {\n this.options.retry.onFailedAttempt(error);\n }\n },\n });\n } else {\n result = await executeRequest(1);\n }\n\n const duration = Date.now() - startTime;\n this.logResponse(\"SUCCESS\", duration, 1, result);\n\n // Call response interceptor if provided\n if (this.options.onResponse) {\n try {\n return (await this.options.onResponse(\n result as InsurUpResult<unknown>,\n requestConfig,\n )) as InsurUpResult<T> | InsurUpResult;\n } catch (error) {\n if (this.options.logLevel !== \"none\") {\n this.options.logger.warn(\"Response interceptor failed:\", error);\n }\n }\n }\n\n return result;\n } catch (error) {\n const duration = Date.now() - startTime;\n // If it's our custom error with a result, use that\n const retryableError = error as RetryableError;\n if (retryableError.result) {\n this.logResponse(\n \"ERROR\",\n duration,\n retryableError.attemptNumber || 1,\n retryableError.result,\n );\n\n // Call response interceptor for errors too\n if (this.options.onResponse) {\n try {\n return (await this.options.onResponse(\n retryableError.result as InsurUpResult<unknown>,\n requestConfig,\n )) as InsurUpResult<T> | InsurUpResult;\n } catch (interceptorError) {\n if (this.options.logLevel !== \"none\") {\n this.options.logger.warn(\n \"Response interceptor failed:\",\n interceptorError,\n );\n }\n }\n }\n\n return retryableError.result as InsurUpResult<T> | InsurUpResult;\n }\n\n // Otherwise, it's a network error\n const networkError = createNetworkError(error);\n this.logResponse(\"ERROR\", duration, 1, networkError);\n\n // Call response interceptor for network errors too\n if (this.options.onResponse) {\n try {\n return (await this.options.onResponse(\n networkError as InsurUpResult<unknown>,\n requestConfig,\n )) as InsurUpResult<T> | InsurUpResult;\n } catch (interceptorError) {\n if (this.options.logLevel !== \"none\") {\n this.options.logger.warn(\n \"Response interceptor failed:\",\n interceptorError,\n );\n }\n }\n }\n\n return networkError;\n }\n }\n\n /**\n * Sends a single HTTP request without retry logic\n */\n private async sendSingleRequest<T>(\n method: HttpMethod,\n path: string,\n body?: RequestBody,\n options?: RequestOptions,\n expectContent: boolean = true,\n ): Promise<InsurUpResult<T> | InsurUpResult> {\n const url = `${this.options.baseUrl.replace(/\\/$/, \"\")}/${path.replace(/^\\//, \"\")}`;\n const requestHeaders = await this.buildHeaders(options?.headers);\n\n // Serialize request body\n let serializedBody: string | FormData | null = null;\n if (body) {\n if (body instanceof FormData) {\n // Don't serialize FormData - let browser set Content-Type with boundary\n serializedBody = body;\n } else {\n try {\n serializedBody = JSON.stringify(body);\n // Set Content-Type header for JSON requests\n if (!this.hasContentTypeHeader(requestHeaders)) {\n requestHeaders[\"Content-Type\"] = \"application/json\";\n }\n } catch (error) {\n return createSerializationError(error);\n }\n }\n }\n\n // Create AbortController for timeout\n const controller = new AbortController();\n const timeoutId = setTimeout(\n () => controller.abort(),\n options?.timeoutMs ?? this.options.timeoutMs,\n );\n\n // Bridge external signal (if provided) to our controller\n let signalCleanup: (() => void) | undefined;\n if (options?.signal) {\n if (options.signal.aborted) {\n controller.abort();\n } else {\n const abortHandler = () => controller.abort();\n options.signal.addEventListener(\"abort\", abortHandler, { once: true });\n signalCleanup = () =>\n options.signal!.removeEventListener(\"abort\", abortHandler);\n }\n }\n\n let response: Response;\n try {\n response = await fetch(url, {\n method,\n headers: requestHeaders,\n body: serializedBody,\n signal: controller.signal,\n });\n } finally {\n clearTimeout(timeoutId);\n signalCleanup?.();\n }\n\n return await this.handleResponse<T>(response, expectContent);\n }\n\n /**\n * Convenience method for GET requests - always expects content\n * @param path Relative path (will be prefixed with baseUrl)\n * @param options Optional request options (headers, signal, timeoutMs)\n */\n async get<T>(\n path: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<T>> {\n return this.sendInternal<T>(\"GET\", path, null, options, true) as Promise<\n InsurUpResult<T>\n >;\n }\n\n /**\n * POST request expecting a response with data\n * @param path Relative path (will be prefixed with baseUrl)\n * @param data Optional request body\n * @param options Optional request options (headers, signal, timeoutMs)\n * @returns Promise resolving to InsurUpResult<T> with response data\n */\n async post<T>(\n path: string,\n data?: RequestBody,\n options?: RequestOptions,\n ): Promise<InsurUpResult<T>> {\n return this.sendInternal<T>(\"POST\", path, data, options, true) as Promise<\n InsurUpResult<T>\n >;\n }\n\n /**\n * POST request expecting no response content (204 No Content)\n * @param path Relative path (will be prefixed with baseUrl)\n * @param data Optional request body\n * @param options Optional request options (headers, signal, timeoutMs)\n * @returns Promise resolving to InsurUpResult (no data)\n */\n async postNoContent(\n path: string,\n data?: RequestBody,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.sendInternal(\n \"POST\",\n path,\n data,\n options,\n false,\n ) as Promise<InsurUpResult>;\n }\n\n /**\n * PUT request expecting a response with data\n * @param path Relative path (will be prefixed with baseUrl)\n * @param data Optional request body\n * @param options Optional request options (headers, signal, timeoutMs)\n * @returns Promise resolving to InsurUpResult<T> with response data\n */\n async put<T>(\n path: string,\n data?: RequestBody,\n options?: RequestOptions,\n ): Promise<InsurUpResult<T>> {\n return this.sendInternal<T>(\"PUT\", path, data, options, true) as Promise<\n InsurUpResult<T>\n >;\n }\n\n /**\n * PUT request expecting no response content (204 No Content)\n * @param path Relative path (will be prefixed with baseUrl)\n * @param data Optional request body\n * @param options Optional request options (headers, signal, timeoutMs)\n * @returns Promise resolving to InsurUpResult (no data)\n */\n async putNoContent(\n path: string,\n data?: RequestBody,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.sendInternal(\n \"PUT\",\n path,\n data,\n options,\n false,\n ) as Promise<InsurUpResult>;\n }\n\n /**\n * PATCH request expecting a response with data\n * @param path Relative path (will be prefixed with baseUrl)\n * @param data Optional request body\n * @param options Optional request options (headers, signal, timeoutMs)\n * @returns Promise resolving to InsurUpResult<T> with response data\n */\n async patch<T>(\n path: string,\n data?: RequestBody,\n options?: RequestOptions,\n ): Promise<InsurUpResult<T>> {\n return this.sendInternal<T>(\"PATCH\", path, data, options, true) as Promise<\n InsurUpResult<T>\n >;\n }\n\n /**\n * PATCH request expecting no response content (204 No Content)\n * @param path Relative path (will be prefixed with baseUrl)\n * @param data Optional request body\n * @param options Optional request options (headers, signal, timeoutMs)\n * @returns Promise resolving to InsurUpResult (no data)\n */\n async patchNoContent(\n path: string,\n data?: RequestBody,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.sendInternal(\n \"PATCH\",\n path,\n data,\n options,\n false,\n ) as Promise<InsurUpResult>;\n }\n\n /**\n * DELETE request expecting a response with data\n * @param path Relative path (will be prefixed with baseUrl)\n * @param options Optional request options (headers, signal, timeoutMs)\n * @returns Promise resolving to InsurUpResult<T> with response data\n */\n async delete<T>(\n path: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<T>> {\n return this.sendInternal<T>(\"DELETE\", path, null, options, true) as Promise<\n InsurUpResult<T>\n >;\n }\n\n /**\n * DELETE request expecting no response content (204 No Content)\n * @param path Relative path (will be prefixed with baseUrl)\n * @param options Optional request options (headers, signal, timeoutMs)\n * @returns Promise resolving to InsurUpResult (no data)\n */\n async deleteNoContent(\n path: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.sendInternal(\n \"DELETE\",\n path,\n null,\n options,\n false,\n ) as Promise<InsurUpResult>;\n }\n\n /**\n * Downloads a binary file as a Blob\n * Use this for downloading documents, images, or other binary content\n * @param path Relative path (will be prefixed with baseUrl)\n * @param options Optional request options (headers, signal, timeoutMs)\n * @returns Promise resolving to InsurUpResult<Blob>\n */\n async getBlob(\n path: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<Blob>> {\n const url = `${this.options.baseUrl.replace(/\\/$/, \"\")}/${path.replace(/^\\//, \"\")}`;\n const requestHeaders = await this.buildHeaders(options?.headers);\n\n // Build request config for interceptors\n let requestConfig: RequestConfig = {\n url,\n method: \"GET\",\n headers: requestHeaders,\n };\n\n // Call request interceptor if provided\n if (this.options.onRequest) {\n try {\n requestConfig = await this.options.onRequest(requestConfig);\n } catch (error) {\n if (this.options.logLevel !== \"none\") {\n this.options.logger.warn(\"Request interceptor failed:\", error);\n }\n }\n }\n\n this.logRequest(\"GET\", path, undefined, options?.headers);\n\n // Create AbortController for timeout\n const controller = new AbortController();\n const timeoutId = setTimeout(\n () => controller.abort(),\n options?.timeoutMs ?? this.options.timeoutMs,\n );\n\n // Bridge external signal (if provided) to our controller\n let signalCleanup: (() => void) | undefined;\n if (options?.signal) {\n if (options.signal.aborted) {\n controller.abort();\n } else {\n const abortHandler = () => controller.abort();\n options.signal.addEventListener(\"abort\", abortHandler, { once: true });\n signalCleanup = () =>\n options.signal!.removeEventListener(\"abort\", abortHandler);\n }\n }\n\n let response: Response;\n try {\n response = await fetch(url, {\n method: \"GET\",\n headers: requestConfig.headers,\n signal: controller.signal,\n });\n } catch (error) {\n // Cleanup is handled by finally block\n const networkError = createNetworkError(error);\n\n // Call response interceptor for errors\n if (this.options.onResponse) {\n try {\n return await this.options.onResponse(networkError, requestConfig);\n } catch (interceptorError) {\n if (this.options.logLevel !== \"none\") {\n this.options.logger.warn(\n \"Response interceptor failed:\",\n interceptorError,\n );\n }\n }\n }\n\n return networkError;\n } finally {\n clearTimeout(timeoutId);\n signalCleanup?.();\n }\n\n // Handle non-success HTTP status codes\n if (!response.ok) {\n const errorText = await response.text();\n const serverError = parseServerError(response, errorText);\n\n // Call response interceptor for errors\n if (this.options.onResponse) {\n try {\n return await this.options.onResponse(serverError, requestConfig);\n } catch (interceptorError) {\n if (this.options.logLevel !== \"none\") {\n this.options.logger.warn(\n \"Response interceptor failed:\",\n interceptorError,\n );\n }\n }\n }\n\n return serverError;\n }\n\n // Return the blob\n try {\n const blob = await response.blob();\n const result = createSuccess(blob);\n\n // Call response interceptor\n if (this.options.onResponse) {\n try {\n return await this.options.onResponse(result, requestConfig);\n } catch (interceptorError) {\n if (this.options.logLevel !== \"none\") {\n this.options.logger.warn(\n \"Response interceptor failed:\",\n interceptorError,\n );\n }\n }\n }\n\n return result;\n } catch (error) {\n const deserializationError = createDeserializationError(error);\n\n // Call response interceptor for errors\n if (this.options.onResponse) {\n try {\n return await this.options.onResponse(\n deserializationError,\n requestConfig,\n );\n } catch (interceptorError) {\n if (this.options.logLevel !== \"none\") {\n this.options.logger.warn(\n \"Response interceptor failed:\",\n interceptorError,\n );\n }\n }\n }\n\n return deserializationError;\n }\n }\n\n /**\n * Builds request headers including defaults and custom headers\n * Invokes token provider if available and adds Authorization header\n */\n private async buildHeaders(\n additionalHeaders?: Record<string, string>,\n ): Promise<Record<string, string>> {\n const headers: Record<string, string> = {\n ...this.options.customHeaders,\n ...additionalHeaders,\n };\n\n // Set User-Agent in environments where it's allowed (Node.js)\n // Use type-safe check for browser environment\n const isBrowser =\n typeof globalThis === \"object\" && \"window\" in globalThis;\n if (!isBrowser && this.options.userAgent) {\n headers[\"User-Agent\"] = this.options.userAgent;\n }\n\n // Add Authorization header if token provider is available\n if (this.options.tokenProvider) {\n try {\n const token = await this.options.tokenProvider();\n if (token) {\n headers[\"Authorization\"] = `Bearer ${token}`;\n }\n } catch (error) {\n // Log token provider error but don't fail the request\n if (this.options.logLevel !== \"none\") {\n this.options.logger.warn(\"Token provider failed:\", error);\n }\n }\n }\n\n return headers;\n }\n\n /**\n * Checks if Content-Type header is present (case-insensitive)\n */\n private hasContentTypeHeader(headers: Record<string, string>): boolean {\n return Object.keys(headers).some(\n (key) => key.toLowerCase() === \"content-type\",\n );\n }\n\n /**\n * Checks if a content type is a valid JSON content type\n */\n private isJsonContentType(contentType: string): boolean {\n const lowerContentType = contentType.toLowerCase();\n return (\n lowerContentType.includes(\"application/json\") ||\n lowerContentType.includes(\"application/vnd.api+json\") ||\n lowerContentType.includes(\"application/hal+json\") ||\n lowerContentType.includes(\"application/problem+json\") ||\n lowerContentType.includes(\"text/json\") ||\n /^application\\/.*\\+json/i.test(contentType)\n );\n }\n\n /**\n * Handles HTTP response and converts to InsurUpResult\n * @param response The fetch Response object\n * @param expectContent Whether the caller expects response data\n */\n private async handleResponse<T>(\n response: Response,\n expectContent: boolean,\n ): Promise<InsurUpResult<T> | InsurUpResult> {\n // Handle non-success HTTP status codes first\n if (!response.ok) {\n const errorText = await response.text();\n return parseServerError(response, errorText);\n }\n\n // No Content responses (204, 205)\n if (response.status === 204 || response.status === 205) {\n if (expectContent) {\n return createUnexpectedNoContentError();\n }\n return createSuccessNoContent();\n }\n\n // Get response text first to determine if it's empty\n const responseText = await response.text();\n\n // Handle empty response body\n if (!responseText.trim()) {\n if (expectContent) {\n return createUnexpectedNoContentError();\n }\n return createSuccessNoContent();\n }\n\n // For non-empty responses, validate Content-Type\n const contentType = response.headers.get(\"content-type\");\n if (contentType && !this.isJsonContentType(contentType)) {\n return createDeserializationError(\n new Error(`Expected JSON response but got ${contentType}`),\n );\n }\n\n // Parse the JSON response\n return this.parseSuccessResponse<T>(responseText);\n }\n\n /**\n * Parses successful JSON response body\n */\n private parseSuccessResponse<T>(\n responseText: string,\n ): InsurUpResult<T> | InsurUpResult {\n try {\n const data = JSON.parse(responseText) as T;\n return createSuccess(data);\n } catch (error) {\n return createDeserializationError(error);\n }\n }\n\n /**\n * Determines if a result should be retried\n */\n private shouldRetryResult(\n result: InsurUpResult<unknown> | InsurUpResult,\n ): boolean {\n if (!this.options.retry) {\n return false;\n }\n\n // Retry server errors with retryable status codes\n if (result.kind === \"server-error\") {\n return this.options.retry.retryableStatusCodes.includes(result.status);\n }\n\n // Retry client errors for network issues but not timeouts\n if (result.kind === \"client-error\") {\n return result.type === InsurUpClientErrorType.HttpRequestFailed;\n }\n\n return false;\n }\n\n /**\n * Logs outgoing request details\n */\n private logRequest(\n method: HttpMethod,\n path: string,\n body?: RequestBody,\n headers?: Record<string, string>,\n ): void {\n if (this.options.logLevel === \"none\") {\n return;\n }\n\n const url = `${this.options.baseUrl.replace(/\\/$/, \"\")}/${path.replace(/^\\//, \"\")}`;\n\n if (this.options.logLevel === \"basic\") {\n this.options.logger.info(`${method} ${url}`);\n } else if (this.options.logLevel === \"detailed\") {\n // Only compute sanitized values when detailed logging is enabled\n const sanitizedHeaders = this.sanitizeHeaders(headers);\n const sanitizedBody = this.sanitizeBody(body);\n this.options.logger.info(`Request: ${method} ${url}`, {\n headers: sanitizedHeaders,\n body: sanitizedBody,\n });\n }\n }\n\n /**\n * Logs response details\n */\n private logResponse(\n status: \"SUCCESS\" | \"ERROR\",\n duration: number,\n attempt: number,\n result: InsurUpResult<unknown> | InsurUpResult,\n ): void {\n if (this.options.logLevel === \"none\") {\n return;\n }\n\n const attemptInfo = attempt > 1 ? ` (attempt ${attempt})` : \"\";\n\n if (this.options.logLevel === \"basic\") {\n if (status === \"SUCCESS\") {\n this.options.logger.info(`${status} in ${duration}ms${attemptInfo}`);\n } else {\n this.options.logger.error(`${status} in ${duration}ms${attemptInfo}`);\n }\n } else if (this.options.logLevel === \"detailed\") {\n // Only compute sanitized values when detailed logging is enabled\n if (status === \"SUCCESS\") {\n const data =\n result.kind === \"success\" && \"data\" in result\n ? this.sanitizeResponseData(result.data)\n : undefined;\n this.options.logger.info(\n `Response: ${status} in ${duration}ms${attemptInfo}`,\n { data },\n );\n } else {\n const sanitizedError = this.sanitizeError(result);\n this.options.logger.error(\n `Response: ${status} in ${duration}ms${attemptInfo}`,\n { error: sanitizedError },\n );\n }\n }\n }\n\n /**\n * Logs retry attempt\n */\n private logRetry(\n attemptNumber: number,\n result: InsurUpResult<unknown> | InsurUpResult,\n ): void {\n if (this.options.logLevel === \"none\") {\n return;\n }\n\n const reason =\n result.kind === \"server-error\"\n ? `HTTP ${result.status}`\n : result.kind === \"client-error\"\n ? result.type\n : \"Unknown error\";\n\n this.options.logger.warn(\n `Retry attempt ${attemptNumber} failed due to: ${reason}`,\n );\n }\n\n /**\n * Sanitizes headers for logging (removes sensitive information)\n */\n private sanitizeHeaders(\n headers?: Record<string, string>,\n ): Record<string, string> | undefined {\n if (!headers) {\n return undefined;\n }\n\n const sanitized: Record<string, string> = {};\n const sensitiveHeaders = [\n \"authorization\",\n \"cookie\",\n \"x-api-key\",\n \"x-auth-token\",\n ];\n\n for (const [key, value] of Object.entries(headers)) {\n const lowerKey = key.toLowerCase();\n if (sensitiveHeaders.includes(lowerKey)) {\n sanitized[key] = \"[REDACTED]\";\n } else {\n sanitized[key] = value;\n }\n }\n\n return sanitized;\n }\n\n /**\n * Sanitizes request body for logging with memory-efficient handling\n */\n private sanitizeBody(body?: RequestBody): unknown {\n if (!body) {\n return undefined;\n }\n\n // Handle FormData\n if (body instanceof FormData) {\n return \"[FormData body]\";\n }\n\n // Handle string bodies efficiently\n if (typeof body === \"string\") {\n if (body.length > 10000) {\n return \"[Large string body - truncated for logging]\";\n }\n return body.length > 1000\n ? `${body.substring(0, 1000)}... [truncated]`\n : body;\n }\n\n // Handle primitive types\n if (typeof body === \"number\" || typeof body === \"boolean\") {\n return body;\n }\n\n // For objects/arrays, use memory-efficient serialization\n try {\n // Quick size estimation to avoid expensive stringification of large objects\n if (this.isLargeObject(body)) {\n return \"[Large object body - truncated for logging]\";\n }\n\n const stringified = JSON.stringify(body);\n return stringified.length > 1000\n ? `${stringified.substring(0, 1000)}... [truncated]`\n : body;\n } catch {\n return \"[Unable to serialize body]\";\n }\n }\n\n /**\n * Efficiently estimates if an object is large without full serialization\n */\n private isLargeObject(obj: unknown): boolean {\n if (!obj || typeof obj !== \"object\") {\n return false;\n }\n\n try {\n // Quick heuristic: count properties and nested levels\n let propertyCount = 0;\n let maxDepth = 0;\n\n const countProperties = (item: unknown, depth = 0): boolean => {\n if (depth > 3) return true; // Too deep\n if (propertyCount > 50) return true; // Too many properties\n\n maxDepth = Math.max(maxDepth, depth);\n\n if (Array.isArray(item)) {\n if (item.length > 100) return true; // Large array\n for (let i = 0; i < Math.min(item.length, 10); i++) {\n if (countProperties(item[i], depth + 1)) return true;\n }\n } else if (item && typeof item === \"object\") {\n const keys = Object.keys(item);\n propertyCount += keys.length;\n\n for (const key of keys.slice(0, 10)) {\n // Check first 10 properties\n if (\n countProperties((item as Record<string, unknown>)[key], depth + 1)\n )\n return true;\n }\n }\n\n return false;\n };\n\n return countProperties(obj);\n } catch {\n // If estimation fails, assume it might be large\n return true;\n }\n }\n\n /**\n * Sanitizes response data for logging with memory-efficient handling\n */\n private sanitizeResponseData(data: unknown): unknown {\n if (data === null || data === undefined) {\n return data;\n }\n\n try {\n // Use the same efficient large object detection\n if (this.isLargeObject(data)) {\n return \"[Large response data - truncated for logging]\";\n }\n\n const stringified = JSON.stringify(data);\n return stringified.length > 1000\n ? `${stringified.substring(0, 1000)}... [truncated]`\n : data;\n } catch {\n return \"[Unable to serialize response data]\";\n }\n }\n\n /**\n * Sanitizes error information for logging\n */\n private sanitizeError(\n result: InsurUpResult<unknown> | InsurUpResult,\n ): unknown {\n if (result.kind === \"server-error\") {\n return {\n type: result.type,\n status: result.status,\n title: result.title,\n detail: result.detail,\n traceId: result.traceId,\n };\n }\n\n if (result.kind === \"client-error\") {\n return {\n type: result.type,\n message: result.message,\n };\n }\n\n return { message: \"Unknown error type\" };\n }\n}\n","/**\n * @fileoverview GraphQL Transport Layer - Fetch-based GraphQL client\n * @description GraphQL transport with error handling and type safety\n */\n\nimport type {\n InsurUpGraphQLResult,\n GraphQLErrorItem,\n GraphQLErrorExtensions,\n GraphQLErrorLocation,\n} from \"../core/result.js\";\nimport {\n createSuccess,\n createGraphQLErrors,\n InsurUpGraphQLErrorCode,\n} from \"../core/result.js\";\nimport { createDeserializationError } from \"../core/errors.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport type { HttpTransport } from \"./http.js\";\n\n/**\n * Raw GraphQL error from the server response\n */\ninterface RawGraphQLError {\n message: string;\n locations?: Array<{ line: number; column: number }>;\n path?: (string | number)[];\n extensions?: Record<string, unknown>;\n}\n\n/**\n * GraphQL response structure\n */\nexport interface GraphQLResponse<T> {\n data?: T;\n errors?: RawGraphQLError[];\n}\n\n/**\n * GraphQL request payload\n */\nexport interface GraphQLRequest {\n query: string;\n variables?: Record<string, unknown>;\n operationName?: string;\n}\n\n/**\n * Maps a raw error code string to the InsurUpGraphQLErrorCode enum\n */\nfunction mapGraphQLErrorCode(code: unknown): InsurUpGraphQLErrorCode {\n if (typeof code !== \"string\") {\n return InsurUpGraphQLErrorCode.Unknown;\n }\n\n const upperCode = code.toUpperCase();\n\n switch (upperCode) {\n case \"FORBIDDEN\":\n return InsurUpGraphQLErrorCode.Forbidden;\n case \"UNAUTHORIZED\":\n return InsurUpGraphQLErrorCode.Unauthorized;\n case \"NOT_FOUND\":\n return InsurUpGraphQLErrorCode.NotFound;\n case \"BAD_REQUEST\":\n return InsurUpGraphQLErrorCode.BadRequest;\n case \"CONFLICT\":\n return InsurUpGraphQLErrorCode.Conflict;\n case \"NOT_SUPPORTED\":\n return InsurUpGraphQLErrorCode.NotSupported;\n case \"UPSTREAM_ERROR\":\n return InsurUpGraphQLErrorCode.UpstreamError;\n case \"INTERNAL_ERROR\":\n return InsurUpGraphQLErrorCode.InternalError;\n case \"VALIDATION_ERROR\":\n return InsurUpGraphQLErrorCode.ValidationError;\n case \"FILTER_REQUIRED\":\n return InsurUpGraphQLErrorCode.FilterRequired;\n case \"FILTER_MAX_SPAN_EXCEEDED\":\n return InsurUpGraphQLErrorCode.FilterMaxSpanExceeded;\n default:\n return InsurUpGraphQLErrorCode.Unknown;\n }\n}\n\n/**\n * Parses raw extensions into typed GraphQLErrorExtensions\n */\nfunction parseExtensions(\n raw: Record<string, unknown> | undefined,\n): GraphQLErrorExtensions | undefined {\n if (!raw) {\n return undefined;\n }\n\n const extensions: GraphQLErrorExtensions = {\n ...raw,\n code: mapGraphQLErrorCode(raw.code),\n traceId: typeof raw.traceId === \"string\" ? raw.traceId : undefined,\n codes: Array.isArray(raw.codes)\n ? (raw.codes.filter((c) => typeof c === \"string\") as string[])\n : undefined,\n template: typeof raw.template === \"string\" ? raw.template : undefined,\n templateArgs:\n typeof raw.templateArgs === \"object\" && raw.templateArgs !== null\n ? (raw.templateArgs as Record<string, unknown>)\n : undefined,\n suggestions: Array.isArray(raw.suggestions)\n ? (raw.suggestions.filter((s) => typeof s === \"string\") as string[])\n : undefined,\n };\n\n return extensions;\n}\n\n/**\n * Parses raw GraphQL errors into typed GraphQLErrorItem array\n */\nfunction parseGraphQLErrors(rawErrors: RawGraphQLError[]): GraphQLErrorItem[] {\n return rawErrors.map((error): GraphQLErrorItem => {\n const locations: GraphQLErrorLocation[] | undefined = error.locations?.map(\n (loc) => ({\n line: loc.line,\n column: loc.column,\n }),\n );\n\n return {\n message: error.message,\n locations,\n path: error.path,\n extensions: parseExtensions(error.extensions),\n };\n });\n}\n\n/**\n * GraphQL transport class providing typed query execution\n */\nexport class GraphQLTransport {\n constructor(private readonly http: HttpTransport) {}\n\n /**\n * Executes a GraphQL query or mutation\n * @param query The GraphQL query string\n * @param variables Optional variables for the query\n * @param options Optional request options\n * @returns Promise resolving to InsurUpGraphQLResult<T>\n */\n async query<T>(\n query: string,\n variables?: Record<string, unknown>,\n options?: RequestOptions,\n ): Promise<InsurUpGraphQLResult<T>> {\n const payload: GraphQLRequest = {\n query,\n variables,\n };\n\n // Use the existing HTTP transport to send the POST request\n const result = await this.http.post<GraphQLResponse<T>>(\n \"graphql\",\n payload,\n options,\n );\n\n // Handle transport-level errors (network, timeout, etc.)\n if (!result.isSuccess) {\n // Pass through both server errors and client errors\n return result as InsurUpGraphQLResult<T>;\n }\n\n const response = result.data;\n\n // Handle GraphQL-level errors\n if (response.errors && response.errors.length > 0) {\n const parsedErrors = parseGraphQLErrors(response.errors);\n return createGraphQLErrors(parsedErrors) as InsurUpGraphQLResult<T>;\n }\n\n // If no data and no errors, something is wrong with the response\n if (!response.data) {\n return createDeserializationError(\n new Error(\"GraphQL response contained no data and no errors\"),\n ) as InsurUpGraphQLResult<T>;\n }\n\n return createSuccess(response.data) as InsurUpGraphQLResult<T>;\n }\n}\n","/**\n * @fileoverview InsurUp API Endpoints - API endpoint definitions\n * @description API endpoint definitions with identical names and render functions\n */\n\n/**\n * Contact form endpoints\n */\nexport const contactForm = {\n submit: \"contact-form\",\n} as const;\n\n/**\n * Agent management endpoints\n */\nexport const agents = {\n getCurrentAgent: \"agents/me\",\n updateCurrentAgent: \"agents/me\",\n reSyncCurrentAgentWithInsurance: \"agents/me/re-sync\",\n\n insuranceCompanies: {\n getMyInsuranceCompanies: \"agents/me/insurance-companies\",\n addInsuranceCompanyToAgent: \"agents/me/insurance-companies\",\n\n getBranches: {\n definition:\n \"agents/me/insurance-companies/{AgentInsuranceCompanyId}/branches\",\n render: (agentInsuranceCompanyId: string): string =>\n \"agents/me/insurance-companies/{AgentInsuranceCompanyId}/branches\".replace(\n \"{AgentInsuranceCompanyId}\",\n encodeURIComponent(agentInsuranceCompanyId),\n ),\n },\n\n getConnection: {\n definition:\n \"agents/me/insurance-companies/{AgentInsuranceCompanyId}/connection\",\n render: (agentInsuranceCompanyId: string): string =>\n \"agents/me/insurance-companies/{AgentInsuranceCompanyId}/connection\".replace(\n \"{AgentInsuranceCompanyId}\",\n encodeURIComponent(agentInsuranceCompanyId),\n ),\n },\n\n updateConnection: {\n definition:\n \"agents/me/insurance-companies/{AgentInsuranceCompanyId}/connection\",\n render: (agentInsuranceCompanyId: string): string =>\n \"agents/me/insurance-companies/{AgentInsuranceCompanyId}/connection\".replace(\n \"{AgentInsuranceCompanyId}\",\n encodeURIComponent(agentInsuranceCompanyId),\n ),\n },\n\n updateBranches: {\n definition:\n \"agents/me/insurance-companies/{AgentInsuranceCompanyId}/branches\",\n render: (agentInsuranceCompanyId: string): string =>\n \"agents/me/insurance-companies/{AgentInsuranceCompanyId}/branches\".replace(\n \"{AgentInsuranceCompanyId}\",\n encodeURIComponent(agentInsuranceCompanyId),\n ),\n },\n\n reSyncAgentInsuranceCompanyWithInsurance: {\n definition:\n \"agents/me/insurance-companies/{AgentInsuranceCompanyId}/re-sync\",\n render: (agentInsuranceCompanyId: string): string =>\n \"agents/me/insurance-companies/{AgentInsuranceCompanyId}/re-sync\".replace(\n \"{AgentInsuranceCompanyId}\",\n encodeURIComponent(agentInsuranceCompanyId),\n ),\n },\n\n remove: {\n definition: \"agents/me/insurance-companies/{AgentInsuranceCompanyId}\",\n render: (agentInsuranceCompanyId: string): string =>\n \"agents/me/insurance-companies/{AgentInsuranceCompanyId}\".replace(\n \"{AgentInsuranceCompanyId}\",\n encodeURIComponent(agentInsuranceCompanyId),\n ),\n },\n },\n} as const;\n\n/**\n * Insurance company endpoints\n */\nexport const insuranceCompanies = {\n getInsuranceCompanies: \"insurance-companies\",\n\n getInsuranceCompanyProducts: {\n definition: \"insurance-companies/{InsuranceCompanyId}/products\",\n render: (insuranceCompanyId: number): string =>\n \"insurance-companies/{InsuranceCompanyId}/products\".replace(\n \"{InsuranceCompanyId}\",\n encodeURIComponent(insuranceCompanyId.toString()),\n ),\n },\n\n getAllProducts: \"insurance-companies/products\",\n\n connectionFields: {\n getAgentBasedConnectionFieldsByCompanyId: {\n definition:\n \"insurance-companies/{InsuranceCompanyId}/connection-fields:agent-based\",\n render: (insuranceCompanyId: number): string =>\n \"insurance-companies/{InsuranceCompanyId}/connection-fields:agent-based\".replace(\n \"{InsuranceCompanyId}\",\n encodeURIComponent(insuranceCompanyId.toString()),\n ),\n },\n },\n} as const;\n\n/**\n * Resource keys endpoints\n */\nexport const resourceKeys = {\n getAll: \"resource-keys\",\n} as const;\n\n/**\n * Customer management endpoints\n */\nexport const customers = {\n createCustomer: \"customers\",\n getCurrentCustomer: \"customers/me\",\n externalLookup: \"customers/external-lookup\",\n\n setCustomerRepresentative: {\n definition: \"customers/{CustomerId}/representative\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/representative\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n\n getCustomer: {\n definition: \"customers/{CustomerId}\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n\n updateCustomer: {\n definition: \"customers/{CustomerId}\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n\n deleteCustomer: {\n definition: \"customers/{CustomerId}\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n\n getHealthInfo: {\n definition: \"customers/{CustomerId}/health-info\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/health-info\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n\n updateHealthInfo: {\n definition: \"customers/{CustomerId}/health-info\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/health-info\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n\n emails: {\n addCustomerEmail: {\n definition: \"customers/{CustomerId}/emails\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/emails\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n\n removeCustomerEmail: {\n definition: \"customers/{CustomerId}/emails/{Email}\",\n render: (request: { customerId: string; email: string }): string =>\n \"customers/{CustomerId}/emails/{Email}\"\n .replace(\"{CustomerId}\", encodeURIComponent(request.customerId))\n .replace(\"{Email}\", encodeURIComponent(request.email)),\n },\n\n changePrimaryCustomerEmail: {\n definition: \"customers/{CustomerId}/emails/{Email}/primary\",\n render: (request: { customerId: string; email: string }): string =>\n \"customers/{CustomerId}/emails/{Email}/primary\"\n .replace(\"{CustomerId}\", encodeURIComponent(request.customerId))\n .replace(\"{Email}\", encodeURIComponent(request.email)),\n },\n\n getCustomerEmails: {\n definition: \"customers/{CustomerId}/emails\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/emails\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n },\n\n phoneNumbers: {\n addCustomerPhoneNumber: {\n definition: \"customers/{CustomerId}/phone-numbers\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/phone-numbers\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n\n removeCustomerPhoneNumber: {\n definition:\n \"customers/{CustomerId}/phone-numbers/{CountryCode}-{PhoneNumber}\",\n render: (request: {\n customerId: string;\n countryCode: number;\n phoneNumber: string;\n }): string =>\n \"customers/{CustomerId}/phone-numbers/{CountryCode}-{PhoneNumber}\"\n .replace(\"{CustomerId}\", encodeURIComponent(request.customerId))\n .replace(\n \"{CountryCode}\",\n encodeURIComponent(request.countryCode.toString()),\n )\n .replace(\"{PhoneNumber}\", encodeURIComponent(request.phoneNumber)),\n },\n\n changePrimaryCustomerPhoneNumber: {\n definition:\n \"customers/{CustomerId}/phone-numbers/{CountryCode}-{PhoneNumber}/primary\",\n render: (request: {\n customerId: string;\n countryCode: number;\n phoneNumber: string;\n }): string =>\n \"customers/{CustomerId}/phone-numbers/{CountryCode}-{PhoneNumber}/primary\"\n .replace(\"{CustomerId}\", encodeURIComponent(request.customerId))\n .replace(\n \"{CountryCode}\",\n encodeURIComponent(request.countryCode.toString()),\n )\n .replace(\"{PhoneNumber}\", encodeURIComponent(request.phoneNumber)),\n },\n\n getCustomerPhoneNumbers: {\n definition: \"customers/{CustomerId}/phone-numbers\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/phone-numbers\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n },\n\n contactFlows: {\n getCustomerContactFlows: {\n definition: \"customers/{CustomerId}/contact-flows\",\n render: (customerId: string, caseRef?: string | null): string => {\n const base = \"customers/{CustomerId}/contact-flows\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n );\n return caseRef\n ? base + \"?caseRef=\" + encodeURIComponent(caseRef)\n : base;\n },\n },\n\n createContactFlow: {\n definition: \"customers/{CustomerId}/contact-flows\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/contact-flows\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n\n endContactFlow: {\n definition: \"customers/{CustomerId}/contact-flows/{ContactFlowId}/end\",\n render: (customerId: string, contactFlowId: string): string =>\n \"customers/{CustomerId}/contact-flows/{ContactFlowId}/end\"\n .replace(\"{CustomerId}\", encodeURIComponent(customerId))\n .replace(\"{ContactFlowId}\", encodeURIComponent(contactFlowId)),\n },\n },\n\n contacts: {\n getCustomerContacts: {\n definition: \"customers/{CustomerId}/contacts\",\n render: (customerId: string, caseRef?: string | null): string => {\n const base = \"customers/{CustomerId}/contacts\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n );\n return caseRef\n ? base + \"?caseRef=\" + encodeURIComponent(caseRef)\n : base;\n },\n },\n\n create: {\n definition: \"customers/{CustomerId}/contacts\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/contacts\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n },\n\n setCustomerBranch: {\n definition: \"customers/{CustomerId}/branch\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/branch\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n\n addresses: {\n create: {\n definition: \"customers/{CustomerId}/addresses\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/addresses\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n update: {\n definition: \"customers/{CustomerId}/addresses/{AddressId}\",\n render: (customerId: string, addressId: string): string =>\n \"customers/{CustomerId}/addresses/{AddressId}\"\n .replace(\"{CustomerId}\", encodeURIComponent(customerId))\n .replace(\"{AddressId}\", encodeURIComponent(addressId)),\n },\n getById: {\n definition: \"customers/{CustomerId}/addresses/{AddressId}\",\n render: (customerId: string, addressId: string): string =>\n \"customers/{CustomerId}/addresses/{AddressId}\"\n .replace(\"{CustomerId}\", encodeURIComponent(customerId))\n .replace(\"{AddressId}\", encodeURIComponent(addressId)),\n },\n getAll: {\n definition: \"customers/{CustomerId}/addresses\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/addresses\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n delete: {\n definition: \"customers/{CustomerId}/addresses/{AddressId}\",\n render: (customerId: string, addressId: string): string =>\n \"customers/{CustomerId}/addresses/{AddressId}\"\n .replace(\"{CustomerId}\", encodeURIComponent(customerId))\n .replace(\"{AddressId}\", encodeURIComponent(addressId)),\n },\n },\n\n consents: {\n give: {\n definition: \"customers/{CustomerId}/consents\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/consents\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n revoke: {\n definition: \"customers/{CustomerId}/consents/revoke\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/consents/revoke\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n getAll: {\n definition: \"customers/{CustomerId}/consents\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/consents\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n },\n} as const;\n\n/**\n * Address parameter endpoints\n */\nexport const addressParameters = {\n queryCities: \"address-parameters/cities\",\n\n queryDistricts: {\n definition: \"address-parameters/districts\",\n render: (request: { cityReference: string }): string =>\n \"address-parameters/districts?cityReference={cityReference}\".replace(\n \"{cityReference}\",\n request.cityReference,\n ),\n },\n\n queryTowns: {\n definition: \"address-parameters/towns\",\n render: (request: { districtReference: string }): string =>\n \"address-parameters/towns?districtReference={districtReference}\".replace(\n \"{districtReference}\",\n request.districtReference,\n ),\n },\n\n queryNeighbourhoods: {\n definition: \"address-parameters/neighbourhoods\",\n render: (request: { townReference: string }): string =>\n \"address-parameters/neighbourhoods?townReference={townReference}\".replace(\n \"{townReference}\",\n request.townReference,\n ),\n },\n\n queryStreets: {\n definition: \"address-parameters/streets\",\n render: (request: { neighbourhoodReference: string }): string =>\n \"address-parameters/streets?neighbourhoodReference={neighbourhoodReference}\".replace(\n \"{neighbourhoodReference}\",\n request.neighbourhoodReference,\n ),\n },\n\n queryBuildings: {\n definition: \"address-parameters/buildings\",\n render: (request: { streetReference: string }): string =>\n \"address-parameters/buildings?streetReference={streetReference}\".replace(\n \"{streetReference}\",\n request.streetReference,\n ),\n },\n\n queryApartments: {\n definition: \"address-parameters/apartments\",\n render: (request: { buildingReference: string }): string =>\n \"address-parameters/apartments?buildingReference={buildingReference}\".replace(\n \"{buildingReference}\",\n request.buildingReference,\n ),\n },\n} as const;\n\n/**\n * Vehicle parameter endpoints\n */\nexport const vehicleParameters = {\n queryBrands: \"vehicle-parameters/brands\",\n\n queryModels: {\n definition: \"vehicle-parameters/models\",\n render: (request: { brandReference: string; year: number }): string =>\n \"vehicle-parameters/models?brandReference={brandReference}&year={year}\"\n .replace(\"{brandReference}\", encodeURIComponent(request.brandReference))\n .replace(\"{year}\", encodeURIComponent(request.year.toString())),\n },\n} as const;\n\n/**\n * Vehicle endpoints\n */\nexport const vehicles = {\n getCurrentCustomerVehicles: \"customers/me/vehicles\",\n\n externalLookup: {\n definition: \"customers/{CustomerId}/vehicles/external-lookup\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/vehicles/external-lookup\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n\n create: {\n definition: \"customers/{CustomerId}/vehicles\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/vehicles\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n\n update: {\n definition: \"customers/{CustomerId}/vehicles/{VehicleId}\",\n render: (customerId: string, vehicleId: string): string =>\n \"customers/{CustomerId}/vehicles/{VehicleId}\"\n .replace(\"{CustomerId}\", encodeURIComponent(customerId))\n .replace(\"{VehicleId}\", encodeURIComponent(vehicleId)),\n },\n\n delete: {\n definition: \"customers/{CustomerId}/vehicles/{VehicleId}\",\n render: (customerId: string, vehicleId: string): string =>\n \"customers/{CustomerId}/vehicles/{VehicleId}\"\n .replace(\"{CustomerId}\", encodeURIComponent(customerId))\n .replace(\"{VehicleId}\", encodeURIComponent(vehicleId)),\n },\n\n get: {\n definition: \"customers/{CustomerId}/vehicles/{VehicleId}\",\n render: (customerId: string, vehicleId: string): string =>\n \"customers/{CustomerId}/vehicles/{VehicleId}\"\n .replace(\"{CustomerId}\", encodeURIComponent(customerId))\n .replace(\"{VehicleId}\", encodeURIComponent(vehicleId)),\n },\n\n getCustomerVehicles: {\n definition: \"customers/{CustomerId}/vehicles\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/vehicles\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n} as const;\n\n/**\n * Insurance services endpoints\n */\nexport const insuranceServices = {\n queryVehicleByBrandCode: \"insurance-services/query-vehicle-by-brand-code\",\n} as const;\n\n/**\n * Property endpoints\n */\nexport const properties = {\n getPropertyAddressByPropertyNumber:\n \"properties/query-address-by-property-number\",\n queryPropertyByDaskOldPolicy: \"properties/query-property-by-dask-old-policy\",\n getCurrentCustomerProperties: \"customers/me/properties\",\n\n getAll: {\n definition: \"customers/{CustomerId}/properties\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/properties\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n\n create: {\n definition: \"customers/{CustomerId}/properties\",\n render: (customerId: string): string =>\n \"customers/{CustomerId}/properties\".replace(\n \"{CustomerId}\",\n encodeURIComponent(customerId),\n ),\n },\n\n getById: {\n definition: \"customers/{CustomerId}/properties/{PropertyId}\",\n render: (customerId: string, propertyId: string): string =>\n \"customers/{CustomerId}/properties/{PropertyId}\"\n .replace(\"{CustomerId}\", encodeURIComponent(customerId))\n .replace(\"{PropertyId}\", encodeURIComponent(propertyId)),\n },\n\n update: {\n definition: \"customers/{CustomerId}/properties/{PropertyId}\",\n render: (customerId: string, propertyId: string): string =>\n \"customers/{CustomerId}/properties/{PropertyId}\"\n .replace(\"{CustomerId}\", encodeURIComponent(customerId))\n .replace(\"{PropertyId}\", encodeURIComponent(propertyId)),\n },\n\n delete: {\n definition: \"customers/{CustomerId}/properties/{PropertyId}\",\n render: (customerId: string, propertyId: string): string =>\n \"customers/{CustomerId}/properties/{PropertyId}\"\n .replace(\"{CustomerId}\", encodeURIComponent(customerId))\n .replace(\"{PropertyId}\", encodeURIComponent(propertyId)),\n },\n} as const;\n\n/**\n * Proposal endpoints\n */\nexport const proposals = {\n create: \"proposals\",\n\n getProposalById: {\n definition: \"proposals/{ProposalId}\",\n render: (proposalId: string): string =>\n \"proposals/{ProposalId}\".replace(\n \"{ProposalId}\",\n encodeURIComponent(proposalId),\n ),\n },\n\n getProposalSnapshot: {\n definition: \"proposals/{ProposalId}/snapshot\",\n render: (proposalId: string): string =>\n \"proposals/{ProposalId}/snapshot\".replace(\n \"{ProposalId}\",\n encodeURIComponent(proposalId),\n ),\n },\n\n getProposalCoverage: {\n definition: \"proposals/{ProposalId}/coverage\",\n render: (proposalId: string): string =>\n \"proposals/{ProposalId}/coverage\".replace(\n \"{ProposalId}\",\n encodeURIComponent(proposalId),\n ),\n },\n\n getProposalProductCoverage: {\n definition: \"proposals/{ProposalId}/products/{ProposalProductId}/coverage\",\n render: (proposalId: string, proposalProductId: string): string =>\n \"proposals/{ProposalId}/products/{ProposalProductId}/coverage\"\n .replace(\"{ProposalId}\", encodeURIComponent(proposalId))\n .replace(\"{ProposalProductId}\", encodeURIComponent(proposalProductId)),\n },\n\n retryFailedProposalProduct: {\n definition: \"proposals/{ProposalId}/products/{ProposalProductId}/retry\",\n render: (proposalId: string, proposalProductId: string): string =>\n \"proposals/{ProposalId}/products/{ProposalProductId}/retry\"\n .replace(\"{ProposalId}\", encodeURIComponent(proposalId))\n .replace(\"{ProposalProductId}\", encodeURIComponent(proposalProductId)),\n },\n\n getProposalProductPremiumDetail: {\n definition:\n \"proposals/{ProposalId}/products/{ProposalProductId}/premium-detail/{InstallmentNumber}\",\n render: (\n proposalId: string,\n proposalProductId: string,\n installmentNumber: number,\n ): string =>\n \"proposals/{ProposalId}/products/{ProposalProductId}/premium-detail/{InstallmentNumber}\"\n .replace(\"{ProposalId}\", encodeURIComponent(proposalId))\n .replace(\"{ProposalProductId}\", encodeURIComponent(proposalProductId))\n .replace(\n \"{InstallmentNumber}\",\n encodeURIComponent(installmentNumber.toString()),\n ),\n },\n\n purchaseProposalProductSync: {\n definition:\n \"proposals/{ProposalId}/products/{ProposalProductId}/purchase/sync\",\n render: (proposalId: string, proposalProductId: string): string =>\n \"proposals/{ProposalId}/products/{ProposalProductId}/purchase/sync\"\n .replace(\"{ProposalId}\", encodeURIComponent(proposalId))\n .replace(\"{ProposalProductId}\", encodeURIComponent(proposalProductId)),\n },\n\n purchaseProposalProductAsync: {\n definition:\n \"proposals/{ProposalId}/products/{ProposalProductId}/purchase/async\",\n render: (proposalId: string, proposalProductId: string): string =>\n \"proposals/{ProposalId}/products/{ProposalProductId}/purchase/async\"\n .replace(\"{ProposalId}\", encodeURIComponent(proposalId))\n .replace(\"{ProposalProductId}\", encodeURIComponent(proposalProductId)),\n },\n\n reviseProposal: {\n definition: \"proposals/{ProposalId}/revise\",\n render: (proposalId: string): string =>\n \"proposals/{ProposalId}/revise\".replace(\n \"{ProposalId}\",\n encodeURIComponent(proposalId),\n ),\n },\n\n reviseProposalProduct: {\n definition: \"proposals/{ProposalId}/products/{ProposalProductId}/revise\",\n render: (proposalId: string, proposalProductId: string): string =>\n \"proposals/{ProposalId}/products/{ProposalProductId}/revise\"\n .replace(\"{ProposalId}\", encodeURIComponent(proposalId))\n .replace(\"{ProposalProductId}\", encodeURIComponent(proposalProductId)),\n },\n\n fetchProposalProductDocument: {\n definition: \"proposals/{ProposalId}/products/{ProposalProductId}/document\",\n render: (proposalId: string, proposalProductId: string): string =>\n \"proposals/{ProposalId}/products/{ProposalProductId}/document\"\n .replace(\"{ProposalId}\", encodeURIComponent(proposalId))\n .replace(\"{ProposalProductId}\", encodeURIComponent(proposalProductId)),\n },\n\n fetchProposalInformationFormDocument: {\n definition:\n \"proposals/{ProposalId}/products/{ProposalProductId}/information-form\",\n render: (proposalId: string, proposalProductId: string): string =>\n \"proposals/{ProposalId}/products/{ProposalProductId}/information-form\"\n .replace(\"{ProposalId}\", encodeURIComponent(proposalId))\n .replace(\"{ProposalProductId}\", encodeURIComponent(proposalProductId)),\n },\n\n sendProposalProductDocument: {\n definition:\n \"proposals/{ProposalId}/products/{ProposalProductId}/document/send\",\n render: (proposalId: string, proposalProductId: string): string =>\n \"proposals/{ProposalId}/products/{ProposalProductId}/document/send\"\n .replace(\"{ProposalId}\", encodeURIComponent(proposalId))\n .replace(\"{ProposalProductId}\", encodeURIComponent(proposalProductId)),\n },\n\n sendProposalInformationFormDocument: {\n definition:\n \"proposals/{ProposalId}/products/{ProposalProductId}/information-form/send\",\n render: (proposalId: string, proposalProductId: string): string =>\n \"proposals/{ProposalId}/products/{ProposalProductId}/information-form/send\"\n .replace(\"{ProposalId}\", encodeURIComponent(proposalId))\n .replace(\"{ProposalProductId}\", encodeURIComponent(proposalProductId)),\n },\n\n generateCompareProposalProductsPdf: {\n definition: \"proposals/{ProposalId}/products/compare-pdf\",\n render: (proposalId: string): string =>\n \"proposals/{ProposalId}/products/compare-pdf\".replace(\n \"{ProposalId}\",\n encodeURIComponent(proposalId),\n ),\n },\n\n sendCompareProposalProductsPdf: {\n definition: \"proposals/{ProposalId}/products/compare-pdf/send\",\n render: (proposalId: string): string =>\n \"proposals/{ProposalId}/products/compare-pdf/send\".replace(\n \"{ProposalId}\",\n encodeURIComponent(proposalId),\n ),\n },\n\n setProposalRepresentative: {\n definition: \"proposals/{ProposalId}/representative\",\n render: (proposalId: string): string =>\n \"proposals/{ProposalId}/representative\".replace(\n \"{ProposalId}\",\n encodeURIComponent(proposalId),\n ),\n },\n\n setProposalBranch: {\n definition: \"proposals/{ProposalId}/branch\",\n render: (proposalId: string): string =>\n \"proposals/{ProposalId}/branch\".replace(\n \"{ProposalId}\",\n encodeURIComponent(proposalId),\n ),\n },\n\n generateCustomerProposalDocumentPdf: {\n definition: \"proposals/{ProposalId}/customer-document-pdf\",\n render: (proposalId: string): string =>\n \"proposals/{ProposalId}/customer-document-pdf\".replace(\n \"{ProposalId}\",\n encodeURIComponent(proposalId),\n ),\n },\n\n getProposalConversionTrend: {\n definition: \"proposals/analytics/conversion-trend\",\n },\n} as const;\n\n/**\n * Policy endpoints\n */\nexport const policies = {\n getPolicyDetail: {\n definition: \"policies/{PolicyId}\",\n render: (policyId: string): string =>\n \"policies/{PolicyId}\".replace(\"{PolicyId}\", encodeURIComponent(policyId)),\n },\n\n fetchPolicyDocument: {\n definition: \"policies/{PolicyId}/document\",\n render: (policyId: string): string =>\n \"policies/{PolicyId}/document\".replace(\n \"{PolicyId}\",\n encodeURIComponent(policyId),\n ),\n },\n\n sendPolicyDocument: {\n definition: \"policies/{PolicyId}/document/send\",\n render: (policyId: string): string =>\n \"policies/{PolicyId}/document/send\".replace(\n \"{PolicyId}\",\n encodeURIComponent(policyId),\n ),\n },\n\n setPolicyRepresentative: {\n definition: \"policies/{PolicyId}/representative\",\n render: (policyId: string): string =>\n \"policies/{PolicyId}/representative\".replace(\n \"{PolicyId}\",\n encodeURIComponent(policyId),\n ),\n },\n\n setPolicyBranch: {\n definition: \"policies/{PolicyId}/branch\",\n render: (policyId: string): string =>\n \"policies/{PolicyId}/branch\".replace(\n \"{PolicyId}\",\n encodeURIComponent(policyId),\n ),\n },\n\n createManualPolicy: {\n definition: \"policies/manual\",\n },\n\n updateManualPolicy: {\n definition: \"policies/manual/{PolicyId}\",\n render: (policyId: string): string =>\n \"policies/manual/{PolicyId}\".replace(\n \"{PolicyId}\",\n encodeURIComponent(policyId),\n ),\n },\n\n getPolicyCountAndPremiumAnalytics: {\n definition: \"policies/analytics/count-and-premium\",\n },\n\n getPolicyRenewalAnalytics: {\n definition: \"policies/analytics/renewal\",\n },\n\n getPolicyDistributionByBranch: {\n definition: \"policies/analytics/distribution-by-branch\",\n },\n\n getRepresentativeEarningsAnalytics: {\n definition: \"policies/analytics/representative-earnings\",\n },\n} as const;\n\n/**\n * Policy transfer endpoints\n */\nexport const policyTransfers = {\n create: \"policy-transfers\",\n\n getPolicyTransferDetail: {\n definition: \"policy-transfers/{PolicyTransferId}\",\n render: (policyTransferId: string): string =>\n \"policy-transfers/{PolicyTransferId}\".replace(\n \"{PolicyTransferId}\",\n encodeURIComponent(policyTransferId),\n ),\n },\n\n getPolicyTransferTriggerDetail: {\n definition:\n \"policy-transfers/{PolicyTransferId}/triggers/{PolicyTransferTriggerId}\",\n render: (\n policyTransferId: string,\n policyTransferTriggerId: string,\n ): string =>\n \"policy-transfers/{PolicyTransferId}/triggers/{PolicyTransferTriggerId}\"\n .replace(\"{PolicyTransferId}\", encodeURIComponent(policyTransferId))\n .replace(\n \"{PolicyTransferTriggerId}\",\n encodeURIComponent(policyTransferTriggerId),\n ),\n },\n\n triggerPolicyTransfer: {\n definition: \"policy-transfers/{PolicyTransferId}/trigger\",\n render: (policyTransferId: string): string =>\n \"policy-transfers/{PolicyTransferId}/trigger\".replace(\n \"{PolicyTransferId}\",\n encodeURIComponent(policyTransferId),\n ),\n },\n} as const;\n\n/**\n * File policy transfer endpoints\n */\nexport const filePolicyTransfers = {\n create: \"file-policy-transfers\",\n\n getFilePolicyTransferDetail: {\n definition: \"file-policy-transfers/{FilePolicyTransferId}\",\n render: (filePolicyTransferId: string): string =>\n \"file-policy-transfers/{FilePolicyTransferId}\".replace(\n \"{FilePolicyTransferId}\",\n encodeURIComponent(filePolicyTransferId),\n ),\n },\n} as const;\n\n/**\n * Coverage choice endpoints\n */\nexport const coverageChoices = {\n getKaskoCoverageChoices: {\n definition: \"coverage-choices:kasko\",\n render: (vehicleUtilizationStyle?: string): string =>\n vehicleUtilizationStyle !== undefined\n ? \"coverage-choices:kasko?vehicleUtilizationStyle={vehicleUtilizationStyle}\".replace(\n \"{vehicleUtilizationStyle}\",\n encodeURIComponent(vehicleUtilizationStyle),\n )\n : \"coverage-choices:kasko\",\n },\n\n getKonutCoverageChoices: {\n definition: \"coverage-choices:konut\",\n render: (): string => \"coverage-choices:konut\",\n },\n\n getImmCoverageChoices: {\n definition: \"coverage-choices:imm\",\n render: (): string => \"coverage-choices:imm\",\n },\n\n getTssCoverageChoices: {\n definition: \"coverage-choices:tss\",\n render: (): string => \"coverage-choices:tss\",\n },\n} as const;\n\n/**\n * Agent setup request endpoints\n */\nexport const agentSetupRequests = {\n complete: \"agent-setup-requests/complete\",\n create: \"agent-setup-requests\",\n getAll: \"agent-setup-requests\",\n enter: \"agent-setup-requests/enter\",\n\n getAgentSetupRequestById: {\n definition: \"agent-setup-requests/{Id}\",\n render: (id: string): string =>\n \"agent-setup-requests/{Id}\".replace(\"{Id}\", encodeURIComponent(id)),\n },\n\n disableAgentSetupRequest: {\n definition: \"agent-setup-requests/{Id}/disable\",\n render: (id: string): string =>\n \"agent-setup-requests/{Id}/disable\".replace(\n \"{Id}\",\n encodeURIComponent(id),\n ),\n },\n} as const;\n\n/**\n * Agent user endpoints\n */\nexport const agentUsers = {\n forgotPassword: \"agent-users/forgot-password\",\n resetPassword: \"agent-users/reset-password\",\n checkAgentUserForgotPasswordToken: \"agent-users/check-forgot-password-token\",\n me: \"agent-users/me\",\n meRobotCode: \"agent-users/me/robot-code\",\n invite: \"agent-users/invite\",\n updateMyUser: \"agent-users/me\",\n acceptInvite: \"agent-users/accept-invite\",\n updatePassword: \"agent-users/me/password\",\n\n reSendInvite: {\n definition: \"agent-users/{AgentUserId}/re-send-invite\",\n render: (userId: string): string =>\n \"agent-users/{AgentUserId}/re-send-invite\".replace(\n \"{AgentUserId}\",\n encodeURIComponent(userId),\n ),\n },\n\n deactivate: {\n definition: \"agent-users/{AgentUserId}/deactivate\",\n render: (userId: string): string =>\n \"agent-users/{AgentUserId}/deactivate\".replace(\n \"{AgentUserId}\",\n encodeURIComponent(userId),\n ),\n },\n\n activate: {\n definition: \"agent-users/{AgentUserId}/activate\",\n render: (userId: string): string =>\n \"agent-users/{AgentUserId}/activate\".replace(\n \"{AgentUserId}\",\n encodeURIComponent(userId),\n ),\n },\n\n delete: {\n definition: \"agent-users/{UserId}\",\n render: (userId: string): string =>\n \"agent-users/{UserId}\".replace(\"{UserId}\", encodeURIComponent(userId)),\n },\n\n getById: {\n definition: \"agent-users/{UserId}\",\n render: (userId: string): string =>\n \"agent-users/{UserId}\".replace(\"{UserId}\", encodeURIComponent(userId)),\n },\n\n checkAgentUserInviteCode: {\n definition: \"agent-users/check-invite-code\",\n render: (code: string): string =>\n \"agent-users/check-invite-code?code={code}\".replace(\n \"{code}\",\n encodeURIComponent(code),\n ),\n },\n\n update: {\n definition: \"agent-users/{Id}\",\n render: (userId: string): string =>\n \"agent-users/{Id}\".replace(\"{Id}\", encodeURIComponent(userId)),\n },\n\n migrate: {\n definition: \"agent-users/{AgentUserId}/migrate\",\n render: (agentUserId: string): string =>\n \"agent-users/{AgentUserId}/migrate\".replace(\n \"{AgentUserId}\",\n encodeURIComponent(agentUserId),\n ),\n },\n\n migrateAll: \"agent-users/migrate-all\",\n} as const;\n\n/**\n * Agent role endpoints\n */\nexport const agentRoles = {\n getAll: \"agent-roles\",\n create: \"agent-roles\",\n\n update: {\n definition: \"agent-roles/{Id}\",\n render: (agentRoleId: string): string =>\n \"agent-roles/{Id}\".replace(\"{Id}\", encodeURIComponent(agentRoleId)),\n },\n\n delete: {\n definition: \"agent-roles/{Id}\",\n render: (agentRoleId: string): string =>\n \"agent-roles/{Id}\".replace(\"{Id}\", encodeURIComponent(agentRoleId)),\n },\n\n getById: {\n definition: \"agent-roles/{Id}\",\n render: (agentRoleId: string): string =>\n \"agent-roles/{Id}\".replace(\"{Id}\", encodeURIComponent(agentRoleId)),\n },\n} as const;\n\n/**\n * Webhook endpoints\n */\nexport const webhooks = {\n getAll: \"webhooks\",\n create: \"webhooks\",\n\n getById: {\n definition: \"webhooks/{Id}\",\n render: (id: string): string =>\n \"webhooks/{Id}\".replace(\"{Id}\", encodeURIComponent(id)),\n },\n\n update: {\n definition: \"webhooks/{Id}\",\n render: (id: string): string =>\n \"webhooks/{Id}\".replace(\"{Id}\", encodeURIComponent(id)),\n },\n\n delete: {\n definition: \"webhooks/{Id}\",\n render: (id: string): string =>\n \"webhooks/{Id}\".replace(\"{Id}\", encodeURIComponent(id)),\n },\n\n deliveries: {\n getById: {\n definition: \"webhooks/{WebhookId}/deliveries/{WebhookDeliveryId}\",\n render: (webhookId: string, webhookDeliveryId: string): string =>\n \"webhooks/{WebhookId}/deliveries/{WebhookDeliveryId}\"\n .replace(\"{WebhookId}\", encodeURIComponent(webhookId))\n .replace(\n \"{WebhookDeliveryId}\",\n encodeURIComponent(webhookDeliveryId),\n ),\n },\n\n redeliver: {\n definition:\n \"webhooks/{WebhookId}/deliveries/{WebhookDeliveryId}/redeliver\",\n render: (webhookId: string, webhookDeliveryId: string): string =>\n \"webhooks/{WebhookId}/deliveries/{WebhookDeliveryId}/redeliver\"\n .replace(\"{WebhookId}\", encodeURIComponent(webhookId))\n .replace(\n \"{WebhookDeliveryId}\",\n encodeURIComponent(webhookDeliveryId),\n ),\n },\n },\n} as const;\n\n/**\n * Case management endpoints\n */\nexport const cases = {\n createNewSaleOpportunity: \"cases:new-sale-opportunity\",\n createCrossSaleOpportunity: \"cases:cross-sale-opportunity\",\n createCancel: \"cases:cancel\",\n createEndorsement: \"cases:endorsement\",\n createComplaint: \"cases:complaint\",\n\n assignRepresentative: {\n definition: \"cases/{Ref}/representative\",\n render: (ref: string): string =>\n \"cases/{Ref}/representative\".replace(\"{Ref}\", encodeURIComponent(ref)),\n },\n\n addNoteToCase: {\n definition: \"cases/{Ref}/notes\",\n render: (ref: string): string =>\n \"cases/{Ref}/notes\".replace(\"{Ref}\", encodeURIComponent(ref)),\n },\n\n changeChannel: {\n definition: \"cases/{Ref}/channel\",\n render: (ref: string): string =>\n \"cases/{Ref}/channel\".replace(\"{Ref}\", encodeURIComponent(ref)),\n },\n\n changeState: {\n definition: \"cases/{Ref}/state\",\n render: (ref: string): string =>\n \"cases/{Ref}/state\".replace(\"{Ref}\", encodeURIComponent(ref)),\n },\n\n getActivities: {\n definition: \"cases/{Ref}/activities\",\n render: (ref: string): string =>\n \"cases/{Ref}/activities\".replace(\"{Ref}\", encodeURIComponent(ref)),\n },\n\n getCaseByRef: {\n definition: \"cases/{Ref}\",\n render: (ref: string): string =>\n \"cases/{Ref}\".replace(\"{Ref}\", encodeURIComponent(ref)),\n },\n\n getProposals: {\n definition: \"cases/{Ref}/proposals\",\n render: (ref: string): string =>\n \"cases/{Ref}/proposals\".replace(\"{Ref}\", encodeURIComponent(ref)),\n },\n\n getPolicies: {\n definition: \"cases/{Ref}/policies\",\n render: (ref: string): string =>\n \"cases/{Ref}/policies\".replace(\"{Ref}\", encodeURIComponent(ref)),\n },\n\n setAsset: {\n definition: \"cases/{Ref}/asset\",\n render: (ref: string): string =>\n \"cases/{Ref}/asset\".replace(\"{Ref}\", encodeURIComponent(ref)),\n },\n\n setBranch: {\n definition: \"cases/{Ref}/branch\",\n render: (ref: string): string =>\n \"cases/{Ref}/branch\".replace(\"{Ref}\", encodeURIComponent(ref)),\n },\n\n getSalesOpportunityFunnelAnalytics: {\n definition: \"cases/analytics/sales-opportunity-funnel\",\n },\n\n getOpenCaseBacklogPivotAnalytics: {\n definition: \"cases/analytics/open-case-backlog-pivot\",\n },\n\n getFailedCasesReasonDistribution: {\n definition: \"cases/analytics/failed-cases-reason-distribution\",\n },\n\n communicationAutomations: {\n getAll: \"cases/communication-automations\",\n },\n\n getPriorityTemplates: \"cases/priority-templates\",\n} as const;\n\n/**\n * Coverage Groups endpoints for managing insurance coverage groups\n * Sigorta teminat gruplarını yönetmek için teminat grupları endpoint'leri\n */\nexport const coverageGroups = {\n getAll: \"coverage-groups\",\n create: \"coverage-groups\",\n\n update: {\n definition: \"coverage-groups/{Id}\",\n render: (id: string): string =>\n \"coverage-groups/{Id}\".replace(\"{Id}\", encodeURIComponent(id)),\n },\n\n delete: {\n definition: \"coverage-groups/{Id}\",\n render: (id: string): string =>\n \"coverage-groups/{Id}\".replace(\"{Id}\", encodeURIComponent(id)),\n },\n\n getById: {\n definition: \"coverage-groups/{Id}\",\n render: (id: string): string =>\n \"coverage-groups/{Id}\".replace(\"{Id}\", encodeURIComponent(id)),\n },\n} as const;\n\n/**\n * Release Notes endpoints\n */\nexport const releaseNotes = {\n getAll: \"release-notes\",\n} as const;\n\n/**\n * Banks endpoints\n */\nexport const banks = {\n getAll: \"banks\",\n\n getBranches: {\n definition: \"banks/{BankId}/branches\",\n render: (bankId: string): string =>\n \"banks/{BankId}/branches\".replace(\"{BankId}\", encodeURIComponent(bankId)),\n },\n} as const;\n\n/**\n * Financial Institutions endpoints\n */\nexport const financialInstitutions = {\n getAll: \"financial-institutions\",\n} as const;\n\n/**\n * Agent Branches endpoints\n */\nexport const agentBranches = {\n getAll: \"agent-branches\",\n create: \"agent-branches\",\n getById: {\n definition: \"agent-branches/{Id}\",\n render: (id: string): string =>\n \"agent-branches/{Id}\".replace(\"{Id}\", encodeURIComponent(id)),\n },\n update: {\n definition: \"agent-branches/{Id}\",\n render: (id: string): string =>\n \"agent-branches/{Id}\".replace(\"{Id}\", encodeURIComponent(id)),\n },\n delete: {\n definition: \"agent-branches/{Id}\",\n render: (id: string): string =>\n \"agent-branches/{Id}\".replace(\"{Id}\", encodeURIComponent(id)),\n },\n} as const;\n\n/**\n * Files endpoints\n */\nexport const files = {\n uploadPublicFile: \"files/upload-public\",\n} as const;\n\n/**\n * Languages endpoints\n */\nexport const languages = {\n getAll: \"languages\",\n} as const;\n\n/**\n * Templates endpoints\n */\nexport const templates = {\n getDefinitions: \"templates/definitions\",\n getAll: \"templates\",\n getByKey: {\n definition: \"templates/{Key}\",\n render: (key: string): string =>\n \"templates/{Key}\".replace(\"{Key}\", encodeURIComponent(key)),\n },\n update: {\n definition: \"templates/{Key}\",\n render: (key: string): string =>\n \"templates/{Key}\".replace(\"{Key}\", encodeURIComponent(key)),\n },\n delete: {\n definition: \"templates/{Key}\",\n render: (key: string): string =>\n \"templates/{Key}\".replace(\"{Key}\", encodeURIComponent(key)),\n },\n} as const;\n\n/**\n * B2C Configuration endpoints\n */\nexport const b2c = {\n configFields: {\n getAll: \"b2c/config-fields\",\n updateAll: \"b2c/config-fields\",\n },\n} as const;\n\n/**\n * Main endpoints export object\n */\nexport const endpoints = {\n customers,\n vehicles,\n vehicleParameters,\n insuranceServices,\n agents,\n insuranceCompanies,\n resourceKeys,\n releaseNotes,\n banks,\n financialInstitutions,\n policies,\n policyTransfers,\n filePolicyTransfers,\n cases,\n coverageGroups,\n webhooks,\n agentBranches,\n files,\n languages,\n templates,\n b2c,\n proposals,\n} as const;\n","import type { HttpTransport } from \"../client/http.js\";\nimport type { InsurUpResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport { agents } from \"../core/endpoints.js\";\nimport type {\n GetCurrentAgentResult,\n UpdateCurrentAgentRequest,\n GetMyAgentInsuranceCompaniesResult,\n GetAgentInsuranceCompanyBranchesResult,\n GetAgentInsuranceCompanyConnectionResult,\n AddInsuranceCompanyToAgentRequest,\n UpdateAgentInsuranceCompanyConnectionRequest,\n UpdateAgentInsuranceCompanyBranchesRequest,\n ReSyncAgentInsuranceCompanyWithInsuranceRequest,\n GetB2CConfigFieldsResult,\n UpdateB2CConfigFieldsRequest,\n} from \"@insurup/contracts\";\nimport { b2c } from \"../core/endpoints.js\";\n\n/**\n * Provides agent management operations for the InsurUp platform, enabling agents to manage their profile,\n * insurance company connections, and business relationships within the insurance ecosystem.\n *\n * InsurUp platformunda acente yönetimi işlemlerini sağlar; acentelerin profilerini, sigorta şirketi\n * bağlantılarını ve sigorta ekosistemi içindeki iş ilişkilerini yönetmelerine olanak tanır.\n */\nexport class InsurUpAgentClient {\n constructor(private readonly http: HttpTransport) {}\n\n /**\n * Retrieves the current agent's profile information including business details and configuration settings.\n *\n * Mevcut acentenin iş detayları ve yapılandırma ayarları dahil profil bilgilerini getirir.\n *\n * @returns Agent profile information / Acente profil bilgileri\n */\n async getCurrentAgent(\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCurrentAgentResult>> {\n return this.http.get<GetCurrentAgentResult>(\n agents.getCurrentAgent,\n options,\n );\n }\n\n /**\n * Updates the current agent's profile information such as business details, contact information, and operational preferences.\n *\n * Mevcut acentenin iş detayları, iletişim bilgileri ve operasyonel tercihleri gibi profil bilgilerini günceller.\n *\n * @param request Agent profile update data / Acente profil güncelleme verileri\n * @returns Operation result / İşlem sonucu\n */\n async updateCurrentAgent(\n request: UpdateCurrentAgentRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.putNoContent(agents.updateCurrentAgent, request, options);\n }\n\n /**\n * Retrieves all insurance companies that the current agent is affiliated with or has authorization to work with.\n *\n * Mevcut acentenin bağlı olduğu veya çalışma yetkisine sahip olduğu tüm sigorta şirketlerini getirir.\n *\n * @returns List of agent's insurance companies / Acentenin sigorta şirketleri listesi\n */\n async getAgentInsuranceCompaniesAsync(\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetMyAgentInsuranceCompaniesResult[]>> {\n return this.http.get<GetMyAgentInsuranceCompaniesResult[]>(\n agents.insuranceCompanies.getMyInsuranceCompanies,\n options,\n );\n }\n\n /**\n * Retrieves the available product branches (Kasko, TSS, IMM, DASK, etc.) for a specific insurance company that the agent can offer.\n *\n * Acentenin sunabileceği belirli bir sigorta şirketi için mevcut ürün dallarını (Kasko, TSS, İMM, DASK, vb.) getirir.\n *\n * @param agentInsuranceCompanyId Insurance company relationship identifier / Sigorta şirketi ilişki tanımlayıcısı\n * @returns Available product branches / Mevcut ürün dalları\n */\n async getAgentInsuranceCompanyBranchesAsync(\n agentInsuranceCompanyId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetAgentInsuranceCompanyBranchesResult[]>> {\n const endpoint = agents.insuranceCompanies.getBranches.render(\n agentInsuranceCompanyId,\n );\n return this.http.get<GetAgentInsuranceCompanyBranchesResult[]>(\n endpoint,\n options,\n );\n }\n\n /**\n * Retrieves the technical connection configuration and credentials for integrating with a specific insurance company's systems.\n *\n * Belirli bir sigorta şirketinin sistemleri ile entegrasyon için teknik bağlantı yapılandırması ve kimlik bilgilerini getirir.\n *\n * @param agentInsuranceCompanyId Insurance company relationship identifier / Sigorta şirketi ilişki tanımlayıcısı\n * @returns Connection configuration details / Bağlantı yapılandırma detayları\n */\n async getAgentInsuranceCompanyConnectionAsync(\n agentInsuranceCompanyId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetAgentInsuranceCompanyConnectionResult>> {\n const endpoint = agents.insuranceCompanies.getConnection.render(\n agentInsuranceCompanyId,\n );\n return this.http.get<GetAgentInsuranceCompanyConnectionResult>(\n endpoint,\n options,\n );\n }\n\n /**\n * Establishes a new business relationship between the agent and an insurance company, enabling the agent to offer that company's products.\n *\n * Acente ile sigorta şirketi arasında yeni bir iş ilişkisi kurar ve acentenin o şirketin ürünlerini sunmasına olanak tanır.\n *\n * @param request Insurance company association request / Sigorta şirketi ilişkilendirme talebi\n * @returns Operation result / İşlem sonucu\n */\n async addAgentInsuranceCompany(\n request: AddInsuranceCompanyToAgentRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n agents.insuranceCompanies.addInsuranceCompanyToAgent,\n request,\n options,\n );\n }\n\n /**\n * Removes the business relationship between the agent and an insurance company, terminating the agent's ability to offer that company's products.\n *\n * Acente ile sigorta şirketi arasındaki iş ilişkisini kaldırır ve acentenin o şirketin ürünlerini sunma yeteneğini sonlandırır.\n *\n * @param agentInsuranceCompanyId Insurance company relationship identifier to remove / Kaldırılacak sigorta şirketi ilişki tanımlayıcısı\n * @returns Operation result / İşlem sonucu\n */\n async removeAgentInsuranceCompany(\n agentInsuranceCompanyId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = agents.insuranceCompanies.remove.render(\n agentInsuranceCompanyId,\n );\n return this.http.deleteNoContent(endpoint, options);\n }\n\n /**\n * Updates the technical connection settings and credentials for integrating with an insurance company's API or systems.\n *\n * Bir sigorta şirketinin API'si veya sistemleri ile entegrasyon için teknik bağlantı ayarları ve kimlik bilgilerini günceller.\n *\n * @param request Connection configuration update request / Bağlantı yapılandırma güncelleme talebi\n * @returns Operation result / İşlem sonucu\n */\n async updateAgentInsuranceCompanyConnection(\n request: UpdateAgentInsuranceCompanyConnectionRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = agents.insuranceCompanies.updateConnection.render(\n request.agentInsuranceCompanyId,\n );\n return this.http.putNoContent(endpoint, request, options);\n }\n\n /**\n * Updates which product branches (Kasko, TSS, IMM, DASK, etc.) the agent is authorized to offer for a specific insurance company.\n *\n * Acentenin belirli bir sigorta şirketi için hangi ürün dallarını (Kasko, TSS, İMM, DASK, vb.) sunma yetkisine sahip olduğunu günceller.\n *\n * @param request Branch authorization update request / Şube yetkilendirme güncelleme talebi\n * @returns Operation result / İşlem sonucu\n */\n async updateAgentInsuranceCompanyBranches(\n request: UpdateAgentInsuranceCompanyBranchesRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = agents.insuranceCompanies.updateBranches.render(\n request.agentInsuranceCompanyId,\n );\n return this.http.putNoContent(endpoint, request, options);\n }\n\n /**\n * Re-synchronizes the agent's configuration and authorizations with the insurance company's systems to ensure data consistency and updated permissions.\n *\n * Veri tutarlılığını ve güncellenmiş izinleri sağlamak için acentenin yapılandırması ve yetkilendirmelerini sigorta şirketinin sistemleri ile yeniden senkronize eder.\n *\n * @param request Re-synchronization request details / Yeniden senkronizasyon talep detayları\n * @returns Operation result / İşlem sonucu\n */\n async reSyncAgentInsuranceCompanyWithInsurance(\n request: ReSyncAgentInsuranceCompanyWithInsuranceRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint =\n agents.insuranceCompanies.reSyncAgentInsuranceCompanyWithInsurance.render(\n request.agentInsuranceCompanyId,\n );\n return this.http.postNoContent(endpoint, request, options);\n }\n\n /**\n * Retrieves all B2C configuration fields that define the customizable settings and parameters for the agent's customer-facing interface.\n *\n * Acentenin müşteriye yönelik arayüzü için özelleştirilebilir ayarları ve parametreleri tanımlayan tüm B2C yapılandırma alanlarını getirir.\n *\n * @returns List of B2C configuration fields\n */\n async getB2CConfigFields(\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetB2CConfigFieldsResult>> {\n return this.http.get<GetB2CConfigFieldsResult>(\n b2c.configFields.getAll,\n options,\n );\n }\n\n /**\n * Updates all B2C configuration fields at once, allowing agents to customize their customer-facing interface settings and branding parameters.\n *\n * Tüm B2C yapılandırma alanlarını bir kerede günceller, acentelerin müşteriye yönelik arayüz ayarlarını ve marka parametrelerini özelleştirmelerine olanak tanır.\n *\n * @param request B2C configuration fields update data\n * @returns Operation result\n */\n async updateB2CConfigFields(\n request: UpdateB2CConfigFieldsRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.putNoContent(b2c.configFields.updateAll, request, options);\n }\n}\n","/**\n * @fileoverview Agent Branch Client - Agent branch management operations\n * @description Provides branch management operations for insurance agents\n */\n\nimport type { HttpTransport } from \"../client/http.js\";\nimport type { InsurUpResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport { agentBranches } from \"../core/endpoints.js\";\nimport type {\n CreateAgentBranchRequest,\n UpdateAgentBranchRequest,\n DeleteAgentBranchRequest,\n GetAgentBranchResult,\n GetAllAgentBranchesResult,\n} from \"@insurup/contracts\";\n\n/**\n * Provides branch management operations for insurance agents, enabling the creation and administration\n * of organizational branches within agency structures.\n */\nexport class InsurUpAgentBranchClient {\n constructor(private readonly http: HttpTransport) {}\n\n /**\n * Creates a new agent branch within the agency structure with optional parent branch relationship.\n *\n * Acente yapısı içinde isteğe bağlı üst şube ilişkisi ile yeni bir acente şubesi oluşturur.\n *\n * @param request Branch creation request with name and optional parent\n * @returns Created branch details\n */\n async createAgentBranch(\n request: CreateAgentBranchRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<string>> {\n return this.http.post<string>(agentBranches.create, request, options);\n }\n\n /**\n * Retrieves detailed information about a specific agent branch including its parent relationship.\n *\n * Belirli bir acente şubesi hakkında üst şube ilişkisi dahil detaylı bilgileri getirir.\n *\n * @param id Unique identifier of the agent branch\n * @returns Agent branch details\n */\n async getAgentBranchById(\n id: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetAgentBranchResult>> {\n const endpoint = agentBranches.getById.render(id);\n return this.http.get<GetAgentBranchResult>(endpoint, options);\n }\n\n /**\n * Retrieves all available agent branches within the current agency, showing the complete branch hierarchy.\n *\n * Mevcut acente içindeki tüm kullanılabilir acente şubelerini getirir ve tam şube hiyerarşisini gösterir.\n *\n * @returns List of all agent branches\n */\n async getAgentBranches(\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetAllAgentBranchesResult[]>> {\n return this.http.get<GetAllAgentBranchesResult[]>(\n agentBranches.getAll,\n options,\n );\n }\n\n /**\n * Updates an existing agent branch's name or parent branch relationship to reflect changing organizational needs.\n *\n * Değişen organizasyonel ihtiyaçları yansıtmak için mevcut bir acente şubesinin adını veya üst şube ilişkisini günceller.\n *\n * @param request Branch update request with modified details\n * @returns Operation result\n */\n async updateAgentBranch(\n request: UpdateAgentBranchRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = agentBranches.update.render(request.id);\n return this.http.putNoContent(endpoint, request, options);\n }\n\n /**\n * Removes an agent branch from the agency structure. The branch must not have any child branches.\n *\n * Acente yapısından bir acente şubesini kaldırır. Şubenin alt şubeleri olmamalıdır.\n *\n * @param request Branch deletion request\n * @returns Operation result\n */\n async deleteAgentBranch(\n request: DeleteAgentBranchRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = agentBranches.delete.render(request.id);\n return this.http.deleteNoContent(endpoint, options);\n }\n}\n","import type { HttpTransport } from \"../client/http.js\";\nimport type { InsurUpResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport { agentRoles } from \"../core/endpoints.js\";\nimport type {\n CreateAgentRoleRequest,\n UpdateAgentRoleRequest,\n DeleteAgentRoleRequest,\n GetAgentRoleByIdResult,\n GetAllAgentRolesResult,\n} from \"@insurup/contracts\";\n\n/**\n * Provides role management operations for insurance agents, enabling the creation and administration\n * of role-based access control within agency hierarchies and permission structures.\n *\n * Sigorta acenteleri için rol yönetimi işlemlerini sağlar; acente hiyerarşileri ve izin yapıları\n * içinde rol tabanlı erişim kontrolünün oluşturulması ve yönetimini mümkün kılar.\n */\nexport class InsurUpAgentRoleClient {\n constructor(private readonly http: HttpTransport) {}\n\n /**\n * Creates a new agent role with specified permissions and access levels for use within the agency structure.\n *\n * Acente yapısı içinde kullanım için belirtilen izinler ve erişim seviyeleri ile yeni bir acente rolü oluşturur.\n *\n * @param request Role creation request with permissions and configurations / İzinler ve yapılandırmalar ile rol oluşturma talebi\n * @returns Operation result / İşlem sonucu\n */\n async createAgentRole(\n request: CreateAgentRoleRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(agentRoles.create, request, options);\n }\n\n /**\n * Retrieves detailed information about a specific agent role including its permissions and access configurations.\n *\n * Belirli bir acente rolü hakkında izinleri ve erişim yapılandırmaları dahil detaylı bilgileri getirir.\n *\n * @param id Unique identifier of the agent role / Acente rolünün benzersiz tanımlayıcısı\n * @returns Agent role details / Acente rolü detayları\n */\n async getAgentRoleById(\n id: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetAgentRoleByIdResult>> {\n const endpoint = agentRoles.getById.render(id);\n return this.http.get<GetAgentRoleByIdResult>(endpoint, options);\n }\n\n /**\n * Retrieves all available agent roles within the current agency, showing the complete role hierarchy and permissions structure.\n *\n * Mevcut acente içindeki tüm kullanılabilir acente rollerini getirir ve tam rol hiyerarşisi ile izin yapısını gösterir.\n *\n * @returns List of all agent roles / Tüm acente rolleri listesi\n */\n async getAgentRoles(\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetAllAgentRolesResult[]>> {\n return this.http.get<GetAllAgentRolesResult[]>(agentRoles.getAll, options);\n }\n\n /**\n * Updates an existing agent role's permissions, access levels, or configuration settings to reflect changing organizational needs.\n *\n * Değişen organizasyonel ihtiyaçları yansıtmak için mevcut bir acente rolünün izinlerini, erişim seviyelerini veya yapılandırma ayarlarını günceller.\n *\n * @param request Role update request with modified permissions / Değiştirilmiş izinlerle rol güncelleme talebi\n * @returns Operation result / İşlem sonucu\n */\n async updateAgentRole(\n request: UpdateAgentRoleRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = agentRoles.update.render(request.id);\n return this.http.putNoContent(endpoint, request, options);\n }\n\n /**\n * Removes an agent role from the agency structure, ensuring proper cleanup of associated permissions and user assignments.\n *\n * Acente yapısından bir acente rolünü kaldırır ve ilişkili izinlerin ve kullanıcı atamalarının düzgün temizlenmesini sağlar.\n *\n * @param request Role deletion request / Rol silme talebi\n * @returns Operation result / İşlem sonucu\n */\n async deleteAgentRole(\n request: DeleteAgentRoleRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = agentRoles.delete.render(request.id);\n return this.http.deleteNoContent(endpoint, options);\n }\n}\n","import type { HttpTransport } from \"../client/http.js\";\nimport type { InsurUpResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport { agentSetupRequests } from \"../core/endpoints.js\";\nimport type {\n EnterAgentSetupRequestRequest,\n EnterAgentSetupRequestResult,\n CompleteAgentSetupRequestRequest,\n} from \"@insurup/contracts\";\n\n/**\n * Provides agent onboarding and setup operations for new insurance agents joining the InsurUp platform,\n * facilitating the complete registration and configuration process required for business operations.\n *\n * InsurUp platformuna katılan yeni sigorta acenteleri için acente katılım ve kurulum işlemlerini sağlar;\n * iş operasyonları için gereken tam kayıt ve yapılandırma sürecini kolaylaştırır.\n */\nexport class InsurUpAgentSetupClient {\n constructor(private readonly http: HttpTransport) {}\n\n /**\n * Initiates the agent setup process by submitting initial business information and required documentation for platform registration.\n *\n * Platform kaydı için ilk iş bilgilerini ve gerekli dokümantasyonu sunarak acente kurulum sürecini başlatır.\n *\n * @param request Agent setup initiation request with business details / İş detayları ile acente kurulum başlatma talebi\n * @returns Setup process identifier and next steps / Kurulum süreci tanımlayıcısı ve sonraki adımlar\n */\n async enterAgentSetupRequest(\n request: EnterAgentSetupRequestRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<EnterAgentSetupRequestResult>> {\n return this.http.post<EnterAgentSetupRequestResult>(\n agentSetupRequests.enter,\n request,\n options,\n );\n }\n\n /**\n * Finalizes the agent setup process by confirming all requirements are met and activating the agent's platform access.\n *\n * Tüm gereksinimlerin karşılandığını onaylayarak ve acentenin platform erişimini aktive ederek acente kurulum sürecini sonlandırır.\n *\n * @param request Setup completion request with final confirmations / Son onaylar ile kurulum tamamlama talebi\n * @returns Operation result / İşlem sonucu\n */\n async completeAgentSetupRequest(\n request: CompleteAgentSetupRequestRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n agentSetupRequests.complete,\n request,\n options,\n );\n }\n}\n","/**\n * @fileoverview Common Base Types - Core fundamental types, interfaces, and business enums\n * @description Core data structures and business-related enums used throughout the InsurUp platform\n */\n\n// ============================================================================\n// GENERAL BUSINESS ENUMS\n// ============================================================================\n\n/**\n * Communication and Sales Channel\n *\n * Enumeration of various channels through which customers can interact with the insurance company,\n * submit proposals, purchase policies, or receive support. Channels are essential for tracking customer\n * acquisition sources, calculating agent commissions, analyzing marketing effectiveness, and providing\n * appropriate service levels. Each channel may have different processing workflows, commission structures,\n * and service requirements in the insurance business operations.\n *\n * Müşterilerin sigorta şirketi ile etkileşime geçebileceği, teklif verebileceği, poliçe satın alabileceği\n * veya destek alabileceği çeşitli kanalların numaralandırması. Kanallar, müşteri kazanım kaynaklarını takip etmek,\n * acente komisyonlarını hesaplamak, pazarlama etkinliğini analiz etmek ve uygun hizmet seviyelerini sağlamak için\n * gereklidir. Her kanal, sigorta işletme operasyonlarında farklı işlem akışlarına, komisyon yapılarına ve\n * hizmet gereksinimlerine sahip olabilir.\n */\nexport enum Channel {\n /**\n * Unknown Channel Source / Bilinmeyen Kanal Kaynağı\n *\n * Default value used when the customer acquisition or interaction channel cannot be determined\n * or is not specified. This may occur with legacy data, incomplete records, or when channel\n * tracking systems fail to capture the source information. Requires manual review and\n * categorization for proper analytics and commission processing.\n *\n * Müşteri kazanımı veya etkileşim kanalı belirlenemediğinde veya belirtilmediğinde kullanılan\n * varsayılan değer. Bu durum eski veriler, eksik kayıtlar veya kanal takip sistemlerinin kaynak\n * bilgilerini yakalayamaması durumunda ortaya çıkabilir. Uygun analitik ve komisyon işleme için\n * manuel inceleme ve kategorilendirme gerektirir.\n */\n Unknown = \"UNKNOWN\",\n\n /**\n * Manual entry or direct agent input channel\n * Manuel giriş veya doğrudan acente girişi kanalı\n */\n Manual = \"MANUAL\",\n\n /**\n * Company website or web portal channel\n * Şirket web sitesi veya web portalı kanalı\n */\n Website = \"WEBSITE\",\n\n /**\n * Google Ads or Google advertising platform channel\n * Google Ads veya Google reklam platformu kanalı\n */\n GoogleAds = \"GOOGLE_ADS\",\n\n /**\n * Call center or telephone support channel\n * Çağrı merkezi veya telefon destek kanalı\n */\n CallCenter = \"CALL_CENTER\",\n\n /**\n * Social media platforms channel\n * Sosyal medya platformları kanalı\n */\n SocialMedia = \"SOCIAL_MEDIA\",\n\n /**\n * Mobile application channel\n * Mobil uygulama kanalı\n */\n MobileApp = \"MOBILE_APP\",\n\n /**\n * Offline proposal form or paper-based application channel\n * Çevrimdışı teklif formu veya kağıt tabanlı başvuru kanalı\n */\n OfflineProposalForm = \"OFFLINE_PROPOSAL_FORM\",\n\n /**\n * Field sales or door-to-door sales channel\n * Saha satışı veya kapı kapı satış kanalı\n */\n Field = \"FIELD\",\n\n /**\n * Print media advertising channel\n * Basılı medya reklam kanalı\n */\n PrintMedia = \"PRINT_MEDIA\",\n\n /**\n * Trade fairs, exhibitions, or promotional events channel\n * Ticaret fuarları, sergiler veya promosyon etkinlikleri kanalı\n */\n FairEvent = \"FAIR_EVENT\",\n\n /**\n * Business partner or affiliate marketing channel\n * İş ortağı veya bağlı pazarlama kanalı\n */\n BusinessPartner = \"BUSINESS_PARTNER\",\n\n /**\n * Automated chatbot or AI-powered customer service channel\n * Otomatik chatbot veya AI destekli müşteri hizmetleri kanalı\n */\n Chatbot = \"CHATBOT\",\n}\n\n/**\n * Insurance Asset Types\n *\n * Defines the primary categories of assets that can be covered under insurance policies.\n * This classification helps determine the appropriate insurance products, coverage terms,\n * risk assessment methods, and regulatory requirements for different types of insurable assets.\n *\n * Sigorta poliçeleri kapsamında kapsanabilecek varlıkların birincil kategorilerini tanımlar.\n * Bu sınıflandırma, farklı sigortalanabilir varlık türleri için uygun sigorta ürünleri, kapsam\n * koşulları, risk değerlendirme yöntemleri ve yasal gereksinimleri belirlemeye yardımcı olur.\n */\nexport enum AssetType {\n /**\n * Vehicle Assets / Araç Varlıkları\n *\n * All types of motorized vehicles that can be insured including passenger cars, motorcycles,\n * commercial vehicles, trucks, buses, and specialized equipment. Vehicle insurance typically\n * includes coverage for damage, theft, liability, and optional additional protections.\n *\n * Binek araçlar, motosikletler, ticari araçlar, kamyonlar, otobüsler ve özel ekipmanlar\n * dahil sigortalanabilecek tüm motorlu araç türleri. Araç sigortası genellikle hasar, hırsızlık,\n * sorumluluk ve isteğe bağlı ek korumalar için kapsam içerir.\n */\n Vehicle = \"VEHICLE\",\n /**\n * Property Assets / Konut Varlıkları\n *\n * Real estate properties that can be insured including residential homes, commercial buildings,\n * and their contents. Property insurance typically covers structural damage, theft, natural disasters,\n * and liability related to the property.\n *\n * Konut evleri, ticari binalar ve içerikleri dahil sigortalanabilecek gayrimenkul konutları.\n * Konut sigortası genellikle yapısal hasar, hırsızlık, doğal afetler ve konutla ilgili sorumluluk\n * kapsamlarını içerir.\n */\n Property = \"PROPERTY\",\n}\n\n/**\n * Customer Type Classification\n *\n * Defines the legal and regulatory classification of insurance customers based on their\n * entity type and residency status. This classification is crucial for determining applicable\n * insurance regulations, pricing models, documentation requirements, and legal procedures.\n * Different customer types may have varying coverage options, premium calculations, and\n * compliance requirements under Turkish insurance law and international regulations.\n *\n * Sigorta müşterilerinin yasal ve düzenleyici sınıflandırmasını varlık türü ve ikamet\n * durumuna göre tanımlar. Bu sınıflandırma, uygulanabilir sigorta düzenlemeleri, fiyatlandırma\n * modelleri, dokümantasyon gereksinimleri ve yasal prosedürleri belirlemek için çok önemlidir.\n * Farklı müşteri türleri, Türk sigorta hukuku ve uluslararası düzenlemeler altında değişen\n * kapsam seçenekleri, prim hesaplamaları ve uyumluluk gereksinimlerine sahip olabilir.\n */\nexport enum CustomerType {\n /**\n * Individual Customer / Bireysel Müşteri\n *\n * Represents a natural person (individual) who purchases insurance coverage for personal use.\n * This includes private individuals buying auto insurance, home insurance, life insurance, or\n * other personal lines of coverage. Individual customers typically have different documentation\n * requirements, coverage limits, and premium structures compared to corporate customers.\n * Subject to consumer protection laws and individual privacy regulations.\n *\n * Kişisel kullanım için sigorta kapsamı satın alan gerçek kişiyi (birey) temsil eder.\n * Bu, kasko sigortası, konut sigortası, hayat sigortası veya diğer kişisel kapsam türlerini\n * satın alan özel bireyleri içerir. Bireysel müşteriler genellikle kurumsal müşterilere\n * kıyasla farklı dokümantasyon gereksinimlerine, kapsam limitelerine ve prim yapılarına\n * sahiptir. Tüketici koruma yasaları ve bireysel gizlilik düzenlemelerine tabidir.\n */\n Individual = \"INDIVIDUAL\",\n /**\n * Corporate Customer / Kurumsal Müşteri\n *\n * Represents a legal entity such as a corporation, limited liability company, partnership,\n * or other business organization that purchases commercial insurance coverage. Corporate\n * customers typically require higher coverage limits, more complex policy structures, and\n * specialized commercial insurance products. Subject to commercial regulations and may have\n * different tax implications and reporting requirements.\n *\n * Ticari sigorta kapsamı satın alan şirket, limited şirket, ortaklık veya diğer iş\n * organizasyonları gibi tüzel kişiyi temsil eder. Kurumsal müşteriler genellikle daha yüksek\n * kapsam limitleri, daha karmaşık poliçe yapıları ve özelleşmiş ticari sigorta ürünleri\n * gerektirir. Ticari düzenlemelere tabidir ve farklı vergi etkileri ve raporlama\n * gereksinimlerine sahip olabilir.\n */\n Company = \"COMPANY\",\n /**\n * Foreign Customer / Yabancı Müşteri\n *\n * Represents a foreign national or non-resident individual/entity who purchases insurance\n * coverage. Foreign customers may have special documentation requirements, different identification\n * procedures, and specific regulatory considerations based on their country of origin and\n * residency status. May require additional compliance checks and have different coverage\n * options or restrictions depending on international agreements and local regulations.\n *\n * Sigorta kapsamı satın alan yabancı uyruklu veya yerleşik olmayan birey/kuruluşu temsil eder.\n * Yabancı müşteriler, köken ülkeleri ve ikamet durumlarına göre özel dokümantasyon gereksinimleri,\n * farklı kimlik doğrulama prosedürleri ve belirli düzenleyici değerlendirmelere sahip olabilir.\n * Uluslararası anlaşmalara ve yerel düzenlemelere bağlı olarak ek uyumluluk kontrolleri\n * gerektirebilir ve farklı kapsam seçenekleri veya kısıtlamaları olabilir.\n */\n Foreign = \"FOREIGN\",\n}\n\n/**\n * Insurance Product Branches\n *\n * Defines the comprehensive classification of insurance product branches available\n * in the Turkish insurance market. Each branch represents a distinct type of insurance\n * coverage with specific regulatory requirements, pricing models, coverage options,\n * and business rules. This classification is essential for proper product categorization,\n * regulatory compliance, and system functionality organization.\n *\n * Türk sigorta pazarında mevcut sigorta ürün dallarının kapsamlı sınıflandırmasını\n * tanımlar. Her dal, belirli düzenleyici gereksinimler, fiyatlandırma modelleri, kapsam\n * seçenekleri ve iş kuralları olan farklı bir sigorta kapsam türünü temsil eder.\n * Bu sınıflandırma, uygun ürün kategorizasyonu, düzenleyici uyum ve sistem işlevsellik\n * organizasyonu için gereklidir.\n */\nexport enum ProductBranch {\n /**\n * Comprehensive motor vehicle insurance (Kasko)\n * Kapsamlı motorlu araç sigortası (Kasko)\n */\n Kasko = \"KASKO\",\n\n /**\n * Compulsory Earthquake Insurance (DASK)\n * Zorunlu Deprem Sigortası (DASK)\n */\n Dask = \"DASK\",\n\n /**\n * Residential property insurance (Konut)\n * Konut sigortası\n */\n Konut = \"KONUT\",\n\n /**\n * Mandatory motor vehicle liability insurance (Trafik)\n * Zorunlu motorlu araç sorumluluk sigortası (Trafik)\n */\n Trafik = \"TRAFIK\",\n\n /**\n * Supplementary Health Insurance (TSS)\n * Tamamlayıcı Sağlık Sigortası (TSS)\n */\n Tss = \"TSS\",\n\n /**\n * Voluntary Financial Liability Insurance (İMM)\n * İhtiyari Mali Mesuliyet Sigortası (İMM)\n */\n Imm = \"IMM\",\n\n /**\n * Green Card international motor insurance\n * Yeşil Kart uluslararası motorlu araç sigortası\n */\n YesilKart = \"YESIL_KART\",\n\n /**\n * Personal accident insurance (Ferdi Kaza)\n * Ferdi kaza sigortası\n */\n FerdiKaza = \"FERDI_KAZA\",\n\n /**\n * Group life insurance (Grup Hayat)\n * Grup hayat sigortası\n */\n GrupHayat = \"GRUP_HAYAT\",\n\n /**\n * Health insurance (Sağlık)\n * Sağlık sigortası\n */\n Saglik = \"SAGLIK\",\n\n /**\n * Credit card and identity protection insurance\n * Kredi kartı ve kimlik koruma sigortası\n */\n KartKimlikKoruma = \"KART_KIMLIK_KORUMA\",\n\n /**\n * Third-party liability insurance\n * Üçüncü şahıs mali sorumluluk sigortası\n */\n UcuncuSahisMaliSorumluluk = \"UCUNCU_SAHIS_MALI_SORUMLULUK\",\n\n /**\n * Commercial property fire insurance\n * İşyeri yangın sigortası\n */\n IsyeriYangin = \"ISYERI_YANGIN\",\n\n /**\n * Travel insurance (Seyahat)\n * Seyahat sigortası\n */\n Seyahat = \"SEYAHAT\",\n\n /**\n * Electronic device insurance\n * Elektronik cihaz sigortası\n */\n ElektronikCihaz = \"ELEKTRONIK_CIHAZ\",\n\n /**\n * Pet insurance\n * Evcil hayvan sigortası\n */\n Pet = \"PET\",\n\n /**\n * Individual Retirement System (BES)\n * Bireysel Emeklilik Sistemi (BES)\n */\n Bes = \"BES\",\n\n /**\n * Construction all-risk insurance\n * İnşaat tüm riskler sigortası\n */\n InsaatAllRisk = \"INSAAT_ALL_RISK\",\n\n /**\n * Leasing all-risk insurance\n * Leasing tüm riskler sigortası\n */\n LeasingAllRisk = \"LEASING_ALL_RISK\",\n\n /**\n * Assembly/installation all-risk insurance\n * Montaj tüm riskler sigortası\n */\n MontajAllRisk = \"MONTAJ_ALL_RISK\",\n\n /**\n * Transportation/cargo insurance\n * Nakliyat sigortası\n */\n Nakliyat = \"NAKLIYAT\",\n\n /**\n * Private security financial liability insurance\n * Özel güvenlik mali sorumluluk sigortası\n */\n OzelGuvenlikMaliSorumluluk = \"OZEL_GUVENLIK_MALI_SORUMLULUK\",\n\n /**\n * Smart phone insurance\n * Akıllı telefon sigortası\n */\n AkilliTelefon = \"AKILLI_TELEFON\",\n\n /**\n * Hazardous materials liability insurance\n * Tehlikeli maddeler mali sorumluluk sigortası\n */\n TehlikeliMaddelerMaliSorumluluk = \"TEHLIKELI_MADDELER_MALI_SORUMLULUK\",\n\n /**\n * Yacht, boat, and pleasure craft insurance\n * Yat, gemi ve gezinti teknesi sigortası\n */\n YatGemiGezintiTeknesi = \"YAT_GEMI_GEZINTI_TEKNESI\",\n\n /**\n * Agricultural insurance\n * Tarım sigortası\n */\n Tarim = \"TARIM\",\n\n /**\n * Professional liability insurance\n * Mesleki sorumluluk sigortası\n */\n MeslekiSorumluluk = \"MESLEKI_SORUMLULUK\",\n\n /**\n * Credit insurance\n * Alacak sigortası\n */\n Alacak = \"ALACAK\",\n\n /**\n * Employer's liability insurance\n * İşveren mali mesuliyet sigortası\n */\n IsverenMaliMesuliyet = \"ISVEREN_MALI_MESULIYET\",\n\n /**\n * Engineering insurance\n * Mühendislik sigortası\n */\n Muhendislik = \"MUHENDISLIK\",\n\n /**\n * Legal protection insurance\n * Hukuksal koruma sigortası\n */\n HukuksalKoruma = \"HUKUKSAL_KORUMA\",\n\n /**\n * First Fire Residential Insurance\n * İlk ateş konut sigortası\n */\n IlkAtesKonut = \"ILK_ATES_KONUT\",\n\n /**\n * Surety Insurance\n * Kefalet sigortası\n */\n Kefalet = \"KEFALET\",\n}\n\n// ============================================================================\n// CORE INTERFACES AND TYPES\n// ============================================================================\n\n/**\n * Insurance parameter for location and reference data\n *\n * Standard structure for insurance-related parameters such as cities, districts,\n * vehicle models, and other reference data used throughout the platform.\n *\n * Şehirler, ilçeler, araç modelleri ve platform genelinde kullanılan diğer\n * referans verileri gibi sigortayla ilgili parametreler için standart yapı.\n */\nexport interface InsuranceParameter {\n /**\n * Parameter code / Parametre kodu\n */\n readonly value: string;\n\n /**\n * Parameter name / Parametre adı\n */\n readonly text: string;\n\n /**\n * Optional reference identifier / İsteğe bağlı referans tanımlayıcısı\n */\n readonly reference?: string;\n}\n\n/**\n * User reference information\n *\n * Standard structure for referencing users throughout the system including\n * agents, administrators, and other system users with their basic identification\n * and role information.\n *\n * Temel kimlik ve rol bilgileri ile acenteler, yöneticiler ve diğer sistem\n * kullanıcıları dahil olmak üzere sistem genelinde kullanıcılara referans\n * vermek için standart yapı.\n */\nexport interface UserReference {\n /**\n * User unique identifier / Kullanıcı benzersiz tanımlayıcısı\n */\n readonly id: string;\n\n /**\n * User display name / Kullanıcı görüntü adı\n */\n readonly name: string;\n\n /**\n * User role / Kullanıcı rolü\n */\n readonly role?: string;\n\n /**\n * User email address / Kullanıcı e-posta adresi\n */\n readonly email?: string;\n}\n\n/**\n * Credit Card Information\n *\n * Credit card details required for payment processing. Contains sensitive payment\n * information that must be handled securely according to PCI compliance standards.\n *\n * Ödeme işlemi için gerekli kredi kartı detayları. PCI uyumluluk standartlarına\n * göre güvenli şekilde işlenmesi gereken hassas ödeme bilgilerini içerir.\n */\nexport interface CreditCard {\n /**\n * Identity number of the cardholder (optional)\n * Kart sahibinin kimlik numarası (isteğe bağlı)\n */\n readonly identityNumber?: string | null;\n\n /**\n * Credit card number\n * Kredi kartı numarası\n */\n readonly number: string;\n\n /**\n * Card verification code (CVC/CVV)\n * Kart doğrulama kodu (CVC/CVV)\n */\n readonly cvc: string;\n\n /**\n * Expiry month (MM format)\n * Son kullanma ayı (AA formatı)\n */\n readonly expiryMonth: string;\n\n /**\n * Expiry year (YYYY format)\n * Son kullanma yılı (YYYY formatı)\n */\n readonly expiryYear: string;\n\n /**\n * Cardholder name\n * Kart sahibinin adı\n */\n readonly holderName: string;\n}\n\n/**\n * Currency Types\n */\nexport enum Currency {\n Unknown = \"UNKNOWN\",\n TurkishLira = \"TURKISH_LIRA\",\n UnitedStatesDollar = \"UNITED_STATES_DOLLAR\",\n Euro = \"EURO\",\n}\n\n/**\n * Payment Options\n *\n * Enumeration of payment methods and processing types available for insurance premium payments\n * and financial transactions. Each option represents a different payment flow with specific security\n * requirements, user interaction patterns, and technical implementations.\n *\n * Sigorta prim ödemeleri ve finansal işlemler için mevcut ödeme yöntemleri ve işleme türlerinin\n * numaralandırması. Her seçenek, belirli güvenlik gereksinimleri, kullanıcı etkileşim kalıpları\n * ve teknik uygulamalar ile farklı bir ödeme akışını temsil eder.\n */\nexport enum PaymentOption {\n /**\n * Unknown or unspecified payment option\n * Bilinmeyen veya belirtilmemiş ödeme seçeneği\n */\n Unknown = \"UNKNOWN\",\n\n /**\n * Synchronous credit card payment processing\n * Senkron kredi kartı ödeme işlemi\n */\n SyncCreditCard = \"SYNC_CREDIT_CARD\",\n\n /**\n * Synchronous open account payment processing\n * Senkron açık hesap ödeme işlemi\n */\n SyncOpenAccount = \"SYNC_OPEN_ACCOUNT\",\n\n /**\n * Asynchronous 3D Secure payment processing\n * Asenkron 3D Secure ödeme işlemi\n */\n Async3dSecure = \"ASYNC_3D_SECURE\",\n\n /**\n * Asynchronous insurance company redirect payment processing\n * Asenkron sigorta şirketi yönlendirme ödeme işlemi\n */\n AsyncInsuranceCompanyRedirect = \"ASYNC_INSURANCE_COMPANY_REDIRECT\",\n\n /**\n * Asynchronous third-party 3D Secure payment processing\n * Asenkron üçüncü taraf 3D Secure ödeme işlemi\n */\n AsyncThirdParty3dSecure = \"ASYNC_THIRD_PARTY_3D_SECURE\",\n}\n\n/**\n * Policy States\n *\n * Represents the current state of an insurance policy throughout its lifecycle.\n * Used to track policy status from active coverage to termination.\n *\n * Bir sigorta poliçesinin yaşam döngüsü boyunca mevcut durumunu temsil eder.\n * Poliçenin aktif teminat durumundan sonlandırılmasına kadar olan süreçte durumunu takip etmek için kullanılır.\n */\nexport enum PolicyState {\n /**\n * The policy is currently active and providing coverage\n * Poliçe şu anda aktif durumda ve teminat sağlıyor\n */\n Active = \"ACTIVE\",\n\n /**\n * The policy has reached its natural end date and is no longer providing coverage\n * Poliçe doğal bitiş tarihine ulaşmış ve artık teminat sağlamıyor\n */\n EndOfLife = \"END_OF_LIFE\",\n\n /**\n * The policy has been cancelled before its natural expiration date\n * Poliçe doğal bitiş tarihinden önce iptal edilmiş\n */\n Cancelled = \"CANCELLED\",\n}\n\n/**\n * Insurance Product Integration Type\n *\n * Defines the technical integration method used to connect with and process insurance\n * products. This classification determines the communication protocol, data exchange\n * method, and processing approach used for each insurance product offering. Critical\n * for system architecture, performance optimization, and maintenance strategies of\n * insurance product integrations.\n *\n * Sigorta ürünleri ile bağlantı kurmak ve işlemek için kullanılan teknik entegrasyon\n * yöntemini tanımlar. Bu sınıflandırma, her sigorta ürünü teklifi için kullanılan\n * iletişim protokolünü, veri alışverişi yöntemini ve işleme yaklaşımını belirler.\n * Sistem mimarisi, performans optimizasyonu ve sigorta ürünü entegrasyonlarının\n * bakım stratejileri için kritiktir.\n */\nexport enum InsuranceProductType {\n /**\n * Web service-based integration using API calls and real-time communication.\n *\n * Represents insurance products that integrate through web services, APIs, and\n * real-time communication protocols. This approach enables immediate data exchange,\n * real-time quotes, instant policy issuance, and immediate transaction processing.\n * Provides the best user experience with instant responses but requires stable\n * network connectivity and reliable external service availability.\n *\n * API çağrıları ve gerçek zamanlı iletişim kullanan web servis tabanlı entegrasyon.\n *\n * Web servisleri, API'ler ve gerçek zamanlı iletişim protokolleri aracılığıyla\n * entegre olan sigorta ürünlerini temsil eder. Bu yaklaşım, anında veri alışverişi,\n * gerçek zamanlı teklifler, anında poliçe düzenleme ve anında işlem işleme olanağı\n * sağlar. Anında yanıtlarla en iyi kullanıcı deneyimini sağlar ancak kararlı ağ\n * bağlantısı ve güvenilir harici servis kullanılabilirliği gerektirir.\n */\n WebService = \"WEB_SERVICE\",\n\n /**\n * Automated robot-based integration using screen scraping or automated processes.\n *\n * Represents insurance products that integrate through automated robot processes,\n * screen scraping, or browser automation. This approach is used when direct API\n * integration is not available and the system must interact with web interfaces\n * or legacy systems. May have slower response times and requires regular maintenance\n * to adapt to interface changes but enables integration with older systems.\n *\n * Ekran kazıma veya otomatik süreçler kullanan otomatik robot tabanlı entegrasyon.\n *\n * Otomatik robot süreçleri, ekran kazıma veya tarayıcı otomasyonu aracılığıyla\n * entegre olan sigorta ürünlerini temsil eder. Bu yaklaşım, doğrudan API entegrasyonu\n * mevcut olmadığında ve sistemin web arayüzleri veya eski sistemler ile etkileşim\n * kurması gerektiğinde kullanılır. Daha yavaş yanıt süreleri olabilir ve arayüz\n * değişikliklerine uyum sağlamak için düzenli bakım gerektirir ancak eski sistemlerle\n * entegrasyonu mümkün kılar.\n */\n Robot = \"ROBOT\",\n}\n\n/**\n * Customer Phone Number\n *\n * Represents a customer's phone number with country code for authentication and communication.\n * This structure is used throughout the platform for customer contact information and\n * multi-factor authentication processes.\n *\n * Müşterinin kimlik doğrulama ve iletişim için ülke kodu ile telefon numarasını temsil eder.\n * Bu yapı, müşteri iletişim bilgileri ve çok faktörlü kimlik doğrulama süreçleri için\n * platform genelinde kullanılır.\n */\nexport interface CustomerPhoneNumber {\n /**\n * Country calling code (e.g., 90 for Turkey)\n * Ülke arama kodu (örn. Türkiye için 90)\n */\n readonly countryCode: number;\n\n /**\n * Phone number without country code\n * Ülke kodu olmadan telefon numarası\n */\n readonly number: string;\n}\n","/**\n * @fileoverview Coverage-related Types and Enums - Insurance coverage types and related structures\n * @description Coverage types, values, and choices used throughout the InsurUp platform for insurance coverage configuration\n */\n\nimport type { ProductBranch } from \"./common.base.js\";\n\n/**\n * Represents different types of coverage values in insurance policies.\n * Used to define how coverage limits and benefits are calculated or applied.\n *\n * Sigorta poliçelerinde farklı teminat değeri türlerini temsil eder.\n * Teminat limitlerinin ve faydalarının nasıl hesaplandığını veya uygulandığını tanımlar.\n */\nexport type CoverageValue =\n | { $type: \"UNDEFINED\" }\n | { $type: \"INCLUDED\" }\n | { $type: \"NOT_INCLUDED\" }\n | { $type: \"MARKET_VALUE\" }\n | { $type: \"DECIMAL\"; value: number }\n | { $type: \"PERCENT\"; value: number }\n | { $type: \"LIMITLESS\" }\n | { $type: \"HIGHEST_LIMIT\" };\n\n/**\n * Generic class representing a collection of coverage options with a default selection.\n * Provides a standardized structure for defining available choices and default values for insurance coverage configurations.\n *\n * Varsayılan seçim ile teminat seçenekleri koleksiyonunu temsil eden genel sınıf.\n * Sigorta teminatı konfigürasyonları için mevcut seçenekleri ve varsayılan değerleri tanımlamak için standartlaştırılmış yapı sağlar.\n */\nexport interface CoverageChoices<T> {\n /**\n * The recommended default coverage option that is pre-selected for customers.\n * This value represents the most commonly chosen or recommended coverage level\n * based on risk assessment, regulatory requirements, or business strategy.\n * Customers can change this selection, but it serves as a starting point.\n *\n * Müşteriler için önceden seçilen önerilen varsayılan teminat seçeneği.\n * Bu değer, risk değerlendirmesi, düzenleyici gereksinimler veya iş stratejisine\n * dayalı olarak en yaygın seçilen veya önerilen teminat seviyesini temsil eder.\n * Müşteriler bu seçimi değiştirebilir, ancak başlangıç noktası olarak hizmet eder.\n */\n readonly default: T;\n\n /**\n * Complete array of all available coverage options that customers can choose from.\n * This includes the default option and all alternative coverage levels or types.\n * The array defines the full range of choices available for a specific coverage aspect,\n * enabling customers to customize their insurance according to their needs and budget.\n *\n * Müşterilerin seçebileceği tüm mevcut teminat seçeneklerinin tam dizisi.\n * Bu varsayılan seçeneği ve tüm alternatif teminat seviyelerini veya türlerini içerir.\n * Dizi, belirli bir teminat yönü için mevcut seçeneklerin tam aralığını tanımlar\n * ve müşterilerin ihtiyaçlarına ve bütçelerine göre sigortalarını özelleştirmelerini sağlar.\n */\n readonly values: readonly T[];\n}\n\n/**\n * Union type for all insurance coverage types.\n * Represents the different types of insurance coverage available in the system.\n *\n * Tüm sigorta teminat türleri için birleşim türü.\n * Sistemde mevcut farklı sigorta teminat türlerini temsil eder.\n */\nexport type Coverage =\n | KaskoCoverage\n | KonutCoverage\n | ImmCoverage\n | TssCoverage\n | EmptyCoverage;\n\n/**\n * Represents comprehensive auto insurance coverage (Kasko) in Turkish insurance system.\n * Kasko is a comprehensive coverage that protects against various risks including theft, collision, and damage.\n *\n * Türk sigorta sisteminde kapsamlı otomobil sigortası (Kasko) temsilini yapar.\n * Kasko, hırsızlık, çarpışma ve hasar dahil çeşitli risklere karşı koruyan kapsamlı bir teminattır.\n */\nexport interface KaskoCoverage {\n readonly productBranch: ProductBranch.Kasko;\n readonly immLimitiAyrimsiz?: CoverageValue;\n readonly ferdiKazaVefat?: CoverageValue;\n readonly ferdiKazaSakatlik?: CoverageValue;\n readonly ferdiKazaTedaviMasraflari?: CoverageValue;\n readonly anahtarKaybi?: CoverageValue;\n readonly maneviTazminat?: CoverageValue;\n readonly onarimServisTuru?: OnarimServisTuru;\n readonly yedekParcaTuru?: YedekParcaTuru;\n readonly camKirilmaMuafeyeti?: CoverageValue;\n readonly kiralikArac?: KiralikArac;\n readonly hukuksalKorumaAracaBagli?: CoverageValue;\n readonly ozelEsya?: CoverageValue;\n readonly sigaraMaddeZarari?: CoverageValue;\n readonly patlayiciMaddeZarari?: CoverageValue;\n readonly kemirgenZarari?: CoverageValue;\n readonly yukKaymasiZarari?: CoverageValue;\n readonly eskime?: CoverageValue;\n readonly hasarsizlikIndirimKoruma?: CoverageValue;\n readonly yurtdisiKasko?: CoverageValue;\n readonly aracCalinmasi?: CoverageValue;\n readonly anahtarCalinmasi?: CoverageValue;\n readonly hukuksalKorumaSurucuyeBagli?: CoverageValue;\n readonly miniOnarim?: CoverageValue;\n readonly yolYardim?: CoverageValue;\n readonly yanlisAkaryakitDolumu?: CoverageValue;\n readonly yanma?: CoverageValue;\n readonly carpma?: CoverageValue;\n readonly carpisma?: CoverageValue;\n readonly glkhhTeror?: CoverageValue;\n readonly grevLokavt?: CoverageValue;\n readonly dogalAfetler?: CoverageValue;\n readonly hirsizlik?: CoverageValue;\n}\n\n/**\n * Represents home insurance coverage (Konut Sigortası) in Turkish insurance system.\n * Home insurance provides comprehensive protection for residential properties and their contents against various risks.\n *\n * Türk sigorta sisteminde konut sigortası teminatını temsil eder.\n * Konut sigortası, konut konutları ve içeriklerini çeşitli risklere karşı kapsamlı koruma sağlar.\n */\nexport interface KonutCoverage {\n readonly productBranch: ProductBranch.Konut;\n readonly binaBedeli?: CoverageValue;\n readonly esyaBedeli?: CoverageValue;\n readonly elektronikCihazBedeli?: CoverageValue;\n readonly izolasyonBedeli?: CoverageValue;\n readonly camBedeli?: CoverageValue;\n readonly enflasyon?: CoverageValue;\n readonly metrekareInsaMaliyeti?: CoverageValue;\n}\n\n/**\n * Represents Voluntary Financial Liability (İMM - İhtiyari Mali Mesuliyet) insurance coverage in Turkish insurance system.\n * IMM provides additional liability coverage beyond the mandatory traffic insurance requirements.\n *\n * Türk sigorta sisteminde İhtiyari Mali Mesuliyet (İMM) sigortası teminatını temsil eder.\n * İMM, zorunlu trafik sigortası gereksinimlerinin ötesinde ek sorumluluk teminatı sağlar.\n */\nexport interface ImmCoverage {\n readonly productBranch: ProductBranch.Imm;\n readonly immLimitiAyrimsiz?: CoverageValue;\n readonly kiralikArac?: KiralikArac;\n readonly tasinanYuk?: TasinanYuk;\n}\n\n/**\n * Represents Turkish Complementary Health Insurance (TSS - Tamamlayıcı Sağlık Sigortası) coverage.\n * TSS provides additional coverage beyond the basic SGK (Social Security Institution) benefits,\n * offering enhanced access to private healthcare services and reduced out-of-pocket expenses.\n *\n * Türk Tamamlayıcı Sağlık Sigortası (TSS) teminatını temsil eder.\n * TSS, temel SGK (Sosyal Güvenlik Kurumu) faydalarının ötesinde ek teminat sağlar,\n * özel sağlık hizmetlerine gelişmiş erişim ve düşük cepten ödemeler sunar.\n */\nexport interface TssCoverage {\n readonly productBranch: ProductBranch.Tss;\n readonly hastaneAgi?: HastaneAgi;\n readonly saglikPaketi?: SaglikPaketi;\n}\n\n/**\n * Represents an empty coverage placeholder that contains no actual coverage benefits.\n * Used as a default or null object pattern implementation for coverage scenarios where no specific coverage is defined.\n *\n * Gerçek teminat faydaları içermeyen boş bir teminat yer tutucusunu temsil eder.\n * Belirli bir teminatın tanımlanmadığı teminat senaryoları için varsayılan veya null nesne deseni uygulaması olarak kullanılır.\n */\nexport interface EmptyCoverage {\n readonly productBranch: string;\n}\n\n/**\n * Types of repair services in Turkish insurance industry.\n * These terms are specific to Turkish insurance regulations and practices.\n *\n * Türk sigorta sektöründeki onarım servis türleri.\n * Bu terimler Türk sigorta düzenlemeleri ve uygulamalarına özeldir.\n */\nexport enum OnarimServisTuru {\n /**\n * Unspecified/undefined repair service type\n * Belirsiz/tanımsız onarım servis türü\n */\n Belirsiz = \"BELIRSIZ\",\n\n /**\n * Contracted private service - Private repair shops with insurance company contracts\n * Anlaşmalı özel servis - Sigorta şirketi ile anlaşmalı özel onarım atölyeleri\n */\n AnlasmaliOzelServis = \"ANLASMALI_OZEL_SERVIS\",\n\n /**\n * Contracted authorized service - Brand authorized services with insurance contracts\n * Anlaşmalı yetkili servis - Sigorta şirketi ile anlaşmalı marka yetkili servisleri\n */\n AnlasmaliYetkiliServis = \"ANLASMALI_YETKILI_SERVIS\",\n\n /**\n * Authorized service - Official brand authorized service centers\n * Yetkili servis - Resmi marka yetkili servis merkezleri\n */\n YetkiliServis = \"YETKILI_SERVIS\",\n\n /**\n * Private service - Independent repair shops\n * Özel servis - Bağımsız onarım atölyeleri\n */\n OzelServis = \"OZEL_SERVIS\",\n\n /**\n * Insured determines - Policy holder chooses the repair service\n * Sigortalı belirler - Poliçe sahibi onarım servisini kendisi seçer\n */\n SigortaliBelirler = \"SIGORTALI_BELIRLER\",\n}\n\n/**\n * Types of spare parts in Turkish insurance industry.\n * These classifications are specific to Turkish insurance regulations.\n *\n * Türk sigorta sektöründeki yedek parça türleri.\n * Bu sınıflandırmalar Türk sigorta düzenlemelerine özeldir.\n */\nexport enum YedekParcaTuru {\n /**\n * Unspecified/undefined spare part type\n * Belirsiz/tanımsız yedek parça türü\n */\n Belirsiz = \"BELIRSIZ\",\n\n /**\n * Original parts - Genuine manufacturer parts (OEM)\n * Orijinal parçalar - Gerçek üretici parçaları (OEM)\n */\n OrijinalParca = \"ORIJINAL_PARCA\",\n\n /**\n * Equivalent parts - Compatible aftermarket parts with equivalent quality\n * Eşdeğer parçalar - Eşdeğer kalitede uyumlu yan sanayi parçaları\n */\n EsdegerParca = \"ESDEGER_PARCA\",\n}\n\n/**\n * Represents rental vehicle information in Turkish insurance context.\n * \"Kiralık Araç\" is a specific concept in Turkish motor insurance.\n *\n * Türk sigorta bağlamında kiralık araç bilgilerini temsil eder.\n * \"Kiralık Araç\" Türk motorlu taşıt sigortasında özel bir kavramdır.\n */\nexport type KiralikArac =\n | { $type: \"NONE\" }\n | { $type: \"UNDEFINED\" }\n | {\n $type: \"DEFINED\";\n yillikKullanimSayisi?: number;\n tekSeferlikGunSayisi?: number;\n aracSegment?: AracSegment;\n };\n\n/**\n * Represents car classification segments used internationally in automotive industry.\n * The A-F classification system is a European standard adopted globally.\n *\n * Sigorta sınıflandırmasında kullanılan araç segmentlerini temsil eder.\n * Segmentler genellikle aracın boyutuna, fiyatına ve kategorisine göre belirlenir.\n */\nexport enum AracSegment {\n /**\n * A Segment - Mini and city cars (e.g., Fiat 500, Renault Twingo, Volkswagen Up)\n * A Segmenti - Mini ve şehir arabaları\n */\n A = \"A\",\n\n /**\n * B Segment - Small class cars (e.g., Ford Fiesta, Volkswagen Polo, Renault Clio)\n * B Segmenti - Küçük sınıf arabalar\n */\n B = \"B\",\n\n /**\n * C Segment - Mid-size cars (e.g., Volkswagen Golf, Ford Focus, Toyota Corolla)\n * C Segmenti - Orta sınıf arabalar\n */\n C = \"C\",\n\n /**\n * D Segment - Upper mid-size cars (e.g., Volkswagen Passat, Ford Mondeo, BMW 3 Series)\n * D Segmenti - Üst orta sınıf arabalar\n */\n D = \"D\",\n\n /**\n * E Segment - Upper class cars (e.g., BMW 5 Series, Mercedes E Series, Audi A6)\n * E Segmenti - Üst sınıf arabalar\n */\n E = \"E\",\n\n /**\n * F Segment - Luxury class cars (e.g., BMW 7 Series, Mercedes S Series, Audi A8)\n * F Segmenti - Lüks sınıf arabalar\n */\n F = \"F\",\n\n /**\n * The replacement vehicle must be in the same segment as the insured vehicle\n * Sigortalı aracın segmenti ne ise, ikame aracın da aynı segmentte olması gerekir\n */\n SegmenteSegment = \"SEGMENTE_SEGMENT\",\n}\n\n/**\n * Represents hospital network coverage levels in Turkish health insurance system.\n * Different network types provide varying levels of hospital partnerships and service coverage.\n *\n * Türk sağlık sigortası sisteminde hastane ağı kapsam seviyelerini temsil eder.\n * Farklı ağ türleri değişen hastane ortaklığı ve hizmet kapsam seviyeleri sunar.\n */\nexport enum HastaneAgi {\n /**\n * Unknown or undefined hospital network coverage.\n * Bilinmeyen veya tanımlanmamış hastane ağı kapsamı.\n */\n Bilinmiyor = \"BILINMIYOR\",\n\n /**\n * Narrow coverage hospital network with basic health services.\n * Temel sağlık hizmeti sunan dar kapsam hastane ağı.\n */\n DarKapsam = \"DAR_KAPSAM\",\n\n /**\n * Standard coverage hospital network with moderate service variety.\n * Orta düzeyde hizmet çeşitliliği sunan standart kapsam hastane ağı.\n */\n StandartKapsam = \"STANDART_KAPSAM\",\n\n /**\n * Wide coverage hospital network with comprehensive healthcare services.\n * Kapsamlı sağlık hizmetleri sunan geniş kapsam hastane ağı.\n */\n GenisKapsam = \"GENIS_KAPSAM\",\n}\n\n/**\n * Represents treatment types for Turkish complementary health insurance packages.\n * Defines whether coverage applies to inpatient-only or combined inpatient+outpatient treatment modalities.\n *\n * Türk tamamlayıcı sağlık sigortası paketleri için tedavi türlerini temsil eder.\n * Teminatın yatarak veya yatarak + ayakta tedavi modalitesinde geçerli olup olmadığını tanımlar.\n */\nexport enum SaglikPaketiTedaviSekli {\n /**\n * Unknown or undefined treatment type.\n * Bilinmeyen veya tanımlanmamış tedavi türü.\n */\n Bilinmiyor = \"BILINMIYOR\",\n\n /**\n * Inpatient treatment coverage only.\n * Sadece yatarak tedavi kapsamı.\n */\n Yatarak = \"YATARAK\",\n\n /**\n * Combined inpatient and outpatient treatment coverage.\n * Yatarak ve ayakta tedavi kapsamının birleşimi.\n */\n YatarakAyakta = \"YATARAK_AYAKTA\",\n}\n\n/**\n * Represents a health insurance package configuration for Turkish complementary health insurance.\n * Defines treatment coverage types and annual outpatient treatment limits.\n *\n * Türk tamamlayıcı sağlık sigortası için sağlık sigortası paketi konfigürasyonunu temsil eder.\n * Tedavi kapsam türlerini ve yıllık ayakta tedavi limitlerini tanımlar.\n */\nexport interface SaglikPaketi {\n /**\n * The treatment type covered by this health package.\n * Bu sağlık paketi tarafından kapsanan tedavi türü.\n */\n readonly tedaviSekli: SaglikPaketiTedaviSekli;\n\n /**\n * The annual limit for outpatient treatments.\n * Ayakta tedaviler için yıllık limit.\n */\n readonly ayaktaYillikTedaviSayisi?: number;\n}\n\n/**\n * Represents types of transported cargo for Turkish cargo insurance.\n *\n * Türk kargo sigortası için taşınan yük türlerini temsil eder.\n */\nexport enum TasinanYuk {\n /**\n * Undefined cargo type.\n * Belirsiz yük türü.\n */\n Belirsiz = \"BELIRSIZ\",\n\n /**\n * No specific cargo type.\n * Belirli bir yük türü yok.\n */\n Yok = \"YOK\",\n\n /**\n * Wood logs and lumber.\n * Ağaç kütükleri ve kereste.\n */\n AgacKutukleriveKereste = \"AGAC_KUTUKLERIVE_KERESTE\",\n\n /**\n * Fuel and petroleum products.\n * Akaryakıt ve petrol ürünleri.\n */\n Akaryakit = \"AKARYAKIT\",\n\n /**\n * Shoes and leather goods.\n * Ayakkabı ve saraciye ürünleri.\n */\n AyakkabiSaraciye = \"AYAKKABI_SARACIYE\",\n\n /**\n * Grocery and delicatessen products.\n * Bakkaliye ve şarküteri ürünleri.\n */\n BakkaliyeveSharkuteriUrunleri = \"BAKKALIYE_VE_SHARKUTERI_URUNLERI\",\n\n /**\n * All kinds of stationery materials.\n * Bilumum kırtasiye malzemeleri.\n */\n BilumumKirtasiyeMalzemeleri = \"BILUMUM_KIRTASIYE_MALZEMELERI\",\n\n /**\n * Bulk water and milk.\n * Dökme su ve süt.\n */\n DokmeSuveSut = \"DOKME_SU_VE_SUT\",\n\n /**\n * Carpet and rugs.\n * Halı ve kilim.\n */\n HaliveKilim = \"HALI_VE_KILIM\",\n\n /**\n * Raw, semi-finished and finished paper products.\n * Ham, yarı mamül ve mamül kağıt ürünleri.\n */\n HamYariMamulveMamulKagit = \"HAM_YARI_MAMUL_VE_MAMUL_KAGIT\",\n\n /**\n * Ready-mix concrete.\n * Hazır beton.\n */\n HazirBeton = \"HAZIR_BETON\",\n\n /**\n * All kinds of household appliances.\n * Her nevi ev aletleri.\n */\n HerNeviEvAletleri = \"HER_NEVI_EV_ALETLERI\",\n\n /**\n * All kinds of bulk coal and wood.\n * Her türlü dökme kömür ve odun.\n */\n HerTurluDokmeKomurvOdun = \"HER_TURLU_DOKME_KOMUR_V_ODUN\",\n\n /**\n * Cereals and legumes.\n * Hububat ve bakliyat.\n */\n HububatveBakliyat = \"HUBUBAT_VE_BAKLIYAT\",\n\n /**\n * Rough construction materials.\n * Kaba inşaat malzemeleri.\n */\n KabaInsaatMalzemeleri = \"KABA_INSAAT_MALZEMELERI\",\n\n /**\n * Tire and rubber products.\n * Lastik ve kauçuk ürünleri.\n */\n LastikKaucukUrunleri = \"LASTIK_KAUCUK_URUNLERI\",\n\n /**\n * Liquid chemical substances.\n * Likid kimyevi maddeler.\n */\n LikidKimyeviMadde = \"LIKID_KIMYEVI_MADDE\",\n\n /**\n * LPG gas cylinders.\n * LPG gaz tüpleri.\n */\n LpgGazTupu = \"LPG_GAZ_TUPU\",\n\n /**\n * Machine parts and spare parts.\n * Makine aksam ve yedekleri.\n */\n MakineAksamveYedekleri = \"MAKINE_AKSAM_VE_YEDEKLERI\",\n\n /**\n * Furniture materials.\n * Mobilya malzemesi.\n */\n MobilyaMalzemesi = \"MOBILYA_MALZEMESI\",\n\n /**\n * Various household items.\n * Muhtelif ev eşyası.\n */\n MuhtelifEvEsyasi = \"MUHTELIF_EV_ESYASI\",\n\n /**\n * Auto spare parts.\n * Oto yedek parçaları.\n */\n OtoYedekParcalari = \"OTO_YEDEK_PARCALARI\",\n\n /**\n * Plastic products.\n * Plastik mamülleri.\n */\n PlastikMamulleri = \"PLASTIK_MAMULLERI\",\n\n /**\n * Synthetic fiber products.\n * Sentetik elyaf ürünleri.\n */\n SentetikElyafUrunleri = \"SENTETIK_ELYAF_URUNLERI\",\n\n /**\n * Synthetic plastic paint products.\n * Sentetik plastik boya ürünleri.\n */\n SentetikPlastikBoyaUrunleri = \"SENTETIK_PLASTIK_BOYA_URUNLERI\",\n\n /**\n * Textile products.\n * Tekstil ürünleri.\n */\n TekstilUrunleri = \"TEKSTIL_URUNLERI\",\n\n /**\n * Cleaning materials.\n * Temizlik maddeleri.\n */\n TemizlikMaddeleri = \"TEMIZLIK_MADDELERI\",\n\n /**\n * Fresh fruits and vegetables.\n * Yaş meyve ve sebze.\n */\n YasMeyveveSebze = \"YAS_MEYVE_VE_SEBZE\",\n}\n\n/**\n * Checks if a value is a CoverageValue type\n */\nfunction isCoverageValue(value: unknown): value is CoverageValue {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"$type\" in value &&\n typeof (value as { $type: unknown }).$type === \"string\"\n );\n}\n\n/**\n * Dynamically merges coverage objects of the same product branch.\n * Handles UNDEFINED coverage values by giving precedence to non-UNDEFINED values.\n * Ensures all coverages have the same productBranch.\n */\nexport function mergeCoverage(...coverages: Coverage[]): Coverage {\n if (coverages.length === 0) {\n throw new Error(\"Cannot merge empty coverage array\");\n }\n\n // Filter out any null/undefined coverages\n const validCoverages = coverages.filter(\n (coverage): coverage is Coverage => coverage != null,\n );\n\n if (validCoverages.length === 0) {\n throw new Error(\"No valid coverages to merge\");\n }\n\n // Get the product branch from the first coverage\n const firstCoverage = validCoverages[0]!;\n const productBranch = firstCoverage.productBranch;\n\n // Validate that all coverages have the same product branch\n for (const coverage of validCoverages) {\n if (coverage.productBranch !== productBranch) {\n throw new Error(\n `All coverages must have the same productBranch. Expected: ${productBranch}, but found: ${coverage.productBranch}`,\n );\n }\n }\n\n // Helper function to merge coverage values with precedence rules\n const mergeCoverageValue = (\n values: (CoverageValue | undefined)[],\n ): CoverageValue | undefined => {\n const definedValues = values.filter(\n (value): value is CoverageValue => value != null,\n );\n\n if (definedValues.length === 0) {\n return undefined;\n }\n\n // Priority order: non-UNDEFINED values take precedence over UNDEFINED\n // If multiple non-UNDEFINED values exist, use the last one (later coverages override earlier ones)\n const nonUndefinedValues = definedValues.filter(\n (value) => value.$type !== \"UNDEFINED\",\n );\n\n if (nonUndefinedValues.length > 0) {\n // Return the last non-UNDEFINED value\n return nonUndefinedValues[nonUndefinedValues.length - 1];\n }\n\n // If all values are UNDEFINED, return UNDEFINED\n return { $type: \"UNDEFINED\" };\n };\n\n // Helper function to merge non-CoverageValue properties (use last defined value)\n const mergeProperty = <T>(values: (T | undefined)[]): T | undefined => {\n const definedValues = values.filter((value): value is T => value != null);\n return definedValues.length > 0\n ? definedValues[definedValues.length - 1]\n : undefined;\n };\n\n // Get all unique property keys from all coverages (excluding productBranch)\n const allKeys = new Set<string>();\n for (const coverage of validCoverages) {\n Object.keys(coverage).forEach((key) => {\n if (key !== \"productBranch\") {\n allKeys.add(key);\n }\n });\n }\n\n // Create the merged coverage object dynamically\n const merged: Record<string, unknown> = {\n productBranch,\n };\n\n // Merge each property dynamically\n for (const key of allKeys) {\n const values = validCoverages.map(\n (coverage) => (coverage as unknown as Record<string, unknown>)[key],\n );\n\n // Check if this property contains CoverageValue objects\n const sampleValue = values.find((v) => v != null);\n\n if (isCoverageValue(sampleValue)) {\n // Use CoverageValue merging logic\n merged[key] = mergeCoverageValue(values as (CoverageValue | undefined)[]);\n } else {\n // Use regular property merging logic\n merged[key] = mergeProperty(values);\n }\n }\n\n return merged as unknown as Coverage;\n}\n","/**\n * @fileoverview Common Policy Types - Policy transfer and policy-related types\n * @description Policy transfer enums and types used throughout the InsurUp platform\n */\n\n// ============================================================================\n// POLICY TRANSFER ENUMS\n// ============================================================================\n\n/**\n * Policy Transfer Trigger Status / Poliçe Transfer Tetikleme Durumu\n *\n * Represents the execution status of a policy transfer trigger operation.\n * This tracks the lifecycle of an automated policy transfer job from initiation\n * to completion. The status indicates whether the transfer process has started,\n * completed successfully, or failed during execution.\n *\n * Poliçe transfer tetikleme işleminin yürütme durumunu temsil eder.\n * Bu, otomatik poliçe transfer işinin başlatılmasından tamamlanmasına kadar olan\n * yaşam döngüsünü takip eder. Durum, transfer sürecinin başlatılıp başlatılmadığını,\n * başarıyla tamamlanıp tamamlanmadığını veya yürütme sırasında başarısız olup olmadığını gösterir.\n */\nexport enum PolicyTransferTriggerStatus {\n /**\n * The policy transfer process completed successfully without errors.\n * All policies within the specified date range were processed, and the transfer\n * operation finished without any critical failures. Individual policy transfers\n * may still have been skipped or failed, but the overall process completed.\n *\n * Poliçe transfer süreci hatasız olarak başarıyla tamamlandı.\n * Belirtilen tarih aralığındaki tüm poliçeler işlendi ve transfer işlemi\n * kritik herhangi bir başarısızlık olmadan bitti. Bireysel poliçe transferleri\n * yine de atlanmış veya başarısız olmuş olabilir, ancak genel süreç tamamlandı.\n */\n Succeeded = \"SUCCEEDED\",\n\n /**\n * The policy transfer process failed due to an error or exception.\n * This indicates that the transfer job encountered a critical error that prevented\n * it from completing successfully. This could be due to system connectivity issues,\n * authentication failures, or other technical problems that halted the process.\n *\n * Poliçe transfer süreci bir hata veya istisna nedeniyle başarısız oldu.\n * Bu, transfer işinin başarıyla tamamlanmasını engelleyen kritik bir hatayla\n * karşılaştığını gösterir. Bu, sistem bağlantı sorunları, kimlik doğrulama başarısızlıkları\n * veya süreci durduran diğer teknik sorunlar nedeniyle olabilir.\n */\n Failed = \"TRIGGER_STATUS_FAILED\",\n}\n\n/**\n * Policy Transfer Company Failure Reason / Poliçe Transfer Şirket Başarısızlık Nedeni\n *\n * Represents specific reasons why policy transfer from an insurance company failed during\n * the automated policy transfer process. This is used when attempting to retrieve and transfer\n * policies from one insurance company system to another. Company-level failures occur when\n * the source insurance company's system cannot provide the requested policy data.\n *\n * Otomatik poliçe transfer süreci sırasında sigorta şirketinden poliçe transferinin neden\n * başarısız olduğunu belirten özel nedenleri temsil eder. Bu, bir sigorta şirket sisteminden\n * diğerine poliçeleri almaya ve transfer etmeye çalışırken kullanılır. Şirket seviyesindeki\n * başarısızlıklar, kaynak sigorta şirketinin sistemi talep edilen poliçe verilerini sağlayamadığında oluşur.\n */\nexport enum PolicyTransferCompanyFailureReason {\n /**\n * An unknown or unspecified failure occurred during the policy transfer process from the company.\n * This is used as a fallback when the specific cause of failure cannot be determined or categorized.\n * It may indicate system errors, unexpected responses, or technical issues that don't fit\n * other specific failure categories.\n *\n * Şirketten poliçe transfer süreci sırasında bilinmeyen veya belirtilmemiş bir hata oluştu.\n * Bu, başarısızlığın özel nedeninin belirlenemediği veya kategorilendirilmediği durumlarda\n * yedek olarak kullanılır. Sistem hataları, beklenmeyen yanıtlar veya diğer özel\n * başarısızlık kategorilerine uymayan teknik sorunları gösterebilir.\n */\n Unknown = \"UNKNOWN\",\n\n /**\n * Failed to retrieve policies from the insurance company's system during the transfer process.\n * This occurs when the source company's API or data systems are unavailable, returning errors,\n * or the requested policy data cannot be accessed. This could be due to system downtime,\n * authentication issues, or data access restrictions.\n *\n * Transfer süreci sırasında sigorta şirketinin sisteminden poliçeler alınamadı.\n * Bu durum, kaynak şirketin API'si veya veri sistemleri kullanılamadığında, hata döndürdüğünde\n * veya talep edilen poliçe verilerine erişilemediğinde oluşur. Sistem kesintisi,\n * kimlik doğrulama sorunları veya veri erişim kısıtlamaları nedeniyle olabilir.\n */\n CouldNotFetchPolicies = \"COULD_NOT_FETCH_POLICIES\",\n}\n\n/**\n * Transferred Policy Status / Transfer Edilen Poliçe Durumu\n *\n * Represents the final status of an individual policy transfer operation.\n * This indicates whether a specific policy was successfully transferred, failed\n * during processing, or was intentionally skipped due to business rules or\n * data constraints. The status helps in reporting and auditing transfer results.\n *\n * Bireysel poliçe transfer işleminin nihai durumunu temsil eder.\n * Bu, belirli bir poliçenin başarıyla transfer edilip edilmediğini, işleme sırasında\n * başarısız olup olmadığını veya iş kuralları ya da veri kısıtlamaları nedeniyle\n * kasıtlı olarak atlanıp atlanmadığını gösterir. Durum, transfer sonuçlarının\n * raporlanması ve denetlenmesinde yardımcı olur.\n */\nexport enum TransferredPolicyStatus {\n /**\n * The policy was successfully transferred to the target system.\n * This indicates that all policy data, including customer information,\n * coverage details, and related records, were validated and imported\n * without errors. The policy is now available in the destination system.\n *\n * Poliçe hedef sisteme başarıyla transfer edildi.\n * Bu, müşteri bilgileri, teminat detayları ve ilgili kayıtlar da dahil olmak üzere\n * tüm poliçe verilerinin doğrulandığını ve hatasız olarak içe aktarıldığını gösterir.\n * Poliçe artık hedef sistemde kullanılabilir durumda.\n */\n Success = \"SUCCESS\",\n\n /**\n * The policy transfer failed due to validation errors or processing issues.\n * This occurs when the policy data doesn't meet validation requirements,\n * has missing or invalid information, or encounters system errors during\n * processing. The specific failure reason is typically recorded separately.\n *\n * Poliçe transfer doğrulama hataları veya işleme sorunları nedeniyle başarısız oldu.\n * Bu durum, poliçe verilerinin doğrulama gereksinimlerini karşılamaması,\n * eksik veya geçersiz bilgilere sahip olması veya işleme sırasında sistem\n * hatalarıyla karşılaşması durumunda oluşur. Özel başarısızlık nedeni genellikle ayrı olarak kaydedilir.\n */\n Failed = \"TRANSFER_FAILED\",\n\n /**\n * The policy was intentionally skipped during transfer due to business rules.\n * Unlike failed policies, skipped policies are bypassed for logical reasons\n * such as duplicate prevention, unsupported product types, or dependency\n * requirements. The specific skip reason is typically recorded separately.\n *\n * Poliçe iş kuralları nedeniyle transfer sırasında kasıtlı olarak atlandı.\n * Başarısız poliçelerin aksine, atlanan poliçeler yineleme önleme, desteklenmeyen\n * ürün türleri veya bağımlılık gereksinimleri gibi mantıksal nedenlerle atlanır.\n * Özel atlama nedeni genellikle ayrı olarak kaydedilir.\n */\n Skipped = \"TRANSFER_SKIPPED\",\n}\n\n/**\n * Transferred Policy Skip Reason / Transfer Edilen Poliçe Atlama Nedeni\n *\n * Represents reasons why a policy was skipped during the automated transfer process.\n * Unlike failures, skipped policies are intentionally bypassed due to business rules,\n * data constraints, or logical conditions that prevent processing. Skipped policies\n * help maintain data integrity and avoid duplicate or invalid transfers.\n *\n * Otomatik transfer süreci sırasında poliçenin neden atlandığını belirten nedenleri temsil eder.\n * Başarısızlıklardan farklı olarak, atlanan poliçeler iş kuralları, veri kısıtlamaları\n * veya işlemeyi engelleyen mantıksal koşullar nedeniyle kasıtlı olarak atlanır. Atlanan poliçeler\n * veri bütünlüğünü korumaya ve yinelenen veya geçersiz transferleri önlemeye yardımcı olur.\n */\nexport enum TransferredPolicySkipReason {\n /**\n * Unknown or unspecified reason for skipping the policy transfer.\n * This is used when the specific reason for skipping cannot be determined\n * or categorized into other skip reasons. It serves as a fallback value\n * for edge cases or unexpected conditions.\n *\n * Poliçe transferinin atlanması için bilinmeyen veya belirtilmemiş neden.\n * Bu, atlamanın özel nedeninin belirlenemediği veya diğer atlama nedenlerine\n * kategorilendirilemediği durumlarda kullanılır. Sınır durumları veya\n * beklenmeyen koşullar için yedek değer olarak hizmet eder.\n */\n Unknown = \"UNKNOWN\",\n\n /**\n * The policy has already been transferred previously and exists in the target system.\n * This prevents duplicate policy imports and maintains data integrity. The system\n * checks for existing policies using unique identifiers such as policy number,\n * renewal number, and insurance company information.\n *\n * Poliçe daha önce transfer edilmiş ve hedef sistemde mevcut.\n * Bu, yinelenen poliçe içe aktarımlarını önler ve veri bütünlüğünü korur. Sistem,\n * poliçe numarası, yenileme numarası ve sigorta şirket bilgileri gibi benzersiz\n * tanımlayıcıları kullanarak mevcut poliçeleri kontrol eder.\n */\n AlreadyTransferred = \"SKIP_ALREADY_TRANSFERRED\",\n\n /**\n * The previous version of the policy could not be found in the target system.\n * This occurs when transferring policy renewals or endorsements that depend on\n * a base policy version. Without the foundation policy, the renewal or endorsement\n * cannot be properly linked and is skipped to maintain referential integrity.\n *\n * Poliçenin önceki versiyonu hedef sistemde bulunamadı.\n * Bu durum, temel poliçe versiyonuna bağlı olan poliçe yenilemeleri veya zeylleri\n * transfer edilirken oluşur. Temel poliçe olmadan, yenileme veya zeyil düzgün şekilde\n * bağlanamaz ve referans bütünlüğünü korumak için atlanır.\n */\n PreviousVersionNotFound = \"PREVIOUS_VERSION_NOT_FOUND\",\n\n /**\n * The product branch is not supported by the target system.\n * This occurs when the source system contains insurance product types\n * (such as life, health, property, or motor insurance branches) that are not\n * configured or supported in the destination system. These policies are\n * skipped to avoid import errors.\n *\n * Ürün dalı hedef sistem tarafından desteklenmiyor.\n * Bu durum, kaynak sistemin hedef sistemde yapılandırılmamış veya desteklenmeyen\n * sigorta ürün türleri (hayat, sağlık, konut veya motorlu araç sigortası dalları gibi)\n * içermesi durumunda oluşur. Bu poliçeler içe aktarma hatalarını önlemek için atlanır.\n */\n ProductBranchNotSupported = \"PRODUCT_BRANCH_NOT_SUPPORTED\",\n\n /**\n * The specific product is not supported by the target system.\n * This occurs when the exact insurance product variant or configuration\n * from the source system doesn't have a corresponding mapping in the\n * destination system. Even if the general product branch is supported,\n * specific product configurations may not be transferable.\n *\n * Özel ürün hedef sistem tarafından desteklenmiyor.\n * Bu durum, kaynak sistemdeki tam sigorta ürün varyantı veya yapılandırmasının\n * hedef sistemde karşılık gelen eşlemesi bulunmadığında oluşur. Genel ürün dalı\n * desteklense bile, özel ürün yapılandırmaları transfer edilemeyebilir.\n */\n ProductNotSupported = \"PRODUCT_NOT_SUPPORTED\",\n}\n\n/**\n * Transferred Policy Failure Reason / Transfer Edilen Poliçe Başarısızlık Nedeni\n *\n * Represents specific reasons why an individual policy transfer failed during the automated\n * transfer process. This provides detailed categorization of policy-level failures that occur\n * when transferring individual policies from one system to another. Each reason helps identify\n * the specific data validation or processing issue that prevented successful policy import.\n *\n * Otomatik transfer süreci sırasında bireysel poliçe transferinin neden başarısız olduğunu\n * belirten özel nedenleri temsil eder. Bu, bir sistemden diğerine bireysel poliçe transferi\n * sırasında oluşan poliçe seviyesindeki başarısızlıkların ayrıntılı kategorizasyonunu sağlar.\n * Her neden, başarılı poliçe içe aktarımını engelleyen özel veri doğrulama veya işleme sorununu\n * belirlemeye yardımcı olur.\n */\nexport enum TransferredPolicyFailureReason {\n /**\n * An unknown or unspecified failure occurred during the individual policy transfer.\n * This is used when the specific cause of failure cannot be determined or categorized\n * into other failure reasons. It may indicate unexpected errors or edge cases\n * not covered by other specific failure categories.\n *\n * Bireysel poliçe transfer sırasında bilinmeyen veya belirtilmemiş bir hata oluştu.\n * Bu, başarısızlığın özel nedeninin belirlenemediği veya diğer başarısızlık nedenlerine\n * kategorilendirilemediği durumlarda kullanılır. Beklenmeyen hataları veya diğer özel\n * başarısızlık kategorileri kapsamında olmayan sınır durumları gösterebilir.\n */\n Unknown = \"UNKNOWN\",\n\n /**\n * The customer's identity number (T.C. Kimlik No) is invalid or incorrectly formatted.\n * This occurs when the Turkish citizenship number doesn't pass validation checks,\n * has incorrect length, contains invalid characters, or fails checksum validation.\n * Valid Turkish identity numbers must be 11 digits and pass specific algorithm checks.\n *\n * Müşterinin kimlik numarası (T.C. Kimlik No) geçersiz veya yanlış formatlı.\n * Bu durum, Türk vatandaşlık numarası doğrulama kontrollerini geçmediğinde,\n * yanlış uzunluğa sahip olduğunda, geçersiz karakterler içerdiğinde veya\n * kontrol toplamı doğrulamasını geçemediğinde oluşur. Geçerli Türk kimlik numaraları\n * 11 haneli olmalı ve belirli algoritma kontrollerini geçmelidir.\n */\n InvalidCustomerIdentityNumber = \"INVALID_CUSTOMER_IDENTITY_NUMBER\",\n\n /**\n * The customer's company title is invalid or missing for corporate customers.\n * This occurs when transferring policies for business entities and the company name\n * is empty, too short, contains invalid characters, or doesn't meet minimum\n * requirements for corporate entity identification.\n *\n * Kurumsal müşteriler için müşterinin şirket unvanı geçersiz veya eksik.\n * Bu durum, işletme kuruluşları için poliçe transferi yapılırken şirket adının\n * boş olması, çok kısa olması, geçersiz karakterler içermesi veya kurumsal\n * kuruluş tanımlaması için minimum gereksinimleri karşılamaması durumunda oluşur.\n */\n InvalidCustomerCompanyTitle = \"INVALID_CUSTOMER_COMPANY_TITLE\",\n\n /**\n * The customer's tax number is invalid or incorrectly formatted for corporate customers.\n * This occurs when the tax identification number doesn't meet the required format,\n * length, or validation rules for Turkish tax numbers. Valid tax numbers must be\n * 10 digits for companies or 11 digits for individual taxpayers.\n *\n * Kurumsal müşteriler için müşterinin vergi numarası geçersiz veya yanlış formatlı.\n * Bu durum, vergi kimlik numarasının Türk vergi numaraları için gerekli format,\n * uzunluk veya doğrulama kurallarını karşılamaması durumunda oluşur. Geçerli vergi numaraları\n * şirketler için 10 haneli veya bireysel mükellefler için 11 haneli olmalıdır.\n */\n InvalidCustomerTaxNumber = \"INVALID_CUSTOMER_TAX_NUMBER\",\n\n /**\n * The customer type is invalid or not supported by the target system.\n * This occurs when the customer classification (individual, corporate, etc.)\n * is not recognized or supported in the destination system, or when the\n * customer type field contains invalid values.\n *\n * Müşteri türü geçersiz veya hedef sistem tarafından desteklenmiyor.\n * Bu durum, müşteri sınıflandırmasının (bireysel, kurumsal, vb.) hedef sistemde\n * tanınmaması veya desteklenmemesi ya da müşteri türü alanının geçersiz\n * değerler içermesi durumunda oluşur.\n */\n InvalidCustomerType = \"INVALID_CUSTOMER_TYPE\",\n\n /**\n * The vehicle information is invalid or incomplete for motor insurance policies.\n * This can occur when vehicle identification data (chassis number, license plate,\n * engine number, model information) is missing, incorrectly formatted, or doesn't\n * match validation requirements for Turkish vehicle registration standards.\n *\n * Motorlu araç sigortası poliçeleri için araç bilgileri geçersiz veya eksik.\n * Bu durum, araç tanımlama verilerinin (şasi numarası, plaka, motor numarası,\n * model bilgileri) eksik olması, yanlış formatlanması veya Türk araç tescil\n * standartları için doğrulama gereksinimlerini karşılamaması durumunda oluşabilir.\n */\n InvalidVehicle = \"INVALID_VEHICLE\",\n\n /**\n * The property information is invalid or incomplete for property insurance policies.\n * This occurs when property details such as address, construction type, area,\n * or value information is missing, incorrectly formatted, or doesn't meet\n * validation requirements for property insurance coverage.\n *\n * Konut sigortası poliçeleri için konut bilgileri geçersiz veya eksik.\n * Bu durum, adres, yapı türü, alan veya değer bilgileri gibi konut detaylarının\n * eksik olması, yanlış formatlanması veya konut sigortası teminatı için\n * doğrulama gereksinimlerini karşılamaması durumunda oluşur.\n */\n InvalidProperty = \"INVALID_PROPERTY\",\n\n /**\n * The policy end date is invalid or in the wrong format.\n * This occurs when the policy expiration date is missing, not a valid date,\n * in an incorrect format, or doesn't make logical sense (e.g., end date\n * before start date). All policy dates must be valid and properly formatted.\n *\n * Poliçe bitiş tarihi geçersiz veya yanlış formatta.\n * Bu durum, poliçe son kullanma tarihinin eksik olması, geçerli bir tarih olmaması,\n * yanlış formatta olması veya mantıksal olarak anlam ifade etmemesi\n * (örneğin, bitiş tarihinin başlangıç tarihinden önce olması) durumunda oluşur.\n * Tüm poliçe tarihleri geçerli ve düzgün formatlanmış olmalıdır.\n */\n InvalidEndDate = \"INVALID_END_DATE\",\n\n /**\n * The policy start date is invalid or in the wrong format.\n * This occurs when the policy effective date is missing, not a valid date,\n * in an incorrect format, or doesn't make logical sense within the policy\n * context. Policy start dates must be valid and properly formatted dates.\n *\n * Poliçe başlangıç tarihi geçersiz veya yanlış formatta.\n * Bu durum, poliçe yürürlük tarihinin eksik olması, geçerli bir tarih olmaması,\n * yanlış formatta olması veya poliçe bağlamında mantıksal olarak anlam ifade\n * etmemesi durumunda oluşur. Poliçe başlangıç tarihleri geçerli ve düzgün\n * formatlanmış tarihler olmalıdır.\n */\n InvalidStartDate = \"INVALID_START_DATE\",\n\n /**\n * The proposal number is invalid or incorrectly formatted.\n * This occurs when the insurance proposal identifier doesn't meet the required\n * format, length, or validation rules. Proposal numbers must follow specific\n * formats defined by the insurance company or regulatory requirements.\n *\n * Teklif numarası geçersiz veya yanlış formatlı.\n * Bu durum, sigorta teklifi tanımlayıcısının gerekli format, uzunluk veya\n * doğrulama kurallarını karşılamaması durumunda oluşur. Teklif numaraları,\n * sigorta şirketi veya düzenleyici gereksinimler tarafından tanımlanan\n * belirli formatları takip etmelidir.\n */\n InvalidProposalNumber = \"INVALID_PROPOSAL_NUMBER\",\n\n /**\n * The premium amount is invalid or incorrectly formatted.\n * This occurs when the insurance premium value is negative, zero when it shouldn't be,\n * in an incorrect format, or doesn't meet validation rules for premium calculations.\n * Premium amounts must be valid positive monetary values.\n *\n * Prim tutarı geçersiz veya yanlış formatlı.\n * Bu durum, sigorta prim değerinin negatif olması, olmaması gereken durumlarda\n * sıfır olması, yanlış formatta olması veya prim hesaplamaları için doğrulama\n * kurallarını karşılamaması durumunda oluşur. Prim tutarları geçerli pozitif\n * parasal değerler olmalıdır.\n */\n InvalidPremium = \"INVALID_PREMIUM\",\n\n /**\n * The commission amount is invalid or incorrectly formatted.\n * This occurs when the agent commission value is negative when it shouldn't be,\n * exceeds the premium amount, or doesn't meet validation rules for commission\n * calculations. Commission amounts must be valid monetary values within acceptable ranges.\n *\n * Komisyon tutarı geçersiz veya yanlış formatlı.\n * Bu durum, acente komisyon değerinin olmaması gereken durumlarda negatif olması,\n * prim tutarını aşması veya komisyon hesaplamaları için doğrulama kurallarını\n * karşılamaması durumunda oluşur. Komisyon tutarları kabul edilebilir aralıklarda\n * geçerli parasal değerler olmalıdır.\n */\n InvalidCommission = \"INVALID_COMMISSION\",\n\n /**\n * The payment type is invalid or not supported by the target system.\n * This occurs when the payment method (cash, credit card, bank transfer, etc.)\n * is not recognized, supported, or properly formatted in the destination system.\n * All payment types must be valid and supported payment methods.\n *\n * Ödeme türü geçersiz veya hedef sistem tarafından desteklenmiyor.\n * Bu durum, ödeme yönteminin (nakit, kredi kartı, banka havalesi, vb.)\n * hedef sistemde tanınmaması, desteklenmemesi veya düzgün formatlanmaması\n * durumunda oluşur. Tüm ödeme türleri geçerli ve desteklenen ödeme yöntemleri olmalıdır.\n */\n InvalidPaymentType = \"INVALID_PAYMENT_TYPE\",\n\n /**\n * The insured customer information is invalid or incomplete.\n * This occurs when the person or entity that benefits from the insurance coverage\n * has missing, incorrectly formatted, or invalid personal information such as\n * name, contact details, or identification data.\n *\n * Sigortalı müşteri bilgileri geçersiz veya eksik.\n * Bu durum, sigorta teminatından yararlanan kişi veya kuruluşun ad, iletişim\n * bilgileri veya kimlik verileri gibi kişisel bilgilerinin eksik, yanlış\n * formatlanmış veya geçersiz olması durumunda oluşur.\n */\n InvalidInsuredCustomer = \"INVALID_INSURED_CUSTOMER\",\n\n /**\n * The insurer customer information is invalid or incomplete.\n * This occurs when the person or entity that purchases and pays for the insurance\n * policy (policyholder) has missing, incorrectly formatted, or invalid personal\n * information such as name, contact details, or identification data.\n *\n * Sigorta ettiren müşteri bilgileri geçersiz veya eksik.\n * Bu durum, sigorta poliçesini satın alan ve ödeyen kişi veya kuruluşun (poliçe sahibi)\n * ad, iletişim bilgileri veya kimlik verileri gibi kişisel bilgilerinin eksik,\n * yanlış formatlanmış veya geçersiz olması durumunda oluşur.\n */\n InvalidInsurerCustomer = \"INVALID_INSURER_CUSTOMER\",\n}\n","/**\n * @fileoverview Common Property Types - Property-related types and enums\n * @description Property data structures, models, and enums used throughout the InsurUp platform\n */\n\nimport type { InsuranceParameter } from \"./common.base.js\";\n\n// ============================================================================\n// PROPERTY-RELATED ENUMS\n// ============================================================================\n\n/**\n * Represents the construction material and structural type of a building.\n * Used to assess risk levels, determine insurance premiums, and evaluate earthquake resistance.\n *\n * Bir binanın yapı malzemesi ve yapısal türünü temsil eder.\n * Risk seviyelerini değerlendirmek, sigorta primlerini belirlemek ve deprem direncini değerlendirmek için kullanılır.\n */\nexport enum PropertyStructure {\n /**\n * Construction type is unknown or not yet determined.\n *\n * Yapı türü bilinmiyor veya henüz belirlenmedi.\n */\n Unknown = \"UNKNOWN\",\n\n /**\n * Steel-reinforced concrete construction - highest earthquake resistance.\n *\n * Betonarme yapı - en yüksek deprem direnci.\n */\n SteelReinforcedConcrete = \"STEEL_REINFORCED_CONCRETE\",\n\n /**\n * Other construction types including wood, brick, stone, or mixed materials.\n *\n * Ahşap, tuğla, taş veya karışık malzemeler dahil diğer yapı türleri.\n */\n Other = \"OTHER\",\n}\n\n/**\n * Represents the damage assessment levels for property structures.\n * Used to categorize the extent of damage sustained by buildings or properties.\n *\n * Konut yapıları için hasar değerlendirme seviyelerini temsil eder.\n * Binalar veya konutlar tarafından uğranılan hasarın boyutunu kategorize etmek için kullanılır.\n */\nexport enum PropertyDamageStatus {\n /**\n * Damage status is unknown or has not been assessed yet.\n *\n * Hasar durumu bilinmiyor veya henüz değerlendirilmedi.\n */\n Unknown = \"UNKNOWN\",\n\n /**\n * No damage detected or property is in perfect condition.\n *\n * Hasar tespit edilmedi veya konut mükemmel durumda.\n */\n None = \"NONE\",\n\n /**\n * Minor damage that does not affect structural integrity.\n *\n * Yapısal bütünlüğü etkilemeyen küçük hasar.\n */\n SlightlyDamaged = \"SLIGHTLY_DAMAGED\",\n\n /**\n * Moderate damage requiring significant repairs but structure remains sound.\n *\n * Önemli onarım gerektiren orta derecede hasar ancak yapı sağlam kalır.\n */\n ModeratelyDamaged = \"MODERATELY_DAMAGED\",\n\n /**\n * Severe damage compromising structural integrity and safety.\n *\n * Yapısal bütünlük ve güvenliği tehlikeye atan ciddi hasar.\n */\n SeverelyDamaged = \"SEVERELY_DAMAGED\",\n}\n\n/**\n * Represents how a property is utilized or occupied.\n * Defines the primary use case of the property which affects insurance risk assessment and premium calculation.\n *\n * Bir konutun nasıl kullanıldığını veya işgal edildiğini temsil eder.\n * Sigorta risk değerlendirmesini ve prim hesaplamasını etkileyen konutun birincil kullanım durumunu tanımlar.\n */\nexport enum PropertyUtilizationStyle {\n /**\n * Property usage is unknown or not yet determined.\n *\n * Konut kullanımı bilinmiyor veya henüz belirlenmedi.\n */\n Unknown = \"UNKNOWN\",\n\n /**\n * Residential property used as a home or dwelling.\n *\n * Ev veya yaşam yeri olarak kullanılan konut amaçlı konut.\n */\n House = \"HOUSE\",\n\n /**\n * Commercial property used for business operations.\n *\n * İş operasyonları için kullanılan ticari konut.\n */\n Business = \"BUSINESS\",\n\n /**\n * Other usage types including mixed-use, industrial, agricultural, or special purposes.\n *\n * Karma kullanım, sanayi, tarım veya özel amaçlar dahil diğer kullanım türleri.\n */\n Other = \"OTHER\",\n}\n\n/**\n * Represents the ownership relationship between a person and a property.\n * Defines whether the person owns the property or occupies it under a rental agreement.\n *\n * Bir kişi ile konut arasındaki konutiyet ilişkisini temsil eder.\n * Kişinin konutun sahibi olup olmadığını veya kira sözleşmesi kapsamında oturduğunu tanımlar.\n */\nexport enum PropertyOwnershipType {\n /**\n * Ownership type is unknown or not yet determined.\n *\n * Sahiplik türü bilinmiyor veya henüz belirlenmedi.\n */\n Unknown = \"UNKNOWN\",\n\n /**\n * The person legally owns the property and holds the title deed.\n *\n * Kişi konutun yasal sahibidir ve tapu senedine sahiptir.\n */\n Proprietor = \"PROPRIETOR\",\n\n /**\n * The person rents or leases the property under a rental agreement.\n *\n * Kişi kira sözleşmesi kapsamında konuta kiralar veya leasing yapar.\n */\n Tenant = \"TENANT\",\n}\n\n/**\n * Represents the types of financial institutions that can be designated as loss payees in insurance policies.\n * Used to specify who should receive insurance claim payments when there are outstanding loans or financing.\n *\n * Sigorta poliçelerinde hasar alacaklısı olarak belirlenebilecek finansal kurum türlerini temsil eder.\n * Ödenmemiş krediler veya finansman olduğunda sigorta hasar ödemelerini kimin alacağını belirtmek için kullanılır.\n */\nexport enum LossPayeeClauseType {\n /**\n * Bank as loss payee.\n *\n * Hasar alacaklısı olarak banka.\n */\n Bank = \"BANK\",\n\n /**\n * Financial institution as loss payee.\n *\n * Hasar alacaklısı olarak finansal kurum.\n */\n FinancialInstitution = \"FINANCIAL_INSTITUTION\",\n}\n\n// ============================================================================\n// PROPERTY-RELATED INTERFACES\n// ============================================================================\n\n/**\n * Represents floor information for a property including total floors in the building and the specific floor where the property is located.\n * Floor information is important for risk assessment, accessibility evaluation, and emergency evacuation planning.\n *\n * Binadaki toplam kat sayısı ve konutun bulunduğu belirli katı içeren bir konut için kat bilgilerini temsil eder.\n * Kat bilgileri risk değerlendirmesi, erişilebilirlik değerlendirmesi ve acil tahliye planlaması için önemlidir.\n */\nexport interface PropertyFloor {\n /**\n * The total number of floors in the building.\n *\n * Binadaki toplam kat sayısı.\n */\n totalFloors: number | null;\n\n /**\n * The specific floor where the property is located.\n *\n * Konutun bulunduğu belirli kat.\n */\n currentFloor: number | null;\n}\n\n/**\n * Represents a complete address structure for insured properties with hierarchical administrative divisions.\n * Property addresses are essential for risk assessment, policy issuance, and emergency response coordination.\n *\n * Sigortalı konutlar için hiyerarşik idari bölümlerle tam adres yapısını temsil eder.\n * Konut adresleri risk değerlendirmesi, poliçe düzenleme ve acil durum müdahale koordinasyonu için gereklidir.\n */\nexport interface PropertyAddress {\n /**\n * The city (il) where the property is located.\n *\n * Konutun bulunduğu il.\n */\n city: InsuranceParameter;\n\n /**\n * The district (ilçe) where the property is located.\n *\n * Konutun bulunduğu ilçe.\n */\n district: InsuranceParameter;\n\n /**\n * The town or municipality (belde) where the property is located.\n *\n * Konutun bulunduğu belde veya belediye.\n */\n town: InsuranceParameter;\n\n /**\n * The neighborhood (mahalle) where the property is located.\n *\n * Konutun bulunduğu mahalle.\n */\n neighborhood: InsuranceParameter;\n\n /**\n * The street where the property is located.\n *\n * Konutun bulunduğu sokak.\n */\n street: InsuranceParameter;\n\n /**\n * The building identifier where the property is located.\n *\n * Konutun bulunduğu bina tanımlayıcısı.\n */\n building: InsuranceParameter;\n\n /**\n * The apartment or unit identifier within the building.\n *\n * Bina içindeki daire veya birim tanımlayıcısı.\n */\n apartment: InsuranceParameter;\n}\n\n/**\n * Represents an existing DASK (Compulsory Earthquake Insurance) policy from Turkey's National Disaster Insurance Institution.\n * Used to reference previous earthquake insurance coverage when creating new policies or managing property records.\n *\n * Türkiye Doğal Afet Sigortaları Kurumu'ndan mevcut bir DASK (Zorunlu Deprem Sigortası) poliçesini temsil eder.\n * Yeni poliçeler oluştururken veya konut kayıtlarını yönetirken önceki deprem sigortası kapsamına referans vermek için kullanılır.\n */\nexport interface DaskOldPolicy {\n /**\n * The DASK policy number. Must be a positive number with maximum 15 digits.\n *\n * DASK poliçe numarası. Maksimum 15 haneli pozitif bir sayı olmalıdır.\n */\n number: number;\n\n /**\n * The end date of the existing DASK policy.\n *\n * Mevcut DASK poliçesinin bitiş tarihi.\n */\n endDate: string;\n}\n\n/**\n * Represents a loss payee clause that designates a financial institution as beneficiary for insurance claim payments.\n * Used when insured assets have outstanding financing to protect the lender's financial interest.\n *\n * Sigorta hasar ödemeleri için finansal kurumu lehtar olarak belirleyen hasar alacaklısı klozunu temsil eder.\n * Sigortalı varlıkların ödenmemiş finansmanı olduğunda borç verenin finansal çıkarını korumak için kullanılır.\n */\nexport interface LossPayeeClause {\n /**\n * Gets the type of loss payee clause.\n *\n * Hasar alacaklısı kloz türünü alır.\n */\n type: LossPayeeClauseType;\n\n /**\n * Gets the bank information (applicable when Type is Bank).\n *\n * Banka bilgilerini alır (Tür Banka olduğunda geçerlidir).\n */\n bank: unknown;\n\n /**\n * Gets the bank branch information (applicable when Type is Bank).\n *\n * Banka şube bilgilerini alır (Tür Banka olduğunda geçerlidir).\n */\n bankBranch: unknown;\n\n /**\n * Gets the financial institution information (applicable when Type is FinancialInstitution).\n *\n * Finansal kurum bilgilerini alır (Tür FinancialInstitution olduğunda geçerlidir).\n */\n financialInstitution: unknown;\n\n /**\n * Gets the credit agreement number if specified.\n *\n * Belirtilmişse kredi sözleşme numarasını alır.\n */\n creditAgreementNumber: string | null;\n}\n\n/**\n * Property Number\n * Konut Numarası\n *\n * Represents a unique property identification number used for official property registration and insurance documentation.\n * Property numbers are essential for precise property identification in government records and insurance systems.\n */\nexport interface PropertyNumber {\n /**\n * The 10-digit property identification number\n * 10 haneli konut kimlik numarası\n */\n readonly value: number; // long in C# but number in TypeScript\n}\n\n/**\n * Property Square Meter\n * Konut Metrekaresi\n *\n * Represents the square meter area of a property for insurance coverage calculation and risk assessment.\n * Property size is a fundamental factor in determining insurance premiums, coverage limits, and risk exposure.\n */\nexport interface PropertySquareMeter {\n /**\n * Square meter area value (10-10,000)\n * Metrekare alan değeri (10-10,000)\n */\n readonly value: number;\n}\n\n/**\n * Property Construction Year\n * Konut Yapım Yılı\n *\n * Represents the construction year of a property for insurance risk assessment and premium calculation.\n * Construction year is a critical factor in determining building standards, earthquake resistance, and overall structural integrity.\n */\nexport interface PropertyConstructionYear {\n /**\n * The construction year value (0 to current year)\n * Yapım yılı değeri (0 ile mevcut yıl arası)\n */\n readonly value: number;\n}\n\n/**\n * Property information snapshot for proposals\n * Teklifler için konut bilgisi anlık görüntüsü\n *\n * Represents comprehensive property information captured in insurance proposal snapshots.\n * Contains all physical, legal, and risk-related characteristics of a residential property.\n *\n * NOTE: This interface should match the exact C# ProposalSnapshotProperty structure.\n * Individual property types should be properly defined based on their C# counterparts.\n */\nexport interface ProposalSnapshotProperty {\n /**\n * Unique identifier for the property\n * Konut için benzersiz tanımlayıcı\n */\n readonly id: string;\n\n /**\n * Official property number for identification and legal purposes\n * Tanımlama ve yasal amaçlar için resmi konut numarası\n */\n readonly number: PropertyNumber;\n\n /**\n * Complete address information of the property\n * Konutun tam adres bilgileri\n */\n readonly address: PropertyAddress;\n\n /**\n * Total area of the property in square meters\n * Konutun metrekare cinsinden toplam alanı\n */\n readonly squareMeter: PropertySquareMeter;\n\n /**\n * Year when the property was constructed\n * Konutun inşa edildiği yıl\n */\n readonly constructionYear: PropertyConstructionYear;\n\n /**\n * Current damage status of the property\n * Konutun mevcut hasar durumu\n */\n readonly damageStatus: PropertyDamageStatus;\n\n /**\n * Floor information of the property within the building\n * Bina içindeki konutun kat bilgileri\n */\n readonly floor: PropertyFloor;\n\n /**\n * Structural characteristics and construction type\n * Yapısal özellikler ve inşaat tipi\n */\n readonly structure: PropertyStructure;\n\n /**\n * How the property is utilized\n * Konutun nasıl kullanıldığı\n */\n readonly utilizationStyle: PropertyUtilizationStyle;\n\n /**\n * Loss payee clause for financing arrangements\n * Finansman düzenlemeleri için lehtar klozu\n */\n readonly lossPayeeClause?: LossPayeeClause;\n\n /**\n * Ownership type of the property\n * Konutun sahiplik türü\n */\n readonly ownershipType: PropertyOwnershipType;\n\n /**\n * DASK old policy information\n * DASK eski poliçe bilgileri\n */\n readonly daskOldPolicy?: DaskOldPolicy;\n}\n","/**\n * @fileoverview Common Vehicle Types - Vehicle-related types and enums\n * @description Vehicle data structures, models, and enums used throughout the InsurUp platform\n */\n\nimport type { InsuranceParameter } from \"./common.base.js\";\nimport type { LossPayeeClause } from \"./common.property.js\";\n\n// ============================================================================\n// VEHICLE-RELATED ENUMS\n// ============================================================================\n\n/**\n * Vehicle Utilization Styles\n *\n * Comprehensive classification of vehicle usage patterns that determines insurance risk profiles,\n * premium calculations, and regulatory requirements. Different utilization styles have varying risk\n * factors including commercial vs. private use, passenger capacity, cargo types, and operational\n * environments. This classification is essential for proper underwriting and compliance with Turkish\n * traffic and insurance regulations.\n *\n * Sigorta risk profillerini, prim hesaplamalarını ve yasal gereksinimleri belirleyen araç\n * kullanım şekillerinin kapsamlı sınıflandırması. Farklı kullanım tarzları ticari vs. özel kullanım,\n * yolcu kapasitesi, kargo türleri ve operasyonel ortamlar dahil değişen risk faktörlerine sahiptir.\n * Bu sınıflandırma uygun sigorta aracılık hizmetleri ve Türk trafik ve sigorta yönetmeliklerine\n * uyum için gereklidir.\n */\nexport enum VehicleUtilizationStyle {\n /**\n * Vehicle utilization style is unknown or not yet determined.\n * Araç kullanım tarzı bilinmiyor veya henüz belirlenmedi.\n */\n Unknown = \"UNKNOWN\",\n\n /**\n * Private passenger car for personal transportation.\n * Kişisel ulaşım için özel binek otomobil.\n */\n PrivateCar = \"PRIVATE_CAR\",\n\n /**\n * Commercial taxi service for passenger transportation.\n * Yolcu taşımacılığı için ticari taksi hizmeti.\n */\n Taxi = \"TAXI\",\n\n /**\n * Route-based minibus service for scheduled passenger transport.\n * Planlı yolcu taşımacılığı için güzergah bazlı minibüs hizmeti.\n */\n RouteBasedMinibus = \"ROUTE_BASED_MINIBUS\",\n\n /**\n * Medium-sized bus for passenger transportation.\n * Yolcu taşımacılığı için orta boy otobüs.\n */\n MediumBus = \"MEDIUM_BUS\",\n\n /**\n * Large bus for high-capacity passenger transportation.\n * Yüksek kapasiteli yolcu taşımacılığı için büyük otobüs.\n */\n LargeBus = \"LARGE_BUS\",\n\n /**\n * Pickup truck for cargo and utility purposes.\n * Kargo ve hizmet amaçları için kamyonet.\n */\n PickupTruck = \"PICKUP_TRUCK\",\n\n /**\n * Panel van for cargo transportation.\n * Kargo taşımacılığı için panel van.\n */\n PanelVan = \"PANEL_VAN\",\n\n /**\n * Truck for heavy cargo transportation.\n * Ağır kargo taşımacılığı için kamyon.\n */\n Truck = \"TRUCK\",\n\n /**\n * Tractor unit for pulling trailers.\n * Römork çekmek için çekici.\n */\n Tractor = \"TRACTOR\",\n\n /**\n * Motorcycle for personal transportation.\n * Kişisel ulaşım için motosiklet.\n */\n Motorcycle = \"MOTORCYCLE\",\n\n /**\n * Rental car for temporary use.\n * Geçici kullanım için kiralık araç.\n */\n RentalCar = \"RENTAL_CAR\",\n\n /**\n * Armored vehicle for security and protection services.\n * Güvenlik ve koruma hizmetleri için zırhlı araç.\n */\n ArmoredVehicle = \"ARMORED_VEHICLE\",\n\n /**\n * Shared taxi minibus (dolmuş) for public transportation.\n * Toplu taşıma için dolmuş minibüs.\n */\n MinibusSharedTaxi = \"MINIBUS_SHARED_TAXI\",\n\n /**\n * Jeep for off-road and general purpose use.\n * Arazi ve genel amaçlı kullanım için jeep.\n */\n Jeep = \"JEEP\",\n\n /**\n * Sport Activity Vehicle (SAV) jeep for recreational use.\n * Rekreasyonel kullanım için Spor Aktivite Aracı (SAV) jeep.\n */\n JeepSAV = \"JEEP_SAV\",\n\n /**\n * Sport Utility Vehicle (SUV) jeep for versatile use.\n * Çok amaçlı kullanım için Spor Kullanım Aracı (SUV) jeep.\n */\n JeepSUV = \"JEEP_SUV\",\n\n /**\n * Hearse for funeral services.\n * Cenaze hizmetleri için cenaze arabası.\n */\n Hearse = \"HEARSE\",\n\n /**\n * Rental car with chauffeur service.\n * Şoförlü kiralık araç hizmeti.\n */\n ChauffeuredRentalCar = \"CHAUFFEURED_RENTAL_CAR\",\n\n /**\n * Operational rental for business fleet use.\n * İş filo kullanımı için operasyonel kiralık araç.\n */\n OperationalRental = \"OPERATIONAL_RENTAL\",\n\n /**\n * Private minibus for personal or family use.\n * Kişisel veya aile kullanımı için özel minibüs.\n */\n PrivateMinibus = \"PRIVATE_MINIBUS\",\n\n /**\n * Route minibus for scheduled public transportation.\n * Planlı toplu taşıma için güzergah minibüsü.\n */\n RouteMinibus = \"ROUTE_MINIBUS\",\n\n /**\n * Service minibus for employee or student transportation.\n * Çalışan veya öğrenci taşımacılığı için servis minibüsü.\n */\n ServiceMinibus = \"SERVICE_MINIBUS\",\n}\n\n/**\n * Vehicle Fuel Types\n *\n * Defines the various fuel types that vehicles can use, which affects insurance risk assessment,\n * premium calculations, and coverage terms. Different fuel types have varying risk profiles,\n * environmental considerations, and replacement costs that insurers must account for when\n * determining coverage and pricing.\n *\n * Araçların kullanabileceği çeşitli yakıt türlerini tanımlar, bu da sigorta risk değerlendirmesi,\n * prim hesaplamaları ve kapsam koşullarını etkiler. Farklı yakıt türlerinin değişen risk profilleri,\n * çevresel faktörleri ve ikame maliyetleri vardır, sigortacıların kapsam ve fiyatlandırma belirlerken\n * hesaba katması gereken faktörlerdir.\n */\nexport enum VehicleFuelType {\n /**\n * Gasoline-powered vehicles using petrol fuel.\n * Benzin yakıtı kullanan benzinli araçlar.\n */\n Gasoline = \"GASOLINE\",\n\n /**\n * Diesel-powered vehicles using diesel fuel.\n * Dizel yakıtı kullanan dizel araçlar.\n */\n Diesel = \"DIESEL\",\n\n /**\n * LPG (Liquefied Petroleum Gas) powered vehicles.\n * LPG (Sıvılaştırılmış Petrol Gazı) yakıtlı araçlar.\n */\n Lpg = \"LPG\",\n\n /**\n * Electric vehicles powered by battery systems.\n * Batarya sistemleri ile çalışan elektrikli araçlar.\n */\n Electric = \"ELECTRIC\",\n\n /**\n * Vehicles with both LPG and gasoline fuel systems.\n * Hem LPG hem benzin yakıt sistemine sahip araçlar.\n */\n LpgGasoline = \"LPG_GASOLINE\",\n\n /**\n * Hybrid vehicles combining electric and conventional fuel systems.\n * Elektrik ve geleneksel yakıt sistemlerini birleştiren hibrit araçlar.\n */\n Hybrid = \"HYBRID\",\n}\n\n/**\n * Vehicle Accessory Types\n *\n * Defines the categories of aftermarket accessories that can be added to vehicles and covered under\n * insurance policies. These accessories add value to the vehicle and require separate coverage consideration\n * for comprehensive insurance protection. Proper categorization helps determine accurate replacement costs.\n *\n * Araçlara eklenebilecek ve sigorta poliçeleri kapsamında kapsanabilecek sonradan eklenen aksesuar\n * kategorilerini tanımlar. Bu aksesuarlar araca değer katar ve kapsamlı sigorta koruması için ayrı\n * kapsam değerlendirmesi gerektirir. Uygun kategorizasyon doğru ikame maliyetlerini belirlemeye yardımcı olur.\n */\nexport enum VehicleAccessoryType {\n /**\n * Audio systems and sound equipment installed in the vehicle.\n * Araca monte edilen ses sistemleri ve ses ekipmanları.\n */\n Audio = \"audio\",\n\n /**\n * Display screens and navigation systems installed in the vehicle.\n * Araca monte edilen ekran ve navigasyon sistemleri.\n */\n Display = \"display\",\n\n /**\n * Other types of vehicle accessories not classified as audio or display systems.\n * Ses veya ekran sistemleri olarak sınıflandırılmayan diğer araç aksesuar türleri.\n */\n Other = \"other\",\n}\n\n// ============================================================================\n// VEHICLE-RELATED INTERFACES\n// ============================================================================\n\n/**\n * Vehicle fuel information\n *\n * Comprehensive fuel system information for vehicles including fuel type and LPG-specific\n * configurations. LPG vehicles require additional details such as whether the system is custom-installed\n * and the installation cost, which affects insurance coverage and premium calculations. This information\n * is crucial for proper risk assessment and coverage determination.\n *\n * Yakıt türü ve LPG'ye özgü konfigürasyonlar dahil araçlar için kapsamlı yakıt sistemi bilgileri.\n * LPG araçlar sistemin özel olarak monte edilip edilmediği ve montaj maliyeti gibi ek detaylar gerektirir,\n * bu da sigorta kapsamını ve prim hesaplamalarını etkiler. Bu bilgiler uygun risk değerlendirmesi ve\n * kapsam belirlenmesi için kritiktir.\n */\nexport interface VehicleFuel {\n /**\n * The fuel type of the vehicle.\n * Aracın yakıt türü.\n */\n readonly type: VehicleFuelType;\n\n /**\n * Whether the vehicle has a custom LPG installation (applicable for LPG and LPG-Gasoline vehicles).\n * Aracın özel LPG montajına sahip olup olmadığı (LPG ve LPG-Benzin araçları için geçerlidir).\n */\n readonly customLpg?: boolean | null;\n\n /**\n * The price of custom LPG installation if applicable.\n * Varsa özel LPG montajının fiyatı.\n */\n readonly customLpgPrice?: number | null;\n}\n\n/**\n * Vehicle license plate information\n *\n * Represents the Turkish vehicle license plate system consisting of a city code (1-81 representing\n * Turkish provinces) and an optional alphanumeric plate code (up to 6 characters). The city code\n * indicates the province where the vehicle was first registered. This information is essential for\n * vehicle identification, insurance coverage determination, and compliance with Turkish traffic regulations.\n *\n * Şehir kodu (Türk illerini temsil eden 1-81) ve isteğe bağlı alfanümerik plaka kodundan\n * (6 karaktere kadar) oluşan Türk araç plaka sistemini temsil eder. Şehir kodu, aracın ilk tescil\n * edildiği ili gösterir. Bu bilgiler araç tanımlaması, sigorta kapsamı belirlenmesi ve Türk trafik\n * yönetmeliklerine uyum için gereklidir.\n */\nexport interface VehiclePlate {\n /**\n * Turkish city code (1-81 representing provinces).\n * Türk şehir kodunu (illeri temsil eden 1-81).\n */\n readonly city: number;\n\n /**\n * Optional alphanumeric plate code (up to 6 characters).\n * İsteğe bağlı alfanümerik plaka kodu (6 karaktere kadar).\n */\n readonly code?: string | null;\n}\n\n/**\n * Vehicle registration document serial information\n *\n * Represents the serial number of vehicle registration documents used in the Turkish vehicle registration\n * system. This unique identifier consists of a 2-letter alphabetic code followed by a 6-digit numeric sequence.\n * The document serial is essential for vehicle identification in insurance processes, helping to verify the\n * legitimacy of vehicle registration and prevent fraud. It serves as a secondary identification method\n * alongside the chassis number.\n *\n * Türk araç tescil sisteminde kullanılan araç tescil belgelerinin seri numarasını temsil eder. Bu benzersiz\n * tanımlayıcı, 2 harfli alfabetik kod ve ardından 6 haneli sayısal diziden oluşur. Belge seri numarası,\n * sigorta süreçlerinde araç tanımlaması için gereklidir, araç tescilinin meşruiyetini doğrulamaya ve\n * dolandırıcılığı önlemeye yardımcı olur. Şasi numarasının yanında ikincil tanımlama yöntemi olarak hizmet eder.\n */\nexport interface VehicleDocumentSerial {\n /**\n * The 2-letter alphabetic code of the document serial.\n * Belge seri numarasının 2 harfli alfabetik kodu.\n */\n readonly code: string;\n\n /**\n * The 6-digit numeric part of the document serial.\n * Belge seri numarasının 6 haneli sayısal kısmı.\n */\n readonly number: string;\n}\n\n/**\n * Vehicle model information\n *\n * Complete vehicle identification including manufacturing year, brand, and specific model type.\n * This information is essential for insurance underwriting as it determines vehicle value, safety\n * ratings, theft risk, repair costs, and appropriate coverage terms. The combination of year,\n * brand, and type creates a unique vehicle profile for accurate risk assessment and pricing.\n *\n * Üretim yılı, marka ve belirli model türü dahil eksiksiz araç tanımlaması. Bu bilgiler,\n * araç değeri, güvenlik puanları, hırsızlık riski, tamir maliyetleri ve uygun kapsam koşullarını\n * belirlediği için sigorta aracılık hizmetleri için gereklidir. Yıl, marka ve tip kombinasyonu\n * doğru risk değerlendirmesi ve fiyatlandırma için benzersiz araç profili oluşturur.\n */\nexport interface VehicleModel {\n /**\n * The vehicle brand information.\n * Araç marka bilgileri.\n */\n readonly brand: InsuranceParameter;\n\n /**\n * The manufacturing year of the vehicle (must be between 1900 and current year).\n * Aracın üretim yılı (1900 ile mevcut yıl arasında olmalıdır).\n */\n readonly year: number;\n\n /**\n * The specific vehicle type/model information.\n * Belirli araç türü/model bilgileri.\n */\n readonly type: InsuranceParameter;\n}\n\n/**\n * Vehicle accessory base interface\n *\n * Base interface that defines the common structure for all types of vehicle accessories.\n * Vehicle accessories are aftermarket additions that increase the vehicle's value and may require\n * separate insurance coverage. This interface ensures proper categorization and value tracking for\n * insurance purposes.\n *\n * Tüm araç aksesuarı türleri için ortak yapıyı tanımlayan temel arayüz. Araç aksesuarları\n * aracın değerini artıran ve ayrı sigorta kapsamı gerektirebilecek sonradan eklenen ürünlerdir.\n * Bu arayüz sigorta amaçları için uygun kategorizasyon ve değer takibini sağlar.\n */\nexport interface VehicleAccessory {\n /**\n * The type of vehicle accessory.\n * Araç aksesuarının türü.\n */\n readonly $type: VehicleAccessoryType;\n\n /**\n * The total price/value of the accessory for insurance coverage calculation.\n * Sigorta kapsamı hesaplaması için aksesuarın toplam fiyatı/değeri.\n */\n readonly price: number;\n}\n\n/**\n * Vehicle previous insurance policy information\n *\n * Contains complete information about a vehicle's previous insurance coverage including policy numbers,\n * renewal information, insurance company details, and agent information. This data is crucial for\n * maintaining insurance continuity, determining no-claims bonuses, assessing risk history, and\n * preventing insurance fraud. Required for policy transfers and renewals in the Turkish insurance market.\n *\n * Poliçe numaraları, yenileme bilgileri, sigorta şirketi detayları ve acente bilgileri dahil\n * aracın önceki sigorta kapsamı hakkında eksiksiz bilgileri içerir. Bu veriler sigorta sürekliliğini\n * korumak, hasarsızlık indirimi belirlemek, risk geçmişini değerlendirmek ve sigorta dolandırıcılığını\n * önlemek için kritiktir. Türk sigorta piyasasında poliçe devri ve yenilemeler için gereklidir.\n */\nexport interface VehicleOldPolicy {\n /**\n * Insurance company's policy number (6-20 digits).\n * Sigorta şirketinin poliçe numarası (6-20 hane).\n */\n readonly insuranceCompanyPolicyNumber: number;\n\n /**\n * Insurance company's renewal number (0-9).\n * Sigorta şirketinin yenileme numarası (0-9).\n */\n readonly insuranceCompanyRenewalNumber: number;\n\n /**\n * Insurance company's reference code.\n * Sigorta şirketinin referans kodu.\n */\n readonly insuranceCompanyReference: string;\n\n /**\n * Agent number associated with the policy (3-18 digits).\n * Poliçe ile ilişkili acente numarası (3-18 hane).\n */\n readonly agentNumber: number;\n\n /**\n * Policy end date if available.\n * Varsa poliçe bitiş tarihi.\n */\n readonly endDate?: string | null;\n}\n\n/**\n * Vehicle Engine Information\n * Araç Motor Bilgileri\n *\n * Represents a vehicle engine number for unique engine identification and vehicle verification.\n * Used in insurance systems to accurately identify and track vehicle engines for coverage and claims.\n */\nexport interface VehicleEngine {\n /**\n * The engine number of the vehicle (6-40 characters)\n * Aracın motor numarası (6-40 karakter)\n */\n readonly number: string;\n}\n\n/**\n * Vehicle Chassis Information\n * Araç Şasi Bilgileri\n *\n * Represents a vehicle chassis number for unique vehicle identification.\n * Used in insurance systems to properly identify and track vehicles across policies and claims.\n */\nexport interface VehicleChassis {\n /**\n * The chassis number of the vehicle (4-17 characters)\n * Aracın şasi numarası (4-17 karakter)\n */\n readonly number: string;\n}\n\n/**\n * Vehicle Registration Date\n * Araç Tescil Tarihi\n *\n * Represents the official registration date of a vehicle in the Turkish vehicle registration system.\n * Used for determining vehicle age, depreciation calculations, and insurance coverage eligibility.\n */\nexport interface VehicleRegistrationDate {\n /**\n * The registration date value\n * Tescil tarihi değeri\n */\n readonly value: string; // DateOnly in C# - using string for JSON compatibility\n}\n\n/**\n * Vehicle Seat Number\n * Araç Koltuk Sayısı\n *\n * Represents the number of seats in a vehicle for insurance classification and premium calculation.\n * Used to determine vehicle category and appropriate coverage terms based on passenger capacity.\n */\nexport interface VehicleSeatNumber {\n /**\n * Number of seats in the vehicle (1-50)\n * Araçtaki koltuk sayısı (1-50)\n */\n readonly value: number; // byte in C# but number in TypeScript\n}\n\n/**\n * Vehicle information snapshot for proposals\n * Teklifler için araç bilgisi anlık görüntüsü\n *\n * Represents comprehensive vehicle information captured in insurance proposal snapshots.\n * Contains all physical, technical, and legal characteristics of a vehicle required for insurance underwriting.\n *\n * NOTE: This interface should match the exact C# ProposalSnapshotVehicle structure.\n * Individual property types should be properly defined based on their C# counterparts.\n */\nexport interface ProposalSnapshotVehicle {\n /**\n * Unique identifier for the vehicle\n * Araç için benzersiz tanımlayıcı\n */\n readonly id: string;\n\n /**\n * Vehicle license plate information\n * Araç plaka bilgileri\n */\n readonly plate: VehiclePlate;\n\n /**\n * Vehicle model information including make, model, and year\n * Marka, model ve yıl dahil araç model bilgileri\n */\n readonly model: VehicleModel;\n\n /**\n * How the vehicle is utilized (personal, commercial, taxi, etc.)\n * Aracın nasıl kullanıldığı (kişisel, ticari, taksi, vb.)\n */\n readonly utilizationStyle: VehicleUtilizationStyle;\n\n /**\n * Vehicle fuel type\n * Araç yakıt tipi\n */\n readonly fuel?: VehicleFuel;\n\n /**\n * Vehicle engine information\n * Araç motor bilgileri\n */\n readonly engine: VehicleEngine;\n\n /**\n * Vehicle chassis information\n * Araç şasi bilgileri\n */\n readonly chassis: VehicleChassis;\n\n /**\n * Vehicle registration date\n * Araç tescil tarihi\n */\n readonly registrationDate: VehicleRegistrationDate;\n\n /**\n * Number of seats in the vehicle\n * Araçtaki koltuk sayısı\n */\n readonly seatNumber: VehicleSeatNumber;\n\n /**\n * Vehicle accessories and additional equipment\n * Araç aksesuarları ve ek donanım\n */\n readonly accessories: VehicleAccessory[];\n\n /**\n * Vehicle document serial number\n * Araç belge seri numarası\n */\n readonly documentSerial?: VehicleDocumentSerial;\n\n /**\n * Information about existing vehicle insurance policy\n * Mevcut araç sigorta poliçesi bilgileri\n */\n readonly oldPolicy?: VehicleOldPolicy;\n\n /**\n * Loss payee clause for financing arrangements\n * Finansman düzenlemeleri için lehtar klozu\n */\n readonly lossPayeeClause?: LossPayeeClause;\n\n /**\n * Whether the vehicle has a valid license plate and document serial number\n * Aracın geçerli bir plakası ve belge seri numarası olup olmadığı\n */\n readonly hasPlate: boolean;\n}\n","/**\n * @fileoverview Date/Time Types\n * @description Common date and time types for the InsurUp TypeScript SDK\n */\n\n/**\n * DateTime class for handling ISO 8601 datetime strings.\n * Serializable to/from JSON as ISO 8601 string.\n *\n * @example\n * const dt = new DateTime(\"2024-01-15T10:30:00Z\");\n * dt.toDate(); // Native Date object\n * dt.toISOString(); // \"2024-01-15T10:30:00.000Z\"\n * JSON.stringify(dt); // \"\\\"2024-01-15T10:30:00.000Z\\\"\"\n *\n * // From native Date\n * const dt2 = DateTime.fromDate(new Date());\n */\nexport class DateTime {\n private readonly _value: Date;\n\n constructor(value: string | Date) {\n this._value = typeof value === \"string\" ? new Date(value) : value;\n }\n\n /** Creates DateTime from a native Date object */\n static fromDate(date: Date): DateTime {\n return new DateTime(date);\n }\n\n /** Creates DateTime from current time */\n static now(): DateTime {\n return new DateTime(new Date());\n }\n\n /** Returns the native Date object */\n toDate(): Date {\n return this._value;\n }\n\n /** Returns ISO 8601 string representation */\n toISOString(): string {\n return this._value.toISOString();\n }\n\n /** Returns ISO 8601 string (for JSON serialization) */\n toJSON(): string {\n return this.toISOString();\n }\n\n /** Returns ISO 8601 string */\n toString(): string {\n return this.toISOString();\n }\n\n /** Returns timestamp in milliseconds */\n valueOf(): number {\n return this._value.valueOf();\n }\n}\n\n/**\n * DateOnly class for handling date-only strings (YYYY-MM-DD format).\n * Serializable to/from JSON as YYYY-MM-DD string.\n *\n * @example\n * const date = new DateOnly(\"2024-01-15\");\n * date.toDate(); // Native Date object (at midnight UTC)\n * date.toString(); // \"2024-01-15\"\n * JSON.stringify(date); // \"\\\"2024-01-15\\\"\"\n *\n * // From native Date\n * const date2 = DateOnly.fromDate(new Date());\n */\nexport class DateOnly {\n private readonly _year: number;\n private readonly _month: number;\n private readonly _day: number;\n\n constructor(value: string | Date) {\n if (typeof value === \"string\") {\n const parts = value.split(\"-\").map(Number);\n this._year = parts[0] ?? 0;\n this._month = parts[1] ?? 1;\n this._day = parts[2] ?? 1;\n } else {\n this._year = value.getUTCFullYear();\n this._month = value.getUTCMonth() + 1;\n this._day = value.getUTCDate();\n }\n }\n\n /** Creates DateOnly from a native Date object */\n static fromDate(date: Date): DateOnly {\n return new DateOnly(date);\n }\n\n /** Creates DateOnly from current date */\n static today(): DateOnly {\n return new DateOnly(new Date());\n }\n\n /** Returns the native Date object (at midnight UTC) */\n toDate(): Date {\n return new Date(Date.UTC(this._year, this._month - 1, this._day));\n }\n\n /** Returns YYYY-MM-DD string representation */\n toString(): string {\n const y = this._year.toString().padStart(4, \"0\");\n const m = this._month.toString().padStart(2, \"0\");\n const d = this._day.toString().padStart(2, \"0\");\n return `${y}-${m}-${d}`;\n }\n\n /** Returns YYYY-MM-DD string (for JSON serialization) */\n toJSON(): string {\n return this.toString();\n }\n\n /** Returns timestamp in milliseconds */\n valueOf(): number {\n return this.toDate().valueOf();\n }\n\n /** Gets the year */\n get year(): number {\n return this._year;\n }\n\n /** Gets the month (1-12) */\n get month(): number {\n return this._month;\n }\n\n /** Gets the day (1-31) */\n get day(): number {\n return this._day;\n }\n}\n","/**\n * Customer management contracts for the InsurUp TypeScript SDK.\n *\n * Provides comprehensive customer management operations for handling customer profiles, contact information,\n * health data, communication flows, and external customer data integration within the insurance ecosystem.\n *\n * Sigorta ekosistemi içinde müşteri profilleri, iletişim bilgileri, sağlık verileri, iletişim akışları\n * ve harici müşteri veri entegrasyonunu yönetmek için kapsamlı müşteri yönetimi işlemlerini sağlar.\n */\n\nimport type { CustomerType } from \"./common.js\";\nimport type {\n InsuranceParameter,\n UserReference,\n CustomerPhoneNumber,\n PropertyAddress,\n} from \"./common.js\";\nimport type { DateTime, DateOnly } from \"./common.date.js\";\n\n// ============================================================================\n// ENUMS\n// ============================================================================\n\n/**\n * Gender enumeration\n */\nexport enum Gender {\n Unknown = \"UNKNOWN\",\n Male = \"MALE\",\n Female = \"FEMALE\",\n Other = \"OTHER\",\n}\n\n/**\n * Education status enumeration\n */\nexport enum EducationStatus {\n Unknown = \"UNKNOWN\",\n PrimarySchool = \"PRIMARY_SCHOOL\",\n MiddleSchool = \"MIDDLE_SCHOOL\",\n HighSchool = \"HIGH_SCHOOL\",\n University = \"UNIVERSITY\",\n Postgraduate = \"POSTGRADUATE\",\n Doctorate = \"DOCTORATE\",\n Other = \"OTHER\",\n}\n\n/**\n * Nationality enumeration\n */\nexport enum Nationality {\n Unknown = \"UNKNOWN\",\n Turk = \"TURK\",\n Other = \"OTHER\",\n}\n\n/**\n * Marital status enumeration\n */\nexport enum MaritalStatus {\n Unknown = \"UNKNOWN\",\n Single = \"SINGLE\",\n Married = \"MARRIED\",\n}\n\n/**\n * Job/occupation enumeration\n */\nexport enum Job {\n Unknown = \"UNKNOWN\",\n Banker = \"BANKER\",\n CorporateEmployee = \"CORPORATE_EMPLOYEE\",\n LtdEmployee = \"LTD_EMPLOYEE\",\n Police = \"POLICE\",\n MilitaryPersonnel = \"MILITARY_PERSONNEL\",\n RetiredSpouse = \"RETIRED_SPOUSE\",\n Teacher = \"TEACHER\",\n Doctor = \"DOCTOR\",\n Pharmacist = \"PHARMACIST\",\n Nurse = \"NURSE\",\n HealthcareWorker = \"HEALTHCARE_WORKER\",\n Lawyer = \"LAWYER\",\n Judge = \"JUDGE\",\n Prosecutor = \"PROSECUTOR\",\n Freelancer = \"FREELANCER\",\n Farmer = \"FARMER\",\n Instructor = \"INSTRUCTOR\",\n ReligiousOfficial = \"RELIGIOUS_OFFICIAL\",\n AssociationManager = \"ASSOCIATION_MANAGER\",\n Officer = \"OFFICER\",\n Retired = \"RETIRED\",\n Housewife = \"HOUSEWIFE\",\n}\n\n/**\n * Contact flow state enumeration.\n * Tracks the current status of a customer contact flow or communication workflow process.\n */\nexport enum ContactFlowState {\n /** The contact flow is currently active and in progress */\n Active = \"ACTIVE\",\n /** The contact flow has completed successfully */\n Succeeded = \"SUCCEEDED\",\n /** The contact flow has failed to complete successfully */\n Failed = \"FAILED\",\n}\n\n/**\n * Contact type enumeration.\n * Defines the specific communication method or channel used for customer interactions.\n */\nexport enum ContactType {\n /** Contact via telephone or phone call */\n PhoneCall = \"PHONE_CALL\",\n}\n\n/**\n * Contact state enumeration.\n * Tracks the execution status of planned customer contacts or communication attempts.\n */\nexport enum ContactState {\n /** The contact has been planned or scheduled but not yet executed */\n Planned = \"PLANNED\",\n /** The contact has been successfully executed or completed */\n Occurred = \"OCCURRED\",\n /** The contact was planned but did not occur as scheduled */\n NotOccurred = \"NOT_OCCURRED\",\n}\n\n/**\n * Surgery enumeration for health data\n */\nexport enum Surgery {\n Other = \"OTHER\",\n OrganTransplant = \"ORGAN_TRANSPLANT\",\n BoneMarrowTransplant = \"BONE_MARROW_TRANSPLANT\",\n HeartSurgery = \"HEART_SURGERY\",\n BrainSurgery = \"BRAIN_SURGERY\",\n}\n\n/**\n * Disease enumeration for health data\n */\nexport enum Disease {\n Other = \"OTHER\",\n KidneyFailure = \"KIDNEY_FAILURE\",\n Cancer = \"CANCER\",\n LiverDisease = \"LIVER_DISEASE\",\n HeartFailure = \"HEART_FAILURE\",\n HeartRhythmAndConductionDisorders = \"HEART_RHYTHM_AND_CONDUCTION_DISORDERS\",\n ImmuneSystemDisorders = \"IMMUNE_SYSTEM_DISORDERS\",\n}\n\n/**\n * Consent type enumeration for customer data processing permissions.\n * Used to track customer consent for data privacy regulations (KVKK/GDPR).\n */\nexport enum ConsentType {\n /** KVKK (Personal Data Protection Law) consent */\n KVKK = \"KVKK\",\n /** ETK (Electronic Commerce) consent */\n ETK = \"ETK\",\n}\n\n// ============================================================================\n// SUPPORTING TYPES\n// ============================================================================\n\n// === REQUEST CONTRACTS ===\n\n/**\n * Represents a request to create a new customer in the InsurUp system. Supports individual, foreign, and company customer types with comprehensive customer information.\n *\n * InsurUp sisteminde yeni müşteri oluşturma talebini temsil eder. Kapsamlı müşteri bilgileri ile bireysel, yabancı ve şirket müşteri türlerini destekler.\n */\nexport type CreateCustomerRequest =\n | CreateCustomerRequestIndividual\n | CreateCustomerRequestForeign\n | CreateCustomerRequestCompany;\n\n/**\n * Base interface for customer creation requests containing common fields.\n *\n * Ortak alanları içeren müşteri oluşturma talepleri için temel arayüz.\n */\ninterface CreateCustomerRequestBase {\n /**\n * Specifies the category of customer being created in the system. This determines which fields\n * are required and how the customer will be processed in insurance workflows. Each type has\n * specific identification requirements and regulatory compliance needs.\n *\n * Sistemde oluşturulan müşterinin kategorisini belirtir. Bu, hangi alanların zorunlu olduğunu\n * ve müşterinin sigorta iş akışlarında nasıl işleneceğini belirler. Her tür, özel kimlik gereksinimleri\n * ve yasal uyum ihtiyaçlarına sahiptir.\n */\n type: CustomerType;\n\n /**\n * Primary email address for customer communications, policy notifications, and digital document delivery.\n * This field is masked with redaction for data protection compliance. Email is used for sending policy documents,\n * renewal notices, claim updates, and other important insurance communications.\n *\n * Müşteri iletişimi, poliçe bildirimleri ve dijital belge teslimatı için birincil e-posta adresi.\n * Bu alan veri koruması uyumluluğu için maskeleme ile gizlenir. E-posta, poliçe belgelerini, yenileme\n * bildirimlerini, hasar güncellemelerini ve diğer önemli sigorta iletişimlerini göndermek için kullanılır.\n */\n email?: string | null;\n\n /**\n * Primary phone number for customer contact, emergency notifications, and customer service communications.\n * This field is masked for data protection compliance. Used for claim notifications, policy confirmations,\n * and urgent insurance-related communications.\n *\n * Müşteri iletişimi, acil durum bildirimleri ve müşteri hizmetleri iletişimi için birincil telefon numarası.\n * Bu alan veri koruması uyumluluğu için maskelenir. Hasar bildirimleri, poliçe onayları ve acil sigorta\n * ile ilgili iletişimler için kullanılır.\n */\n phoneNumber?: CustomerPhoneNumber | null;\n\n /**\n * Reference to the city where the customer is located. Used for risk assessment, pricing calculations,\n * and regional insurance regulations. Turkish cities are numbered 1-81 according to license plate codes,\n * which affects insurance premium calculations and coverage availability.\n *\n * Müşterinin bulunduğu şehir referansı. Risk değerlendirmesi, fiyatlandırma hesaplamaları ve bölgesel\n * sigorta düzenlemeleri için kullanılır. Türk şehirleri plaka kodlarına göre 1-81 arasında numaralandırılır,\n * bu da sigorta prim hesaplamalarını ve teminat kullanılabilirliğini etkiler.\n */\n cityReference?: string | null;\n\n /**\n * Reference to the district within the city where the customer is located. Provides more precise\n * location information for risk assessment and local insurance regulations. District-level data\n * helps determine specific hazard zones, theft rates, and other location-based risk factors.\n *\n * Müşterinin bulunduğu şehir içindeki ilçe referansı. Risk değerlendirmesi ve yerel sigorta\n * düzenlemeleri için daha kesin konum bilgisi sağlar. İlçe düzeyindeki veriler, belirli tehlike\n * bölgelerini, hırsızlık oranlarını ve diğer konum tabanlı risk faktörlerini belirlemeye yardımcı olur.\n */\n districtReference?: string | null;\n\n /**\n * Indicates whether the system should attempt to automatically populate missing customer information\n * from external data sources (e.g., government databases, credit bureaus). This feature helps streamline\n * customer onboarding by reducing manual data entry requirements while ensuring data accuracy.\n *\n * Sistemin eksik müşteri bilgilerini dış veri kaynaklarından (örn. devlet veritabanları, kredi büroları)\n * otomatik olarak doldurmaya çalışıp çalışmayacağını belirtir. Bu özellik, veri doğruluğunu sağlarken\n * manuel veri girişi gereksinimlerini azaltarak müşteri katılım sürecini kolaylaştırmaya yardımcı olur.\n */\n fillMissingFields: boolean;\n}\n\n/**\n * Specialized request for creating individual customers who are Turkish citizens. Requires Turkish\n * National Identity Number (TC Kimlik No) and supports comprehensive demographic information including\n * personal details, education, employment, and marital status. This information is essential for\n * insurance underwriting, risk assessment, and regulatory compliance in the Turkish insurance market.\n *\n * Türk vatandaşı olan bireysel müşteri oluşturma için özel talep. Türkiye Cumhuriyeti Kimlik Numarası\n * (TC Kimlik No) gerektirir ve kişisel detaylar, eğitim, istihdam ve medeni durum dahil kapsamlı demografik\n * bilgileri destekler. Bu bilgiler, Türk sigorta piyasasında sigorta sigortacılığı, risk değerlendirmesi\n * ve yasal uyum için gereklidir.\n */\nexport interface CreateCustomerRequestIndividual extends CreateCustomerRequestBase {\n type: CustomerType.Individual;\n\n /**\n * The 11-digit Turkish National Identity Number (TC Kimlik Numarası) that uniquely identifies\n * Turkish citizens. This is a mandatory field for individual customers and is used for identity\n * verification, government integrations, and regulatory compliance. The number is validated\n * against government databases to ensure authenticity.\n *\n * Türk vatandaşlarını benzersiz şekilde tanımlayan 11 haneli Türkiye Cumhuriyeti Kimlik Numarası.\n * Bu, bireysel müşteriler için zorunlu bir alandır ve kimlik doğrulama, devlet entegrasyonları ve\n * yasal uyum için kullanılır. Numara, otantikliği sağlamak için devlet veritabanlarına karşı doğrulanır.\n */\n identityNumber: string;\n\n /**\n * Complete name of the individual customer as registered in official documents. Used for policy\n * issuance, claim processing, and legal documentation. Must match official identification documents\n * for verification purposes.\n *\n * Resmi belgelerde kayıtlı olduğu şekliyle bireysel müşterinin tam adı. Poliçe düzenleme, hasar\n * işleme ve yasal belgelendirme için kullanılır. Doğrulama amacıyla resmi kimlik belgelerindeki\n * adla eşleşmesi gerekir.\n */\n fullName?: string | null;\n\n /**\n * Date of birth of the individual customer. Critical for age-based risk assessment, premium\n * calculations, and eligibility for certain insurance products. Used to verify identity and\n * ensure compliance with age-related insurance regulations.\n *\n * Bireysel müşterinin doğum tarihi. Yaş tabanlı risk değerlendirmesi, prim hesaplamaları ve\n * belirli sigorta ürünlerine uygunluk için kritiktir. Kimlik doğrulama ve yaşla ilgili sigorta\n * düzenlemelerine uyum sağlamak için kullanılır.\n */\n birthDate?: string | null;\n\n /**\n * Gender specification of the individual customer. Used for statistical analysis, actuarial\n * calculations, and certain insurance product eligibility. Some insurance products may have\n * gender-specific pricing or coverage options based on risk assessment data.\n *\n * Bireysel müşterinin cinsiyet belirtimi. İstatistiksel analiz, aktüeryal hesaplamalar ve belirli\n * sigorta ürün uygunluğu için kullanılır. Bazı sigorta ürünleri, risk değerlendirme verilerine dayalı\n * olarak cinsiyete özgü fiyatlandırma veya teminat seçeneklerine sahip olabilir.\n */\n gender?: Gender | null;\n\n /**\n * Current marital status of the individual customer. Affects certain insurance products, especially\n * life insurance beneficiary designations, family coverage options, and dependent coverage eligibility.\n * Important for household risk assessment and insurance planning.\n *\n * Bireysel müşterinin mevcut medeni durumu. Belirli sigorta ürünlerini, özellikle hayat sigortası\n * lehtar atamalarını, aile teminat seçeneklerini ve bağımlı teminat uygunluğunu etkiler. Hane halkı\n * risk değerlendirmesi ve sigorta planlaması için önemlidir.\n */\n maritalStatus?: MaritalStatus | null;\n\n /**\n * Nationality of the individual customer. Important for regulatory compliance, international\n * insurance coverage, and cross-border claim processing. Different nationalities may have\n * specific requirements or restrictions for certain insurance products.\n *\n * Bireysel müşterinin vatandaşlığı. Yasal uyum, uluslararası sigorta teminatı ve sınır ötesi\n * hasar işleme için önemlidir. Farklı vatandaşlıklar, belirli sigorta ürünleri için özel gereksinimler\n * veya kısıtlamalara sahip olabilir.\n */\n nationality?: Nationality | null;\n\n /**\n * Highest level of education completed by the individual customer. Used for demographic profiling,\n * risk assessment, and targeted insurance product recommendations. Education level can correlate\n * with income potential and insurance needs.\n *\n * Bireysel müşteri tarafından tamamlanan en yüksek eğitim seviyesi. Demografik profilleme, risk\n * değerlendirmesi ve hedefli sigorta ürün önerileri için kullanılır. Eğitim seviyesi, gelir potansiyeli\n * ve sigorta ihtiyaçları ile ilişkilendirilebilir.\n */\n educationStatus?: EducationStatus | null;\n\n /**\n * Current job or occupation of the individual customer. Critical for occupational risk assessment,\n * professional liability coverage, and industry-specific insurance needs. Certain high-risk occupations\n * may affect premium calculations or coverage availability.\n *\n * Bireysel müşterinin mevcut işi veya mesleği. Mesleki risk değerlendirmesi, mesleki sorumluluk\n * teminatı ve sektöre özgü sigorta ihtiyaçları için kritiktir. Belirli yüksek riskli meslekler,\n * prim hesaplamalarını veya teminat kullanılabilirliğini etkileyebilir.\n */\n job?: Job | null;\n}\n\n/**\n * Specialized request for creating customers who are foreign nationals residing in or visiting Turkey.\n * Requires foreign identification (passport number, foreign ID) and supports the same demographic\n * information as individual customers. Special considerations apply for foreign customers regarding\n * documentation requirements and regulatory compliance.\n *\n * Türkiye'de ikamet eden veya ziyaret eden yabancı vatandaş müşteriler oluşturma için özel talep.\n * Yabancı kimlik (pasaport numarası, yabancı kimlik) gerektirir ve bireysel müşterilerle aynı demografik\n * bilgileri destekler. Belgelendirme gereksinimleri ve yasal uyum konusunda yabancı müşteriler için\n * özel hususlar geçerlidir.\n */\nexport interface CreateCustomerRequestForeign extends CreateCustomerRequestBase {\n type: CustomerType.Foreign;\n\n /**\n * Foreign identification number such as passport number or foreign national ID number.\n * This is mandatory for foreign customers and is used for identity verification and regulatory\n * compliance for non-Turkish citizens seeking insurance coverage in Turkey.\n *\n * Pasaport numarası veya yabancı ulusal kimlik numarası gibi yabancı kimlik numarası.\n * Bu, yabancı müşteriler için zorunludur ve Türkiye'de sigorta teminatı arayan Türk olmayan\n * vatandaşlar için kimlik doğrulama ve yasal uyum için kullanılır.\n */\n identityNumber: string;\n\n /**\n * Complete name of the foreign customer as it appears on their passport or official foreign\n * identification documents. Must match identification documents for verification and policy issuance.\n *\n * Yabancı müşterinin pasaport veya resmi yabancı kimlik belgelerinde göründüğü şekliyle tam adı.\n * Doğrulama ve poliçe düzenleme için kimlik belgeleriyle eşleşmesi gerekir.\n */\n fullName?: string | null;\n\n /**\n * Date of birth of the foreign customer as recorded in their official identification documents.\n * Used for age verification, risk assessment, and eligibility determination for insurance products.\n *\n * Yabancı müşterinin resmi kimlik belgelerinde kayıtlı doğum tarihi. Yaş doğrulama, risk\n * değerlendirmesi ve sigorta ürünlerine uygunluk belirleme için kullanılır.\n */\n birthDate?: string | null;\n\n /**\n * Gender specification of the foreign customer for demographic profiling and insurance\n * product eligibility assessment.\n *\n * Demografik profilleme ve sigorta ürün uygunluk değerlendirmesi için yabancı müşterinin\n * cinsiyet belirtimi.\n */\n gender?: Gender | null;\n\n /**\n * Current marital status of the foreign customer, affecting coverage options and beneficiary\n * designations for insurance products.\n *\n * Yabancı müşterinin mevcut medeni durumu, sigorta ürünleri için teminat seçeneklerini ve\n * lehtar atamalarını etkiler.\n */\n maritalStatus?: MaritalStatus | null;\n\n /**\n * Country of citizenship for the foreign customer. Essential for international insurance\n * coverage, cross-border regulations, and diplomatic considerations.\n *\n * Yabancı müşterinin vatandaşlık ülkesi. Uluslararası sigorta teminatı, sınır ötesi düzenlemeler\n * ve diplomatik hususlar için gereklidir.\n */\n nationality?: Nationality | null;\n\n /**\n * Highest level of education completed by the foreign customer for demographic analysis\n * and insurance product recommendations.\n *\n * Demografik analiz ve sigorta ürün önerileri için yabancı müşteri tarafından tamamlanan\n * en yüksek eğitim seviyesi.\n */\n educationStatus?: EducationStatus | null;\n\n /**\n * Current job or occupation of the foreign customer for occupational risk assessment\n * and professional insurance needs evaluation.\n *\n * Mesleki risk değerlendirmesi ve profesyonel sigorta ihtiyaç değerlendirmesi için yabancı\n * müşterinin mevcut işi veya mesleği.\n */\n job?: Job | null;\n}\n\n/**\n * Specialized request for creating corporate customers and business entities. Requires tax number\n * for identification and company title for official records. Corporate customers have different\n * insurance needs, regulatory requirements, and risk profiles compared to individual customers.\n * Used for commercial insurance products and business-related coverage.\n *\n * Kurumsal müşteriler ve işletmeler oluşturma için özel talep. Kimlik için vergi numarası ve\n * resmi kayıtlar için şirket unvanı gerektirir. Kurumsal müşteriler, bireysel müşterilere kıyasla\n * farklı sigorta ihtiyaçları, yasal gereksinimler ve risk profillerine sahiptir. Ticari sigorta\n * ürünleri ve işletme ile ilgili teminatlar için kullanılır.\n */\nexport interface CreateCustomerRequestCompany extends CreateCustomerRequestBase {\n type: CustomerType.Company;\n\n /**\n * Official registered name of the company as it appears in commercial registry records.\n * Used for policy issuance, legal documentation, and official correspondence. Must match\n * trade registry records for verification and compliance purposes.\n *\n * Ticaret sicili kayıtlarında göründüğü şekliyle şirketin resmi tescilli adı. Poliçe düzenleme,\n * yasal belgelendirme ve resmi yazışmalar için kullanılır. Doğrulama ve uyum amacıyla ticaret\n * sicili kayıtlarıyla eşleşmesi gerekir.\n */\n title: string;\n\n /**\n * Official tax identification number of the company issued by Turkish tax authorities.\n * Essential for corporate identification, tax compliance, and business insurance regulations.\n * Used for invoicing, premium calculations, and regulatory reporting requirements.\n *\n * Türk vergi makamları tarafından verilen şirketin resmi vergi kimlik numarası. Kurumsal\n * kimlik, vergi uyumu ve işletme sigorta düzenlemeleri için gereklidir. Faturalama, prim\n * hesaplamaları ve yasal raporlama gereksinimleri için kullanılır.\n */\n taxNumber: string;\n}\n\n/**\n * Represents a request to retrieve detailed customer information from the InsurUp system.\n *\n * InsurUp sisteminden detaylı müşteri bilgilerini almak için talebi temsil eder.\n */\nexport interface GetCustomerRequest {\n /**\n * Unique identifier (GUID) of the customer whose detailed information is being requested.\n * This ID was assigned during customer creation and serves as the primary key for retrieving\n * the complete customer profile from the database.\n *\n * Detaylı bilgileri talep edilen müşterinin benzersiz tanımlayıcısı (GUID). Bu ID müşteri\n * oluşturma sırasında atanmıştır ve veritabanından tam müşteri profilini almak için birincil\n * anahtar görevi görür.\n */\n customerId: string;\n}\n\n/**\n * Represents a request to update existing customer information in the InsurUp system. Supports individual, foreign, and company customer types with comprehensive update capabilities.\n *\n * InsurUp sisteminde mevcut müşteri bilgilerini güncelleme talebini temsil eder. Kapsamlı güncelleme yetenekleri ile bireysel, yabancı ve şirket müşteri türlerini destekler.\n */\nexport type UpdateCustomerRequest =\n | UpdateCustomerRequestIndividual\n | UpdateCustomerRequestForeign\n | UpdateCustomerRequestCompany;\n\n/**\n * Base interface for customer update requests containing common fields.\n *\n * Ortak alanları içeren müşteri güncelleme talepleri için temel arayüz.\n */\ninterface UpdateCustomerRequestBase {\n type: CustomerType;\n id: string;\n cityReference?: string | null;\n districtReference?: string | null;\n primaryEmail?: string | null;\n primaryPhoneNumber?: CustomerPhoneNumber | null;\n fillMissingFields: boolean;\n}\n\n/**\n * Specialized update request for individual customers who are Turkish citizens.\n */\nexport interface UpdateCustomerRequestIndividual extends UpdateCustomerRequestBase {\n type: CustomerType.Individual;\n fullName?: string | null;\n birthDate?: string | null;\n gender?: Gender | null;\n maritalStatus?: MaritalStatus | null;\n nationality?: Nationality | null;\n educationStatus?: EducationStatus | null;\n job?: Job | null;\n}\n\n/**\n * Specialized update request for customers who are foreign nationals.\n */\nexport interface UpdateCustomerRequestForeign extends UpdateCustomerRequestBase {\n type: CustomerType.Foreign;\n fullName?: string | null;\n birthDate?: string | null;\n gender?: Gender | null;\n maritalStatus?: MaritalStatus | null;\n nationality?: Nationality | null;\n educationStatus?: EducationStatus | null;\n job?: Job | null;\n}\n\n/**\n * Specialized update request for corporate customers and business entities.\n */\nexport interface UpdateCustomerRequestCompany extends UpdateCustomerRequestBase {\n type: CustomerType.Company;\n title: string;\n taxNumber: string;\n}\n\n/**\n * Request to add a new email address to a customer's contact information.\n */\nexport interface AddCustomerEmailRequest {\n customerId: string;\n email: string;\n}\n\n/**\n * Request to remove an email address from a customer's contact information.\n */\nexport interface RemoveCustomerEmailRequest {\n customerId: string;\n email: string;\n}\n\n/**\n * Request to change the primary email address for a customer.\n */\nexport interface ChangePrimaryCustomerEmailRequest {\n customerId: string;\n email: string;\n}\n\n/**\n * Request to add a new phone number to a customer's contact information.\n */\nexport interface AddCustomerPhoneNumberRequest {\n customerId: string;\n phoneNumber: CustomerPhoneNumber;\n}\n\n/**\n * Request to remove a phone number from a customer's contact information.\n */\nexport interface RemoveCustomerPhoneNumberRequest {\n customerId: string;\n countryCode: number;\n phoneNumber: string;\n}\n\n/**\n * Request to change the primary phone number for a customer.\n */\nexport interface ChangePrimaryCustomerPhoneNumberRequest {\n customerId: string;\n countryCode: number;\n phoneNumber: string;\n}\n\n/**\n * Request to assign or change a customer's representative agent user.\n */\nexport interface SetCustomerRepresentativeRequest {\n customerId: string;\n representativeAgentUserId?: string | null;\n}\n\n/**\n * Request to retrieve comprehensive health information for a customer.\n */\nexport interface GetCustomerHealthInfoRequest {\n customerId: string;\n}\n\n/**\n * Request to update customer health information.\n */\nexport interface UpdateCustomerHealthInfoRequest {\n customerId: string;\n height?: number | null;\n weight?: number | null;\n surgeries: Surgery[];\n diseases: Disease[];\n}\n\n/**\n * Request to initiate a new customer contact flow.\n */\nexport interface CreateContactFlowRequest {\n customerId: string;\n name: string;\n}\n\n/**\n * Request to record a customer contact interaction.\n */\nexport interface CreateCustomerContactRequest {\n customerId: string;\n}\n\n/**\n * Request to complete and close a customer contact flow.\n */\nexport interface EndContactFlowRequest {\n customerId: string;\n contactFlowId: string;\n}\n\n/**\n * Request to retrieve all contact flows for a customer.\n */\nexport interface GetCustomerContactFlowsRequest {\n customerId: string;\n caseRef?: string | null;\n}\n\n/**\n * Request to retrieve all individual contact interactions for a customer.\n */\nexport interface GetCustomerContactsRequest {\n customerId: string;\n caseRef?: string | null;\n}\n\n/**\n * Represents a request to lookup customer information from external data sources.\n */\nexport type ExternalLookupCustomerRequest =\n | ExternalLookupCustomerRequestIndividual\n | ExternalLookupCustomerRequestCompany\n | ExternalLookupCustomerRequestForeign;\n\n/**\n * External lookup request for Turkish citizens using their National Identity Number.\n */\nexport interface ExternalLookupCustomerRequestIndividual {\n identityNumber: number;\n birthDate?: string | null;\n}\n\n/**\n * External lookup request for corporate entities using their tax identification number.\n */\nexport interface ExternalLookupCustomerRequestCompany {\n taxNumber: string;\n}\n\n/**\n * External lookup request for foreign nationals using their foreign identification documents.\n */\nexport interface ExternalLookupCustomerRequestForeign {\n identityNumber: string;\n birthDate: string;\n}\n\n// === RESPONSE CONTRACTS ===\n\n/**\n * Response returned after successfully creating a new customer.\n */\nexport interface CreateCustomerResult {\n id: string;\n}\n\n/**\n * Comprehensive response containing complete customer profile information.\n */\nexport type GetCustomerResult =\n | GetCustomerResultIndividual\n | GetCustomerResultForeign\n | GetCustomerResultCompany;\n\n/**\n * Base interface for customer response containing common fields.\n */\ninterface GetCustomerResultBase {\n id: string;\n type: CustomerType;\n primaryEmail?: string | null;\n primaryPhoneNumber?: CustomerPhoneNumber | null;\n city?: InsuranceParameter | null;\n district?: InsuranceParameter | null;\n createdAt: DateTime;\n createdBy: UserReference;\n representedBy?: UserReference | null;\n}\n\n/**\n * Response for individual customers who are Turkish citizens.\n */\nexport interface GetCustomerResultIndividual extends GetCustomerResultBase {\n type: CustomerType.Individual;\n fullName?: string | null;\n identityNumber: number;\n birthDate?: DateOnly | null;\n gender?: Gender | null;\n educationStatus?: EducationStatus | null;\n nationality?: Nationality | null;\n maritalStatus?: MaritalStatus | null;\n job?: Job | null;\n}\n\n/**\n * Response for customers who are foreign nationals.\n */\nexport interface GetCustomerResultForeign extends GetCustomerResultBase {\n type: CustomerType.Foreign;\n fullName?: string | null;\n identityNumber: string;\n birthDate?: DateOnly | null;\n gender?: Gender | null;\n educationStatus?: EducationStatus | null;\n nationality?: Nationality | null;\n maritalStatus?: MaritalStatus | null;\n job?: Job | null;\n}\n\n/**\n * Response for corporate customers and business entities.\n */\nexport interface GetCustomerResultCompany extends GetCustomerResultBase {\n type: CustomerType.Company;\n title: string;\n taxNumber: string;\n}\n\n/**\n * Response item representing a customer email address with primary status indicator.\n */\nexport interface GetCustomerEmailsResultItem {\n email: string;\n primary: boolean;\n}\n\n/**\n * Response item representing a customer phone number with primary status indicator.\n */\nexport interface GetCustomerPhoneNumbersResultItem {\n phoneNumber: CustomerPhoneNumber;\n primary: boolean;\n}\n\n/**\n * Response containing comprehensive health information for a customer.\n */\nexport interface GetCustomerHealthInfoResult {\n height?: number | null;\n weight?: number | null;\n surgeries: Surgery[];\n diseases: Disease[];\n}\n\n/**\n * Response item representing a customer contact flow.\n * Used to track the progress and outcome of customer communication workflows.\n */\nexport interface GetCustomerContactFlowsResultItem {\n /** Unique identifier for the contact flow */\n readonly id: string;\n /** Name of the contact flow */\n readonly name: string;\n /** Number of contacts in this flow */\n readonly contactsCount: number;\n /** Optional case reference associated with this flow */\n readonly caseRef?: string | null;\n /** Customer ID associated with this flow */\n readonly customerId: string;\n /** User who created this contact flow */\n readonly createdBy: UserReference;\n /** Timestamp when the flow was created */\n readonly createdAt: DateTime;\n /** Current state of the contact flow */\n readonly state: ContactFlowState;\n /** Date when the flow ended (if applicable) */\n readonly endedDate?: DateTime | null;\n}\n\n/**\n * Base interface for customer contact interactions.\n * Represents individual contact records within communication workflows.\n */\nexport interface GetCustomerContactsResultItem {\n /** Unique identifier for the contact */\n readonly id: string;\n /** Type of contact (e.g., phone call) */\n readonly type: ContactType;\n /** Current state of the contact */\n readonly state: ContactState;\n /** Customer ID associated with this contact */\n readonly customerId: string;\n /** Timestamp when the contact was created */\n readonly createdAt: DateTime;\n /** Time when the contact attempt was made */\n readonly attemptTime?: DateTime | null;\n /** Time when the contact started */\n readonly startTime?: DateTime | null;\n /** Time when the contact was planned for */\n readonly plannedTime?: DateTime | null;\n /** Optional flow ID if this contact belongs to a flow */\n readonly flowId?: string | null;\n /** Representative who handled this contact */\n readonly representative?: UserReference | null;\n /** User who created this contact record */\n readonly createdBy: UserReference;\n}\n\n/**\n * Phone call contact response item.\n * Extends the base contact with phone-specific properties.\n */\nexport interface PhoneCallContactResultItem extends GetCustomerContactsResultItem {\n /** Time when the call was hung up */\n readonly hangUpTime?: DateTime | null;\n}\n\n/**\n * Response containing external customer data retrieved from third-party sources.\n * Base interface containing common location properties for all customer types.\n */\nexport interface ExternalLookupCustomerResult {\n /** City information retrieved from external sources */\n readonly city?: InsuranceParameter | null;\n /** District information retrieved from external sources */\n readonly district?: InsuranceParameter | null;\n}\n\n/**\n * External lookup response for individual customers (Turkish citizens).\n * Contains personal information retrieved from government databases and identity verification services.\n */\nexport interface ExternalLookupIndividualCustomerResult extends ExternalLookupCustomerResult {\n /** Full legal name retrieved from official records */\n readonly fullName?: string | null;\n /** Gender information retrieved from official records */\n readonly gender?: Gender | null;\n /** Email address retrieved from external sources */\n readonly email?: string | null;\n /** Phone number retrieved from external sources */\n readonly phoneNumber?: CustomerPhoneNumber | null;\n /** Marital status retrieved from official records */\n readonly maritalStatus?: MaritalStatus | null;\n /** Date of birth retrieved from official records */\n readonly birthDate?: DateOnly | null;\n}\n\n/**\n * External lookup response for foreign customers (non-Turkish citizens).\n * Contains personal information retrieved from international identity verification services.\n */\nexport interface ExternalLookupForeignCustomerResult extends ExternalLookupCustomerResult {\n /** Full name retrieved from international verification services */\n readonly fullName?: string | null;\n /** Gender information retrieved from international sources */\n readonly gender?: Gender | null;\n /** Email address retrieved from external sources */\n readonly email?: string | null;\n /** Phone number retrieved from external sources */\n readonly phoneNumber?: CustomerPhoneNumber | null;\n /** Marital status retrieved from international records */\n readonly maritalStatus?: MaritalStatus | null;\n /** Date of birth retrieved from international sources */\n readonly birthDate?: DateOnly | null;\n}\n\n/**\n * External lookup response for company customers (corporate entities).\n * Contains corporate information retrieved from tax authority and commercial registry databases.\n */\nexport interface ExternalLookupCompanyCustomerResult extends ExternalLookupCustomerResult {\n /** Official registered business name */\n readonly title?: string | null;\n}\n\n// ============================================================================\n// BRANCH ASSIGNMENT TYPES\n// ============================================================================\n\n/**\n * Request to set customer branch\n */\nexport interface SetCustomerBranchRequest {\n readonly customerId: string;\n readonly branchId: string;\n}\n\n// ============================================================================\n// ADDRESS MANAGEMENT TYPES\n// ============================================================================\n\n/**\n * Request to create customer address\n */\nexport interface CreateCustomerAddressRequest {\n readonly customerId: string;\n readonly propertyNumber: number;\n readonly addressType: string;\n}\n\n/**\n * Response for created customer address\n */\nexport interface CreateCustomerAddressResult {\n readonly addressId: string;\n}\n\n/**\n * Request to update customer address\n */\nexport interface UpdateCustomerAddressRequest {\n readonly customerId: string;\n readonly addressId: string;\n readonly addressType: string;\n}\n\n/**\n * Response for customer address\n */\nexport interface GetCustomerAddressResult {\n readonly addressId: string;\n readonly propertyNumber: number;\n readonly addressType: string;\n readonly address: PropertyAddress;\n}\n\n// ============================================================================\n// CONSENT MANAGEMENT TYPES\n// ============================================================================\n\n/**\n * Request to give customer consent\n */\nexport interface GiveCustomerConsentRequest {\n readonly consentType: string;\n readonly consentDate: string;\n readonly source: string;\n}\n\n/**\n * Request to revoke customer consent\n */\nexport interface RevokeCustomerConsentRequest {\n readonly consentType: string;\n readonly revocationDate: string;\n}\n\n/**\n * Active consent\n */\nexport interface ActiveConsent {\n readonly consentType: string;\n readonly consentDate: string;\n readonly source: string;\n}\n\n/**\n * Consent history item\n */\nexport interface ConsentHistoryItem {\n readonly consentType: string;\n readonly action: string;\n readonly date: string;\n readonly source?: string;\n}\n\n/**\n * Response for customer consents\n */\nexport interface GetCustomerConsentsResult {\n readonly activeConsents: readonly ActiveConsent[];\n readonly consentHistory: readonly ConsentHistoryItem[];\n}\n","/**\n * @fileoverview Case Management Contracts - Case management operations\n * @description TypeScript contracts for case management operations\n */\n\nimport {\n Channel,\n AssetType,\n CustomerType,\n ProductBranch,\n Currency,\n PaymentOption,\n PolicyState\n} from \"./common.js\";\nimport type {\n InsuranceParameter,\n UserReference,\n VehicleEngine,\n VehicleChassis,\n VehicleRegistrationDate,\n VehicleSeatNumber,\n PropertyNumber,\n PropertySquareMeter,\n PropertyConstructionYear,\n\n CustomerEmail,\n BirthDate} from \"./common.js\";\nimport type { CustomerPhoneNumber } from \"./common.js\";\nimport type {\n VehicleModel,\n VehiclePlate,\n VehicleDocumentSerial,\n VehicleFuel,\n VehicleUtilizationStyle,\n PropertyDamageStatus,\n PropertyFloor,\n PropertyStructure,\n PropertyUtilizationStyle,\n PropertyOwnershipType,\n} from \"./common.js\";\n\n// ============================================================================\n// CASE-SPECIFIC ENUMS\n// ============================================================================\n\n/**\n * Insurance Case Types\n *\n * Primary categorization of insurance cases that defines the business context, processing workflows,\n * and service requirements for different customer interactions. Each case type has distinct business\n * rules, documentation requirements, approval processes, and success criteria. Essential for routing\n * cases to appropriate specialists, applying correct service level agreements, and ensuring\n * consistent handling procedures across the organization.\n *\n * Farklı müşteri etkileşimleri için iş bağlamını, işleme iş akışlarını ve hizmet gereksinimlerini\n * tanımlayan sigorta taleplerinin birincil kategorizasyonu. Her talep türünün kendine özgü iş kuralları,\n * belgelendirme gereksinimleri, onay süreçleri ve başarı kriterleri vardır. Talepleri uygun uzmanlara\n * yönlendirmek, doğru hizmet seviye anlaşmalarını uygulamak ve kuruluş genelinde tutarlı işleme\n * prosedürlerini sağlamak için gereklidir.\n */\nexport enum CaseType {\n /**\n * Sales opportunity case for new business acquisition or policy sales\n */\n SaleOpportunity = \"SALE_OPPORTUNITY\",\n /**\n * Policy endorsement case for modifications and changes\n */\n Endorsement = \"ENDORSEMENT\",\n /**\n * Policy cancellation case\n */\n Cancel = \"CANCEL\",\n /**\n * Customer complaint case\n */\n Complaint = \"COMPLAINT\",\n}\n\n/**\n * Case Main States\n */\nexport enum CaseMainState {\n Fail = \"FAIL\",\n Open = \"OPEN\",\n InProgress = \"IN_PROGRESS\",\n Success = \"SUCCESS\",\n}\n\n/**\n * Case Sub-States\n */\nexport enum CaseSubState {\n FailNoResponse = \"FAIL_NO_RESPONSE\",\n FailInvalidCase = \"FAIL_INVALID_CASE\",\n FailCustomerWithdrawn = \"FAIL_CUSTOMER_WITHDRAWN\",\n FailPaymentError = \"FAIL_PAYMENT_ERROR\",\n FailDeclinedCardInformation = \"FAIL_DECLINED_CARD_INFORMATION\",\n FailForeignUser = \"FAIL_FOREIGN_USER\",\n FailTakenElsewhere = \"FAIL_TAKEN_ELSEWHERE\",\n FailPriceTooHigh = \"FAIL_PRICE_TOO_HIGH\",\n FailAssetAcquisition = \"FAIL_ASSET_ACQUISITION\",\n FailAssetSold = \"FAIL_ASSET_SOLD\",\n FailUnresolved = \"FAIL_UNRESOLVED\",\n FailReferredToLegal = \"FAIL_REFERRED_TO_LEGAL\",\n FailCustomerUnsatisfied = \"FAIL_CUSTOMER_UNSATISFIED\",\n FailMissingDocuments = \"FAIL_MISSING_DOCUMENTS\",\n FailInsurerDenied = \"FAIL_INSURER_DENIED\",\n FailConditionsNotMet = \"FAIL_CONDITIONS_NOT_MET\",\n OpenInitial = \"OPEN_INITIAL\",\n OpenCollectingInformation = \"OPEN_COLLECTING_INFORMATION\",\n OpenDelayed = \"OPEN_DELAYED\",\n OpenWaiting = \"OPEN_WAITING\",\n InProgressUnderAnalysis = \"IN_PROGRESS_UNDER_ANALYSIS\",\n InProgressProposalPrepared = \"IN_PROGRESS_PROPOSAL_PREPARED\",\n InProgressAwaitingApproval = \"IN_PROGRESS_AWAITING_APPROVAL\",\n InProgressToBeRecontacted = \"IN_PROGRESS_TO_BE_RECONTACTED\",\n SuccessCompleted = \"SUCCESS_COMPLETED\",\n}\n\n/**\n * Case Status\n */\nexport enum CaseStatus {\n Open = \"OPEN\",\n Delayed = \"DELAYED\",\n Success = \"SUCCESS\",\n Fail = \"FAIL\",\n}\n\n/**\n * Represents specific subtypes of sales opportunity cases that categorize different sales scenarios and business development activities.\n * Sales opportunity subtypes help optimize sales processes and track different revenue streams and customer acquisition strategies.\n *\n * Farklı satış senaryolarını ve iş geliştirme faaliyetlerini kategorize eden satış fırsatı taleplerinin belirli alt türlerini temsil eder.\n * Satış fırsatı alt türleri, satış süreçlerini optimize etmeye ve farklı gelir akışları ile müşteri kazanım stratejilerini takip etmeye yardımcı olur.\n */\nexport enum SaleOpportunityCaseSubType {\n /**\n * New customer acquisition sale with first-time policy purchase.\n *\n * İlk kez poliçe satın alımı ile yeni müşteri kazanım satışı.\n */\n NewSale = \"NEW_SALE\",\n\n /**\n * Cross-selling additional products to existing customers.\n *\n * Mevcut müşterilere ek ürünlerin çapraz satışı.\n */\n CrossSale = \"CROSS_SALE\",\n\n /**\n * Policy renewal sale for existing coverage continuation.\n *\n * Mevcut teminatın devamı için poliçe yenileme satışı.\n */\n Renewal = \"RENEWAL\",\n}\n\n/**\n * Policy Cancellation Case Subtypes\n *\n * Enumeration of specific cancellation scenarios that require different processing workflows,\n * documentation requirements, and refund calculations. Each subtype represents a distinct reason\n * for policy termination with its own business rules, timing requirements, and administrative procedures.\n * Critical for ensuring proper handling of cancellation requests, calculating appropriate refunds,\n * and maintaining compliance with insurance regulations and customer service standards.\n *\n * Farklı işlem akışları, belgelendirme gereksinimleri ve iade hesaplamaları gerektiren belirli\n * iptal senaryolarının numaralandırması. Her alt tür, kendi iş kuralları, zamanlama gereksinimleri\n * ve idari prosedürleri ile farklı bir poliçe fesih nedenini temsil eder. İptal taleplerinin uygun\n * şekilde işlenmesi, uygun iadelerin hesaplanması ve sigorta düzenlemeleri ile müşteri hizmetleri\n * standartlarına uyumun sağlanması için kritiktir.\n */\nexport enum CancelCaseSubType {\n /**\n * Online Cancellation with Refund / İade ile Çevrimiçi İptal\n *\n * Policy cancellation initiated through digital channels (website, mobile app) with automatic\n * refund processing. This self-service option allows customers to cancel policies and receive\n * prorated refunds without agent intervention. Typically includes automated calculations for\n * cancellation fees, used coverage periods, and final refund amounts based on policy terms and conditions.\n *\n * Otomatik iade işlemi ile dijital kanallar (web sitesi, mobil uygulama) aracılığıyla başlatılan\n * poliçe iptali. Bu self-servis seçeneği, müşterilerin acente müdahalesi olmadan poliçeleri iptal etmelerini\n * ve oransal iadeler almalarını sağlar. Genellikle iptal ücretleri, kullanılan teminat dönemleri ve\n * poliçe şartlarına göre nihai iade tutarları için otomatik hesaplamaları içerir.\n */\n OnlineCancellationRefund = \"ONLINE_CANCELLATION_REFUND\",\n /**\n * MEB (Ministry of Education) Cancellation / MEB (Milli Eğitim Bakanlığı) İptali\n *\n * Policy cancellation required due to Ministry of Education regulations, typically related to\n * educational institution insurance requirements or student insurance policies. May involve special\n * regulatory compliance procedures and specific documentation requirements. Often processed with\n * expedited timelines to meet educational calendar requirements.\n *\n * Milli Eğitim Bakanlığı düzenlemeleri nedeniyle gereken poliçe iptali, genellikle eğitim kurumu\n * sigorta gereksinimleri veya öğrenci sigorta poliçeleri ile ilgilidir. Özel düzenleyici uyumluluk\n * prosedürleri ve belirli belgelendirme gereksinimlerini içerebilir. Genellikle eğitim takvimi\n * gereksinimlerini karşılamak için hızlandırılmış zaman çizelgeleri ile işlenir.\n */\n MebCancellation = \"MEB_CANCELLATION\",\n /**\n * Partial Policy Cancellation / Kısmi Poliçe İptali\n *\n * Cancellation of specific coverage components or partial termination of policy terms while\n * maintaining other active coverages. Requires careful calculation of prorated premiums and\n * adjustments to remaining policy terms. Common in scenarios where customers want to reduce\n * coverage levels or remove specific optional coverages while keeping basic protection active.\n *\n * Diğer aktif teminatları korurken belirli teminat bileşenlerinin iptali veya poliçe şartlarının\n * kısmi feshi. Oransal primlerin dikkatli hesaplanmasını ve kalan poliçe şartlarında ayarlamalar\n * yapılmasını gerektirir. Müşterilerin temel korumayı aktif tutarken teminat seviyelerini azaltmak\n * veya belirli isteğe bağlı teminatları kaldırmak istediği senaryolarda yaygındır.\n */\n PartialCancellation = \"PARTIAL_CANCELLATION\",\n /**\n * Cancellation from Sale Process / Satış Sürecinden İptal\n */\n CancellationFromSale = \"CANCELLATION_FROM_SALE\",\n /**\n * Cancellation Due to Collection Issues / Tahsilat Sorunları Nedeniyle İptal\n */\n CancellationDueToCollection = \"CANCELLATION_DUE_TO_COLLECTION\",\n /**\n * Cancellation Due to Damage / Hasar Nedeniyle İptal\n *\n * Policy termination following total loss or constructive total loss events where the insured\n * asset is deemed beyond economical repair. Involves coordination with claims processing, salvage\n * operations, and final settlement calculations. Requires careful handling of remaining premium\n * refunds and coordination with loss adjusters and repair facilities.\n *\n * Sigortalı varlığın ekonomik onarımın ötesinde kabul edildiği tam hasar veya yapıcı tam hasar\n * olaylarını takiben poliçe feshi. Hasar işleme, hurda işlemleri ve nihai uzlaşma hesaplamaları ile\n * koordinasyon içerir. Kalan prim iadelerinin dikkatli işlenmesini ve eksper ile onarım tesisleri\n * ile koordinasyonu gerektirir.\n */\n CancellationDueToDamage = \"CANCELLATION_DUE_TO_DAMAGE\",\n}\n\n/**\n * Customer Complaint Case Subtypes\n *\n * Categorization of customer complaints based on the nature of the issue and the area of\n * service or process involved. This classification enables proper routing of complaints to\n * specialized resolution teams, ensures appropriate handling procedures, and facilitates\n * regulatory reporting requirements. Essential for customer service quality management,\n * compliance monitoring, and operational improvement initiatives.\n *\n * Sorunun doğası ve dahil olan hizmet veya süreç alanına dayalı müşteri şikayetlerinin\n * kategorizasyonu. Bu sınıflandırma, şikayetlerin uzman çözüm ekiplerine uygun yönlendirilmesini\n * sağlar, uygun işleme prosedürlerini garanti eder ve düzenleyici raporlama gereksinimlerini\n * kolaylaştırır. Müşteri hizmetleri kalite yönetimi, uyumluluk izleme ve operasyonel iyileştirme\n * girişimleri için gereklidir.\n */\nexport enum ComplaintCaseSubType {\n /**\n * Consultant Error Complaint / Danışman Hatası Şikayeti\n *\n * Complaints regarding errors, misinformation, or inappropriate behavior by insurance\n * consultants or agents. Includes issues such as incorrect advice, misrepresentation of\n * policy terms, unprofessional conduct, or failure to provide adequate service.\n * Requires investigation of agent conduct and may involve disciplinary actions or additional training.\n *\n * Sigorta danışmanları veya acenteleri tarafından yapılan hatalar, yanlış bilgilendirme\n * veya uygunsuz davranışlar hakkında şikayetler. Yanlış tavsiye, poliçe şartlarının yanlış\n * sunumu, profesyonel olmayan davranış veya yeterli hizmet sağlayamama gibi sorunları içerir.\n * Acente davranışının araştırılmasını gerektirir ve disiplin eylemleri veya ek eğitim içerebilir.\n */\n ConsultantError = \"CONSULTANT_ERROR\",\n /**\n * Policy Operations Complaint / Poliçe Operasyonları Şikayeti\n *\n * Complaints related to policy administration, endorsements, renewals, or other\n * operational aspects of policy management. Includes issues with policy issuance,\n * documentation errors, processing delays, or system-related problems affecting\n * policy services. Requires review of operational procedures and system functionality.\n *\n * Poliçe yönetimi, zeyilnameler, yenilemeler veya poliçe yönetiminin diğer operasyonel\n * yönleri ile ilgili şikayetler. Poliçe düzenleme, belgelendirme hataları, işleme gecikmeleri\n * veya poliçe hizmetlerini etkileyen sistemle ilgili sorunları içerir. Operasyonel prosedürlerin\n * ve sistem işlevselliğinin gözden geçirilmesini gerektirir.\n */\n PolicyOperations = \"POLICY_OPERATIONS\",\n /**\n * Premium Collection Complaint / Prim Tahsilat Şikayeti\n *\n * Complaints regarding premium collection practices, payment processing issues,\n * or billing disputes. Includes problems with payment methods, incorrect billing amounts,\n * unauthorized charges, or aggressive collection practices. Requires review of billing\n * procedures and payment processing systems to ensure compliance with regulations.\n *\n * Prim tahsilat uygulamaları, ödeme işleme sorunları veya faturalandırma anlaşmazlıkları\n * ile ilgili şikayetler. Ödeme yöntemleri ile ilgili sorunlar, yanlış faturalandırma tutarları,\n * yetkisiz ücretlendirmeler veya agresif tahsilat uygulamalarını içerir. Düzenlemelere uyumu\n * sağlamak için faturalandırma prosedürleri ve ödeme işleme sistemlerinin gözden geçirilmesini gerektirir.\n */\n Collection = \"COLLECTION\",\n /**\n * Frequent Calls Complaint / Sık Arama Şikayeti\n *\n * Complaints about excessive or unwanted communications from the insurance company,\n * including too many phone calls, SMS messages, or emails. May involve marketing calls,\n * renewal reminders, or collection attempts that customers find intrusive or annoying.\n * Requires review of communication policies and customer preference settings.\n *\n * Sigorta şirketinden gelen aşırı veya istenmeyen iletişimler hakkında şikayetler,\n * çok fazla telefon görüşmesi, SMS mesajı veya e-posta dahil. Müşterilerin rahatsız edici\n * veya can sıkıcı bulduğu pazarlama aramaları, yenileme hatırlatmaları veya tahsilat\n * girişimlerini içerebilir. İletişim politikalarının ve müşteri tercih ayarlarının\n * gözden geçirilmesini gerektirir.\n */\n DueToFrequentCalls = \"DUE_TO_FREQUENT_CALLS\",\n /**\n * Fraud-Related Complaint / Dolandırıcılık İlgili Şikayet\n *\n * Complaints involving suspected fraudulent activities, either by company representatives\n * or third parties. Includes identity theft, unauthorized policy changes, false claims,\n * or misrepresentation of company services. Requires immediate investigation, potential\n * law enforcement involvement, and special handling procedures to protect customer interests.\n *\n * Şirket temsilcileri veya üçüncü şahıslar tarafından şüpheli dolandırıcılık faaliyetlerini\n * içeren şikayetler. Kimlik hırsızlığı, yetkisiz poliçe değişiklikleri, sahte talepler veya\n * şirket hizmetlerinin yanlış sunumu dahildir. Anında araştırma, potansiyel kolluk kuvvetleri\n * müdahalesi ve müşteri çıkarlarını korumak için özel işleme prosedürleri gerektirir.\n */\n Fraud = \"FRAUD\",\n /**\n * Damage/Claims Handling Complaint / Hasar/Talep İşleme Şikayeti\n *\n * Complaints regarding claims processing, damage assessment, settlement amounts,\n * or claims denial decisions. Includes issues with claims adjusters, repair quality,\n * settlement delays, or disagreements with damage evaluations. Requires review of\n * claims handling procedures and may involve independent assessments or re-evaluations.\n *\n * Hasar işleme, zarar değerlendirme, uzlaşma tutarları veya hasar red kararları ile\n * ilgili şikayetler. Eksperler, onarım kalitesi, uzlaşma gecikmeleri veya zarar değerlendirmeleri\n * ile anlaşmazlıkları içerir. Hasar işleme prosedürlerinin gözden geçirilmesini gerektirir\n * ve bağımsız değerlendirmeler veya yeniden değerlendirmeler içerebilir.\n */\n Damage = \"DAMAGE\",\n /**\n * Erroneous Transaction Complaint / Hatalı İşlem Şikayeti\n *\n * Complaints about incorrect financial transactions, system errors, or processing mistakes\n * that result in wrong charges, incorrect payments, or data inaccuracies. Requires\n * investigation of transaction records, system logs, and correction of any identified errors.\n * May involve financial adjustments or refunds to resolve customer concerns.\n *\n * Yanlış ücretlendirmeler, hatalı ödemeler veya veri yanlışlıkları ile sonuçlanan yanlış\n * finansal işlemler, sistem hataları veya işleme hatalarıyla ilgili şikayetler. İşlem kayıtları,\n * sistem günlükleri araştırması ve belirlenen hataların düzeltilmesini gerektirir. Müşteri\n * endişelerini çözmek için finansal ayarlamalar veya iadeler içerebilir.\n */\n ErroneousTransaction = \"ERRONEOUS_TRANSACTION\",\n /**\n * Operations Delay Complaint / Operasyon Gecikmesi Şikayeti\n *\n * Complaints about excessive delays in processing insurance operations such as\n * policy issuance, endorsements, claims processing, or customer service responses.\n * Requires analysis of processing times, identification of bottlenecks, and\n * implementation of process improvements to meet service level commitments.\n *\n * Poliçe düzenleme, zeyilnameler, hasar işleme veya müşteri hizmetleri yanıtları gibi\n * sigorta operasyonlarının işlenmesindeki aşırı gecikmelerle ilgili şikayetler. İşleme\n * sürelerinin analizi, darboğazların belirlenmesi ve hizmet seviye taahhütlerini karşılamak\n * için süreç iyileştirmelerinin uygulanmasını gerektirir.\n */\n DelayInOperations = \"DELAY_IN_OPERATIONS\",\n /**\n * Online Transaction Error Complaint / Çevrimiçi İşlem Hatası Şikayeti\n *\n * Complaints regarding technical issues with online platforms, mobile applications,\n * or digital transaction processing. Includes website malfunctions, payment gateway errors,\n * login problems, or system unavailability. Requires technical investigation and\n * coordination with IT teams to resolve platform issues.\n *\n * Çevrimiçi platformlar, mobil uygulamalar veya dijital işlem işlemesi ile ilgili teknik\n * sorunlarla ilgili şikayetler. Web sitesi arızaları, ödeme geçidi hataları, giriş sorunları\n * veya sistem kullanılabilirliği sorunlarını içerir. Platform sorunlarını çözmek için teknik\n * araştırma ve IT ekipleri ile koordinasyon gerektirir.\n */\n OnlineTransactionErrors = \"ONLINE_TRANSACTION_ERRORS\",\n /**\n * Cancellation Period Delay Complaint / İptal Dönemi Gecikmesi Şikayeti\n *\n * Complaints about excessive delays in processing policy cancellations or issuing\n * refunds within the required timeframes. Includes delays in calculating refund amounts,\n * processing cancellation requests, or transferring refund payments. May involve\n * regulatory compliance issues requiring immediate attention and resolution.\n *\n * Gerekli zaman dilimlerinde poliçe iptallerinin işlenmesi veya iadelerin yapılmasındaki\n * aşırı gecikmelerle ilgili şikayetler. İade tutarlarının hesaplanmasında, iptal taleplerinin\n * işlenmesinde veya iade ödemelerinin transferinde gecikmeleri içerir. Acil dikkat ve çözüm\n * gerektiren düzenleyici uyumluluk sorunları içerebilir.\n */\n DelayInCancellationPeriod = \"DELAY_IN_CANCELLATION_PERIOD\",\n /**\n * Non-Receipt of Policy Documents Complaint / Poliçe Belgeleri Almama Şikayeti\n *\n * Complaints about customers not receiving their policy documents, endorsements,\n * or other important insurance documentation. May involve postal delivery issues,\n * incorrect addresses, or system failures in document generation or distribution.\n * Requires investigation of delivery methods and reissuance of missing documents.\n *\n * Müşterilerin poliçe belgelerini, zeyilnamelerini veya diğer önemli sigorta belgelerini\n * almama konusundaki şikayetler. Posta teslim sorunları, yanlış adresler veya belge oluşturma\n * veya dağıtımında sistem arızalarını içerebilir. Teslim yöntemlerinin araştırılmasını ve\n * eksik belgelerin yeniden düzenlenmesini gerektirir.\n */\n NonReceiptOfPolicyOrEndorsement = \"NON_RECEIPT_OF_POLICY_OR_ENDORSEMENT\",\n /**\n * Non-Production of Policy Documents Complaint / Poliçe Belgeleri Üretmeme Şikayeti\n *\n * Complaints about the company's failure to generate, produce, or issue policy\n * documents or endorsements after coverage has been purchased or changes have been approved.\n * Requires investigation of document production systems and processes to ensure\n * timely issuance of all required documentation.\n *\n * Teminat satın alındıktan veya değişiklikler onaylandıktan sonra şirketin poliçe\n * belgelerini veya zeyilnamelerini üretmeme, oluşturmama veya düzenlememe konusundaki\n * şikayetler. Gerekli tüm belgelerin zamanında düzenlenmesini sağlamak için belge üretim\n * sistemleri ve süreçlerinin araştırılmasını gerektirir.\n */\n NonProductionOfPolicyOrEndorsement = \"NON_PRODUCTION_OF_POLICY_OR_ENDORSEMENT\",\n /**\n * Endorsement Operations Delay Complaint / Zeyilname Operasyonları Gecikmesi Şikayeti\n *\n * Complaints about excessive delays in processing policy endorsements, modifications,\n * or change requests. Includes delays in reviewing requests, obtaining approvals,\n * calculating premium adjustments, or implementing policy changes. Requires review\n * of endorsement workflows and resource allocation for timely processing.\n *\n * Poliçe zeyilnamelerinin, değişikliklerinin veya değişiklik taleplerinin işlenmesindeki\n * aşırı gecikmelerle ilgili şikayetler. Taleplerin incelenmesi, onay alınması, prim\n * ayarlamalarının hesaplanması veya poliçe değişikliklerinin uygulanmasındaki gecikmeleri\n * içerir. Zamanında işleme için zeyilname iş akışları ve kaynak tahsisinin gözden\n * geçirilmesini gerektirir.\n */\n DelayInEndorsementOperations = \"DELAY_IN_ENDORSEMENT_OPERATIONS\",\n /**\n * Erroneous Premium Collection Complaint / Hatalı Prim Tahsilatı Şikayeti\n *\n * Complaints about incorrect premium charges, wrong billing amounts, or unauthorized\n * premium collections. Includes overcharges, duplicate charges, or charges for cancelled\n * policies. Requires detailed investigation of billing records and correction of any\n * financial errors with appropriate refunds or adjustments.\n *\n * Yanlış prim ücretlendirmeleri, hatalı faturalandırma tutarları veya yetkisiz prim\n * tahsilatlarıyla ilgili şikayetler. Fazla ücretlendirmeler, çift ücretlendirmeler veya\n * iptal edilen poliçeler için ücretlendirmeler dahildir. Faturalandırma kayıtlarının\n * ayrıntılı araştırılmasını ve uygun iadeler veya ayarlamalarla finansal hataların\n * düzeltilmesini gerektirir.\n */\n ErroneousPremiumCollection = \"ERRONEOUS_PREMIUM_COLLECTION\",\n /**\n * Non-Delivery of Refund Receipt Complaint / İade Makbuzu Teslim Etmeme Şikayeti\n *\n * Complaints about not receiving official receipts or confirmation documents for\n * premium refunds or other financial adjustments. Important for customer record-keeping\n * and tax purposes. Requires investigation of document delivery processes and\n * reissuance of missing receipts or confirmations.\n *\n * Prim iadeleri veya diğer finansal ayarlamalar için resmi makbuzları veya onay\n * belgelerini almama konusundaki şikayetler. Müşteri kayıt tutma ve vergi amaçları için\n * önemlidir. Belge teslim süreçlerinin araştırılmasını ve eksik makbuz veya onayların\n * yeniden düzenlenmesini gerektirir.\n */\n NonDeliveryOfRefundReceipt = \"NON_DELIVERY_OF_REFUND_RECEIPT\",\n /**\n * Non-Refund of Premium Complaint / Prim İade Etmeme Şikayeti\n *\n * Complaints about the company's failure to process legitimate premium refunds\n * for cancelled policies, overpayments, or other valid refund situations. Requires\n * investigation of refund calculations, verification of entitlements, and processing\n * of any owed refunds according to policy terms and regulatory requirements.\n *\n * Şirketin iptal edilen poliçeler, fazla ödemeler veya diğer geçerli iade durumları\n * için meşru prim iadelerini işlemede başarısızlığı hakkında şikayetler. İade hesaplamalarının\n * araştırılmasını, hak sahipliğinin doğrulanmasını ve poliçe şartları ile düzenleyici\n * gereksinimlere göre borçlu olunan iadelerin işlenmesini gerektirir.\n */\n NonRefundOfPremium = \"NON_REFUND_OF_PREMIUM\",\n /**\n * Staff Attitude Complaint / Personel Tutumu Şikayeti\n *\n * Complaints about unprofessional behavior, poor attitude, or inappropriate conduct\n * by company staff members. Includes rudeness, unhelpfulness, discrimination, or\n * failure to provide courteous service. Requires investigation of staff interactions\n * and may involve coaching, training, or disciplinary actions.\n *\n * Şirket personeli tarafından profesyonel olmayan davranış, kötü tutum veya uygunsuz\n * davranışlar hakkında şikayetler. Kabalık, yardım etmeme, ayrımcılık veya nazik hizmet\n * sağlayamama dahildir. Personel etkileşimlerinin araştırılmasını gerektirir ve koçluk,\n * eğitim veya disiplin eylemlerini içerebilir.\n */\n StaffAttitude = \"STAFF_ATTITUDE\",\n /**\n * Insufficient or Erroneous Information Complaint / Yetersiz veya Hatalı Bilgi Şikayeti\n *\n * Complaints about incomplete, inaccurate, or misleading information provided by\n * the company regarding policies, procedures, coverage details, or customer rights.\n * Requires review of information sources, training materials, and communication\n * protocols to ensure accurate and complete information delivery.\n *\n * Şirket tarafından poliçeler, prosedürler, teminat detayları veya müşteri hakları\n * hakkında sağlanan eksik, yanlış veya yanıltıcı bilgilerle ilgili şikayetler.\n * Doğru ve eksiksiz bilgi teslimini sağlamak için bilgi kaynakları, eğitim materyalleri\n * ve iletişim protokollerinin gözden geçirilmesini gerektirir.\n */\n InsufficientOrErroneousInformation = \"INSUFFICIENT_OR_ERRONEOUS_INFORMATION\",\n /**\n * No Timely Response Complaint / Zamanında Yanıt Vermeme Şikayeti\n *\n * Complaints about the company's failure to respond to customer inquiries,\n * requests, or communications within reasonable or promised timeframes. Includes\n * delays in responding to emails, phone calls, or formal requests. Requires review\n * of response time standards and resource allocation for customer communications.\n *\n * Şirketin müşteri sorularına, taleplerine veya iletişimlerine makul veya vaat edilen\n * zaman dilimlerinde yanıt vermede başarısızlığı hakkında şikayetler. E-postalara, telefon\n * aramalarına veya resmi taleplere yanıt vermede gecikmeleri içerir. Yanıt süresi standartları\n * ve müşteri iletişimleri için kaynak tahsisinin gözden geçirilmesini gerektirir.\n */\n NoTimelyResponse = \"NO_TIMELY_RESPONSE\",\n}\n\n/**\n * Policy Endorsement Case Subtypes\n *\n * Categorization of policy endorsement requests based on the type of modification being made\n * to existing insurance coverage. Each subtype represents a specific type of policy change with\n * distinct processing requirements, documentation needs, and regulatory considerations.\n * Essential for workflow routing, approval processes, premium calculations, and maintaining\n * accurate policy records throughout the endorsement lifecycle.\n *\n * Mevcut sigorta teminatında yapılan değişiklik türüne dayalı poliçe zeyilname taleplerinin\n * kategorizasyonu. Her alt tür, kendine özgü işleme gereksinimleri, belgelendirme ihtiyaçları\n * ve düzenleyici hususları olan belirli bir poliçe değişiklik türünü temsil eder.\n * İş akışı yönlendirme, onay süreçleri, prim hesaplamaları ve zeyilname yaşam döngüsü boyunca\n * doğru poliçe kayıtlarının korunması için gereklidir.\n */\nexport enum EndorsementCaseSubType {\n /**\n * Vehicle Change Endorsement / Araç Değişikliği Zeyilnamesi\n *\n * Endorsement for replacing the currently insured vehicle with a different vehicle.\n * Involves vehicle inspection, value assessment, risk evaluation, and premium recalculation\n * based on the new vehicle's specifications. Requires documentation of the new vehicle's\n * details, ownership transfer, and potential adjustment of coverage limits and deductibles.\n *\n * Şu anda sigortalı olan aracın farklı bir araçla değiştirilmesi için zeyilname.\n * Araç muayenesi, değer takdiri, risk değerlendirmesi ve yeni aracın özelliklerine dayalı\n * prim yeniden hesaplamasını içerir. Yeni aracın detaylarının belgelenmesini, konutiyet\n * devri ve teminat limitleri ile muafiyetlerin potansiyel ayarlanmasını gerektirir.\n */\n VehicleChange = \"VEHICLE_CHANGE\",\n /**\n * Insured Value Increase Endorsement / Sigorta Değeri Artışı Zeyilnamesi\n *\n * Endorsement to increase the insured value or coverage limits of existing policies.\n * Common when asset values appreciate or when customers want enhanced protection.\n * Requires current value assessment, risk re-evaluation, and premium adjustment calculations.\n * May involve additional underwriting requirements for significant value increases.\n *\n * Mevcut poliçelerin sigorta değeri veya teminat limitlerini artırmak için zeyilname.\n * Varlık değerlerinin değer kazandığı veya müşterilerin gelişmiş koruma istediği durumlarda yaygındır.\n * Güncel değer takdiri, risk yeniden değerlendirmesi ve prim ayarlama hesaplamalarını gerektirir.\n * Önemli değer artışları için ek yüklenim gereksinimleri içerebilir.\n */\n ValueIncrease = \"VALUE_INCREASE\",\n /**\n * No-Claim Bonus Transfer Endorsement / Hasarsızlık Bonus Transfer Zeyilnamesi\n *\n * Endorsement to transfer no-claim discount history from a previous insurance company.\n * Requires verification of claim-free periods, validation of bonus entitlements, and\n * premium adjustments based on the transferred discount levels. Essential for competitive\n * pricing and customer retention when switching insurers.\n *\n * Önceki bir sigorta şirketinden hasarsızlık indirimi geçmişinin transferi için zeyilname.\n * Hasarsız dönemlerin doğrulanmasını, bonus haklarının onaylanmasını ve transfer edilen\n * indirim seviyelerine dayalı prim ayarlamalarını gerektirir. Sigortacı değiştirirken\n * rekabetçi fiyatlandırma ve müşteri elde tutma için gereklidir.\n */\n NoClaimBonusTransfer = \"NO_CLAIM_BONUS_TRANSFER\",\n /**\n * Coverage Modification Endorsement / Teminat Değişikliği Zeyilnamesi\n *\n * Endorsement for modifying existing coverage terms, adding or removing optional coverages,\n * or adjusting deductibles and policy limits. Requires careful documentation of changes,\n * risk assessment for new coverages, and accurate premium calculations. Common when\n * customers' needs change or when new coverage options become available.\n *\n * Mevcut teminat şartlarını değiştirmek, isteğe bağlı teminatları eklemek veya çıkarmak\n * ya da muafiyetleri ve poliçe limitlerini ayarlamak için zeyilname. Değişikliklerin dikkatli\n * belgelenmesini, yeni teminatlar için risk değerlendirmesi ve doğru prim hesaplamalarını gerektirir.\n * Müşterilerin ihtiyaçları değiştiğinde veya yeni teminat seçenekleri mevcut olduğunda yaygındır.\n */\n CoverageChange = \"COVERAGE_CHANGE\",\n /**\n * Vehicle Usage Type Change Endorsement / Araç Kullanım Türü Değişikliği Zeyilnamesi\n *\n * Endorsement for changing the declared usage of the insured vehicle, such as from\n * private use to commercial use or vice versa. Requires risk re-assessment based on\n * the new usage pattern, premium adjustments, and potential coverage modifications.\n * Critical for maintaining accurate risk profiles and appropriate pricing.\n *\n * Sigortalı aracın beyan edilen kullanımının değiştirilmesi için zeyilname, örneğin\n * özel kullanımdan ticari kullanıma veya tam tersi. Yeni kullanım modeline dayalı risk\n * yeniden değerlendirmesi, prim ayarlamaları ve potansiyel teminat değişikliklerini gerektirir.\n * Doğru risk profillerinin korunması ve uygun fiyatlandırma için kritiktir.\n */\n UsageTypeChange = \"USAGE_TYPE_CHANGE\",\n /**\n * Policy Transfer Request Endorsement / Poliçe Transfer Talebi Zeyilnamesi\n *\n * Endorsement for transferring policy ownership from one party to another, commonly\n * occurring in vehicle sales or asset transfers. Requires verification of new owner details,\n * creditworthiness assessment, risk evaluation, and legal documentation of ownership transfer.\n * May involve premium adjustments based on the new owner's risk profile.\n *\n * Poliçe sahipliğinin bir taraftan diğerine transferi için zeyilname, genellikle araç\n * satışları veya varlık transferlerinde gerçekleşir. Yeni sahip detaylarının doğrulanmasını,\n * kredi güvenilirliği değerlendirmesi, risk değerlendirmesi ve konutiyet transferinin yasal\n * belgelenmesini gerektirir. Yeni sahibin risk profiline dayalı prim ayarlamaları içerebilir.\n */\n TransferRequest = \"TRANSFER_REQUEST\",\n /**\n * License Plate Change Endorsement / Plaka Değişikliği Zeyilnamesi\n *\n * Endorsement for updating the license plate number of the insured vehicle due to\n * registration changes, plate renewal, or administrative requirements. Requires verification\n * of new registration documents and updating policy records accordingly. Typically a\n * straightforward administrative change with minimal impact on premiums or coverage.\n *\n * Tescil değişiklikleri, plaka yenileme veya idari gereksinimler nedeniyle sigortalı\n * aracın plaka numarasının güncellenmesi için zeyilname. Yeni tescil belgelerinin doğrulanmasını\n * ve poliçe kayıtlarının buna göre güncellenmesini gerektirir. Genellikle primler veya\n * teminat üzerinde minimal etkisi olan basit bir idari değişikliktir.\n */\n LicensePlateChange = \"LICENSE_PLATE_CHANGE\",\n /**\n * Vehicle Brand and Model Change Endorsement / Araç Marka ve Model Değişikliği Zeyilnamesi\n *\n * Endorsement for correcting or updating the vehicle brand and model information in\n * the policy records. May occur due to initial data entry errors or vehicle modifications.\n * Requires verification of correct vehicle specifications, risk re-assessment based on\n * actual vehicle characteristics, and potential premium adjustments.\n *\n * Poliçe kayıtlarındaki araç marka ve model bilgilerinin düzeltilmesi veya güncellenmesi\n * için zeyilname. İlk veri giriş hataları veya araç modifikasyonları nedeniyle ortaya çıkabilir.\n * Doğru araç spesifikasyonlarının doğrulanmasını, gerçek araç özelliklerine dayalı risk\n * yeniden değerlendirmesi ve potansiyel prim ayarlamalarını gerektirir.\n */\n BrandModelChange = \"BRAND_MODEL_CHANGE\",\n /**\n * Engine and Chassis Number Change Endorsement / Motor ve Şasi Numarası Değişikliği Zeyilnamesi\n *\n * Endorsement for updating engine and chassis identification numbers due to vehicle\n * repairs, engine replacement, or administrative corrections. Requires verification of\n * new identification numbers, documentation from authorized service centers, and\n * anti-fraud checks to ensure vehicle authenticity and prevent identity fraud.\n *\n * Araç onarımları, motor değişimi veya idari düzeltmeler nedeniyle motor ve şasi\n * tanımlama numaralarının güncellenmesi için zeyilname. Yeni tanımlama numaralarının\n * doğrulanmasını, yetkili servis merkezlerinden belgelendirme ve araç otantikliğini\n * sağlamak ve kimlik dolandırıcılığını önlemek için dolandırıcılık karşıtı kontrolleri gerektirir.\n */\n EngineChassisNumberChange = \"ENGINE_CHASSIS_NUMBER_CHANGE\",\n /**\n * Contact and Address Change Endorsement / İletişim ve Adres Değişikliği Zeyilnamesi\n *\n * Endorsement for updating policyholder contact information including address, phone\n * numbers, and email addresses. Important for maintaining accurate communication channels\n * and ensuring proper delivery of policy documents and notices. May affect premium\n * calculations if the address change impacts risk assessment (e.g., different geographic risk zones).\n *\n * Adres, telefon numaraları ve e-posta adresleri dahil olmak üzere poliçe sahibi\n * iletişim bilgilerinin güncellenmesi için zeyilname. Doğru iletişim kanallarının korunması\n * ve poliçe belgelerinin ve bildirimlerin uygun şekilde teslim edilmesi için önemlidir.\n * Adres değişikliği risk değerlendirmesini etkiliyorsa (örn. farklı coğrafi risk bölgeleri)\n * prim hesaplamalarını etkileyebilir.\n */\n ContactAddressChange = \"CONTACT_ADDRESS_CHANGE\",\n /**\n * Other Endorsement Types / Diğer Zeyilname Türleri\n *\n * Catch-all category for endorsement requests that don't fit into predefined specific\n * categories. These may include unique policy modifications, special coverage requests,\n * or new types of changes not yet standardized in the system. Requires case-by-case\n * evaluation and may need special approval processes.\n *\n * Önceden tanımlanmış belirli kategorilere uymayan zeyilname talepleri için genel kategori.\n * Bunlar benzersiz poliçe değişikliklerini, özel teminat taleplerini veya sistemde henüz\n * standartlaştırılmamış yeni değişiklik türlerini içerebilir. Talebe özel değerlendirme\n * gerektirir ve özel onay süreçlerine ihtiyaç duyabilir.\n */\n Other = \"OTHER\",\n /**\n * Pledgee Correction and Addition Endorsement / Rehinli Düzeltme ve Ekleme Zeyilnamesi\n *\n * Endorsement for adding, removing, or correcting pledgee (lien holder) information on\n * the policy. Common when vehicles are financed, refinanced, or loans are paid off.\n * Requires verification of financial institution details, loan documentation, and\n * proper legal authorization for changes. Critical for ensuring proper claim payment procedures.\n *\n * Poliçe üzerinde rehinli (rehin alacaklısı) bilgilerinin eklenmesi, çıkarılması veya\n * düzeltilmesi için zeyilname. Araçlar finanse edildiğinde, yeniden finanse edildiğinde\n * veya krediler ödendiğinde yaygındır. Finansal kurum detaylarının doğrulanmasını, kredi\n * belgelendirmesi ve değişiklikler için uygun yasal yetkilendirmeyi gerektirir.\n * Uygun hasar ödeme prosedürlerinin sağlanması için kritiktir.\n */\n PledgeeCorrectionAddition = \"PLEDGEE_CORRECTION_ADDITION\",\n}\n\n/**\n * Case Activity Actions\n */\nexport enum CaseActivityAction {\n Created = \"CREATED\",\n Updated = \"UPDATED\",\n StateChanged = \"STATE_CHANGED\",\n ChannelChanged = \"CHANNEL_CHANGED\",\n RepresentativeAssigned = \"REPRESENTATIVE_ASSIGNED\",\n NoteAdded = \"NOTE_ADDED\",\n AssetSet = \"ASSET_SET\",\n PolicyAdded = \"POLICY_ADDED\",\n ProposalAdded = \"PROPOSAL_ADDED\",\n PolicyEndDateSet = \"POLICY_END_DATE_SET\",\n CustomerUpdated = \"CUSTOMER_UPDATED\",\n AssetUpdated = \"ASSET_UPDATED\",\n PriorityAssessed = \"PRIORITY_ASSESSED\",\n ProposalProductPurchaseAttempted = \"PROPOSAL_PRODUCT_PURCHASE_ATTEMPTED\",\n}\n\n// Re-export enums for backward compatibility with existing imports\nexport {\n Channel,\n AssetType,\n CustomerType,\n ProductBranch,\n Currency,\n PaymentOption,\n PolicyState,\n};\n\n// ============================================================================\n// REQUEST TYPES\n// ============================================================================\n\n/**\n * Represents a request to retrieve comprehensive case information by case reference number.\n * Used to fetch detailed case data including status, customer information, and associated policies.\n *\n * Talep referans numarası ile kapsamlı talep bilgilerini almak için kullanılan istek.\n * Durum, müşteri bilgileri ve ilişkili poliçeler dahil olmak üzere detaylı talep verilerini getirmek için kullanılır.\n */\nexport interface GetCaseByRefRequest {\n /**\n * Case Reference Number / Talep Referans Numarası\n *\n * EN: The unique reference identifier assigned to the insurance case. This alphanumeric reference\n * is used across InsurUp's systems to track and identify specific cases throughout their lifecycle.\n * Case references are typically formatted for easy customer communication and internal tracking.\n *\n * TR: Sigorta talebine atanan benzersiz referans tanımlayıcısı. Bu alfanümerik referans,\n * InsurUp'ın sistemlerinde belirli talepleri yaşam döngüleri boyunca takip etmek ve tanımlamak\n * için kullanılır. Talep referansları genellikle kolay müşteri iletişimi ve iç takip için formatlanır.\n */\n readonly ref: string;\n}\n\n/**\n * Represents a request to assign or change the representative agent user for an insurance case.\n * Used to delegate case responsibility to specific agents for customer service and case management.\n *\n * Sigorta talebi için temsilci acente kullanıcısını atamak veya değiştirmek için kullanılan istek.\n * Müşteri hizmetleri ve talep yönetimi için talep sorumluluğunu belirli acentelere devretmek için kullanılır.\n */\nexport interface AssignCaseRepresentativeRequest {\n /**\n * Case Reference Number / Talep Referans Numarası\n *\n * EN: The unique reference identifier of the insurance case for which to assign or change\n * the responsible representative agent. This reference ensures the assignment is applied\n * to the correct case in the system.\n *\n * TR: Sorumlu temsilci acentenin atanacağı veya değiştirileceği sigorta talebinin benzersiz\n * referans tanımlayıcısı. Bu referans, atamanın sistemde doğru talebe uygulanmasını sağlar.\n */\n readonly ref: string;\n\n /**\n * Representative Agent User ID / Temsilci Acente Kullanıcı Kimliği\n *\n * EN: The unique GUID identifier of the agent user who will be assigned as the case representative.\n * This agent will become responsible for handling customer communications, case progression,\n * and decision-making related to the case. Set to null to unassign the current representative,\n * leaving the case without a specific assigned agent.\n *\n * TR: Talep temsilcisi olarak atanacak acente kullanıcısının benzersiz GUID tanımlayıcısı.\n * Bu acente, müşteri iletişimleri, talep ilerlemesi ve talep ile ilgili karar verme süreçlerinden\n * sorumlu olacaktır. Mevcut temsilciyi atamadan çıkarmak ve talebi belirli bir atanmış acente\n * olmadan bırakmak için null olarak ayarlayın.\n */\n readonly representativeAgentUserId?: string | null;\n}\n\n/**\n * Represents a request to change the communication channel of an existing insurance case.\n * Used to update how the case is handled based on customer preference or operational requirements.\n *\n * Mevcut bir sigorta talebinin iletişim kanalını değiştirmek için kullanılan istek.\n * Müşteri tercihi veya operasyonel gereksinimler temelinde talebin nasıl işleneceğini güncellemek için kullanılır.\n */\nexport interface ChangeCaseChannelRequest {\n /**\n * Case Reference Number / Talep Referans Numarası\n *\n * EN: The unique reference identifier of the insurance case for which to change the communication\n * channel. This reference ensures the channel change is applied to the correct case and properly\n * tracked in the system for audit and historical purposes.\n *\n * TR: İletişim kanalının değiştirileceği sigorta talebinin benzersiz referans tanımlayıcısı.\n * Bu referans, kanal değişikliğinin doğru talebe uygulanmasını ve denetim ve tarihsel amaçlar\n * için sistemde uygun şekilde takip edilmesini sağlar.\n */\n readonly ref: string;\n\n /**\n * New Communication Channel / Yeni İletişim Kanalı\n *\n * EN: The communication channel to which the case should be transferred. This determines how\n * the case will be processed, routed, and handled going forward. Different channels may have\n * different service levels, processing priorities, and communication protocols. The change\n * affects all subsequent case interactions and workflow routing.\n *\n * TR: Talebin aktarılacağı iletişim kanalı. Bu, talebin bundan sonra nasıl işleneceği,\n * yönlendirileceği ve ele alınacağını belirler. Farklı kanalların farklı hizmet seviyeleri,\n * işleme öncelikleri ve iletişim protokolleri olabilir. Değişiklik, sonraki tüm talep\n * etkileşimlerini ve iş akışı yönlendirmesini etkiler.\n */\n readonly channel: Channel;\n}\n\n/**\n * Represents a request to change the main and sub-state of an existing insurance case.\n * Used to progress cases through their lifecycle with appropriate status tracking and optional notes.\n *\n * Mevcut bir sigorta talebinin ana ve alt durumunu değiştirmek için kullanılan istek.\n * Talepleri uygun durum takibi ve isteğe bağlı notlarla yaşam döngüleri boyunca ilerletmek için kullanılır.\n */\nexport interface ChangeCaseStateRequest {\n /**\n * Case Reference Number / Talep Referans Numarası\n *\n * EN: The unique reference identifier of the case for which to change the state.\n *\n * TR: Durumunun değiştirileceği talebin benzersiz referans tanımlayıcısı.\n */\n readonly ref: string;\n\n /**\n * New Main State / Yeni Ana Durum\n *\n * EN: The new main state to which the case should be transitioned.\n *\n * TR: Talebin geçiş yapacağı yeni ana durum.\n */\n readonly mainState: CaseMainState;\n\n /**\n * New Sub-State / Yeni Alt Durum\n *\n * EN: The new sub-state to which the case should be transitioned.\n *\n * TR: Talebin geçiş yapacağı yeni alt durum.\n */\n readonly subState: CaseSubState;\n\n /**\n * Optional Note / İsteğe Bağlı Not\n *\n * EN: Optional note explaining the reason for the state change.\n *\n * TR: Durum değişikliğinin nedenini açıklayan isteğe bağlı not.\n */\n readonly note?: string;\n}\n\n/**\n * Represents a request to create a new cancellation case for an existing insurance policy.\n * Used to initiate policy cancellation workflows for customer-requested or administrative cancellations.\n *\n * Mevcut bir sigorta poliçesi için yeni iptal talebi oluşturmak için kullanılan istek.\n * Müşteri talebine bağlı veya idari iptal işlemleri için poliçe iptal iş akışlarını başlatmak için kullanılır.\n */\nexport interface CreateCancelCaseRequest {\n /**\n * Policy Unique Identifier / Poliçe Benzersiz Tanımlayıcısı\n *\n * EN: The unique identifier of the insurance policy that is subject to cancellation.\n * This policy must be in an active state to be eligible for cancellation. The system\n * will validate policy status and customer authorization before processing the cancellation request.\n *\n * TR: İptalin konusu olan sigorta poliçesinin benzersiz tanımlayıcısı. Bu poliçe iptal\n * için uygun olmak üzere aktif durumda olmalıdır. Sistem, iptal talebini işlemeden önce\n * poliçe durumunu ve müşteri yetkisini doğrulayacaktır.\n */\n readonly policyId: string;\n\n /**\n * Cancellation Sub-Type / İptal Alt Türü\n *\n * EN: The specific category of cancellation being requested, which determines the appropriate\n * processing procedures, refund calculations, and regulatory requirements. Different cancellation\n * types may have different timelines, fees, and customer communication requirements.\n *\n * TR: Talep edilen iptalin belirli kategorisi; uygun işleme prosedürleri, iade hesaplamaları\n * ve düzenleyici gereksinimleri belirler. Farklı iptal türlerinin farklı zaman çizelgeleri,\n * ücretleri ve müşteri iletişimi gereksinimleri olabilir.\n */\n readonly subType: CancelCaseSubType;\n\n /**\n * Communication Channel / İletişim Kanalı\n *\n * EN: The channel through which the customer submitted the cancellation request. This information\n * helps ensure appropriate response methods and processing timelines based on channel-specific\n * service level agreements. Some channels may require additional verification steps.\n * Defaults to Unknown if not specified.\n *\n * TR: Müşterinin iptal talebini gönderdiği kanal. Bu bilgi, kanala özel hizmet seviyesi\n * anlaşmalarına dayalı uygun yanıt yöntemleri ve işleme zaman çizelgelerini sağlamaya yardımcı olur.\n * Bazı kanallar ek doğrulama adımları gerektirebilir. Belirtilmezse Bilinmeyen olarak\n * varsayılan değer alır.\n */\n readonly channel?: Channel;\n}\n\n/**\n * Represents a request to create a new complaint case for a customer.\n * Used to initiate customer complaint resolution workflows for service issues, claim disputes, or other concerns.\n *\n * Bir müşteri için yeni şikayet talebi oluşturmak için kullanılan istek.\n * Hizmet sorunları, hasar uyuşmazlıkları veya diğer endişeler için müşteri şikayet çözüm iş akışlarını başlatmak için kullanılır.\n */\nexport interface CreateComplaintCaseRequest {\n /**\n * Customer Unique Identifier / Müşteri Benzersiz Tanımlayıcısı\n *\n * EN: The unique identifier of the customer filing the complaint.\n *\n * TR: Şikayeti dosyalayan müşterinin benzersiz tanımlayıcısı.\n */\n readonly customerId: string;\n\n /**\n * Complaint Sub-Type / Şikayet Alt Türü\n *\n * EN: The specific category of complaint being filed.\n *\n * TR: Dosyalanan şikayetin belirli kategorisi.\n */\n readonly subType: ComplaintCaseSubType;\n\n /**\n * Communication Channel / İletişim Kanalı\n *\n * EN: The channel through which the complaint was received.\n *\n * TR: Şikayetin alındığı kanal.\n */\n readonly channel?: Channel;\n\n /**\n * Asset Type / Varlık Türü\n *\n * EN: The type of asset related to the complaint, if applicable.\n *\n * TR: Varsa, şikayet ile ilgili varlığın türü.\n */\n readonly assetType?: AssetType;\n\n /**\n * Asset ID / Varlık Kimliği\n *\n * EN: The unique identifier of the asset related to the complaint, if applicable.\n *\n * TR: Varsa, şikayet ile ilgili varlığın benzersiz tanımlayıcısı.\n */\n readonly assetId?: string;\n\n /**\n * Product Branch / Ürün Dalı\n *\n * EN: The insurance product branch related to the complaint.\n *\n * TR: Şikayet ile ilgili sigorta ürün dalı.\n */\n readonly productBranch?: ProductBranch;\n}\n\n/**\n * Represents a request to create a new cross-sale opportunity case derived from an existing case.\n * Used to identify and pursue additional insurance product sales opportunities for existing customers.\n *\n * Mevcut bir talepten türetilen yeni çapraz satış fırsatı talebi oluşturmak için kullanılan istek.\n * Mevcut müşteriler için ek sigorta ürünü satış fırsatlarını belirlemek ve takip etmek için kullanılır.\n */\nexport interface CreateCrossSaleOpportunityCaseRequest {\n /**\n * Source Case Identifier / Kaynak Talep Tanımlayıcısı\n *\n * EN: The unique identifier of the existing case that generated this cross-sale opportunity.\n * This creates a link between the original case and the new sales opportunity, enabling\n * better tracking of sales funnel effectiveness and customer journey analytics.\n *\n * TR: Bu çapraz satış fırsatını oluşturan mevcut talebin benzersiz tanımlayıcısı.\n * Bu, orijinal talep ile yeni satış fırsatı arasında bir bağlantı oluşturarak satış\n * hunisi etkinliğinin ve müşteri yolculuğu analitiğinin daha iyi takibini sağlar.\n */\n readonly sourceCaseId: string;\n\n /**\n * Customer Unique Identifier / Müşteri Benzersiz Tanımlayıcısı\n *\n * EN: The unique GUID identifier of the customer who is the subject of this cross-sale opportunity.\n * This should typically be the same customer from the source case, allowing the sales team\n * to leverage existing customer relationships and knowledge for additional sales.\n *\n * TR: Bu çapraz satış fırsatının konusu olan müşterinin benzersiz GUID tanımlayıcısı.\n * Bu genellikle kaynak talepteki aynı müşteri olmalıdır; satış ekibinin mevcut müşteri\n * ilişkilerini ve bilgilerini ek satışlar için kullanmasına olanak tanır.\n */\n readonly customerId: string;\n\n /**\n * Asset Type / Varlık Türü\n *\n * EN: The type of asset related to the cross-sale opportunity, if applicable.\n *\n * TR: Varsa, çapraz satış fırsatı ile ilgili varlığın türü.\n */\n readonly assetType?: AssetType;\n\n /**\n * Asset ID / Varlık Kimliği\n *\n * EN: The unique identifier of the asset related to the cross-sale opportunity, if applicable.\n *\n * TR: Varsa, çapraz satış fırsatı ile ilgili varlığın benzersiz tanımlayıcısı.\n */\n readonly assetId?: string;\n\n /**\n * Insurance Product Branch / Sigorta Ürün Dalı\n *\n * EN: The specific insurance product branch that represents the cross-sale opportunity.\n * This should be different from the original case's product branch to represent an\n * additional product offering that complements the customer's existing insurance portfolio.\n *\n * TR: Çapraz satış fırsatını temsil eden belirli sigorta ürün dalı. Bu, müşterinin mevcut\n * sigorta portföyünü tamamlayan ek bir ürün teklifini temsil etmek üzere orijinal talebin\n * ürün dalından farklı olmalıdır.\n */\n readonly productBranch: ProductBranch;\n\n /**\n * Communication Channel / İletişim Kanalı\n *\n * EN: The channel through which the cross-sale opportunity will be pursued. This may be\n * the same channel as the source case or a different channel based on the customer's\n * preferences and the nature of the additional product being offered.\n * Defaults to Unknown if not specified.\n *\n * TR: Çapraz satış fırsatının takip edileceği kanal. Bu, kaynak talep ile aynı kanal\n * veya müşterinin tercihleri ve sunulan ek ürünün doğasına göre farklı bir kanal olabilir.\n * Belirtilmezse Bilinmeyen olarak varsayılan değer alır.\n */\n readonly channel?: Channel;\n}\n\n/**\n * Represents a request to create an endorsement case for policy modifications or updates requested by the customer.\n * Used to initiate policy change workflows for coverage modifications, beneficiary updates, or other policy amendments.\n *\n * Müşteri tarafından talep edilen poliçe değişiklikleri veya güncellemeler için zeyilname talebi oluşturmak için kullanılan istek.\n * Teminat değişiklikleri, lehtar güncellemeleri veya diğer poliçe değişiklikleri için poliçe değişiklik iş akışlarını başlatmak için kullanılır.\n */\nexport interface CreateEndorsementCaseRequest {\n /**\n * Policy Unique Identifier / Poliçe Benzersiz Tanımlayıcısı\n *\n * EN: The unique identifier of the insurance policy that is subject to endorsement.\n *\n * TR: Zeyilnamenin konusu olan sigorta poliçesinin benzersiz tanımlayıcısı.\n */\n readonly policyId: string;\n\n /**\n * Endorsement Sub-Type / Zeyilname Alt Türü\n *\n * EN: The specific category of endorsement being requested.\n *\n * TR: Talep edilen zeyilnamenin belirli kategorisi.\n */\n readonly subType: EndorsementCaseSubType;\n\n /**\n * Communication Channel / İletişim Kanalı\n *\n * EN: The channel through which the endorsement request was received.\n *\n * TR: Zeyilname talebinin alındığı kanal.\n */\n readonly channel?: Channel;\n}\n\n/**\n * Represents a request to create a new sale opportunity case to track potential insurance sales to prospective customers.\n * Used to initiate sales workflows for new customers or existing customers seeking additional coverage.\n *\n * Potansiyel müşterilere olası sigorta satışlarını takip etmek için yeni satış fırsatı talebi oluşturmak için kullanılan istek.\n * Yeni müşteriler veya ek teminat arayan mevcut müşteriler için satış iş akışlarını başlatmak için kullanılır.\n */\nexport interface CreateNewSaleOpportunityCaseRequest {\n /**\n * Customer Unique Identifier / Müşteri Benzersiz Tanımlayıcısı\n *\n * EN: The unique identifier of the customer for whom the sale opportunity is being created.\n *\n * TR: Satış fırsatının oluşturulduğu müşterinin benzersiz tanımlayıcısı.\n */\n readonly customerId: string;\n\n /**\n * Asset Type / Varlık Türü\n *\n * EN: The type of asset related to the sale opportunity, if applicable.\n *\n * TR: Varsa, satış fırsatı ile ilgili varlığın türü.\n */\n readonly assetType?: AssetType;\n\n /**\n * Asset ID / Varlık Kimliği\n *\n * EN: The unique identifier of the asset related to the sale opportunity, if applicable.\n *\n * TR: Varsa, satış fırsatı ile ilgili varlığın benzersiz tanımlayıcısı.\n */\n readonly assetId?: string;\n\n /**\n * Insurance Product Branch / Sigorta Ürün Dalı\n *\n * EN: The specific insurance product branch for which the sale opportunity is being created.\n *\n * TR: Satış fırsatının oluşturulduğu belirli sigorta ürün dalı.\n */\n readonly productBranch: ProductBranch;\n\n /**\n * Communication Channel / İletişim Kanalı\n *\n * EN: The channel through which the sale opportunity will be pursued.\n *\n * TR: Satış fırsatının takip edileceği kanal.\n */\n readonly channel?: Channel;\n}\n\n/**\n * Represents a request to add a note or comment to an existing insurance case.\n * Used to record important information, observations, or communication details during case processing.\n *\n * Mevcut bir sigorta talebine not veya yorum eklemek için kullanılan istek.\n * Talep işleme sırasında önemli bilgileri, gözlemleri veya iletişim detaylarını kaydetmek için kullanılır.\n */\nexport interface AddNoteToCaseRequest {\n /**\n * Case Reference Number / Talep Referans Numarası\n *\n * EN: The unique reference identifier of the insurance case to which the note will be added.\n * This reference ensures the note is properly associated with the correct case for historical\n * tracking and audit purposes.\n *\n * TR: Notun ekleneceği sigorta talebinin benzersiz referans tanımlayıcısı.\n * Bu referans, notun tarihsel takip ve denetim amaçları için doğru talep ile uygun şekilde\n * ilişkilendirilmesini sağlar.\n */\n readonly ref: string;\n\n /**\n * Note Content / Not İçeriği\n *\n * EN: The textual content of the note to be added to the case. This can include observations,\n * decisions, communication summaries, action items, or any other relevant information that\n * should be recorded as part of the case documentation. The note will be timestamped and\n * associated with the user who created it.\n *\n * TR: Talebe eklenecek notun metin içeriği. Bu, gözlemler, kararlar, iletişim özetleri,\n * eylem öğeleri veya talep dokümantasyonunun bir parçası olarak kaydedilmesi gereken diğer\n * ilgili bilgileri içerebilir. Not, zaman damgası ile işaretlenecek ve onu oluşturan kullanıcı\n * ile ilişkilendirilecektir.\n */\n readonly note: string;\n}\n\n/**\n * Represents a request to set or update the asset associated with an existing case.\n * Used to link a specific asset (vehicle or property) to the case for proper tracking and management.\n *\n * Mevcut bir talebe varlık (asset) atamak veya güncellemek için kullanılan istek.\n * Uygun takip ve yönetim için belirli bir varlığı (araç veya emlak) talebe bağlamak için kullanılır.\n */\nexport interface SetCaseAssetRequest {\n /**\n * Case Reference Number / Talep Referans Numarası\n *\n * EN: The unique reference identifier of the case for which to set the asset.\n * This reference ensures the asset is associated with the correct case and properly\n * tracked in the system for audit and historical purposes.\n *\n * TR: Varlığın ayarlanacağı talebin benzersiz referans tanımlayıcısı.\n * Bu referans, varlığın doğru talebe ilişkilendirilmesini ve denetim ve tarihsel amaçlar\n * için sistemde uygun şekilde takip edilmesini sağlar.\n */\n readonly ref: string;\n\n /**\n * Asset Identifier / Varlık Tanımlayıcısı\n *\n * EN: The unique identifier of the asset (vehicle or property) to be linked to the case.\n * This ID corresponds to an existing asset in the customer's portfolio and is used for\n * case tracking, customer service, and relationship management.\n *\n * TR: Talebe bağlanacak varlığın (araç veya emlak) benzersiz tanımlayıcısı.\n * Bu ID, müşterinin portföyündeki mevcut bir varlığa karşılık gelir ve talep takibi,\n * müşteri hizmetleri ve ilişki yönetimi için kullanılır.\n */\n readonly assetId: string;\n\n /**\n * Asset Type / Varlık Türü\n *\n * EN: The type of asset being linked to the case (e.g., Vehicle, Property). This determines\n * the specific processing workflows, data requirements, and management procedures that apply\n * to the case. Different asset types may have different handling processes and requirements.\n *\n * TR: Talebe bağlanan varlığın türü (örneğin, Araç, Emlak). Bu, talebe uygulanan belirli\n * işlem iş akışlarını, veri gereksinimlerini ve yönetim prosedürlerini belirler. Farklı varlık\n * türlerinin farklı işleme süreçleri ve gereksinimleri olabilir.\n */\n readonly assetType: AssetType;\n}\n\n// ============================================================================\n// RESPONSE TYPES\n// ============================================================================\n\n/**\n * Base class for case information responses returned when retrieving case details by reference number.\n * Provides common case properties and serves as a polymorphic base for specific case type responses.\n *\n * Referans numarası ile talep detayları alınırken döndürülen talep bilgi yanıtları için temel sınıf.\n * Ortak talep özelliklerini sağlar ve belirli talep türü yanıtları için polimorfik temel olarak hizmet eder.\n */\nexport type GetCaseByRefResult =\n | GetSaleOpportunityCaseResult\n | GetCancelCaseResult\n | GetEndorsementCaseResult\n | GetComplaintCaseResult;\n\ninterface GetCaseByRefResultBase {\n /**\n * Case Unique Identifier / Talep Benzersiz Tanımlayıcısı\n *\n * EN: The unique system-generated identifier for the insurance case. This ID is used\n * internally for data relationships and API operations throughout InsurUp's systems.\n *\n * TR: Sigorta talebi için sistem tarafından oluşturulan benzersiz tanımlayıcı. Bu kimlik,\n * InsurUp'ın sistemleri boyunca veri ilişkileri ve API operasyonları için dahili olarak kullanılır.\n */\n readonly id: string;\n\n /**\n * Case Reference Number / Talep Referans Numarası\n *\n * EN: The human-readable reference number assigned to the case for customer communication\n * and internal tracking. This reference is used in all customer-facing communications\n * and is typically formatted for easy verbal communication.\n *\n * TR: Müşteri iletişimi ve iç takip için talebe atanan insan tarafından okunabilir referans\n * numarası. Bu referans, müşteriye yönelik tüm iletişimlerde kullanılır ve genellikle kolay\n * sözlü iletişim için formatlanır.\n */\n readonly ref: string;\n\n /**\n * Case Type Category / Talep Tür Kategorisi\n *\n * EN: The primary category of the case, which determines the overall processing workflow\n * and business rules applied to the case throughout its lifecycle.\n *\n * TR: Talebin yaşam döngüsü boyunca uygulanan genel işleme iş akışını ve iş kurallarını\n * belirleyen talebin birincil kategorisi.\n */\n readonly type: CaseType;\n\n /**\n * Case Status / Talep Durumu\n *\n * EN: The current operational status of the case, indicating whether it is active,\n * completed, or in another state that affects how it should be processed.\n *\n * TR: Talebin mevcut operasyonel durumu; aktif, tamamlanmış veya nasıl işlenmesi\n * gerektiğini etkileyen başka bir durumda olup olmadığını gösterir.\n */\n readonly status: CaseStatus;\n\n /**\n * Case Main State / Talep Ana Durumu\n *\n * EN: The primary state category of the case in its workflow progression, representing\n * the high-level phase of case processing.\n *\n * TR: Talep iş akışı ilerlemesindeki talebin birincil durum kategorisi; talep işlemenin\n * üst düzey aşamasını temsil eder.\n */\n readonly mainState: CaseMainState;\n\n /**\n * Case Sub-State / Talep Alt Durumu\n *\n * EN: The specific sub-state within the main state category, providing granular\n * details about the exact phase of case processing.\n *\n * TR: Ana durum kategorisi içindeki belirli alt durum; talep işlemenin tam aşaması\n * hakkında ayrıntılı detaylar sağlar.\n */\n readonly subState: CaseSubState;\n\n /**\n * Customer Unique Identifier / Müşteri Benzersiz Tanımlayıcısı\n *\n * EN: The unique identifier of the customer who is the subject of this case.\n * This links the case to customer profiles and history within InsurUp's system.\n *\n * TR: Bu talebin konusu olan müşterinin benzersiz tanımlayıcısı. Bu, talebi\n * InsurUp'ın sistemindeki müşteri profilleri ve geçmişi ile ilişkilendirir.\n */\n readonly customerId: string;\n\n /**\n * Customer Type / Müşteri Türü\n *\n * EN: The classification of the customer, such as individual or corporate,\n * which affects processing rules and regulatory requirements.\n *\n * TR: Bireysel veya kurumsal gibi müşterinin sınıflandırması; işleme kurallarını\n * ve düzenleyici gereksinimleri etkiler.\n */\n readonly customerType: CustomerType;\n\n /**\n * Customer Name / Müşteri Adı\n *\n * EN: The name of the customer associated with this case, used for identification\n * and communication purposes. May be null if customer information is restricted.\n *\n * TR: Bu talep ile ilişkili müşterinin adı; tanımlama ve iletişim amaçları için\n * kullanılır. Müşteri bilgileri kısıtlıysa null olabilir.\n */\n readonly customerName?: string | null;\n\n /**\n * Base Product Branch / Temel Ürün Dalı\n *\n * EN: The primary insurance product branch that this case relates to, if applicable.\n * This helps categorize the case and determine appropriate handling procedures.\n *\n * TR: Bu talebin ilgili olduğu birincil sigorta ürün dalı (varsa). Bu, talebi\n * kategorize etmeye ve uygun işleme prosedürlerini belirlemeye yardımcı olur.\n */\n readonly baseProductBranch?: ProductBranch;\n\n /**\n * Asset Type / Varlık Türü\n *\n * EN: The type of asset associated with this case, if applicable.\n *\n * TR: Bu talep ile ilişkili varlığın türü (varsa).\n */\n readonly assetType?: AssetType;\n\n /**\n * Asset ID / Varlık Kimliği\n *\n * EN: The unique identifier of the asset associated with this case, if applicable.\n *\n * TR: Bu talep ile ilişkili varlığın benzersiz tanımlayıcısı (varsa).\n */\n readonly assetId?: string;\n\n /**\n * Case Creation Timestamp / Talep Oluşturma Zaman Damgası\n *\n * EN: The date and time when the case was initially created in the system.\n * Used for tracking case age, SLA compliance, and reporting purposes.\n *\n * TR: Talebin sistemde ilk oluşturulduğu tarih ve saat. Talep yaşı takibi,\n * SLA uyumluluğu ve raporlama amaçları için kullanılır.\n */\n readonly createdAt: string;\n\n /**\n * Case Creator User Reference / Talep Oluşturan Kullanıcı Referansı\n *\n * EN: Reference to the user who initially created this case, including their\n * identification and role information for audit and tracking purposes.\n *\n * TR: Bu talebi ilk oluşturan kullanıcıya referans; denetim ve takip amaçları\n * için tanımlama ve rol bilgilerini içerir.\n */\n readonly createdBy: UserReference;\n\n /**\n * Assigned Representative User Reference / Atanmış Temsilci Kullanıcı Referansı\n *\n * EN: Reference to the user currently assigned as the case representative, if any.\n * This person is responsible for handling customer communications and case progression.\n *\n * TR: Şu anda talep temsilcisi olarak atanmış kullanıcıya referans (varsa). Bu kişi,\n * müşteri iletişimleri ve talep ilerlemesini yönetmekten sorumludur.\n */\n readonly representedBy?: UserReference;\n\n /**\n * Communication Channel / İletişim Kanalı\n *\n * EN: The channel through which the case was originally initiated, affecting\n * handling procedures and service level agreements.\n *\n * TR: Talebin ilk başlatıldığı kanal; işleme prosedürleri ve hizmet seviyesi\n * anlaşmalarını etkiler.\n */\n readonly channel: Channel;\n\n /**\n * Source Case Identifier / Kaynak Talep Tanımlayıcısı\n *\n * EN: The identifier of the original case from which this case was derived,\n * if applicable. Used for tracking case relationships and workflows.\n *\n * TR: Bu talebin türetildiği orijinal talebin tanımlayıcısı (varsa). Talep\n * ilişkileri ve iş akışlarını takip etmek için kullanılır.\n */\n readonly sourceCaseId?: string;\n\n /**\n * Source Case Reference Number / Kaynak Talep Referans Numarası\n *\n * EN: The reference number of the original case from which this case was derived,\n * if applicable. Used for customer communication and case traceability.\n *\n * TR: Bu talebin türetildiği orijinal talebin referans numarası (varsa). Müşteri\n * iletişimi ve talep izlenebilirliği için kullanılır.\n */\n readonly sourceCaseRef?: string;\n\n /**\n * Policy End Date / Poliçe Bitiş Tarihi\n *\n * EN: The end date of the policy relevant to this case, if applicable.\n * Used for timing decisions and renewal-related case processing.\n *\n * TR: Bu talep ile ilgili poliçenin bitiş tarihi (varsa). Zamanlama kararları\n * ve yenileme ile ilgili talep işleme için kullanılır.\n */\n readonly policyEndDate?: string;\n\n /**\n * Associated Policy IDs / İlişkili Poliçe Kimlikleri\n *\n * EN: Array of policy identifiers that are associated with or relevant to this case.\n * These policies may be directly affected by case actions or referenced for context.\n *\n * TR: Bu talep ile ilişkili veya ilgili poliçe tanımlayıcıları dizisi. Bu poliçeler,\n * talep eylemlerinden doğrudan etkilenebilir veya bağlam için referans alınabilir.\n */\n readonly policyIds: readonly string[];\n\n /**\n * Associated Proposal IDs / İlişkili Teklif Kimlikleri\n *\n * EN: Array of proposal identifiers that are associated with or relevant to this case.\n * These proposals may be generated as part of the case or referenced for comparison.\n *\n * TR: Bu talep ile ilişkili veya ilgili teklif tanımlayıcıları dizisi. Bu teklifler,\n * talebin bir parçası olarak oluşturulabilir veya karşılaştırma için referans alınabilir.\n */\n readonly proposalIds: readonly string[];\n\n /**\n * Case Notes / Talep Notları\n *\n * EN: Array of notes that have been added to this case throughout its lifecycle.\n * These notes provide additional context, decisions, and communication history.\n *\n * TR: Bu talebe yaşam döngüsü boyunca eklenmiş notlar dizisi. Bu notlar ek bağlam,\n * kararlar ve iletişim geçmişi sağlar.\n */\n readonly notes: readonly Note[];\n\n /**\n * Case Priority Assessment / Talep Öncelik Değerlendirmesi\n *\n * EN: Contains the priority assessment information for the case, including the total score,\n * detailed rule information, and assessment timestamp. This helps determine case handling\n * urgency and resource allocation.\n *\n * TR: Toplam puan, detaylı kural bilgileri ve değerlendirme zaman damgası dahil olmak üzere\n * talebin öncelik değerlendirme bilgilerini içerir. Bu, talep işleme aciliyeti ve kaynak\n * tahsisini belirlemeye yardımcı olur.\n */\n readonly priority?: CasePriorityResult;\n}\n\nexport interface GetSaleOpportunityCaseResult extends GetCaseByRefResultBase {\n readonly type: CaseType.SaleOpportunity;\n readonly caseSubType: SaleOpportunityCaseSubType;\n}\n\nexport interface GetCancelCaseResult extends GetCaseByRefResultBase {\n readonly type: CaseType.Cancel;\n readonly caseSubType: CancelCaseSubType;\n readonly policyId: string;\n}\n\nexport interface GetEndorsementCaseResult extends GetCaseByRefResultBase {\n readonly type: CaseType.Endorsement;\n readonly caseSubType: EndorsementCaseSubType;\n readonly policyId: string;\n}\n\nexport interface GetComplaintCaseResult extends GetCaseByRefResultBase {\n readonly type: CaseType.Complaint;\n readonly caseSubType: ComplaintCaseSubType;\n}\n\n/**\n * Represents case priority assessment information including score and rule details.\n * Puan ve kural detayları dahil olmak üzere talep öncelik değerlendirme bilgilerini temsil eder.\n */\nexport interface CasePriorityResult {\n /**\n * Total Priority Score / Toplam Öncelik Puanı\n *\n * EN: The calculated total priority score for the case based on all applicable rules.\n * Higher scores indicate higher priority and urgency for case handling.\n *\n * TR: Geçerli tüm kurallara dayalı olarak talep için hesaplanan toplam öncelik puanı.\n * Daha yüksek puanlar talep işleme için daha yüksek öncelik ve aciliyeti gösterir.\n */\n readonly totalScore: number;\n\n /**\n * Priority Rule Hits / Öncelik Kuralı Eşleşmeleri\n *\n * EN: Array of detailed information about priority rules that were triggered during\n * the assessment, including user-friendly labels, descriptions, and scores.\n *\n * TR: Değerlendirme sırasında tetiklenen öncelik kuralları hakkında kullanıcı dostu\n * etiketler, açıklamalar ve puanlar dahil olmak üzere detaylı bilgi dizisi.\n */\n readonly ruleHits: readonly CasePriorityRuleHitDetail[];\n\n /**\n * Assessment Timestamp / Değerlendirme Zaman Damgası\n *\n * EN: The date and time when the priority assessment was last calculated for this case.\n * Used for tracking assessment currency and audit purposes.\n *\n * TR: Bu talep için öncelik değerlendirmesinin son hesaplandığı tarih ve saat.\n * Değerlendirme güncelliğini takip etmek ve denetim amaçları için kullanılır.\n */\n readonly assessedAt: string;\n}\n\n/**\n * Details about a case priority rule hit including user-friendly information.\n * Kullanıcı dostu bilgiler dahil olmak üzere talep öncelik kuralı eşleşmesi hakkında detaylar.\n */\nexport interface CasePriorityRuleHitDetail {\n /**\n * Rule System Name / Kural Sistem Adı\n *\n * EN: The internal system identifier for the priority rule. This is used by\n * the system for rule execution and configuration.\n *\n * TR: Öncelik kuralı için dahili sistem tanımlayıcısı. Bu, kural yürütme\n * ve yapılandırma için sistem tarafından kullanılır.\n */\n readonly name: string;\n\n /**\n * Rule Display Label / Kural Görüntü Etiketi\n *\n * EN: A user-friendly, localized label for the rule that can be displayed\n * in user interfaces to help users understand which rule was applied.\n *\n * TR: Hangi kuralın uygulandığını kullanıcıların anlamasına yardımcı olmak\n * için kullanıcı arayüzlerinde görüntülenebilen kullanıcı dostu, yerelleştirilmiş\n * kural etiketi.\n */\n readonly label: string;\n\n /**\n * Rule Description / Kural Açıklaması\n *\n * EN: A detailed, user-friendly description explaining what the rule does,\n * when it applies, and how it affects case priority calculation.\n *\n * TR: Kuralın ne yaptığını, ne zaman uygulandığını ve talep öncelik hesaplamasını\n * nasıl etkilediğini açıklayan detaylı, kullanıcı dostu açıklama.\n */\n readonly description: string;\n\n /**\n * Rule Score Contribution / Kural Puan Katkısı\n *\n * EN: The score value that this rule contributed to the total case priority score.\n * Higher values indicate higher priority impact.\n *\n * TR: Bu kuralın toplam talep öncelik puanına katkı sağladığı puan değeri.\n * Daha yüksek değerler daha yüksek öncelik etkisini gösterir.\n */\n readonly score: number;\n}\n\n/**\n * Represents a note added to a case with timestamp and creator information.\n * Zaman damgası ve oluşturucu bilgisi ile talebe eklenen bir notu temsil eder.\n */\nexport interface Note {\n /**\n * Note Content / Not İçeriği\n *\n * EN: The textual content of the note added to the case. This can include observations,\n * decisions, communication summaries, or any other relevant information.\n *\n * TR: Talebe eklenen notun metin içeriği. Bu, gözlemler, kararlar, iletişim özetleri\n * veya diğer ilgili bilgileri içerebilir.\n */\n readonly note: string;\n\n /**\n * Note Creation Timestamp / Not Oluşturma Zaman Damgası\n *\n * EN: The date and time when the note was added to the case. Used for\n * chronological ordering and audit trail purposes.\n *\n * TR: Notun talebe eklendiği tarih ve saat. Kronolojik sıralama ve denetim\n * izi amaçları için kullanılır.\n */\n readonly createdAt: string;\n\n /**\n * Note Creator User Reference / Not Oluşturan Kullanıcı Referansı\n *\n * EN: Reference to the user who created this note, including their identification\n * and role information for accountability and audit purposes.\n *\n * TR: Bu notu oluşturan kullanıcıya referans; hesap verebilirlik ve denetim\n * amaçları için tanımlama ve rol bilgilerini içerir.\n */\n readonly createdBy: UserReference;\n}\n\n/**\n * Response class containing comprehensive information about an insurance policy associated with a case.\n * Provides detailed policy data including financial information, customer details, and asset-specific properties.\n *\n * Bir talep ile ilişkili sigorta poliçesi hakkında kapsamlı bilgi içeren yanıt sınıfı.\n * Finansal bilgiler, müşteri detayları ve varlığa özel özellikler dahil olmak üzere detaylı poliçe verisi sağlar.\n */\nexport interface CasePolicyResult {\n /**\n * Policy Unique Identifier / Poliçe Benzersiz Tanımlayıcısı\n */\n readonly id: string;\n\n /**\n * Insurer Customer Identifier / Sigortalayan Müşteri Tanımlayıcısı\n */\n readonly insurerCustomerId: string;\n\n /**\n * Insured Customer Identifier / Sigortalı Müşteri Tanımlayıcısı\n */\n readonly insuredCustomerId: string;\n\n /**\n * Premium Payment Installment Number / Prim Ödeme Taksit Numarası\n */\n readonly installmentNumber?: number;\n\n /**\n * Insurance Product Branch / Sigorta Ürün Dalı\n */\n readonly productBranch: ProductBranch;\n\n /**\n * Net Premium Amount / Net Prim Tutarı\n */\n readonly netPremium: number;\n\n /**\n * Gross Premium Amount / Brüt Prim Tutarı\n */\n readonly grossPremium: number;\n\n /**\n * Commission Amount / Komisyon Tutarı\n */\n readonly commission?: number;\n\n /**\n * Payment Option / Ödeme Seçeneği\n */\n readonly paymentType: PaymentOption;\n\n /**\n * Policy Currency / Poliçe Para Birimi\n */\n readonly currency: Currency;\n\n /**\n * Insurance Company Proposal Number / Sigorta Şirketi Teklif Numarası\n */\n readonly insuranceCompanyProposalNumber: string;\n\n /**\n * Policy Creation Timestamp / Poliçe Oluşturma Zaman Damgası\n */\n readonly createdAt: string;\n\n /**\n * Policy Start Date / Poliçe Başlangıç Tarihi\n */\n readonly startDate: string;\n\n /**\n * Policy End Date / Poliçe Bitiş Tarihi\n */\n readonly endDate: string;\n\n /**\n * Policy State / Poliçe Durumu\n */\n readonly state: PolicyState;\n\n /**\n * Insured Customer Name / Sigortalı Müşteri Adı\n */\n readonly insuredCustomerName?: string;\n\n /**\n * Insurer Customer Name / Sigortalayan Müşteri Adı\n */\n readonly insurerCustomerName?: string;\n\n /**\n * Insurance Product Identifier / Sigorta Ürün Tanımlayıcısı\n */\n readonly productId: string;\n\n /**\n * Insurance Product Name / Sigorta Ürün Adı\n */\n readonly productName: string;\n\n /**\n * Insurance Company Identifier / Sigorta Şirketi Tanımlayıcısı\n */\n readonly insuranceCompanyId: string;\n\n /**\n * Insurance Company Name / Sigorta Şirketi Adı\n */\n readonly insuranceCompanyName: string;\n\n /**\n * Insurance Company Logo URL / Sigorta Şirketi Logo URL'si\n */\n readonly insuranceCompanyLogo?: string;\n\n /**\n * Insurance Company Policy Number / Sigorta Şirketi Poliçe Numarası\n */\n readonly insuranceCompanyPolicyNumber: string;\n\n /**\n * Insured Customer Identity / Sigortalı Müşteri Kimliği\n */\n readonly insuredCustomerIdentity: string;\n\n /**\n * Insurer Customer Identity / Sigortalayan Müşteri Kimliği\n */\n readonly insurerCustomerIdentity: string;\n\n /**\n * Insured Customer Type / Sigortalı Müşteri Türü\n */\n readonly insuredCustomerType: CustomerType;\n\n /**\n * Insurer Customer City / Sigortalayan Müşteri Şehri\n */\n readonly insurerCustomerCity?: InsuranceParameter;\n\n /**\n * Insured Customer City / Sigortalı Müşteri Şehri\n */\n readonly insuredCustomerCity?: InsuranceParameter;\n\n /**\n * Insurer Customer District / Sigortalayan Müşteri İlçesi\n */\n readonly insurerCustomerDistrict?: InsuranceParameter;\n\n /**\n * Insured Customer District / Sigortalı Müşteri İlçesi\n */\n readonly insuredCustomerDistrict?: InsuranceParameter;\n\n /**\n * Insurer Customer Birth Date / Sigortalayan Müşteri Doğum Tarihi\n */\n readonly insurerCustomerBirthDate?: string;\n\n /**\n * Vehicle Model Information / Araç Model Bilgisi\n */\n readonly vehicleModel?: VehicleModel;\n\n /**\n * Vehicle Plate Information / Araç Plaka Bilgisi\n */\n readonly vehiclePlate?: VehiclePlate;\n\n /**\n * Vehicle Document Serial / Araç Belge Serisi\n */\n readonly vehicleDocumentSerial?: VehicleDocumentSerial;\n\n /**\n * Vehicle Fuel Type / Araç Yakıt Türü\n */\n readonly vehicleFuel?: VehicleFuel;\n\n /**\n * Insured Customer Birth Date / Sigortalı Müşteri Doğum Tarihi\n */\n readonly insuredCustomerBirthDate?: string;\n\n /**\n * Policy Creator User Reference / Poliçe Oluşturan Kullanıcı Referansı\n */\n readonly createdBy: UserReference;\n\n /**\n * Property Number / Mülk Numarası\n */\n readonly propertyNumber?: number;\n\n /**\n * Old DASK Policy Number / Eski DASK Poliçe Numarası\n */\n readonly daskOldPolicyNumber?: number;\n\n /**\n * Current DASK Policy Number / Mevcut DASK Poliçe Numarası\n */\n readonly daskPolicyNumber?: string;\n}\n\n/**\n * Response class containing comprehensive information about an insurance proposal associated with a case.\n * Provides detailed proposal data including product information, customer details, and success metrics.\n *\n * Bir talep ile ilişkili sigorta teklifi hakkında kapsamlı bilgi içeren yanıt sınıfı.\n * Ürün bilgileri, müşteri detayları ve başarı metrikleri dahil olmak üzere detaylı teklif verisi sağlar.\n */\nexport interface CaseProposalResult {\n /**\n * Proposal Unique Identifier / Teklif Benzersiz Tanımlayıcısı\n */\n readonly id: string;\n\n /**\n * Insurer Customer Identifier / Sigortalayan Müşteri Tanımlayıcısı\n */\n readonly insurerCustomerId: string;\n\n /**\n * Insured Customer Identifier / Sigortalı Müşteri Tanımlayıcısı\n */\n readonly insuredCustomerId: string;\n\n /**\n * Insurance Product Branch / Sigorta Ürün Dalı\n */\n readonly productBranch: ProductBranch;\n\n /**\n * Proposal State / Teklif Durumu\n */\n readonly state: string; // ProposalState enum\n\n /**\n * Total Products Count / Toplam Ürün Sayısı\n */\n readonly productsCount: number;\n\n /**\n * Successful Products Count / Başarılı Ürün Sayısı\n */\n readonly succeedProductsCount: number;\n\n /**\n * Agent User Creator Reference / Acente Kullanıcı Oluşturucu Referansı\n */\n readonly agentUserCreatedBy: UserReference;\n\n /**\n * Insured Customer Name / Sigortalı Müşteri Adı\n */\n readonly insuredCustomerName: string;\n\n /**\n * Insured Customer Identity / Sigortalı Müşteri Kimliği\n */\n readonly insuredCustomerIdentity: string;\n\n /**\n * Insured Customer Type / Sigortalı Müşteri Türü\n */\n readonly insuredCustomerType: CustomerType;\n\n /**\n * Insured Customer City / Sigortalı Müşteri Şehri\n */\n readonly insuredCustomerCity?: InsuranceParameter;\n\n /**\n * Insured Customer District / Sigortalı Müşteri İlçesi\n */\n readonly insuredCustomerDistrict?: InsuranceParameter;\n\n /**\n * Vehicle Model Information / Araç Model Bilgisi\n */\n readonly vehicleModel?: VehicleModel;\n\n /**\n * Vehicle Plate Information / Araç Plaka Bilgisi\n */\n readonly vehiclePlate?: VehiclePlate;\n\n /**\n * Vehicle Document Serial / Araç Belge Serisi\n */\n readonly vehicleDocumentSerial?: VehicleDocumentSerial;\n\n /**\n * Vehicle Fuel Type / Araç Yakıt Türü\n */\n readonly vehicleFuel?: VehicleFuel;\n\n /**\n * Insured Customer Birth Date / Sigortalı Müşteri Doğum Tarihi\n */\n readonly insuredCustomerBirthDate?: string;\n\n /**\n * Proposal Success Rate / Teklif Başarı Oranı\n */\n readonly successRate: number;\n\n /**\n * Lowest Premium Amount / En Düşük Prim Tutarı\n */\n readonly lowestPremium?: number;\n\n /**\n * Highest Premium Amount / En Yüksek Prim Tutarı\n */\n readonly highestPremium?: number;\n\n /**\n * Vehicle Utilization Style / Araç Kullanım Biçimi\n */\n readonly utilizationStyle?: string; // VehicleUtilizationStyle enum\n\n /**\n * Proposal Creation Timestamp / Teklif Oluşturma Zaman Damgası\n */\n readonly createdAt: string;\n}\n\n/**\n * Base class for case activity responses that represent different types of actions performed on insurance cases.\n * Provides common activity properties and serves as a polymorphic base for specific activity type responses.\n *\n * Sigorta talepleri üzerinde gerçekleştirilen farklı eylem türlerini temsil eden talep aktivite yanıtları için temel sınıf.\n * Ortak aktivite özelliklerini sağlar ve belirli aktivite türü yanıtları için polimorfik temel olarak hizmet eder.\n */\nexport type CaseActivityResult =\n | CaseCreatedActivityResult\n | CasePolicyAddedActivityResult\n | CaseProposalAddedActivityResult\n | CaseRepresentativeAssignedActivityResult\n | CaseChannelChangedActivityResult\n | CaseStateChangedActivityResult\n | CasePolicyEndDateSetActivityResult\n | CaseCustomerUpdatedActivityResult\n | CaseAssetUpdatedActivityResult\n | CaseNoteAddedActivityResult\n | CasePriorityAssessedActivityResult\n | CaseProposalProductPurchaseAttemptedActivityResult;\n\ninterface CaseActivityResultBase {\n /**\n * Case Activity Action / Talep Aktivite Eylemi\n *\n * EN: The specific action or event type that this activity represents in the case lifecycle.\n * This determines the nature of the change or event that occurred and how it should be\n * interpreted in the context of case management and audit trails.\n *\n * TR: Bu aktivitenin talep yaşam döngüsünde temsil ettiği belirli eylem veya olay türü.\n * Bu, meydana gelen değişiklik veya olayın doğasını ve talep yönetimi ve denetim izleri\n * bağlamında nasıl yorumlanması gerektiğini belirler.\n */\n readonly action: CaseActivityAction;\n\n /**\n * Activity Timestamp / Aktivite Zaman Damgası\n *\n * EN: The date and time when this activity was performed on the case. Used for\n * chronological ordering of activities, audit trails, and timeline analysis.\n *\n * TR: Bu aktivitenin talep üzerinde gerçekleştirildiği tarih ve saat. Aktivitelerin\n * kronolojik sıralaması, denetim izleri ve zaman çizelgesi analizi için kullanılır.\n */\n readonly createdAt: string;\n\n /**\n * Activity Performer User Reference / Aktivite Gerçekleştiren Kullanıcı Referansı\n *\n * EN: Reference to the user who performed this activity, including their identification\n * and role information for accountability and audit purposes.\n *\n * TR: Bu aktiviteyi gerçekleştiren kullanıcıya referans; hesap verebilirlik ve denetim\n * amaçları için tanımlama ve rol bilgilerini içerir.\n */\n readonly createdBy: UserReference;\n}\n\nexport interface CaseCreatedActivityResult extends CaseActivityResultBase {\n readonly action: CaseActivityAction.Created;\n readonly channel: Channel;\n readonly representative?: UserReference;\n}\n\nexport interface CasePolicyAddedActivityResult extends CaseActivityResultBase {\n readonly action: CaseActivityAction.PolicyAdded;\n readonly policyId: string;\n readonly policyCreatedBy: UserReference;\n}\n\nexport interface CaseProposalAddedActivityResult extends CaseActivityResultBase {\n readonly action: CaseActivityAction.ProposalAdded;\n readonly proposalId: string;\n readonly proposalCreatedBy: UserReference;\n}\n\nexport interface CaseRepresentativeAssignedActivityResult extends CaseActivityResultBase {\n readonly action: CaseActivityAction.RepresentativeAssigned;\n readonly oldRepresentative?: UserReference;\n readonly newRepresentative?: UserReference;\n}\n\nexport interface CaseChannelChangedActivityResult extends CaseActivityResultBase {\n readonly action: CaseActivityAction.ChannelChanged;\n readonly oldChannel: Channel;\n readonly newChannel: Channel;\n}\n\nexport interface CaseStateChangedActivityResult extends CaseActivityResultBase {\n readonly action: CaseActivityAction.StateChanged;\n readonly oldMainState: CaseMainState;\n readonly oldSubState: CaseSubState;\n readonly newMainState: CaseMainState;\n readonly newSubState: CaseSubState;\n}\n\nexport interface CasePolicyEndDateSetActivityResult extends CaseActivityResultBase {\n readonly action: CaseActivityAction.PolicyEndDateSet;\n readonly oldPolicyEndDate?: string;\n readonly newPolicyEndDate?: string;\n}\n\nexport interface CaseCustomerUpdatedActivityResult extends CaseActivityResultBase {\n readonly action: CaseActivityAction.CustomerUpdated;\n readonly oldCustomerName?: string;\n readonly newCustomerName?: string;\n readonly oldCustomerIdentity?: string;\n readonly newCustomerIdentity?: string;\n readonly oldCustomerCity?: InsuranceParameter;\n readonly newCustomerCity?: InsuranceParameter;\n readonly oldCustomerDistrict?: InsuranceParameter;\n readonly newCustomerDistrict?: InsuranceParameter;\n readonly oldCustomerPrimaryPhoneNumber?: CustomerPhoneNumber;\n readonly newCustomerPrimaryPhoneNumber?: CustomerPhoneNumber;\n readonly oldCustomerPrimaryEmail?: CustomerEmail;\n readonly newCustomerPrimaryEmail?: CustomerEmail;\n readonly oldCustomerBirthDate?: BirthDate;\n readonly newCustomerBirthDate?: BirthDate;\n}\n\nexport interface CaseAssetUpdatedActivityResult extends CaseActivityResultBase {\n readonly action: CaseActivityAction.AssetUpdated;\n readonly oldAssetId?: string;\n readonly newAssetId?: string;\n readonly oldVehiclePlate?: VehiclePlate;\n readonly newVehiclePlate?: VehiclePlate;\n readonly oldVehicleModel?: VehicleModel;\n readonly newVehicleModel?: VehicleModel;\n readonly oldVehicleUtilizationStyle?: VehicleUtilizationStyle;\n readonly newVehicleUtilizationStyle?: VehicleUtilizationStyle;\n readonly oldVehicleEngine?: VehicleEngine;\n readonly newVehicleEngine?: VehicleEngine;\n readonly oldVehicleChassis?: VehicleChassis;\n readonly newVehicleChassis?: VehicleChassis;\n readonly oldVehicleRegistrationDate?: VehicleRegistrationDate;\n readonly newVehicleRegistrationDate?: VehicleRegistrationDate;\n readonly oldVehicleFuel?: VehicleFuel;\n readonly newVehicleFuel?: VehicleFuel;\n readonly oldVehicleSeatNumber?: VehicleSeatNumber;\n readonly newVehicleSeatNumber?: VehicleSeatNumber;\n readonly oldVehicleDocumentSerial?: VehicleDocumentSerial;\n readonly newVehicleDocumentSerial?: VehicleDocumentSerial;\n readonly oldPropertyNumber?: PropertyNumber;\n readonly newPropertyNumber?: PropertyNumber;\n readonly oldPropertySquareMeter?: PropertySquareMeter;\n readonly newPropertySquareMeter?: PropertySquareMeter;\n readonly oldPropertyConstructionYear?: PropertyConstructionYear;\n readonly newPropertyConstructionYear?: PropertyConstructionYear;\n readonly oldPropertyDamageStatus?: PropertyDamageStatus;\n readonly newPropertyDamageStatus?: PropertyDamageStatus;\n readonly oldPropertyFloor?: PropertyFloor;\n readonly newPropertyFloor?: PropertyFloor;\n readonly oldPropertyStructure?: PropertyStructure;\n readonly newPropertyStructure?: PropertyStructure;\n readonly oldPropertyUtilizationStyle?: PropertyUtilizationStyle;\n readonly newPropertyUtilizationStyle?: PropertyUtilizationStyle;\n readonly oldPropertyOwnershipType?: PropertyOwnershipType;\n readonly newPropertyOwnershipType?: PropertyOwnershipType;\n}\n\nexport interface CaseNoteAddedActivityResult extends CaseActivityResultBase {\n readonly action: CaseActivityAction.NoteAdded;\n readonly note: string;\n}\n\nexport interface CasePriorityAssessedActivityResult extends CaseActivityResultBase {\n readonly action: CaseActivityAction.PriorityAssessed;\n readonly oldTotalScore?: number;\n readonly oldRuleHits?: readonly CasePriorityRuleHitDetail[];\n readonly newTotalScore: number;\n readonly newRuleHits: readonly CasePriorityRuleHitDetail[];\n}\n\nexport interface CaseProposalProductPurchaseAttemptedActivityResult extends CaseActivityResultBase {\n readonly action: CaseActivityAction.ProposalProductPurchaseAttempted;\n readonly proposalId: string;\n readonly proposalProductId: string;\n readonly insuranceProductId: number;\n readonly installmentNumber: number;\n readonly attemptedTime: string;\n readonly success: boolean;\n readonly errorMessage?: string;\n readonly channel: Channel;\n readonly paymentOption: PaymentOption;\n}\n\n// ============================================================================\n// SUPPORTING TYPES\n// ============================================================================\n\n// UserReference, InsuranceParameter, and vehicle types are imported from './common'\n\n// ============================================================================\n// BRANCH ASSIGNMENT TYPES\n// ============================================================================\n\n/**\n * Request to set case branch\n */\nexport interface SetCaseBranchRequest {\n readonly ref: string;\n readonly branchId: string;\n}\n\n// ============================================================================\n// ANALYTICS TYPES\n// ============================================================================\n\n/**\n * Request for sales opportunity funnel analytics\n */\nexport interface GetSalesOpportunityFunnelAnalyticsRequest {\n readonly startDate?: string;\n readonly endDate?: string;\n}\n\n/**\n * Funnel stage data\n */\nexport interface FunnelStage {\n readonly stage: string;\n readonly count: number;\n readonly percentage: number;\n}\n\n/**\n * Response for sales opportunity funnel analytics\n */\nexport interface GetSalesOpportunityFunnelAnalyticsResult {\n readonly stages: readonly FunnelStage[];\n}\n\n/**\n * Request for open case backlog pivot analytics\n */\nexport interface GetOpenCaseBacklogPivotAnalyticsRequest {\n readonly filters?: object;\n}\n\n/**\n * Backlog pivot data\n */\nexport interface BacklogPivotData {\n readonly type: string;\n readonly subtype: string;\n readonly count: number;\n}\n\n/**\n * Response for open case backlog pivot analytics\n */\nexport interface GetOpenCaseBacklogPivotAnalyticsResult {\n readonly pivotData: readonly BacklogPivotData[];\n}\n\n/**\n * Request for failed cases reason distribution\n */\nexport interface GetFailedCasesReasonDistributionRequest {\n readonly startDate?: string;\n readonly endDate?: string;\n}\n\n/**\n * Reason distribution data\n */\nexport interface ReasonDistribution {\n readonly reason: string;\n readonly count: number;\n readonly percentage: number;\n}\n\n/**\n * Response for failed cases reason distribution\n */\nexport interface GetFailedCasesReasonDistributionResult {\n readonly reasons: readonly ReasonDistribution[];\n}\n\n// ============================================================================\n// COMMUNICATION AUTOMATION TYPES\n// ============================================================================\n\n/**\n * Automation argument\n */\nexport interface AutomationArgument {\n readonly key: string;\n readonly type: string;\n readonly required: boolean;\n}\n\n/**\n * Case communication automation result\n */\nexport interface CaseCommunicationAutomationResult {\n readonly id: string;\n readonly name: string;\n readonly arguments: readonly AutomationArgument[];\n}\n\n// ============================================================================\n// PRIORITY TEMPLATE TYPES\n// ============================================================================\n\n/**\n * Priority template\n */\nexport interface PriorityTemplate {\n readonly id: string;\n readonly name: string;\n readonly description?: string;\n}\n\n/**\n * Response for case priority templates\n */\nexport interface GetCasePriorityTemplatesResult {\n readonly templates: readonly PriorityTemplate[];\n}\n","import type { ProductBranch, Channel } from \"./common.js\";\nimport type {\n CaseType,\n SaleOpportunityCaseSubType,\n CancelCaseSubType,\n EndorsementCaseSubType,\n ComplaintCaseSubType,\n} from \"./cases.js\";\n\n/**\n * Represents the robotic process automation (RPA) deployment modes available for agents.\n * Defines how and where automated processes and software robots operate within the agent's infrastructure.\n *\n * Acenteler için mevcut robotik süreç otomasyonu (RPA) dağıtım modlarını temsil eder.\n * Otomatik süreçlerin ve yazılım robotlarının acente altyapısı içinde nasıl ve nerede çalıştığını tanımlar.\n */\nexport enum RobotMode {\n /**\n * No robotic process automation is enabled.\n * All processes are handled manually by human operators.\n *\n * Robotik süreç otomasyonu etkin değil.\n * Tüm süreçler insan operatörler tarafından manuel olarak yürütülür.\n */\n None = \"NONE\",\n\n /**\n * Robotic automation runs on desktop computers within the agent's local environment.\n * Robots operate on individual workstations with direct user interaction capabilities.\n *\n * Robotik otomasyon acente yerel ortamında masaüstü bilgisayarlarda çalışır.\n * Robotlar doğrudan kullanıcı etkileşim yetenekleri ile bireysel iş istasyonlarında çalışır.\n */\n Desktop = \"DESKTOP\",\n\n /**\n * Robotic automation runs on centralized servers with 24/7 unattended operation.\n * Robots operate independently without direct human intervention in a server environment.\n *\n * Robotik otomasyon 7/24 gözetimsiz çalışma ile merkezi sunucularda çalışır.\n * Robotlar sunucu ortamında doğrudan insan müdahalesi olmadan bağımsız olarak çalışır.\n */\n Server = \"SERVER\",\n}\n\n/**\n * Represents the different modes available for automatically assigning cases to representatives.\n * Defines how new cases are distributed among available representatives within an agent's organization.\n *\n * Temsilcilere case'lerin otomatik olarak atanması için mevcut farklı modları temsil eder.\n * Yeni case'lerin acente organizasyonu içindeki mevcut temsilciler arasında nasıl dağıtıldığını tanımlar.\n */\nexport enum CaseRepresentativeAssignmentMode {\n /**\n * No automatic assignment is performed.\n * Cases remain unassigned and must be manually assigned by administrators.\n *\n * Hiçbir otomatik atama yapılmaz.\n * Case'ler atanmamış kalır ve yöneticiler tarafından manuel olarak atanmalıdır.\n */\n None = \"NONE\",\n\n /**\n * Cases are randomly distributed among eligible representatives.\n * Each new case is assigned to a randomly selected representative who meets the criteria.\n *\n * Case'ler uygun temsilciler arasında rastgele dağıtılır.\n * Her yeni case, kriterleri karşılayan rastgele seçilmiş bir temsilciye atanır.\n */\n Random = \"RANDOM\",\n\n /**\n * Cases are distributed equally among representatives using round-robin algorithm.\n * Representatives take turns receiving cases to ensure balanced workload distribution.\n *\n * Case'ler round-robin algoritması kullanılarak temsilciler arasında eşit olarak dağıtılır.\n * Temsilciler dengeli iş yükü dağılımını sağlamak için sırayla case alırlar.\n */\n RoundRobin = \"ROUND_ROBIN\",\n\n /**\n * Cases are distributed based on insurance branch importance weights.\n * Representatives receive cases based on their current workload calculated by importance scores of assigned cases.\n *\n * Case'ler sigorta branşı önem ağırlıklarına göre dağıtılır.\n * Temsilciler, atanmış case'lerin önem puanlarıyla hesaplanan mevcut iş yüklerine göre case alırlar.\n */\n BranchImportanceBalance = \"BRANCH_IMPORTANCE_BALANCE\",\n}\n\n/**\n * Represents the synchronization status between agent systems and insurance company platforms.\n * Tracks the current state of data synchronization for agent appointments, products, and configurations.\n *\n * Acente sistemleri ile sigorta şirketi platformları arasındaki senkronizasyon durumunu temsil eder.\n * Acente randevuları, ürünler ve konfigürasyonlar için veri senkronizasyonunun mevcut durumunu takip eder.\n */\nexport enum InsuranceSyncState {\n /**\n * Synchronization is currently in progress or queued for processing.\n * The system is attempting to sync data with the insurance company.\n *\n * Senkronizasyon şu anda devam ediyor veya işlem için sıraya alındı.\n * Sistem sigorta şirketi ile veri senkronizasyonu yapmaya çalışıyor.\n */\n Pending = \"PENDING\",\n\n /**\n * Synchronization with the insurance company has failed.\n * Manual intervention or retry may be required to resolve the issue.\n *\n * Sigorta şirketi ile senkronizasyon başarısız oldu.\n * Sorunu çözmek için manuel müdahale veya yeniden deneme gerekebilir.\n */\n Failed = \"FAILED\",\n\n /**\n * Synchronization with the insurance company has completed successfully.\n * All data is up-to-date and systems are fully operational.\n *\n * Sigorta şirketi ile senkronizasyon başarıyla tamamlandı.\n * Tüm veriler güncel ve sistemler tamamen operasyonel.\n */\n Succeed = \"SUCCEED\",\n}\n\n/**\n * Represents the integration method types used by agents to connect with insurance companies.\n * Defines how agents interface with insurance company systems for quotes, policies, and data exchange.\n *\n * Acentelerin sigorta şirketleri ile bağlantı kurmak için kullandığı entegrasyon yöntem türlerini temsil eder.\n * Acentelerin teklif, poliçe ve veri alışverişi için sigorta şirketi sistemleri ile nasıl arayüz kuracağını tanımlar.\n */\nexport enum AgentInsuranceCompanyType {\n /**\n * Integration through web service APIs and online portals.\n * Enables real-time data exchange through standard web protocols.\n *\n * Web servis API'leri ve çevrimiçi portallar aracılığıyla entegrasyon.\n * Standart web protokolleri aracılığıyla gerçek zamanlı veri alışverişi sağlar.\n */\n WebService = \"WEB_SERVICE\",\n\n /**\n * Integration through robotic process automation (RPA) and automated form filling.\n * Uses software robots to interact with insurance company systems automatically.\n *\n * Robotik süreç otomasyonu (RPA) ve otomatik form doldurma yoluyla entegrasyon.\n * Sigorta şirketi sistemleri ile otomatik etkileşim için yazılım robotları kullanır.\n */\n Robot = \"ROBOT\",\n}\n\n/**\n * SMS implementation types available for agent integrations.\n *\n * Acente entegrasyonları için mevcut SMS uygulama türleri.\n */\nexport enum SmsImplementation {\n Default = \"Default\",\n Teknomart = \"Teknomart\",\n ArtiKurumsal = \"ArtiKurumsal\",\n Verimor = \"Verimor\",\n}\n\n/**\n * Call center implementation types available for agent integrations.\n *\n * Acente entegrasyonları için mevcut çağrı merkezi uygulama türleri.\n */\nexport enum CallCenterImplementation {\n None = \"None\",\n AloTech = \"AloTech\",\n}\n\n/**\n * Agent user state enumeration.\n * Tracks the activation state of an agent user account.\n *\n * Acente kullanıcısı durum enum'u.\n * Acente kullanıcı hesabının aktivasyon durumunu takip eder.\n */\nexport enum AgentUserState {\n /** User account is pending activation / Kullanıcı hesabı aktivasyon bekliyor */\n Pending = \"PENDING\",\n /** User account is active and operational / Kullanıcı hesabı aktif ve çalışır durumda */\n Active = \"ACTIVE\",\n /** User account is inactive or disabled / Kullanıcı hesabı inaktif veya devre dışı */\n Inactive = \"INACTIVE\",\n}\n\n/**\n * Base class for SMS service integration options.\n *\n * SMS hizmet entegrasyon seçenekleri için temel sınıf.\n */\n/**\n * Union type for all SMS agent options\n * Tüm SMS acente seçenekleri için birleşim türü\n */\nexport type SmsAgentOptions =\n | {\n readonly implementation: SmsImplementation.Default;\n }\n | {\n readonly implementation: SmsImplementation.Teknomart;\n readonly sender: string;\n readonly username: string;\n readonly password: string;\n }\n | {\n readonly implementation: SmsImplementation.ArtiKurumsal;\n readonly companyCode: string;\n readonly username: string;\n readonly password: string;\n readonly originator: string;\n }\n | {\n readonly implementation: SmsImplementation.Verimor;\n readonly username: string;\n readonly password: string;\n readonly sourceAddr: string;\n };\n\n/**\n * Union type for all call center agent options\n * Tüm çağrı merkezi acente seçenekleri için birleşim türü\n */\nexport type CallCenterAgentOptions =\n | ({\n readonly implementation: CallCenterImplementation.None;\n } & CallCenterAgentOptionsBase)\n | ({\n readonly implementation: CallCenterImplementation.AloTech;\n readonly clientSecret: string;\n readonly clientId: string;\n readonly campaignKeyMappings: CampaignKeyMapping[];\n readonly listName: string;\n } & CallCenterAgentOptionsBase);\n\ntype CallCenterAgentOptionsBase = {\n readonly tenant: string;\n};\n\n/**\n * Campaign key mapping for AloTech call center integration.\n *\n * AloTech çağrı merkezi entegrasyonu için kampanya anahtar eşleme.\n */\nexport interface CampaignKeyMapping {\n readonly campaignKey: string;\n readonly productBranch: ProductBranch | null;\n readonly caseType: CaseType | null;\n}\n\n/**\n * Represents phone number information with country code.\n *\n * Ülke kodu ile telefon numarası bilgilerini temsil eder.\n */\nexport interface PhoneNumber {\n /**\n * The phone number without country code.\n *\n * Ülke kodu olmadan telefon numarası.\n */\n readonly number: string;\n\n /**\n * The international country code for the phone number.\n *\n * Telefon numarası için uluslararası ülke kodu.\n */\n readonly countryCode: number;\n}\n\n/**\n * Case priority rule definition model.\n *\n * Case öncelik kuralı tanım modeli.\n */\nexport interface CasePriorityRuleDefinition {\n readonly name: string;\n readonly score: number;\n readonly branches: readonly ProductBranch[];\n readonly caseTypes: readonly CaseType[];\n readonly saleOpportunityCaseSubTypes: readonly SaleOpportunityCaseSubType[];\n readonly cancelCaseSubTypes: readonly CancelCaseSubType[];\n readonly endorsementCaseSubTypes: readonly EndorsementCaseSubType[];\n readonly complaintCaseSubTypes: readonly ComplaintCaseSubType[];\n readonly channels: readonly Channel[];\n readonly arguments: Record<string, unknown>;\n}\n\n/**\n * Represents a product branch with its authorized products for the agent.\n *\n * Acente için yetkili ürünler ile bir ürün dalını temsil eder.\n */\nexport interface Branch {\n /**\n * The insurance product branch category.\n *\n * Sigorta ürün dalı kategorisi.\n */\n readonly productBranch: ProductBranch;\n\n /**\n * Array of specific product identifiers within the branch that the agent can sell.\n *\n * Acentenin satabileceği dal içindeki belirli ürün tanımlayıcıları dizisi.\n */\n readonly productIds: readonly number[];\n}\n\n// Request contracts\n\n/**\n * Represents a request to update the current agent's profile information and operational settings.\n * Allows agents to modify their business details, contact information, and system configurations.\n *\n * Geçerli acentenin profil bilgilerini ve operasyonel ayarlarını güncelleme talebini temsil eder.\n * Acentelerin iş detaylarını, iletişim bilgilerini ve sistem yapılandırmalarını değiştirmesine olanak tanır.\n */\nexport interface UpdateCurrentAgentRequest {\n /**\n * The updated name of the agent.\n *\n * Acentenin güncellenmiş adı.\n */\n readonly name: string;\n\n /**\n * The updated phone number information for the agent.\n *\n * Acente için güncellenmiş telefon numarası bilgileri.\n */\n readonly phoneNumber: PhoneNumber | null;\n\n /**\n * The email address of the agent for business communications and notifications.\n *\n * Acentenin iş iletişimleri ve bildirimler için email adresi.\n */\n readonly email: string | null;\n\n /**\n * The automation mode for the agent's operations.\n *\n * Acentenin operasyonları için otomasyon modu.\n */\n readonly robotMode: RobotMode;\n\n /**\n * Optional call center integration options for the agent.\n *\n * Acente için isteğe bağlı çağrı merkezi entegrasyon seçenekleri.\n */\n readonly callCenterOptions: CallCenterAgentOptions | null;\n\n /**\n * Optional SMS service integration options for the agent.\n *\n * Acente için isteğe bağlı SMS hizmet entegrasyon seçenekleri.\n */\n readonly smsOptions: SmsAgentOptions | null;\n\n /**\n * The case representative assignment mode for automatic case distribution.\n *\n * Otomatik case dağıtımı için case atama modu.\n */\n readonly caseRepresentativeAssignmentMode: CaseRepresentativeAssignmentMode | null;\n\n /**\n * The list of allowed role names for case representative assignment.\n *\n * Case ataması için izin verilen rol adlarının listesi.\n */\n readonly caseRepresentativeAssignmentAllowedRoles: readonly string[];\n\n readonly casePriorityRuleDefinitions: readonly CasePriorityRuleDefinition[];\n}\n\n/**\n * Represents a request to add an insurance company connection to an agent.\n * Establishes a business relationship and authorizes the agent to sell the company's products.\n *\n * Bir acenteye sigorta şirketi bağlantısı ekleme talebini temsil eder.\n * İş ilişkisi kurar ve acenteyi şirketin ürünlerini satma konusunda yetkilendirir.\n */\nexport interface AddInsuranceCompanyToAgentRequest {\n /**\n * The unique identifier of the insurance company to be added.\n *\n * Eklenecek sigorta şirketinin benzersiz tanımlayıcısı.\n */\n readonly insuranceCompanyId: number;\n\n /**\n * The type of relationship between the agent and insurance company.\n *\n * Acente ile sigorta şirketi arasındaki ilişki türü.\n */\n readonly type: AgentInsuranceCompanyType;\n\n /**\n * The connection configuration fields for integrating with the insurance company's systems.\n *\n * Sigorta şirketinin sistemleri ile entegrasyon için bağlantı yapılandırma alanları.\n */\n readonly connectionFields: Record<string, string>;\n\n /**\n * Array of product branches and their associated products that the agent is authorized to sell.\n *\n * Acentenin satma yetkisine sahip olduğu ürün dalları ve ilişkili ürünler dizisi.\n */\n readonly branches: readonly Branch[];\n}\n\n/**\n * Represents a request to retrieve the product branches and authorizations for an agent's insurance company connection.\n * Used to view which insurance products the agent is authorized to sell from a specific insurance company.\n *\n * Bir acentenin sigorta şirketi bağlantısı için ürün dalları ve yetkilendirmelerini getirme talebini temsil eder.\n * Acentenin belirli bir sigorta şirketinden satma yetkisine sahip olduğu sigorta ürünlerini görüntülemek için kullanılır.\n */\nexport interface GetAgentInsuranceCompanyBranchesRequest {\n /**\n * The unique identifier of the agent-insurance company relationship to retrieve branches for.\n *\n * Dalları getirilecek acente-sigorta şirketi ilişkisinin benzersiz tanımlayıcısı.\n */\n readonly agentInsuranceCompanyId: string;\n}\n\n/**\n * Represents a request to retrieve the connection configuration for an agent's insurance company integration.\n * Used to view technical connection parameters and credentials for system integration.\n *\n * Bir acentenin sigorta şirketi entegrasyonu için bağlantı yapılandırmasını getirme talebini temsil eder.\n * Sistem entegrasyonu için teknik bağlantı parametrelerini ve kimlik bilgilerini görüntülemek için kullanılır.\n */\nexport interface GetAgentInsuranceCompanyConnectionRequest {\n /**\n * The unique identifier of the agent-insurance company relationship to retrieve connection details for.\n *\n * Bağlantı detayları getirilecek acente-sigorta şirketi ilişkisinin benzersiz tanımlayıcısı.\n */\n readonly agentInsuranceCompanyId: string;\n}\n\n/**\n * Represents a request to update the connection configuration for an agent's insurance company integration.\n * Modifies technical connection parameters and credentials for system integration.\n *\n * Bir acentenin sigorta şirketi entegrasyonu için bağlantı yapılandırmasını güncelleme talebini temsil eder.\n * Sistem entegrasyonu için teknik bağlantı parametrelerini ve kimlik bilgilerini değiştirir.\n */\nexport interface UpdateAgentInsuranceCompanyConnectionRequest {\n /**\n * The unique identifier of the agent-insurance company relationship to update.\n *\n * Güncellenecek acente-sigorta şirketi ilişkisinin benzersiz tanımlayıcısı.\n */\n readonly agentInsuranceCompanyId: string;\n\n /**\n * Updated connection configuration fields for integrating with the insurance company's systems.\n *\n * Sigorta şirketinin sistemleri ile entegrasyon için güncellenmiş bağlantı yapılandırma alanları.\n */\n readonly connectionFields: Record<string, string>;\n}\n\n/**\n * Represents a request to update the product branches and authorizations for an agent's insurance company connection.\n * Modifies which insurance products the agent is authorized to sell from a specific insurance company.\n *\n * Bir acentenin sigorta şirketi bağlantısı için ürün dalları ve yetkilendirmelerini güncelleme talebini temsil eder.\n * Acentenin belirli bir sigorta şirketinden satma yetkisine sahip olduğu sigorta ürünlerini değiştirir.\n */\nexport interface UpdateAgentInsuranceCompanyBranchesRequest {\n /**\n * The unique identifier of the agent-insurance company relationship to update.\n *\n * Güncellenecek acente-sigorta şirketi ilişkisinin benzersiz tanımlayıcısı.\n */\n readonly agentInsuranceCompanyId: string;\n\n /**\n * Array of updated product branches and their associated products that the agent is authorized to sell.\n *\n * Acentenin satma yetkisine sahip olduğu güncellenmiş ürün dalları ve ilişkili ürünler dizisi.\n */\n readonly branches: readonly Branch[];\n}\n\n/**\n * Represents a request to re-synchronize an agent's insurance company connection with the insurance company's systems.\n * Triggers a fresh data synchronization to ensure consistency between systems.\n *\n * Bir acentenin sigorta şirketi bağlantısını sigorta şirketinin sistemleri ile yeniden senkronize etme talebini temsil eder.\n * Sistemler arasında tutarlılığı sağlamak için yeni bir veri senkronizasyonu tetikler.\n */\nexport interface ReSyncAgentInsuranceCompanyWithInsuranceRequest {\n /**\n * The unique identifier of the agent-insurance company relationship to re-sync.\n *\n * Yeniden senkronize edilecek acente-sigorta şirketi ilişkisinin benzersiz tanımlayıcısı.\n */\n readonly agentInsuranceCompanyId: string;\n}\n\n// Response contracts\n\n/**\n * Represents the response containing the current agent's profile information and operational settings.\n * Returns comprehensive agent details including business information and system configurations.\n *\n * Geçerli acentenin profil bilgileri ve operasyonel ayarlarını içeren yanıtı temsil eder.\n * İş bilgileri ve sistem yapılandırmaları dahil olmak üzere kapsamlı acente detaylarını döndürür.\n */\nexport interface GetCurrentAgentResult {\n /**\n * The name of the agent.\n *\n * Acentenin adı.\n */\n readonly name: string;\n\n /**\n * The plate number of the agent's registered vehicle (if applicable).\n *\n * Acentenin kayıtlı aracının plaka numarası (varsa).\n */\n readonly plateNo: string | null;\n\n /**\n * The tax number of the agent for business and regulatory purposes.\n *\n * İş ve düzenleyici amaçlar için acentenin vergi numarası.\n */\n readonly taxNumber: string;\n\n /**\n * The contact phone number information for the agent.\n *\n * Acente için iletişim telefon numarası bilgileri.\n */\n readonly phoneNumber: PhoneNumber | null;\n\n /**\n * The email address of the agent for business communications and notifications.\n *\n * Acentenin iş iletişimleri ve bildirimler için email adresi.\n */\n readonly email: string | null;\n\n /**\n * The automation mode for the agent's operations.\n *\n * Acentenin operasyonları için otomasyon modu.\n */\n readonly robotMode: RobotMode;\n\n /**\n * The call center integration configuration for the agent.\n *\n * Acente için çağrı merkezi entegrasyon yapılandırması.\n */\n readonly callCenterOptions: CallCenterAgentOptions | null;\n\n /**\n * The SMS service integration configuration for the agent.\n *\n * Acente için SMS hizmet entegrasyon yapılandırması.\n */\n readonly smsOptions: SmsAgentOptions | null;\n\n /**\n * The case representative assignment mode for automatic case distribution.\n *\n * Otomatik case dağıtımı için case atama modu.\n */\n readonly caseRepresentativeAssignmentMode: CaseRepresentativeAssignmentMode | null;\n\n /**\n * The list of allowed role names for case representative assignment.\n *\n * Case ataması için izin verilen rol adlarının listesi.\n */\n readonly caseRepresentativeAssignmentAllowedRoles: readonly string[];\n\n /**\n * Case priority rule definitions configured for the agent. Empty means no rules.\n */\n readonly casePriorityRuleDefinitions: readonly CasePriorityRuleDefinition[];\n}\n\n/**\n * Represents a single insurance company connection item for an agent in the insurance companies list response.\n * Contains comprehensive information about the agent's relationship with an insurance company.\n *\n * Sigorta şirketleri liste yanıtında bir acente için tek bir sigorta şirketi bağlantı öğesini temsil eder.\n * Acentenin bir sigorta şirketi ile ilişkisi hakkında kapsamlı bilgiler içerir.\n */\nexport interface GetMyAgentInsuranceCompaniesResult {\n /**\n * The unique identifier of the agent-insurance company relationship.\n *\n * Acente-sigorta şirketi ilişkisinin benzersiz tanımlayıcısı.\n */\n readonly id: string;\n\n /**\n * The identifier of the insurance company.\n *\n * Sigorta şirketinin tanımlayıcısı.\n */\n readonly insuranceCompanyId: number;\n\n /**\n * The name of the insurance company.\n *\n * Sigorta şirketinin adı.\n */\n readonly insuranceCompanyName: string;\n\n /**\n * Array of product branches that the agent is authorized to sell from this insurance company.\n *\n * Acentenin bu sigorta şirketinden satma yetkisine sahip olduğu ürün dalları dizisi.\n */\n readonly productBranches: readonly ProductBranch[];\n\n /**\n * The current synchronization status with the insurance company's systems.\n *\n * Sigorta şirketinin sistemleri ile mevcut senkronizasyon durumu.\n */\n readonly insuranceSyncState: InsuranceSyncState;\n\n /**\n * The type of business relationship between the agent and insurance company.\n *\n * Acente ile sigorta şirketi arasındaki iş ilişkisinin türü.\n */\n readonly type: AgentInsuranceCompanyType;\n\n /**\n * The connection configuration fields for integrating with the insurance company's systems.\n *\n * Sigorta şirketinin sistemleri ile entegrasyon için bağlantı yapılandırma alanları.\n */\n readonly connectionFields: Record<string, string>;\n\n /**\n * The permissions for this agent role.\n *\n * Bu rol için kesinleşmiş izinler dizisi. Permissions parametresi null ise,\n * bu özellik boş bir dizi döndürür ve sistem genelinde izin atamalarının\n * tutarlı şekilde işlenmesini sağlar.\n */\n readonly permissions: readonly string[];\n}\n\n/**\n * Represents the response containing product branch information for an agent's insurance company connection.\n * Returns the authorized product categories and specific products that the agent can sell.\n *\n * Bir acentenin sigorta şirketi bağlantısı için ürün dalı bilgilerini içeren yanıtı temsil eder.\n * Acentenin satabileceği yetkili ürün kategorilerini ve belirli ürünlerini döndürür.\n */\nexport interface GetAgentInsuranceCompanyBranchesResult {\n /**\n * The insurance product branch category that the agent is authorized to sell.\n *\n * Acentenin satma yetkisine sahip olduğu sigorta ürün dalı kategorisi.\n */\n readonly productBranch: ProductBranch;\n\n /**\n * Array of specific product identifiers within the branch that the agent can sell.\n *\n * Acentenin satabileceği dal içindeki belirli ürün tanımlayıcıları dizisi.\n */\n readonly productIds: number[];\n}\n\n/**\n * Represents the response containing connection configuration for an agent's insurance company integration.\n * Returns the technical connection parameters and credentials used for system integration.\n *\n * Bir acentenin sigorta şirketi entegrasyonu için bağlantı yapılandırmasını içeren yanıtı temsil eder.\n * Sistem entegrasyonu için kullanılan teknik bağlantı parametrelerini ve kimlik bilgilerini döndürür.\n */\nexport interface GetAgentInsuranceCompanyConnectionResult {\n /**\n * The connection configuration fields for integrating with the insurance company's systems.\n *\n * Sigorta şirketinin sistemleri ile entegrasyon için bağlantı yapılandırma alanları.\n */\n readonly connectionFields: Record<string, string>;\n}\n\n// Agent Role Contracts\n\n/**\n * Represents a request to create a new role within an agent organization with specific permissions.\n * This defines a custom role that can be assigned to agent users for access control.\n *\n * Belirli izinlerle acente organizasyonu içinde yeni bir rol oluşturma isteğini temsil eder.\n * Bu, erişim kontrolü için acente kullanıcılarına atanabilecek özel bir rol tanımlar.\n */\nexport interface CreateAgentRoleRequest {\n /**\n * The name of the role to be created within the agent organization.\n * This name should be descriptive and unique within the organization to help\n * administrators identify the role's purpose. Role names are used in user\n * management interfaces and role assignment operations.\n *\n * Acente organizasyonu içinde oluşturulacak rolün adı. Bu ad açıklayıcı\n * ve organizasyon içinde benzersiz olmalıdır, böylece yöneticilerin rolün\n * amacını belirlemesine yardımcı olur. Rol adları kullanıcı yönetimi\n * arayüzlerinde ve rol atama operasyonlarında kullanılır.\n */\n readonly roleName: string;\n\n /**\n * The finalized array of permissions for this role. If the Permissions parameter\n * was null, this property returns an empty array, ensuring consistent handling\n * of permission assignments throughout the system.\n *\n * Bu rol için kesinleşmiş izinler dizisi. Permissions parametresi null ise,\n * bu özellik boş bir dizi döndürür ve sistem genelinde izin atamalarının\n * tutarlı şekilde işlenmesini sağlar.\n */\n readonly permissions: string[];\n}\n\n/**\n * Represents a request to update an existing agent role's permissions, access levels, or configuration settings.\n * This modifies role details and affects all users assigned to this role.\n *\n * Mevcut bir acente rolünün izinlerini, erişim seviyelerini veya yapılandırma ayarlarını güncelleme isteğini temsil eder.\n * Bu, rol detaylarını değiştirir ve bu role atanan tüm kullanıcıları etkiler.\n */\nexport interface UpdateAgentRoleRequest {\n /**\n * The unique identifier of the agent role that should be updated.\n * This ID is used to locate the specific role within the agent organization\n * and apply the requested changes to its configuration and permissions.\n *\n * Güncellenmesi gereken acente rolünün benzersiz tanımlayıcısı.\n * Bu ID, acente organizasyonu içindeki belirli rolü bulmak ve\n * konfigürasyonuna ve izinlerine istenen değişiklikleri uygulamak için kullanılır.\n */\n readonly id: string;\n\n /**\n * The new name to be assigned to the agent role. This name should be\n * descriptive and unique within the organization to help administrators\n * identify the role's purpose and distinguish it from other roles.\n *\n * Acente rolüne atanacak yeni ad. Bu ad açıklayıcı ve organizasyon\n * içinde benzersiz olmalıdır, böylece yöneticilerin rolün amacını\n * belirlemesine ve diğer rollerden ayırt etmesine yardımcı olur.\n */\n readonly name: string;\n\n /**\n * The updated array of permission identifiers that define what actions users with this role\n * can perform. This completely replaces the role's current permissions. If null or empty,\n * the role will have minimal default permissions. Changes affect all users assigned to this role.\n *\n * Bu role sahip kullanıcıların hangi eylemleri gerçekleştirebileceğini tanımlayan güncellenmiş\n * izin tanımlayıcıları dizisi. Bu, rolün mevcut izinlerini tamamen değiştirir. Null veya boş ise,\n * rol minimal varsayılan izinlere sahip olacaktır. Değişiklikler bu role atanan tüm kullanıcıları etkiler.\n */\n readonly permissions: string[] | null;\n}\n\n/**\n * Represents a request to permanently delete an agent role from the organization.\n * This removes the role and affects all users who were assigned to this role.\n *\n * Acente rolünü organizasyondan kalıcı olarak silme isteğini temsil eder.\n * Bu, rolü kaldırır ve bu role atanan tüm kullanıcıları etkiler.\n */\nexport interface DeleteAgentRoleRequest {\n /**\n * The unique identifier of the agent role that should be permanently deleted.\n * This ID is used to locate the specific role within the agent organization\n * and remove it from the system along with all its associated permissions and user assignments.\n *\n * Kalıcı olarak silinmesi gereken acente rolünün benzersiz tanımlayıcısı.\n * Bu ID, acente organizasyonu içindeki belirli rolü bulmak ve\n * ilişkili tüm izinleri ve kullanıcı atamalarıyla birlikte sistemden kaldırmak için kullanılır.\n */\n readonly id: string;\n}\n\n/**\n * Represents detailed information about a specific agent role retrieved by its unique identifier.\n * This provides comprehensive role configuration and permission details.\n *\n * Benzersiz tanımlayıcısı ile alınan belirli bir acente rolü hakkında detaylı bilgileri temsil eder.\n * Bu, kapsamlı rol konfigürasyonu ve izin detaylarını sağlar.\n */\nexport interface GetAgentRoleByIdResult {\n /**\n * The unique identifier for this agent role within the organization.\n * This ID serves as the primary reference for all role-related operations\n * and is used across the platform for role identification and management.\n *\n * Bu acente rolünün organizasyon içindeki benzersiz tanımlayıcısı.\n * Bu ID, tüm rolle ilgili operasyonlar için birincil referans olarak\n * hizmet verir ve platform genelinde rol tanımlaması ve yönetimi için kullanılır.\n */\n readonly id: string;\n\n /**\n * The human-readable name that identifies this role within the agent organization.\n * This name represents the role's purpose and responsibilities and is used throughout\n * the system for role identification and user assignment operations.\n *\n * Bu rolü acente organizasyonu içinde tanımlayan insan tarafından okunabilir ad.\n * Bu ad rolün amacını ve sorumluluklarını temsil eder ve sistem genelinde\n * rol tanımlaması ve kullanıcı atama operasyonları için kullanılır.\n */\n readonly name: string;\n\n /**\n * Complete collection of permission identifiers that define what actions users with this role\n * can perform within the system. These permissions control access to specific features,\n * data operations, and administrative functions across the agent organization.\n *\n * Bu role sahip kullanıcıların sistem içinde hangi eylemleri gerçekleştirebileceğini\n * tanımlayan izin tanımlayıcılarının tam koleksiyonu. Bu izinler acente organizasyonu\n * genelinde belirli özelliklere, veri operasyonlarına ve yönetici fonksiyonlarına erişimi kontrol eder.\n */\n readonly permissions: string[];\n\n /**\n * The timestamp when this agent role was initially created. This information\n * is useful for auditing purposes and understanding the evolution of the\n * organization's role structure over time.\n *\n * Bu acente rolünün ilk olarak oluşturulduğu zaman damgası. Bu bilgi\n * denetim amaçları ve organizasyonun rol yapısının zaman içindeki gelişimini\n * anlamak için yararlıdır.\n */\n readonly createdAt: string;\n\n /**\n * The timestamp when this agent role was last modified. Null if the role\n * has never been updated since creation. This helps track recent changes\n * and maintenance activities on the role configuration.\n *\n * Bu acente rolünün son değiştirildiği zaman damgası. Rol oluşturulduktan\n * sonra hiç güncellenmemişse null. Bu, rol konfigürasyonundaki son değişiklikleri\n * ve bakım faaliyetlerini takip etmeye yardımcı olur.\n */\n readonly updatedAt: string | null;\n\n /**\n * The unique identifier of the user who originally created this agent role.\n * This information is important for audit trails and understanding who\n * established the role within the organization.\n *\n * Bu acente rolünü orijinal olarak oluşturan kullanıcının benzersiz tanımlayıcısı.\n * Bu bilgi denetim izleri ve organizasyon içinde rolü kimin kurduğunu anlamak için önemlidir.\n */\n readonly createdById: string;\n\n /**\n * The unique identifier of the user who last modified this agent role.\n * Null if the role has never been updated since creation. This helps identify\n * who made recent changes to the role configuration.\n *\n * Bu acente rolünü son değiştiren kullanıcının benzersiz tanımlayıcısı.\n * Rol oluşturulduktan sonra hiç güncellenmemişse null. Bu, rol konfigürasyonunda\n * son değişiklikleri kimin yaptığını belirlemeye yardımcı olur.\n */\n readonly updatedById: string | null;\n\n /**\n * The display name of the user who originally created this agent role.\n * This provides a human-readable reference to the role creator for\n * administrative interfaces and audit reports.\n *\n * Bu acente rolünü orijinal olarak oluşturan kullanıcının görüntü adı.\n * Bu, yönetici arayüzleri ve denetim raporları için rol oluşturucusuna\n * insan tarafından okunabilir referans sağlar.\n */\n readonly createdByName: string;\n\n /**\n * The display name of the user who last modified this agent role.\n * Null if the role has never been updated since creation. This provides\n * a human-readable reference to the last modifier for administrative tracking.\n *\n * Bu acente rolünü son değiştiren kullanıcının görüntü adı. Rol oluşturulduktan\n * sonra hiç güncellenmemişse null. Bu, yönetici takibi için son değiştirici için\n * insan tarafından okunabilir referans sağlar.\n */\n readonly updatedByName: string | null;\n}\n\n/**\n * Represents response data for an agent role in a list of all roles within the organization.\n * This provides essential role information for administrative overview and management.\n *\n * Organizasyon içindeki tüm rollerin listesinde bir acente rolü için yanıt verilerini temsil eder.\n * Bu, yönetici görünümü ve yönetimi için temel rol bilgilerini sağlar.\n */\nexport interface GetAllAgentRolesResult {\n /**\n * The unique identifier for this agent role within the organization.\n * This ID serves as the primary reference for role management operations,\n * user assignments, and permission configurations.\n *\n * Bu acente rolünün organizasyon içindeki benzersiz tanımlayıcısı.\n * Bu ID, rol yönetimi operasyonları, kullanıcı atamaları ve izin\n * konfigürasyonları için birincil referans olarak hizmet verir.\n */\n readonly id: string;\n\n /**\n * The human-readable name that identifies this role within the agent organization.\n * This name should be descriptive and help administrators understand the role's\n * purpose and scope of responsibilities.\n *\n * Bu rolü acente organizasyonu içinde tanımlayan insan tarafından okunabilir ad.\n * Bu ad açıklayıcı olmalı ve yöneticilerin rolün amacını ve sorumluluk kapsamını\n * anlamalarına yardımcı olmalıdır.\n */\n readonly name: string;\n\n /**\n * Collection of permission identifiers that define what actions users with this role\n * can perform within the system. These permissions control access to specific features,\n * data operations, and administrative functions across the agent organization.\n *\n * Bu role sahip kullanıcıların sistem içinde hangi eylemleri gerçekleştirebileceğini\n * tanımlayan izin tanımlayıcıları koleksiyonu. Bu izinler acente organizasyonu genelinde\n * belirli özelliklere, veri operasyonlarına ve yönetici fonksiyonlarına erişimi kontrol eder.\n */\n readonly permissions: string[];\n\n /**\n * The timestamp when this agent role was initially created. This information\n * is useful for auditing purposes and understanding the evolution of the\n * organization's role structure over time.\n *\n * Bu acente rolünün ilk olarak oluşturulduğu zaman damgası. Bu bilgi\n * denetim amaçları ve organizasyonun rol yapısının zaman içindeki gelişimini\n * anlamak için yararlıdır.\n */\n readonly createdAt: string;\n\n /**\n * The timestamp when this agent role was last modified. Null if the role\n * has never been updated since creation. This helps track recent changes\n * and maintenance activities on the role configuration.\n *\n * Bu acente rolünün son değiştirildiği zaman damgası. Rol oluşturulduktan\n * sonra hiç güncellenmemişse null. Bu, rol konfigürasyonundaki son değişiklikleri\n * ve bakım faaliyetlerini takip etmeye yardımcı olur.\n */\n readonly updatedAt: string | null;\n\n /**\n * The unique identifier of the user who originally created this agent role.\n * This information is important for audit trails and understanding who\n * established the role within the organization.\n *\n * Bu acente rolünü orijinal olarak oluşturan kullanıcının benzersiz tanımlayıcısı.\n * Bu bilgi denetim izleri ve organizasyon içinde rolü kimin kurduğunu anlamak için önemlidir.\n */\n readonly createdById: string;\n\n /**\n * The unique identifier of the user who last modified this agent role.\n * Null if the role has never been updated since creation. This helps identify\n * who made recent changes to the role configuration.\n *\n * Bu acente rolünü son değiştiren kullanıcının benzersiz tanımlayıcısı.\n * Rol oluşturulduktan sonra hiç güncellenmemişse null. Bu, rol konfigürasyonunda\n * son değişiklikleri kimin yaptığını belirlemeye yardımcı olur.\n */\n readonly updatedById: string | null;\n\n /**\n * The display name of the user who originally created this agent role.\n * This provides a human-readable reference to the role creator for\n * administrative interfaces and audit reports.\n *\n * Bu acente rolünü orijinal olarak oluşturan kullanıcının görüntü adı.\n * Bu, yönetici arayüzleri ve denetim raporları için rol oluşturucusuna\n * insan tarafından okunabilir referans sağlar.\n */\n readonly createdByName: string;\n\n /**\n * The display name of the user who last modified this agent role.\n * Null if the role has never been updated since creation. This provides\n * a human-readable reference to the last modifier for administrative tracking.\n *\n * Bu acente rolünü son değiştiren kullanıcının görüntü adı. Rol oluşturulduktan\n * sonra hiç güncellenmemişse null. Bu, yönetici takibi için son değiştirici için\n * insan tarafından okunabilir referans sağlar.\n */\n readonly updatedByName: string | null;\n}\n\n// Agent Setup Contracts\n\n/**\n * Represents a request to enter an agent setup process using a provided access code.\n * This validates the code and initiates the agent registration workflow.\n *\n * Sağlanan erişim kodu kullanarak acente kurulum sürecine girme isteğini temsil eder.\n * Bu, kodu doğrular ve acente kayıt iş akışını başlatır.\n */\nexport interface EnterAgentSetupRequestRequest {\n /**\n * The unique access code associated with an agent setup request. This code is generated\n * when an administrator creates a setup request and is shared with prospective agents to\n * begin their registration process. The code must be valid and not expired for access to be granted.\n *\n * Bir acente kurulum talebi ile ilişkili benzersiz erişim kodu. Bu kod, bir yönetici\n * kurulum talebi oluşturduğunda üretilir ve kayıt süreçlerini başlatmaları için potansiyel\n * acentelerle paylaşılır. Erişim verilmesi için kodun geçerli ve süresi dolmamış olması gerekir.\n */\n readonly code: string;\n}\n\n/**\n * Represents the response when successfully entering an agent setup request process.\n * Contains the human-readable label associated with the validated setup request.\n *\n * Acente kurulum talebi sürecine başarıyla girildiğinde verilen yanıtı temsil eder.\n * Doğrulanan kurulum talebi ile ilişkili insan tarafından okunabilir etiketi içerir.\n */\nexport interface EnterAgentSetupRequestResult {\n /**\n * The descriptive label associated with the validated agent setup request.\n * This label was originally set when the setup request was created by an administrator\n * and helps identify the specific onboarding process or campaign that the agent is entering.\n *\n * Doğrulanan acente kurulum talebi ile ilişkili açıklayıcı etiket.\n * Bu etiket orijinal olarak bir yönetici tarafından kurulum talebi oluşturulduğunda\n * ayarlanmıştır ve acentenin girdiği belirli onboarding sürecini veya kampanyayı\n * tanımlamaya yardımcı olur.\n */\n readonly label: string;\n}\n\n/**\n * Represents a request to complete an agent setup process with comprehensive agent and user information.\n * This finalizes the agent onboarding workflow by creating both the agent entity and associated user account.\n *\n * Kapsamlı acente ve kullanıcı bilgileri ile acente kurulum sürecini tamamlama isteğini temsil eder.\n * Bu, hem acente varlığını hem de ilişkili kullanıcı hesabını oluşturarak acente onboarding iş akışını sonlandırır.\n */\nexport interface CompleteAgentSetupRequestRequest {\n /**\n * The unique access code that was generated when the agent setup request was created.\n * This code validates that the completion request corresponds to a valid, active setup process.\n * Must match an existing, non-expired setup request for successful completion.\n *\n * Acente kurulum talebi oluşturulduğunda üretilen benzersiz erişim kodu.\n * Bu kod, tamamlama talebinin geçerli, aktif bir kurulum sürecine karşılık geldiğini doğrular.\n * Başarılı tamamlama için mevcut, süresi dolmamış bir kurulum talebiyle eşleşmelidir.\n */\n readonly code: string;\n\n /**\n * Complete agent profile including business information, insurance company connections,\n * and product branch assignments. This defines the agent's operational capabilities\n * and system permissions within InsurUp's platform.\n *\n * İş bilgileri, sigorta şirketi bağlantıları ve ürün dalı atamalarını içeren\n * tam acente profili. Bu, acentenin InsurUp platformu içindeki operasyonel yeteneklerini\n * ve sistem yetkilerini tanımlar.\n */\n readonly agent: Agent;\n\n /**\n * Primary user account details for the agent's main administrative user.\n * This user will have full access to the agent's operations and serve as the\n * primary contact for system communications and management activities.\n *\n * Acentenin ana yönetici kullanıcısı için birincil kullanıcı hesabı detayları.\n * Bu kullanıcı acentenin operasyonlarına tam erişime sahip olacak ve sistem\n * iletişimleri ile yönetim faaliyetleri için birincil iletişim noktası olarak hizmet verecek.\n */\n readonly agentUser: AgentUser;\n}\n\n// Agent User Contracts\n\n/**\n * Represents a request to invite a new user to join an agent organization.\n * This initiates the user invitation workflow with role assignments and creates a pending user account.\n *\n * Acente organizasyonuna katılması için yeni bir kullanıcıyı davet etme isteğini temsil eder.\n * Bu, rol atamaları ile kullanıcı davet iş akışını başlatır ve beklemedeki kullanıcı hesabı oluşturur.\n */\nexport interface InviteAgentUserRequest {\n /**\n * The email address of the person being invited to join the agent organization.\n * This address will receive the invitation email and will serve as the primary\n * identifier for the user account. Must be unique within the system and will be\n * used for authentication and account management purposes.\n *\n * Acente organizasyonuna katılmaya davet edilen kişinin e-posta adresi.\n * Bu adres davet e-postasını alacak ve kullanıcı hesabı için birincil tanımlayıcı\n * olarak hizmet verecektir. Sistem içinde benzersiz olmalı ve kimlik doğrulama\n * ve hesap yönetimi amaçları için kullanılacaktır.\n */\n readonly email: string;\n\n /**\n * The first name of the person being invited to join the agent organization.\n * This information is used for personalization in invitation emails and will be\n * part of the user's profile once they accept the invitation and join the organization.\n *\n * Acente organizasyonuna katılmaya davet edilen kişinin adı.\n * Bu bilgi davet e-postalarında kişiselleştirme için kullanılır ve daveti kabul\n * edip organizasyona katıldıklarında kullanıcının profilinin bir parçası olacaktır.\n */\n readonly firstName: string;\n\n /**\n * The last name (surname) of the person being invited to join the agent organization.\n * Combined with the first name, this provides complete identification for the invited user\n * and is used in communication and user management within the organization.\n *\n * Acente organizasyonuna katılmaya davet edilen kişinin soyadı.\n * Ad ile birleştirildiğinde, davet edilen kullanıcı için tam kimlik sağlar ve\n * organizasyon içinde iletişim ve kullanıcı yönetiminde kullanılır.\n */\n readonly lastName: string;\n\n /**\n * Collection of role names that will be assigned to the user once they accept the invitation.\n * These roles determine the user's permissions and access levels within the agent organization.\n * Roles control what operations the user can perform and which parts of the system they can access.\n * An empty array means the user will have minimal default permissions.\n *\n * Kullanıcının daveti kabul etmesi durumunda atanacak rol adlarının koleksiyonu.\n * Bu roller, kullanıcının acente organizasyonu içindeki izinlerini ve erişim seviyelerini belirler.\n * Roller kullanıcının hangi operasyonları gerçekleştirebileceğini ve sistemin hangi bölümlerine\n * erişebileceğini kontrol eder. Boş dizi, kullanıcının minimal varsayılan izinlere sahip olacağı anlamına gelir.\n */\n readonly roles: string[];\n}\n\n/**\n * Represents a request to accept an agent user invitation and complete the registration process.\n * This activates a pending user account and sets the initial password.\n *\n * Acente kullanıcı davetini kabul etme ve kayıt sürecini tamamlama isteğini temsil eder.\n * Bu, beklemedeki kullanıcı hesabını aktifleştirir ve başlangıç şifresini ayarlar.\n */\nexport interface AcceptAgentUserInviteRequest {\n /**\n * The unique invitation code that was sent to the user's email when they were\n * invited to join the agent organization. This code validates the invitation\n * and ensures that only the intended recipient can accept the invitation and\n * create their account.\n *\n * Kullanıcının acente organizasyonuna katılmaya davet edildiğinde e-postasına\n * gönderilen benzersiz davet kodu. Bu kod daveti doğrular ve yalnızca hedeflenen\n * alıcının daveti kabul edebilmesini ve hesabını oluşturabilmesini sağlar.\n */\n readonly code: string;\n\n /**\n * The password that will be set for the new agent user account. This password\n * should meet the system's security requirements and will be used for future\n * authentication. The user should be encouraged to change this password after\n * their first login for enhanced security.\n *\n * Yeni acente kullanıcı hesabı için ayarlanacak şifre. Bu şifre sistemin\n * güvenlik gereksinimlerini karşılamalı ve gelecekteki kimlik doğrulamaları için\n * kullanılacaktır. Gelişmiş güvenlik için kullanıcının ilk girişinden sonra\n * bu şifreyi değiştirmesi teşvik edilmelidir.\n */\n readonly password: string;\n}\n\n/**\n * Represents a request for an agent user to update their own profile information.\n * This allows users to modify their personal details without administrative intervention.\n *\n * Acente kullanıcısının kendi profil bilgilerini güncelleme isteğini temsil eder.\n * Bu, kullanıcıların yönetici müdahalesi olmadan kişisel detaylarını değiştirmelerine olanak tanır.\n */\nexport interface UpdateMyAgentUserRequest {\n /**\n * The new first name that the user wants to set for their profile.\n * This information is used for identification and personalization throughout\n * the system and will be displayed in user interfaces and communications.\n *\n * Kullanıcının profili için ayarlamak istediği yeni ad. Bu bilgi sistem\n * genelinde kimlik belirleme ve kişiselleştirme için kullanılır ve kullanıcı\n * arayüzleri ile iletişimlerde görüntülenecektir.\n */\n readonly firstName: string;\n\n /**\n * The new last name (surname) that the user wants to set for their profile.\n * Combined with the first name, this provides complete updated identification\n * for the user within the agent organization and system communications.\n *\n * Kullanıcının profili için ayarlamak istediği yeni soyad. Ad ile birleştirildiğinde,\n * acente organizasyonu ve sistem iletişimleri içinde kullanıcı için tam güncellenmiş\n * kimlik sağlar.\n */\n readonly lastName: string;\n}\n\n/**\n * Represents a request to update an existing agent user's profile information and security settings.\n * This modifies user details, role assignments, and two-factor authentication configuration.\n *\n * Mevcut bir acente kullanıcısının profil bilgilerini ve güvenlik ayarlarını güncelleme isteğini temsil eder.\n * Bu, kullanıcı detaylarını, rol atamalarını ve iki faktörlü kimlik doğrulama konfigürasyonunu değiştirir.\n */\nexport interface UpdateAgentUserRequest {\n /**\n * The unique identifier of the agent user whose information should be updated.\n * This ID is used to locate the specific user account within the agent organization\n * and apply the requested changes to their profile and settings.\n *\n * Bilgileri güncellenmesi gereken acente kullanıcısının benzersiz tanımlayıcısı.\n * Bu ID, acente organizasyonu içindeki belirli kullanıcı hesabını bulmak ve\n * profiline ve ayarlarına istenen değişiklikleri uygulamak için kullanılır.\n */\n readonly id: string;\n\n /**\n * The new first name to be assigned to the agent user. This information\n * is used for identification and personalization throughout the system and\n * will be reflected in user interfaces and communications.\n *\n * Acente kullanıcısına atanacak yeni ad. Bu bilgi sistem genelinde\n * kimlik belirleme ve kişiselleştirme için kullanılır ve kullanıcı arayüzleri\n * ile iletişimlerde yansıtılacaktır.\n */\n readonly firstName: string;\n\n /**\n * The new last name (surname) to be assigned to the agent user.\n * Combined with the first name, this provides complete updated identification\n * for the user within the agent organization.\n *\n * Acente kullanıcısına atanacak yeni soyad. Ad ile birleştirildiğinde,\n * acente organizasyonu içinde kullanıcı için tam güncellenmiş kimlik sağlar.\n */\n readonly lastName: string;\n\n /**\n * The complete set of roles to be assigned to the agent user after the update.\n * This replaces the user's current role assignments and determines their new\n * permissions and access levels within the agent organization. All existing roles\n * are removed and replaced with the roles specified in this array.\n *\n * Güncelleme sonrasında acente kullanıcısına atanacak tam rol seti.\n * Bu, kullanıcının mevcut rol atamalarını değiştirir ve acente organizasyonu\n * içindeki yeni izinlerini ve erişim seviyelerini belirler. Mevcut tüm roller\n * kaldırılır ve bu dizide belirtilen rollerle değiştirilir.\n */\n readonly roles: string[];\n\n /**\n * Specifies whether two-factor authentication (2FA) should be enabled or disabled\n * for this agent user. When enabled, the user will be required to provide a second\n * form of authentication (such as a mobile app code) in addition to their password\n * when logging in, providing enhanced security for their account.\n *\n * Bu acente kullanıcısı için iki faktörlü kimlik doğrulamanın (2FA) etkinleştirilip\n * etkinleştirilmeyeceğini belirtir. Etkinleştirildiğinde, kullanıcının giriş yaparken\n * şifresine ek olarak ikinci bir kimlik doğrulama biçimi (mobil uygulama kodu gibi)\n * sağlaması gerekecek ve hesabı için gelişmiş güvenlik sağlayacaktır.\n */\n readonly twoFactorEnabled: boolean;\n}\n\n/**\n * Represents a request for an agent user to change their own password by providing their current password.\n * This enables users to update their authentication credentials securely.\n *\n * Acente kullanıcısının mevcut şifresini sağlayarak kendi şifresini değiştirme isteğini temsil eder.\n * Bu, kullanıcıların kimlik doğrulama bilgilerini güvenli bir şekilde güncellemelerini sağlar.\n */\nexport interface UpdateAgentUserPasswordRequest {\n /**\n * The user's current password that must be provided for verification before\n * the password can be changed. This security measure ensures that only the\n * authenticated user can modify their password and prevents unauthorized access.\n *\n * Şifre değiştirilebilmesi için doğrulama amacıyla sağlanması gereken kullanıcının\n * mevcut şifresi. Bu güvenlik önlemi, yalnızca kimliği doğrulanan kullanıcının\n * şifresini değiştirebilmesini sağlar ve yetkisiz erişimi önler.\n */\n readonly currentPassword: string;\n\n /**\n * The new password that will replace the user's current password. This password\n * should meet the system's security requirements including minimum length, complexity,\n * and character requirements. Once set, the user will use this password for\n * future authentication to their account.\n *\n * Kullanıcının mevcut şifresinin yerini alacak yeni şifre. Bu şifre, minimum\n * uzunluk, karmaşıklık ve karakter gereksinimleri dahil olmak üzere sistemin\n * güvenlik gereksinimlerini karşılamalıdır. Ayarlandıktan sonra kullanıcı,\n * hesabına gelecekteki kimlik doğrulamaları için bu şifreyi kullanacaktır.\n */\n readonly newPassword: string;\n}\n\n/**\n * Represents comprehensive information about a specific agent user retrieved from the system.\n * This response contains detailed user profile data, role assignments, and security settings.\n *\n * Sistemden alınan belirli bir acente kullanıcısı hakkında kapsamlı bilgileri temsil eder.\n * Bu yanıt detaylı kullanıcı profil verileri, rol atamaları ve güvenlik ayarlarını içerir.\n */\nexport interface GetAgentUserResult {\n /**\n * The unique identifier for this agent user within the system.\n * This ID serves as the primary reference for all user-related operations\n * and is used across the platform for user identification and management.\n *\n * Bu acente kullanıcısının sistem içindeki benzersiz tanımlayıcısı.\n * Bu ID, tüm kullanıcı ile ilgili operasyonlar için birincil referans olarak\n * hizmet verir ve platform genelinde kullanıcı tanımlaması ve yönetimi için kullanılır.\n */\n readonly id: string;\n\n /**\n * The first name of the agent user as stored in their profile.\n * This information is used for personalization and identification\n * throughout the system and in communications with the user.\n *\n * Acente kullanıcısının profilinde saklanan adı.\n * Bu bilgi sistem genelinde kişiselleştirme ve kimlik belirleme\n * ve kullanıcıyla iletişimlerde kullanılır.\n */\n readonly firstName: string;\n\n /**\n * The last name (surname) of the agent user as stored in their profile.\n * Combined with the first name, this provides complete identification\n * for the user within the agent organization.\n *\n * Acente kullanıcısının profilinde saklanan soyadı.\n * Ad ile birleştirildiğinde, acente organizasyonu içinde kullanıcı\n * için tam kimlik sağlar.\n */\n readonly lastName: string;\n\n /**\n * The email address associated with the agent user account.\n * This serves as the primary identifier for authentication and\n * is used for system communications and notifications.\n *\n * Acente kullanıcı hesabıyla ilişkili e-posta adresi.\n * Bu, kimlik doğrulama için birincil tanımlayıcı olarak hizmet verir\n * ve sistem iletişimleri ve bildirimleri için kullanılır.\n */\n readonly email: string;\n\n /**\n * Collection of role names that have been assigned to this agent user.\n * These roles determine the user's access levels and permissions within\n * the agent organization. Each role represents a set of capabilities\n * and responsibilities within the system.\n *\n * Bu acente kullanıcısına atanan rol adlarının koleksiyonu.\n * Bu roller, kullanıcının acente organizasyonu içindeki erişim seviyelerini\n * ve izinlerini belirler. Her rol, sistem içinde bir dizi yetenek ve\n * sorumluluğu temsil eder.\n */\n readonly roles: string[];\n\n /**\n * Collection of permission identifiers that this user has been granted\n * through their assigned roles. These permissions define what specific actions\n * and operations the user can perform within the agent organization's systems.\n *\n * Bu kullanıcının atanan rolleri aracılığıyla kendisine verilen izin\n * tanımlayıcıları koleksiyonu. Bu izinler, kullanıcının acente organizasyonunun\n * sistemleri içinde hangi belirli eylemleri ve operasyonları gerçekleştirebileceğini tanımlar.\n */\n readonly permissions: string[];\n\n /**\n * The name of the agent organization that this user is a member of.\n * This provides organizational context and helps identify which agent\n * business the user represents and works for.\n *\n * Bu kullanıcının üyesi olduğu acente organizasyonunun adı.\n * Bu, organizasyonel bağlam sağlar ve kullanıcının hangi acente işletmesini\n * temsil ettiğini ve için çalıştığını belirlemeye yardımcı olur.\n */\n readonly agentName: string;\n\n /**\n * Boolean flag indicating whether two-factor authentication (2FA) is\n * currently enabled for this agent user. When true, the user must provide\n * a second form of authentication in addition to their password when logging in.\n *\n * Bu acente kullanıcısı için iki faktörlü kimlik doğrulamanın (2FA) şu anda\n * etkin olup olmadığını gösteren boolean bayrağı. True olduğunda, kullanıcı\n * giriş yaparken şifresine ek olarak ikinci bir kimlik doğrulama biçimi sağlamalıdır.\n */\n readonly twoFactorEnabled: boolean;\n\n /**\n * The call center implementation configuration assigned to this agent user.\n * This determines which call center system or integration the user will use\n * for customer communications and support operations within their role.\n *\n * Bu acente kullanıcısına atanan çağrı merkezi uygulama konfigürasyonu.\n * Bu, kullanıcının rolü dahilinde müşteri iletişimleri ve destek operasyonları\n * için hangi çağrı merkezi sistemini veya entegrasyonunu kullanacağını belirler.\n */\n readonly callCenterImplementation: CallCenterImplementation;\n}\n\n/**\n * Represents the response containing the robot automation code for the current agent user.\n * This code is used for robotic process automation and API integrations.\n *\n * Mevcut acente kullanıcısı için robot otomasyon kodunu içeren yanıtı temsil eder.\n * Bu kod robotik süreç otomasyonu ve API entegrasyonları için kullanılır.\n */\nexport interface GetMyAgentUserRobotCodeResult {\n /**\n * The unique robot automation code assigned to the current agent user.\n * This code is used to identify and authenticate automated processes, API calls,\n * and robotic process automation workflows that operate on behalf of the user.\n * Essential for integration with external systems and automated business processes.\n *\n * Mevcut acente kullanıcısına atanan benzersiz robot otomasyon kodu.\n * Bu kod, kullanıcı adına çalışan otomatik süreçleri, API çağrılarını ve\n * robotik süreç otomasyonu iş akışlarını tanımlamak ve kimlik doğrulamak için kullanılır.\n * Harici sistemlerle entegrasyon ve otomatik iş süreçleri için gereklidir.\n */\n readonly robotCode: string;\n}\n\n// Agent Setup Models\n\n/**\n * Represents comprehensive agent business information and operational configuration.\n *\n * Kapsamlı acente iş bilgilerini ve operasyonel konfigürasyonu temsil eder.\n */\nexport interface Agent {\n /**\n * The official legal name under which the agent or agency operates.\n * This name is used for official documentation, contracts, and legal identification\n * within the insurance system. Must match official business registration records.\n *\n * Acentenin veya acenteliğin faaliyet gösterdiği resmi yasal adı.\n * Bu ad resmi belgeler, sözleşmeler ve sigorta sistemi içindeki yasal kimlik\n * için kullanılır. Resmi iş kayıt kayıtlarıyla eşleşmelidir.\n */\n readonly name: string;\n\n /**\n * License plate number of the company vehicle used by the agent for business operations.\n * This is optional and used for identification and tracking purposes when the agent\n * operates with a designated company vehicle for field work and client visits.\n *\n * Acentenin iş operasyonları için kullandığı şirket aracının plaka numarası.\n * Bu isteğe bağlıdır ve acente saha çalışması ve müşteri ziyaretleri için\n * belirlenmiş şirket aracı ile çalıştığında kimlik ve takip amaçları için kullanılır.\n */\n readonly plateNo: string | null;\n\n /**\n * Official tax identification number required for legal compliance and financial reporting.\n * This number is essential for tax obligations, official documentation, and regulatory\n * compliance within Turkey's business and insurance regulatory framework.\n *\n * Yasal uyumluluk ve mali raporlama için gerekli resmi vergi kimlik numarası.\n * Bu numara vergi yükümlülükleri, resmi belgeler ve Türkiye'nin iş ve sigorta\n * düzenleyici çerçevesi içindeki mevzuat uyumluluğu için gereklidir.\n */\n readonly taxNumber: string;\n\n /**\n * Primary contact phone number for business communications with the agent.\n * This number is used for customer service, technical support, and official\n * communications from InsurUp and partner insurance companies.\n *\n * Acente ile iş iletişimi için birincil iletişim telefonu numarası.\n * Bu numara müşteri hizmetleri, teknik destek ve InsurUp ile partner\n * sigorta şirketlerinden resmi iletişimler için kullanılır.\n */\n readonly phoneNumber: PhoneNumber | null;\n\n /**\n * Array of insurance company relationships and technical integrations for the agent.\n * Each connection defines which insurance company the agent works with, the type of\n * relationship, connection credentials, and specific product branches they can offer.\n *\n * Acente için sigorta şirketi ilişkileri ve teknik entegrasyonların dizisi.\n * Her bağlantı acentenin hangi sigorta şirketi ile çalıştığını, ilişki türünü,\n * bağlantı kimlik bilgilerini ve sunabilecekleri belirli ürün dallarını tanımlar.\n */\n readonly companies: Company[];\n\n /**\n * Defines the level of automated processing and robotic process automation (RPA)\n * capabilities enabled for this agent. This determines which automated workflows\n * and AI-assisted processes the agent can utilize for improved efficiency.\n *\n * Bu acente için etkinleştirilen otomatik işlem seviyesini ve robotik süreç\n * otomasyonu (RPA) yeteneklerini tanımlar. Bu, acentenin geliştirilmiş verimlilik\n * için hangi otomatik iş akışlarını ve AI destekli süreçleri kullanabileceğini belirler.\n */\n readonly robotMode: RobotMode;\n}\n\n/**\n * Defines a specific relationship between the agent and an insurance company,\n * including integration credentials, product branch permissions, and technical\n * connection parameters required for automated policy processing.\n *\n * Acente ile sigorta şirketi arasındaki belirli ilişkiyi, entegrasyon kimlik\n * bilgilerini, ürün dalı izinlerini ve otomatik poliçe işleme için gerekli\n * teknik bağlantı parametrelerini tanımlar.\n */\nexport interface Company {\n /**\n * Defines the nature of the business relationship between the agent and insurance company.\n * This determines the agent's authority level, commission structure, and operational\n * permissions within the specific insurance company's systems and processes.\n *\n * Acente ile sigorta şirketi arasındaki iş ilişkisinin doğasını tanımlar.\n * Bu, acentenin yetki seviyesini, komisyon yapısını ve belirli sigorta şirketinin\n * sistemleri ve süreçleri içindeki operasyonel izinlerini belirler.\n */\n readonly type: AgentInsuranceCompanyType;\n\n /**\n * The unique system identifier for the insurance company that the agent will\n * be connected to. This ID references the insurance company's profile and\n * integration configuration within InsurUp's platform.\n *\n * Acentenin bağlanacağı sigorta şirketinin benzersiz sistem tanımlayıcısı.\n * Bu ID, sigorta şirketinin InsurUp platformu içindeki profilini ve\n * entegrasyon konfigürasyonunu referans alır.\n */\n readonly insuranceCompanyId: number;\n\n /**\n * Dictionary of technical parameters and credentials required for establishing\n * automated integration with the insurance company's systems. These fields typically\n * include API keys, authentication tokens, endpoint URLs, and other connection-specific\n * configuration required for automated policy processing and data exchange.\n *\n * Sigorta şirketinin sistemleri ile otomatik entegrasyon kurmak için gerekli\n * teknik parametreler ve kimlik bilgileri sözlüğü. Bu alanlar genellikle API anahtarları,\n * kimlik doğrulama tokenları, endpoint URL'leri ve otomatik poliçe işleme ve\n * veri alışverişi için gerekli diğer bağlantıya özgü konfigürasyonları içerir.\n */\n readonly connectionFields: Record<string, string>;\n\n /**\n * Array of insurance product branches and specific products that the agent is\n * authorized to sell from this insurance company. Each branch defines a category\n * of insurance products (like auto, health, property) and the specific product\n * variants within that category that the agent can offer to customers.\n *\n * Acentenin bu sigorta şirketinden satma yetkisine sahip olduğu sigorta ürün\n * dalları ve belirli ürünlerin dizisi. Her dal bir sigorta ürün kategorisini\n * (otomobil, sağlık, emlak gibi) ve o kategori içinde acentenin müşterilere\n * sunabileceği belirli ürün varyantlarını tanımlar.\n */\n readonly branches: Branch[];\n}\n\n/**\n * Defines the primary user account that will be created for the agent's main administrative user.\n * This account serves as the primary access point for the agent to manage their operations,\n * view reports, process policies, and interact with InsurUp's platform features.\n *\n * Acentenin ana yönetici kullanıcısı için oluşturulacak birincil kullanıcı hesabını tanımlar.\n * Bu hesap, acentenin operasyonlarını yönetmesi, raporları görüntülemesi, poliçeleri işlemesi\n * ve InsurUp platform özelliklerini kullanması için birincil erişim noktası olarak hizmet verir.\n */\nexport interface AgentUser {\n /**\n * The first name of the person who will serve as the primary agent user.\n * This information is used for personalization, communication, and identification\n * purposes within the system and in correspondence with customers and partners.\n *\n * Birincil acente kullanıcısı olarak hizmet verecek kişinin adı.\n * Bu bilgi sistem içinde ve müşteriler ve partnerlerle yazışmalarda\n * kişiselleştirme, iletişim ve kimlik belirleme amaçları için kullanılır.\n */\n readonly firstName: string;\n\n /**\n * The last name (surname) of the person who will serve as the primary agent user.\n * Combined with the first name, this provides complete identification for the user\n * and is used in official communications and system records.\n *\n * Birincil acente kullanıcısı olarak hizmet verecek kişinin soyadı.\n * Ad ile birleştirildiğinde, kullanıcı için tam kimlik sağlar ve\n * resmi iletişimlerde ve sistem kayıtlarında kullanılır.\n */\n readonly lastName: string;\n\n /**\n * The email address that will be used for account authentication, system notifications,\n * and official communications. This serves as the primary identifier for login purposes\n * and must be unique within the system. All important system communications will be sent to this address.\n *\n * Hesap kimlik doğrulaması, sistem bildirimleri ve resmi iletişimler için kullanılacak\n * e-posta adresi. Bu, giriş amaçları için birincil tanımlayıcı olarak hizmet verir ve\n * sistem içinde benzersiz olmalıdır. Tüm önemli sistem iletişimleri bu adrese gönderilecektir.\n */\n readonly email: string;\n\n /**\n * The initial password for the agent user account. This password will be used for\n * the first login and should meet security requirements. The user should be encouraged\n * to change this password after their first successful login for enhanced security.\n *\n * Acente kullanıcı hesabı için başlangıç şifresi. Bu şifre ilk giriş için kullanılacak\n * ve güvenlik gereksinimlerini karşılamalıdır. Gelişmiş güvenlik için kullanıcının\n * ilk başarılı girişinden sonra bu şifreyi değiştirmesi teşvik edilmelidir.\n */\n readonly password: string;\n}\n\n// ============================================================================\n// B2C CONFIGURATION TYPES\n// ============================================================================\n\n/**\n * Enumeration of B2C configuration field types\n */\nexport enum B2CConfigFieldType {\n Object = 1,\n Array = 2,\n Text = 3,\n Number = 4,\n Boolean = 5,\n File = 6,\n Color = 7,\n ProductBranch = 8,\n Icon = 9,\n InsuranceCompany = 10,\n MultiLineText = 11,\n InsuranceProduct = 12,\n}\n\n/**\n * Base interface for B2C configuration fields\n */\nexport interface B2CConfigFieldBase {\n readonly name: string;\n readonly labelResourceKey?: string | null;\n readonly descriptionResourceKey?: string | null;\n}\n\n/**\n * B2C configuration field for text input\n */\nexport interface TextB2CConfigField extends B2CConfigFieldBase {\n readonly type: B2CConfigFieldType.Text;\n}\n\n/**\n * B2C configuration field for multi-line text input\n */\nexport interface MultiLineTextB2CConfigField extends B2CConfigFieldBase {\n readonly type: B2CConfigFieldType.MultiLineText;\n}\n\n/**\n * B2C configuration field for numeric input\n */\nexport interface NumberB2CConfigField extends B2CConfigFieldBase {\n readonly type: B2CConfigFieldType.Number;\n}\n\n/**\n * B2C configuration field for boolean input\n */\nexport interface BooleanB2CConfigField extends B2CConfigFieldBase {\n readonly type: B2CConfigFieldType.Boolean;\n}\n\n/**\n * B2C configuration field for file upload\n */\nexport interface FileB2CConfigField extends B2CConfigFieldBase {\n readonly type: B2CConfigFieldType.File;\n readonly allowedExtensions: readonly string[];\n}\n\n/**\n * B2C configuration field for color selection\n */\nexport interface ColorB2CConfigField extends B2CConfigFieldBase {\n readonly type: B2CConfigFieldType.Color;\n}\n\n/**\n * B2C configuration field for product branch selection\n */\nexport interface ProductBranchB2CConfigField extends B2CConfigFieldBase {\n readonly type: B2CConfigFieldType.ProductBranch;\n}\n\n/**\n * B2C configuration field for icon selection\n */\nexport interface IconB2CConfigField extends B2CConfigFieldBase {\n readonly type: B2CConfigFieldType.Icon;\n}\n\n/**\n * B2C configuration field for insurance company selection\n */\nexport interface InsuranceCompanyB2CConfigField extends B2CConfigFieldBase {\n readonly type: B2CConfigFieldType.InsuranceCompany;\n}\n\n/**\n * B2C configuration field for insurance product selection\n */\nexport interface InsuranceProductB2CConfigField extends B2CConfigFieldBase {\n readonly type: B2CConfigFieldType.InsuranceProduct;\n}\n\n/**\n * B2C configuration field for nested objects\n */\nexport interface ObjectB2CConfigField extends B2CConfigFieldBase {\n readonly type: B2CConfigFieldType.Object;\n readonly children: readonly B2CConfigField[];\n}\n\n/**\n * B2C configuration field for arrays of items\n */\nexport interface ArrayB2CConfigField extends B2CConfigFieldBase {\n readonly type: B2CConfigFieldType.Array;\n readonly itemType: B2CConfigField;\n}\n\n/**\n * Union type for all B2C configuration fields\n */\nexport type B2CConfigField =\n | TextB2CConfigField\n | MultiLineTextB2CConfigField\n | NumberB2CConfigField\n | BooleanB2CConfigField\n | FileB2CConfigField\n | ColorB2CConfigField\n | ProductBranchB2CConfigField\n | IconB2CConfigField\n | InsuranceCompanyB2CConfigField\n | InsuranceProductB2CConfigField\n | ObjectB2CConfigField\n | ArrayB2CConfigField;\n\n/**\n * Response containing B2C configuration fields\n */\nexport interface GetB2CConfigFieldsResult {\n readonly fields: readonly B2CConfigField[];\n}\n\n/**\n * Request to update B2C configuration fields\n */\nexport interface UpdateB2CConfigFieldsRequest {\n readonly fields: readonly B2CConfigField[];\n}\n\n// ============================================================================\n// MIGRATION TYPES\n// ============================================================================\n\n/**\n * Response containing migration result for all agent users\n */\nexport interface MigrateAllAgentUsersResult {\n readonly migratedCount: number;\n}\n","/**\n * Defines webhook events that can be triggered during the insurance proposal and policy lifecycle.\n * Each event represents a significant state change that external systems may need to be notified about.\n *\n * Sigorta teklifi ve poliçe yaşam döngüsü sırasında tetiklenebilecek webhook olaylarını tanımlar.\n * Her olay, harici sistemlerin bilgilendirilmesi gerekebilecek önemli bir durum değişikliğini temsil eder.\n */\nexport enum WebhookEvent {\n /**\n * Triggered when a proposal premium calculation is received and processed successfully.\n *\n * Teklif prim hesaplaması alındığında ve başarıyla işlendiğinde tetiklenir.\n */\n ProposalPremiumReceived = \"proposal_premium.received\",\n\n /**\n * Triggered when a proposal premium purchase process is initiated.\n *\n * Teklif prim satın alma süreci başlatıldığında tetiklenir.\n */\n ProposalPremiumPurchasing = \"proposal_premium.purchasing\",\n\n /**\n * Triggered when a proposal premium purchase process is completed successfully.\n *\n * Teklif prim satın alma süreci başarıyla tamamlandığında tetiklenir.\n */\n ProposalPremiumPurchased = \"proposal_premium.purchased\",\n\n /**\n * Triggered when a proposal premium purchase process fails.\n *\n * Teklif prim satın alma süreci başarısız olduğunda tetiklenir.\n */\n ProposalPremiumPurchaseFailed = \"proposal_premium.purchase_failed\",\n\n /**\n * Triggered when an insurance policy is created in the system.\n *\n * Sistemde bir sigorta poliçesi oluşturulduğunda tetiklenir.\n */\n PolicyCreated = \"policy.created\",\n\n /**\n * Triggered when an existing insurance policy is updated or modified.\n *\n * Mevcut bir sigorta poliçesi güncellendiğinde veya değiştirildiğinde tetiklenir.\n */\n PolicyUpdated = \"policy.updated\",\n}\n\n// Webhook Contracts\n\n/**\n * Request contract for creating a new webhook endpoint to receive real-time event notifications.\n * Configures event subscriptions and security settings for automated system integrations.\n *\n * Gerçek zamanlı olay bildirimlerini almak için yeni webhook endpoint'i oluşturmak üzere istek sözleşmesi.\n * Otomatik sistem entegrasyonları için olay abonelikleri ve güvenlik ayarlarını yapılandırır.\n */\nexport interface CreateWebhookRequest {\n /**\n * The complete URL where InsurUp will send HTTP POST requests containing event notifications.\n * This endpoint must be publicly accessible, support HTTPS for security, and be capable of\n * handling JSON payloads. The receiving system should respond with appropriate HTTP status codes\n * to indicate successful receipt and processing of webhook notifications.\n *\n * InsurUp'un olay bildirimlerini içeren HTTP POST isteklerini göndereceği tam URL.\n * Bu endpoint herkese açık erişilebilir olmalı, güvenlik için HTTPS'i desteklemeli ve\n * JSON payload'larını işleyebilmelidir. Alıcı sistem, webhook bildirimlerinin başarılı\n * alınması ve işlenmesini belirtmek için uygun HTTP durum kodları ile yanıt vermelidir.\n */\n readonly url: string;\n\n /**\n * Array of specific event types that this webhook endpoint will be notified about.\n * Events can include policy changes, claim updates, payment confirmations, customer registrations,\n * and other significant activities within the InsurUp platform. Only events specified in this array\n * will trigger notifications to the configured URL, allowing for precise control over data flow.\n *\n * Bu webhook endpoint'inin bilgilendirilecegi belirli olay türlerinin dizisi.\n * Olaylar poliçe değişiklikleri, hasar güncellemeleri, ödeme onayları, müşteri kayıtları ve\n * InsurUp platformu içindeki diğer önemli etkinlikleri içerebilir. Yalnızca bu dizide belirtilen\n * olaylar yapılandırılmış URL'ye bildirim tetikleyecek, bu da veri akışı üzerinde hassas kontrol sağlar.\n */\n readonly events: WebhookEvent[];\n\n /**\n * Optional secret key used to generate HMAC signatures for webhook payloads, enabling\n * the receiving system to verify that notifications are genuinely from InsurUp and haven't been\n * tampered with during transmission. When provided, InsurUp will include a signature header\n * with each webhook delivery that can be validated using this secret.\n *\n * Webhook payload'ları için HMAC imzaları oluşturmak üzere kullanılan isteğe bağlı gizli anahtar,\n * alıcı sistemin bildirimlerin gerçekten InsurUp'tan geldiğini ve iletim sırasında değiştirilmediğini\n * doğrulamasını sağlar. Sağlandığında, InsurUp her webhook teslimi ile bu gizli anahtar kullanılarak\n * doğrulanabilecek bir imza başlığı ekleyecektir.\n */\n readonly secret: string | null;\n}\n\n/**\n * Response contract containing the result of a successful webhook endpoint creation.\n * Returns the unique identifier of the newly created webhook for management and reference purposes.\n *\n * Başarılı webhook endpoint oluşturmanın sonucunu içeren yanıt sözleşmesi.\n * Yönetim ve referans amaçları için yeni oluşturulan webhook'un benzersiz tanımlayıcısını döndürür.\n */\nexport interface CreateWebhookResult {\n /**\n * The unique identifier assigned to the newly created webhook endpoint.\n * This ID serves as the primary reference for all future operations involving this webhook,\n * including configuration updates, event delivery monitoring, redelivery requests, and deletion.\n * Store this identifier securely for webhook management and integration monitoring purposes.\n *\n * Yeni oluşturulan webhook endpoint'ine atanan benzersiz tanımlayıcı.\n * Bu ID, yapılandırma güncellemeleri, olay teslimat izleme, yeniden teslimat talepleri ve silme\n * dahil olmak üzere bu webhook'u içeren gelecekteki tüm işlemler için birincil referans görevi görür.\n * Webhook yönetimi ve entegrasyon izleme amaçları için bu tanımlayıcıyı güvenli bir şekilde saklayın.\n */\n readonly id: string;\n}\n\n/**\n * Response contract containing comprehensive information about a specific webhook endpoint.\n * Provides complete webhook configuration details for management and monitoring purposes.\n *\n * Belirli bir webhook endpoint'i hakkında kapsamlı bilgi içeren yanıt sözleşmesi.\n * Yönetim ve izleme amaçları için tam webhook yapılandırma detaylarını sağlar.\n */\nexport interface GetWebhookByIdResult {\n /**\n * The unique identifier of the webhook endpoint in the InsurUp platform.\n * This ID is used for all webhook management operations including updates, deletion,\n * and delivery monitoring. It serves as the primary reference for this specific webhook configuration.\n *\n * InsurUp platformundaki webhook endpoint'inin benzersiz tanımlayıcısı.\n * Bu ID, güncellemeler, silme ve teslimat izleme dahil tüm webhook yönetim işlemleri için kullanılır.\n * Bu belirli webhook yapılandırması için birincil referans görevi görür.\n */\n readonly id: string;\n\n /**\n * The configured URL where InsurUp sends HTTP POST requests containing event notifications.\n * This is the endpoint that receives webhook deliveries and must be accessible to InsurUp's\n * notification system. The URL configuration is essential for successful webhook operation.\n *\n * InsurUp'un olay bildirimlerini içeren HTTP POST isteklerini gönderdiği yapılandırılmış URL.\n * Bu, webhook teslimatlarını alan ve InsurUp'un bildirim sistemine erişilebilir olması gereken endpoint'tir.\n * URL yapılandırması başarılı webhook işlemi için olmazsa olmazdır.\n */\n readonly url: string;\n\n /**\n * Array of specific event types that this webhook endpoint is configured to receive notifications about.\n * These events represent the various activities within the InsurUp platform that will trigger\n * webhook deliveries to the configured URL. Only events in this list will generate notifications\n * for this particular webhook endpoint.\n *\n * Bu webhook endpoint'inin bildirim almak üzere yapılandırıldığı belirli olay türlerinin dizisi.\n * Bu olaylar, yapılandırılmış URL'ye webhook teslimatlarını tetikleyecek InsurUp platformu içindeki\n * çeşitli etkinlikleri temsil eder. Yalnızca bu listedeki olaylar bu belirli webhook endpoint'i için\n * bildirimler oluşturacaktır.\n */\n readonly events: WebhookEvent[];\n\n /**\n * Optional secret key configured for this webhook to enable payload verification through HMAC signatures.\n * When a secret is configured, InsurUp includes signature headers with webhook deliveries that can be\n * validated by the receiving system to ensure authenticity and integrity of the webhook notifications.\n * This field may be null if no secret verification is configured.\n *\n * HMAC imzaları aracılığıyla payload doğrulamasını etkinleştirmek için bu webhook için yapılandırılan\n * isteğe bağlı gizli anahtar. Bir gizli anahtar yapılandırıldığında, InsurUp webhook teslimatları ile\n * alıcı sistem tarafından webhook bildirimlerinin gerçekliğini ve bütünlüğünü sağlamak için doğrulanabilecek\n * imza başlıkları ekler. Gizli doğrulama yapılandırılmamışsa bu alan null olabilir.\n */\n readonly secret: string | null;\n}\n\n/**\n * Response contract containing summary information about webhook endpoints for listing and overview purposes.\n * Provides essential webhook details for management dashboards and monitoring interfaces.\n *\n * Listeleme ve genel bakış amaçları için webhook endpoint'leri hakkında özet bilgi içeren yanıt sözleşmesi.\n * Yönetim panoları ve izleme arayüzleri için temel webhook detaylarını sağlar.\n */\nexport interface GetWebhooksResult {\n /**\n * The unique identifier of the webhook endpoint in the InsurUp platform.\n * This ID is the primary reference for this webhook and can be used for detailed retrieval,\n * updates, deletion, and delivery monitoring operations through other API endpoints.\n *\n * InsurUp platformundaki webhook endpoint'inin benzersiz tanımlayıcısı.\n * Bu ID, bu webhook için birincil referanstır ve diğer API endpoint'leri aracılığıyla\n * detaylı alma, güncelleme, silme ve teslimat izleme işlemleri için kullanılabilir.\n */\n readonly id: string;\n\n /**\n * The configured URL where InsurUp delivers webhook notifications for this endpoint.\n * This is the destination where HTTP POST requests containing event data are sent.\n * Having this information in the summary view helps administrators quickly identify\n * and verify webhook endpoint destinations.\n *\n * InsurUp'un bu endpoint için webhook bildirimlerini teslim ettiği yapılandırılmış URL.\n * Bu, olay verilerini içeren HTTP POST isteklerinin gönderildiği hedeftir.\n * Bu bilginin özet görünümde bulunması, yöneticilerin webhook endpoint hedeflerini\n * hızlı bir şekilde tanımlamasına ve doğrulamasına yardımcı olur.\n */\n readonly url: string;\n\n /**\n * Array of specific event types that this webhook endpoint will receive notifications about.\n * This summary information helps administrators understand the scope of each webhook's\n * responsibilities and ensures proper event distribution across different integration endpoints.\n * Essential for managing event routing and avoiding notification gaps.\n *\n * Bu webhook endpoint'inin bildirim alacağı belirli olay türlerinin dizisi.\n * Bu özet bilgi, yöneticilerin her webhook'un sorumluluklarının kapsamını anlamasına\n * ve farklı entegrasyon endpoint'leri arasında uygun olay dağıtımını sağlamasına yardımcı olur.\n * Olay yönlendirmesini yönetmek ve bildirim boşluklarını önlemek için olmazsa olmazdır.\n */\n readonly events: WebhookEvent[];\n\n /**\n * Indicates the presence of a secret key configuration for webhook payload verification.\n * While the actual secret value is not exposed in list views for security reasons,\n * this field shows whether HMAC signature verification is enabled for this webhook endpoint.\n * This information helps administrators verify security configurations at a glance.\n *\n * Webhook payload doğrulaması için gizli anahtar yapılandırmasının varlığını gösterir.\n * Gerçek gizli değer güvenlik nedenleriyle liste görünümlerinde gösterilmezken,\n * bu alan bu webhook endpoint'i için HMAC imza doğrulamasının etkin olup olmadığını gösterir.\n * Bu bilgi, yöneticilerin güvenlik yapılandırmalarını bir bakışta doğrulamasına yardımcı olur.\n */\n readonly secret: string | null;\n\n /**\n * The total number of webhook delivery attempts that have been made for this endpoint\n * since its creation. This metric provides a quick overview of webhook activity levels\n * and helps administrators identify highly active endpoints, unused webhooks,\n * or endpoints that may need attention due to high failure rates.\n *\n * Bu endpoint için oluşturulduğundan beri yapılan toplam webhook teslimat deneme sayısı.\n * Bu metrik, webhook etkinlik seviyelerinin hızlı bir genel görünümünü sağlar ve\n * yöneticilerin çok aktif endpoint'leri, kullanılmayan webhook'ları veya yüksek başarısızlık\n * oranları nedeniyle dikkat gerektirebilecek endpoint'leri belirlemesine yardımcı olur.\n */\n readonly deliveryCount: number;\n}\n\n/**\n * Request contract for updating an existing webhook endpoint configuration.\n * Allows modification of URL, event subscriptions, and security settings for webhook integrations.\n *\n * Mevcut webhook endpoint yapılandırmasını güncellemek için istek sözleşmesi.\n * Webhook entegrasyonları için URL, olay abonelikleri ve güvenlik ayarlarının değiştirilmesine olanak tanır.\n */\nexport interface UpdateWebhookRequest {\n /**\n * The unique identifier of the webhook endpoint that will be updated with the new configuration.\n * This identifier is used to locate the specific webhook in the system and ensure that\n * the correct webhook configuration is modified with the provided updates.\n *\n * Yeni yapılandırma ile güncellenecek webhook endpoint'inin benzersiz tanımlayıcısı.\n * Bu tanımlayıcı, sistemde belirli webhook'u bulmak ve doğru webhook yapılandırmasının\n * sağlanan güncellemelerle değiştirilmesini sağlamak için kullanılır.\n */\n readonly id: string;\n\n /**\n * The new URL where InsurUp will send HTTP POST requests containing event notifications.\n * This updated endpoint must be publicly accessible, support HTTPS for security, and be capable\n * of handling JSON payloads. All future webhook deliveries will be sent to this new URL\n * instead of the previous configuration.\n *\n * InsurUp'un olay bildirimlerini içeren HTTP POST isteklerini göndereceği yeni URL.\n * Bu güncellenmiş endpoint herkese açık erişilebilir olmalı, güvenlik için HTTPS'i desteklemeli\n * ve JSON payload'larını işleyebilmelidir. Gelecekteki tüm webhook teslimatları önceki yapılandırma\n * yerine bu yeni URL'ye gönderilecektir.\n */\n readonly url: string;\n\n /**\n * Updated array of specific event types that this webhook endpoint will be notified about.\n * This replaces the previous event subscriptions entirely, so all desired events must be included.\n * Events can include policy changes, claim updates, payment confirmations, customer registrations,\n * and other significant activities within the InsurUp platform.\n *\n * Bu webhook endpoint'inin bilgilendirilecegi güncellenmiş belirli olay türlerinin dizisi.\n * Bu, önceki olay aboneliklerini tamamen değiştirir, bu nedenle istenen tüm olaylar dahil edilmelidir.\n * Olaylar poliçe değişiklikleri, hasar güncellemeleri, ödeme onayları, müşteri kayıtları ve\n * InsurUp platformu içindeki diğer önemli etkinlikleri içerebilir.\n */\n readonly events: WebhookEvent[];\n\n /**\n * Updated optional secret key used to generate HMAC signatures for webhook payloads.\n * This replaces any existing secret configuration. When provided, InsurUp will use this new secret\n * for all future webhook deliveries to generate signature headers for payload verification.\n * Set to null to remove secret-based verification entirely.\n *\n * Webhook payload'ları için HMAC imzaları oluşturmak üzere kullanılan güncellenmiş isteğe bağlı gizli anahtar.\n * Bu, mevcut herhangi bir gizli yapılandırmayı değiştirir. Sağlandığında, InsurUp payload doğrulaması için\n * imza başlıkları oluşturmak üzere gelecekteki tüm webhook teslimatları için bu yeni gizli anahtarı kullanacaktır.\n * Gizli anahtar tabanlı doğrulamayı tamamen kaldırmak için null olarak ayarlayın.\n */\n readonly secret: string | null;\n}\n\n/**\n * Response contract containing detailed information about a specific webhook delivery attempt.\n * Provides comprehensive delivery metrics, payload data, and response details for troubleshooting and monitoring.\n *\n * Belirli bir webhook teslimat denemesi hakkında detaylı bilgi içeren yanıt sözleşmesi.\n * Sorun giderme ve izleme için kapsamlı teslimat metrikleri, payload verisi ve yanıt detayları sağlar.\n */\nexport interface GetWebhookDeliveryResult {\n /**\n * The unique identifier of this specific delivery attempt.\n * This ID can be used to track and reference this particular webhook delivery\n * for monitoring, troubleshooting, and audit purposes.\n *\n * Bu belirli teslimat denemesinin benzersiz tanımlayıcısı.\n * Bu ID, izleme, sorun giderme ve denetim amaçları için bu belirli webhook\n * teslimatını takip etmek ve referans almak için kullanılabilir.\n */\n readonly id: string;\n\n /**\n * The URL where InsurUp attempted to deliver the webhook notification.\n * This shows the exact endpoint that was contacted for this delivery attempt,\n * which is essential for diagnosing connectivity or configuration issues.\n *\n * InsurUp'un webhook bildirimini teslim etmeye çalıştığı URL.\n * Bu, bu teslimat denemesi için iletişim kurulan tam endpoint'i gösterir,\n * bu da bağlantı veya yapılandırma sorunlarını teşhis etmek için olmazsa olmazdır.\n */\n readonly webhookUrl: string;\n\n /**\n * The specific type of event that occurred in the InsurUp platform and triggered this webhook delivery.\n * This information helps identify what business activity caused the webhook notification\n * and is useful for understanding event patterns and delivery correlations.\n *\n * InsurUp platformunda gerçekleşen ve bu webhook teslimatını tetikleyen belirli olay türü.\n * Bu bilgi, hangi iş etkinliğinin webhook bildirimini tetiklediğini belirlemeye yardımcı olur\n * ve olay desenlerini ve teslimat korelasyonlarını anlamak için faydalıdır.\n */\n readonly event: WebhookEvent;\n\n /**\n * The timestamp when the delivery attempt was made.\n *\n * Teslimat denemesinin yapıldığı zaman damgası.\n */\n readonly deliveredAt: string;\n\n /**\n * The HTTP status code returned by the receiving endpoint.\n *\n * Alıcı endpoint tarafından döndürülen HTTP durum kodu.\n */\n readonly responseStatusCode: number | null;\n\n /**\n * The response body returned by the receiving endpoint.\n *\n * Alıcı endpoint tarafından döndürülen yanıt gövdesi.\n */\n readonly responseBody: string | null;\n\n /**\n * The total time elapsed from when InsurUp initiated the webhook delivery request\n * to when the response was received (or the request timed out), measured in milliseconds.\n * This metric is important for monitoring webhook performance and identifying slow-responding endpoints.\n *\n * InsurUp'un webhook teslimat isteğini başlattığı andan yanıtın alındığı ana kadar\n * (veya isteğin zaman aşımına uğradığı ana kadar) geçen toplam süre, milisaniye cinsinden ölçülür.\n * Bu metrik, webhook performansını izlemek ve yavaş yanıt veren endpoint'leri belirlemek için önemlidir.\n */\n readonly durationMs: number;\n\n /**\n * Boolean indicator showing whether the webhook delivery was considered successful.\n * Success is typically determined by receiving a 2xx HTTP status code from the receiving endpoint\n * within the allowed timeout period. This flag provides a quick way to assess delivery status\n * without examining detailed response codes.\n *\n * Webhook teslimatının başarılı kabul edilip edilmediğini gösteren boolean göstergesi.\n * Başarı genellikle izin verilen zaman aşımı süresinde alıcı endpoint'ten 2xx HTTP durum kodu\n * alınmasıyla belirlenir. Bu bayrak, detaylı yanıt kodlarını incelemeden teslimat durumunu\n * değerlendirmek için hızlı bir yol sağlar.\n */\n readonly isSuccess: boolean;\n}\n","/**\n * @fileoverview Proposal Contract Types - Request and response types for proposal management\n * @description All contract types for proposal operations including creation, revision, purchase, and document management\n */\n\nimport type {\n ProductBranch,\n Channel,\n UserReference,\n Currency,\n PaymentOption,\n Coverage,\n CreditCard,\n InsuranceProductType,\n InsuranceParameter,\n CustomerType,\n CustomerEmail,\n IndividualCustomerIdentityNumber,\n BirthDate,\n TaxNumber,\n ForeignCustomerIdentityNumber,\n PersonHeight,\n PersonWeight,\n ProposalSnapshotVehicle,\n ProposalSnapshotProperty,\n} from \"./common.js\";\nimport type { CustomerPhoneNumber } from \"./common.js\";\nimport type { Gender, Job, Surgery, Disease } from \"./customers.js\";\nimport type { DaskOldPolicy } from \"./common.js\";\n\n// ============================================================================\n// PROPOSAL ENUMS\n// ============================================================================\n\n/**\n * Proposal State\n *\n * Represents the current state of an insurance proposal in its lifecycle.\n * Used to track proposal status from creation to completion or expiration.\n *\n * Bir sigorta teklifinin yaşam döngüsündeki mevcut durumunu temsil eder.\n * Teklif durumunu oluşturulmasından tamamlanmasına kadar takip etmek için kullanılır.\n */\nexport enum ProposalState {\n /**\n * The proposal is waiting for processing\n * Teklif işleme için bekliyor\n */\n Waiting = \"WAITING\",\n\n /**\n * The proposal is active and available for purchase\n * Teklif aktif ve satın alınabilir\n */\n Active = \"ACTIVE\",\n\n /**\n * The proposal purchase process is in progress\n * Teklif satın alma süreci devam ediyor\n */\n Purchasing = \"PURCHASING\",\n\n /**\n * The proposal has been purchased and converted to a policy\n * Teklif satın alınmış ve poliçeye dönüştürülmüş\n */\n Purchased = \"PURCHASED\",\n\n /**\n * The proposal processing has failed\n * Teklif işleme başarısız oldu\n */\n Failed = \"FAILED\",\n}\n\n/**\n * Proposal Product State\n *\n * Represents the processing state of an individual insurance product within a proposal.\n * Tracks the status of product quote generation and processing.\n *\n * Bir teklif içindeki bireysel sigorta ürününün işleme durumunu temsil eder.\n * Ürün teklif oluşturma ve işleme durumunu takip eder.\n */\nexport enum ProposalProductState {\n /**\n * The product is waiting for processing or pricing\n * Ürün işleme veya fiyatlandırma için bekliyor\n */\n Waiting = \"WAITING\",\n\n /**\n * The product processing has failed\n * Ürün işleme başarısız oldu\n */\n Failed = \"FAILED\",\n\n /**\n * The product has been successfully processed and priced\n * Ürün başarıyla işlendi ve fiyatlandırıldı\n */\n Active = \"ACTIVE\",\n\n /**\n * The product purchase is currently in progress\n * Ürün satın alma işlemi şu anda devam ediyor\n */\n Purchasing = \"PURCHASING\",\n\n /**\n * The product has been successfully purchased\n * Ürün başarıyla satın alındı\n */\n Purchased = \"PURCHASED\",\n}\n\n// ============================================================================\n// PROPOSAL SNAPSHOT TYPES\n// ============================================================================\n\n// ============================================================================\n// CUSTOMER TYPES FOR PROPOSAL SNAPSHOTS\n// ============================================================================\n\n/**\n * Union type for all customer snapshot types in proposals\n * Tekliflerdeki tüm müşteri anlık görüntü türleri için birleşim türü\n */\nexport type ProposalSnapshotCustomer =\n | ({\n readonly type: CustomerType.Individual;\n readonly identityNumber: IndividualCustomerIdentityNumber;\n readonly birthDate: BirthDate;\n readonly job?: Job;\n readonly gender?: Gender;\n readonly fullName: string;\n } & ProposalSnapshotCustomerBase)\n | ({\n readonly type: CustomerType.Company;\n readonly title: string;\n readonly taxNumber: TaxNumber;\n } & ProposalSnapshotCustomerBase)\n | ({\n readonly type: CustomerType.Foreign;\n readonly identityNumber: ForeignCustomerIdentityNumber;\n readonly birthDate: BirthDate;\n readonly job?: Job;\n readonly gender?: Gender;\n readonly fullName: string;\n } & ProposalSnapshotCustomerBase);\n\ntype ProposalSnapshotCustomerBase = {\n readonly id: string;\n readonly name: string;\n readonly city?: InsuranceParameter;\n readonly district?: InsuranceParameter;\n readonly email?: CustomerEmail;\n readonly phoneNumber?: CustomerPhoneNumber;\n};\n\n// ============================================================================\n// PROPOSAL SNAPSHOT TYPES\n// ============================================================================\n\n/**\n * Union type for all proposal snapshot types\n * Tüm teklif anlık görüntü türleri için birleşim türü\n */\nexport type ProposalSnapshot =\n | ({\n readonly productBranch: ProductBranch.Tss;\n readonly height?: PersonHeight;\n readonly weight?: PersonWeight;\n readonly surgeries: Surgery[];\n readonly diseases: Disease[];\n } & ProposalSnapshotBase)\n | ({\n readonly productBranch: ProductBranch.Kasko;\n readonly vehicle: ProposalSnapshotVehicle;\n } & ProposalSnapshotBase)\n | ({\n readonly productBranch: ProductBranch.Trafik;\n readonly vehicle: ProposalSnapshotVehicle;\n } & ProposalSnapshotBase)\n | ({\n readonly productBranch: ProductBranch.Imm;\n readonly vehicle: ProposalSnapshotVehicle;\n } & ProposalSnapshotBase)\n | ({\n readonly productBranch: ProductBranch.Konut;\n readonly property: ProposalSnapshotProperty;\n } & ProposalSnapshotBase)\n | ({\n readonly productBranch: ProductBranch.Dask;\n readonly property: ProposalSnapshotProperty;\n readonly oldPolicy?: DaskOldPolicy;\n } & ProposalSnapshotBase);\n\ntype ProposalSnapshotBase = {\n readonly insurerCustomer: ProposalSnapshotCustomer;\n readonly insuredCustomer: ProposalSnapshotCustomer;\n readonly isInsuredCustomerSameAsInsurerCustomer: boolean;\n};\n\n// ============================================================================\n// REQUEST TYPES\n// ============================================================================\n\n/**\n * Union type for all proposal creation requests\n * Tüm teklif oluşturma talepleri için birleşim türü\n */\nexport type CreateProposalRequest =\n | ({\n readonly $type: \"kasko\";\n readonly productBranch: ProductBranch.Kasko;\n readonly vehicleId: string;\n readonly coverage?: Extract<\n Coverage,\n { productBranch: ProductBranch.Kasko }\n > | null;\n } & CreateProposalRequestBase)\n | ({\n readonly $type: \"dask\";\n readonly productBranch: ProductBranch.Dask;\n readonly propertyId: string;\n } & CreateProposalRequestBase)\n | ({\n readonly $type: \"konut\";\n readonly productBranch: ProductBranch.Konut;\n readonly propertyId: string;\n readonly coverage?: Extract<\n Coverage,\n { productBranch: ProductBranch.Konut }\n > | null;\n } & CreateProposalRequestBase)\n | ({\n readonly $type: \"trafik\";\n readonly productBranch: ProductBranch.Trafik;\n readonly vehicleId: string;\n } & CreateProposalRequestBase)\n | ({\n readonly $type: \"tss\";\n readonly productBranch: ProductBranch.Tss;\n readonly coverage?: Extract<\n Coverage,\n { productBranch: ProductBranch.Tss }\n > | null;\n } & CreateProposalRequestBase)\n | ({\n readonly $type: \"imm\";\n readonly productBranch: ProductBranch.Imm;\n readonly vehicleId: string;\n readonly coverage?: Extract<\n Coverage,\n { productBranch: ProductBranch.Imm }\n > | null;\n } & CreateProposalRequestBase);\n\ntype CreateProposalRequestBase = {\n readonly insurerCustomerId: string;\n readonly insuredCustomerId: string;\n readonly coverageGroupIds?: string[] | null;\n readonly channel: Channel;\n};\n\n/**\n * Get Proposal Product Premium Detail Request\n *\n * Request to retrieve detailed premium information for a specific insurance product and installment option.\n *\n * Belirli bir sigorta ürünü ve taksit seçeneği için detaylı prim bilgilerini alma talebi.\n */\nexport interface GetProposalProductPremiumDetailRequest {\n /**\n * The unique identifier of the proposal\n * Teklifin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * The unique identifier of the product within the proposal\n * Teklif içindeki ürünün benzersiz tanımlayıcısı\n */\n readonly proposalProductId: string;\n\n /**\n * The number of installments for the premium calculation\n * Prim hesaplaması için taksit sayısı\n */\n readonly installmentNumber: number;\n}\n\n/**\n * Purchase Proposal Product Sync Request\n *\n * Polymorphic request for synchronous proposal product purchase with different payment methods.\n *\n * Farklı ödeme yöntemleri ile senkron teklif ürün satın alma için polimorfik istek.\n */\nexport interface PurchaseProposalProductSyncRequest {\n /**\n * Unique identifier of the proposal containing the product to be purchased\n * Satın alınacak ürünü içeren teklifin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * Unique identifier of the specific product within the proposal to be purchased\n * Satın alınacak teklif içindeki belirli ürünün benzersiz tanımlayıcısı\n */\n readonly proposalProductId: string;\n\n /**\n * Number of installments for the premium payment plan\n * Prim ödeme planı için taksit sayısı\n */\n readonly installmentNumber: number;\n}\n\n/**\n * Credit Card Purchase Request\n * Kredi kartı satın alma talebi\n */\nexport interface PurchaseProposalProductSyncCreditCardRequest extends PurchaseProposalProductSyncRequest {\n /**\n * Credit card information for payment processing\n * Ödeme işlemi için kredi kartı bilgileri\n */\n readonly card: CreditCard;\n}\n\n/**\n * Open Account Purchase Request\n * Açık hesap satın alma talebi\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface PurchaseProposalProductSyncOpenAccountRequest extends PurchaseProposalProductSyncRequest {\n // No additional properties for open account payment\n // Açık hesap ödemesi için ek özellik yok\n}\n\n/**\n * Purchase Proposal Product Async Request\n *\n * Request to purchase an insurance product from a proposal using asynchronous processing.\n *\n * Asenkron işleme kullanarak bir tekliften sigorta ürünü satın alma talebi.\n */\nexport interface PurchaseProposalProductAsyncRequest {\n /**\n * Unique identifier of the insurance proposal containing the product to purchase\n * Satın alınacak ürünü içeren sigorta teklifinin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * Unique identifier of the specific product within the proposal to purchase\n * Satın alınacak teklif içindeki belirli ürünün benzersiz tanımlayıcısı\n */\n readonly proposalProductId: string;\n\n /**\n * Number of installments for the premium payment schedule\n * Prim ödeme programı için taksit sayısı\n */\n readonly installmentNumber: number;\n\n /**\n * URL where the customer should be redirected after completing the payment process\n * Ödeme sürecini tamamladıktan sonra müşterinin yönlendirilmesi gereken URL\n */\n readonly callbackUrl: string;\n}\n\n/**\n * 3D Secure Async Purchase Request\n * 3D Secure asenkron satın alma talebi\n */\nexport interface PurchaseProposalProductAsync3DSecureRequest extends PurchaseProposalProductAsyncRequest {\n /**\n * Credit card information for processing the payment\n * Ödemeyi işlemek için kredi kartı bilgileri\n */\n readonly card: CreditCard;\n}\n\n/**\n * Insurance Company Redirect Async Purchase Request\n * Sigorta şirketi yönlendirme asenkron satın alma talebi\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface PurchaseProposalProductAsyncInsuranceCompanyRedirectRequest extends PurchaseProposalProductAsyncRequest {\n // No additional properties for insurance company redirect\n // Sigorta şirketi yönlendirmesi için ek özellik yok\n}\n\n/**\n * Get Proposal Product Coverage Request\n *\n * Request to retrieve coverage details for a specific insurance product within a proposal.\n *\n * Bir teklif içindeki belirli bir sigorta ürünü için teminat detaylarını alma talebi.\n */\nexport interface GetProposalProductCoverageRequest {\n /**\n * The unique identifier of the proposal\n * Teklifin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * The unique identifier of the product within the proposal\n * Teklif içindeki ürünün benzersiz tanımlayıcısı\n */\n readonly proposalProductId: string;\n}\n\n/**\n * Revise Proposal Request\n *\n * Request to revise an existing insurance proposal with updated coverage options.\n *\n * Mevcut bir sigorta teklifini güncellenmiş teminat seçenekleri ile revize etme talebi.\n */\nexport interface ReviseProposalRequest {\n /**\n * The unique identifier of the proposal to revise\n * Revize edilecek teklifin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * The updated coverage configuration, or null to keep existing coverage\n * Güncellenmiş teminat konfigürasyonu veya mevcut teminatı korumak için null\n */\n readonly coverage?: Coverage | null;\n}\n\n/**\n * Revise Proposal Product Request\n *\n * Request to revise a specific insurance product within a proposal with updated parameters.\n *\n * Bir teklif içindeki belirli bir sigorta ürününü güncellenmiş parametrelerle revize etme talebi.\n */\nexport interface ReviseProposalProductRequest {\n /**\n * The unique identifier of the proposal\n * Teklifin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * The unique identifier of the product to revise\n * Revize edilecek ürünün benzersiz tanımlayıcısı\n */\n readonly proposalProductId: string;\n\n /**\n * The optional guarantee group identifier to apply\n * Uygulanacak isteğe bağlı garanti grubu tanımlayıcısı\n */\n readonly guaranteeGroupId?: string | null;\n\n /**\n * The updated coverage configuration, or null to keep existing coverage\n * Güncellenmiş teminat konfigürasyonu veya mevcut teminatı korumak için null\n */\n readonly coverage?: Coverage | null;\n}\n\n/**\n * Fetch Proposal Product Document Request\n *\n * Request to fetch a specific proposal product document.\n *\n * Belirli bir teklif ürün belgesini alma talebi.\n */\nexport interface FetchProposalProductDocumentRequest {\n /**\n * The unique identifier of the proposal\n * Teklifin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * The unique identifier of the product within the proposal\n * Teklif içindeki ürünün benzersiz tanımlayıcısı\n */\n readonly proposalProductId: string;\n}\n\n/**\n * Fetch Proposal Information Form Document Request\n *\n * Request to fetch the information form document for a proposal.\n *\n * Bir teklif için bilgi formu belgesini alma talebi.\n */\nexport interface FetchProposalInformationFormDocumentRequest {\n /**\n * The unique identifier of the proposal\n * Teklifin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * The unique identifier of the product within the proposal\n * Teklif içindeki ürünün benzersiz tanımlayıcısı\n */\n readonly proposalProductId: string;\n}\n\n/**\n * Send Proposal Product Document Request\n *\n * Request to send a specific proposal product document to a customer via communication channels.\n *\n * Müşteriye iletişim kanalları aracılığıyla belirli bir teklif ürün belgesi gönderme talebi.\n */\nexport interface SendProposalProductDocumentRequest {\n /**\n * Unique identifier of the insurance proposal\n * Sigorta teklifinin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * Unique identifier of the specific product within the proposal\n * Teklif içindeki belirli ürünün benzersiz tanımlayıcısı\n */\n readonly proposalProductId: string;\n\n /**\n * Customer identifier for document delivery\n * Belge teslimatı için müşteri tanımlayıcısı\n */\n readonly customerId: string;\n\n /**\n * Communication method and details for document delivery\n * Belge teslimatı için iletişim yöntemi ve detayları\n */\n readonly communication: Communication;\n}\n\n/**\n * Communication Method Base\n *\n * Abstract base class defining the contract for different communication methods.\n *\n * Farklı iletişim yöntemleri için sözleşmeyi tanımlayan soyut temel sınıf.\n */\n/**\n * Union type for all communication methods\n * Tüm iletişim yöntemleri için birleşim türü\n */\nexport type Communication =\n | {\n readonly type: \"email\";\n readonly email: string;\n }\n | {\n readonly type: \"sms\";\n readonly phoneNumber: CustomerPhoneNumber;\n };\n\n/**\n * Send Proposal Information Form Document Request\n *\n * Request to send the information form document to a customer.\n *\n * Müşteriye bilgi formu belgesini gönderme talebi.\n */\nexport interface SendProposalInformationFormDocumentRequest {\n /**\n * Unique identifier of the insurance proposal\n * Sigorta teklifinin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * Unique identifier of the specific product within the proposal\n * Teklif içindeki belirli ürünün benzersiz tanımlayıcısı\n */\n readonly proposalProductId: string;\n\n /**\n * Customer identifier for document delivery\n * Belge teslimatı için müşteri tanımlayıcısı\n */\n readonly customerId: string;\n\n /**\n * Communication method and details for document delivery\n * Belge teslimatı için iletişim yöntemi ve detayları\n */\n readonly communication: Communication;\n}\n\n/**\n * Generate Compare Proposal Products PDF Request\n *\n * Request to generate a comparison PDF document for multiple proposal products.\n *\n * Birden fazla teklif ürünü için karşılaştırma PDF belgesi oluşturma talebi.\n */\nexport interface GenerateCompareProposalProductsPdfRequest {\n /**\n * Unique identifier of the insurance proposal\n * Sigorta teklifinin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * Array of product identifiers to include in the comparison\n * Karşılaştırmaya dahil edilecek ürün tanımlayıcıları dizisi\n */\n readonly proposalProductIds: readonly string[];\n\n /**\n * Array of coverage field names to exclude from the comparison document\n * Karşılaştırma belgesinden hariç tutulacak teminat alan adları dizisi\n */\n readonly excludedCoverageFields: readonly string[];\n}\n\n/**\n * Send Compare Proposal Products PDF Request\n *\n * Request to send a comparison PDF document of multiple proposal products to a customer.\n *\n * Müşteriye birden fazla teklif ürününün karşılaştırma PDF belgesini gönderme talebi.\n */\nexport interface SendCompareProposalProductsPdfRequest {\n /**\n * Unique identifier of the insurance proposal\n * Sigorta teklifinin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * Array of product identifiers to include in the comparison\n * Karşılaştırmaya dahil edilecek ürün tanımlayıcıları dizisi\n */\n readonly proposalProductIds: readonly string[];\n\n /**\n * Array of coverage field names to exclude from the comparison document\n * Karşılaştırma belgesinden hariç tutulacak teminat alan adları dizisi\n */\n readonly excludedCoverageFields: readonly string[];\n\n /**\n * Customer identifier for document delivery\n * Belge teslimatı için müşteri tanımlayıcısı\n */\n readonly customerId: string;\n\n /**\n * Communication method and details for document delivery\n * Belge teslimatı için iletişim yöntemi ve detayları\n */\n readonly communication: SendCompareProposalCommunication;\n}\n\n/**\n * Send Compare Proposal Communication Method Base\n *\n * Abstract base class defining the contract for different communication methods for comparison documents.\n *\n * Karşılaştırma belgeleri için farklı iletişim yöntemleri için sözleşmeyi tanımlayan soyut temel sınıf.\n */\n/**\n * Union type for all compare proposal communication methods\n * Tüm karşılaştırma teklifi iletişim yöntemleri için birleşim türü\n */\nexport type SendCompareProposalCommunication =\n | {\n readonly type: \"email\";\n readonly email: string;\n }\n | {\n readonly type: \"sms\";\n readonly phoneNumber: CustomerPhoneNumber;\n };\n\n/**\n * Set Proposal Representative Request\n *\n * Request to assign or change the representative agent for an insurance proposal.\n *\n * Bir sigorta teklifi için temsilci acente atama veya değiştirme talebi.\n */\nexport interface SetProposalRepresentativeRequest {\n /**\n * The unique identifier of the proposal\n * Teklifin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * The user ID of the agent to assign as representative, or null to remove assignment\n * Temsilci olarak atanacak acentenin kullanıcı ID'si veya atamayı kaldırmak için null\n */\n readonly representativeAgentUserId?: string | null;\n}\n\n/**\n * Retry Failed Proposal Product Request\n *\n * Request to retry processing of a failed insurance product within a proposal.\n *\n * Bir teklif içindeki başarısız sigorta ürününün işlenmesini yeniden deneme talebi.\n */\nexport interface RetryFailedProposalProductRequest {\n /**\n * The unique identifier of the proposal\n * Teklifin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * The unique identifier of the failed product to retry\n * Yeniden denenecek başarısız ürünün benzersiz tanımlayıcısı\n */\n readonly proposalProductId: string;\n}\n\n// ============================================================================\n// RESPONSE TYPES\n// ============================================================================\n\n/**\n * Create Proposal Response\n *\n * Response returned after successfully creating a new insurance proposal.\n *\n * Yeni bir sigorta teklifini başarıyla oluşturduktan sonra döndürülen yanıt.\n */\nexport interface CreateProposalResult {\n /**\n * Unique identifier of the newly created insurance proposal\n * Yeni oluşturulan sigorta teklifinin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n}\n\n/**\n * Get Proposal By ID Response\n *\n * Response for retrieving detailed information about a specific insurance proposal by its ID.\n *\n * Belirli bir sigorta teklifinin ID'sine göre detaylı bilgilerini alma yanıtı.\n */\nexport interface GetProposalByIdResult {\n /**\n * Unique identifier of the insurance proposal\n * Sigorta teklifinin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * Insurance product branch that this proposal belongs to\n * Bu teklifin ait olduğu sigorta ürün dalı\n */\n readonly productBranch: ProductBranch;\n\n /**\n * Total number of insurance products included in this proposal\n * Bu teklifte yer alan toplam sigorta ürün sayısı\n */\n readonly totalProductsCount: number;\n\n /**\n * Number of insurance products that successfully generated quotes\n * Başarıyla teklif üreten sigorta ürün sayısı\n */\n readonly succeedProductsCount: number;\n\n /**\n * Reference to the agent user who created this proposal\n * Bu teklifi oluşturan acente kullanıcısına referans\n */\n readonly agentUserCreatedBy: UserReference;\n\n /**\n * Reference to the representative handling this proposal, if any\n * Varsa, bu teklifi işleyen temsilciye referans\n */\n readonly representedBy?: UserReference | null;\n\n /**\n * Timestamp when this proposal was created\n * Bu teklifin oluşturulduğu zaman damgası\n */\n readonly createdAt: string;\n\n /**\n * Current state of the proposal in the processing workflow\n * İşleme iş akışındaki teklifin mevcut durumu\n */\n readonly state: ProposalState;\n\n /**\n * Sales channel through which this proposal was created\n * Bu teklifin oluşturulduğu satış kanalı\n */\n readonly channel: Channel;\n\n /**\n * Lowest premium amount among all successful product quotes\n * Tüm başarılı ürün teklifleri arasındaki en düşük prim tutarı\n */\n readonly lowestPremium?: number | null;\n\n /**\n * Customer ID of the insurance policy holder/payer\n * Sigorta poliçe sahibi/ödeyicisinin müşteri ID'si\n */\n readonly insurerCustomerId: string;\n\n /**\n * Customer ID of the person/entity being insured\n * Sigortalanan kişi/kuruluşun müşteri ID'si\n */\n readonly insuredCustomerId: string;\n\n /**\n * Highest premium amount among all successful product quotes\n * Tüm başarılı ürün teklifleri arasındaki en yüksek prim tutarı\n */\n readonly highestPremium?: number | null;\n\n /**\n * Initial coverage configuration specified when creating the proposal\n * Teklif oluşturulurken belirtilen başlangıç teminat konfigürasyonu\n */\n readonly initialCoverage?: Coverage | null;\n\n /**\n * Collection of insurance products and their quotes from various companies\n * Çeşitli şirketlerden sigorta ürünleri ve tekliflerinin koleksiyonu\n */\n readonly products: readonly {\n /**\n * Unique identifier for this product quote\n * Bu ürün teklifinin benzersiz tanımlayıcısı\n */\n readonly id: string;\n\n /**\n * Identifier of the insurance company providing this quote\n * Bu teklifi sunan sigorta şirketinin tanımlayıcısı\n */\n readonly insuranceCompanyId: number;\n\n /**\n * Identifier of the specific insurance product\n * Belirli sigorta ürününün tanımlayıcısı\n */\n readonly productId: number;\n\n /**\n * Premium calculations for different payment installments\n * Farklı ödeme taksitleri için prim hesaplamaları\n */\n readonly premiums: readonly {\n /**\n * The installment number for this premium calculation\n * Bu prim hesaplaması için taksit numarası\n */\n readonly installmentNumber: number;\n\n /**\n * Net premium amount before taxes and fees\n * Vergi ve ücretler öncesi net prim tutarı\n */\n readonly netPremium: number;\n\n /**\n * Total premium amount including all taxes and fees\n * Tüm vergi ve ücretler dahil toplam prim tutarı\n */\n readonly grossPremium: number;\n\n /**\n * Commission amount for the agent or intermediary\n * Acente veya aracı için komisyon tutarı\n */\n readonly commission: number;\n\n /**\n * Exchange rate used for currency conversion if applicable\n * Uygulanabilirse döviz kuru dönüştürme için kullanılan kur\n */\n readonly exchangeRate: number;\n\n /**\n * Currency in which this premium is calculated\n * Bu primin hesaplandığı para birimi\n */\n readonly currency: Currency;\n\n /**\n * Insurance company's internal proposal or quote number\n * Sigorta şirketinin dahili teklif veya fiyat teklifi numarası\n */\n readonly insuranceCompanyProposalNumber?: string | null;\n }[];\n\n /**\n * Current processing state of this product quote\n * Bu ürün teklifinin mevcut işleme durumu\n */\n readonly state: ProposalProductState;\n\n /**\n * Indicates if this product requires manual investigation by the insurance company\n * Bu ürünün sigorta şirketi tarafından manuel inceleme gerektirip gerektirmediğini gösterir\n */\n readonly needsInvestigationByCompany: boolean;\n\n /**\n * Indicates if a vocational discount is applied to this quote\n * Bu teklife mesleki indirim uygulanıp uygulanmadığını gösterir\n */\n readonly hasVocationalDiscount: boolean;\n\n /**\n * Indicates if an undamaged/no-claims discount is applied\n * Hasarsızlık/talepsizlik indiriminin uygulanıp uygulanmadığını gösterir\n */\n readonly hasUndamagedDiscount: boolean;\n\n /**\n * Indicates if this product quote has been revised\n * Bu ürün teklifinin revize edilip edilmediğini gösterir\n */\n readonly revised: boolean;\n\n /**\n * Policy identifier if this product has been purchased\n * Bu ürün satın alınmışsa poliçe tanımlayıcısı\n */\n readonly policyId?: string | null;\n\n /**\n * Error message if the product quote failed\n * Ürün teklifi başarısız olursa hata mesajı\n */\n readonly errorMessage?: string | null;\n\n /**\n * Coverage as provided by the insurance service provider\n * Sigorta hizmet sağlayıcısı tarafından sağlanan teminat\n */\n readonly insuranceServiceProviderCoverage?: Coverage | null;\n\n /**\n * Coverage configuration used for PDF document generation\n * PDF belge oluşturma için kullanılan teminat konfigürasyonu\n */\n readonly pdfCoverage?: Coverage | null;\n\n /**\n * Original coverage requested for this specific product\n * Bu belirli ürün için talep edilen orijinal teminat\n */\n readonly initialCoverage?: Coverage | null;\n\n /**\n * Name of the insurance company providing this quote\n * Bu teklifi sunan sigorta şirketinin adı\n */\n readonly insuranceCompanyName: string;\n\n /**\n * Logo URL or identifier for the insurance company\n * Sigorta şirketi için logo URL'si veya tanımlayıcısı\n */\n readonly insuranceCompanyLogo?: string | null;\n\n /**\n * Name of the insurance product\n * Sigorta ürününün adı\n */\n readonly productName: string;\n\n /**\n * Type/category of the insurance product\n * Sigorta ürününün türü/kategorisi\n */\n readonly productType: InsuranceProductType;\n\n /**\n * Identifier of the coverage group this product belongs to\n * Bu ürünün ait olduğu teminat grubunun tanımlayıcısı\n */\n readonly coverageGroupId?: string | null;\n\n /**\n * Name of the coverage group this product belongs to\n * Bu ürünün ait olduğu teminat grubunun adı\n */\n readonly coverageGroupName?: string | null;\n\n /**\n * Payment options supported by this insurance product\n * Bu sigorta ürünü tarafından desteklenen ödeme seçenekleri\n */\n readonly supportedPaymentOptions: readonly PaymentOption[];\n }[];\n\n /**\n * Snapshot of the customer and asset data at the time of proposal creation\n * Teklif oluşturma anındaki müşteri ve varlık verilerinin anlık görüntüsü\n */\n readonly snapshot: ProposalSnapshot;\n\n /**\n * Coverage groups available for this proposal type\n * Bu teklif türü için mevcut teminat grupları\n */\n readonly coverageGroups: readonly {\n /**\n * Unique identifier for this coverage group\n * Bu teminat grubunun benzersiz tanımlayıcısı\n */\n readonly id: string;\n\n /**\n * Coverage configuration for this group\n * Bu grup için teminat konfigürasyonu\n */\n readonly coverage: Coverage;\n\n /**\n * Display name for this coverage group\n * Bu teminat grubunun görüntüleme adı\n */\n readonly name: string;\n }[];\n}\n\n/**\n * Get Proposal Product Premium Detail Response\n *\n * Detailed premium information for a specific insurance product within a proposal.\n *\n * Bir teklif içindeki belirli bir sigorta ürünü için detaylı prim bilgileri.\n */\nexport interface GetProposalProductPremiumDetailResult {\n /**\n * Unique identifier of the insurance proposal\n * Sigorta teklifinin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n\n /**\n * Unique identifier of the specific product within the proposal\n * Teklif içindeki belirli ürünün benzersiz tanımlayıcısı\n */\n readonly proposalProductId: string;\n\n /**\n * Customer ID of the policy holder who will pay the premiums\n * Primleri ödeyecek poliçe sahibinin müşteri ID'si\n */\n readonly insurerCustomerId: string;\n\n /**\n * Customer ID of the person/entity being insured\n * Sigortalanan kişi/kuruluşun müşteri ID'si\n */\n readonly insuredCustomerId: string;\n\n /**\n * The installment number for this premium calculation\n * Bu prim hesaplaması için taksit numarası\n */\n readonly installmentNumber: number;\n\n /**\n * Internal identifier used by the insurance services system\n * Sigorta hizmetleri sistemi tarafından kullanılan dahili tanımlayıcı\n */\n readonly insuranceServicesProposalId: string;\n\n /**\n * Internal identifier for the premium calculation in insurance services\n * Sigorta hizmetlerinde prim hesaplaması için dahili tanımlayıcı\n */\n readonly insuranceServicesPremiumId: string;\n\n /**\n * Insurance company's internal proposal or quote number\n * Sigorta şirketinin dahili teklif veya fiyat teklifi numarası\n */\n readonly insuranceCompanyProposalNumber?: string | null;\n}\n\n/**\n * Purchase Proposal Product Sync Response\n *\n * Response for synchronous purchase of an insurance product from a proposal.\n *\n * Bir tekliften sigorta ürününün senkron satın alınması için yanıt.\n */\nexport interface PurchaseProposalProductSyncResult {\n /**\n * The unique identifier of the newly created insurance policy\n * Yeni oluşturulan sigorta poliçesinin benzersiz tanımlayıcısı\n */\n readonly policyId: string;\n}\n\n/**\n * Purchase Proposal Product Async Response\n *\n * Response for asynchronous purchase of an insurance product from a proposal.\n *\n * Bir tekliften sigorta ürününün asenkron satın alınması için yanıt.\n */\nexport interface PurchaseProposalProductAsyncResult {\n /**\n * URL where the customer should be redirected to complete the purchase\n * Müşterinin satın almayı tamamlamak için yönlendirilmesi gereken URL\n */\n readonly redirectUrl: string;\n}\n\n/**\n * Get Proposal Product Coverage Response\n *\n * Response containing coverage details for a specific insurance product within a proposal.\n *\n * Bir teklif içindeki belirli bir sigorta ürünü için teminat detaylarını içeren yanıt.\n */\nexport interface GetProposalProductCoverageResult {\n /**\n * The complete coverage configuration for the requested insurance product\n * Talep edilen sigorta ürünü için tam teminat konfigürasyonu\n */\n readonly coverage: Coverage;\n}\n\n/**\n * Revise Proposal Response\n *\n * Response after successfully revising an existing insurance proposal.\n *\n * Mevcut bir sigorta teklifini başarıyla revize ettikten sonraki yanıt.\n */\nexport interface ReviseProposalResult {\n /**\n * The unique identifier of the revised proposal\n * Revize edilmiş teklifin benzersiz tanımlayıcısı\n */\n readonly proposalId: string;\n}\n\n/**\n * Fetch Proposal Product Document Response\n *\n * Response containing URL for accessing a specific proposal product document.\n *\n * Belirli bir teklif ürün belgesine erişim için URL içeren yanıt.\n */\nexport interface FetchProposalProductDocumentResult {\n /**\n * The URL to access or download the proposal product document\n * Teklif ürün belgesine erişmek veya indirmek için URL\n */\n readonly url: string;\n}\n\n/**\n * Fetch Proposal Information Form Document Response\n *\n * Response containing URL for accessing the proposal information form document.\n *\n * Teklif bilgi formu belgesine erişim için URL içeren yanıt.\n */\nexport interface FetchProposalInformationFormDocumentResult {\n /**\n * The URL to access or download the proposal information form document\n * Teklif bilgi formu belgesine erişmek veya indirmek için URL\n */\n readonly url: string;\n}\n\n/**\n * Generate Compare Proposal Products PDF Result\n *\n * Result of generating a comparison PDF document for multiple proposal products.\n *\n * Birden fazla teklif ürünü için karşılaştırma PDF belgesi oluşturma sonucu.\n */\nexport interface GenerateCompareProposalProductsPdfResult {\n /**\n * The URL to access or download the generated comparison PDF document\n * Oluşturulan karşılaştırma PDF belgesine erişmek veya indirmek için URL\n */\n readonly url: string;\n}\n\n// ============================================================================\n// BRANCH ASSIGNMENT TYPES\n// ============================================================================\n\n/**\n * Request to set proposal branch\n */\nexport interface SetProposalBranchRequest {\n readonly proposalId: string;\n readonly branchId: string;\n}\n\n// ============================================================================\n// CUSTOMER PROPOSAL DOCUMENT TYPES\n// ============================================================================\n\n/**\n * Request to generate customer proposal document PDF\n */\nexport interface GenerateCustomerProposalDocumentPdfRequest {\n readonly proposalId: string;\n readonly proposalProductIds: readonly string[];\n}\n\n/**\n * Response for generated customer proposal document PDF\n */\nexport interface GenerateCustomerProposalDocumentPdfResult {\n readonly url: string;\n}\n\n// ============================================================================\n// CONVERSION ANALYTICS TYPES\n// ============================================================================\n\n/**\n * Request for proposal conversion trend analytics\n */\nexport interface GetProposalConversionTrendRequest {\n readonly startDate: string;\n readonly endDate: string;\n}\n\n/**\n * Conversion data point\n */\nexport interface ConversionDataPoint {\n readonly date: string;\n readonly proposalCount: number;\n readonly policyCount: number;\n readonly conversionRate: number;\n}\n\n/**\n * Response for proposal conversion trend analytics\n */\nexport interface GetProposalConversionTrendResult {\n readonly timeSeries: readonly ConversionDataPoint[];\n readonly conversionRate: number;\n}\n","/**\n * @fileoverview Common GraphQL Types\n * @description Shared types for GraphQL operations including pagination and connection patterns\n */\n\n// Re-export date types from common location\nexport { DateTime, DateOnly } from \"../common.date.js\";\nimport type { DateTime, DateOnly } from \"../common.date.js\";\n\n/**\n * Information about pagination in a connection.\n */\nexport interface PageInfo {\n /**\n * Indicates whether more edges exist following the set defined by the clients arguments.\n */\n hasNextPage: boolean;\n\n /**\n * Indicates whether more edges exist prior the set defined by the clients arguments.\n */\n hasPreviousPage: boolean;\n\n /**\n * When paginating backwards, the cursor to continue.\n */\n startCursor?: string | null;\n\n /**\n * When paginating forwards, the cursor to continue.\n */\n endCursor?: string | null;\n}\n\n/**\n * Information about the offset pagination.\n */\nexport interface CollectionSegmentInfo {\n /**\n * Indicates whether more items exist following the set defined by the clients arguments.\n */\n hasNextPage: boolean;\n\n /**\n * Indicates whether more items exist prior the set defined by the clients arguments.\n */\n hasPreviousPage: boolean;\n}\n\n/**\n * Generic interface for a connection edge\n */\nexport interface Edge<T> {\n /**\n * A cursor for use in pagination.\n */\n cursor: string;\n\n /**\n * The item at the end of the edge.\n */\n node?: T | null;\n}\n\n/**\n * Generic interface for a connection\n */\nexport interface Connection<T> {\n /**\n * Information to aid in pagination.\n */\n pageInfo: PageInfo;\n\n /**\n * A list of edges.\n */\n edges?: Edge<T>[] | null;\n\n /**\n * A flattened list of the nodes.\n */\n nodes?: (T | null)[] | null;\n\n /**\n * Identifies the total count of items in the connection.\n * Only present when includeTotalCount is true (default).\n */\n totalCount: number;\n}\n\n/**\n * Connection type with optional totalCount (when includeTotalCount is false)\n */\nexport interface ConnectionWithOptionalCount<T>\n extends Omit<Connection<T>, \"totalCount\"> {\n totalCount?: number;\n}\n\n/**\n * Sort direction enum\n */\nexport enum SortEnumType {\n ASC = \"ASC\",\n DESC = \"DESC\",\n}\n\n/**\n * Score modification options. Specify either boost or constant, but not both.\n */\nexport interface SearchScoreInput {\n /**\n * Multiply the score by a given value or by the value of a numeric field\n */\n boost?: number | null;\n\n /**\n * Replace the score with a constant value\n */\n constant?: number | null;\n}\n\n/**\n * Input for text search operations with optional score modification\n */\nexport interface SearchTextInput {\n /**\n * The search query string\n */\n value: string;\n\n /**\n * Optional score modification options\n */\n score?: SearchScoreInput | null;\n}\n\n// === Filter Operation Inputs ===\n\nexport interface BooleanOperationFilterInput {\n eq?: boolean | null;\n neq?: boolean | null;\n}\n\nexport interface StringOperationFilterInput {\n and?: StringOperationFilterInput[] | null;\n or?: StringOperationFilterInput[] | null;\n eq?: string | null;\n neq?: string | null;\n contains?: string | null;\n ncontains?: string | null;\n in?: (string | null)[] | null;\n nin?: (string | null)[] | null;\n startsWith?: string | null;\n nstartsWith?: string | null;\n endsWith?: string | null;\n nendsWith?: string | null;\n}\n\nexport interface IntOperationFilterInput {\n eq?: number | null;\n neq?: number | null;\n in?: (number | null)[] | null;\n nin?: (number | null)[] | null;\n gt?: number | null;\n ngt?: number | null;\n gte?: number | null;\n ngte?: number | null;\n lt?: number | null;\n nlt?: number | null;\n lte?: number | null;\n nlte?: number | null;\n}\n\nexport interface FloatOperationFilterInput {\n eq?: number | null;\n neq?: number | null;\n in?: (number | null)[] | null;\n nin?: (number | null)[] | null;\n gt?: number | null;\n ngt?: number | null;\n gte?: number | null;\n ngte?: number | null;\n lt?: number | null;\n nlt?: number | null;\n lte?: number | null;\n nlte?: number | null;\n}\n\n/** Acceptable date/time value for filter inputs */\ntype DateTimeValue = string | DateTime | Date;\n\n/** Acceptable date-only value for filter inputs */\ntype DateOnlyValue = string | DateOnly | Date;\n\nexport interface DateTimeOperationFilterInput {\n eq?: DateTimeValue | null;\n neq?: DateTimeValue | null;\n in?: (DateTimeValue | null)[] | null;\n nin?: (DateTimeValue | null)[] | null;\n gt?: DateTimeValue | null;\n ngt?: DateTimeValue | null;\n gte?: DateTimeValue | null;\n ngte?: DateTimeValue | null;\n lt?: DateTimeValue | null;\n nlt?: DateTimeValue | null;\n lte?: DateTimeValue | null;\n nlte?: DateTimeValue | null;\n}\n\nexport interface LocalDateOperationFilterInput {\n eq?: DateOnlyValue | null;\n neq?: DateOnlyValue | null;\n in?: (DateOnlyValue | null)[] | null;\n nin?: (DateOnlyValue | null)[] | null;\n gt?: DateOnlyValue | null;\n ngt?: DateOnlyValue | null;\n gte?: DateOnlyValue | null;\n ngte?: DateOnlyValue | null;\n lt?: DateOnlyValue | null;\n nlt?: DateOnlyValue | null;\n lte?: DateOnlyValue | null;\n nlte?: DateOnlyValue | null;\n}\n\nexport interface UuidOperationFilterInput {\n eq?: string | null;\n neq?: string | null;\n in?: (string | null)[] | null;\n nin?: (string | null)[] | null;\n gt?: string | null;\n ngt?: string | null;\n gte?: string | null;\n ngte?: string | null;\n lt?: string | null;\n nlt?: string | null;\n lte?: string | null;\n nlte?: string | null;\n}\n\n// === Search Operation Inputs ===\n\nexport interface SearchStringOperationFilterInput {\n and?: SearchStringOperationFilterInput[] | null;\n or?: SearchStringOperationFilterInput[] | null;\n eq?: string | null;\n neq?: string | null;\n in?: (string | null)[] | null;\n nin?: (string | null)[] | null;\n textSearch?: SearchTextInput | null;\n wildcard?: SearchTextInput | null;\n autocomplete?: SearchTextInput | null;\n}\n\n// === Generic Filter/Search Input Types ===\n\n/**\n * Generic enum filter input. Works with any enum type.\n */\nexport interface EnumOperationFilterInput<T> {\n eq?: T | null;\n neq?: T | null;\n in?: (T | null)[] | null;\n nin?: (T | null)[] | null;\n}\n\n/**\n * Generic list/array filter input. Used for filtering array fields.\n */\nexport interface ListFilterInputType<T> {\n all?: T | null;\n none?: T | null;\n some?: T | null;\n any?: boolean | null;\n}\n\n/**\n * Maps TypeScript types to their corresponding GraphQL filter input types.\n * - DateTime → DateTimeOperationFilterInput\n * - DateOnly → LocalDateOperationFilterInput\n * - Date → DateTimeOperationFilterInput\n * - string → StringOperationFilterInput\n * - number → IntOperationFilterInput\n * - boolean → BooleanOperationFilterInput\n * - arrays → ListFilterInputType with recursive ModelFilterInput\n * - objects → recursive ModelFilterInput\n * - enums → EnumOperationFilterInput\n */\nexport type FilterInputForType<T> = T extends DateTime\n ? DateTimeOperationFilterInput\n : T extends DateOnly\n ? LocalDateOperationFilterInput\n : T extends Date\n ? DateTimeOperationFilterInput\n : T extends string\n ? StringOperationFilterInput\n : T extends number\n ? IntOperationFilterInput\n : T extends boolean\n ? BooleanOperationFilterInput\n : T extends unknown[]\n ? ListFilterInputType<ModelFilterInput<UnwrapArray<T>>>\n : T extends Record<string, unknown>\n ? ModelFilterInput<T>\n : EnumOperationFilterInput<NonNullable<T>>;\n\n/**\n * Auto-generates a filter input type from any model.\n * Includes and/or combinators and maps each field to its appropriate filter type.\n *\n * @example\n * type CustomerFilter = ModelFilterInput<QueryCustomerModel>;\n * // Generates: { and?, or?, id?, name?, type?, agentBranch?, consents?, ... }\n */\nexport type ModelFilterInput<T> = {\n and?: ModelFilterInput<T>[] | null;\n or?: ModelFilterInput<T>[] | null;\n} & {\n [K in keyof T]?: FilterInputForType<NonNullable<T[K]>> | null;\n};\n\n/**\n * Maps TypeScript types to their corresponding GraphQL search input types.\n * Similar to FilterInputForType but uses SearchStringOperationFilterInput for strings.\n * Dates use the same filter inputs as in FilterInputForType.\n */\nexport type SearchInputForType<T> = T extends DateTime\n ? DateTimeOperationFilterInput\n : T extends DateOnly\n ? LocalDateOperationFilterInput\n : T extends Date\n ? DateTimeOperationFilterInput\n : T extends string\n ? SearchStringOperationFilterInput\n : T extends number\n ? IntOperationFilterInput\n : T extends boolean\n ? BooleanOperationFilterInput\n : T extends unknown[]\n ? ListFilterInputType<ModelSearchInput<UnwrapArray<T>>>\n : T extends Record<string, unknown>\n ? ModelSearchInput<T>\n : EnumOperationFilterInput<NonNullable<T>>;\n\n/**\n * Auto-generates a search input type from any model.\n * Similar to ModelFilterInput but uses search-specific string operations.\n *\n * @example\n * type CustomerSearch = ModelSearchInput<QueryCustomerModel>;\n */\nexport type ModelSearchInput<T> = {\n and?: ModelSearchInput<T>[] | null;\n or?: ModelSearchInput<T>[] | null;\n} & {\n [K in keyof T]?: SearchInputForType<NonNullable<T[K]>> | null;\n};\n\n/**\n * Generic query options for GraphQL connection queries.\n * Includes pagination, filtering, searching, and sorting.\n */\nexport interface GetQueryOptions<\n TFieldKey extends string = string,\n TFilter = unknown,\n TSearch = unknown,\n TSort = unknown,\n> {\n /** Fields to select from the query */\n select?: TFieldKey[];\n /** Returns the first _n_ elements from the list */\n first?: number | null;\n /** Returns the elements in the list that come after the specified cursor */\n after?: string | null;\n /** Returns the last _n_ elements from the list */\n last?: number | null;\n /** Returns the elements in the list that come before the specified cursor */\n before?: string | null;\n /** Search criteria */\n search?: TSearch | null;\n /** Filter criteria */\n filter?: TFilter | null;\n /** Sort order */\n order?: TSort[] | null;\n /**\n * Whether to include totalCount in the response.\n * Set to false to improve query performance when count is not needed.\n * @default true\n */\n includeTotalCount?: boolean;\n}\n\n// === Field Selection Utility Types ===\n\n/**\n * Extracts element type from arrays, unwraps nullable types.\n */\ntype UnwrapType<T> = T extends (infer E)[] ? E : NonNullable<T>;\n\n/**\n * Checks if a type is a nested object (not primitive/Date/DateTime/DateOnly).\n */\ntype IsNestedObject<T> = T extends\n | string\n | number\n | boolean\n | Date\n | DateTime\n | DateOnly\n | null\n | undefined\n ? false\n : T extends object\n ? true\n : false;\n\n/**\n * Generic utility to create field keys with nested dot-notation paths.\n * - Primitive fields: \"id\", \"name\" (as-is)\n * - Objects/Arrays: ONLY nested paths allowed, e.g. \"agentBranch.id\", \"consents.consentType\"\n * - Parent keys alone (\"agentBranch\", \"consents\") are NOT in the union\n *\n * @example\n * interface User {\n * id: string;\n * profile: { name: string; age: number };\n * tags: { label: string }[];\n * }\n * type UserFieldKey = DeepFieldKeys<User>;\n * // Result: \"id\" | \"profile.name\" | \"profile.age\" | \"tags.label\"\n */\nexport type DeepFieldKeys<T> = {\n [K in keyof T]-?: K extends string\n ? IsNestedObject<UnwrapType<T[K]>> extends true\n ? `${K}.${keyof UnwrapType<T[K]> & string}`\n : K\n : never;\n}[keyof T];\n\n/**\n * Extracts the parent key from a nested field path (e.g., \"agentBranch.id\" -> \"agentBranch\")\n */\nexport type ExtractParent<T extends string> =\n T extends `${infer Parent}.${string}` ? Parent : never;\n\n/**\n * Checks if a field key is a nested path\n */\nexport type IsNestedPath<T extends string> = T extends `${string}.${string}`\n ? true\n : false;\n\n/**\n * Extracts simple (non-nested) field keys from an array\n */\nexport type SimpleFields<T extends readonly string[]> = {\n [K in T[number]]: IsNestedPath<K> extends false ? K : never;\n}[T[number]];\n\n/**\n * Gets all unique parent keys from nested paths in an array\n */\nexport type NestedParents<T extends readonly string[]> = {\n [K in T[number]]: ExtractParent<K>;\n}[T[number]];\n\n/**\n * Gets all nested keys for a specific parent from an array\n */\nexport type NestedKeysForParent<\n T extends readonly string[],\n Parent extends string,\n> = {\n [K in T[number]]: K extends `${Parent}.${infer Key}` ? Key : never;\n}[T[number]];\n\n/**\n * Helper to unwrap array element type\n */\nexport type UnwrapArray<T> = T extends (infer E)[] ? E : T;\n\n/**\n * Generic helper type to pick selected fields from a model.\n * Handles both simple fields and nested paths:\n * - Simple fields: picked directly from Model\n * - Nested paths: parent field is included with picked nested fields\n */\nexport type PickFields<Model, T extends readonly string[]> = {\n // Simple fields\n [K in SimpleFields<T> & keyof Model]: Model[K];\n} & {\n // Nested object fields (non-array)\n [K in NestedParents<T> & keyof Model as Model[K] extends\n | unknown[]\n | null\n | undefined\n ? never\n : K]?: Pick<\n NonNullable<Model[K]>,\n NestedKeysForParent<T, K> & keyof NonNullable<Model[K]>\n > | null;\n} & {\n // Nested array fields\n [K in NestedParents<T> & keyof Model as Model[K] extends unknown[]\n ? K\n : never]: Pick<\n UnwrapArray<Model[K]>,\n NestedKeysForParent<T, K> & keyof UnwrapArray<Model[K]>\n >[];\n};\n\n/**\n * Builds GraphQL field selection string from field keys with dot-notation support.\n * Groups nested field paths by their parent.\n *\n * @example\n * buildFieldSelection([\"id\", \"name\", \"agentBranch.id\", \"agentBranch.name\"])\n * // Returns: \"id\\nname\\nagentBranch { id name }\"\n *\n * @param fields Array of field keys (can include dot-notation for nested fields)\n * @param indent Indentation string for formatting (default: 12 spaces)\n */\nexport function buildFieldSelection(\n fields: readonly string[],\n indent = \" \",\n): string {\n const simpleFields: string[] = [];\n const nestedFields: Map<string, string[]> = new Map();\n\n for (const field of fields) {\n const dotIndex = field.indexOf(\".\");\n if (dotIndex !== -1) {\n const parent = field.slice(0, dotIndex);\n const nested = field.slice(dotIndex + 1);\n if (!nestedFields.has(parent)) {\n nestedFields.set(parent, []);\n }\n nestedFields.get(parent)!.push(nested);\n } else {\n simpleFields.push(field);\n }\n }\n\n const selections: string[] = [...simpleFields];\n\n for (const [parent, nestedKeys] of nestedFields) {\n selections.push(`${parent} { ${nestedKeys.join(\" \")} }`);\n }\n\n return selections.join(`\\n${indent}`);\n}\n","/**\n * @fileoverview Customer GraphQL Types\n * @description Types for querying customers via GraphQL\n */\n\nimport type {\n Connection,\n Edge,\n SortEnumType,\n DeepFieldKeys,\n PickFields,\n ModelFilterInput,\n ModelSearchInput,\n GetQueryOptions,\n} from \"./common.js\";\nimport type { DateTime, DateOnly } from \"../common.date.js\";\n\nimport type { CustomerType } from \"../common.js\";\nimport type {\n ConsentType,\n EducationStatus,\n Gender,\n Job,\n MaritalStatus,\n Nationality,\n} from \"../customers.js\";\n\n// === Output Types ===\n\nexport interface CustomerAgentBranchInfo {\n id: string;\n name: string;\n parentId?: string | null;\n parentName?: string | null;\n}\n\nexport interface QueryCustomerConsentModel {\n consentType: ConsentType;\n isActive: boolean;\n}\n\nexport interface QueryCustomerModel {\n agentBranch?: CustomerAgentBranchInfo | null;\n agentBranchId?: string | null;\n id: string;\n name?: string | null;\n identityNumber?: string | null;\n taxNumber?: string | null;\n type: CustomerType;\n primaryEmail?: string | null;\n primaryPhoneNumber?: string | null;\n primaryPhoneNumberCountryCode?: number | null;\n cityText?: string | null;\n cityValue?: string | null;\n districtText?: string | null;\n districtValue?: string | null;\n createdAt: DateTime;\n birthDate?: DateOnly | null;\n gender?: Gender | null;\n educationStatus?: EducationStatus | null;\n nationality?: Nationality | null;\n maritalStatus?: MaritalStatus | null;\n job?: Job | null;\n passportNumber?: string | null;\n searchScore?: number | null;\n consents: QueryCustomerConsentModel[];\n}\n\n// === Filter/Search/Sort Inputs (auto-generated from model) ===\n\n/**\n * Filter input for QueryCustomerModel.\n * Auto-generated from model fields using ModelFilterInput.\n */\nexport type QueryCustomerModelFilterInput =\n ModelFilterInput<QueryCustomerModel>;\n\n/**\n * Search input for QueryCustomerModel.\n * Auto-generated from model fields using ModelSearchInput.\n */\nexport type QueryCustomerModelSearchInput =\n ModelSearchInput<QueryCustomerModel>;\n\n/**\n * Sort input for QueryCustomerModel.\n * Note: Sort fields are explicitly defined as they may differ from model fields.\n */\nexport interface QueryCustomerModelSortInput {\n name?: SortEnumType | null;\n createdAt?: SortEnumType | null;\n birthDate?: SortEnumType | null;\n searchScore?: SortEnumType | null;\n}\n\n// === Connection Types ===\n\nexport type CustomersEdge = Edge<QueryCustomerModel>;\nexport type CustomersConnection<\n TFields extends readonly CustomerFieldKey[] = readonly CustomerFieldKey[],\n> = Connection<PickCustomerFields<TFields>>;\n\n// === Select Options ===\n\n/**\n * All available field keys for QueryCustomerModel with nested dot-notation paths.\n * - Primitive fields: \"id\", \"name\", etc. (as-is)\n * - Objects/Arrays: ONLY nested paths allowed, e.g. \"agentBranch.id\", \"consents.consentType\"\n * - Parent keys alone (\"agentBranch\", \"consents\") are NOT allowed\n */\nexport type CustomerFieldKey = DeepFieldKeys<QueryCustomerModel>;\n\n/**\n * Runtime array of all customer field keys including nested paths.\n */\nexport const ALL_CUSTOMER_FIELDS = [\n // Primitive fields\n \"agentBranchId\",\n \"id\",\n \"name\",\n \"identityNumber\",\n \"taxNumber\",\n \"type\",\n \"primaryEmail\",\n \"primaryPhoneNumber\",\n \"primaryPhoneNumberCountryCode\",\n \"cityText\",\n \"cityValue\",\n \"districtText\",\n \"districtValue\",\n \"createdAt\",\n \"birthDate\",\n \"gender\",\n \"educationStatus\",\n \"nationality\",\n \"maritalStatus\",\n \"job\",\n \"passportNumber\",\n \"searchScore\",\n // Nested agentBranch fields\n \"agentBranch.id\",\n \"agentBranch.name\",\n \"agentBranch.parentId\",\n \"agentBranch.parentName\",\n // Nested consents fields\n \"consents.consentType\",\n \"consents.isActive\",\n] as const satisfies readonly CustomerFieldKey[];\n\n/**\n * Helper type to pick selected fields from QueryCustomerModel.\n * Uses the generic PickFields utility from common.ts.\n */\nexport type PickCustomerFields<T extends readonly CustomerFieldKey[]> =\n PickFields<QueryCustomerModel, T>;\n\n/**\n * Type-safe connection result based on selected fields\n */\nexport interface SelectedCustomersConnection<\n TFields extends CustomerFieldKey[],\n> extends Omit<CustomersConnection, \"nodes\" | \"edges\"> {\n nodes?: (PickCustomerFields<TFields> | null)[] | null;\n edges?:\n | (Omit<CustomersEdge, \"node\"> & {\n node?: PickCustomerFields<TFields> | null;\n })[]\n | null;\n}\n\n/**\n * Options for getCustomers query.\n * Extends GetQueryOptions with customer-specific types.\n */\nexport interface GetCustomersOptions<\n TFields extends CustomerFieldKey[] = CustomerFieldKey[],\n> extends GetQueryOptions<\n CustomerFieldKey,\n QueryCustomerModelFilterInput,\n QueryCustomerModelSearchInput,\n QueryCustomerModelSortInput\n> {\n /** Fields to select from the query. If not provided, all fields are returned. */\n select?: TFields;\n}\n","/**\n * @fileoverview Policy GraphQL Types\n * @description Types for querying policies via GraphQL\n */\n\nimport type {\n Connection,\n Edge,\n SortEnumType,\n DeepFieldKeys,\n PickFields,\n ModelFilterInput,\n ModelSearchInput,\n GetQueryOptions,\n} from \"./common.js\";\nimport type { DateTime, DateOnly } from \"../common.date.js\";\n\nimport type {\n ProductBranch,\n Currency,\n PaymentOption,\n PolicyState,\n Channel,\n CustomerType,\n} from \"../common.js\";\nimport type { VehicleFuelType } from \"../common.vehicle.js\";\n\n// === Output Types ===\n\nexport interface PolicyAgentBranchInfo {\n id: string;\n name: string;\n parentId?: string | null;\n parentName?: string | null;\n}\n\nexport interface PolicyUserReference {\n id: string;\n name: string;\n email?: string | null;\n userType?: UserType | null;\n}\n\nexport enum UserType {\n None = \"NONE\",\n AdminPanel = \"ADMIN_PANEL\",\n Agent = \"AGENT\",\n Customer = \"CUSTOMER\",\n}\n\nexport interface QueryPoliciesResult {\n agentBranch?: PolicyAgentBranchInfo | null;\n agentBranchId?: string | null;\n id: string;\n insurerCustomerId: string;\n insuredCustomerId: string;\n installmentNumber?: number | null;\n productBranch: ProductBranch;\n netPremium?: number | null;\n grossPremium?: number | null;\n commission?: number | null;\n paymentType: PaymentOption;\n currency: Currency;\n insuranceCompanyProposalNumber: string;\n insuranceCompanyPolicyNumber: string;\n createdAt: DateTime;\n startDate: DateOnly;\n endDate: DateOnly;\n arrangementDate?: DateOnly | null;\n insuredCustomerName?: string | null;\n insuredCustomerIdentityNumber?: string | null;\n insuredCustomerTaxNumber?: string | null;\n insuredCustomerType: CustomerType;\n insuredCustomerCityText?: string | null;\n insuredCustomerCityValue?: string | null;\n insuredCustomerDistrictText?: string | null;\n insuredCustomerDistrictValue?: string | null;\n insuredCustomerBirthDate?: DateOnly | null;\n insurerCustomerName?: string | null;\n insurerCustomerIdentityNumber?: string | null;\n insurerCustomerTaxNumber?: string | null;\n insurerCustomerCityText?: string | null;\n insurerCustomerCityValue?: string | null;\n insurerCustomerDistrictText?: string | null;\n insurerCustomerDistrictValue?: string | null;\n insurerCustomerBirthDate?: DateOnly | null;\n vehiclePlateCode?: string | null;\n vehiclePlateCity?: number | null;\n vehicleDocumentSerialCode?: string | null;\n vehicleDocumentSerialNumber?: string | null;\n vehicleModelBrandText?: string | null;\n vehicleModelBrandValue?: string | null;\n vehicleModelTypeText?: string | null;\n vehicleModelTypeValue?: string | null;\n vehicleModelYear?: number | null;\n vehicleFuelType?: VehicleFuelType | null;\n productId?: number | null;\n productName?: string | null;\n insuranceCompanyId: number;\n insuranceCompanyName: string;\n insuranceCompanyLogo?: string | null;\n state: PolicyState;\n createdBy: PolicyUserReference;\n representedBy?: PolicyUserReference | null;\n propertyNumber?: number | null;\n daskOldPolicyNumber?: number | null;\n daskPolicyNumber?: string | null;\n vehicleId?: string | null;\n propertyId?: string | null;\n channel: Channel;\n campaign?: string | null;\n}\n\n// === Filter/Search/Sort Inputs (auto-generated from model) ===\n\n/**\n * Filter input for QueryPoliciesResult.\n * Auto-generated from model fields using ModelFilterInput.\n */\nexport type QueryPoliciesResultFilterInput =\n ModelFilterInput<QueryPoliciesResult>;\n\n/**\n * Search input for QueryPoliciesResult.\n * Auto-generated from model fields using ModelSearchInput.\n */\nexport type QueryPoliciesResultSearchInput =\n ModelSearchInput<QueryPoliciesResult>;\n\n/**\n * Sort input for QueryPoliciesResult.\n * Note: Sort fields are explicitly defined as they may differ from model fields.\n */\nexport interface QueryPoliciesResultSortInput {\n netPremium?: SortEnumType | null;\n grossPremium?: SortEnumType | null;\n createdAt?: SortEnumType | null;\n startDate?: SortEnumType | null;\n endDate?: SortEnumType | null;\n arrangementDate?: SortEnumType | null;\n vehicleModelYear?: SortEnumType | null;\n}\n\n// === Connection Types ===\n\nexport type PoliciesEdge = Edge<QueryPoliciesResult>;\nexport type PoliciesConnection<\n TFields extends readonly PolicyFieldKey[] = readonly PolicyFieldKey[],\n> = Connection<PickPolicyFields<TFields>>;\n\n// === Select Options ===\n\n/**\n * All available field keys for QueryPoliciesResult with nested dot-notation paths.\n */\nexport type PolicyFieldKey = DeepFieldKeys<QueryPoliciesResult>;\n\n/**\n * Runtime array of all policy field keys including nested paths.\n */\nexport const ALL_POLICY_FIELDS = [\n // Primitive fields\n \"agentBranchId\",\n \"id\",\n \"insurerCustomerId\",\n \"insuredCustomerId\",\n \"installmentNumber\",\n \"productBranch\",\n \"netPremium\",\n \"grossPremium\",\n \"commission\",\n \"paymentType\",\n \"currency\",\n \"insuranceCompanyProposalNumber\",\n \"insuranceCompanyPolicyNumber\",\n \"createdAt\",\n \"startDate\",\n \"endDate\",\n \"arrangementDate\",\n \"insuredCustomerName\",\n \"insuredCustomerIdentityNumber\",\n \"insuredCustomerTaxNumber\",\n \"insuredCustomerType\",\n \"insuredCustomerCityText\",\n \"insuredCustomerCityValue\",\n \"insuredCustomerDistrictText\",\n \"insuredCustomerDistrictValue\",\n \"insuredCustomerBirthDate\",\n \"insurerCustomerName\",\n \"insurerCustomerIdentityNumber\",\n \"insurerCustomerTaxNumber\",\n \"insurerCustomerCityText\",\n \"insurerCustomerCityValue\",\n \"insurerCustomerDistrictText\",\n \"insurerCustomerDistrictValue\",\n \"insurerCustomerBirthDate\",\n \"vehiclePlateCode\",\n \"vehiclePlateCity\",\n \"vehicleDocumentSerialCode\",\n \"vehicleDocumentSerialNumber\",\n \"vehicleModelBrandText\",\n \"vehicleModelBrandValue\",\n \"vehicleModelTypeText\",\n \"vehicleModelTypeValue\",\n \"vehicleModelYear\",\n \"vehicleFuelType\",\n \"productId\",\n \"productName\",\n \"insuranceCompanyId\",\n \"insuranceCompanyName\",\n \"insuranceCompanyLogo\",\n \"state\",\n \"propertyNumber\",\n \"daskOldPolicyNumber\",\n \"daskPolicyNumber\",\n \"vehicleId\",\n \"propertyId\",\n \"channel\",\n \"campaign\",\n // Nested agentBranch fields\n \"agentBranch.id\",\n \"agentBranch.name\",\n \"agentBranch.parentId\",\n \"agentBranch.parentName\",\n // Nested createdBy fields\n \"createdBy.id\",\n \"createdBy.name\",\n \"createdBy.email\",\n \"createdBy.userType\",\n // Nested representedBy fields\n \"representedBy.id\",\n \"representedBy.name\",\n \"representedBy.email\",\n \"representedBy.userType\",\n] as const satisfies readonly PolicyFieldKey[];\n\n/**\n * Helper type to pick selected fields from QueryPoliciesResult.\n */\nexport type PickPolicyFields<T extends readonly PolicyFieldKey[]> = PickFields<\n QueryPoliciesResult,\n T\n>;\n\n/**\n * Type-safe connection result based on selected fields\n */\nexport interface SelectedPoliciesConnection<\n TFields extends PolicyFieldKey[],\n> extends Omit<PoliciesConnection, \"nodes\" | \"edges\"> {\n nodes?: (PickPolicyFields<TFields> | null)[] | null;\n edges?:\n | (Omit<PoliciesEdge, \"node\"> & {\n node?: PickPolicyFields<TFields> | null;\n })[]\n | null;\n}\n\n/**\n * Options for getPolicies query.\n * Extends GetQueryOptions with policy-specific types.\n */\nexport interface GetPoliciesOptions<\n TFields extends PolicyFieldKey[] = PolicyFieldKey[],\n> extends GetQueryOptions<\n PolicyFieldKey,\n QueryPoliciesResultFilterInput,\n QueryPoliciesResultSearchInput,\n QueryPoliciesResultSortInput\n> {\n /** Fields to select from the query. If not provided, all fields are returned. */\n select?: TFields;\n}\n","/**\n * @fileoverview Proposal GraphQL Types\n * @description Types for querying proposals via GraphQL\n */\n\nimport type {\n Connection,\n Edge,\n SortEnumType,\n DeepFieldKeys,\n PickFields,\n ModelFilterInput,\n ModelSearchInput,\n GetQueryOptions,\n} from \"./common.js\";\nimport type { DateTime, DateOnly } from \"../common.date.js\";\n\nimport type { ProductBranch, Channel, CustomerType } from \"../common.js\";\nimport type { VehicleFuelType, VehicleUtilizationStyle } from \"../common.vehicle.js\";\nimport type { ProposalState } from \"../proposals.js\";\nimport type { UserType } from \"./policies.js\";\n\n// === Output Types ===\n\nexport interface ProposalAgentBranchInfo {\n id: string;\n name: string;\n parentId?: string | null;\n parentName?: string | null;\n}\n\nexport interface ProposalUserReference {\n id: string;\n name: string;\n email?: string | null;\n userType?: UserType | null;\n}\n\nexport interface QueryProposalsResult {\n agentBranch?: ProposalAgentBranchInfo | null;\n agentBranchId?: string | null;\n id: string;\n productBranch: ProductBranch;\n state: ProposalState;\n insurerCustomerId: string;\n insuredCustomerId: string;\n productsCount: number;\n succeedProductsCount: number;\n createdAt: DateTime;\n agentUserCreatedBy: ProposalUserReference;\n successRate: number;\n insuredCustomerName: string;\n insuredCustomerIdentityNumber?: string | null;\n insuredCustomerTaxNumber?: string | null;\n insuredCustomerType: CustomerType;\n lowestPremium?: number | null;\n highestPremium?: number | null;\n channel: Channel;\n insuredCustomerCityText?: string | null;\n insuredCustomerCityValue?: string | null;\n insuredCustomerDistrictText?: string | null;\n insuredCustomerDistrictValue?: string | null;\n insuredCustomerPhoneNumber?: string | null;\n insuredCustomerPhoneNumberCountryCode?: number | null;\n insuredCustomerEmail?: string | null;\n vehiclePlateCode?: string | null;\n vehiclePlateCity?: number | null;\n vehicleDocumentSerialCode?: string | null;\n vehicleDocumentSerialNumber?: string | null;\n vehicleModelBrandText?: string | null;\n vehicleModelBrandValue?: string | null;\n vehicleModelTypeText?: string | null;\n vehicleModelTypeValue?: string | null;\n vehicleModelYear?: number | null;\n vehicleFuelType?: VehicleFuelType | null;\n utilizationStyle?: VehicleUtilizationStyle | null;\n insuredCustomerBirthDate?: DateOnly | null;\n vehicleId?: string | null;\n propertyId?: string | null;\n}\n\n// === Filter/Search/Sort Inputs (auto-generated from model) ===\n\n/**\n * Filter input for QueryProposalsResult.\n * Auto-generated from model fields using ModelFilterInput.\n */\nexport type QueryProposalsResultFilterInput =\n ModelFilterInput<QueryProposalsResult>;\n\n/**\n * Search input for QueryProposalsResult.\n * Auto-generated from model fields using ModelSearchInput.\n */\nexport type QueryProposalsResultSearchInput =\n ModelSearchInput<QueryProposalsResult>;\n\n/**\n * Sort input for QueryProposalsResult.\n * Note: Sort fields are explicitly defined as they may differ from model fields.\n */\nexport interface QueryProposalsResultSortInput {\n createdAt?: SortEnumType | null;\n vehicleModelYear?: SortEnumType | null;\n}\n\n// === Connection Types ===\n\nexport type ProposalsEdge = Edge<QueryProposalsResult>;\nexport type ProposalsConnection<\n TFields extends readonly ProposalFieldKey[] = readonly ProposalFieldKey[],\n> = Connection<PickProposalFields<TFields>>;\n\n// === Select Options ===\n\n/**\n * All available field keys for QueryProposalsResult with nested dot-notation paths.\n */\nexport type ProposalFieldKey = DeepFieldKeys<QueryProposalsResult>;\n\n/**\n * Runtime array of all proposal field keys including nested paths.\n */\nexport const ALL_PROPOSAL_FIELDS = [\n // Primitive fields\n \"agentBranchId\",\n \"id\",\n \"productBranch\",\n \"state\",\n \"insurerCustomerId\",\n \"insuredCustomerId\",\n \"productsCount\",\n \"succeedProductsCount\",\n \"createdAt\",\n \"successRate\",\n \"insuredCustomerName\",\n \"insuredCustomerIdentityNumber\",\n \"insuredCustomerTaxNumber\",\n \"insuredCustomerType\",\n \"lowestPremium\",\n \"highestPremium\",\n \"channel\",\n \"insuredCustomerCityText\",\n \"insuredCustomerCityValue\",\n \"insuredCustomerDistrictText\",\n \"insuredCustomerDistrictValue\",\n \"insuredCustomerPhoneNumber\",\n \"insuredCustomerPhoneNumberCountryCode\",\n \"insuredCustomerEmail\",\n \"vehiclePlateCode\",\n \"vehiclePlateCity\",\n \"vehicleDocumentSerialCode\",\n \"vehicleDocumentSerialNumber\",\n \"vehicleModelBrandText\",\n \"vehicleModelBrandValue\",\n \"vehicleModelTypeText\",\n \"vehicleModelTypeValue\",\n \"vehicleModelYear\",\n \"vehicleFuelType\",\n \"utilizationStyle\",\n \"insuredCustomerBirthDate\",\n \"vehicleId\",\n \"propertyId\",\n // Nested agentBranch fields\n \"agentBranch.id\",\n \"agentBranch.name\",\n \"agentBranch.parentId\",\n \"agentBranch.parentName\",\n // Nested agentUserCreatedBy fields\n \"agentUserCreatedBy.id\",\n \"agentUserCreatedBy.name\",\n \"agentUserCreatedBy.email\",\n \"agentUserCreatedBy.userType\",\n] as const satisfies readonly ProposalFieldKey[];\n\n/**\n * Helper type to pick selected fields from QueryProposalsResult.\n */\nexport type PickProposalFields<T extends readonly ProposalFieldKey[]> =\n PickFields<QueryProposalsResult, T>;\n\n/**\n * Type-safe connection result based on selected fields\n */\nexport interface SelectedProposalsConnection<\n TFields extends ProposalFieldKey[],\n> extends Omit<ProposalsConnection, \"nodes\" | \"edges\"> {\n nodes?: (PickProposalFields<TFields> | null)[] | null;\n edges?:\n | (Omit<ProposalsEdge, \"node\"> & {\n node?: PickProposalFields<TFields> | null;\n })[]\n | null;\n}\n\n/**\n * Options for getProposals query.\n * Extends GetQueryOptions with proposal-specific types.\n */\nexport interface GetProposalsOptions<\n TFields extends ProposalFieldKey[] = ProposalFieldKey[],\n> extends GetQueryOptions<\n ProposalFieldKey,\n QueryProposalsResultFilterInput,\n QueryProposalsResultSearchInput,\n QueryProposalsResultSortInput\n> {\n /** Fields to select from the query. If not provided, all fields are returned. */\n select?: TFields;\n}\n","/**\n * @fileoverview Case GraphQL Types\n * @description Types for querying cases via GraphQL\n */\n\nimport type {\n Connection,\n Edge,\n SortEnumType,\n DeepFieldKeys,\n PickFields,\n ModelFilterInput,\n ModelSearchInput,\n GetQueryOptions,\n} from \"./common.js\";\nimport type { DateTime, DateOnly } from \"../common.date.js\";\n\nimport type { ProductBranch, Channel, CustomerType, AssetType } from \"../common.js\";\nimport type { VehicleFuelType, VehicleUtilizationStyle } from \"../common.vehicle.js\";\nimport type {\n PropertyDamageStatus,\n PropertyStructure,\n PropertyUtilizationStyle,\n PropertyOwnershipType,\n} from \"../common.property.js\";\nimport type {\n CaseType,\n CaseStatus,\n CaseMainState,\n CaseSubState,\n SaleOpportunityCaseSubType,\n CancelCaseSubType,\n EndorsementCaseSubType,\n ComplaintCaseSubType,\n} from \"../cases.js\";\nimport type { Job } from \"../customers.js\";\nimport type { UserType } from \"./policies.js\";\n\n// === Output Types ===\n\nexport interface CaseAgentBranchInfo {\n id: string;\n name: string;\n parentId?: string | null;\n parentName?: string | null;\n}\n\nexport interface PriorityRuleHit {\n label: string;\n description: string;\n ruleName?: string | null;\n score: number;\n}\n\nexport interface QueryCaseModel {\n agentBranch?: CaseAgentBranchInfo | null;\n agentBranchId?: string | null;\n id: string;\n ref: string;\n type: CaseType;\n status: CaseStatus;\n cancelSubType?: CancelCaseSubType | null;\n saleOpportunitySubType?: SaleOpportunityCaseSubType | null;\n endorsementSubType?: EndorsementCaseSubType | null;\n complaintSubType?: ComplaintCaseSubType | null;\n mainState: CaseMainState;\n subState: CaseSubState;\n productBranch?: ProductBranch | null;\n channel?: Channel | null;\n createdAt: DateTime;\n createdByName: string;\n createdById: string;\n createdByEmail?: string | null;\n createdByType?: UserType | null;\n representedByName?: string | null;\n representedById?: string | null;\n representedByEmail?: string | null;\n representedByType?: UserType | null;\n policyEndDate?: DateOnly | null;\n assetType?: AssetType | null;\n assetId?: string | null;\n sourceCaseId?: string | null;\n policyCount: number;\n proposalCount: number;\n lastProposalDate?: DateTime | null;\n lastPolicyDate?: DateTime | null;\n lastUpdateDate?: DateTime | null;\n lastUpdatedByName?: string | null;\n lastUpdatedById?: string | null;\n lastUpdatedByEmail?: string | null;\n lastUpdatedByType?: UserType | null;\n priorityScore?: number | null;\n priorityRuleHits?: PriorityRuleHit[] | null;\n customerId?: string | null;\n customerName?: string | null;\n customerType?: CustomerType | null;\n customerIdentity?: string | null;\n customerCityText?: string | null;\n customerCityValue?: string | null;\n customerDistrictText?: string | null;\n customerDistrictValue?: string | null;\n customerPrimaryPhoneNumber?: string | null;\n customerPrimaryPhoneCountryCode?: number | null;\n customerPrimaryEmail?: string | null;\n customerBirthDate?: DateOnly | null;\n customerPassportNumber?: string | null;\n customerJob?: Job | null;\n vehiclePlateCode?: string | null;\n vehiclePlateCity?: number | null;\n vehicleModelBrandText?: string | null;\n vehicleModelBrandValue?: string | null;\n vehicleModelTypeText?: string | null;\n vehicleModelTypeValue?: string | null;\n vehicleModelYear?: number | null;\n vehicleUtilizationStyle?: VehicleUtilizationStyle | null;\n vehicleEngineNumber?: string | null;\n vehicleChassisNumber?: string | null;\n vehicleRegistrationDate?: DateOnly | null;\n vehicleFuelType?: VehicleFuelType | null;\n vehicleSeatNumber?: number | null;\n vehicleDocumentSerialCode?: string | null;\n vehicleDocumentSerialNumber?: string | null;\n propertyNumber?: number | null;\n propertySquareMeter?: number | null;\n propertyConstructionYear?: number | null;\n propertyDamageStatus?: PropertyDamageStatus | null;\n propertyFloorNumber?: number | null;\n propertyStructure?: PropertyStructure | null;\n propertyUtilizationStyle?: PropertyUtilizationStyle | null;\n propertyOwnershipType?: PropertyOwnershipType | null;\n propertyDaskPolicyNumber?: string | null;\n advertisingSource?: string | null;\n advertisingCampaign?: string | null;\n searchScore?: number | null;\n}\n\n// === Filter/Search/Sort Inputs (auto-generated from model) ===\n\n/**\n * Filter input for QueryCaseModel.\n * Auto-generated from model fields using ModelFilterInput.\n */\nexport type QueryCaseModelFilterInput = ModelFilterInput<QueryCaseModel>;\n\n/**\n * Search input for QueryCaseModel.\n * Auto-generated from model fields using ModelSearchInput.\n */\nexport type QueryCaseModelSearchInput = ModelSearchInput<QueryCaseModel>;\n\n/**\n * Sort input for QueryCaseModel.\n * Note: Sort fields are explicitly defined as they may differ from model fields.\n */\nexport interface QueryCaseModelSortInput {\n createdAt?: SortEnumType | null;\n policyEndDate?: SortEnumType | null;\n policyCount?: SortEnumType | null;\n proposalCount?: SortEnumType | null;\n lastProposalDate?: SortEnumType | null;\n lastPolicyDate?: SortEnumType | null;\n lastUpdateDate?: SortEnumType | null;\n priorityScore?: SortEnumType | null;\n customerBirthDate?: SortEnumType | null;\n vehicleModelYear?: SortEnumType | null;\n vehicleRegistrationDate?: SortEnumType | null;\n propertyConstructionYear?: SortEnumType | null;\n searchScore?: SortEnumType | null;\n}\n\n// === Connection Types ===\n\nexport type CasesEdge = Edge<QueryCaseModel>;\nexport type CasesConnection<\n TFields extends readonly CaseFieldKey[] = readonly CaseFieldKey[],\n> = Connection<PickCaseFields<TFields>>;\n\n// === Select Options ===\n\n/**\n * All available field keys for QueryCaseModel with nested dot-notation paths.\n */\nexport type CaseFieldKey = DeepFieldKeys<QueryCaseModel>;\n\n/**\n * Runtime array of all case field keys including nested paths.\n */\nexport const ALL_CASE_FIELDS = [\n // Primitive fields\n \"agentBranchId\",\n \"id\",\n \"ref\",\n \"type\",\n \"status\",\n \"cancelSubType\",\n \"saleOpportunitySubType\",\n \"endorsementSubType\",\n \"complaintSubType\",\n \"mainState\",\n \"subState\",\n \"productBranch\",\n \"channel\",\n \"createdAt\",\n \"createdByName\",\n \"createdById\",\n \"createdByEmail\",\n \"createdByType\",\n \"representedByName\",\n \"representedById\",\n \"representedByEmail\",\n \"representedByType\",\n \"policyEndDate\",\n \"assetType\",\n \"assetId\",\n \"sourceCaseId\",\n \"policyCount\",\n \"proposalCount\",\n \"lastProposalDate\",\n \"lastPolicyDate\",\n \"lastUpdateDate\",\n \"lastUpdatedByName\",\n \"lastUpdatedById\",\n \"lastUpdatedByEmail\",\n \"lastUpdatedByType\",\n \"priorityScore\",\n \"customerId\",\n \"customerName\",\n \"customerType\",\n \"customerIdentity\",\n \"customerCityText\",\n \"customerCityValue\",\n \"customerDistrictText\",\n \"customerDistrictValue\",\n \"customerPrimaryPhoneNumber\",\n \"customerPrimaryPhoneCountryCode\",\n \"customerPrimaryEmail\",\n \"customerBirthDate\",\n \"customerPassportNumber\",\n \"customerJob\",\n \"vehiclePlateCode\",\n \"vehiclePlateCity\",\n \"vehicleModelBrandText\",\n \"vehicleModelBrandValue\",\n \"vehicleModelTypeText\",\n \"vehicleModelTypeValue\",\n \"vehicleModelYear\",\n \"vehicleUtilizationStyle\",\n \"vehicleEngineNumber\",\n \"vehicleChassisNumber\",\n \"vehicleRegistrationDate\",\n \"vehicleFuelType\",\n \"vehicleSeatNumber\",\n \"vehicleDocumentSerialCode\",\n \"vehicleDocumentSerialNumber\",\n \"propertyNumber\",\n \"propertySquareMeter\",\n \"propertyConstructionYear\",\n \"propertyDamageStatus\",\n \"propertyFloorNumber\",\n \"propertyStructure\",\n \"propertyUtilizationStyle\",\n \"propertyOwnershipType\",\n \"propertyDaskPolicyNumber\",\n \"advertisingSource\",\n \"advertisingCampaign\",\n \"searchScore\",\n // Nested agentBranch fields\n \"agentBranch.id\",\n \"agentBranch.name\",\n \"agentBranch.parentId\",\n \"agentBranch.parentName\",\n // Nested priorityRuleHits fields\n \"priorityRuleHits.label\",\n \"priorityRuleHits.description\",\n \"priorityRuleHits.ruleName\",\n \"priorityRuleHits.score\",\n] as const satisfies readonly CaseFieldKey[];\n\n/**\n * Helper type to pick selected fields from QueryCaseModel.\n */\nexport type PickCaseFields<T extends readonly CaseFieldKey[]> = PickFields<\n QueryCaseModel,\n T\n>;\n\n/**\n * Type-safe connection result based on selected fields\n */\nexport interface SelectedCasesConnection<\n TFields extends CaseFieldKey[],\n> extends Omit<CasesConnection, \"nodes\" | \"edges\"> {\n nodes?: (PickCaseFields<TFields> | null)[] | null;\n edges?:\n | (Omit<CasesEdge, \"node\"> & {\n node?: PickCaseFields<TFields> | null;\n })[]\n | null;\n}\n\n/**\n * Options for getCases query.\n * Extends GetQueryOptions with case-specific types.\n */\nexport interface GetCasesOptions<\n TFields extends CaseFieldKey[] = CaseFieldKey[],\n> extends GetQueryOptions<\n CaseFieldKey,\n QueryCaseModelFilterInput,\n QueryCaseModelSearchInput,\n QueryCaseModelSortInput\n> {\n /** Fields to select from the query. If not provided, all fields are returned. */\n select?: TFields;\n}\n","/**\n * @fileoverview Agent User GraphQL Types\n * @description Types for querying agent users via GraphQL\n */\n\nimport type {\n Connection,\n Edge,\n SortEnumType,\n DeepFieldKeys,\n PickFields,\n ModelFilterInput,\n ModelSearchInput,\n GetQueryOptions,\n} from \"./common.js\";\nimport type { DateTime } from \"../common.date.js\";\nimport type { AgentUserState } from \"../agents.js\";\n\n// === Output Types ===\n\nexport interface AgentUserRoleInfo {\n id: string;\n name: string;\n isAdmin: boolean;\n}\n\nexport interface AgentUserBranchInfo {\n id: string;\n name: string;\n parentId?: string | null;\n parentName?: string | null;\n level: number;\n hierarchy: string;\n}\n\nexport interface QueryAgentUserResult {\n id: string;\n email: string;\n firstName: string;\n lastName: string;\n name: string;\n phoneNumber?: string | null;\n phoneNumberCountryCode?: number | null;\n state: AgentUserState;\n createdAt?: DateTime | null;\n lastLoginAt?: DateTime | null;\n roles?: AgentUserRoleInfo[] | null;\n branches?: AgentUserBranchInfo[] | null;\n}\n\n// === Filter/Search/Sort Inputs (auto-generated from model) ===\n\n/**\n * Filter input for QueryAgentUserResult.\n * Auto-generated from model fields using ModelFilterInput.\n */\nexport type QueryAgentUserResultFilterInput =\n ModelFilterInput<QueryAgentUserResult>;\n\n/**\n * Search input for QueryAgentUserResult.\n * Auto-generated from model fields using ModelSearchInput.\n */\nexport type QueryAgentUserResultSearchInput =\n ModelSearchInput<QueryAgentUserResult>;\n\n/**\n * Sort input for QueryAgentUserResult.\n * Note: Sort fields are explicitly defined as they may differ from model fields.\n */\nexport interface QueryAgentUserResultSortInput {\n email?: SortEnumType | null;\n firstName?: SortEnumType | null;\n lastName?: SortEnumType | null;\n name?: SortEnumType | null;\n state?: SortEnumType | null;\n createdAt?: SortEnumType | null;\n lastLoginAt?: SortEnumType | null;\n}\n\n// === Connection Types ===\n\nexport type AgentUsersEdge = Edge<QueryAgentUserResult>;\nexport type AgentUsersConnection<\n TFields extends readonly AgentUserFieldKey[] = readonly AgentUserFieldKey[],\n> = Connection<PickAgentUserFields<TFields>>;\n\n// === Select Options ===\n\n/**\n * All available field keys for QueryAgentUserResult with nested dot-notation paths.\n */\nexport type AgentUserFieldKey = DeepFieldKeys<QueryAgentUserResult>;\n\n/**\n * Runtime array of all agent user field keys including nested paths.\n */\nexport const ALL_AGENT_USER_FIELDS = [\n // Primitive fields\n \"id\",\n \"email\",\n \"firstName\",\n \"lastName\",\n \"name\",\n \"phoneNumber\",\n \"phoneNumberCountryCode\",\n \"state\",\n \"createdAt\",\n \"lastLoginAt\",\n // Nested roles fields\n \"roles.id\",\n \"roles.name\",\n \"roles.isAdmin\",\n // Nested branches fields\n \"branches.id\",\n \"branches.name\",\n \"branches.parentId\",\n \"branches.parentName\",\n \"branches.level\",\n \"branches.hierarchy\",\n] as const satisfies readonly AgentUserFieldKey[];\n\n/**\n * Helper type to pick selected fields from QueryAgentUserResult.\n */\nexport type PickAgentUserFields<T extends readonly AgentUserFieldKey[]> =\n PickFields<QueryAgentUserResult, T>;\n\n/**\n * Type-safe connection result based on selected fields\n */\nexport interface SelectedAgentUsersConnection<\n TFields extends AgentUserFieldKey[],\n> extends Omit<AgentUsersConnection, \"nodes\" | \"edges\"> {\n nodes?: (PickAgentUserFields<TFields> | null)[] | null;\n edges?:\n | (Omit<AgentUsersEdge, \"node\"> & {\n node?: PickAgentUserFields<TFields> | null;\n })[]\n | null;\n}\n\n/**\n * Options for getAgentUsers query.\n * Extends GetQueryOptions with agent user-specific types.\n */\nexport interface GetAgentUsersOptions<\n TFields extends AgentUserFieldKey[] = AgentUserFieldKey[],\n> extends GetQueryOptions<\n AgentUserFieldKey,\n QueryAgentUserResultFilterInput,\n QueryAgentUserResultSearchInput,\n QueryAgentUserResultSortInput\n> {\n /** Fields to select from the query. If not provided, all fields are returned. */\n select?: TFields;\n}\n","/**\n * @fileoverview Policy Transfer GraphQL Types\n * @description Types for querying policy transfers via GraphQL\n */\n\nimport type {\n Connection,\n Edge,\n SortEnumType,\n DeepFieldKeys,\n PickFields,\n ModelFilterInput,\n ModelSearchInput,\n GetQueryOptions,\n} from \"./common.js\";\nimport type { DateTime } from \"../common.date.js\";\n\n// === Output Types ===\n\nexport interface QueryPolicyTransfersResult {\n id: string;\n startDate?: DateTime | null;\n endDate?: DateTime | null;\n insuranceCompanyCount: number;\n policyTransferTriggerCount: number;\n policyCount: number;\n}\n\n// === Filter/Search/Sort Inputs (auto-generated from model) ===\n\n/**\n * Filter input for QueryPolicyTransfersResult.\n * Auto-generated from model fields using ModelFilterInput.\n */\nexport type QueryPolicyTransfersResultFilterInput =\n ModelFilterInput<QueryPolicyTransfersResult>;\n\n/**\n * Search input for QueryPolicyTransfersResult.\n * Auto-generated from model fields using ModelSearchInput.\n */\nexport type QueryPolicyTransfersResultSearchInput =\n ModelSearchInput<QueryPolicyTransfersResult>;\n\n/**\n * Sort input for QueryPolicyTransfersResult.\n * Note: Sort fields are explicitly defined as they may differ from model fields.\n */\nexport interface QueryPolicyTransfersResultSortInput {\n startDate?: SortEnumType | null;\n endDate?: SortEnumType | null;\n insuranceCompanyCount?: SortEnumType | null;\n policyTransferTriggerCount?: SortEnumType | null;\n policyCount?: SortEnumType | null;\n}\n\n// === Connection Types ===\n\nexport type PolicyTransfersEdge = Edge<QueryPolicyTransfersResult>;\nexport type PolicyTransfersConnection<\n TFields extends readonly PolicyTransferFieldKey[] =\n readonly PolicyTransferFieldKey[],\n> = Connection<PickPolicyTransferFields<TFields>>;\n\n// === Select Options ===\n\n/**\n * All available field keys for QueryPolicyTransfersResult.\n */\nexport type PolicyTransferFieldKey = DeepFieldKeys<QueryPolicyTransfersResult>;\n\n/**\n * Runtime array of all policy transfer field keys.\n */\nexport const ALL_POLICY_TRANSFER_FIELDS = [\n \"id\",\n \"startDate\",\n \"endDate\",\n \"insuranceCompanyCount\",\n \"policyTransferTriggerCount\",\n \"policyCount\",\n] as const satisfies readonly PolicyTransferFieldKey[];\n\n/**\n * Helper type to pick selected fields from QueryPolicyTransfersResult.\n */\nexport type PickPolicyTransferFields<\n T extends readonly PolicyTransferFieldKey[],\n> = PickFields<QueryPolicyTransfersResult, T>;\n\n/**\n * Type-safe connection result based on selected fields\n */\nexport interface SelectedPolicyTransfersConnection<\n TFields extends PolicyTransferFieldKey[],\n> extends Omit<PolicyTransfersConnection, \"nodes\" | \"edges\"> {\n nodes?: (PickPolicyTransferFields<TFields> | null)[] | null;\n edges?:\n | (Omit<PolicyTransfersEdge, \"node\"> & {\n node?: PickPolicyTransferFields<TFields> | null;\n })[]\n | null;\n}\n\n/**\n * Options for getPolicyTransfers query.\n * Extends GetQueryOptions with policy transfer-specific types.\n */\nexport interface GetPolicyTransfersOptions<\n TFields extends PolicyTransferFieldKey[] = PolicyTransferFieldKey[],\n> extends GetQueryOptions<\n PolicyTransferFieldKey,\n QueryPolicyTransfersResultFilterInput,\n QueryPolicyTransfersResultSearchInput,\n QueryPolicyTransfersResultSortInput\n> {\n /** Fields to select from the query. If not provided, all fields are returned. */\n select?: TFields;\n}\n","/**\n * @fileoverview File Policy Transfer GraphQL Types\n * @description Types for querying file policy transfers via GraphQL\n */\n\nimport type {\n Connection,\n Edge,\n SortEnumType,\n DeepFieldKeys,\n PickFields,\n ModelFilterInput,\n ModelSearchInput,\n GetQueryOptions,\n} from \"./common.js\";\nimport type { DateTime } from \"../common.date.js\";\nimport type { UserType } from \"./policies.js\";\n\n// === Output Types ===\n\nexport interface FilePolicyTransferUserReference {\n id: string;\n name: string;\n email?: string | null;\n userType?: UserType | null;\n}\n\nexport interface QueryFilePolicyTransfersResult {\n id: string;\n insuranceCompanyId: number;\n insuranceCompanyName?: string | null;\n insuranceCompanyLogo?: string | null;\n fileName?: string | null;\n fileUrl?: string | null;\n createdAt: DateTime;\n createdBy: FilePolicyTransferUserReference;\n totalPolicyCount?: number | null;\n completedPolicyCount?: number | null;\n failedPolicyCount?: number | null;\n}\n\n// === Filter/Search/Sort Inputs (auto-generated from model) ===\n\n/**\n * Filter input for QueryFilePolicyTransfersResult.\n * Auto-generated from model fields using ModelFilterInput.\n */\nexport type QueryFilePolicyTransfersResultFilterInput =\n ModelFilterInput<QueryFilePolicyTransfersResult>;\n\n/**\n * Search input for QueryFilePolicyTransfersResult.\n * Auto-generated from model fields using ModelSearchInput.\n */\nexport type QueryFilePolicyTransfersResultSearchInput =\n ModelSearchInput<QueryFilePolicyTransfersResult>;\n\n/**\n * Sort input for QueryFilePolicyTransfersResult.\n * Note: Sort fields are explicitly defined as they may differ from model fields.\n */\nexport interface QueryFilePolicyTransfersResultSortInput {\n createdAt?: SortEnumType | null;\n insuranceCompanyId?: SortEnumType | null;\n totalPolicyCount?: SortEnumType | null;\n completedPolicyCount?: SortEnumType | null;\n failedPolicyCount?: SortEnumType | null;\n}\n\n// === Connection Types ===\n\nexport type FilePolicyTransfersEdge = Edge<QueryFilePolicyTransfersResult>;\nexport type FilePolicyTransfersConnection<\n TFields extends readonly FilePolicyTransferFieldKey[] =\n readonly FilePolicyTransferFieldKey[],\n> = Connection<PickFilePolicyTransferFields<TFields>>;\n\n// === Select Options ===\n\n/**\n * All available field keys for QueryFilePolicyTransfersResult with nested dot-notation paths.\n */\nexport type FilePolicyTransferFieldKey =\n DeepFieldKeys<QueryFilePolicyTransfersResult>;\n\n/**\n * Runtime array of all file policy transfer field keys including nested paths.\n */\nexport const ALL_FILE_POLICY_TRANSFER_FIELDS = [\n // Primitive fields\n \"id\",\n \"insuranceCompanyId\",\n \"insuranceCompanyName\",\n \"insuranceCompanyLogo\",\n \"fileName\",\n \"fileUrl\",\n \"createdAt\",\n \"totalPolicyCount\",\n \"completedPolicyCount\",\n \"failedPolicyCount\",\n // Nested createdBy fields\n \"createdBy.id\",\n \"createdBy.name\",\n \"createdBy.email\",\n \"createdBy.userType\",\n] as const satisfies readonly FilePolicyTransferFieldKey[];\n\n/**\n * Helper type to pick selected fields from QueryFilePolicyTransfersResult.\n */\nexport type PickFilePolicyTransferFields<\n T extends readonly FilePolicyTransferFieldKey[],\n> = PickFields<QueryFilePolicyTransfersResult, T>;\n\n/**\n * Type-safe connection result based on selected fields\n */\nexport interface SelectedFilePolicyTransfersConnection<\n TFields extends FilePolicyTransferFieldKey[],\n> extends Omit<FilePolicyTransfersConnection, \"nodes\" | \"edges\"> {\n nodes?: (PickFilePolicyTransferFields<TFields> | null)[] | null;\n edges?:\n | (Omit<FilePolicyTransfersEdge, \"node\"> & {\n node?: PickFilePolicyTransferFields<TFields> | null;\n })[]\n | null;\n}\n\n/**\n * Options for getFilePolicyTransfers query.\n * Extends GetQueryOptions with file policy transfer-specific types.\n */\nexport interface GetFilePolicyTransfersOptions<\n TFields extends FilePolicyTransferFieldKey[] = FilePolicyTransferFieldKey[],\n> extends GetQueryOptions<\n FilePolicyTransferFieldKey,\n QueryFilePolicyTransfersResultFilterInput,\n QueryFilePolicyTransfersResultSearchInput,\n QueryFilePolicyTransfersResultSortInput\n> {\n /** Fields to select from the query. If not provided, all fields are returned. */\n select?: TFields;\n}\n","/**\n * @fileoverview Webhook Delivery GraphQL Types\n * @description Types for querying webhook deliveries via GraphQL\n */\n\nimport type {\n Connection,\n Edge,\n SortEnumType,\n DeepFieldKeys,\n PickFields,\n ModelFilterInput,\n ModelSearchInput,\n GetQueryOptions,\n} from \"./common.js\";\nimport type { DateTime } from \"../common.date.js\";\nimport type { WebhookEvent } from \"../webhooks.js\";\n\n// === Enums ===\n\n/**\n * Webhook Delivery State\n * Represents the current status of a webhook delivery attempt\n */\nexport enum WebhookDeliveryState {\n Pending = \"PENDING\",\n Success = \"SUCCESS\",\n Failed = \"FAILED\",\n}\n\n// === Output Types ===\n\nexport interface QueryWebhookDeliveryResult {\n id: string;\n webhookId: string;\n webhookName?: string | null;\n event: WebhookEvent;\n state: WebhookDeliveryState;\n responseStatusCode?: number | null;\n createdAt: DateTime;\n completedAt?: DateTime | null;\n retryCount: number;\n}\n\n// === Filter/Search/Sort Inputs (auto-generated from model) ===\n\n/**\n * Filter input for QueryWebhookDeliveryResult.\n * Auto-generated from model fields using ModelFilterInput.\n */\nexport type QueryWebhookDeliveryResultFilterInput =\n ModelFilterInput<QueryWebhookDeliveryResult>;\n\n/**\n * Search input for QueryWebhookDeliveryResult.\n * Auto-generated from model fields using ModelSearchInput.\n */\nexport type QueryWebhookDeliveryResultSearchInput =\n ModelSearchInput<QueryWebhookDeliveryResult>;\n\n/**\n * Sort input for QueryWebhookDeliveryResult.\n * Note: Sort fields are explicitly defined as they may differ from model fields.\n */\nexport interface QueryWebhookDeliveryResultSortInput {\n event?: SortEnumType | null;\n state?: SortEnumType | null;\n responseStatusCode?: SortEnumType | null;\n createdAt?: SortEnumType | null;\n completedAt?: SortEnumType | null;\n retryCount?: SortEnumType | null;\n}\n\n// === Connection Types ===\n\nexport type WebhookDeliveriesEdge = Edge<QueryWebhookDeliveryResult>;\nexport type WebhookDeliveriesConnection<\n TFields extends readonly WebhookDeliveryFieldKey[] =\n readonly WebhookDeliveryFieldKey[],\n> = Connection<PickWebhookDeliveryFields<TFields>>;\n\n// === Select Options ===\n\n/**\n * All available field keys for QueryWebhookDeliveryResult.\n */\nexport type WebhookDeliveryFieldKey = DeepFieldKeys<QueryWebhookDeliveryResult>;\n\n/**\n * Runtime array of all webhook delivery field keys.\n */\nexport const ALL_WEBHOOK_DELIVERY_FIELDS = [\n \"id\",\n \"webhookId\",\n \"webhookName\",\n \"event\",\n \"state\",\n \"responseStatusCode\",\n \"createdAt\",\n \"completedAt\",\n \"retryCount\",\n] as const satisfies readonly WebhookDeliveryFieldKey[];\n\n/**\n * Helper type to pick selected fields from QueryWebhookDeliveryResult.\n */\nexport type PickWebhookDeliveryFields<\n T extends readonly WebhookDeliveryFieldKey[],\n> = PickFields<QueryWebhookDeliveryResult, T>;\n\n/**\n * Type-safe connection result based on selected fields\n */\nexport interface SelectedWebhookDeliveriesConnection<\n TFields extends WebhookDeliveryFieldKey[],\n> extends Omit<WebhookDeliveriesConnection, \"nodes\" | \"edges\"> {\n nodes?: (PickWebhookDeliveryFields<TFields> | null)[] | null;\n edges?:\n | (Omit<WebhookDeliveriesEdge, \"node\"> & {\n node?: PickWebhookDeliveryFields<TFields> | null;\n })[]\n | null;\n}\n\n/**\n * Options for getWebhookDeliveries query.\n * Extends GetQueryOptions with webhook delivery-specific types.\n */\nexport interface GetWebhookDeliveriesOptions<\n TFields extends WebhookDeliveryFieldKey[] = WebhookDeliveryFieldKey[],\n> extends GetQueryOptions<\n WebhookDeliveryFieldKey,\n QueryWebhookDeliveryResultFilterInput,\n QueryWebhookDeliveryResultSearchInput,\n QueryWebhookDeliveryResultSortInput\n> {\n /** Fields to select from the query. If not provided, all fields are returned. */\n select?: TFields;\n}\n","import type { HttpTransport } from \"../client/http.js\";\nimport type { GraphQLTransport } from \"../client/graphql.js\";\nimport type { InsurUpResult, InsurUpGraphQLResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport { agentUsers } from \"../core/endpoints.js\";\nimport {\n ALL_AGENT_USER_FIELDS,\n type AgentUserFieldKey,\n type GetAgentUsersOptions,\n type AgentUsersConnection,\n} from \"@insurup/contracts\";\nimport { buildFieldSelection } from \"@insurup/contracts\";\nimport type {\n GetAgentUserResult,\n UpdateMyAgentUserRequest,\n InviteAgentUserRequest,\n AcceptAgentUserInviteRequest,\n UpdateAgentUserRequest,\n UpdateAgentUserPasswordRequest,\n GetMyAgentUserRobotCodeResult,\n MigrateAllAgentUsersResult,\n} from \"@insurup/contracts\";\n\n/**\n * Provides comprehensive user management operations for insurance agency staff, enabling agencies to manage\n * their team members, permissions, and access control within the InsurUp platform ecosystem.\n *\n * Sigorta acente personeli için kapsamlı kullanıcı yönetimi işlemlerini sağlar; acentelerin InsurUp platform\n * ekosistemi içinde ekip üyelerini, izinlerini ve erişim kontrolünü yönetmesine olanak tanır.\n */\nexport class InsurUpAgentUserClient {\n constructor(\n private readonly http: HttpTransport,\n private readonly graphql?: GraphQLTransport,\n ) {}\n\n /**\n * Retrieves the current agent user's profile information including personal details and platform settings.\n *\n * Mevcut acente kullanıcısının kişisel detayları ve platform ayarları dahil profil bilgilerini getirir.\n *\n * @returns Current agent user profile / Mevcut acente kullanıcı profili\n */\n async getMyAgentUser(\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetAgentUserResult>> {\n return this.http.get<GetAgentUserResult>(agentUsers.me, options);\n }\n\n /**\n * Updates the current agent user's profile information such as contact details and preferences.\n *\n * Mevcut acente kullanıcısının iletişim detayları ve tercihleri gibi profil bilgilerini günceller.\n *\n * @param request Profile update request / Profil güncelleme talebi\n * @returns Operation result / İşlem sonucu\n */\n async updateMyAgentUser(\n request: UpdateMyAgentUserRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.putNoContent(agentUsers.updateMyUser, request, options);\n }\n\n /**\n * Sends an invitation to a new user to join the agency team with specified role and permissions.\n *\n * Belirtilen rol ve izinlerle acente takımına katılması için yeni bir kullanıcıya davetiye gönderir.\n *\n * @param request User invitation request with role and contact information / Rol ve iletişim bilgileri ile kullanıcı davet talebi\n * @returns Operation result / İşlem sonucu\n */\n async inviteAgentUser(\n request: InviteAgentUserRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(agentUsers.invite, request, options);\n }\n\n /**\n * Activates an agent user account, granting them access to the platform and enabling their permissions.\n *\n * Bir acente kullanıcı hesabını aktive eder, platform erişimi verir ve izinlerini etkinleştirir.\n *\n * @param agentUserId Unique identifier of the agent user to activate / Aktive edilecek acente kullanıcısının benzersiz tanımlayıcısı\n * @returns Operation result / İşlem sonucu\n */\n async activateAgentUser(\n agentUserId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = agentUsers.activate.render(agentUserId);\n return this.http.postNoContent(endpoint, undefined, options);\n }\n\n /**\n * Deactivates an agent user account, suspending their access while preserving their profile data.\n *\n * Bir acente kullanıcı hesabını deaktive eder, profil verilerini korurken erişimlerini askıya alır.\n *\n * @param agentUserId Unique identifier of the agent user to deactivate / Deaktive edilecek acente kullanıcısının benzersiz tanımlayıcısı\n * @returns Operation result / İşlem sonucu\n */\n async deactivateAgentUser(\n agentUserId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = agentUsers.deactivate.render(agentUserId);\n return this.http.postNoContent(endpoint, undefined, options);\n }\n\n /**\n * Validates an agent user invitation code to ensure it is legitimate and has not expired.\n *\n * Bir acente kullanıcı davet kodunun meşru olduğunu ve süresinin dolmadığını doğrular.\n *\n * @param code Invitation code to validate / Doğrulanacak davet kodu\n * @returns Operation result / İşlem sonucu\n */\n async checkAgentUserInviteCode(\n code: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = agentUsers.checkAgentUserInviteCode.render(code);\n // Note: GET always expects content, but this validation endpoint may return 204\n // If this causes issues, the API should be updated to return a response body\n return this.http.get<void>(endpoint, options) as Promise<InsurUpResult>;\n }\n\n /**\n * Permanently removes an agent user account and all associated data from the agency.\n *\n * Bir acente kullanıcı hesabını ve tüm ilişkili verileri acenteden kalıcı olarak kaldırır.\n *\n * @param agentUserId Unique identifier of the agent user to delete / Silinecek acente kullanıcısının benzersiz tanımlayıcısı\n * @returns Operation result / İşlem sonucu\n */\n async deleteAgentUser(\n agentUserId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = agentUsers.delete.render(agentUserId);\n return this.http.deleteNoContent(endpoint, options);\n }\n\n /**\n * Retrieves detailed information about a specific agent user including their role and current status.\n *\n * Belirli bir acente kullanıcısı hakkında rolü ve mevcut durumu dahil detaylı bilgileri getirir.\n *\n * @param agentUserId Unique identifier of the agent user / Acente kullanıcısının benzersiz tanımlayıcısı\n * @returns Agent user details / Acente kullanıcı detayları\n */\n async getAgentUserById(\n agentUserId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetAgentUserResult>> {\n const endpoint = agentUsers.getById.render(agentUserId);\n return this.http.get<GetAgentUserResult>(endpoint, options);\n }\n\n /**\n * Resends an invitation email to an agent user who may not have received or lost their original invitation.\n *\n * Orijinal davetiyesini almamış veya kaybetmiş olabilecek bir acente kullanıcısına davet e-postasını yeniden gönderir.\n *\n * @param agentUserId Unique identifier of the agent user to resend invitation / Davetiyesi yeniden gönderilecek acente kullanıcısının benzersiz tanımlayıcısı\n * @returns Operation result / İşlem sonucu\n */\n async reSendInviteAgentUser(\n agentUserId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = agentUsers.reSendInvite.render(agentUserId);\n return this.http.postNoContent(endpoint, undefined, options);\n }\n\n /**\n * Accepts an agent user invitation and completes the registration process for the new team member.\n *\n * Bir acente kullanıcı davetiyesini kabul eder ve yeni ekip üyesi için kayıt sürecini tamamlar.\n *\n * @param request Invitation acceptance request with user details / Kullanıcı detayları ile davetiye kabul talebi\n * @returns Operation result / İşlem sonucu\n */\n async acceptAgentUserInvite(\n request: AcceptAgentUserInviteRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(agentUsers.acceptInvite, request, options);\n }\n\n /**\n * Updates an agent user's profile information, role assignments, or access permissions by an administrator.\n *\n * Bir yönetici tarafından acente kullanıcısının profil bilgilerini, rol atamalarını veya erişim izinlerini günceller.\n *\n * @param request User update request with modified information / Değiştirilmiş bilgilerle kullanıcı güncelleme talebi\n * @returns Operation result / İşlem sonucu\n */\n async updateAgentUser(\n request: UpdateAgentUserRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = agentUsers.update.render(request.id);\n return this.http.putNoContent(endpoint, request, options);\n }\n\n /**\n * Updates an agent user's password for enhanced security or when requested by the user.\n *\n * Gelişmiş güvenlik için veya kullanıcı tarafından talep edildiğinde acente kullanıcısının şifresini günceller.\n *\n * @param request Password update request / Şifre güncelleme talebi\n * @returns Operation result / İşlem sonucu\n */\n async updateAgentUserPassword(\n request: UpdateAgentUserPasswordRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.putNoContent(agentUsers.updatePassword, request, options);\n }\n\n /**\n * Retrieves the current agent user's robot/automation code for API integrations and automated operations.\n *\n * API entegrasyonları ve otomatik işlemler için mevcut acente kullanıcısının robot/otomasyon kodunu getirir.\n *\n * @returns Agent user robot code / Acente kullanıcı robot kodu\n */\n async getMyAgentUserRobotCode(\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetMyAgentUserRobotCodeResult>> {\n return this.http.get<GetMyAgentUserRobotCodeResult>(\n agentUsers.meRobotCode,\n options,\n );\n }\n\n /**\n * Migrates an agent user from the legacy authentication system to the AuthServer.\n * Creates an auth user and links it via AuthUserId field. A password reset email will be sent.\n *\n * Acente kullanıcısını eski kimlik doğrulama sisteminden AuthServer'a taşır.\n * Auth kullanıcısı oluşturur ve AuthUserId alanı ile bağlar. Şifre sıfırlama e-postası gönderilir.\n *\n * @param agentUserId Unique identifier of the agent user to migrate / Taşınacak acente kullanıcısının benzersiz tanımlayıcısı\n * @returns Operation result / İşlem sonucu\n */\n async migrateAgentUser(\n agentUserId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = agentUsers.migrate.render(agentUserId);\n return this.http.postNoContent(endpoint, undefined, options);\n }\n\n /**\n * Migrates all agent users in the current tenant that haven't been migrated yet.\n *\n * Henüz taşınmamış mevcut kiracıdaki tüm acente kullanıcılarını taşır.\n *\n * @returns Response with the count of migrated users / Taşınan kullanıcı sayısı ile yanıt\n */\n async migrateAllAgentUsers(\n options?: RequestOptions,\n ): Promise<InsurUpResult<MigrateAllAgentUsersResult>> {\n return this.http.post<MigrateAllAgentUsersResult>(\n agentUsers.migrateAll,\n undefined,\n options,\n );\n }\n\n // ============================================================================\n // GRAPHQL QUERIES\n // ============================================================================\n\n /**\n * Queries agent users using GraphQL with advanced filtering, searching, sorting, and field selection.\n * Supports cursor-based pagination and type-safe field selection.\n *\n * Gelişmiş filtreleme, arama, sıralama ve alan seçimi ile GraphQL kullanarak acente kullanıcılarını sorgular.\n * İmleç tabanlı sayfalama ve tip-güvenli alan seçimini destekler.\n *\n * @example\n * // Basic query with all fields\n * const result = await client.agentUsers.getAgentUsers({ first: 10 });\n *\n * @example\n * // Type-safe field selection\n * const result = await client.agentUsers.getAgentUsers({\n * select: ['id', 'email', 'name', 'state'] as const,\n * first: 10,\n * filter: { state: { eq: AgentUserState.Active } }\n * });\n *\n * @param requestOptions Query options including pagination, filters, search, and field selection\n * @returns Paginated connection of agent users with type-narrowed fields\n */\n async getAgentUsers<const TFields extends AgentUserFieldKey[]>(\n requestOptions?: GetAgentUsersOptions<TFields>,\n options?: RequestOptions,\n ): Promise<InsurUpGraphQLResult<AgentUsersConnection<TFields>>> {\n if (!this.graphql) {\n throw new Error(\n \"GraphQL transport is not available. Ensure the client is properly initialized.\",\n );\n }\n\n const fields = (requestOptions?.select ??\n ALL_AGENT_USER_FIELDS) as AgentUserFieldKey[];\n const fieldSelection = buildFieldSelection(fields);\n\n const query = `\n query GetAgentUsers(\n $first: Int\n $after: String\n $last: Int\n $before: String\n $search: searching_QueryAgentUserResultFilterInput\n $filter: filtering_QueryAgentUserResultFilterInput\n $order: [sorting_QueryAgentUserResultSortInput!]\n ) {\n agentUsersNew(\n first: $first\n after: $after\n last: $last\n before: $before\n search: $search\n filter: $filter\n order: $order\n ) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n totalCount\n edges {\n cursor\n node {\n ${fieldSelection}\n }\n }\n }\n }\n `;\n\n const variables = {\n first: requestOptions?.first,\n after: requestOptions?.after,\n last: requestOptions?.last,\n before: requestOptions?.before,\n search: requestOptions?.search,\n filter: requestOptions?.filter,\n order: requestOptions?.order,\n };\n\n const result = await this.graphql.query<{\n agentUsersNew: Omit<AgentUsersConnection, \"nodes\">;\n }>(query, variables, options);\n\n if (!result.isSuccess) {\n return result as InsurUpGraphQLResult<AgentUsersConnection<TFields>>;\n }\n\n // Derive nodes from edges\n const edges = result.data.agentUsersNew.edges;\n const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;\n\n return {\n ...result,\n data: {\n ...result.data.agentUsersNew,\n nodes,\n },\n } as InsurUpGraphQLResult<AgentUsersConnection<TFields>>;\n }\n}\n","/**\n * Customer management client for the InsurUp TypeScript SDK.\n */\n\nimport type { HttpTransport } from \"../client/http.js\";\nimport type { GraphQLTransport } from \"../client/graphql.js\";\nimport type { InsurUpResult, InsurUpGraphQLResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport { endpoints } from \"../core/endpoints.js\";\nimport type {\n CreateCustomerRequest,\n CreateCustomerResult,\n GetCustomerResult,\n UpdateCustomerRequest,\n AddCustomerEmailRequest,\n RemoveCustomerEmailRequest,\n ChangePrimaryCustomerEmailRequest,\n GetCustomerEmailsResultItem,\n AddCustomerPhoneNumberRequest,\n RemoveCustomerPhoneNumberRequest,\n ChangePrimaryCustomerPhoneNumberRequest,\n GetCustomerPhoneNumbersResultItem,\n SetCustomerRepresentativeRequest,\n GetCustomerHealthInfoResult,\n UpdateCustomerHealthInfoRequest,\n CreateContactFlowRequest,\n CreateCustomerContactRequest,\n EndContactFlowRequest,\n GetCustomerContactFlowsResultItem,\n GetCustomerContactsResultItem,\n ExternalLookupCustomerRequest,\n ExternalLookupCustomerResult,\n SetCustomerBranchRequest,\n CreateCustomerAddressRequest,\n CreateCustomerAddressResult,\n UpdateCustomerAddressRequest,\n GetCustomerAddressResult,\n GiveCustomerConsentRequest,\n RevokeCustomerConsentRequest,\n GetCustomerConsentsResult,\n} from \"@insurup/contracts\";\nimport {\n ALL_CUSTOMER_FIELDS,\n CustomerType,\n type CustomerFieldKey,\n type GetCustomersOptions,\n type CustomersConnection,\n} from \"@insurup/contracts\";\nimport { buildFieldSelection } from \"@insurup/contracts\";\n\n/**\n * Customer management client providing comprehensive customer lifecycle management.\n */\nexport class InsurUpCustomerClient {\n constructor(\n private readonly http: HttpTransport,\n private readonly graphql?: GraphQLTransport,\n ) {}\n\n /**\n * Creates a new customer profile with essential personal and contact information.\n */\n async createCustomer(\n request: CreateCustomerRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<CreateCustomerResult>> {\n // Transform request: type -> $type with lowercase discriminator for API\n const { type, ...rest } = request;\n\n let $type: string;\n switch (type) {\n case CustomerType.Individual:\n $type = \"individual\";\n break;\n case CustomerType.Company:\n $type = \"company\";\n break;\n case CustomerType.Foreign:\n $type = \"foreign\";\n break;\n }\n\n return this.http.post<CreateCustomerResult>(\n endpoints.customers.createCustomer,\n { $type, ...rest },\n options,\n );\n }\n\n /**\n * Retrieves detailed information about a specific customer.\n */\n async getCustomer(\n customerId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCustomerResult>> {\n return this.http.get<GetCustomerResult>(\n endpoints.customers.getCustomer.render(customerId),\n options,\n );\n }\n\n /**\n * Retrieves the profile information of the currently authenticated customer.\n */\n async getCurrentCustomer(\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCustomerResult>> {\n return this.http.get<GetCustomerResult>(\n endpoints.customers.getCurrentCustomer,\n options,\n );\n }\n\n /**\n * Updates existing customer profile information.\n */\n async updateCustomer(\n request: UpdateCustomerRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.putNoContent(\n endpoints.customers.updateCustomer.render(request.id),\n request,\n options,\n );\n }\n\n /**\n * Permanently removes a customer profile and all associated data.\n */\n async deleteCustomer(\n customerId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.deleteNoContent(\n endpoints.customers.deleteCustomer.render(customerId),\n options,\n );\n }\n\n /**\n * Retrieves all email addresses associated with a customer.\n */\n async getCustomerEmails(\n customerId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCustomerEmailsResultItem[]>> {\n return this.http.get<GetCustomerEmailsResultItem[]>(\n endpoints.customers.emails.getCustomerEmails.render(customerId),\n options,\n );\n }\n\n /**\n * Adds a new email address to a customer's contact information.\n */\n async addCustomerEmail(\n request: AddCustomerEmailRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.customers.emails.addCustomerEmail.render(request.customerId),\n request,\n options,\n );\n }\n\n /**\n * Removes an email address from a customer's contact information.\n */\n async removeCustomerEmail(\n request: RemoveCustomerEmailRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.deleteNoContent(\n endpoints.customers.emails.removeCustomerEmail.render(request),\n options,\n );\n }\n\n /**\n * Changes the primary email address for a customer.\n */\n async changePrimaryCustomerEmail(\n request: ChangePrimaryCustomerEmailRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.customers.emails.changePrimaryCustomerEmail.render(request),\n undefined,\n options,\n );\n }\n\n /**\n * Retrieves all phone numbers associated with a customer.\n */\n async getCustomerPhoneNumbers(\n customerId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCustomerPhoneNumbersResultItem[]>> {\n return this.http.get<GetCustomerPhoneNumbersResultItem[]>(\n endpoints.customers.phoneNumbers.getCustomerPhoneNumbers.render(\n customerId,\n ),\n options,\n );\n }\n\n /**\n * Adds a new phone number to a customer's contact information.\n */\n async addCustomerPhoneNumber(\n request: AddCustomerPhoneNumberRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.customers.phoneNumbers.addCustomerPhoneNumber.render(\n request.customerId,\n ),\n request,\n options,\n );\n }\n\n /**\n * Removes a phone number from a customer's contact information.\n */\n async removeCustomerPhoneNumber(\n request: RemoveCustomerPhoneNumberRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.deleteNoContent(\n endpoints.customers.phoneNumbers.removeCustomerPhoneNumber.render(\n request,\n ),\n options,\n );\n }\n\n /**\n * Changes the primary phone number for a customer.\n */\n async changePrimaryCustomerPhoneNumber(\n request: ChangePrimaryCustomerPhoneNumberRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.customers.phoneNumbers.changePrimaryCustomerPhoneNumber.render(\n request,\n ),\n undefined,\n options,\n );\n }\n\n /**\n * Assigns a specific agent representative to manage a customer's account.\n */\n async setCustomerRepresentative(\n request: SetCustomerRepresentativeRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.customers.setCustomerRepresentative.render(request.customerId),\n request,\n options,\n );\n }\n\n /**\n * Assigns or changes the branch for a customer to organize customer segmentation and reporting.\n *\n * Müşteri segmentasyonu ve raporlama için müşterinin şubesini atar veya değiştirir.\n *\n * @param request Branch assignment request / Şube atama talebi\n * @returns Operation result / İşlem sonucu\n */\n async setCustomerBranch(\n request: SetCustomerBranchRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.customers.setCustomerBranch.render(request.customerId),\n request,\n options,\n );\n }\n\n // Address management methods\n\n /**\n * Creates a new customer address record using property number as the single source of truth.\n *\n * Tek doğruluk kaynağı olarak konut numarasını kullanarak yeni müşteri adres kaydı oluşturur.\n *\n * @param request Address creation request / Adres oluşturma talebi\n * @returns Created address information / Oluşturulan adres bilgileri\n */\n async createCustomerAddress(\n request: CreateCustomerAddressRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<CreateCustomerAddressResult>> {\n return this.http.post<CreateCustomerAddressResult>(\n endpoints.customers.addresses.create.render(request.customerId),\n request,\n options,\n );\n }\n\n /**\n * Updates the type classification of an existing customer address.\n *\n * Mevcut bir müşteri adresinin tür sınıflandırmasını günceller.\n *\n * @param request Address update request / Adres güncelleme talebi\n * @returns Operation result / İşlem sonucu\n */\n async updateCustomerAddress(\n request: UpdateCustomerAddressRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.putNoContent(\n endpoints.customers.addresses.update.render(\n request.customerId,\n request.addressId,\n ),\n request,\n options,\n );\n }\n\n /**\n * Retrieves detailed information about a specific customer address.\n *\n * Belirli bir müşteri adresi hakkında detaylı bilgileri getirir.\n *\n * @param customerId Unique identifier of the customer / Müşterinin benzersiz tanımlayıcısı\n * @param addressId Unique identifier of the address / Adresin benzersiz tanımlayıcısı\n * @returns Address details / Adres detayları\n */\n async getCustomerAddressById(\n customerId: string,\n addressId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCustomerAddressResult>> {\n return this.http.get<GetCustomerAddressResult>(\n endpoints.customers.addresses.getById.render(customerId, addressId),\n options,\n );\n }\n\n /**\n * Retrieves all addresses owned by a specific customer for comprehensive address management.\n *\n * Kapsamlı adres yönetimi için belirli bir müşteriye ait tüm adresleri getirir.\n *\n * @param customerId Unique identifier of the customer / Müşterinin benzersiz tanımlayıcısı\n * @returns Customer addresses / Müşteri adresleri\n */\n async getCustomerAddresses(\n customerId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCustomerAddressResult[]>> {\n return this.http.get<GetCustomerAddressResult[]>(\n endpoints.customers.addresses.getAll.render(customerId),\n options,\n );\n }\n\n /**\n * Deletes a customer address from their address collection.\n *\n * Müşterinin adres koleksiyonundan bir adresi siler.\n *\n * @param customerId Unique identifier of the customer / Müşterinin benzersiz tanımlayıcısı\n * @param addressId Unique identifier of the address to delete / Silinecek adresin benzersiz tanımlayıcısı\n * @returns Operation result / İşlem sonucu\n */\n async deleteCustomerAddress(\n customerId: string,\n addressId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.deleteNoContent(\n endpoints.customers.addresses.delete.render(customerId, addressId),\n options,\n );\n }\n\n // Consent management methods\n\n /**\n * Records customer consent for data processing or marketing communications in compliance with KVKK/ETK regulations.\n *\n * KVKK/ETK düzenlemelerine uygun olarak veri işleme veya pazarlama iletişimleri için müşteri iznini kaydeder.\n *\n * @param customerId Unique identifier of the customer / Müşterinin benzersiz tanımlayıcısı\n * @param request Consent recording request / İzin kayıt talebi\n * @returns Operation result / İşlem sonucu\n */\n async giveCustomerConsent(\n customerId: string,\n request: GiveCustomerConsentRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.customers.consents.give.render(customerId),\n request,\n options,\n );\n }\n\n /**\n * Revokes a previously granted customer consent in accordance with customer data rights.\n *\n * Müşteri veri hakları uyarınca önceden verilmiş bir müşteri iznini geri çeker.\n *\n * @param customerId Unique identifier of the customer / Müşterinin benzersiz tanımlayıcısı\n * @param request Consent revocation request / İzin geri çekme talebi\n * @returns Operation result / İşlem sonucu\n */\n async revokeCustomerConsent(\n customerId: string,\n request: RevokeCustomerConsentRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.customers.consents.revoke.render(customerId),\n request,\n options,\n );\n }\n\n /**\n * Retrieves both active consent states and complete consent history for a customer in a single optimized API call.\n *\n * Müşterinin hem aktif izin durumlarını hem de tam izin geçmişini tek bir optimize edilmiş API çağrısında getirir.\n *\n * @param customerId Unique identifier of the customer / Müşterinin benzersiz tanımlayıcısı\n * @returns Active consent states and complete history / Aktif izin durumları ve tam geçmiş\n */\n async getCustomerConsents(\n customerId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCustomerConsentsResult>> {\n return this.http.get<GetCustomerConsentsResult>(\n endpoints.customers.consents.getAll.render(customerId),\n options,\n );\n }\n\n /**\n * Retrieves comprehensive health information for a customer.\n */\n async getCustomerHealthInfo(\n customerId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCustomerHealthInfoResult>> {\n return this.http.get<GetCustomerHealthInfoResult>(\n endpoints.customers.getHealthInfo.render(customerId),\n options,\n );\n }\n\n /**\n * Updates customer health information.\n */\n async updateCustomerHealthInfo(\n request: UpdateCustomerHealthInfoRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.putNoContent(\n endpoints.customers.updateHealthInfo.render(request.customerId),\n request,\n options,\n );\n }\n\n /**\n * Initiates a new customer contact flow.\n */\n async createCustomerContactFlow(\n request: CreateContactFlowRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.customers.contactFlows.createContactFlow.render(\n request.customerId,\n ),\n request,\n options,\n );\n }\n\n /**\n * Records a customer contact interaction.\n */\n async createCustomerContact(\n request: CreateCustomerContactRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.customers.contacts.create.render(request.customerId),\n request,\n options,\n );\n }\n\n /**\n * Completes and closes a customer contact flow.\n */\n async endCustomerContactFlow(\n request: EndContactFlowRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.customers.contactFlows.endContactFlow.render(\n request.customerId,\n request.contactFlowId,\n ),\n request,\n options,\n );\n }\n\n /**\n * Retrieves all contact flows for a customer.\n */\n async getCustomerContactFlows(\n customerId: string,\n caseRef?: string | null,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCustomerContactFlowsResultItem[]>> {\n return this.http.get<GetCustomerContactFlowsResultItem[]>(\n endpoints.customers.contactFlows.getCustomerContactFlows.render(\n customerId,\n caseRef,\n ),\n options,\n );\n }\n\n /**\n * Retrieves all individual contact interactions for a customer.\n */\n async getCustomerContacts(\n customerId: string,\n caseRef?: string | null,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCustomerContactsResultItem[]>> {\n return this.http.get<GetCustomerContactsResultItem[]>(\n endpoints.customers.contacts.getCustomerContacts.render(\n customerId,\n caseRef,\n ),\n options,\n );\n }\n\n /**\n * Performs external customer data lookup.\n */\n async externalLookupCustomer(\n request: ExternalLookupCustomerRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<ExternalLookupCustomerResult>> {\n return this.http.post<ExternalLookupCustomerResult>(\n endpoints.customers.externalLookup,\n request,\n options,\n );\n }\n\n // ============================================\n // GraphQL Methods\n // ============================================\n\n /**\n * Retrieves a paginated list of customers using GraphQL with type-safe field selection.\n *\n * GraphQL kullanarak tip güvenli alan seçimi ile sayfalanmış müşteri listesi getirir.\n *\n * @example\n * // Get all fields\n * const result = await client.customers.getCustomers({ first: 10 });\n *\n * @example\n * // Type-safe field selection\n * const result = await client.customers.getCustomers({\n * select: ['id', 'name', 'type', 'primaryEmail'] as const,\n * first: 10,\n * filter: { type: { eq: CustomerType.INDIVIDUAL } }\n * });\n * // result.data.nodes[0].id - ✓ string\n * // result.data.nodes[0].name - ✓ string | null\n * // result.data.nodes[0].type - ✓ CustomerType\n * // result.data.nodes[0].birthDate - ✗ TypeScript Error!\n *\n * @param requestOptions Query options including pagination, filters, search, and field selection\n * @returns Paginated connection of customers with type-narrowed fields\n */\n async getCustomers<const TFields extends CustomerFieldKey[]>(\n requestOptions?: GetCustomersOptions<TFields>,\n options?: RequestOptions,\n ): Promise<InsurUpGraphQLResult<CustomersConnection<TFields>>> {\n if (!this.graphql) {\n throw new Error(\n \"GraphQL transport is not available. Ensure the client is properly initialized.\",\n );\n }\n\n const fields = (requestOptions?.select ??\n ALL_CUSTOMER_FIELDS) as CustomerFieldKey[];\n const fieldSelection = buildFieldSelection(fields);\n const includeTotalCount = requestOptions?.includeTotalCount !== false;\n\n const query = `\n query GetCustomers(\n $first: Int\n $after: String\n $last: Int\n $before: String\n $search: searching_QueryCustomerModelFilterInput\n $filter: filtering_QueryCustomerModelFilterInput\n $order: [sorting_QueryCustomerModelSortInput!]\n ) {\n customersNew(\n first: $first\n after: $after\n last: $last\n before: $before\n search: $search\n filter: $filter\n order: $order\n ) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n ${includeTotalCount ? \"totalCount\" : \"\"}\n edges {\n cursor\n node {\n ${fieldSelection}\n }\n }\n }\n }\n `;\n\n const variables: Record<string, unknown> = {};\n\n // Default to first: 50 if no pagination params provided\n if (\n requestOptions?.first === undefined &&\n requestOptions?.last === undefined\n ) {\n variables.first = 50;\n } else {\n if (requestOptions?.first !== undefined)\n variables.first = requestOptions.first;\n if (requestOptions?.last !== undefined)\n variables.last = requestOptions.last;\n }\n\n if (requestOptions?.after !== undefined)\n variables.after = requestOptions.after;\n if (requestOptions?.before !== undefined)\n variables.before = requestOptions.before;\n if (requestOptions?.search !== undefined)\n variables.search = requestOptions.search;\n if (requestOptions?.filter !== undefined)\n variables.filter = requestOptions.filter;\n if (requestOptions?.order !== undefined)\n variables.order = requestOptions.order;\n\n const result = await this.graphql.query<{\n customersNew: Omit<CustomersConnection, \"nodes\">;\n }>(query, variables, options);\n\n if (!result.isSuccess) {\n return result as InsurUpGraphQLResult<CustomersConnection<TFields>>;\n }\n\n // Derive nodes from edges\n const edges = result.data.customersNew.edges;\n const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;\n\n // Return the customersNew data with derived nodes\n return {\n ...result,\n data: {\n ...result.data.customersNew,\n nodes,\n },\n } as InsurUpGraphQLResult<CustomersConnection<TFields>>;\n }\n}\n","/**\n * @fileoverview Vehicle Client Implementation\n * @description Provides comprehensive vehicle management operations for handling customer vehicles, vehicle data lookups,\n * brand and model queries, and vehicle-based insurance operations within the automotive insurance ecosystem.\n */\n\nimport type { HttpTransport } from \"../client/http.js\";\nimport type { InsurUpResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport type { InsuranceParameter } from \"@insurup/contracts\";\nimport type {\n CreateCustomerVehicleRequest,\n CreateCustomerVehicleResult,\n UpdateCustomerVehicleRequest,\n GetCustomerVehicleResult,\n GetCustomerVehiclesRequest,\n GetCustomerVehiclesResult,\n ExternalLookupVehicleRequest,\n ExternalLookupVehicleResult,\n QueryVehicleModelTypesRequest,\n QueryVehicleByBrandCodeRequest,\n QueryVehicleByBrandCodeResult,\n} from \"@insurup/contracts\";\nimport { endpoints } from \"../core/endpoints.js\";\n\n/**\n * Vehicle Management Client\n *\n * Specialized client for managing customer vehicles and automotive industry data within the InsurUp platform.\n * Handles vehicle lifecycle management, chassis number validations, external vehicle data lookups, brand and model\n * queries, and vehicle-based insurance operations. Essential for agencies offering vehicle insurance products including\n * Kasko (comprehensive vehicle insurance), TSS (traffic insurance), and IMM (voluntary financial liability) coverage,\n * requiring accurate vehicle identification, validation, and market data integration for proper risk assessment and pricing.\n *\n * InsurUp platformu içinde müşteri araçları ve otomotiv sektörü verilerini yönetmek için özelleşmiş istemci.\n * Araç yaşam döngüsü yönetimi, şasi numarası doğrulamaları, harici araç veri aramaları, marka ve model sorguları ve\n * araç tabanlı sigorta operasyonlarını yönetir. Kasko (kasko araç sigortası), TSS (trafik sigortası) ve İMM (ihtiyari\n * mali mesuliyet) teminatı dahil araç sigortası ürünleri sunan ve uygun risk değerlendirmesi ile fiyatlandırma için\n * doğru araç tanımlaması, doğrulama ve pazar veri entegrasyonu gerektiren acenteler için olmazsa olmazdır.\n */\nexport class InsurUpVehicleClient {\n constructor(private readonly http: HttpTransport) {}\n\n /**\n * Adds a new vehicle to a customer's profile with complete vehicle information including chassis number and specifications.\n *\n * Şasi numarası ve özellikler dahil tam araç bilgileri ile müşterinin profiline yeni araç ekler.\n *\n * @param request Vehicle creation request with vehicle details / Araç detayları ile araç oluşturma talebi\n * @returns Created vehicle information / Oluşturulan araç bilgileri\n */\n async addCustomerVehicle(\n request: CreateCustomerVehicleRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<CreateCustomerVehicleResult>> {\n const path = endpoints.vehicles.create.render(request.customerId);\n return this.http.post<CreateCustomerVehicleResult>(path, request, options);\n }\n\n /**\n * Updates existing customer vehicle information including modifications, ownership changes, or specification updates.\n *\n * Modifikasyonlar, sahiplik değişiklikleri veya özellik güncellemeleri dahil mevcut müşteri araç bilgilerini günceller.\n *\n * @param request Vehicle update request / Araç güncelleme talebi\n * @returns Operation result / İşlem sonucu\n */\n async updateCustomerVehicle(\n request: UpdateCustomerVehicleRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const path = endpoints.vehicles.update.render(\n request.customerId,\n request.vehicleId,\n );\n return this.http.putNoContent(path, request, options);\n }\n\n /**\n * Retrieves detailed information about a specific customer vehicle including its insurance history and current status.\n *\n * Belirli bir müşteri aracı hakkında sigorta geçmişi ve mevcut durumu dahil detaylı bilgileri getirir.\n *\n * @param customerId Unique identifier of the customer / Müşterinin benzersiz tanımlayıcısı\n * @param vehicleId Unique identifier of the vehicle / Aracın benzersiz tanımlayıcısı\n * @returns Vehicle details / Araç detayları\n */\n async getCustomerVehicle(\n customerId: string,\n vehicleId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCustomerVehicleResult>> {\n const path = endpoints.vehicles.get.render(customerId, vehicleId);\n return this.http.get<GetCustomerVehicleResult>(path, options);\n }\n\n /**\n * Retrieves all vehicles owned by a specific customer for comprehensive vehicle portfolio management.\n *\n * Kapsamlı araç portföy yönetimi için belirli bir müşterinin sahip olduğu tüm araçları getirir.\n *\n * @param request Customer vehicles query request / Müşteri araçları sorgu talebi\n * @returns List of customer vehicles / Müşteri araçları listesi\n */\n async getCustomerVehicles(\n request: GetCustomerVehiclesRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCustomerVehiclesResult[]>> {\n const path = endpoints.vehicles.getCustomerVehicles.render(\n request.customerId,\n );\n return this.http.get<GetCustomerVehiclesResult[]>(path, options);\n }\n\n /**\n * Permanently removes a customer vehicle record from the system with proper data cleanup and insurance impact assessment.\n *\n * Uygun veri temizliği ve sigorta etki değerlendirmesi ile müşteri araç kaydını sistemden kalıcı olarak kaldırır.\n *\n * @param customerId Unique identifier of the customer / Müşterinin benzersiz tanımlayıcısı\n * @param vehicleId Unique identifier of the vehicle / Aracın benzersiz tanımlayıcısı\n * @returns Operation result / İşlem sonucu\n */\n async deleteCustomerVehicle(\n customerId: string,\n vehicleId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const path = endpoints.vehicles.delete.render(customerId, vehicleId);\n return this.http.deleteNoContent(path, options);\n }\n\n /**\n * Performs external vehicle data lookup using chassis number or license plate to retrieve official vehicle information.\n *\n * Resmi araç bilgilerini almak için şasi numarası veya plaka kullanarak harici araç veri araması yapar.\n *\n * @param request External vehicle lookup request / Harici araç arama talebi\n * @returns External vehicle data / Harici araç verileri\n */\n async externalLookupVehicle(\n request: ExternalLookupVehicleRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<ExternalLookupVehicleResult>> {\n const path = endpoints.vehicles.externalLookup.render(request.customerId);\n return this.http.post<ExternalLookupVehicleResult>(path, request, options);\n }\n\n /**\n * Retrieves all available vehicle brands for vehicle selection and registration purposes.\n *\n * Araç seçimi ve kayıt amaçları için mevcut tüm araç markalarını getirir.\n *\n * @returns List of vehicle brands / Araç markaları listesi\n */\n async queryVehicleBrands(\n options?: RequestOptions,\n ): Promise<InsurUpResult<InsuranceParameter[]>> {\n const path = endpoints.vehicleParameters.queryBrands;\n return this.http.get<InsuranceParameter[]>(path, options);\n }\n\n /**\n * Retrieves all vehicle models for a specific brand including different model years and specifications.\n *\n * Farklı model yılları ve özellikler dahil belirli bir marka için tüm araç modellerini getirir.\n *\n * @param request Vehicle model query request / Araç modeli sorgu talebi\n * @returns List of vehicle models / Araç modelleri listesi\n */\n async queryVehicleModels(\n request: QueryVehicleModelTypesRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<InsuranceParameter[]>> {\n const path = endpoints.vehicleParameters.queryModels.render(request);\n return this.http.get<InsuranceParameter[]>(path, options);\n }\n\n /**\n * Queries vehicle information using a specific brand code to retrieve detailed brand and model specifications.\n *\n * Detaylı marka ve model özelliklerini almak için belirli bir marka kodu kullanarak araç bilgilerini sorgular.\n *\n * @param brandCode Vehicle brand code for query / Sorgu için araç marka kodu\n * @returns Vehicle brand information / Araç marka bilgileri\n */\n async queryVehicleByBrandCode(\n brandCode: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<QueryVehicleByBrandCodeResult>> {\n const path = endpoints.insuranceServices.queryVehicleByBrandCode;\n const request: QueryVehicleByBrandCodeRequest = { brandCode };\n return this.http.post<QueryVehicleByBrandCodeResult>(\n path,\n request,\n options,\n );\n }\n}\n","/**\n * Property Management Client\n *\n * Provides comprehensive property management operations for handling customer properties, Turkish address hierarchy queries,\n * DASK earthquake insurance lookups, and property-based insurance operations within the real estate insurance ecosystem.\n *\n * Gayrimenkul sigorta ekosistemi içinde müşteri mülklerini yönetme, Türk adres hiyerarşisi sorguları, DASK deprem\n * sigortası aramaları ve mülk tabanlı sigorta operasyonları için kapsamlı mülk yönetimi işlemlerini sağlar.\n */\n\nimport type { HttpTransport } from \"../client/http.js\";\nimport type { InsurUpResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport type { InsuranceParameter } from \"@insurup/contracts\";\nimport type {\n // Address parameter requests\n QueryDistrictsRequest,\n QueryTownsRequest,\n QueryNeighbourhoodsRequest,\n QueryStreetsRequest,\n QueryBuildingsRequest,\n QueryApartmentsRequest,\n\n // Property management requests\n CreateCustomerPropertyRequest,\n UpdateCustomerPropertyRequest,\n GetPropertyAddressByPropertyNumberRequest,\n\n // Property management responses\n CreateCustomerPropertyResult,\n GetCustomerPropertyByIdResult,\n GetAllCustomerPropertiesResult,\n QueryPropertyByDaskOldPolicyResult,\n} from \"@insurup/contracts\";\nimport type { PropertyAddress } from \"@insurup/contracts\";\nimport { addressParameters, properties } from \"../core/endpoints.js\";\n\n/**\n * Property Management Client\n *\n * Specialized client for managing customer properties and Turkish address system integration within the InsurUp platform.\n * Handles the complete Turkish administrative address hierarchy (City→District→Town→Neighborhood→Street→Building→Apartment),\n * customer property lifecycle management, DASK earthquake insurance policy lookups, and property-based insurance operations.\n * Essential for agencies offering property insurance products including home insurance (Konut), earthquake insurance (DASK),\n * and commercial property coverage, requiring precise address validation and property identification within Turkey's\n * administrative structure.\n *\n * InsurUp platformu içinde müşteri mülkleri ve Türk adres sistemi entegrasyonunu yönetmek için özelleşmiş istemci.\n * Tam Türk idari adres hiyerarşisini (Şehir→İlçe→Kasaba→Mahalle→Sokak→Bina→Daire), müşteri mülk yaşam döngüsü yönetimini,\n * DASK deprem sigortası poliçe aramalarını ve mülk tabanlı sigorta operasyonlarını yönetir. Ev sigortası (Konut), deprem\n * sigortası (DASK) ve ticari mülk teminatı dahil mülk sigortası ürünleri sunan ve Türkiye'nin idari yapısı içinde hassas\n * adres doğrulaması ve mülk tanımlaması gerektiren acenteler için olmazsa olmazdır.\n */\nexport class InsurUpPropertyClient {\n constructor(private readonly http: HttpTransport) {}\n\n // ===== LOCATION/ADDRESS QUERY METHODS =====\n\n /**\n * Retrieves all cities (provinces) in Turkey for address selection and property location identification.\n *\n * Adres seçimi ve mülk konum tanımlaması için Türkiye'deki tüm şehirleri (illeri) getirir.\n *\n * @returns List of Turkish cities / Türk şehirleri listesi\n */\n async queryCities(\n options?: RequestOptions,\n ): Promise<InsurUpResult<InsuranceParameter[]>> {\n return this.http.get<InsuranceParameter[]>(\n addressParameters.queryCities,\n options,\n );\n }\n\n /**\n * Retrieves all districts within a specific city following the Turkish administrative hierarchy.\n *\n * Türk idari hiyerarşisini takip ederek belirli bir şehir içindeki tüm ilçeleri getirir.\n *\n * @param request District query request with city selection / Şehir seçimi ile ilçe sorgu talebi\n * @returns List of districts in the selected city / Seçilen şehirdeki ilçeler listesi\n */\n async queryDistricts(\n request: QueryDistrictsRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<InsuranceParameter[]>> {\n return this.http.get<InsuranceParameter[]>(\n addressParameters.queryDistricts.render(request),\n options,\n );\n }\n\n /**\n * Retrieves all towns within a specific district for precise administrative location identification.\n *\n * Hassas idari konum tanımlaması için belirli bir ilçe içindeki tüm kasabaları getirir.\n *\n * @param request Town query request with district selection / İlçe seçimi ile kasaba sorgu talebi\n * @returns List of towns in the selected district / Seçilen ilçedeki kasabalar listesi\n */\n async queryTowns(\n request: QueryTownsRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<InsuranceParameter[]>> {\n return this.http.get<InsuranceParameter[]>(\n addressParameters.queryTowns.render(request),\n options,\n );\n }\n\n /**\n * Retrieves all neighborhoods within a specific administrative area for detailed address specification.\n *\n * Detaylı adres belirtimi için belirli bir idari alan içindeki tüm mahalleleri getirir.\n *\n * @param request Neighborhood query request / Mahalle sorgu talebi\n * @returns List of neighborhoods / Mahalleler listesi\n */\n async queryNeighborhoods(\n request: QueryNeighbourhoodsRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<InsuranceParameter[]>> {\n return this.http.get<InsuranceParameter[]>(\n addressParameters.queryNeighbourhoods.render(request),\n options,\n );\n }\n\n /**\n * Retrieves all streets within a specific neighborhood for complete address formation.\n *\n * Tam adres oluşturma için belirli bir mahalle içindeki tüm sokakları getirir.\n *\n * @param request Street query request / Sokak sorgu talebi\n * @returns List of streets / Sokaklar listesi\n */\n async queryStreets(\n request: QueryStreetsRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<InsuranceParameter[]>> {\n return this.http.get<InsuranceParameter[]>(\n addressParameters.queryStreets.render(request),\n options,\n );\n }\n\n /**\n * Retrieves all buildings on a specific street for precise property identification and addressing.\n *\n * Hassas mülk tanımlaması ve adresleme için belirli bir sokaktaki tüm binaları getirir.\n *\n * @param request Building query request / Bina sorgu talebi\n * @returns List of buildings / Binalar listesi\n */\n async queryBuildings(\n request: QueryBuildingsRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<InsuranceParameter[]>> {\n return this.http.get<InsuranceParameter[]>(\n addressParameters.queryBuildings.render(request),\n options,\n );\n }\n\n /**\n * Retrieves all apartments within a specific building for individual property unit identification.\n *\n * Bireysel mülk birimi tanımlaması için belirli bir bina içindeki tüm daireleri getirir.\n *\n * @param request Apartment query request / Daire sorgu talebi\n * @returns List of apartments / Daireler listesi\n */\n async queryApartments(\n request: QueryApartmentsRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<InsuranceParameter[]>> {\n return this.http.get<InsuranceParameter[]>(\n addressParameters.queryApartments.render(request),\n options,\n );\n }\n\n // ===== PROPERTY MANAGEMENT METHODS =====\n\n /**\n * Creates a new customer property record with complete address information and property characteristics for insurance purposes.\n *\n * Sigorta amaçları için tam adres bilgileri ve mülk özellikleri ile yeni müşteri mülk kaydı oluşturur.\n *\n * @param request Property creation request with details / Detaylar ile mülk oluşturma talebi\n * @returns Created property information / Oluşturulan mülk bilgileri\n */\n async createCustomerProperty(\n request: CreateCustomerPropertyRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<CreateCustomerPropertyResult>> {\n return this.http.post<CreateCustomerPropertyResult>(\n properties.create.render(request.customerId),\n request,\n options,\n );\n }\n\n /**\n * Updates existing customer property information including address changes, structural modifications, or usage updates.\n *\n * Adres değişiklikleri, yapısal değişiklikler veya kullanım güncellemeleri dahil mevcut müşteri mülk bilgilerini günceller.\n *\n * @param request Property update request / Mülk güncelleme talebi\n * @returns Operation result / İşlem sonucu\n */\n async updateCustomerProperty(\n request: UpdateCustomerPropertyRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.putNoContent(\n properties.update.render(request.customerId, request.propertyId),\n request,\n options,\n );\n }\n\n /**\n * Retrieves detailed information about a specific customer property including its insurance history and characteristics.\n *\n * Belirli bir müşteri mülkü hakkında sigorta geçmişi ve özellikleri dahil detaylı bilgileri getirir.\n *\n * @param customerId Unique identifier of the customer / Müşterinin benzersiz tanımlayıcısı\n * @param propertyId Unique identifier of the property / Mülkün benzersiz tanımlayıcısı\n * @returns Property details / Mülk detayları\n */\n async getCustomerPropertyById(\n customerId: string,\n propertyId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCustomerPropertyByIdResult>> {\n return this.http.get<GetCustomerPropertyByIdResult>(\n properties.getById.render(customerId, propertyId),\n options,\n );\n }\n\n /**\n * Retrieves all properties owned by a specific customer for comprehensive property portfolio management.\n *\n * Kapsamlı mülk portföy yönetimi için belirli bir müşterinin sahip olduğu tüm mülkleri getirir.\n *\n * @param customerId Unique identifier of the customer / Müşterinin benzersiz tanımlayıcısı\n * @returns List of customer properties / Müşteri mülkleri listesi\n */\n async getCustomerProperties(\n customerId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetAllCustomerPropertiesResult[]>> {\n return this.http.get<GetAllCustomerPropertiesResult[]>(\n properties.getAll.render(customerId),\n options,\n );\n }\n\n /**\n * Permanently removes a customer property record from the system with proper data cleanup and insurance impact assessment.\n *\n * Uygun veri temizliği ve sigorta etki değerlendirmesi ile müşteri mülk kaydını sistemden kalıcı olarak kaldırır.\n *\n * @param customerId Unique identifier of the customer / Müşterinin benzersiz tanımlayıcısı\n * @param propertyId Unique identifier of the property / Mülkün benzersiz tanımlayıcısı\n * @returns Operation result / İşlem sonucu\n */\n async deleteCustomerProperty(\n customerId: string,\n propertyId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.deleteNoContent(\n properties.delete.render(customerId, propertyId),\n options,\n );\n }\n\n /**\n * Retrieves property address information using the official Turkish property registration number for verification purposes.\n *\n * Doğrulama amaçları için resmi Türk mülk kayıt numarasını kullanarak mülk adres bilgilerini getirir.\n *\n * @param propertyNumber Official Turkish property registration number / Resmi Türk mülk kayıt numarası\n * @returns Property address information / Mülk adres bilgileri\n */\n async getPropertyAddressByPropertyNumber(\n propertyNumber: number,\n options?: RequestOptions,\n ): Promise<InsurUpResult<PropertyAddress>> {\n return this.http.post<PropertyAddress>(\n properties.getPropertyAddressByPropertyNumber,\n {\n propertyNumber,\n } satisfies GetPropertyAddressByPropertyNumberRequest,\n options,\n );\n }\n\n /**\n * Queries property information using an existing DASK earthquake insurance policy number for cross-reference and continuity.\n *\n * Çapraz referans ve süreklilik için mevcut DASK deprem sigortası poliçe numarasını kullanarak mülk bilgilerini sorgular.\n *\n * @param daskPolicyNumber DASK earthquake insurance policy number / DASK deprem sigortası poliçe numarası\n * @returns Property information from DASK records / DASK kayıtlarından mülk bilgileri\n */\n async queryPropertyByDaskOldPolicy(\n daskPolicyNumber: number,\n options?: RequestOptions,\n ): Promise<InsurUpResult<QueryPropertyByDaskOldPolicyResult>> {\n return this.http.post<QueryPropertyByDaskOldPolicyResult>(\n properties.queryPropertyByDaskOldPolicy,\n { daskPolicyNumber },\n options,\n );\n }\n}\n","/**\n * @fileoverview Policy Management Client - Comprehensive policy operations\n * @description Provides comprehensive policy management operations for handling active insurance policies,\n * document generation, customer communications, representative assignments, and policy transfer processes\n */\n\nimport type { HttpTransport } from \"../client/http.js\";\nimport type { GraphQLTransport } from \"../client/graphql.js\";\nimport type { InsurUpResult, InsurUpGraphQLResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport type {\n GetPolicyDetailRequest,\n GetPolicyDetailResult,\n FetchPolicyDocumentRequest,\n FetchPolicyDocumentResult,\n SendPolicyDocumentRequest,\n SetPolicyRepresentativeRequest,\n SetPolicyBranchRequest,\n CreateManualPolicyRequest,\n CreateManualPolicyResult,\n UpdateManualPolicyRequest,\n GetPolicyCountAndPremiumAnalyticsRequest,\n GetPolicyCountAndPremiumAnalyticsResult,\n GetPolicyRenewalAnalyticsRequest,\n GetPolicyRenewalAnalyticsResult,\n GetPolicyDistributionByBranchRequest,\n GetPolicyDistributionByBranchResult,\n GetRepresentativeEarningsAnalyticsRequest,\n GetRepresentativeEarningsAnalyticsResult,\n} from \"@insurup/contracts\";\nimport type {\n GetPolicyTransferDetailRequest,\n GetPolicyTransferDetailResult,\n GetPolicyTransferTriggerDetailRequest,\n GetPolicyTransferTriggerDetailResult,\n CreatePolicyTransferRequest,\n TriggerPolicyTransferRequest,\n CreateFilePolicyTransferRequest,\n GetFilePolicyTransferDetailRequest,\n GetFilePolicyTransferDetailResult,\n} from \"@insurup/contracts\";\nimport { endpoints } from \"../core/endpoints.js\";\nimport {\n ALL_POLICY_FIELDS,\n type PolicyFieldKey,\n type GetPoliciesOptions,\n type PoliciesConnection,\n} from \"@insurup/contracts\";\nimport {\n ALL_POLICY_TRANSFER_FIELDS,\n type PolicyTransferFieldKey,\n type GetPolicyTransfersOptions,\n type PolicyTransfersConnection,\n} from \"@insurup/contracts\";\nimport {\n ALL_FILE_POLICY_TRANSFER_FIELDS,\n type FilePolicyTransferFieldKey,\n type GetFilePolicyTransfersOptions,\n type FilePolicyTransfersConnection,\n} from \"@insurup/contracts\";\nimport { buildFieldSelection } from \"@insurup/contracts\";\n\n/**\n * Policy Management Client / Poliçe Yönetimi İstemcisi\n *\n * Central client for managing active insurance policies throughout their lifecycle from issuance to expiration.\n * Handles policy documentation, customer communication, representative management, and complex policy transfer operations\n * including bulk transfers and file-based transfers. Essential for agencies that need to maintain comprehensive policy\n * administration, ensure proper documentation delivery to customers, manage policy ownership changes, and coordinate\n * policy transfers between different systems or agents while maintaining audit trails and regulatory compliance.\n *\n * Düzenlenmesinden sona ermesine kadar aktif sigorta poliçelerini yaşam döngüleri boyunca yönetmek için merkezi istemci.\n * Poliçe dokümantasyonu, müşteri iletişimi, temsilci yönetimi ve toplu transferler ile dosya tabanlı transferler dahil\n * karmaşık poliçe transfer operasyonlarını yönetir. Kapsamlı poliçe yönetimi sürdürmesi, müşterilere uygun dokümantasyon\n * teslimatını sağlaması, poliçe sahiplik değişikliklerini yönetmesi ve denetim izleri ile düzenleyici uyumu korurken\n * farklı sistemler veya acenteler arasında poliçe transferlerini koordine etmesi gereken acenteler için olmazsa olmazdır.\n */\nexport class InsurUpPolicyClient {\n constructor(\n private readonly http: HttpTransport,\n private readonly graphql?: GraphQLTransport,\n ) {}\n\n /**\n * Retrieves comprehensive details of a specific policy including coverage information, premium details, and current status.\n *\n * Teminat bilgileri, prim detayları ve mevcut durum dahil belirli bir poliçenin kapsamlı detaylarını getirir.\n *\n * @param request - Policy detail request with policy ID\n * @returns Detailed policy information\n */\n async getPolicyDetail(\n request: GetPolicyDetailRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetPolicyDetailResult>> {\n return this.http.get<GetPolicyDetailResult>(\n endpoints.policies.getPolicyDetail.render(request.policyId),\n options,\n );\n }\n\n /**\n * Fetches the official policy document from the insurance company's systems for customer delivery or records.\n *\n * Müşteri teslimatı veya kayıtlar için sigorta şirketinin sistemlerinden resmi poliçe belgesini getirir.\n *\n * @param request - Policy document fetch request with policy ID\n * @returns Policy document data\n */\n async fetchPolicyDocument(\n request: FetchPolicyDocumentRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<FetchPolicyDocumentResult>> {\n return this.http.get<FetchPolicyDocumentResult>(\n endpoints.policies.fetchPolicyDocument.render(request.policyId),\n options,\n );\n }\n\n /**\n * Sends the policy document directly to the customer via email or other communication channels for their records.\n *\n * Poliçe belgesini müşterinin kayıtları için e-posta veya diğer iletişim kanalları aracılığıyla doğrudan müşteriye gönderir.\n *\n * @param request - Document delivery request\n * @returns Operation result\n */\n async sendPolicyDocumentToCustomer(\n request: SendPolicyDocumentRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.policies.sendPolicyDocument.render(request.policyId),\n request,\n options,\n );\n }\n\n /**\n * Assigns or updates the representative responsible for managing a specific policy and customer relationship.\n *\n * Belirli bir poliçeyi ve müşteri ilişkisini yönetmekten sorumlu temsilciyi atar veya günceller.\n *\n * @param request - Representative assignment request\n * @returns Operation result\n */\n async setPolicyRepresentative(\n request: SetPolicyRepresentativeRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.policies.setPolicyRepresentative.render(request.policyId),\n request,\n options,\n );\n }\n\n /**\n * Assigns or changes the branch for a policy to organize policy segmentation and reporting.\n *\n * Poliçe segmentasyonu ve raporlama için poliçenin şubesini atar veya değiştirir.\n *\n * @param request Branch assignment request / Şube atama talebi\n * @returns Operation result / İşlem sonucu\n */\n async setPolicyBranch(\n request: SetPolicyBranchRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.policies.setPolicyBranch.render(request.policyId),\n request,\n options,\n );\n }\n\n /**\n * Creates a new manual policy through the agent panel without insurance services integration.\n *\n * Sigorta hizmetleri entegrasyonu olmadan acente paneli üzerinden yeni manuel poliçe oluşturur.\n *\n * @param request Manual policy creation request / Manuel poliçe oluşturma talebi\n * @returns Created policy identifier / Oluşturulan poliçe tanımlayıcısı\n */\n async createManualPolicy(\n request: CreateManualPolicyRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<CreateManualPolicyResult>> {\n return this.http.post<CreateManualPolicyResult>(\n endpoints.policies.createManualPolicy.definition,\n request,\n options,\n );\n }\n\n /**\n * Updates an existing manual policy through the agent panel and creates a new policy version for tracking changes.\n *\n * Acente paneli üzerinden mevcut manuel poliçeyi günceller ve değişiklikleri takip etmek için yeni poliçe versiyonu oluşturur.\n *\n * @param request Manual policy update request / Manuel poliçe güncelleme talebi\n * @returns Operation result / İşlem sonucu\n */\n async updateManualPolicy(\n request: UpdateManualPolicyRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.putNoContent(\n endpoints.policies.updateManualPolicy.render(request.policyId),\n request,\n options,\n );\n }\n\n /**\n * Retrieves comprehensive policy count and gross premium analytics with flexible filtering and grouping options.\n * Provides time series data, summary KPIs, and optional grouping by product branch or insurance company.\n *\n * Esnek filtreleme ve gruplama seçenekleri ile kapsamlı poliçe adedi ve brüt prim analitiği getirir.\n * Zaman serisi verileri, özet KPI'lar ve isteğe bağlı ürün branşı veya sigorta şirketine göre gruplama sağlar.\n *\n * @param request Analytics request with filters and grouping options / Filtreler ve gruplama seçenekleri ile analitik talebi\n * @returns Comprehensive analytics data including KPIs, time series, and grouped data / KPI'lar, zaman serisi ve gruplanmış veriler dahil kapsamlı analitik verileri\n */\n async getPolicyCountAndPremiumAnalytics(\n request: GetPolicyCountAndPremiumAnalyticsRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetPolicyCountAndPremiumAnalyticsResult>> {\n return this.http.post<GetPolicyCountAndPremiumAnalyticsResult>(\n endpoints.policies.getPolicyCountAndPremiumAnalytics.definition,\n request,\n options,\n );\n }\n\n /**\n * Retrieves stacked daily renewal analytics for policies with RenewalNumber greater than zero.\n * Provides branch segmented counts together with total and peak KPIs.\n *\n * RenewalNumber değeri sıfırdan büyük olan poliçeler için günlük yenileme analitiği sağlar.\n * Branş bazlı yığılmış adetler ile toplam ve pik KPI değerlerini döner.\n *\n * @param request Renewal analytics request with filtering options / Filtre seçenekleri ile yenileme analitiği isteği\n * @returns Renewal analytics response / Yenileme analitiği yanıtı\n */\n async getPolicyRenewalAnalytics(\n request: GetPolicyRenewalAnalyticsRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetPolicyRenewalAnalyticsResult>> {\n return this.http.post<GetPolicyRenewalAnalyticsResult>(\n endpoints.policies.getPolicyRenewalAnalytics.definition,\n request,\n options,\n );\n }\n\n /**\n * Retrieves policy distribution by branch analytics data.\n * Provides aggregated counts, gross premiums, and percentage shares grouped by product branch.\n *\n * Branş bazında poliçe dağılımı analitik verilerini getirir.\n * Ürün branşına göre gruplanmış toplam adetler, brüt primler ve yüzde payları sağlar.\n *\n * @param request Distribution analytics request with filtering options / Filtre seçenekleri ile dağılım analitiği isteği\n * @returns Distribution analytics response / Dağılım analitiği yanıtı\n */\n async getPolicyDistributionByBranch(\n request: GetPolicyDistributionByBranchRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetPolicyDistributionByBranchResult>> {\n return this.http.post<GetPolicyDistributionByBranchResult>(\n endpoints.policies.getPolicyDistributionByBranch.definition,\n request,\n options,\n );\n }\n\n /**\n * Retrieves representative earnings analytics data.\n * Provides earnings breakdown grouped by representative for performance tracking.\n *\n * Temsilci kazanç analitik verilerini getirir.\n * Performans takibi için temsilciye göre gruplanmış kazanç dökümü sağlar.\n *\n * @param request Representative earnings analytics request with filtering options / Filtre seçenekleri ile temsilci kazanç analitiği isteği\n * @returns Representative earnings analytics response / Temsilci kazanç analitiği yanıtı\n */\n async getRepresentativeEarningsAnalytics(\n request: GetRepresentativeEarningsAnalyticsRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetRepresentativeEarningsAnalyticsResult>> {\n return this.http.post<GetRepresentativeEarningsAnalyticsResult>(\n endpoints.policies.getRepresentativeEarningsAnalytics.definition,\n request,\n options,\n );\n }\n\n /**\n * Retrieves detailed information about a specific policy transfer process including status and progress tracking.\n *\n * Durum ve ilerleme takibi dahil belirli bir poliçe transfer süreciyle ilgili detaylı bilgileri getirir.\n *\n * @param request - Policy transfer detail request\n * @returns Policy transfer details\n */\n async getPolicyTransferDetail(\n request: GetPolicyTransferDetailRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetPolicyTransferDetailResult>> {\n return this.http.get<GetPolicyTransferDetailResult>(\n endpoints.policyTransfers.getPolicyTransferDetail.render(\n request.policyTransferId,\n ),\n options,\n );\n }\n\n /**\n * Retrieves specific trigger details for a policy transfer process to understand execution conditions and timing.\n *\n * Yürütme koşulları ve zamanlamasını anlamak için poliçe transfer sürecinin belirli tetikleyici detaylarını getirir.\n *\n * @param request - Policy transfer trigger detail request\n * @returns Transfer trigger details\n */\n async getPolicyTransferTriggerDetail(\n request: GetPolicyTransferTriggerDetailRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetPolicyTransferTriggerDetailResult>> {\n return this.http.get<GetPolicyTransferTriggerDetailResult>(\n endpoints.policyTransfers.getPolicyTransferTriggerDetail.render(\n request.policyTransferId,\n request.policyTransferTriggerId,\n ),\n options,\n );\n }\n\n /**\n * Creates a new policy transfer request to move policies between agents, agencies, or systems with proper validation.\n *\n * Uygun doğrulama ile poliçeleri acenteler, acenteler veya sistemler arasında taşımak için yeni poliçe transfer talebi oluşturur.\n *\n * @param request - Policy transfer creation request\n * @returns Created transfer identifier\n */\n async createPolicyTransfer(\n request: CreatePolicyTransferRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<string>> {\n return this.http.post<string>(\n endpoints.policyTransfers.create,\n request,\n options,\n );\n }\n\n /**\n * Executes a prepared policy transfer, initiating the actual movement of policies according to the transfer configuration.\n *\n * Hazırlanmış poliçe transferini yürütür ve transfer yapılandırmasına göre poliçelerin gerçek hareketini başlatır.\n *\n * @param request - Policy transfer trigger request\n * @returns Operation result\n */\n async triggerPolicyTransfer(\n request: TriggerPolicyTransferRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.policyTransfers.triggerPolicyTransfer.render(\n request.policyTransferId,\n ),\n request,\n options,\n );\n }\n\n /**\n * Creates a file-based policy transfer by uploading a file containing policy information for bulk transfer operations.\n *\n * Toplu transfer işlemleri için poliçe bilgilerini içeren dosya yükleyerek dosya tabanlı poliçe transferi oluşturur.\n *\n * @param request - File-based transfer request\n * @param file - File containing policy data\n * @param fileName - Name of the uploaded file\n * @returns Operation result\n */\n async createFilePolicyTransfer(\n request: CreateFilePolicyTransferRequest,\n file: File,\n fileName: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n // Create FormData for multipart file upload\n const formData = new FormData();\n formData.append(\n \"insuranceCompanyId\",\n request.insuranceCompanyId.toString(),\n );\n formData.append(\"file\", file, fileName);\n\n return this.http.postNoContent(\n endpoints.filePolicyTransfers.create,\n formData,\n options,\n );\n }\n\n /**\n * Retrieves detailed information about a file-based policy transfer including processing status and results.\n *\n * İşleme durumu ve sonuçları dahil dosya tabanlı poliçe transferi hakkında detaylı bilgileri getirir.\n *\n * @param request - File policy transfer detail request\n * @returns File transfer details\n */\n async getFilePolicyTransferDetail(\n request: GetFilePolicyTransferDetailRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetFilePolicyTransferDetailResult>> {\n return this.http.get<GetFilePolicyTransferDetailResult>(\n endpoints.filePolicyTransfers.getFilePolicyTransferDetail.render(\n request.filePolicyTransferId,\n ),\n options,\n );\n }\n\n // ============================================================================\n // GRAPHQL QUERIES\n // ============================================================================\n\n /**\n * Queries policies using GraphQL with advanced filtering, searching, sorting, and field selection.\n * Supports cursor-based pagination and type-safe field selection.\n *\n * Gelişmiş filtreleme, arama, sıralama ve alan seçimi ile GraphQL kullanarak poliçeleri sorgular.\n * İmleç tabanlı sayfalama ve tip-güvenli alan seçimini destekler.\n *\n * @example\n * // Basic query with all fields\n * const result = await client.policies.getPolicies({ first: 10 });\n *\n * @example\n * // Type-safe field selection\n * const result = await client.policies.getPolicies({\n * select: ['id', 'productBranch', 'grossPremium', 'state'] as const,\n * first: 10,\n * filter: { state: { eq: PolicyState.Active } }\n * });\n *\n * @param requestOptions Query options including pagination, filters, search, and field selection\n * @returns Paginated connection of policies with type-narrowed fields\n */\n async getPolicies<const TFields extends PolicyFieldKey[]>(\n requestOptions?: GetPoliciesOptions<TFields>,\n options?: RequestOptions,\n ): Promise<InsurUpGraphQLResult<PoliciesConnection<TFields>>> {\n if (!this.graphql) {\n throw new Error(\n \"GraphQL transport is not available. Ensure the client is properly initialized.\",\n );\n }\n\n const fields = (requestOptions?.select ??\n ALL_POLICY_FIELDS) as PolicyFieldKey[];\n const fieldSelection = buildFieldSelection(fields);\n const includeTotalCount = requestOptions?.includeTotalCount !== false;\n\n const query = `\n query GetPolicies(\n $first: Int\n $after: String\n $last: Int\n $before: String\n $search: searching_QueryPoliciesResultFilterInput\n $filter: filtering_QueryPoliciesResultFilterInput\n $order: [sorting_QueryPoliciesResultSortInput!]\n ) {\n policiesNew(\n first: $first\n after: $after\n last: $last\n before: $before\n search: $search\n filter: $filter\n order: $order\n ) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n ${includeTotalCount ? \"totalCount\" : \"\"}\n edges {\n cursor\n node {\n ${fieldSelection}\n }\n }\n }\n }\n `;\n\n const variables = {\n first: requestOptions?.first,\n after: requestOptions?.after,\n last: requestOptions?.last,\n before: requestOptions?.before,\n search: requestOptions?.search,\n filter: requestOptions?.filter,\n order: requestOptions?.order,\n };\n\n const result = await this.graphql.query<{\n policiesNew: Omit<PoliciesConnection, \"nodes\">;\n }>(query, variables, options);\n\n if (!result.isSuccess) {\n return result as InsurUpGraphQLResult<PoliciesConnection<TFields>>;\n }\n\n // Derive nodes from edges\n const edges = result.data.policiesNew.edges;\n const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;\n\n return {\n ...result,\n data: {\n ...result.data.policiesNew,\n nodes,\n },\n } as InsurUpGraphQLResult<PoliciesConnection<TFields>>;\n }\n\n /**\n * Queries policy transfers using GraphQL with advanced filtering, searching, sorting, and field selection.\n * Supports cursor-based pagination and type-safe field selection.\n *\n * Gelişmiş filtreleme, arama, sıralama ve alan seçimi ile GraphQL kullanarak poliçe transferlerini sorgular.\n * İmleç tabanlı sayfalama ve tip-güvenli alan seçimini destekler.\n *\n * @example\n * // Basic query with all fields\n * const result = await client.policies.getPolicyTransfers({ first: 10 });\n *\n * @param requestOptions Query options including pagination, filters, search, and field selection\n * @returns Paginated connection of policy transfers with type-narrowed fields\n */\n async getPolicyTransfers<const TFields extends PolicyTransferFieldKey[]>(\n requestOptions?: GetPolicyTransfersOptions<TFields>,\n options?: RequestOptions,\n ): Promise<InsurUpGraphQLResult<PolicyTransfersConnection<TFields>>> {\n if (!this.graphql) {\n throw new Error(\n \"GraphQL transport is not available. Ensure the client is properly initialized.\",\n );\n }\n\n const fields = (requestOptions?.select ??\n ALL_POLICY_TRANSFER_FIELDS) as PolicyTransferFieldKey[];\n const fieldSelection = buildFieldSelection(fields);\n\n const query = `\n query GetPolicyTransfers(\n $first: Int\n $after: String\n $last: Int\n $before: String\n $search: searching_QueryPolicyTransfersResultFilterInput\n $filter: filtering_QueryPolicyTransfersResultFilterInput\n $order: [sorting_QueryPolicyTransfersResultSortInput!]\n ) {\n policyTransfersNew(\n first: $first\n after: $after\n last: $last\n before: $before\n search: $search\n filter: $filter\n order: $order\n ) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n totalCount\n edges {\n cursor\n node {\n ${fieldSelection}\n }\n }\n }\n }\n `;\n\n const variables = {\n first: requestOptions?.first,\n after: requestOptions?.after,\n last: requestOptions?.last,\n before: requestOptions?.before,\n search: requestOptions?.search,\n filter: requestOptions?.filter,\n order: requestOptions?.order,\n };\n\n const result = await this.graphql.query<{\n policyTransfersNew: Omit<PolicyTransfersConnection, \"nodes\">;\n }>(query, variables, options);\n\n if (!result.isSuccess) {\n return result as InsurUpGraphQLResult<PolicyTransfersConnection<TFields>>;\n }\n\n // Derive nodes from edges\n const edges = result.data.policyTransfersNew.edges;\n const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;\n\n return {\n ...result,\n data: {\n ...result.data.policyTransfersNew,\n nodes,\n },\n } as InsurUpGraphQLResult<PolicyTransfersConnection<TFields>>;\n }\n\n /**\n * Queries file policy transfers using GraphQL with advanced filtering, searching, sorting, and field selection.\n * Supports cursor-based pagination and type-safe field selection.\n *\n * Gelişmiş filtreleme, arama, sıralama ve alan seçimi ile GraphQL kullanarak dosya bazlı poliçe transferlerini sorgular.\n * İmleç tabanlı sayfalama ve tip-güvenli alan seçimini destekler.\n *\n * @example\n * // Basic query with all fields\n * const result = await client.policies.getFilePolicyTransfers({ first: 10 });\n *\n * @param requestOptions Query options including pagination, filters, search, and field selection\n * @returns Paginated connection of file policy transfers with type-narrowed fields\n */\n async getFilePolicyTransfers<\n const TFields extends FilePolicyTransferFieldKey[],\n >(\n requestOptions?: GetFilePolicyTransfersOptions<TFields>,\n options?: RequestOptions,\n ): Promise<InsurUpGraphQLResult<FilePolicyTransfersConnection<TFields>>> {\n if (!this.graphql) {\n throw new Error(\n \"GraphQL transport is not available. Ensure the client is properly initialized.\",\n );\n }\n\n const fields = (requestOptions?.select ??\n ALL_FILE_POLICY_TRANSFER_FIELDS) as FilePolicyTransferFieldKey[];\n const fieldSelection = buildFieldSelection(fields);\n\n const query = `\n query GetFilePolicyTransfers(\n $first: Int\n $after: String\n $last: Int\n $before: String\n $search: searching_QueryFilePolicyTransfersResultFilterInput\n $filter: filtering_QueryFilePolicyTransfersResultFilterInput\n $order: [sorting_QueryFilePolicyTransfersResultSortInput!]\n ) {\n filePolicyTransfersNew(\n first: $first\n after: $after\n last: $last\n before: $before\n search: $search\n filter: $filter\n order: $order\n ) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n totalCount\n edges {\n cursor\n node {\n ${fieldSelection}\n }\n }\n }\n }\n `;\n\n const variables = {\n first: requestOptions?.first,\n after: requestOptions?.after,\n last: requestOptions?.last,\n before: requestOptions?.before,\n search: requestOptions?.search,\n filter: requestOptions?.filter,\n order: requestOptions?.order,\n };\n\n const result = await this.graphql.query<{\n filePolicyTransfersNew: Omit<FilePolicyTransfersConnection, \"nodes\">;\n }>(query, variables, options);\n\n if (!result.isSuccess) {\n return result as InsurUpGraphQLResult<\n FilePolicyTransfersConnection<TFields>\n >;\n }\n\n // Derive nodes from edges\n const edges = result.data.filePolicyTransfersNew.edges;\n const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;\n\n return {\n ...result,\n data: {\n ...result.data.filePolicyTransfersNew,\n nodes,\n },\n } as InsurUpGraphQLResult<FilePolicyTransfersConnection<TFields>>;\n }\n}\n","/**\n * @fileoverview Case Management Client - Direct port from DefaultInsurUpClient.Case.cs\n * @description TypeScript client for case management operations\n */\n\nimport { cases } from \"../core/endpoints.js\";\nimport type { InsurUpResult, InsurUpGraphQLResult } from \"../core/result.js\";\nimport type { HttpTransport } from \"../client/http.js\";\nimport type { GraphQLTransport } from \"../client/graphql.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport {\n ALL_CASE_FIELDS,\n type CaseFieldKey,\n type GetCasesOptions,\n type CasesConnection,\n} from \"@insurup/contracts\";\nimport { buildFieldSelection } from \"@insurup/contracts\";\nimport type {\n // Request types\n AssignCaseRepresentativeRequest,\n ChangeCaseChannelRequest,\n ChangeCaseStateRequest,\n CreateCancelCaseRequest,\n CreateComplaintCaseRequest,\n CreateCrossSaleOpportunityCaseRequest,\n CreateEndorsementCaseRequest,\n CreateNewSaleOpportunityCaseRequest,\n AddNoteToCaseRequest,\n SetCaseAssetRequest,\n SetCaseBranchRequest,\n GetSalesOpportunityFunnelAnalyticsRequest,\n GetOpenCaseBacklogPivotAnalyticsRequest,\n GetFailedCasesReasonDistributionRequest,\n // Response types\n GetCaseByRefResult,\n CasePolicyResult,\n CaseActivityResult,\n CaseProposalResult,\n GetSalesOpportunityFunnelAnalyticsResult,\n GetOpenCaseBacklogPivotAnalyticsResult,\n GetFailedCasesReasonDistributionResult,\n CaseCommunicationAutomationResult,\n GetCasePriorityTemplatesResult,\n} from \"@insurup/contracts\";\n\n/**\n * Case Management Client\n *\n * Central client for managing all types of customer cases and requests within the InsurUp platform. Handles various\n * case types including policy cancellations, customer complaints, cross-sale opportunities, endorsement requests, and\n * new sale opportunities. Provides comprehensive workflow management including case representative assignment, status tracking, activity\n * logging, and representative management. Essential for agencies that need to maintain organized customer service operations\n * and ensure proper follow-up on all customer interactions and business opportunities.\n *\n * InsurUp platformu içinde her türlü müşteri talebi ve isteğini yönetmek için merkezi istemci. Poliçe iptalleri,\n * müşteri şikayetleri, çapraz satış fırsatları, zeyilname talepleri ve yeni satış fırsatları dahil çeşitli talep türlerini\n * yönetir. Talep atama, durum takibi, aktivite kaydı ve temsilci yönetimi dahil kapsamlı iş akışı yönetimi sağlar.\n * Düzenli müşteri hizmet operasyonlarını sürdürmesi ve tüm müşteri etkileşimleri ile iş fırsatlarında uygun takibi\n * sağlaması gereken acenteler için olmazsa olmazdır.\n */\nexport class InsurUpCaseClient {\n constructor(\n private readonly http: HttpTransport,\n private readonly graphql?: GraphQLTransport,\n ) {}\n\n /**\n * Assigns a case representative to handle a specific customer case, ensuring proper ownership and accountability.\n *\n * Belirli bir müşteri talebini ele almak için talep temsilcisi atar ve uygun sahiplik ile hesap verebilirliği sağlar.\n *\n * @param request Case representative assignment request with representative details / Temsilci detayları ile talep atama talebi\n * @returns Operation result / İşlem sonucu\n */\n async assignCaseRepresentative(\n request: AssignCaseRepresentativeRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = cases.assignRepresentative.render(request.ref);\n return await this.http.putNoContent(endpoint, request, options);\n }\n\n /**\n * Changes the communication channel for a case to redirect it to appropriate department or platform.\n *\n * Bir talebin iletişim kanalını değiştirerek uygun departman veya platforma yönlendirir.\n *\n * @param request Channel change request / Kanal değişiklik talebi\n * @returns Operation result / İşlem sonucu\n */\n async changeCaseChannel(\n request: ChangeCaseChannelRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = cases.changeChannel.render(request.ref);\n return await this.http.putNoContent(endpoint, request, options);\n }\n\n /**\n * Updates the status of a case to reflect its current progress in the resolution workflow.\n *\n * Çözüm iş akışındaki mevcut ilerlemesini yansıtmak için talebin durumunu günceller.\n *\n * @param request Status change request / Durum değişiklik talebi\n * @returns Operation result / İşlem sonucu\n */\n async changeCaseState(\n request: ChangeCaseStateRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = cases.changeState.render(request.ref);\n return await this.http.putNoContent(endpoint, request, options);\n }\n\n /**\n * Creates a policy cancellation case when a customer requests to terminate their insurance coverage.\n *\n * Müşteri sigorta teminatını sonlandırma talebinde bulunduğunda poliçe iptal talebi oluşturur.\n *\n * @param request Cancellation case creation request / İptal talebi oluşturma talebi\n * @returns Created case identifier / Oluşturulan talep tanımlayıcısı\n */\n async createCancelCase(\n request: CreateCancelCaseRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<string>> {\n return await this.http.post<string>(cases.createCancel, request, options);\n }\n\n /**\n * Creates a complaint case to handle customer dissatisfaction or service issues requiring resolution.\n *\n * Müşteri memnuniyetsizliği veya çözüm gerektiren hizmet sorunlarını ele almak için şikayet talebi oluşturur.\n *\n * @param request Complaint case creation request / Şikayet talebi oluşturma talebi\n * @returns Created case identifier / Oluşturulan talep tanımlayıcısı\n */\n async createComplaintCase(\n request: CreateComplaintCaseRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<string>> {\n return await this.http.post<string>(\n cases.createComplaint,\n request,\n options,\n );\n }\n\n /**\n * Creates a cross-sale opportunity case to track potential additional insurance products for existing customers.\n *\n * Mevcut müşteriler için potansiyel ek sigorta ürünlerini takip etmek üzere çapraz satış fırsatı talebi oluşturur.\n *\n * @param request Cross-sale opportunity creation request / Çapraz satış fırsatı oluşturma talebi\n * @returns Created case identifier / Oluşturulan talep tanımlayıcısı\n */\n async createCrossSaleOpportunityCase(\n request: CreateCrossSaleOpportunityCaseRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<string>> {\n return await this.http.post<string>(\n cases.createCrossSaleOpportunity,\n request,\n options,\n );\n }\n\n /**\n * Creates an endorsement case for policy modifications or updates requested by the customer.\n *\n * Müşteri tarafından talep edilen poliçe değişiklikleri veya güncellemeler için zeyilname talebi oluşturur.\n *\n * @param request Endorsement case creation request / Zeyilname talebi oluşturma talebi\n * @returns Created case identifier / Oluşturulan talep tanımlayıcısı\n */\n async createEndorsementCase(\n request: CreateEndorsementCaseRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<string>> {\n return await this.http.post<string>(\n cases.createEndorsement,\n request,\n options,\n );\n }\n\n /**\n * Creates a new sale opportunity case to track potential insurance sales to prospective customers.\n *\n * Potansiyel müşterilere olası sigorta satışlarını takip etmek için yeni satış fırsatı talebi oluşturur.\n *\n * @param request New sale opportunity creation request / Yeni satış fırsatı oluşturma talebi\n * @returns Created case identifier / Oluşturulan talep tanımlayıcısı\n */\n async createNewSaleOpportunityCase(\n request: CreateNewSaleOpportunityCaseRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<string>> {\n return await this.http.post<string>(\n cases.createNewSaleOpportunity,\n request,\n options,\n );\n }\n\n /**\n * Retrieves all policies associated with a specific case for comprehensive case context and decision making.\n *\n * Kapsamlı talep bağlamı ve karar verme için belirli bir talep ile ilişkili tüm poliçeleri getirir.\n *\n * @param ref Case reference identifier / Talep referans tanımlayıcısı\n * @returns Associated policies / İlişkili poliçeler\n */\n async getCasePolicies(\n ref: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<CasePolicyResult[]>> {\n const endpoint = cases.getPolicies.render(ref);\n return await this.http.get<CasePolicyResult[]>(endpoint, options);\n }\n\n /**\n * Retrieves the complete activity history for a case showing all actions, updates, and communications.\n *\n * Tüm eylemleri, güncellemeleri ve iletişimleri gösteren talep için tam aktivite geçmişini getirir.\n *\n * @param ref Case reference identifier / Talep referans tanımlayıcısı\n * @returns Case activity history / Talep aktivite geçmişi\n */\n async getCaseActivities(\n ref: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<CaseActivityResult[]>> {\n const endpoint = cases.getActivities.render(ref);\n return await this.http.get<CaseActivityResult[]>(endpoint, options);\n }\n\n /**\n * Retrieves detailed information about a specific case including status, assigned representative, and progress.\n *\n * Belirli bir talep hakkında durum, atanan temsilci ve ilerleme dahil detaylı bilgileri getirir.\n *\n * @param ref Case reference identifier / Talep referans tanımlayıcısı\n * @returns Detailed case information / Detaylı talep bilgileri\n */\n async getCaseByRef(\n ref: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCaseByRefResult>> {\n const endpoint = cases.getCaseByRef.render(ref);\n return await this.http.get<GetCaseByRefResult>(endpoint, options);\n }\n\n /**\n * Retrieves all proposals associated with a specific case to understand related insurance quotations.\n *\n * İlgili sigorta tekliflerini anlamak için belirli bir talep ile ilişkili tüm teklifleri getirir.\n *\n * @param ref Case reference identifier / Talep referans tanımlayıcısı\n * @returns Associated proposals / İlişkili teklifler\n */\n async getCaseProposals(\n ref: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<CaseProposalResult[]>> {\n const endpoint = cases.getProposals.render(ref);\n return await this.http.get<CaseProposalResult[]>(endpoint, options);\n }\n\n /**\n * Adds a note or comment to a case for documentation, communication, or progress tracking purposes.\n *\n * Dokümantasyon, iletişim veya ilerleme takibi amaçları için talepe not veya yorum ekler.\n *\n * @param request Note addition request / Not ekleme talebi\n * @returns Operation result / İşlem sonucu\n */\n async addNoteToCase(\n request: AddNoteToCaseRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = cases.addNoteToCase.render(request.ref);\n return await this.http.putNoContent(endpoint, request, options);\n }\n\n /**\n * Sets or updates the asset associated with a case for proper tracking and management.\n *\n * Uygun takip ve yönetim için taleple ilişkili varlığı ayarlar veya günceller.\n *\n * @param request Asset assignment request / Varlık atama talebi\n * @returns Operation result / İşlem sonucu\n */\n async setCaseAsset(\n request: SetCaseAssetRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = cases.setAsset.render(request.ref);\n return await this.http.putNoContent(endpoint, request, options);\n }\n\n /**\n * Assigns or changes the branch for a case to organize case segmentation and reporting.\n *\n * Talep segmentasyonu ve raporlama için talebin şubesini atar veya değiştirir.\n *\n * @param request Branch assignment request / Şube atama talebi\n * @returns Operation result / İşlem sonucu\n */\n async setCaseBranch(\n request: SetCaseBranchRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = cases.setBranch.render(request.ref);\n return await this.http.putNoContent(endpoint, request, options);\n }\n\n /**\n * Retrieves analytics for the New Sales Opportunity Lifecycle Funnel dashboard widget.\n *\n * Yeni Satış Fırsatı Yaşam Döngüsü Hunisi gösterge paneli bileşeni için analitik verileri getirir.\n *\n * @param request Analytics request with filtering options / Filtreleme seçenekleri içeren analitik isteği\n * @returns Funnel analytics response / Huni analitiği yanıtı\n */\n async getSalesOpportunityFunnelAnalytics(\n request: GetSalesOpportunityFunnelAnalyticsRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetSalesOpportunityFunnelAnalyticsResult>> {\n return await this.http.post<GetSalesOpportunityFunnelAnalyticsResult>(\n cases.getSalesOpportunityFunnelAnalytics.definition,\n request,\n options,\n );\n }\n\n /**\n * Retrieves backlog analytics that pivot open cases by type and subtype for dashboard reporting.\n *\n * Gösterge paneli raporlaması için açık talepleri tür ve alt tür bazında pivotlayan backlog analitiğini getirir.\n *\n * @param request Backlog pivot analytics request / Backlog pivot analitiği isteği\n * @returns Backlog pivot analytics response / Backlog pivot analitiği yanıtı\n */\n async getOpenCaseBacklogPivotAnalytics(\n request: GetOpenCaseBacklogPivotAnalyticsRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetOpenCaseBacklogPivotAnalyticsResult>> {\n return await this.http.post<GetOpenCaseBacklogPivotAnalyticsResult>(\n cases.getOpenCaseBacklogPivotAnalytics.definition,\n request,\n options,\n );\n }\n\n /**\n * Retrieves failed cases reason distribution analytics for conversion improvement analysis.\n *\n * Dönüşüm iyileştirme analizi için başarısız taleplerin neden dağılımı analitiğini getirir.\n *\n * @param request Failed cases reason distribution analytics request / Başarısız talep neden dağılımı analitiği isteği\n * @returns Failed cases reason distribution analytics response / Başarısız talep neden dağılımı analitiği yanıtı\n */\n async getFailedCasesReasonDistribution(\n request: GetFailedCasesReasonDistributionRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetFailedCasesReasonDistributionResult>> {\n return await this.http.post<GetFailedCasesReasonDistributionResult>(\n cases.getFailedCasesReasonDistribution.definition,\n request,\n options,\n );\n }\n\n /**\n * Retrieves all available case communication automation configurations with their argument definitions.\n *\n * Argüman tanımları ile birlikte mevcut tüm talep iletişim otomasyonu yapılandırmalarını getirir.\n *\n * @returns Available communication automations / Mevcut iletişim otomasyonları\n */\n async getAllCaseCommunicationAutomations(\n options?: RequestOptions,\n ): Promise<InsurUpResult<CaseCommunicationAutomationResult[]>> {\n return await this.http.get<CaseCommunicationAutomationResult[]>(\n cases.communicationAutomations.getAll,\n options,\n );\n }\n\n /**\n * Retrieves all available case priority templates for agent configuration.\n *\n * Acente yapılandırması için mevcut tüm talep öncelik şablonlarını getirir.\n *\n * @returns Available case priority templates / Mevcut talep öncelik şablonları\n */\n async getCasePriorityTemplates(\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCasePriorityTemplatesResult>> {\n return await this.http.get<GetCasePriorityTemplatesResult>(\n cases.getPriorityTemplates,\n options,\n );\n }\n\n // ============================================================================\n // GRAPHQL QUERIES\n // ============================================================================\n\n /**\n * Queries cases using GraphQL with advanced filtering, searching, sorting, and field selection.\n * Supports cursor-based pagination and type-safe field selection.\n *\n * Gelişmiş filtreleme, arama, sıralama ve alan seçimi ile GraphQL kullanarak talepleri sorgular.\n * İmleç tabanlı sayfalama ve tip-güvenli alan seçimini destekler.\n *\n * @example\n * // Basic query with all fields\n * const result = await client.cases.getCases({ first: 10 });\n *\n * @example\n * // Type-safe field selection\n * const result = await client.cases.getCases({\n * select: ['id', 'ref', 'type', 'status', 'mainState'] as const,\n * first: 10,\n * filter: { type: { eq: CaseType.NewSaleOpportunity } }\n * });\n *\n * @param requestOptions Query options including pagination, filters, search, and field selection\n * @returns Paginated connection of cases with type-narrowed fields\n */\n async getCases<const TFields extends CaseFieldKey[]>(\n requestOptions?: GetCasesOptions<TFields>,\n options?: RequestOptions,\n ): Promise<InsurUpGraphQLResult<CasesConnection<TFields>>> {\n if (!this.graphql) {\n throw new Error(\n \"GraphQL transport is not available. Ensure the client is properly initialized.\",\n );\n }\n\n const fields = (requestOptions?.select ??\n ALL_CASE_FIELDS) as CaseFieldKey[];\n const fieldSelection = buildFieldSelection(fields);\n\n const query = `\n query GetCases(\n $first: Int\n $after: String\n $last: Int\n $before: String\n $search: searching_QueryCaseModelFilterInput\n $filter: filtering_QueryCaseModelFilterInput\n $order: [sorting_QueryCaseModelSortInput!]\n ) {\n casesNew(\n first: $first\n after: $after\n last: $last\n before: $before\n search: $search\n filter: $filter\n order: $order\n ) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n totalCount\n edges {\n cursor\n node {\n ${fieldSelection}\n }\n }\n }\n }\n `;\n\n const variables = {\n first: requestOptions?.first,\n after: requestOptions?.after,\n last: requestOptions?.last,\n before: requestOptions?.before,\n search: requestOptions?.search,\n filter: requestOptions?.filter,\n order: requestOptions?.order,\n };\n\n const result = await this.graphql.query<{\n casesNew: Omit<CasesConnection, \"nodes\">;\n }>(query, variables, options);\n\n if (!result.isSuccess) {\n return result as InsurUpGraphQLResult<CasesConnection<TFields>>;\n }\n\n // Derive nodes from edges\n const edges = result.data.casesNew.edges;\n const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;\n\n return {\n ...result,\n data: {\n ...result.data.casesNew,\n nodes,\n },\n } as InsurUpGraphQLResult<CasesConnection<TFields>>;\n }\n}\n","import type { HttpTransport } from \"../client/http.js\";\nimport type { GraphQLTransport } from \"../client/graphql.js\";\nimport type { InsurUpResult, InsurUpGraphQLResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport { webhooks } from \"../core/endpoints.js\";\nimport {\n ALL_WEBHOOK_DELIVERY_FIELDS,\n type WebhookDeliveryFieldKey,\n type GetWebhookDeliveriesOptions,\n type WebhookDeliveriesConnection,\n} from \"@insurup/contracts\";\nimport { buildFieldSelection } from \"@insurup/contracts\";\nimport type {\n CreateWebhookRequest,\n CreateWebhookResult,\n GetWebhookByIdResult,\n GetWebhooksResult,\n UpdateWebhookRequest,\n GetWebhookDeliveryResult,\n} from \"@insurup/contracts\";\n\n/**\n * Provides comprehensive webhook management operations for configuring event notifications, monitoring delivery status,\n * and managing external system integrations within the InsurUp platform ecosystem.\n *\n * InsurUp platform ekosistemi içinde olay bildirimlerini yapılandırma, teslimat durumunu izleme ve\n * harici sistem entegrasyonlarını yönetmek için kapsamlı webhook yönetimi işlemlerini sağlar.\n */\nexport class InsurUpWebhookClient {\n constructor(\n private readonly http: HttpTransport,\n private readonly graphql?: GraphQLTransport,\n ) {}\n\n /**\n * Creates a new webhook configuration to receive event notifications from the InsurUp platform.\n *\n * InsurUp platformundan olay bildirimleri almak için yeni webhook yapılandırması oluşturur.\n *\n * @param request Webhook creation request with endpoint and event configurations / Endpoint ve olay yapılandırmaları ile webhook oluşturma talebi\n * @returns Created webhook information / Oluşturulan webhook bilgileri\n */\n async createWebhook(\n request: CreateWebhookRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<CreateWebhookResult>> {\n return this.http.post<CreateWebhookResult>(\n webhooks.create,\n request,\n options,\n );\n }\n\n /**\n * Retrieves detailed information about a specific webhook including its configuration and current status.\n *\n * Belirli bir webhook hakkında yapılandırması ve mevcut durumu dahil detaylı bilgileri getirir.\n *\n * @param webhookId Unique identifier of the webhook / Webhook'un benzersiz tanımlayıcısı\n * @returns Webhook configuration details / Webhook yapılandırma detayları\n */\n async getWebhookById(\n webhookId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetWebhookByIdResult>> {\n const endpoint = webhooks.getById.render(webhookId);\n return this.http.get<GetWebhookByIdResult>(endpoint, options);\n }\n\n /**\n * Retrieves all webhooks configured for the current agent or organization for comprehensive webhook management.\n *\n * Kapsamlı webhook yönetimi için mevcut acente veya organizasyon için yapılandırılmış tüm webhook'ları getirir.\n *\n * @returns List of configured webhooks / Yapılandırılmış webhook'lar listesi\n */\n async getWebhooks(\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetWebhooksResult[]>> {\n return this.http.get<GetWebhooksResult[]>(webhooks.getAll, options);\n }\n\n /**\n * Updates an existing webhook configuration including endpoint URL, event subscriptions, or authentication settings.\n *\n * Endpoint URL'si, olay abonelikleri veya kimlik doğrulama ayarları dahil mevcut webhook yapılandırmasını günceller.\n *\n * @param request Webhook update request with modified configuration / Değiştirilmiş yapılandırma ile webhook güncelleme talebi\n * @returns Operation result / İşlem sonucu\n */\n async updateWebhook(\n request: UpdateWebhookRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = webhooks.update.render(request.id);\n return this.http.putNoContent(endpoint, request, options);\n }\n\n /**\n * Permanently removes a webhook configuration, stopping all future event notifications to the specified endpoint.\n *\n * Webhook yapılandırmasını kalıcı olarak kaldırır ve belirtilen endpoint'e gelecekteki tüm olay bildirimlerini durdurur.\n *\n * @param webhookId Unique identifier of the webhook to delete / Silinecek webhook'un benzersiz tanımlayıcısı\n * @returns Operation result / İşlem sonucu\n */\n async deleteWebhook(\n webhookId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = webhooks.delete.render(webhookId);\n return this.http.deleteNoContent(endpoint, options);\n }\n\n /**\n * Retrieves detailed information about a specific webhook delivery including delivery status, response, and timing.\n *\n * Teslimat durumu, yanıt ve zamanlama dahil belirli bir webhook teslimatı hakkında detaylı bilgileri getirir.\n *\n * @param webhookId Unique identifier of the webhook / Webhook'un benzersiz tanımlayıcısı\n * @param webhookDeliveryId Unique identifier of the delivery attempt / Teslimat denemesinin benzersiz tanımlayıcısı\n * @returns Webhook delivery details / Webhook teslimat detayları\n */\n async getWebhookDelivery(\n webhookId: string,\n webhookDeliveryId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetWebhookDeliveryResult>> {\n const endpoint = webhooks.deliveries.getById.render(\n webhookId,\n webhookDeliveryId,\n );\n return this.http.get<GetWebhookDeliveryResult>(endpoint, options);\n }\n\n /**\n * Manually retries a failed webhook event delivery to attempt successful notification delivery.\n *\n * Başarılı bildirim teslimatını denemek için başarısız webhook olay teslimatını manuel olarak yeniden dener.\n *\n * @param webhookId Unique identifier of the webhook / Webhook'un benzersiz tanımlayıcısı\n * @param webhookDeliveryId Unique identifier of the delivery to retry / Yeniden denenecek teslimatın benzersiz tanımlayıcısı\n * @returns Operation result / İşlem sonucu\n */\n async redeliverWebhookEvent(\n webhookId: string,\n webhookDeliveryId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = webhooks.deliveries.redeliver.render(\n webhookId,\n webhookDeliveryId,\n );\n return this.http.postNoContent(endpoint, undefined, options);\n }\n\n // ============================================================================\n // GRAPHQL QUERIES\n // ============================================================================\n\n /**\n * Queries webhook deliveries using GraphQL with advanced filtering, searching, sorting, and field selection.\n * Supports cursor-based pagination and type-safe field selection.\n *\n * Gelişmiş filtreleme, arama, sıralama ve alan seçimi ile GraphQL kullanarak webhook teslimatlarını sorgular.\n * İmleç tabanlı sayfalama ve tip-güvenli alan seçimini destekler.\n *\n * @example\n * // Basic query with all fields\n * const result = await client.webhooks.getWebhookDeliveries({ first: 10 });\n *\n * @example\n * // Type-safe field selection with filter\n * const result = await client.webhooks.getWebhookDeliveries({\n * select: ['id', 'webhookId', 'event', 'state'] as const,\n * first: 10,\n * filter: { state: { eq: WebhookDeliveryState.Failed } }\n * });\n *\n * @param requestOptions Query options including pagination, filters, search, and field selection\n * @returns Paginated connection of webhook deliveries with type-narrowed fields\n */\n async getWebhookDeliveries<const TFields extends WebhookDeliveryFieldKey[]>(\n requestOptions?: GetWebhookDeliveriesOptions<TFields>,\n options?: RequestOptions,\n ): Promise<InsurUpGraphQLResult<WebhookDeliveriesConnection<TFields>>> {\n if (!this.graphql) {\n throw new Error(\n \"GraphQL transport is not available. Ensure the client is properly initialized.\",\n );\n }\n\n const fields = (requestOptions?.select ??\n ALL_WEBHOOK_DELIVERY_FIELDS) as WebhookDeliveryFieldKey[];\n const fieldSelection = buildFieldSelection(fields);\n\n const query = `\n query GetWebhookDeliveries(\n $first: Int\n $after: String\n $last: Int\n $before: String\n $search: searching_QueryWebhookDeliveryResultFilterInput\n $filter: filtering_QueryWebhookDeliveryResultFilterInput\n $order: [sorting_QueryWebhookDeliveryResultSortInput!]\n ) {\n webhookDeliveriesNew(\n first: $first\n after: $after\n last: $last\n before: $before\n search: $search\n filter: $filter\n order: $order\n ) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n totalCount\n edges {\n cursor\n node {\n ${fieldSelection}\n }\n }\n }\n }\n `;\n\n const variables = {\n first: requestOptions?.first,\n after: requestOptions?.after,\n last: requestOptions?.last,\n before: requestOptions?.before,\n search: requestOptions?.search,\n filter: requestOptions?.filter,\n order: requestOptions?.order,\n };\n\n const result = await this.graphql.query<{\n webhookDeliveriesNew: Omit<WebhookDeliveriesConnection, \"nodes\">;\n }>(query, variables, options);\n\n if (!result.isSuccess) {\n return result as InsurUpGraphQLResult<\n WebhookDeliveriesConnection<TFields>\n >;\n }\n\n // Derive nodes from edges\n const edges = result.data.webhookDeliveriesNew.edges;\n const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;\n\n return {\n ...result,\n data: {\n ...result.data.webhookDeliveriesNew,\n nodes,\n },\n } as InsurUpGraphQLResult<WebhookDeliveriesConnection<TFields>>;\n }\n}\n","/**\n * @fileoverview Coverage Management Client - Client for managing insurance coverage configurations\n * @description Provides coverage management operations for configuring insurance product coverages, managing coverage groups, and retrieving available coverage options\n */\n\nimport type { HttpTransport } from \"../client/http.js\";\nimport type { InsurUpResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport { coverageGroups, coverageChoices } from \"../core/endpoints.js\";\nimport type {\n CreateCoverageGroupRequest,\n UpdateCoverageGroupRequest,\n DeleteCoverageGroupRequest,\n GetCoverageGroupByIdResult,\n GetCoverageGroupsResultItem,\n KaskoCoverageChoices,\n KonutCoverageChoices,\n TssCoverageChoices,\n ImmCoverageChoices,\n CompanyCoverageChoices,\n} from \"@insurup/contracts\";\nimport type { VehicleUtilizationStyle } from \"@insurup/contracts\";\n\n/**\n * Provides coverage management operations for configuring insurance product coverages, managing coverage groups,\n * and retrieving available coverage options for different insurance branches within the InsurUp platform.\n *\n * InsurUp platformu içinde sigorta ürün teminatlarını yapılandırma, teminat gruplarını yönetme ve farklı\n * sigorta dalları için mevcut teminat seçeneklerini alma konularında teminat yönetimi işlemlerini sağlar.\n */\nexport class InsurUpCoverageClient {\n constructor(private readonly http: HttpTransport) {}\n\n /**\n * Creates a new coverage group to organize and standardize coverage offerings across multiple insurance products.\n *\n * Birden fazla sigorta ürününde teminat tekliflerini organize etmek ve standartlaştırmak için yeni teminat grubu oluşturur.\n *\n * @param request Coverage group creation request / Teminat grubu oluşturma talebi\n * @returns Operation result / İşlem sonucu\n */\n async createCoverageGroup(\n request: CreateCoverageGroupRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(coverageGroups.create, request, options);\n }\n\n /**\n * Updates an existing coverage group's configuration, coverage options, or applicable insurance products.\n *\n * Mevcut bir teminat grubunun yapılandırmasını, teminat seçeneklerini veya uygulanabilir sigorta ürünlerini günceller.\n *\n * @param request Coverage group update request / Teminat grubu güncelleme talebi\n * @returns Operation result / İşlem sonucu\n */\n async updateCoverageGroup(\n request: UpdateCoverageGroupRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.putNoContent(\n coverageGroups.update.render(request.id),\n request,\n options,\n );\n }\n\n /**\n * Removes a coverage group from the system, ensuring proper cleanup of associated coverage configurations.\n *\n * Sistemden bir teminat grubunu kaldırır ve ilişkili teminat yapılandırmalarının düzgün temizlenmesini sağlar.\n *\n * @param request Coverage group deletion request / Teminat grubu silme talebi\n * @returns Operation result / İşlem sonucu\n */\n async deleteCoverageGroup(\n request: DeleteCoverageGroupRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.deleteNoContent(\n coverageGroups.delete.render(request.id),\n options,\n );\n }\n\n /**\n * Retrieves detailed information about a specific coverage group including its coverage options and configurations.\n *\n * Belirli bir teminat grubu hakkında teminat seçenekleri ve yapılandırmaları dahil detaylı bilgileri getirir.\n *\n * @param coverageGroupId Unique identifier of the coverage group / Teminat grubunun benzersiz tanımlayıcısı\n * @returns Coverage group details / Teminat grubu detayları\n */\n async getCoverageGroupById(\n coverageGroupId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCoverageGroupByIdResult>> {\n return this.http.get(\n coverageGroups.getById.render(coverageGroupId),\n options,\n );\n }\n\n /**\n * Retrieves all available coverage groups within the agency for comprehensive coverage management overview.\n *\n * Kapsamlı teminat yönetimi genel bakışı için acente içindeki tüm mevcut teminat gruplarını getirir.\n *\n * @returns List of all coverage groups / Tüm teminat grupları listesi\n */\n async getAllCoverageGroups(\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetCoverageGroupsResultItem[]>> {\n return this.http.get(coverageGroups.getAll, options);\n }\n\n /**\n * Retrieves available Kasko (comprehensive vehicle insurance) coverage options and configurations for proposal generation.\n *\n * Teklif oluşturma için mevcut Kasko (kasko araç sigortası) teminat seçenekleri ve yapılandırmalarını getirir.\n *\n * @param vehicleUtilizationStyle Optional vehicle utilization style filter / İsteğe bağlı araç kullanım stili filtresi\n * @returns Kasko coverage choices grouped by insurance company / Sigorta şirketine göre gruplanmış Kasko teminat seçenekleri\n */\n async getKaskoCoverageChoices(\n vehicleUtilizationStyle?: VehicleUtilizationStyle,\n options?: RequestOptions,\n ): Promise<InsurUpResult<CompanyCoverageChoices<KaskoCoverageChoices>[]>> {\n const endpoint = coverageChoices.getKaskoCoverageChoices.render(\n vehicleUtilizationStyle,\n );\n return this.http.get<CompanyCoverageChoices<KaskoCoverageChoices>[]>(\n endpoint,\n options,\n );\n }\n\n /**\n * Retrieves available Konut (home/property insurance) coverage options including DASK earthquake insurance configurations.\n *\n * DASK deprem sigortası yapılandırmaları dahil mevcut Konut (ev/mülk sigortası) teminat seçeneklerini getirir.\n *\n * @returns Konut coverage choices grouped by insurance company / Sigorta şirketine göre gruplanmış Konut teminat seçenekleri\n */\n async getKonutCoverageChoices(\n options?: RequestOptions,\n ): Promise<InsurUpResult<CompanyCoverageChoices<KonutCoverageChoices>[]>> {\n return this.http.get<CompanyCoverageChoices<KonutCoverageChoices>[]>(\n coverageChoices.getKonutCoverageChoices.render(),\n options,\n );\n }\n\n /**\n * Retrieves available TSS (Traffic Insurance) coverage options for mandatory and voluntary vehicle liability insurance.\n *\n * Zorunlu ve ihtiyari araç sorumluluk sigortası için mevcut TSS (Trafik Sigortası) teminat seçeneklerini getirir.\n *\n * @returns TSS coverage choices grouped by insurance company / Sigorta şirketine göre gruplanmış TSS teminat seçenekleri\n */\n async getTssCoverageChoices(\n options?: RequestOptions,\n ): Promise<InsurUpResult<CompanyCoverageChoices<TssCoverageChoices>[]>> {\n return this.http.get<CompanyCoverageChoices<TssCoverageChoices>[]>(\n coverageChoices.getTssCoverageChoices.render(),\n options,\n );\n }\n\n /**\n * Retrieves available IMM (Voluntary Financial Liability) coverage options for extended liability protection beyond mandatory insurance.\n *\n * Zorunlu sigortanın ötesinde genişletilmiş sorumluluk koruması için mevcut İMM (İhtiyari Mali Mesuliyet) teminat seçeneklerini getirir.\n *\n * @returns IMM coverage choices grouped by insurance company / Sigorta şirketine göre gruplanmış İMM teminat seçenekleri\n */\n async getImmCoverageChoices(\n options?: RequestOptions,\n ): Promise<InsurUpResult<CompanyCoverageChoices<ImmCoverageChoices>[]>> {\n return this.http.get<CompanyCoverageChoices<ImmCoverageChoices>[]>(\n coverageChoices.getImmCoverageChoices.render(),\n options,\n );\n }\n}\n","import type { HttpTransport } from \"../client/http.js\";\nimport type { InsurUpResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport { endpoints } from \"../core/endpoints.js\";\nimport type {\n ResourceKey,\n InsuranceCompany,\n InsuranceProduct,\n GetAgentBasedConnectionFieldsByCompanyIdResultItem,\n GetAllReleaseNotesResultItem,\n Bank,\n BankBranch,\n FinancialInstitution,\n} from \"@insurup/contracts\";\n\n/**\n * Provides comprehensive insurance industry data access for retrieving insurance companies, products, resource keys,\n * release notes, and financial institution information essential for platform operations and integrations.\n *\n * Platform operasyonları ve entegrasyonları için gerekli sigorta şirketleri, ürünler, kaynak anahtarları,\n * sürüm notları ve finansal kurum bilgilerini almak üzere kapsamlı sigorta sektörü veri erişimi sağlar.\n *\n * **Insurance Industry Data Client / Sigorta Sektörü Veri İstemcisi**\n *\n * EN: Central client for accessing comprehensive insurance industry reference data and platform configuration information.\n * Provides access to insurance companies, their products, localization resources, platform release notes, banking\n * institutions, and financial service providers. Essential for agencies that need to stay updated with insurance\n * market offerings, configure platform integrations, access multilingual resources, and integrate with banking\n * systems for premium collection and policy financing operations.\n *\n * TR: Kapsamlı sigorta sektörü referans verilerine ve platform yapılandırma bilgilerine erişim için merkezi istemci.\n * Sigorta şirketleri, ürünleri, yerelleştirme kaynakları, platform sürüm notları, bankacılık kurumları ve finansal\n * hizmet sağlayıcılarına erişim sağlar. Sigorta pazar teklifleri ile güncel kalması, platform entegrasyonlarını\n * yapılandırması, çok dilli kaynaklara erişmesi ve prim tahsilatı ile poliçe finansman operasyonları için bankacılık\n * sistemleri ile entegrasyon yapması gereken acenteler için olmazsa olmazdır.\n */\nexport class InsurUpInsuranceClient {\n constructor(private readonly http: HttpTransport) {}\n\n /**\n * Retrieves all available resource keys for localization and multi-language support within the platform.\n *\n * Platform içinde yerelleştirme ve çoklu dil desteği için mevcut tüm kaynak anahtarlarını getirir.\n *\n * @returns List of resource keys for localization / Yerelleştirme için kaynak anahtarları listesi\n */\n async getResourceKeys(\n options?: RequestOptions,\n ): Promise<InsurUpResult<ResourceKey[]>> {\n return this.http.get<ResourceKey[]>(endpoints.resourceKeys.getAll, options);\n }\n\n /**\n * Retrieves all insurance companies available on the platform for agent partnerships and product offerings.\n *\n * Acente ortaklıkları ve ürün teklifleri için platformda bulunan tüm sigorta şirketlerini getirir.\n *\n * @returns List of insurance companies / Sigorta şirketleri listesi\n */\n async getInsuranceCompanies(\n options?: RequestOptions,\n ): Promise<InsurUpResult<InsuranceCompany[]>> {\n return this.http.get<InsuranceCompany[]>(\n endpoints.insuranceCompanies.getInsuranceCompanies,\n options,\n );\n }\n\n /**\n * Retrieves all insurance products offered by a specific insurance company including their features and coverage options.\n *\n * Belirli bir sigorta şirketinin sunduğu tüm sigorta ürünlerini özellikleri ve teminat seçenekleri dahil getirir.\n *\n * @param insuranceCompanyId Unique identifier of the insurance company / Sigorta şirketinin benzersiz tanımlayıcısı\n * @returns List of insurance products / Sigorta ürünleri listesi\n */\n async getInsuranceCompanyProducts(\n insuranceCompanyId: number,\n options?: RequestOptions,\n ): Promise<InsurUpResult<InsuranceProduct[]>> {\n const path =\n endpoints.insuranceCompanies.getInsuranceCompanyProducts.render(\n insuranceCompanyId,\n );\n return this.http.get<InsuranceProduct[]>(path, options);\n }\n\n /**\n * Retrieves all insurance products from all companies on the platform including their features and coverage options.\n *\n * Platformdaki tüm şirketlerden mevcut tüm sigorta ürünlerini özellikleri ve teminat seçenekleri dahil getirir.\n *\n * @returns List of all insurance products / Tüm sigorta ürünleri listesi\n */\n async getAllProducts(\n options?: RequestOptions,\n ): Promise<InsurUpResult<InsuranceProduct[]>> {\n return this.http.get<InsuranceProduct[]>(\n endpoints.insuranceCompanies.getAllProducts,\n options,\n );\n }\n\n /**\n * Retrieves agent-specific connection fields and requirements for integrating with a particular insurance company's systems.\n *\n * Belirli bir sigorta şirketinin sistemleri ile entegrasyon için acente özel bağlantı alanları ve gereksinimlerini getirir.\n *\n * @param insuranceCompanyId Unique identifier of the insurance company / Sigorta şirketinin benzersiz tanımlayıcısı\n * @returns Connection field requirements / Bağlantı alanı gereksinimleri\n */\n async getCompanyConnectionFields(\n insuranceCompanyId: number,\n options?: RequestOptions,\n ): Promise<\n InsurUpResult<GetAgentBasedConnectionFieldsByCompanyIdResultItem[]>\n > {\n const path =\n endpoints.insuranceCompanies.connectionFields.getAgentBasedConnectionFieldsByCompanyId.render(\n insuranceCompanyId,\n );\n return this.http.get<GetAgentBasedConnectionFieldsByCompanyIdResultItem[]>(\n path,\n options,\n );\n }\n\n /**\n * Retrieves all platform release notes including new features, bug fixes, and important updates for system awareness.\n *\n * Sistem farkındalığı için yeni özellikler, hata düzeltmeleri ve önemli güncellemeler dahil tüm platform sürüm notlarını getirir.\n *\n * @returns Platform release notes / Platform sürüm notları\n */\n async getAllReleaseNotes(\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetAllReleaseNotesResultItem[]>> {\n return this.http.get<GetAllReleaseNotesResultItem[]>(\n endpoints.releaseNotes.getAll,\n options,\n );\n }\n\n /**\n * Retrieves all banks available for premium collection, policy financing, and customer payment processing operations.\n *\n * Prim tahsilatı, poliçe finansmanı ve müşteri ödeme işleme operasyonları için mevcut tüm bankaları getirir.\n *\n * @returns List of banks / Bankalar listesi\n */\n async getBanks(options?: RequestOptions): Promise<InsurUpResult<Bank[]>> {\n return this.http.get<Bank[]>(endpoints.banks.getAll, options);\n }\n\n /**\n * Retrieves all branches for a specific bank to enable precise payment routing and customer service location matching.\n *\n * Hassas ödeme yönlendirmesi ve müşteri hizmet konumu eşleştirmesi için belirli bir bankanın tüm şubelerini getirir.\n *\n * @param bankId Unique identifier of the bank / Bankanın benzersiz tanımlayıcısı\n * @returns List of bank branches / Banka şubeleri listesi\n */\n async getBankBranches(\n bankId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<BankBranch[]>> {\n const path = endpoints.banks.getBranches.render(bankId);\n return this.http.get<BankBranch[]>(path, options);\n }\n\n /**\n * Retrieves all financial institutions including banks, credit unions, and other financial service providers for comprehensive payment options.\n *\n * Kapsamlı ödeme seçenekleri için bankalar, kredi birlikleri ve diğer finansal hizmet sağlayıcıları dahil tüm finansal kurumları getirir.\n *\n * @returns List of financial institutions / Finansal kurumlar listesi\n */\n async getFinancialInstitutions(\n options?: RequestOptions,\n ): Promise<InsurUpResult<FinancialInstitution[]>> {\n return this.http.get<FinancialInstitution[]>(\n endpoints.financialInstitutions.getAll,\n options,\n );\n }\n}\n","/**\n * @fileoverview Proposal Client - Comprehensive proposal management operations\n * @description Provides comprehensive proposal management operations for creating insurance proposals, managing proposal lifecycle,\n * document generation, product purchasing, and comparison tools within the insurance sales process.\n */\n\nimport type { HttpTransport } from \"../client/http.js\";\nimport type { GraphQLTransport } from \"../client/graphql.js\";\nimport type { InsurUpResult, InsurUpGraphQLResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport { endpoints } from \"../core/endpoints.js\";\nimport {\n ALL_PROPOSAL_FIELDS,\n type ProposalFieldKey,\n type GetProposalsOptions,\n type ProposalsConnection,\n} from \"@insurup/contracts\";\nimport { buildFieldSelection } from \"@insurup/contracts\";\nimport type {\n CreateProposalRequest,\n CreateProposalResult,\n GetProposalByIdResult,\n GetProposalProductPremiumDetailResult,\n PurchaseProposalProductSyncRequest,\n PurchaseProposalProductSyncResult,\n PurchaseProposalProductAsyncRequest,\n PurchaseProposalProductAsyncResult,\n GetProposalProductCoverageResult,\n ReviseProposalRequest,\n ReviseProposalResult,\n ReviseProposalProductRequest,\n FetchProposalProductDocumentRequest,\n FetchProposalProductDocumentResult,\n FetchProposalInformationFormDocumentRequest,\n FetchProposalInformationFormDocumentResult,\n SendProposalProductDocumentRequest,\n SendProposalInformationFormDocumentRequest,\n GenerateCompareProposalProductsPdfRequest,\n GenerateCompareProposalProductsPdfResult,\n SendCompareProposalProductsPdfRequest,\n SetProposalRepresentativeRequest,\n RetryFailedProposalProductRequest,\n GenerateCustomerProposalDocumentPdfRequest,\n GenerateCustomerProposalDocumentPdfResult,\n SetProposalBranchRequest,\n GetProposalConversionTrendRequest,\n GetProposalConversionTrendResult,\n} from \"@insurup/contracts\";\n\n/**\n * Proposal Management Client / Teklif Yönetimi İstemcisi\n *\n * Central client for managing the complete insurance proposal lifecycle from creation to policy conversion. Handles\n * proposal generation, product comparison, premium calculations, document management, customer communication, and the\n * purchasing process for various insurance products. Provides both synchronous and asynchronous purchasing options,\n * comprehensive document generation including comparison PDFs, and proposal revision capabilities. Essential for\n * agencies that need to create competitive insurance proposals, manage customer decision processes, and convert\n * proposals into active policies while maintaining detailed audit trails and customer communication records.\n *\n * Oluşturmadan poliçe dönüştürmeye kadar tam sigorta teklif yaşam döngüsünü yönetmek için merkezi istemci.\n * Teklif oluşturma, ürün karşılaştırması, prim hesaplamaları, belge yönetimi, müşteri iletişimi ve çeşitli sigorta\n * ürünleri için satın alma sürecini yönetir. Hem senkron hem de asenkron satın alma seçenekleri, karşılaştırma PDF'leri\n * dahil kapsamlı belge oluşturma ve teklif revizyon yetenekleri sağlar. Rekabetçi sigorta teklifleri oluşturması,\n * müşteri karar süreçlerini yönetmesi ve detaylı denetim izleri ile müşteri iletişim kayıtlarını korurken teklifleri\n * aktif poliçelere dönüştürmesi gereken acenteler için olmazsa olmazdır.\n */\nexport class InsurUpProposalClient {\n constructor(\n private readonly http: HttpTransport,\n private readonly graphql?: GraphQLTransport,\n ) {}\n\n /**\n * Creates a new insurance proposal with customer information, coverage selections, and product options for quotation.\n *\n * Fiyat teklifi için müşteri bilgileri, teminat seçimleri ve ürün seçenekleri ile yeni sigorta teklifi oluşturur.\n *\n * @param request - Proposal creation request with customer and coverage details / Müşteri ve teminat detayları ile teklif oluşturma talebi\n * @returns Created proposal information / Oluşturulan teklif bilgileri\n */\n async createProposal(\n request: CreateProposalRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<CreateProposalResult>> {\n return this.http.post<CreateProposalResult>(\n endpoints.proposals.create,\n request,\n options,\n );\n }\n\n /**\n * Retries a failed proposal product calculation or processing to attempt resolution of temporary issues.\n *\n * Geçici sorunların çözümünü denemek için başarısız teklif ürün hesaplama veya işlemesini yeniden dener.\n *\n * @param proposalId - Unique identifier of the proposal / Teklifin benzersiz tanımlayıcısı\n * @param proposalProductId - Unique identifier of the proposal product / Teklif ürününün benzersiz tanımlayıcısı\n * @returns Operation result / İşlem sonucu\n */\n async retryFailedProposalProduct(\n proposalId: string,\n proposalProductId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const request: RetryFailedProposalProductRequest = {\n proposalId,\n proposalProductId,\n };\n return this.http.postNoContent(\n endpoints.proposals.retryFailedProposalProduct.render(\n proposalId,\n proposalProductId,\n ),\n request,\n options,\n );\n }\n\n /**\n * Retrieves comprehensive details of a specific proposal including all products, coverage options, and pricing information.\n *\n * Tüm ürünler, teminat seçenekleri ve fiyatlandırma bilgileri dahil belirli bir teklifin kapsamlı detaylarını getirir.\n *\n * @param proposalId - Unique identifier of the proposal / Teklifin benzersiz tanımlayıcısı\n * @returns Detailed proposal information / Detaylı teklif bilgileri\n */\n async getProposalDetail(\n proposalId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetProposalByIdResult>> {\n return this.http.get<GetProposalByIdResult>(\n endpoints.proposals.getProposalById.render(proposalId),\n options,\n );\n }\n\n /**\n * Retrieves detailed premium breakdown information for a specific proposal product including installment options.\n *\n * Taksit seçenekleri dahil belirli bir teklif ürünü için detaylı prim dağılım bilgilerini getirir.\n *\n * @param proposalId - Unique identifier of the proposal / Teklifin benzersiz tanımlayıcısı\n * @param proposalProductId - Unique identifier of the proposal product / Teklif ürününün benzersiz tanımlayıcısı\n * @param installmentNumber - Installment option number / Taksit seçenek numarası\n * @returns Premium breakdown details / Prim dağılım detayları\n */\n async getProposalProductPremiumDetail(\n proposalId: string,\n proposalProductId: string,\n installmentNumber: number,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetProposalProductPremiumDetailResult>> {\n return this.http.get<GetProposalProductPremiumDetailResult>(\n endpoints.proposals.getProposalProductPremiumDetail.render(\n proposalId,\n proposalProductId,\n installmentNumber,\n ),\n options,\n );\n }\n\n /**\n * Purchases a proposal product synchronously, converting it to an active policy with immediate confirmation.\n *\n * Teklif ürününü senkron olarak satın alır ve anında onay ile aktif poliçeye dönüştürür.\n *\n * @param request - Synchronous purchase request / Senkron satın alma talebi\n * @returns Purchase confirmation with policy details / Poliçe detayları ile satın alma onayı\n */\n async purchaseProposalProductSync(\n request: PurchaseProposalProductSyncRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<PurchaseProposalProductSyncResult>> {\n return this.http.post<PurchaseProposalProductSyncResult>(\n endpoints.proposals.purchaseProposalProductSync.render(\n request.proposalId,\n request.proposalProductId,\n ),\n request,\n options,\n );\n }\n\n /**\n * Initiates an asynchronous purchase process for a proposal product, allowing for background processing and later confirmation.\n *\n * Arka plan işleme ve sonraki onay için teklif ürünü için asenkron satın alma sürecini başlatır.\n *\n * @param request - Asynchronous purchase request / Asenkron satın alma talebi\n * @returns Purchase initiation confirmation / Satın alma başlatma onayı\n */\n async purchaseProposalProductAsync(\n request: PurchaseProposalProductAsyncRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<PurchaseProposalProductAsyncResult>> {\n return this.http.post<PurchaseProposalProductAsyncResult>(\n endpoints.proposals.purchaseProposalProductAsync.render(\n request.proposalId,\n request.proposalProductId,\n ),\n request,\n options,\n );\n }\n\n /**\n * Retrieves detailed coverage configuration for a specific proposal product including all coverage options and limits.\n *\n * Tüm teminat seçenekleri ve limitleri dahil belirli bir teklif ürünü için detaylı teminat yapılandırmasını getirir.\n *\n * @param proposalId - Unique identifier of the proposal / Teklifin benzersiz tanımlayıcısı\n * @param proposalProductId - Unique identifier of the proposal product / Teklif ürününün benzersiz tanımlayıcısı\n * @returns Coverage configuration details / Teminat yapılandırma detayları\n */\n async getProposalProductCoverage(\n proposalId: string,\n proposalProductId: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetProposalProductCoverageResult>> {\n return this.http.get<GetProposalProductCoverageResult>(\n endpoints.proposals.getProposalProductCoverage.render(\n proposalId,\n proposalProductId,\n ),\n options,\n );\n }\n\n /**\n * Creates a revised version of an existing proposal with updated information, coverage changes, or customer modifications.\n *\n * Güncellenmiş bilgiler, teminat değişiklikleri veya müşteri değişiklikleri ile mevcut teklifin revize edilmiş versiyonunu oluşturur.\n *\n * @param request - Proposal revision request / Teklif revizyon talebi\n * @returns Revised proposal information / Revize edilmiş teklif bilgileri\n */\n async reviseProposal(\n request: ReviseProposalRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<ReviseProposalResult>> {\n return this.http.post<ReviseProposalResult>(\n endpoints.proposals.reviseProposal.render(request.proposalId),\n request,\n options,\n );\n }\n\n /**\n * Revises a specific product within a proposal with updated coverage options, limits, or pricing parameters.\n *\n * Güncellenmiş teminat seçenekleri, limitler veya fiyatlandırma parametreleri ile teklif içindeki belirli ürünü revize eder.\n *\n * @param request - Product revision request / Ürün revizyon talebi\n * @returns Operation result / İşlem sonucu\n */\n async reviseProposalProduct(\n request: ReviseProposalProductRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.proposals.reviseProposalProduct.render(\n request.proposalId,\n request.proposalProductId,\n ),\n request,\n options,\n );\n }\n\n /**\n * Fetches the official proposal document for a specific product from the insurance company's systems.\n *\n * Sigorta şirketinin sistemlerinden belirli bir ürün için resmi teklif belgesini getirir.\n *\n * @param request - Document fetch request / Belge getirme talebi\n * @returns Proposal document data / Teklif belgesi verisi\n */\n async fetchProposalProductDocument(\n request: FetchProposalProductDocumentRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<FetchProposalProductDocumentResult>> {\n return this.http.get<FetchProposalProductDocumentResult>(\n endpoints.proposals.fetchProposalProductDocument.render(\n request.proposalId,\n request.proposalProductId,\n ),\n options,\n );\n }\n\n /**\n * Fetches the information form document that contains detailed product information and terms for customer review.\n *\n * Müşteri incelemesi için detaylı ürün bilgileri ve şartları içeren bilgi formu belgesini getirir.\n *\n * @param request - Information form document request / Bilgi formu belgesi talebi\n * @returns Information form document data / Bilgi formu belgesi verisi\n */\n async fetchProposalInformationFormDocument(\n request: FetchProposalInformationFormDocumentRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<FetchProposalInformationFormDocumentResult>> {\n return this.http.get<FetchProposalInformationFormDocumentResult>(\n endpoints.proposals.fetchProposalInformationFormDocument.render(\n request.proposalId,\n request.proposalProductId,\n ),\n options,\n );\n }\n\n /**\n * Sends the proposal product document directly to the customer via email or other communication channels.\n *\n * Teklif ürün belgesini e-posta veya diğer iletişim kanalları aracılığıyla doğrudan müşteriye gönderir.\n *\n * @param request - Document delivery request / Belge teslim talebi\n * @returns Operation result / İşlem sonucu\n */\n async sendProposalProductDocument(\n request: SendProposalProductDocumentRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.proposals.sendProposalProductDocument.render(\n request.proposalId,\n request.proposalProductId,\n ),\n request,\n options,\n );\n }\n\n /**\n * Sends the information form document to the customer for detailed product review and decision making.\n *\n * Detaylı ürün incelemesi ve karar verme için bilgi formu belgesini müşteriye gönderir.\n *\n * @param request - Information form delivery request / Bilgi formu teslim talebi\n * @returns Operation result / İşlem sonucu\n */\n async sendProposalInformationFormDocument(\n request: SendProposalInformationFormDocumentRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.proposals.sendProposalInformationFormDocument.render(\n request.proposalId,\n request.proposalProductId,\n ),\n request,\n options,\n );\n }\n\n /**\n * Generates a comparative PDF document showing multiple proposal products side-by-side for customer decision support.\n *\n * Müşteri karar desteği için birden fazla teklif ürününü yan yana gösteren karşılaştırmalı PDF belgesi oluşturur.\n *\n * @param request - Comparison PDF generation request / Karşılaştırma PDF oluşturma talebi\n * @returns Generated comparison document / Oluşturulan karşılaştırma belgesi\n */\n async generateCompareProposalProductsPdf(\n request: GenerateCompareProposalProductsPdfRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GenerateCompareProposalProductsPdfResult>> {\n return this.http.post<GenerateCompareProposalProductsPdfResult>(\n endpoints.proposals.generateCompareProposalProductsPdf.render(\n request.proposalId,\n ),\n request,\n options,\n );\n }\n\n /**\n * Sends the proposal comparison PDF document to the customer to facilitate informed decision making between insurance options.\n *\n * Sigorta seçenekleri arasında bilinçli karar vermeyi kolaylaştırmak için teklif karşılaştırma PDF belgesini müşteriye gönderir.\n *\n * @param request - Comparison PDF delivery request / Karşılaştırma PDF teslim talebi\n * @returns Operation result / İşlem sonucu\n */\n async sendCompareProposalProductsPdf(\n request: SendCompareProposalProductsPdfRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.proposals.sendCompareProposalProductsPdf.render(\n request.proposalId,\n ),\n request,\n options,\n );\n }\n\n /**\n * Generates a professional PDF document containing selected proposal products for customer presentation.\n *\n * Müşteri sunumu için seçilen teklif ürünlerini içeren profesyonel bir PDF belgesi oluşturur.\n *\n * @param request Customer proposal document generation request / Müşteri teklif belgesi oluşturma talebi\n * @returns Generated document URL / Oluşturulan belge URL'i\n */\n async generateCustomerProposalDocumentPdf(\n request: GenerateCustomerProposalDocumentPdfRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GenerateCustomerProposalDocumentPdfResult>> {\n return this.http.post<GenerateCustomerProposalDocumentPdfResult>(\n endpoints.proposals.generateCustomerProposalDocumentPdf.render(\n request.proposalId,\n ),\n request,\n options,\n );\n }\n\n /**\n * Assigns or changes the branch for a proposal to organize proposal segmentation and reporting.\n *\n * Teklif segmentasyonu ve raporlama için teklifin şubesini atar veya değiştirir.\n *\n * @param request Branch assignment request / Şube atama talebi\n * @returns Operation result / İşlem sonucu\n */\n async setProposalBranch(\n request: SetProposalBranchRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.proposals.setProposalBranch.render(request.proposalId),\n request,\n options,\n );\n }\n\n /**\n * Retrieves proposal-to-policy conversion trend analytics as a time series.\n *\n * Tekliften poliçeye dönüşüm trendi analitiğini zaman serisi olarak getirir.\n *\n * @param request Conversion trend analytics request / Dönüşüm trendi analitik isteği\n * @returns Conversion trend analytics response / Dönüşüm trendi analitiği yanıtı\n */\n async getProposalConversionTrend(\n request: GetProposalConversionTrendRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetProposalConversionTrendResult>> {\n return this.http.post<GetProposalConversionTrendResult>(\n endpoints.proposals.getProposalConversionTrend.definition,\n request,\n options,\n );\n }\n\n /**\n * Assigns or updates the representative responsible for managing a specific proposal and customer relationship.\n *\n * Belirli bir teklifi ve müşteri ilişkisini yönetmekten sorumlu temsilciyi atar veya günceller.\n *\n * @param request - Representative assignment request / Temsilci atama talebi\n * @returns Operation result / İşlem sonucu\n */\n async setProposalRepresentative(\n request: SetProposalRepresentativeRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n return this.http.postNoContent(\n endpoints.proposals.setProposalRepresentative.render(request.proposalId),\n request,\n options,\n );\n }\n\n // ============================================================================\n // GRAPHQL QUERIES\n // ============================================================================\n\n /**\n * Queries proposals using GraphQL with advanced filtering, searching, sorting, and field selection.\n * Supports cursor-based pagination and type-safe field selection.\n *\n * Gelişmiş filtreleme, arama, sıralama ve alan seçimi ile GraphQL kullanarak teklifleri sorgular.\n * İmleç tabanlı sayfalama ve tip-güvenli alan seçimini destekler.\n *\n * @example\n * // Basic query with all fields\n * const result = await client.proposals.getProposals({ first: 10 });\n *\n * @example\n * // Type-safe field selection\n * const result = await client.proposals.getProposals({\n * select: ['id', 'productBranch', 'state', 'insuredCustomerName'] as const,\n * first: 10,\n * filter: { state: { eq: ProposalState.Active } }\n * });\n *\n * @param requestOptions Query options including pagination, filters, search, and field selection\n * @returns Paginated connection of proposals with type-narrowed fields\n */\n async getProposals<const TFields extends ProposalFieldKey[]>(\n requestOptions?: GetProposalsOptions<TFields>,\n options?: RequestOptions,\n ): Promise<InsurUpGraphQLResult<ProposalsConnection<TFields>>> {\n if (!this.graphql) {\n throw new Error(\n \"GraphQL transport is not available. Ensure the client is properly initialized.\",\n );\n }\n\n const fields = (requestOptions?.select ??\n ALL_PROPOSAL_FIELDS) as ProposalFieldKey[];\n const fieldSelection = buildFieldSelection(fields);\n\n const query = `\n query GetProposals(\n $first: Int\n $after: String\n $last: Int\n $before: String\n $search: searching_QueryProposalsResultFilterInput\n $filter: filtering_QueryProposalsResultFilterInput\n $order: [sorting_QueryProposalsResultSortInput!]\n ) {\n proposalsNew(\n first: $first\n after: $after\n last: $last\n before: $before\n search: $search\n filter: $filter\n order: $order\n ) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n totalCount\n edges {\n cursor\n node {\n ${fieldSelection}\n }\n }\n }\n }\n `;\n\n const variables = {\n first: requestOptions?.first,\n after: requestOptions?.after,\n last: requestOptions?.last,\n before: requestOptions?.before,\n search: requestOptions?.search,\n filter: requestOptions?.filter,\n order: requestOptions?.order,\n };\n\n const result = await this.graphql.query<{\n proposalsNew: Omit<ProposalsConnection, \"nodes\">;\n }>(query, variables, options);\n\n if (!result.isSuccess) {\n return result as InsurUpGraphQLResult<ProposalsConnection<TFields>>;\n }\n\n // Derive nodes from edges\n const edges = result.data.proposalsNew.edges;\n const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;\n\n return {\n ...result,\n data: {\n ...result.data.proposalsNew,\n nodes,\n },\n } as InsurUpGraphQLResult<ProposalsConnection<TFields>>;\n }\n}\n","/**\n * @fileoverview File Client - File upload operations\n * @description Provides file management operations for the InsurUp platform\n */\n\nimport type { HttpTransport } from \"../client/http.js\";\nimport type { InsurUpResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport { files } from \"../core/endpoints.js\";\nimport type {\n UploadPublicFileRequest,\n UploadPublicFileResult,\n} from \"@insurup/contracts\";\n\n/**\n * Provides file management operations for the InsurUp platform, enabling agents to upload and manage files\n * within the insurance ecosystem.\n */\nexport class InsurUpFileClient {\n constructor(private readonly http: HttpTransport) {}\n\n /**\n * Uploads a file to public storage and returns the file URL for public access.\n * Maximum file size is 1MB. Only available for agent users.\n *\n * Bir dosyayı genel depolamaya yükler ve genel erişim için dosya URL'sini döndürür.\n * Maksimum dosya boyutu 1MB'dir. Sadece acente kullanıcıları için kullanılabilir.\n *\n * @param request Upload configuration including optional path\n * @param file File content\n * @param fileName Name of the file\n * @returns File URL and path information\n */\n async uploadPublicFile(\n request: UploadPublicFileRequest,\n file: File,\n fileName: string,\n options?: RequestOptions,\n ): Promise<InsurUpResult<UploadPublicFileResult>> {\n const formData = new FormData();\n formData.append(\"file\", file, fileName);\n\n if (request.path) {\n formData.append(\"path\", request.path);\n }\n\n return this.http.post<UploadPublicFileResult>(\n files.uploadPublicFile,\n formData,\n options,\n );\n }\n}\n","/**\n * @fileoverview Language Client - Language and localization operations\n * @description Provides language and localization operations for retrieving available languages\n */\n\nimport type { HttpTransport } from \"../client/http.js\";\nimport type { InsurUpResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport { languages } from \"../core/endpoints.js\";\nimport type { LanguageResult } from \"@insurup/contracts\";\n\n/**\n * Provides language and localization operations for retrieving available languages in the InsurUp platform.\n * Essential for multi-language support and internationalization features.\n */\nexport class InsurUpLanguageClient {\n constructor(private readonly http: HttpTransport) {}\n\n /**\n * Retrieves all available languages in the system for localization and internationalization purposes.\n * Returns language information including language codes, native names, and English names.\n *\n * Yerelleştirme ve uluslararasılaştırma amaçları için sistemdeki tüm kullanılabilir dilleri getirir.\n * Dil kodları, yerel adlar ve İngilizce adlar dahil dil bilgilerini döndürür.\n *\n * @returns List of all available languages\n */\n async getLanguages(\n options?: RequestOptions,\n ): Promise<InsurUpResult<LanguageResult[]>> {\n return this.http.get<LanguageResult[]>(languages.getAll, options);\n }\n}\n","/**\n * @fileoverview Template Client - Template management operations\n * @description Provides template management operations for the InsurUp platform\n */\n\nimport type { HttpTransport } from \"../client/http.js\";\nimport type { InsurUpResult } from \"../core/result.js\";\nimport type { RequestOptions } from \"../core/options.js\";\nimport { templates } from \"../core/endpoints.js\";\nimport type {\n GetTemplateDefinitionsResult,\n QueryTemplatesResult,\n GetTemplateByKeyResult,\n UpdateTemplateRequest,\n DeleteTemplateRequest,\n} from \"@insurup/contracts\";\n\n/**\n * Provides template management operations for the InsurUp platform, enabling agents to retrieve and update\n * document templates, email templates, and other content templates used in insurance workflows.\n */\nexport class InsurUpTemplateClient {\n constructor(private readonly http: HttpTransport) {}\n\n /**\n * Retrieves all template definitions with their JSON schemas and metadata.\n * These definitions describe the structure and data models for all template types available in the system.\n * Only accessible by admin panel users and agent users with appropriate permissions.\n *\n * Tüm şablon tanımlarını JSON şemaları ve meta verileriyle getirir.\n * Bu tanımlar, sistemde mevcut tüm şablon türleri için yapı ve veri modellerini açıklar.\n * Sadece yönetici panel kullanıcıları ve uygun izinlere sahip acente kullanıcıları tarafından erişilebilir.\n *\n * @returns List of all template definitions\n */\n async getTemplateDefinitions(\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetTemplateDefinitionsResult[]>> {\n return this.http.get<GetTemplateDefinitionsResult[]>(\n templates.getDefinitions,\n options,\n );\n }\n\n /**\n * Retrieves all available templates in the system with their metadata and content.\n * Only accessible by admin panel users and agent users with appropriate permissions.\n *\n * Sistemdeki tüm kullanılabilir şablonları meta verileri ve içerikleriyle getirir.\n * Sadece yönetici panel kullanıcıları ve uygun izinlere sahip acente kullanıcıları tarafından erişilebilir.\n *\n * @returns List of all templates with their details\n */\n async getAllTemplates(\n options?: RequestOptions,\n ): Promise<InsurUpResult<QueryTemplatesResult[]>> {\n return this.http.get<QueryTemplatesResult[]>(templates.getAll, options);\n }\n\n /**\n * Retrieves a specific template by its unique key for a particular language.\n * Returns the complete template including content and JSON schema for data validation.\n *\n * Belirli bir dil için benzersiz anahtarına göre belirli bir şablonu getirir.\n * Veri doğrulama için içerik ve JSON şeması dahil tam şablonu döndürür.\n *\n * @param key Unique identifier key of the template\n * @param languageId Language identifier for template localization\n * @returns Complete template information\n */\n async getTemplateByKey(\n key: string,\n languageId: number,\n options?: RequestOptions,\n ): Promise<InsurUpResult<GetTemplateByKeyResult>> {\n const endpoint = `${templates.getByKey.render(key)}?languageId=${languageId}`;\n return this.http.get<GetTemplateByKeyResult>(endpoint, options);\n }\n\n /**\n * Updates an existing template with new content, name, description, and localization settings.\n * Allows administrators to maintain and modify templates used throughout the insurance platform.\n *\n * Mevcut bir şablonu yeni içerik, ad, açıklama ve yerelleştirme ayarlarıyla günceller.\n * Yöneticilerin sigorta platformu boyunca kullanılan şablonları sürdürmesine ve değiştirmesine olanak tanır.\n *\n * @param request Template update request with new content and metadata\n * @returns Operation result\n */\n async updateTemplate(\n request: UpdateTemplateRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = templates.update.render(request.key);\n return this.http.putNoContent(endpoint, request, options);\n }\n\n /**\n * Deletes a template owned by the current agent user.\n * Only agent users can delete templates they own. Templates with null AgentId or different AgentId cannot be deleted.\n *\n * Mevcut acente kullanıcısına ait bir şablonu siler.\n * Sadece acente kullanıcıları kendi şablonlarını silebilir. Null AgentId'ye sahip veya farklı AgentId'ye sahip şablonlar silinemez.\n *\n * @param request Template delete request with key and language ID\n * @returns Operation result\n */\n async deleteTemplate(\n request: DeleteTemplateRequest,\n options?: RequestOptions,\n ): Promise<InsurUpResult> {\n const endpoint = `${templates.delete.render(request.key)}?languageId=${request.languageId}`;\n return this.http.deleteNoContent(endpoint, options);\n }\n}\n","/**\n * @fileoverview Default InsurUp Client - Main SDK client implementation\n * @description Main SDK client implementation\n */\n\nimport { HttpTransport } from \"./http.js\";\nimport { GraphQLTransport } from \"./graphql.js\";\nimport type { InsurUpClientOptions } from \"../core/options.js\";\n\n// Import specialized clients\nimport { InsurUpAgentClient } from \"../clients/agent.js\";\nimport { InsurUpAgentBranchClient } from \"../clients/agentBranch.js\";\nimport { InsurUpAgentRoleClient } from \"../clients/agentRole.js\";\nimport { InsurUpAgentSetupClient } from \"../clients/agentSetup.js\";\nimport { InsurUpAgentUserClient } from \"../clients/agentUser.js\";\nimport { InsurUpCustomerClient } from \"../clients/customer.js\";\nimport { InsurUpVehicleClient } from \"../clients/vehicle.js\";\nimport { InsurUpPropertyClient } from \"../clients/property.js\";\nimport { InsurUpPolicyClient } from \"../clients/policy.js\";\nimport { InsurUpCaseClient } from \"../clients/case.js\";\nimport { InsurUpWebhookClient } from \"../clients/webhook.js\";\nimport { InsurUpCoverageClient } from \"../clients/coverage.js\";\nimport { InsurUpInsuranceClient } from \"../clients/insurance.js\";\nimport { InsurUpProposalClient } from \"../clients/proposal.js\";\nimport { InsurUpFileClient } from \"../clients/file.js\";\nimport { InsurUpLanguageClient } from \"../clients/language.js\";\nimport { InsurUpTemplateClient } from \"../clients/template.js\";\n\n/**\n * Main unified client providing comprehensive access to all InsurUp platform operations.\n * Aggregates specialized client interfaces for authentication, agent management, customer operations,\n * vehicle and property insurance, coverage management, and policy administration.\n */\nexport class DefaultInsurUpClient {\n private readonly http: HttpTransport;\n private readonly graphql: GraphQLTransport;\n\n /**\n * Agent Management Client\n *\n * Provides agent management operations for handling agent profiles, insurance company connections,\n * and business relationships within the insurance ecosystem.\n */\n public readonly agents: InsurUpAgentClient;\n\n /**\n * Agent Branch Management Client\n *\n * Provides branch management operations for insurance agents, enabling the creation and administration\n * of organizational branches within agency structures.\n */\n public readonly agentBranches: InsurUpAgentBranchClient;\n\n /**\n * Agent Role Management Client\n *\n * Provides role management operations for insurance agents, enabling the creation and administration\n * of role-based access control within agency hierarchies and permission structures.\n */\n public readonly agentRoles: InsurUpAgentRoleClient;\n\n /**\n * Agent Setup Client\n *\n * Provides agent onboarding and setup operations for new insurance agents joining the InsurUp platform,\n * facilitating the complete registration and configuration process required for business operations.\n */\n public readonly agentSetup: InsurUpAgentSetupClient;\n\n /**\n * Agent User Management Client\n *\n * Provides comprehensive user management operations for insurance agency staff, enabling agencies to manage\n * their team members, permissions, and access control within the InsurUp platform ecosystem.\n */\n public readonly agentUsers: InsurUpAgentUserClient;\n\n /**\n * Customer Management Client\n *\n * Provides comprehensive customer management operations for handling customer profiles, contact information,\n * health data, communication flows, and external customer data integration.\n */\n public readonly customers: InsurUpCustomerClient;\n\n /**\n * Vehicle Management Client\n *\n * Provides comprehensive vehicle management operations for handling customer vehicles, vehicle data lookups,\n * brand and model queries, and vehicle-based insurance operations within the automotive insurance ecosystem.\n */\n public readonly vehicles: InsurUpVehicleClient;\n\n /**\n * Property Management Client\n *\n * Provides comprehensive property management operations for handling customer properties, Turkish address hierarchy queries,\n * DASK earthquake insurance lookups, and property-based insurance operations within the real estate insurance ecosystem.\n */\n public readonly properties: InsurUpPropertyClient;\n\n /**\n * Policy Management Client\n *\n * Provides comprehensive policy management operations for handling insurance policies, policy documents,\n * representative assignments, and policy administration.\n */\n public readonly policies: InsurUpPolicyClient;\n\n /**\n * Case Management Client\n *\n * Provides comprehensive case management operations for handling customer service requests, claims processing,\n * sales opportunities, and complaint resolution within the insurance workflow.\n */\n public readonly cases: InsurUpCaseClient;\n\n /**\n * Webhook Management Client\n *\n * Provides comprehensive webhook management operations for configuring event notifications, monitoring delivery status,\n * and managing external system integrations within the InsurUp platform ecosystem.\n */\n public readonly webhooks: InsurUpWebhookClient;\n\n /**\n * Coverage Management Client\n *\n * Provides coverage management operations for configuring insurance product coverages, managing coverage groups,\n * and retrieving available coverage options for different insurance branches within the InsurUp platform.\n */\n public readonly coverage: InsurUpCoverageClient;\n\n /**\n * Insurance Industry Data Client\n *\n * Provides comprehensive insurance industry data access for retrieving insurance companies, products, resource keys,\n * release notes, and financial institution information essential for platform operations and integrations.\n */\n public readonly insurance: InsurUpInsuranceClient;\n\n /**\n * Proposal Management Client\n *\n * Provides comprehensive proposal management operations for creating insurance proposals, managing proposal lifecycle,\n * document generation, product purchasing, and comparison tools within the insurance sales process.\n */\n public readonly proposals: InsurUpProposalClient;\n\n /**\n * File Management Client\n *\n * Provides file management operations for the InsurUp platform, enabling agents to upload and manage files\n * within the insurance ecosystem.\n */\n public readonly files: InsurUpFileClient;\n\n /**\n * Language Management Client\n *\n * Provides language and localization operations for retrieving available languages in the InsurUp platform.\n * Essential for multi-language support and internationalization features.\n */\n public readonly languages: InsurUpLanguageClient;\n\n /**\n * Template Management Client\n *\n * Provides template management operations for the InsurUp platform, enabling agents to retrieve and update\n * document templates, email templates, and other content templates used in insurance workflows.\n */\n public readonly templates: InsurUpTemplateClient;\n\n public readonly options: InsurUpClientOptions;\n\n constructor(options?: InsurUpClientOptions) {\n this.http = new HttpTransport(options);\n this.graphql = new GraphQLTransport(this.http);\n this.options = options || {};\n\n // Initialize all specialized clients\n this.agents = new InsurUpAgentClient(this.http);\n this.agentBranches = new InsurUpAgentBranchClient(this.http);\n this.agentRoles = new InsurUpAgentRoleClient(this.http);\n this.agentSetup = new InsurUpAgentSetupClient(this.http);\n this.agentUsers = new InsurUpAgentUserClient(this.http, this.graphql);\n this.customers = new InsurUpCustomerClient(this.http, this.graphql);\n this.vehicles = new InsurUpVehicleClient(this.http);\n this.properties = new InsurUpPropertyClient(this.http);\n this.policies = new InsurUpPolicyClient(this.http, this.graphql);\n this.cases = new InsurUpCaseClient(this.http, this.graphql);\n this.webhooks = new InsurUpWebhookClient(this.http, this.graphql);\n this.coverage = new InsurUpCoverageClient(this.http);\n this.insurance = new InsurUpInsuranceClient(this.http);\n this.proposals = new InsurUpProposalClient(this.http, this.graphql);\n this.files = new InsurUpFileClient(this.http);\n this.languages = new InsurUpLanguageClient(this.http);\n this.templates = new InsurUpTemplateClient(this.http);\n }\n}\n"],"mappings":"wOAAA,IAAAA,GAAA,CACE,KAAQ,eACR,QAAW,QACX,YAAe,sHACf,SAAY,CACV,UACA,YACA,MACA,aACA,aACA,UACA,SACA,SACA,WACA,oBACA,oBACF,EACA,OAAU,eACV,QAAW,MACX,SAAY,+CACZ,WAAc,CACZ,KAAQ,MACR,IAAO,+CACT,EACA,KAAQ,CACN,IAAO,8CACT,EACA,QAAW,CACT,KAAQ,MACV,EACA,KAAQ,SACR,YAAe,GACf,KAAQ,mBACR,OAAU,kBACV,MAAS,oBACT,MAAS,CACP,MACF,EACA,QAAW,CACT,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A,uBACA,uBACA,QACA,iBACA,sBACA,mBACA,YACA,aACA,UACA,WAEA,iBACA,mBACA,uBACA,yBAEA,eACA,iBACA,kBACA,qBAEA,mBACA,qBACA,sBACA,wBACF,EC/GaC,GAAsB,CAEjC,gBACA,KACA,gBACA,QACA,oBACA,oBACA,gBACA,uBACA,YACA,cACA,sBACA,gCACA,2BACA,sBACA,gBACA,iBACA,UACA,0BACA,2BACA,8BACA,+BACA,6BACA,wCACA,uBACA,mBACA,mBACA,4BACA,8BACA,wBACA,yBACA,uBACA,wBACA,mBACA,kBACA,mBACA,2BACA,YACA,aAEA,iBACA,mBACA,uBACA,yBAEA,wBACA,0BACA,2BACA,6BACF,ECcaC,GAAkB,CAE7B,gBACA,KACA,MACA,OACA,SACA,gBACA,yBACA,qBACA,mBACA,YACA,WACA,gBACA,UACA,YACA,gBACA,cACA,iBACA,gBACA,oBACA,kBACA,qBACA,oBACA,gBACA,YACA,UACA,eACA,cACA,gBACA,mBACA,iBACA,iBACA,oBACA,kBACA,qBACA,oBACA,gBACA,aACA,eACA,eACA,mBACA,mBACA,oBACA,uBACA,wBACA,6BACA,kCACA,uBACA,oBACA,yBACA,cACA,mBACA,mBACA,wBACA,yBACA,uBACA,wBACA,mBACA,0BACA,sBACA,uBACA,0BACA,kBACA,oBACA,4BACA,8BACA,iBACA,sBACA,2BACA,uBACA,sBACA,oBACA,2BACA,wBACA,2BACA,oBACA,sBACA,cAEA,iBACA,mBACA,uBACA,yBAEA,yBACA,+BACA,4BACA,wBACF,ECnLaC,GAAwB,CAEnC,KACA,QACA,YACA,WACA,OACA,cACA,yBACA,QACA,YACA,cAEA,WACA,aACA,gBAEA,cACA,gBACA,oBACA,sBACA,iBACA,oBACF,EC9CaC,GAA6B,CACxC,KACA,YACA,UACA,wBACA,6BACA,aACF,ECOaC,GAAkC,CAE7C,KACA,qBACA,uBACA,uBACA,WACA,UACA,YACA,mBACA,uBACA,oBAEA,eACA,iBACA,kBACA,oBACF,ECjFYC,IAAAA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K,KAAM,KAAK,OAAO,EAC1D,KAAK,SAAW,IAAIC,EAAqB,KAAK,KAAM,KAAK,OAAO,EAChE,KAAK,SAAW,IAAIC,EAAsB,KAAK,IAAI,EACnD,KAAK,UAAY,IAAIC,EAAuB,KAAK,IAAI,EACrD,KAAK,UAAY,IAAIC,EAAsB,KAAK,KAAM,KAAK,OAAO,EAClE,KAAK,MAAQ,IAAIC,EAAkB,KAAK,IAAI,EAC5C,KAAK,UAAY,IAAIC,EAAsB,KAAK,IAAI,EACpD,KAAK,UAAY,IAAIC,EAAsB,KAAK,IAAI,CACtD,CACF","names":["package_default","VERSION","package_default","InsurUpClientErrorType","InsurUpServerErrorType","InsurUpGraphQLErrorCode","ERROR_TYPE_URLS","mapServerErrorType","typeString","normalizedType","parseValidationErrors","validationErrors","error","parseServerError","response","responseBody","errorData","parsed","type","createNetworkError","messageLower","createSerializationError","createDeserializationError","createUnexpectedNoContentError","extractError","error","InsurUpError","__publicField","createSuccess","data","createSuccessNoContent","getDataOrThrow","result","InsurUpError","throwIfError","getGraphQLDataOrThrow","throwIfGraphQLError","createGraphQLErrors","errors","DEFAULT_RETRY_OPTIONS","DEFAULT_LOGGER","message","data","DEFAULT_CLIENT_OPTIONS","mergeWithDefaults","options","withRetry","fn","options","retries","factor","minTimeout","maxTimeout","randomize","backoffStrategy","onFailedAttempt","attempt","error","delay","resolve","HttpTransport","options","__publicField","mergeWithDefaults","method","path","body","expectContent","startTime","requestConfig","error","executeRequest","attemptNumber","result","rawError","networkError","createNetworkError","withRetry","originalError","duration","retryableError","interceptorError","url","requestHeaders","serializedBody","createSerializationError","controller","timeoutId","signalCleanup","abortHandler","response","data","errorText","serverError","parseServerError","blob","createSuccess","deserializationError","createDeserializationError","additionalHeaders","headers","token","key","contentType","lowerContentType","createUnexpectedNoContentError","createSuccessNoContent","responseText","sanitizedHeaders","sanitizedBody","status","attempt","attemptInfo","sanitizedError","reason","sanitized","sensitiveHeaders","value","lowerKey","stringified","obj","propertyCount","maxDepth","countProperties","item","depth","i","keys","mapGraphQLErrorCode","code","parseExtensions","raw","c","s","parseGraphQLErrors","rawErrors","error","locations","loc","GraphQLTransport","http","query","variables","options","payload","result","response","parsedErrors","createGraphQLErrors","createSuccess","createDeserializationError","endpoints_exports","__export","addressParameters","agentBranches","agentRoles","agentSetupRequests","agentUsers","agents","b2c","banks","cases","contactForm","coverageChoices","coverageGroups","customers","endpoints","filePolicyTransfers","files","financialInstitutions","insuranceCompanies","insuranceServices","languages","policies","policyTransfers","properties","proposals","releaseNotes","resourceKeys","templates","vehicleParameters","vehicles","webhooks","agentInsuranceCompanyId","insuranceCompanyId","customerId","request","caseRef","base","contactFlowId","addressId","vehicleId","propertyId","proposalId","proposalProductId","installmentNumber","policyId","policyTransferId","policyTransferTriggerId","filePolicyTransferId","vehicleUtilizationStyle","id","userId","code","agentUserId","agentRoleId","webhookId","webhookDeliveryId","ref","bankId","key","InsurUpAgentClient","http","options","agents","request","agentInsuranceCompanyId","endpoint","b2c","InsurUpAgentBranchClient","http","request","options","agentBranches","id","endpoint","InsurUpAgentRoleClient","http","request","options","agentRoles","id","endpoint","InsurUpAgentSetupClient","http","request","options","agentSetupRequests","Channel","AssetType","CustomerType","ProductBranch","Currency","PaymentOption","PolicyState","InsuranceProductType","OnarimServisTuru","YedekParcaTuru","AracSegment","HastaneAgi","SaglikPaketiTedaviSekli","TasinanYuk","isCoverageValue","value","mergeCoverage","coverages","validCoverages","coverage","productBranch","mergeCoverageValue","values","definedValues","nonUndefinedValues","mergeProperty","allKeys","key","merged","sampleValue","v","PolicyTransferTriggerStatus","PolicyTransferCompanyFailureReason","TransferredPolicyStatus","TransferredPolicySkipReason","TransferredPolicyFailureReason","PropertyStructure","PropertyDamageStatus","PropertyUtilizationStyle","PropertyOwnershipType","LossPayeeClauseType","VehicleUtilizationStyle","VehicleFuelType","VehicleAccessoryType","DateTime","_DateTime","__publicField","date","DateOnly","_DateOnly","parts","y","m","d","Gender","EducationStatus","Nationality","MaritalStatus","Job","ContactFlowState","ContactType","ContactState","Surgery","Disease","ConsentType","CaseType","CaseMainState","CaseSubState","CaseStatus","SaleOpportunityCaseSubType","CancelCaseSubType","ComplaintCaseSubType","EndorsementCaseSubType","CaseActivityAction","RobotMode","CaseRepresentativeAssignmentMode","InsuranceSyncState","AgentInsuranceCompanyType","SmsImplementation","CallCenterImplementation","AgentUserState","B2CConfigFieldType","WebhookEvent","ProposalState","ProposalProductState","SortEnumType","buildFieldSelection","fields","indent","simpleFields","nestedFields","field","dotIndex","parent","nested","selections","nestedKeys","ALL_CUSTOMER_FIELDS","UserType","ALL_POLICY_FIELDS","ALL_PROPOSAL_FIELDS","ALL_CASE_FIELDS","ALL_AGENT_USER_FIELDS","ALL_POLICY_TRANSFER_FIELDS","ALL_FILE_POLICY_TRANSFER_FIELDS","WebhookDeliveryState","ALL_WEBHOOK_DELIVERY_FIELDS","InsurUpAgentUserClient","http","graphql","options","agentUsers","request","agentUserId","endpoint","code","requestOptions","fields","ALL_AGENT_USER_FIELDS","query","buildFieldSelection","variables","result","nodes","edge","InsurUpCustomerClient","http","graphql","request","options","type","rest","$type","CustomerType","endpoints","customerId","addressId","caseRef","requestOptions","fields","ALL_CUSTOMER_FIELDS","fieldSelection","buildFieldSelection","query","variables","result","nodes","edge","InsurUpVehicleClient","http","request","options","path","endpoints","customerId","vehicleId","brandCode","InsurUpPropertyClient","http","options","addressParameters","request","properties","customerId","propertyId","propertyNumber","daskPolicyNumber","InsurUpPolicyClient","http","graphql","request","options","endpoints","file","fileName","formData","requestOptions","fields","ALL_POLICY_FIELDS","fieldSelection","buildFieldSelection","query","variables","result","nodes","edge","ALL_POLICY_TRANSFER_FIELDS","ALL_FILE_POLICY_TRANSFER_FIELDS","InsurUpCaseClient","http","graphql","request","options","endpoint","cases","ref","requestOptions","fields","ALL_CASE_FIELDS","query","buildFieldSelection","variables","result","nodes","edge","InsurUpWebhookClient","http","graphql","request","options","webhooks","webhookId","endpoint","webhookDeliveryId","requestOptions","fields","ALL_WEBHOOK_DELIVERY_FIELDS","query","buildFieldSelection","variables","result","nodes","edge","InsurUpCoverageClient","http","request","options","coverageGroups","coverageGroupId","vehicleUtilizationStyle","endpoint","coverageChoices","InsurUpInsuranceClient","http","options","endpoints","insuranceCompanyId","path","bankId","InsurUpProposalClient","http","graphql","request","options","endpoints","proposalId","proposalProductId","installmentNumber","requestOptions","fields","ALL_PROPOSAL_FIELDS","query","buildFieldSelection","variables","result","nodes","edge","InsurUpFileClient","http","request","file","fileName","options","formData","files","InsurUpLanguageClient","http","options","languages","InsurUpTemplateClient","http","options","templates","key","languageId","endpoint","request","DefaultInsurUpClient","options","__publicField","HttpTransport","GraphQLTransport","InsurUpAgentClient","InsurUpAgentBranchClient","InsurUpAgentRoleClient","InsurUpAgentSetupClient","InsurUpAgentUserClient","InsurUpCustomerClient","InsurUpVehicleClient","InsurUpPropertyClient","InsurUpPolicyClient","InsurUpCaseClient","InsurUpWebhookClient","InsurUpCoverageClient","InsurUpInsuranceClient","InsurUpProposalClient","InsurUpFileClient","InsurUpLanguageClient","InsurUpTemplateClient"]}