@insurup/sdk 0.1.11 → 0.1.12
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.
- package/dist/index.browser.js +1 -1
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.browser.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Re=Object.defineProperty;var Ke=(e,t,r)=>t in e?Re(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var xe=(e,t)=>{for(var r in t)Re(e,r,{get:t[r],enumerable:!0})};var I=(e,t,r)=>Ke(e,typeof t!="symbol"?t+"":t,r);var Ie={name:"@insurup/sdk",version:"0.1.11",description:"Type-safe TypeScript SDK for the InsurUp insurance platform with GraphQL support. Tree-shakeable, works everywhere.",keywords:["insurup","insurance","sdk","typescript","api-client","graphql","policy","claims","coverage","vehicle-insurance","property-insurance"],author:"InsurUp Team",license:"MIT",homepage:"https://github.com/InsurUp/ts-toolkit#readme",repository:{type:"git",url:"git+https://github.com/InsurUp/ts-toolkit.git"},bugs:{url:"https://github.com/InsurUp/ts-toolkit/issues"},engines:{node:">=18"},type:"module",sideEffects:!1,main:"./dist/index.cjs",module:"./dist/index.js",types:"./dist/index.d.ts",files:["dist"],exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js",require:"./dist/index.cjs",default:"./dist/index.js"},"./browser":{types:"./dist/index.d.ts",import:"./dist/index.browser.js",default:"./dist/index.browser.js"}},scripts:{build:"tsup","build:tsc":"tsc","check-types":"tsc --noEmit",dev:"tsup --watch",docs:"typedoc",lint:"eslint src test --max-warnings 0",test:"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage"},publishConfig:{access:"public"},devDependencies:{"@eslint/js":"^9.39.2","@vitest/coverage-v8":"^4.0.17",eslint:"^9.39.2","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.5",msw:"^2.12.7",prettier:"^3.8.0",tsup:"^8.5.1",typedoc:"^0.28.16",typescript:"^5.9.3","typescript-eslint":"^8.53.1",vitest:"^4.0.17"},dependencies:{"@insurup/contracts":"workspace:*"}};var Ve=Ie.version;var J=(o=>(o.Unknown="Unknown",o.JsonSerialization="JsonSerialization",o.JsonDeserialization="JsonDeserialization",o.NullResponse="NullResponse",o.Timeout="Timeout",o.HttpRequestFailed="HttpRequestFailed",o.UnexpectedNoContent="UnexpectedNoContent",o.GraphQLError="GraphQLError",o))(J||{}),ie=(R=>(R.Unknown="Unknown",R.AccessDenied="AccessDenied",R.BusinessValidation="BusinessValidation",R.FeatureNotSupported="FeatureNotSupported",R.InputValidation="InputValidation",R.ResourceDuplicate="ResourceDuplicate",R.ResourceInvalidState="ResourceInvalidState",R.ResourceNotFound="ResourceNotFound",R.EndpointNotFound="EndpointNotFound",R.UnsupportedMediaType="UnsupportedMediaType",R.MethodNotAllowed="MethodNotAllowed",R.Unauthorized="Unauthorized",R.Upstream="Upstream",R))(ie||{}),X=(l=>(l.Forbidden="FORBIDDEN",l.Unauthorized="UNAUTHORIZED",l.NotFound="NOT_FOUND",l.BadRequest="BAD_REQUEST",l.Conflict="CONFLICT",l.NotSupported="NOT_SUPPORTED",l.UpstreamError="UPSTREAM_ERROR",l.InternalError="INTERNAL_ERROR",l.ValidationError="VALIDATION_ERROR",l.FilterRequired="FILTER_REQUIRED",l.FilterMaxSpanExceeded="FILTER_MAX_SPAN_EXCEEDED",l.Unknown="UNKNOWN",l))(X||{});var $e={"https://api.insurup.com/problems/access-denied":"AccessDenied","https://api.insurup.com/problems/business-validation":"BusinessValidation","https://api.insurup.com/problems/feature-not-supported":"FeatureNotSupported","https://api.insurup.com/problems/input-validation":"InputValidation","https://api.insurup.com/problems/resource-duplicate":"ResourceDuplicate","https://api.insurup.com/problems/resource-invalid-state":"ResourceInvalidState","https://api.insurup.com/problems/resource-not-found":"ResourceNotFound","https://api.insurup.com/problems/endpoint-not-found":"EndpointNotFound","https://api.insurup.com/problems/unauthorized":"Unauthorized","https://api.insurup.com/problems/upstream-service":"Upstream","https://api.insurup.com/problems/unsupported-media-type":"UnsupportedMediaType","https://api.insurup.com/problems/method-not-allowed":"MethodNotAllowed"};function Qe(e){let t=e.toLowerCase().trim();return $e[t]??"Unknown"}function Ye(e){return!e||!Array.isArray(e)?[]:e.filter(t=>t!=null).map(t=>({propertyName:t.propertyName??"",errorMessage:t.errorMessage??"",attemptedValue:t.attemptedValue??null}))}function ae(e,t){let r={};try{if(t.trim()){let a=JSON.parse(t);typeof a=="object"&&a!==null&&(r=a)}}catch{}let s=r.type??"https://api.insurup.com/problems/unknown",n=Qe(s);return{kind:"server-error",isSuccess:!1,message:r.detail??(e.statusText||"Unknown server error"),type:n,typeString:s,title:r.title??`HTTP ${e.status}`,detail:r.detail??(e.statusText||"Unknown server error"),instance:r.instance??"",status:r.status??e.status,codes:r.codes??[],traceId:r.traceId??void 0,template:r.template??"",templateArgs:r.templateArgs??{},suggestions:r.suggestions??[],validationErrors:Ye(r.validationErrors)}}function ee(e){if(e instanceof Error){if(e.name==="AbortError"||e.message.includes("timeout"))return{kind:"client-error",isSuccess:!1,message:"Request timed out",type:"Timeout",error:e};let t=e.message.toLowerCase();return e.name==="TypeError"||t.includes("fetch")||t.includes("network")||t.includes("failed")||t.includes("econn")||t.includes("enotfound")?{kind:"client-error",isSuccess:!1,message:"HTTP request failed",type:"HttpRequestFailed",error:e}:{kind:"client-error",isSuccess:!1,message:"HTTP request failed",type:"HttpRequestFailed",error:e}}return{kind:"client-error",isSuccess:!1,message:"Unknown error occurred",type:"Unknown",error:e}}function ge(e){return{kind:"client-error",isSuccess:!1,message:e instanceof Error?e.message:"Failed to serialize request to JSON",type:"JsonSerialization",error:e}}function L(e){return{kind:"client-error",isSuccess:!1,message:"Failed to parse response JSON",type:"JsonDeserialization",error:e}}function ue(){return{kind:"client-error",isSuccess:!1,message:"Expected response data but received no content",type:"UnexpectedNoContent"}}function We(e){return e instanceof P?e.error:{kind:"client-error",isSuccess:!1,message:e.message,type:"Unknown"}}var P=class extends Error{constructor(r){super(r.message);I(this,"error");this.name="InsurUpError",this.error=r}};function b(e){return{kind:"success",isSuccess:!0,message:"Success",data:e}}function le(){return{kind:"success",isSuccess:!0,message:"Success"}}function je(e){if(e.isSuccess)return e.data;throw new P(e)}function ze(e){if(!e.isSuccess)throw new P(e)}function Ze(e){if(e.isSuccess)return e.data;throw new P(e)}function Je(e){if(!e.isSuccess)throw new P(e)}function pe(e){return{kind:"graphql-error",isSuccess:!1,message:e[0]?.message??"Unknown GraphQL error",errors:e}}var Xe={retries:3,factor:2,minTimeout:1e3,maxTimeout:1e4,randomize:!0,backoffStrategy:"exponential",retryableStatusCodes:[408,429,500,502,503,504],onFailedAttempt:()=>{}},et={info:(e,t)=>{t!==void 0?console.info(e,t):console.info(e)},warn:(e,t)=>{t!==void 0?console.warn(e,t):console.warn(e)},error:(e,t)=>{t!==void 0?console.error(e,t):console.error(e)}},_={baseUrl:"https://api.insurup.com/api/",customHeaders:{},userAgent:"@insurup/sdk",timeoutMs:3e4,logLevel:"none",logger:et,retry:void 0,tokenProvider:void 0,onRequest:void 0,onResponse:void 0};function ye(e){return{baseUrl:e?.baseUrl??_.baseUrl,customHeaders:{..._.customHeaders,...e?.customHeaders},userAgent:e?.userAgent??_.userAgent,timeoutMs:e?.timeoutMs??_.timeoutMs,logLevel:e?.logLevel??_.logLevel,logger:e?.logger??_.logger,retry:e?.retry?{...Xe,...e.retry}:void 0,tokenProvider:e?.tokenProvider,onRequest:e?.onRequest,onResponse:e?.onResponse}}async function Ce(e,t){let{retries:r,factor:s,minTimeout:n,maxTimeout:a,randomize:p,backoffStrategy:m,onFailedAttempt:o}=t,c=1;for(;;)try{return await e(c)}catch(u){if(c>r)throw u;let l;switch(m){case"linear":l=n*c;break;case"constant":l=n;break;default:l=n*Math.pow(s,c-1)}p&&(l*=1+Math.random()),l=Math.min(l,a),o&&o({attemptNumber:c,retriesLeft:r-c+1,name:u instanceof Error?u.name:"Error",message:u instanceof Error?u.message:String(u),error:u instanceof Error?u:new Error(String(u))}),await new Promise(R=>setTimeout(R,l)),c++}}var te=class{constructor(t){I(this,"options");this.options=ye(t)}async sendInternal(t,r,s,n,a=!0){let p=Date.now(),o={url:`${this.options.baseUrl.replace(/\/$/,"")}/${r.replace(/^\//,"")}`,method:t,headers:{...this.options.customHeaders,...n?.headers},body:s};if(this.options.onRequest)try{o=await this.options.onRequest(o)}catch(u){this.options.logLevel!=="none"&&this.options.logger.warn("Request interceptor failed:",u)}this.logRequest(t,r,s,n?.headers);let c=async u=>{try{let d=await this.sendSingleRequest(o.method,r,o.body,{headers:o.headers,signal:n?.signal,timeoutMs:n?.timeoutMs},a);if(d.kind==="success")return d;if(this.shouldRetryResult(d)){let l=new Error(d.message);throw l.result=d,l.attemptNumber=u,l}return d}catch(d){let l=ee(d);if(l.type==="Timeout")return l;if(l.type==="HttpRequestFailed"&&this.options.retry){let R=new Error(l.message);throw R.result=l,R.attemptNumber=u,R}return l}};try{let u;this.options.retry?u=await Ce(c,{...this.options.retry,onFailedAttempt:l=>{let R=l.error;R.result&&this.logRetry(l.attemptNumber,R.result),this.options.retry?.onFailedAttempt&&this.options.retry.onFailedAttempt(l)}}):u=await c(1);let d=Date.now()-p;if(this.logResponse("SUCCESS",d,1,u),this.options.onResponse)try{return await this.options.onResponse(u,o)}catch(l){this.options.logLevel!=="none"&&this.options.logger.warn("Response interceptor failed:",l)}return u}catch(u){let d=Date.now()-p,l=u;if(l.result){if(this.logResponse("ERROR",d,l.attemptNumber||1,l.result),this.options.onResponse)try{return await this.options.onResponse(l.result,o)}catch(oe){this.options.logLevel!=="none"&&this.options.logger.warn("Response interceptor failed:",oe)}return l.result}let R=ee(u);if(this.logResponse("ERROR",d,1,R),this.options.onResponse)try{return await this.options.onResponse(R,o)}catch(oe){this.options.logLevel!=="none"&&this.options.logger.warn("Response interceptor failed:",oe)}return R}}async sendSingleRequest(t,r,s,n,a=!0){let p=`${this.options.baseUrl.replace(/\/$/,"")}/${r.replace(/^\//,"")}`,m=await this.buildHeaders(n?.headers),o=null;if(s)if(s instanceof FormData)o=s;else try{o=JSON.stringify(s),this.hasContentTypeHeader(m)||(m["Content-Type"]="application/json")}catch(R){return ge(R)}let c=new AbortController,u=setTimeout(()=>c.abort(),n?.timeoutMs??this.options.timeoutMs),d;if(n?.signal)if(n.signal.aborted)c.abort();else{let R=()=>c.abort();n.signal.addEventListener("abort",R,{once:!0}),d=()=>n.signal.removeEventListener("abort",R)}let l;try{l=await fetch(p,{method:t,headers:m,body:o,signal:c.signal})}finally{clearTimeout(u),d?.()}return await this.handleResponse(l,a)}async get(t,r){return this.sendInternal("GET",t,null,r,!0)}async post(t,r,s){return this.sendInternal("POST",t,r,s,!0)}async postNoContent(t,r,s){return this.sendInternal("POST",t,r,s,!1)}async put(t,r,s){return this.sendInternal("PUT",t,r,s,!0)}async putNoContent(t,r,s){return this.sendInternal("PUT",t,r,s,!1)}async patch(t,r,s){return this.sendInternal("PATCH",t,r,s,!0)}async patchNoContent(t,r,s){return this.sendInternal("PATCH",t,r,s,!1)}async delete(t,r){return this.sendInternal("DELETE",t,null,r,!0)}async deleteNoContent(t,r){return this.sendInternal("DELETE",t,null,r,!1)}async getBlob(t,r){let s=`${this.options.baseUrl.replace(/\/$/,"")}/${t.replace(/^\//,"")}`,n=await this.buildHeaders(r?.headers),a={url:s,method:"GET",headers:n};if(this.options.onRequest)try{a=await this.options.onRequest(a)}catch(u){this.options.logLevel!=="none"&&this.options.logger.warn("Request interceptor failed:",u)}this.logRequest("GET",t,void 0,r?.headers);let p=new AbortController,m=setTimeout(()=>p.abort(),r?.timeoutMs??this.options.timeoutMs),o;if(r?.signal)if(r.signal.aborted)p.abort();else{let u=()=>p.abort();r.signal.addEventListener("abort",u,{once:!0}),o=()=>r.signal.removeEventListener("abort",u)}let c;try{c=await fetch(s,{method:"GET",headers:a.headers,signal:p.signal})}catch(u){let d=ee(u);if(this.options.onResponse)try{return await this.options.onResponse(d,a)}catch(l){this.options.logLevel!=="none"&&this.options.logger.warn("Response interceptor failed:",l)}return d}finally{clearTimeout(m),o?.()}if(!c.ok){let u=await c.text(),d=ae(c,u);if(this.options.onResponse)try{return await this.options.onResponse(d,a)}catch(l){this.options.logLevel!=="none"&&this.options.logger.warn("Response interceptor failed:",l)}return d}try{let u=await c.blob(),d=b(u);if(this.options.onResponse)try{return await this.options.onResponse(d,a)}catch(l){this.options.logLevel!=="none"&&this.options.logger.warn("Response interceptor failed:",l)}return d}catch(u){let d=L(u);if(this.options.onResponse)try{return await this.options.onResponse(d,a)}catch(l){this.options.logLevel!=="none"&&this.options.logger.warn("Response interceptor failed:",l)}return d}}async buildHeaders(t){let r={...this.options.customHeaders,...t};if(!(typeof globalThis=="object"&&"window"in globalThis)&&this.options.userAgent&&(r["User-Agent"]=this.options.userAgent),this.options.tokenProvider)try{let n=await this.options.tokenProvider();n&&(r.Authorization=`Bearer ${n}`)}catch(n){this.options.logLevel!=="none"&&this.options.logger.warn("Token provider failed:",n)}return r}hasContentTypeHeader(t){return Object.keys(t).some(r=>r.toLowerCase()==="content-type")}isJsonContentType(t){let r=t.toLowerCase();return r.includes("application/json")||r.includes("application/vnd.api+json")||r.includes("application/hal+json")||r.includes("application/problem+json")||r.includes("text/json")||/^application\/.*\+json/i.test(t)}async handleResponse(t,r){if(!t.ok){let a=await t.text();return ae(t,a)}if(t.status===204||t.status===205)return r?ue():le();let s=await t.text();if(!s.trim())return r?ue():le();let n=t.headers.get("content-type");return n&&!this.isJsonContentType(n)?L(new Error(`Expected JSON response but got ${n}`)):this.parseSuccessResponse(s)}parseSuccessResponse(t){try{let r=JSON.parse(t);return b(r)}catch(r){return L(r)}}shouldRetryResult(t){return this.options.retry?t.kind==="server-error"?this.options.retry.retryableStatusCodes.includes(t.status):t.kind==="client-error"?t.type==="HttpRequestFailed":!1:!1}logRequest(t,r,s,n){if(this.options.logLevel==="none")return;let a=`${this.options.baseUrl.replace(/\/$/,"")}/${r.replace(/^\//,"")}`;if(this.options.logLevel==="basic")this.options.logger.info(`${t} ${a}`);else if(this.options.logLevel==="detailed"){let p=this.sanitizeHeaders(n),m=this.sanitizeBody(s);this.options.logger.info(`Request: ${t} ${a}`,{headers:p,body:m})}}logResponse(t,r,s,n){if(this.options.logLevel==="none")return;let a=s>1?` (attempt ${s})`:"";if(this.options.logLevel==="basic")t==="SUCCESS"?this.options.logger.info(`${t} in ${r}ms${a}`):this.options.logger.error(`${t} in ${r}ms${a}`);else if(this.options.logLevel==="detailed")if(t==="SUCCESS"){let p=n.kind==="success"&&"data"in n?this.sanitizeResponseData(n.data):void 0;this.options.logger.info(`Response: ${t} in ${r}ms${a}`,{data:p})}else{let p=this.sanitizeError(n);this.options.logger.error(`Response: ${t} in ${r}ms${a}`,{error:p})}}logRetry(t,r){if(this.options.logLevel==="none")return;let s=r.kind==="server-error"?`HTTP ${r.status}`:r.kind==="client-error"?r.type:"Unknown error";this.options.logger.warn(`Retry attempt ${t} failed due to: ${s}`)}sanitizeHeaders(t){if(!t)return;let r={},s=["authorization","cookie","x-api-key","x-auth-token"];for(let[n,a]of Object.entries(t)){let p=n.toLowerCase();s.includes(p)?r[n]="[REDACTED]":r[n]=a}return r}sanitizeBody(t){if(t){if(t instanceof FormData)return"[FormData body]";if(typeof t=="string")return t.length>1e4?"[Large string body - truncated for logging]":t.length>1e3?`${t.substring(0,1e3)}... [truncated]`:t;if(typeof t=="number"||typeof t=="boolean")return t;try{if(this.isLargeObject(t))return"[Large object body - truncated for logging]";let r=JSON.stringify(t);return r.length>1e3?`${r.substring(0,1e3)}... [truncated]`:t}catch{return"[Unable to serialize body]"}}}isLargeObject(t){if(!t||typeof t!="object")return!1;try{let r=0,s=0,n=(a,p=0)=>{if(p>3||r>50)return!0;if(s=Math.max(s,p),Array.isArray(a)){if(a.length>100)return!0;for(let m=0;m<Math.min(a.length,10);m++)if(n(a[m],p+1))return!0}else if(a&&typeof a=="object"){let m=Object.keys(a);r+=m.length;for(let o of m.slice(0,10))if(n(a[o],p+1))return!0}return!1};return n(t)}catch{return!0}}sanitizeResponseData(t){if(t==null)return t;try{if(this.isLargeObject(t))return"[Large response data - truncated for logging]";let r=JSON.stringify(t);return r.length>1e3?`${r.substring(0,1e3)}... [truncated]`:t}catch{return"[Unable to serialize response data]"}}sanitizeError(t){return t.kind==="server-error"?{type:t.type,status:t.status,title:t.title,detail:t.detail,traceId:t.traceId}:t.kind==="client-error"?{type:t.type,message:t.message}:{message:"Unknown error type"}}};function tt(e){if(typeof e!="string")return"UNKNOWN";switch(e.toUpperCase()){case"FORBIDDEN":return"FORBIDDEN";case"UNAUTHORIZED":return"UNAUTHORIZED";case"NOT_FOUND":return"NOT_FOUND";case"BAD_REQUEST":return"BAD_REQUEST";case"CONFLICT":return"CONFLICT";case"NOT_SUPPORTED":return"NOT_SUPPORTED";case"UPSTREAM_ERROR":return"UPSTREAM_ERROR";case"INTERNAL_ERROR":return"INTERNAL_ERROR";case"VALIDATION_ERROR":return"VALIDATION_ERROR";case"FILTER_REQUIRED":return"FILTER_REQUIRED";case"FILTER_MAX_SPAN_EXCEEDED":return"FILTER_MAX_SPAN_EXCEEDED";default:return"UNKNOWN"}}function rt(e){return e?{...e,code:tt(e.code),traceId:typeof e.traceId=="string"?e.traceId:void 0,codes:Array.isArray(e.codes)?e.codes.filter(r=>typeof r=="string"):void 0,template:typeof e.template=="string"?e.template:void 0,templateArgs:typeof e.templateArgs=="object"&&e.templateArgs!==null?e.templateArgs:void 0,suggestions:Array.isArray(e.suggestions)?e.suggestions.filter(r=>typeof r=="string"):void 0}:void 0}function st(e){return e.map(t=>{let r=t.locations?.map(s=>({line:s.line,column:s.column}));return{message:t.message,locations:r,path:t.path,extensions:rt(t.extensions)}})}var v=class{constructor(t){this.http=t}async query(t,r,s){let n={query:t,variables:r},a=await this.http.post("graphql",n,s);if(!a.isSuccess)return a;let p=a.data;if(p.errors&&p.errors.length>0){let m=st(p.errors);return pe(m)}return p.data?b(p.data):L(new Error("GraphQL response contained no data and no errors"))}};var ve={};xe(ve,{addressParameters:()=>A,agentBranches:()=>N,agentRoles:()=>O,agentSetupRequests:()=>re,agentUsers:()=>y,agents:()=>h,b2c:()=>D,banks:()=>Se,cases:()=>g,contactForm:()=>nt,coverageChoices:()=>S,coverageGroups:()=>U,customers:()=>Pe,endpoints:()=>i,filePolicyTransfers:()=>Le,files:()=>se,financialInstitutions:()=>be,insuranceCompanies:()=>he,insuranceServices:()=>Ue,languages:()=>ne,policies:()=>Te,policyTransfers:()=>Oe,properties:()=>f,proposals:()=>Ne,releaseNotes:()=>_e,resourceKeys:()=>Ee,templates:()=>T,vehicleParameters:()=>Ae,vehicles:()=>fe,webhooks:()=>E});var nt={submit:"contact-form"},h={getCurrentAgent:"agents/me",updateCurrentAgent:"agents/me",reSyncCurrentAgentWithInsurance:"agents/me/re-sync",insuranceCompanies:{getMyInsuranceCompanies:"agents/me/insurance-companies",addInsuranceCompanyToAgent:"agents/me/insurance-companies",getBranches:{definition:"agents/me/insurance-companies/{AgentInsuranceCompanyId}/branches",render:e=>"agents/me/insurance-companies/{AgentInsuranceCompanyId}/branches".replace("{AgentInsuranceCompanyId}",encodeURIComponent(e))},getConnection:{definition:"agents/me/insurance-companies/{AgentInsuranceCompanyId}/connection",render:e=>"agents/me/insurance-companies/{AgentInsuranceCompanyId}/connection".replace("{AgentInsuranceCompanyId}",encodeURIComponent(e))},updateConnection:{definition:"agents/me/insurance-companies/{AgentInsuranceCompanyId}/connection",render:e=>"agents/me/insurance-companies/{AgentInsuranceCompanyId}/connection".replace("{AgentInsuranceCompanyId}",encodeURIComponent(e))},updateBranches:{definition:"agents/me/insurance-companies/{AgentInsuranceCompanyId}/branches",render:e=>"agents/me/insurance-companies/{AgentInsuranceCompanyId}/branches".replace("{AgentInsuranceCompanyId}",encodeURIComponent(e))},reSyncAgentInsuranceCompanyWithInsurance:{definition:"agents/me/insurance-companies/{AgentInsuranceCompanyId}/re-sync",render:e=>"agents/me/insurance-companies/{AgentInsuranceCompanyId}/re-sync".replace("{AgentInsuranceCompanyId}",encodeURIComponent(e))},remove:{definition:"agents/me/insurance-companies/{AgentInsuranceCompanyId}",render:e=>"agents/me/insurance-companies/{AgentInsuranceCompanyId}".replace("{AgentInsuranceCompanyId}",encodeURIComponent(e))}}},he={getInsuranceCompanies:"insurance-companies",getInsuranceCompanyProducts:{definition:"insurance-companies/{InsuranceCompanyId}/products",render:e=>"insurance-companies/{InsuranceCompanyId}/products".replace("{InsuranceCompanyId}",encodeURIComponent(e.toString()))},getAllProducts:"insurance-companies/products",connectionFields:{getAgentBasedConnectionFieldsByCompanyId:{definition:"insurance-companies/{InsuranceCompanyId}/connection-fields:agent-based",render:e=>"insurance-companies/{InsuranceCompanyId}/connection-fields:agent-based".replace("{InsuranceCompanyId}",encodeURIComponent(e.toString()))}}},Ee={getAll:"resource-keys"},Pe={createCustomer:"customers",getCurrentCustomer:"customers/me",externalLookup:"customers/external-lookup",setCustomerRepresentative:{definition:"customers/{CustomerId}/representative",render:e=>"customers/{CustomerId}/representative".replace("{CustomerId}",encodeURIComponent(e))},getCustomer:{definition:"customers/{CustomerId}",render:e=>"customers/{CustomerId}".replace("{CustomerId}",encodeURIComponent(e))},updateCustomer:{definition:"customers/{CustomerId}",render:e=>"customers/{CustomerId}".replace("{CustomerId}",encodeURIComponent(e))},deleteCustomer:{definition:"customers/{CustomerId}",render:e=>"customers/{CustomerId}".replace("{CustomerId}",encodeURIComponent(e))},getHealthInfo:{definition:"customers/{CustomerId}/health-info",render:e=>"customers/{CustomerId}/health-info".replace("{CustomerId}",encodeURIComponent(e))},updateHealthInfo:{definition:"customers/{CustomerId}/health-info",render:e=>"customers/{CustomerId}/health-info".replace("{CustomerId}",encodeURIComponent(e))},emails:{addCustomerEmail:{definition:"customers/{CustomerId}/emails",render:e=>"customers/{CustomerId}/emails".replace("{CustomerId}",encodeURIComponent(e))},removeCustomerEmail:{definition:"customers/{CustomerId}/emails/{Email}",render:e=>"customers/{CustomerId}/emails/{Email}".replace("{CustomerId}",encodeURIComponent(e.customerId)).replace("{Email}",encodeURIComponent(e.email))},changePrimaryCustomerEmail:{definition:"customers/{CustomerId}/emails/{Email}/primary",render:e=>"customers/{CustomerId}/emails/{Email}/primary".replace("{CustomerId}",encodeURIComponent(e.customerId)).replace("{Email}",encodeURIComponent(e.email))},getCustomerEmails:{definition:"customers/{CustomerId}/emails",render:e=>"customers/{CustomerId}/emails".replace("{CustomerId}",encodeURIComponent(e))}},phoneNumbers:{addCustomerPhoneNumber:{definition:"customers/{CustomerId}/phone-numbers",render:e=>"customers/{CustomerId}/phone-numbers".replace("{CustomerId}",encodeURIComponent(e))},removeCustomerPhoneNumber:{definition:"customers/{CustomerId}/phone-numbers/{CountryCode}-{PhoneNumber}",render:e=>"customers/{CustomerId}/phone-numbers/{CountryCode}-{PhoneNumber}".replace("{CustomerId}",encodeURIComponent(e.customerId)).replace("{CountryCode}",encodeURIComponent(e.countryCode.toString())).replace("{PhoneNumber}",encodeURIComponent(e.phoneNumber))},changePrimaryCustomerPhoneNumber:{definition:"customers/{CustomerId}/phone-numbers/{CountryCode}-{PhoneNumber}/primary",render:e=>"customers/{CustomerId}/phone-numbers/{CountryCode}-{PhoneNumber}/primary".replace("{CustomerId}",encodeURIComponent(e.customerId)).replace("{CountryCode}",encodeURIComponent(e.countryCode.toString())).replace("{PhoneNumber}",encodeURIComponent(e.phoneNumber))},getCustomerPhoneNumbers:{definition:"customers/{CustomerId}/phone-numbers",render:e=>"customers/{CustomerId}/phone-numbers".replace("{CustomerId}",encodeURIComponent(e))}},contactFlows:{getCustomerContactFlows:{definition:"customers/{CustomerId}/contact-flows",render:(e,t)=>{let r="customers/{CustomerId}/contact-flows".replace("{CustomerId}",encodeURIComponent(e));return t?r+"?caseRef="+encodeURIComponent(t):r}},createContactFlow:{definition:"customers/{CustomerId}/contact-flows",render:e=>"customers/{CustomerId}/contact-flows".replace("{CustomerId}",encodeURIComponent(e))},endContactFlow:{definition:"customers/{CustomerId}/contact-flows/{ContactFlowId}/end",render:(e,t)=>"customers/{CustomerId}/contact-flows/{ContactFlowId}/end".replace("{CustomerId}",encodeURIComponent(e)).replace("{ContactFlowId}",encodeURIComponent(t))}},contacts:{getCustomerContacts:{definition:"customers/{CustomerId}/contacts",render:(e,t)=>{let r="customers/{CustomerId}/contacts".replace("{CustomerId}",encodeURIComponent(e));return t?r+"?caseRef="+encodeURIComponent(t):r}},create:{definition:"customers/{CustomerId}/contacts",render:e=>"customers/{CustomerId}/contacts".replace("{CustomerId}",encodeURIComponent(e))}},setCustomerBranch:{definition:"customers/{CustomerId}/branch",render:e=>"customers/{CustomerId}/branch".replace("{CustomerId}",encodeURIComponent(e))},addresses:{create:{definition:"customers/{CustomerId}/addresses",render:e=>"customers/{CustomerId}/addresses".replace("{CustomerId}",encodeURIComponent(e))},update:{definition:"customers/{CustomerId}/addresses/{AddressId}",render:(e,t)=>"customers/{CustomerId}/addresses/{AddressId}".replace("{CustomerId}",encodeURIComponent(e)).replace("{AddressId}",encodeURIComponent(t))},getById:{definition:"customers/{CustomerId}/addresses/{AddressId}",render:(e,t)=>"customers/{CustomerId}/addresses/{AddressId}".replace("{CustomerId}",encodeURIComponent(e)).replace("{AddressId}",encodeURIComponent(t))},getAll:{definition:"customers/{CustomerId}/addresses",render:e=>"customers/{CustomerId}/addresses".replace("{CustomerId}",encodeURIComponent(e))},delete:{definition:"customers/{CustomerId}/addresses/{AddressId}",render:(e,t)=>"customers/{CustomerId}/addresses/{AddressId}".replace("{CustomerId}",encodeURIComponent(e)).replace("{AddressId}",encodeURIComponent(t))}},consents:{give:{definition:"customers/{CustomerId}/consents",render:e=>"customers/{CustomerId}/consents".replace("{CustomerId}",encodeURIComponent(e))},revoke:{definition:"customers/{CustomerId}/consents/revoke",render:e=>"customers/{CustomerId}/consents/revoke".replace("{CustomerId}",encodeURIComponent(e))},getAll:{definition:"customers/{CustomerId}/consents",render:e=>"customers/{CustomerId}/consents".replace("{CustomerId}",encodeURIComponent(e))}}},A={queryCities:"address-parameters/cities",queryDistricts:{definition:"address-parameters/districts",render:e=>"address-parameters/districts?cityReference={cityReference}".replace("{cityReference}",e.cityReference)},queryTowns:{definition:"address-parameters/towns",render:e=>"address-parameters/towns?districtReference={districtReference}".replace("{districtReference}",e.districtReference)},queryNeighbourhoods:{definition:"address-parameters/neighbourhoods",render:e=>"address-parameters/neighbourhoods?townReference={townReference}".replace("{townReference}",e.townReference)},queryStreets:{definition:"address-parameters/streets",render:e=>"address-parameters/streets?neighbourhoodReference={neighbourhoodReference}".replace("{neighbourhoodReference}",e.neighbourhoodReference)},queryBuildings:{definition:"address-parameters/buildings",render:e=>"address-parameters/buildings?streetReference={streetReference}".replace("{streetReference}",e.streetReference)},queryApartments:{definition:"address-parameters/apartments",render:e=>"address-parameters/apartments?buildingReference={buildingReference}".replace("{buildingReference}",e.buildingReference)}},Ae={queryBrands:"vehicle-parameters/brands",queryModels:{definition:"vehicle-parameters/models",render:e=>"vehicle-parameters/models?brandReference={brandReference}&year={year}".replace("{brandReference}",encodeURIComponent(e.brandReference)).replace("{year}",encodeURIComponent(e.year.toString()))}},fe={getCurrentCustomerVehicles:"customers/me/vehicles",externalLookup:{definition:"customers/{CustomerId}/vehicles/external-lookup",render:e=>"customers/{CustomerId}/vehicles/external-lookup".replace("{CustomerId}",encodeURIComponent(e))},create:{definition:"customers/{CustomerId}/vehicles",render:e=>"customers/{CustomerId}/vehicles".replace("{CustomerId}",encodeURIComponent(e))},update:{definition:"customers/{CustomerId}/vehicles/{VehicleId}",render:(e,t)=>"customers/{CustomerId}/vehicles/{VehicleId}".replace("{CustomerId}",encodeURIComponent(e)).replace("{VehicleId}",encodeURIComponent(t))},delete:{definition:"customers/{CustomerId}/vehicles/{VehicleId}",render:(e,t)=>"customers/{CustomerId}/vehicles/{VehicleId}".replace("{CustomerId}",encodeURIComponent(e)).replace("{VehicleId}",encodeURIComponent(t))},get:{definition:"customers/{CustomerId}/vehicles/{VehicleId}",render:(e,t)=>"customers/{CustomerId}/vehicles/{VehicleId}".replace("{CustomerId}",encodeURIComponent(e)).replace("{VehicleId}",encodeURIComponent(t))},getCustomerVehicles:{definition:"customers/{CustomerId}/vehicles",render:e=>"customers/{CustomerId}/vehicles".replace("{CustomerId}",encodeURIComponent(e))}},Ue={queryVehicleByBrandCode:"insurance-services/query-vehicle-by-brand-code"},f={getPropertyAddressByPropertyNumber:"properties/query-address-by-property-number",queryPropertyByDaskOldPolicy:"properties/query-property-by-dask-old-policy",getCurrentCustomerProperties:"customers/me/properties",getAll:{definition:"customers/{CustomerId}/properties",render:e=>"customers/{CustomerId}/properties".replace("{CustomerId}",encodeURIComponent(e))},create:{definition:"customers/{CustomerId}/properties",render:e=>"customers/{CustomerId}/properties".replace("{CustomerId}",encodeURIComponent(e))},getById:{definition:"customers/{CustomerId}/properties/{PropertyId}",render:(e,t)=>"customers/{CustomerId}/properties/{PropertyId}".replace("{CustomerId}",encodeURIComponent(e)).replace("{PropertyId}",encodeURIComponent(t))},update:{definition:"customers/{CustomerId}/properties/{PropertyId}",render:(e,t)=>"customers/{CustomerId}/properties/{PropertyId}".replace("{CustomerId}",encodeURIComponent(e)).replace("{PropertyId}",encodeURIComponent(t))},delete:{definition:"customers/{CustomerId}/properties/{PropertyId}",render:(e,t)=>"customers/{CustomerId}/properties/{PropertyId}".replace("{CustomerId}",encodeURIComponent(e)).replace("{PropertyId}",encodeURIComponent(t))}},Ne={create:"proposals",getProposalById:{definition:"proposals/{ProposalId}",render:e=>"proposals/{ProposalId}".replace("{ProposalId}",encodeURIComponent(e))},getProposalSnapshot:{definition:"proposals/{ProposalId}/snapshot",render:e=>"proposals/{ProposalId}/snapshot".replace("{ProposalId}",encodeURIComponent(e))},getProposalCoverage:{definition:"proposals/{ProposalId}/coverage",render:e=>"proposals/{ProposalId}/coverage".replace("{ProposalId}",encodeURIComponent(e))},getProposalProductCoverage:{definition:"proposals/{ProposalId}/products/{ProposalProductId}/coverage",render:(e,t)=>"proposals/{ProposalId}/products/{ProposalProductId}/coverage".replace("{ProposalId}",encodeURIComponent(e)).replace("{ProposalProductId}",encodeURIComponent(t))},retryFailedProposalProduct:{definition:"proposals/{ProposalId}/products/{ProposalProductId}/retry",render:(e,t)=>"proposals/{ProposalId}/products/{ProposalProductId}/retry".replace("{ProposalId}",encodeURIComponent(e)).replace("{ProposalProductId}",encodeURIComponent(t))},getProposalProductPremiumDetail:{definition:"proposals/{ProposalId}/products/{ProposalProductId}/premium-detail/{InstallmentNumber}",render:(e,t,r)=>"proposals/{ProposalId}/products/{ProposalProductId}/premium-detail/{InstallmentNumber}".replace("{ProposalId}",encodeURIComponent(e)).replace("{ProposalProductId}",encodeURIComponent(t)).replace("{InstallmentNumber}",encodeURIComponent(r.toString()))},purchaseProposalProductSync:{definition:"proposals/{ProposalId}/products/{ProposalProductId}/purchase/sync",render:(e,t)=>"proposals/{ProposalId}/products/{ProposalProductId}/purchase/sync".replace("{ProposalId}",encodeURIComponent(e)).replace("{ProposalProductId}",encodeURIComponent(t))},purchaseProposalProductAsync:{definition:"proposals/{ProposalId}/products/{ProposalProductId}/purchase/async",render:(e,t)=>"proposals/{ProposalId}/products/{ProposalProductId}/purchase/async".replace("{ProposalId}",encodeURIComponent(e)).replace("{ProposalProductId}",encodeURIComponent(t))},reviseProposal:{definition:"proposals/{ProposalId}/revise",render:e=>"proposals/{ProposalId}/revise".replace("{ProposalId}",encodeURIComponent(e))},reviseProposalProduct:{definition:"proposals/{ProposalId}/products/{ProposalProductId}/revise",render:(e,t)=>"proposals/{ProposalId}/products/{ProposalProductId}/revise".replace("{ProposalId}",encodeURIComponent(e)).replace("{ProposalProductId}",encodeURIComponent(t))},fetchProposalProductDocument:{definition:"proposals/{ProposalId}/products/{ProposalProductId}/document",render:(e,t)=>"proposals/{ProposalId}/products/{ProposalProductId}/document".replace("{ProposalId}",encodeURIComponent(e)).replace("{ProposalProductId}",encodeURIComponent(t))},fetchProposalInformationFormDocument:{definition:"proposals/{ProposalId}/products/{ProposalProductId}/information-form",render:(e,t)=>"proposals/{ProposalId}/products/{ProposalProductId}/information-form".replace("{ProposalId}",encodeURIComponent(e)).replace("{ProposalProductId}",encodeURIComponent(t))},sendProposalProductDocument:{definition:"proposals/{ProposalId}/products/{ProposalProductId}/document/send",render:(e,t)=>"proposals/{ProposalId}/products/{ProposalProductId}/document/send".replace("{ProposalId}",encodeURIComponent(e)).replace("{ProposalProductId}",encodeURIComponent(t))},sendProposalInformationFormDocument:{definition:"proposals/{ProposalId}/products/{ProposalProductId}/information-form/send",render:(e,t)=>"proposals/{ProposalId}/products/{ProposalProductId}/information-form/send".replace("{ProposalId}",encodeURIComponent(e)).replace("{ProposalProductId}",encodeURIComponent(t))},generateCompareProposalProductsPdf:{definition:"proposals/{ProposalId}/products/compare-pdf",render:e=>"proposals/{ProposalId}/products/compare-pdf".replace("{ProposalId}",encodeURIComponent(e))},sendCompareProposalProductsPdf:{definition:"proposals/{ProposalId}/products/compare-pdf/send",render:e=>"proposals/{ProposalId}/products/compare-pdf/send".replace("{ProposalId}",encodeURIComponent(e))},setProposalRepresentative:{definition:"proposals/{ProposalId}/representative",render:e=>"proposals/{ProposalId}/representative".replace("{ProposalId}",encodeURIComponent(e))},setProposalBranch:{definition:"proposals/{ProposalId}/branch",render:e=>"proposals/{ProposalId}/branch".replace("{ProposalId}",encodeURIComponent(e))},generateCustomerProposalDocumentPdf:{definition:"proposals/{ProposalId}/customer-document-pdf",render:e=>"proposals/{ProposalId}/customer-document-pdf".replace("{ProposalId}",encodeURIComponent(e))},getProposalConversionTrend:{definition:"proposals/analytics/conversion-trend"}},Te={getPolicyDetail:{definition:"policies/{PolicyId}",render:e=>"policies/{PolicyId}".replace("{PolicyId}",encodeURIComponent(e))},fetchPolicyDocument:{definition:"policies/{PolicyId}/document",render:e=>"policies/{PolicyId}/document".replace("{PolicyId}",encodeURIComponent(e))},sendPolicyDocument:{definition:"policies/{PolicyId}/document/send",render:e=>"policies/{PolicyId}/document/send".replace("{PolicyId}",encodeURIComponent(e))},setPolicyRepresentative:{definition:"policies/{PolicyId}/representative",render:e=>"policies/{PolicyId}/representative".replace("{PolicyId}",encodeURIComponent(e))},setPolicyBranch:{definition:"policies/{PolicyId}/branch",render:e=>"policies/{PolicyId}/branch".replace("{PolicyId}",encodeURIComponent(e))},createManualPolicy:{definition:"policies/manual"},updateManualPolicy:{definition:"policies/manual/{PolicyId}",render:e=>"policies/manual/{PolicyId}".replace("{PolicyId}",encodeURIComponent(e))},getPolicyCountAndPremiumAnalytics:{definition:"policies/analytics/count-and-premium"},getPolicyRenewalAnalytics:{definition:"policies/analytics/renewal"},getPolicyDistributionByBranch:{definition:"policies/analytics/distribution-by-branch"},getRepresentativeEarningsAnalytics:{definition:"policies/analytics/representative-earnings"}},Oe={create:"policy-transfers",getPolicyTransferDetail:{definition:"policy-transfers/{PolicyTransferId}",render:e=>"policy-transfers/{PolicyTransferId}".replace("{PolicyTransferId}",encodeURIComponent(e))},getPolicyTransferTriggerDetail:{definition:"policy-transfers/{PolicyTransferId}/triggers/{PolicyTransferTriggerId}",render:(e,t)=>"policy-transfers/{PolicyTransferId}/triggers/{PolicyTransferTriggerId}".replace("{PolicyTransferId}",encodeURIComponent(e)).replace("{PolicyTransferTriggerId}",encodeURIComponent(t))},triggerPolicyTransfer:{definition:"policy-transfers/{PolicyTransferId}/trigger",render:e=>"policy-transfers/{PolicyTransferId}/trigger".replace("{PolicyTransferId}",encodeURIComponent(e))}},Le={create:"file-policy-transfers",getFilePolicyTransferDetail:{definition:"file-policy-transfers/{FilePolicyTransferId}",render:e=>"file-policy-transfers/{FilePolicyTransferId}".replace("{FilePolicyTransferId}",encodeURIComponent(e))}},S={getKaskoCoverageChoices:{definition:"coverage-choices:kasko",render:e=>e!==void 0?"coverage-choices:kasko?vehicleUtilizationStyle={vehicleUtilizationStyle}".replace("{vehicleUtilizationStyle}",encodeURIComponent(e)):"coverage-choices:kasko"},getKonutCoverageChoices:{definition:"coverage-choices:konut",render:()=>"coverage-choices:konut"},getImmCoverageChoices:{definition:"coverage-choices:imm",render:()=>"coverage-choices:imm"},getTssCoverageChoices:{definition:"coverage-choices:tss",render:()=>"coverage-choices:tss"}},re={complete:"agent-setup-requests/complete",create:"agent-setup-requests",getAll:"agent-setup-requests",enter:"agent-setup-requests/enter",getAgentSetupRequestById:{definition:"agent-setup-requests/{Id}",render:e=>"agent-setup-requests/{Id}".replace("{Id}",encodeURIComponent(e))},disableAgentSetupRequest:{definition:"agent-setup-requests/{Id}/disable",render:e=>"agent-setup-requests/{Id}/disable".replace("{Id}",encodeURIComponent(e))}},y={forgotPassword:"agent-users/forgot-password",resetPassword:"agent-users/reset-password",checkAgentUserForgotPasswordToken:"agent-users/check-forgot-password-token",me:"agent-users/me",meRobotCode:"agent-users/me/robot-code",invite:"agent-users/invite",updateMyUser:"agent-users/me",acceptInvite:"agent-users/accept-invite",updatePassword:"agent-users/me/password",reSendInvite:{definition:"agent-users/{AgentUserId}/re-send-invite",render:e=>"agent-users/{AgentUserId}/re-send-invite".replace("{AgentUserId}",encodeURIComponent(e))},deactivate:{definition:"agent-users/{AgentUserId}/deactivate",render:e=>"agent-users/{AgentUserId}/deactivate".replace("{AgentUserId}",encodeURIComponent(e))},activate:{definition:"agent-users/{AgentUserId}/activate",render:e=>"agent-users/{AgentUserId}/activate".replace("{AgentUserId}",encodeURIComponent(e))},delete:{definition:"agent-users/{UserId}",render:e=>"agent-users/{UserId}".replace("{UserId}",encodeURIComponent(e))},getById:{definition:"agent-users/{UserId}",render:e=>"agent-users/{UserId}".replace("{UserId}",encodeURIComponent(e))},checkAgentUserInviteCode:{definition:"agent-users/check-invite-code",render:e=>"agent-users/check-invite-code?code={code}".replace("{code}",encodeURIComponent(e))},update:{definition:"agent-users/{Id}",render:e=>"agent-users/{Id}".replace("{Id}",encodeURIComponent(e))},migrate:{definition:"agent-users/{AgentUserId}/migrate",render:e=>"agent-users/{AgentUserId}/migrate".replace("{AgentUserId}",encodeURIComponent(e))},migrateAll:"agent-users/migrate-all"},O={getAll:"agent-roles",create:"agent-roles",update:{definition:"agent-roles/{Id}",render:e=>"agent-roles/{Id}".replace("{Id}",encodeURIComponent(e))},delete:{definition:"agent-roles/{Id}",render:e=>"agent-roles/{Id}".replace("{Id}",encodeURIComponent(e))},getById:{definition:"agent-roles/{Id}",render:e=>"agent-roles/{Id}".replace("{Id}",encodeURIComponent(e))}},E={getAll:"webhooks",create:"webhooks",getById:{definition:"webhooks/{Id}",render:e=>"webhooks/{Id}".replace("{Id}",encodeURIComponent(e))},update:{definition:"webhooks/{Id}",render:e=>"webhooks/{Id}".replace("{Id}",encodeURIComponent(e))},delete:{definition:"webhooks/{Id}",render:e=>"webhooks/{Id}".replace("{Id}",encodeURIComponent(e))},deliveries:{getById:{definition:"webhooks/{WebhookId}/deliveries/{WebhookDeliveryId}",render:(e,t)=>"webhooks/{WebhookId}/deliveries/{WebhookDeliveryId}".replace("{WebhookId}",encodeURIComponent(e)).replace("{WebhookDeliveryId}",encodeURIComponent(t))},redeliver:{definition:"webhooks/{WebhookId}/deliveries/{WebhookDeliveryId}/redeliver",render:(e,t)=>"webhooks/{WebhookId}/deliveries/{WebhookDeliveryId}/redeliver".replace("{WebhookId}",encodeURIComponent(e)).replace("{WebhookDeliveryId}",encodeURIComponent(t))}}},g={createNewSaleOpportunity:"cases:new-sale-opportunity",createCrossSaleOpportunity:"cases:cross-sale-opportunity",createCancel:"cases:cancel",createEndorsement:"cases:endorsement",createComplaint:"cases:complaint",assignRepresentative:{definition:"cases/{Ref}/representative",render:e=>"cases/{Ref}/representative".replace("{Ref}",encodeURIComponent(e))},addNoteToCase:{definition:"cases/{Ref}/notes",render:e=>"cases/{Ref}/notes".replace("{Ref}",encodeURIComponent(e))},changeChannel:{definition:"cases/{Ref}/channel",render:e=>"cases/{Ref}/channel".replace("{Ref}",encodeURIComponent(e))},changeState:{definition:"cases/{Ref}/state",render:e=>"cases/{Ref}/state".replace("{Ref}",encodeURIComponent(e))},getActivities:{definition:"cases/{Ref}/activities",render:e=>"cases/{Ref}/activities".replace("{Ref}",encodeURIComponent(e))},getCaseByRef:{definition:"cases/{Ref}",render:e=>"cases/{Ref}".replace("{Ref}",encodeURIComponent(e))},getProposals:{definition:"cases/{Ref}/proposals",render:e=>"cases/{Ref}/proposals".replace("{Ref}",encodeURIComponent(e))},getPolicies:{definition:"cases/{Ref}/policies",render:e=>"cases/{Ref}/policies".replace("{Ref}",encodeURIComponent(e))},setAsset:{definition:"cases/{Ref}/asset",render:e=>"cases/{Ref}/asset".replace("{Ref}",encodeURIComponent(e))},setBranch:{definition:"cases/{Ref}/branch",render:e=>"cases/{Ref}/branch".replace("{Ref}",encodeURIComponent(e))},getSalesOpportunityFunnelAnalytics:{definition:"cases/analytics/sales-opportunity-funnel"},getOpenCaseBacklogPivotAnalytics:{definition:"cases/analytics/open-case-backlog-pivot"},getFailedCasesReasonDistribution:{definition:"cases/analytics/failed-cases-reason-distribution"},communicationAutomations:{getAll:"cases/communication-automations"},getPriorityTemplates:"cases/priority-templates"},U={getAll:"coverage-groups",create:"coverage-groups",update:{definition:"coverage-groups/{Id}",render:e=>"coverage-groups/{Id}".replace("{Id}",encodeURIComponent(e))},delete:{definition:"coverage-groups/{Id}",render:e=>"coverage-groups/{Id}".replace("{Id}",encodeURIComponent(e))},getById:{definition:"coverage-groups/{Id}",render:e=>"coverage-groups/{Id}".replace("{Id}",encodeURIComponent(e))}},_e={getAll:"release-notes"},Se={getAll:"banks",getBranches:{definition:"banks/{BankId}/branches",render:e=>"banks/{BankId}/branches".replace("{BankId}",encodeURIComponent(e))}},be={getAll:"financial-institutions"},N={getAll:"agent-branches",create:"agent-branches",getById:{definition:"agent-branches/{Id}",render:e=>"agent-branches/{Id}".replace("{Id}",encodeURIComponent(e))},update:{definition:"agent-branches/{Id}",render:e=>"agent-branches/{Id}".replace("{Id}",encodeURIComponent(e))},delete:{definition:"agent-branches/{Id}",render:e=>"agent-branches/{Id}".replace("{Id}",encodeURIComponent(e))}},se={uploadPublicFile:"files/upload-public"},ne={getAll:"languages"},T={getDefinitions:"templates/definitions",getAll:"templates",getByKey:{definition:"templates/{Key}",render:e=>"templates/{Key}".replace("{Key}",encodeURIComponent(e))},update:{definition:"templates/{Key}",render:e=>"templates/{Key}".replace("{Key}",encodeURIComponent(e))},delete:{definition:"templates/{Key}",render:e=>"templates/{Key}".replace("{Key}",encodeURIComponent(e))}},D={configFields:{getAll:"b2c/config-fields",updateAll:"b2c/config-fields"}},i={customers:Pe,vehicles:fe,vehicleParameters:Ae,insuranceServices:Ue,agents:h,insuranceCompanies:he,resourceKeys:Ee,releaseNotes:_e,banks:Se,financialInstitutions:be,policies:Te,policyTransfers:Oe,filePolicyTransfers:Le,cases:g,coverageGroups:U,webhooks:E,agentBranches:N,files:se,languages:ne,templates:T,b2c:D,proposals:Ne};var G=class{constructor(t){this.http=t}async getCurrentAgent(t){return this.http.get(h.getCurrentAgent,t)}async updateCurrentAgent(t,r){return this.http.putNoContent(h.updateCurrentAgent,t,r)}async getAgentInsuranceCompaniesAsync(t){return this.http.get(h.insuranceCompanies.getMyInsuranceCompanies,t)}async getAgentInsuranceCompanyBranchesAsync(t,r){let s=h.insuranceCompanies.getBranches.render(t);return this.http.get(s,r)}async getAgentInsuranceCompanyConnectionAsync(t,r){let s=h.insuranceCompanies.getConnection.render(t);return this.http.get(s,r)}async addAgentInsuranceCompany(t,r){return this.http.postNoContent(h.insuranceCompanies.addInsuranceCompanyToAgent,t,r)}async removeAgentInsuranceCompany(t,r){let s=h.insuranceCompanies.remove.render(t);return this.http.deleteNoContent(s,r)}async updateAgentInsuranceCompanyConnection(t,r){let s=h.insuranceCompanies.updateConnection.render(t.agentInsuranceCompanyId);return this.http.putNoContent(s,t,r)}async updateAgentInsuranceCompanyBranches(t,r){let s=h.insuranceCompanies.updateBranches.render(t.agentInsuranceCompanyId);return this.http.putNoContent(s,t,r)}async reSyncAgentInsuranceCompanyWithInsurance(t,r){let s=h.insuranceCompanies.reSyncAgentInsuranceCompanyWithInsurance.render(t.agentInsuranceCompanyId);return this.http.postNoContent(s,t,r)}async getB2CConfigFields(t){return this.http.get(D.configFields.getAll,t)}async updateB2CConfigFields(t,r){return this.http.putNoContent(D.configFields.updateAll,t,r)}};var F=class{constructor(t){this.http=t}async createAgentBranch(t,r){return this.http.post(N.create,t,r)}async getAgentBranchById(t,r){let s=N.getById.render(t);return this.http.get(s,r)}async getAgentBranches(t){return this.http.get(N.getAll,t)}async updateAgentBranch(t,r){let s=N.update.render(t.id);return this.http.putNoContent(s,t,r)}async deleteAgentBranch(t,r){let s=N.delete.render(t.id);return this.http.deleteNoContent(s,r)}};var q=class{constructor(t){this.http=t}async createAgentRole(t,r){return this.http.postNoContent(O.create,t,r)}async getAgentRoleById(t,r){let s=O.getById.render(t);return this.http.get(s,r)}async getAgentRoles(t){return this.http.get(O.getAll,t)}async updateAgentRole(t,r){let s=O.update.render(t.id);return this.http.putNoContent(s,t,r)}async deleteAgentRole(t,r){let s=O.delete.render(t.id);return this.http.deleteNoContent(s,r)}};var M=class{constructor(t){this.http=t}async enterAgentSetupRequest(t,r){return this.http.post(re.enter,t,r)}async completeAgentSetupRequest(t,r){return this.http.postNoContent(re.complete,t,r)}};var ot=(e=>(e.Unknown="UNKNOWN",e.Manual="MANUAL",e.Website="WEBSITE",e.GoogleAds="GOOGLE_ADS",e.CallCenter="CALL_CENTER",e.SocialMedia="SOCIAL_MEDIA",e.MobileApp="MOBILE_APP",e.OfflineProposalForm="OFFLINE_PROPOSAL_FORM",e.Field="FIELD",e.PrintMedia="PRINT_MEDIA",e.FairEvent="FAIR_EVENT",e.BusinessPartner="BUSINESS_PARTNER",e.Chatbot="CHATBOT",e))(ot||{}),it=(e=>(e.Vehicle="VEHICLE",e.Property="PROPERTY",e))(it||{}),B=(e=>(e.Individual="INDIVIDUAL",e.Company="COMPANY",e.Foreign="FOREIGN",e))(B||{}),at=(e=>(e.Kasko="KASKO",e.Dask="DASK",e.Konut="KONUT",e.Trafik="TRAFIK",e.Tss="TSS",e.Imm="IMM",e.YesilKart="YESIL_KART",e.FerdiKaza="FERDI_KAZA",e.GrupHayat="GRUP_HAYAT",e.Saglik="SAGLIK",e.KartKimlikKoruma="KART_KIMLIK_KORUMA",e.UcuncuSahisMaliSorumluluk="UCUNCU_SAHIS_MALI_SORUMLULUK",e.IsyeriYangin="ISYERI_YANGIN",e.Seyahat="SEYAHAT",e.ElektronikCihaz="ELEKTRONIK_CIHAZ",e.Pet="PET",e.Bes="BES",e.InsaatAllRisk="INSAAT_ALL_RISK",e.LeasingAllRisk="LEASING_ALL_RISK",e.MontajAllRisk="MONTAJ_ALL_RISK",e.Nakliyat="NAKLIYAT",e.OzelGuvenlikMaliSorumluluk="OZEL_GUVENLIK_MALI_SORUMLULUK",e.AkilliTelefon="AKILLI_TELEFON",e.TehlikeliMaddelerMaliSorumluluk="TEHLIKELI_MADDELER_MALI_SORUMLULUK",e.YatGemiGezintiTeknesi="YAT_GEMI_GEZINTI_TEKNESI",e.Tarim="TARIM",e.MeslekiSorumluluk="MESLEKI_SORUMLULUK",e.Alacak="ALACAK",e.IsverenMaliMesuliyet="ISVEREN_MALI_MESULIYET",e.Muhendislik="MUHENDISLIK",e.HukuksalKoruma="HUKUKSAL_KORUMA",e.IlkAtesKonut="ILK_ATES_KONUT",e.Kefalet="KEFALET",e))(at||{}),ut=(e=>(e.Unknown="UNKNOWN",e.TurkishLira="TURKISH_LIRA",e.UnitedStatesDollar="UNITED_STATES_DOLLAR",e.Euro="EURO",e))(ut||{}),lt=(e=>(e.Unknown="UNKNOWN",e.SyncCreditCard="SYNC_CREDIT_CARD",e.SyncOpenAccount="SYNC_OPEN_ACCOUNT",e.Async3dSecure="ASYNC_3D_SECURE",e.AsyncInsuranceCompanyRedirect="ASYNC_INSURANCE_COMPANY_REDIRECT",e.AsyncThirdParty3dSecure="ASYNC_THIRD_PARTY_3D_SECURE",e))(lt||{}),pt=(e=>(e.Active="ACTIVE",e.EndOfLife="END_OF_LIFE",e.Cancelled="CANCELLED",e))(pt||{}),ct=(e=>(e.WebService="WEB_SERVICE",e.Robot="ROBOT",e))(ct||{}),dt=(e=>(e.Belirsiz="BELIRSIZ",e.AnlasmaliOzelServis="ANLASMALI_OZEL_SERVIS",e.AnlasmaliYetkiliServis="ANLASMALI_YETKILI_SERVIS",e.YetkiliServis="YETKILI_SERVIS",e.OzelServis="OZEL_SERVIS",e.SigortaliBelirler="SIGORTALI_BELIRLER",e))(dt||{}),mt=(e=>(e.Belirsiz="BELIRSIZ",e.OrijinalParca="ORIJINAL_PARCA",e.EsdegerParca="ESDEGER_PARCA",e))(mt||{}),Rt=(e=>(e.A="A",e.B="B",e.C="C",e.D="D",e.E="E",e.F="F",e.SegmenteSegment="SEGMENTE_SEGMENT",e))(Rt||{}),It=(e=>(e.Bilinmiyor="BILINMIYOR",e.DarKapsam="DAR_KAPSAM",e.StandartKapsam="STANDART_KAPSAM",e.GenisKapsam="GENIS_KAPSAM",e))(It||{}),gt=(e=>(e.Bilinmiyor="BILINMIYOR",e.Yatarak="YATARAK",e.YatarakAyakta="YATARAK_AYAKTA",e))(gt||{}),yt=(e=>(e.Belirsiz="BELIRSIZ",e.Yok="YOK",e.AgacKutukleriveKereste="AGAC_KUTUKLERIVE_KERESTE",e.Akaryakit="AKARYAKIT",e.AyakkabiSaraciye="AYAKKABI_SARACIYE",e.BakkaliyeveSharkuteriUrunleri="BAKKALIYE_VE_SHARKUTERI_URUNLERI",e.BilumumKirtasiyeMalzemeleri="BILUMUM_KIRTASIYE_MALZEMELERI",e.DokmeSuveSut="DOKME_SU_VE_SUT",e.HaliveKilim="HALI_VE_KILIM",e.HamYariMamulveMamulKagit="HAM_YARI_MAMUL_VE_MAMUL_KAGIT",e.HazirBeton="HAZIR_BETON",e.HerNeviEvAletleri="HER_NEVI_EV_ALETLERI",e.HerTurluDokmeKomurvOdun="HER_TURLU_DOKME_KOMUR_V_ODUN",e.HububatveBakliyat="HUBUBAT_VE_BAKLIYAT",e.KabaInsaatMalzemeleri="KABA_INSAAT_MALZEMELERI",e.LastikKaucukUrunleri="LASTIK_KAUCUK_URUNLERI",e.LikidKimyeviMadde="LIKID_KIMYEVI_MADDE",e.LpgGazTupu="LPG_GAZ_TUPU",e.MakineAksamveYedekleri="MAKINE_AKSAM_VE_YEDEKLERI",e.MobilyaMalzemesi="MOBILYA_MALZEMESI",e.MuhtelifEvEsyasi="MUHTELIF_EV_ESYASI",e.OtoYedekParcalari="OTO_YEDEK_PARCALARI",e.PlastikMamulleri="PLASTIK_MAMULLERI",e.SentetikElyafUrunleri="SENTETIK_ELYAF_URUNLERI",e.SentetikPlastikBoyaUrunleri="SENTETIK_PLASTIK_BOYA_URUNLERI",e.TekstilUrunleri="TEKSTIL_URUNLERI",e.TemizlikMaddeleri="TEMIZLIK_MADDELERI",e.YasMeyveveSebze="YAS_MEYVE_VE_SEBZE",e))(yt||{});function Ct(e){return typeof e=="object"&&e!==null&&"$type"in e&&typeof e.$type=="string"}function Jr(...e){if(e.length===0)throw new Error("Cannot merge empty coverage array");let t=e.filter(o=>o!=null);if(t.length===0)throw new Error("No valid coverages to merge");let s=t[0].productBranch;for(let o of t)if(o.productBranch!==s)throw new Error(`All coverages must have the same productBranch. Expected: ${s}, but found: ${o.productBranch}`);let n=o=>{let c=o.filter(d=>d!=null);if(c.length===0)return;let u=c.filter(d=>d.$type!=="UNDEFINED");return u.length>0?u[u.length-1]:{$type:"UNDEFINED"}},a=o=>{let c=o.filter(u=>u!=null);return c.length>0?c[c.length-1]:void 0},p=new Set;for(let o of t)Object.keys(o).forEach(c=>{c!=="productBranch"&&p.add(c)});let m={productBranch:s};for(let o of p){let c=t.map(d=>d[o]),u=c.find(d=>d!=null);Ct(u)?m[o]=n(c):m[o]=a(c)}return m}var ht=(e=>(e.Succeeded="SUCCEEDED",e.Failed="TRIGGER_STATUS_FAILED",e))(ht||{}),Et=(e=>(e.Unknown="UNKNOWN",e.CouldNotFetchPolicies="COULD_NOT_FETCH_POLICIES",e))(Et||{}),Pt=(e=>(e.Success="SUCCESS",e.Failed="TRANSFER_FAILED",e.Skipped="TRANSFER_SKIPPED",e))(Pt||{}),At=(e=>(e.Unknown="UNKNOWN",e.AlreadyTransferred="SKIP_ALREADY_TRANSFERRED",e.PreviousVersionNotFound="PREVIOUS_VERSION_NOT_FOUND",e.ProductBranchNotSupported="PRODUCT_BRANCH_NOT_SUPPORTED",e.ProductNotSupported="PRODUCT_NOT_SUPPORTED",e))(At||{}),ft=(e=>(e.Unknown="UNKNOWN",e.InvalidCustomerIdentityNumber="INVALID_CUSTOMER_IDENTITY_NUMBER",e.InvalidCustomerCompanyTitle="INVALID_CUSTOMER_COMPANY_TITLE",e.InvalidCustomerTaxNumber="INVALID_CUSTOMER_TAX_NUMBER",e.InvalidCustomerType="INVALID_CUSTOMER_TYPE",e.InvalidVehicle="INVALID_VEHICLE",e.InvalidProperty="INVALID_PROPERTY",e.InvalidEndDate="INVALID_END_DATE",e.InvalidStartDate="INVALID_START_DATE",e.InvalidProposalNumber="INVALID_PROPOSAL_NUMBER",e.InvalidPremium="INVALID_PREMIUM",e.InvalidCommission="INVALID_COMMISSION",e.InvalidPaymentType="INVALID_PAYMENT_TYPE",e.InvalidInsuredCustomer="INVALID_INSURED_CUSTOMER",e.InvalidInsurerCustomer="INVALID_INSURER_CUSTOMER",e))(ft||{}),Ut=(e=>(e.Unknown="UNKNOWN",e.SteelReinforcedConcrete="STEEL_REINFORCED_CONCRETE",e.Other="OTHER",e))(Ut||{}),Nt=(e=>(e.Unknown="UNKNOWN",e.None="NONE",e.SlightlyDamaged="SLIGHTLY_DAMAGED",e.ModeratelyDamaged="MODERATELY_DAMAGED",e.SeverelyDamaged="SEVERELY_DAMAGED",e))(Nt||{}),Tt=(e=>(e.Unknown="UNKNOWN",e.House="HOUSE",e.Business="BUSINESS",e.Other="OTHER",e))(Tt||{}),Ot=(e=>(e.Unknown="UNKNOWN",e.Proprietor="PROPRIETOR",e.Tenant="TENANT",e))(Ot||{}),Lt=(e=>(e.Bank="BANK",e.FinancialInstitution="FINANCIAL_INSTITUTION",e))(Lt||{}),_t=(e=>(e.Unknown="UNKNOWN",e.PrivateCar="PRIVATE_CAR",e.Taxi="TAXI",e.RouteBasedMinibus="ROUTE_BASED_MINIBUS",e.MediumBus="MEDIUM_BUS",e.LargeBus="LARGE_BUS",e.PickupTruck="PICKUP_TRUCK",e.PanelVan="PANEL_VAN",e.Truck="TRUCK",e.Tractor="TRACTOR",e.Motorcycle="MOTORCYCLE",e.RentalCar="RENTAL_CAR",e.ArmoredVehicle="ARMORED_VEHICLE",e.MinibusSharedTaxi="MINIBUS_SHARED_TAXI",e.Jeep="JEEP",e.JeepSAV="JEEP_SAV",e.JeepSUV="JEEP_SUV",e.Hearse="HEARSE",e.ChauffeuredRentalCar="CHAUFFEURED_RENTAL_CAR",e.OperationalRental="OPERATIONAL_RENTAL",e.PrivateMinibus="PRIVATE_MINIBUS",e.RouteMinibus="ROUTE_MINIBUS",e.ServiceMinibus="SERVICE_MINIBUS",e))(_t||{}),St=(e=>(e.Gasoline="GASOLINE",e.Diesel="DIESEL",e.Lpg="LPG",e.Electric="ELECTRIC",e.LpgGasoline="LPG_GASOLINE",e.Hybrid="HYBRID",e))(St||{}),bt=(e=>(e.Audio="audio",e.Display="display",e.Other="other",e))(bt||{}),Xr=class ce{constructor(t){I(this,"_value");this._value=typeof t=="string"?new Date(t):t}static fromDate(t){return new ce(t)}static now(){return new ce(new Date)}toDate(){return this._value}toISOString(){return this._value.toISOString()}toJSON(){return this.toISOString()}toString(){return this.toISOString()}valueOf(){return this._value.valueOf()}},es=class de{constructor(t){I(this,"_year");I(this,"_month");I(this,"_day");if(typeof t=="string"){let r=t.split("-").map(Number);this._year=r[0]??0,this._month=r[1]??1,this._day=r[2]??1}else this._year=t.getUTCFullYear(),this._month=t.getUTCMonth()+1,this._day=t.getUTCDate()}static fromDate(t){return new de(t)}static today(){return new de(new Date)}toDate(){return new Date(Date.UTC(this._year,this._month-1,this._day))}toString(){let t=this._year.toString().padStart(4,"0"),r=this._month.toString().padStart(2,"0"),s=this._day.toString().padStart(2,"0");return`${t}-${r}-${s}`}toJSON(){return this.toString()}valueOf(){return this.toDate().valueOf()}get year(){return this._year}get month(){return this._month}get day(){return this._day}},vt=(e=>(e.Unknown="UNKNOWN",e.Male="MALE",e.Female="FEMALE",e.Other="OTHER",e))(vt||{}),Dt=(e=>(e.Unknown="UNKNOWN",e.PrimarySchool="PRIMARY_SCHOOL",e.MiddleSchool="MIDDLE_SCHOOL",e.HighSchool="HIGH_SCHOOL",e.University="UNIVERSITY",e.Postgraduate="POSTGRADUATE",e.Doctorate="DOCTORATE",e.Other="OTHER",e))(Dt||{}),Gt=(e=>(e.Unknown="UNKNOWN",e.Turk="TURK",e.Other="OTHER",e))(Gt||{}),Ft=(e=>(e.Unknown="UNKNOWN",e.Single="SINGLE",e.Married="MARRIED",e))(Ft||{}),qt=(e=>(e.Unknown="UNKNOWN",e.Banker="BANKER",e.CorporateEmployee="CORPORATE_EMPLOYEE",e.LtdEmployee="LTD_EMPLOYEE",e.Police="POLICE",e.MilitaryPersonnel="MILITARY_PERSONNEL",e.RetiredSpouse="RETIRED_SPOUSE",e.Teacher="TEACHER",e.Doctor="DOCTOR",e.Pharmacist="PHARMACIST",e.Nurse="NURSE",e.HealthcareWorker="HEALTHCARE_WORKER",e.Lawyer="LAWYER",e.Judge="JUDGE",e.Prosecutor="PROSECUTOR",e.Freelancer="FREELANCER",e.Farmer="FARMER",e.Instructor="INSTRUCTOR",e.ReligiousOfficial="RELIGIOUS_OFFICIAL",e.AssociationManager="ASSOCIATION_MANAGER",e.Officer="OFFICER",e.Retired="RETIRED",e.Housewife="HOUSEWIFE",e))(qt||{}),Mt=(e=>(e.Active="ACTIVE",e.Succeeded="SUCCEEDED",e.Failed="FAILED",e))(Mt||{}),Bt=(e=>(e.PhoneCall="PHONE_CALL",e))(Bt||{}),wt=(e=>(e.Planned="PLANNED",e.Occurred="OCCURRED",e.NotOccurred="NOT_OCCURRED",e))(wt||{}),kt=(e=>(e.Other="OTHER",e.OrganTransplant="ORGAN_TRANSPLANT",e.BoneMarrowTransplant="BONE_MARROW_TRANSPLANT",e.HeartSurgery="HEART_SURGERY",e.BrainSurgery="BRAIN_SURGERY",e))(kt||{}),Kt=(e=>(e.Other="OTHER",e.KidneyFailure="KIDNEY_FAILURE",e.Cancer="CANCER",e.LiverDisease="LIVER_DISEASE",e.HeartFailure="HEART_FAILURE",e.HeartRhythmAndConductionDisorders="HEART_RHYTHM_AND_CONDUCTION_DISORDERS",e.ImmuneSystemDisorders="IMMUNE_SYSTEM_DISORDERS",e))(Kt||{}),xt=(e=>(e.KVKK="KVKK",e.ETK="ETK",e))(xt||{}),Ht=(e=>(e.SaleOpportunity="SALE_OPPORTUNITY",e.Endorsement="ENDORSEMENT",e.Cancel="CANCEL",e.Complaint="COMPLAINT",e))(Ht||{}),Vt=(e=>(e.Fail="FAIL",e.Open="OPEN",e.InProgress="IN_PROGRESS",e.Success="SUCCESS",e))(Vt||{}),$t=(e=>(e.FailNoResponse="FAIL_NO_RESPONSE",e.FailInvalidCase="FAIL_INVALID_CASE",e.FailCustomerWithdrawn="FAIL_CUSTOMER_WITHDRAWN",e.FailPaymentError="FAIL_PAYMENT_ERROR",e.FailDeclinedCardInformation="FAIL_DECLINED_CARD_INFORMATION",e.FailForeignUser="FAIL_FOREIGN_USER",e.FailTakenElsewhere="FAIL_TAKEN_ELSEWHERE",e.FailPriceTooHigh="FAIL_PRICE_TOO_HIGH",e.FailAssetAcquisition="FAIL_ASSET_ACQUISITION",e.FailAssetSold="FAIL_ASSET_SOLD",e.FailUnresolved="FAIL_UNRESOLVED",e.FailReferredToLegal="FAIL_REFERRED_TO_LEGAL",e.FailCustomerUnsatisfied="FAIL_CUSTOMER_UNSATISFIED",e.FailMissingDocuments="FAIL_MISSING_DOCUMENTS",e.FailInsurerDenied="FAIL_INSURER_DENIED",e.FailConditionsNotMet="FAIL_CONDITIONS_NOT_MET",e.OpenInitial="OPEN_INITIAL",e.OpenCollectingInformation="OPEN_COLLECTING_INFORMATION",e.OpenDelayed="OPEN_DELAYED",e.OpenWaiting="OPEN_WAITING",e.InProgressUnderAnalysis="IN_PROGRESS_UNDER_ANALYSIS",e.InProgressProposalPrepared="IN_PROGRESS_PROPOSAL_PREPARED",e.InProgressAwaitingApproval="IN_PROGRESS_AWAITING_APPROVAL",e.InProgressToBeRecontacted="IN_PROGRESS_TO_BE_RECONTACTED",e.SuccessCompleted="SUCCESS_COMPLETED",e))($t||{}),Qt=(e=>(e.Open="OPEN",e.Delayed="DELAYED",e.Success="SUCCESS",e.Fail="FAIL",e))(Qt||{}),Yt=(e=>(e.NewSale="NEW_SALE",e.CrossSale="CROSS_SALE",e.Renewal="RENEWAL",e))(Yt||{}),Wt=(e=>(e.OnlineCancellationRefund="ONLINE_CANCELLATION_REFUND",e.MebCancellation="MEB_CANCELLATION",e.PartialCancellation="PARTIAL_CANCELLATION",e.CancellationFromSale="CANCELLATION_FROM_SALE",e.CancellationDueToCollection="CANCELLATION_DUE_TO_COLLECTION",e.CancellationDueToDamage="CANCELLATION_DUE_TO_DAMAGE",e))(Wt||{}),jt=(e=>(e.ConsultantError="CONSULTANT_ERROR",e.PolicyOperations="POLICY_OPERATIONS",e.Collection="COLLECTION",e.DueToFrequentCalls="DUE_TO_FREQUENT_CALLS",e.Fraud="FRAUD",e.Damage="DAMAGE",e.ErroneousTransaction="ERRONEOUS_TRANSACTION",e.DelayInOperations="DELAY_IN_OPERATIONS",e.OnlineTransactionErrors="ONLINE_TRANSACTION_ERRORS",e.DelayInCancellationPeriod="DELAY_IN_CANCELLATION_PERIOD",e.NonReceiptOfPolicyOrEndorsement="NON_RECEIPT_OF_POLICY_OR_ENDORSEMENT",e.NonProductionOfPolicyOrEndorsement="NON_PRODUCTION_OF_POLICY_OR_ENDORSEMENT",e.DelayInEndorsementOperations="DELAY_IN_ENDORSEMENT_OPERATIONS",e.ErroneousPremiumCollection="ERRONEOUS_PREMIUM_COLLECTION",e.NonDeliveryOfRefundReceipt="NON_DELIVERY_OF_REFUND_RECEIPT",e.NonRefundOfPremium="NON_REFUND_OF_PREMIUM",e.StaffAttitude="STAFF_ATTITUDE",e.InsufficientOrErroneousInformation="INSUFFICIENT_OR_ERRONEOUS_INFORMATION",e.NoTimelyResponse="NO_TIMELY_RESPONSE",e))(jt||{}),zt=(e=>(e.VehicleChange="VEHICLE_CHANGE",e.ValueIncrease="VALUE_INCREASE",e.NoClaimBonusTransfer="NO_CLAIM_BONUS_TRANSFER",e.CoverageChange="COVERAGE_CHANGE",e.UsageTypeChange="USAGE_TYPE_CHANGE",e.TransferRequest="TRANSFER_REQUEST",e.LicensePlateChange="LICENSE_PLATE_CHANGE",e.BrandModelChange="BRAND_MODEL_CHANGE",e.EngineChassisNumberChange="ENGINE_CHASSIS_NUMBER_CHANGE",e.ContactAddressChange="CONTACT_ADDRESS_CHANGE",e.Other="OTHER",e.PledgeeCorrectionAddition="PLEDGEE_CORRECTION_ADDITION",e))(zt||{}),Zt=(e=>(e.Created="CREATED",e.Updated="UPDATED",e.StateChanged="STATE_CHANGED",e.ChannelChanged="CHANNEL_CHANGED",e.RepresentativeAssigned="REPRESENTATIVE_ASSIGNED",e.NoteAdded="NOTE_ADDED",e.AssetSet="ASSET_SET",e.PolicyAdded="POLICY_ADDED",e.ProposalAdded="PROPOSAL_ADDED",e.PolicyEndDateSet="POLICY_END_DATE_SET",e.CustomerUpdated="CUSTOMER_UPDATED",e.AssetUpdated="ASSET_UPDATED",e.PriorityAssessed="PRIORITY_ASSESSED",e.ProposalProductPurchaseAttempted="PROPOSAL_PRODUCT_PURCHASE_ATTEMPTED",e))(Zt||{}),Jt=(e=>(e.None="NONE",e.Desktop="DESKTOP",e.Server="SERVER",e))(Jt||{}),Xt=(e=>(e.None="NONE",e.Random="RANDOM",e.RoundRobin="ROUND_ROBIN",e.BranchImportanceBalance="BRANCH_IMPORTANCE_BALANCE",e))(Xt||{}),er=(e=>(e.Pending="PENDING",e.Failed="FAILED",e.Succeed="SUCCEED",e))(er||{}),tr=(e=>(e.WebService="WEB_SERVICE",e.Robot="ROBOT",e))(tr||{}),rr=(e=>(e.Default="Default",e.Teknomart="Teknomart",e.ArtiKurumsal="ArtiKurumsal",e.Verimor="Verimor",e))(rr||{}),sr=(e=>(e.None="None",e.AloTech="AloTech",e))(sr||{}),nr=(e=>(e.Pending="PENDING",e.Active="ACTIVE",e.Inactive="INACTIVE",e))(nr||{}),or=(e=>(e[e.Object=1]="Object",e[e.Array=2]="Array",e[e.Text=3]="Text",e[e.Number=4]="Number",e[e.Boolean=5]="Boolean",e[e.File=6]="File",e[e.Color=7]="Color",e[e.ProductBranch=8]="ProductBranch",e[e.Icon=9]="Icon",e[e.InsuranceCompany=10]="InsuranceCompany",e[e.MultiLineText=11]="MultiLineText",e[e.InsuranceProduct=12]="InsuranceProduct",e))(or||{}),ir=(e=>(e.ProposalPremiumReceived="proposal_premium.received",e.ProposalPremiumPurchasing="proposal_premium.purchasing",e.ProposalPremiumPurchased="proposal_premium.purchased",e.ProposalPremiumPurchaseFailed="proposal_premium.purchase_failed",e.PolicyCreated="policy.created",e.PolicyUpdated="policy.updated",e))(ir||{}),ar=(e=>(e.Waiting="WAITING",e.Active="ACTIVE",e.Purchasing="PURCHASING",e.Purchased="PURCHASED",e.Failed="FAILED",e))(ar||{}),ur=(e=>(e.Waiting="WAITING",e.Failed="FAILED",e.Active="ACTIVE",e.Purchasing="PURCHASING",e.Purchased="PURCHASED",e))(ur||{}),lr=(e=>(e.ASC="ASC",e.DESC="DESC",e))(lr||{});function C(e,t=" "){let r=[],s=new Map;for(let a of e){let p=a.indexOf(".");if(p!==-1){let m=a.slice(0,p),o=a.slice(p+1);s.has(m)||s.set(m,[]),s.get(m).push(o)}else r.push(a)}let n=[...r];for(let[a,p]of s)n.push(`${a} { ${p.join(" ")} }`);return n.join(`
|
|
1
|
+
var Re=Object.defineProperty;var Ke=(e,t,r)=>t in e?Re(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var xe=(e,t)=>{for(var r in t)Re(e,r,{get:t[r],enumerable:!0})};var I=(e,t,r)=>Ke(e,typeof t!="symbol"?t+"":t,r);var Ie={name:"@insurup/sdk",version:"0.1.12",description:"Type-safe TypeScript SDK for the InsurUp insurance platform with GraphQL support. Tree-shakeable, works everywhere.",keywords:["insurup","insurance","sdk","typescript","api-client","graphql","policy","claims","coverage","vehicle-insurance","property-insurance"],author:"InsurUp Team",license:"MIT",homepage:"https://github.com/InsurUp/ts-toolkit#readme",repository:{type:"git",url:"git+https://github.com/InsurUp/ts-toolkit.git"},bugs:{url:"https://github.com/InsurUp/ts-toolkit/issues"},engines:{node:">=18"},type:"module",sideEffects:!1,main:"./dist/index.cjs",module:"./dist/index.js",types:"./dist/index.d.ts",files:["dist"],exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js",require:"./dist/index.cjs",default:"./dist/index.js"},"./browser":{types:"./dist/index.d.ts",import:"./dist/index.browser.js",default:"./dist/index.browser.js"}},scripts:{build:"tsup","build:tsc":"tsc","check-types":"tsc --noEmit",dev:"tsup --watch",docs:"typedoc",lint:"eslint src test --max-warnings 0",test:"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage"},publishConfig:{access:"public"},devDependencies:{"@eslint/js":"^9.39.2","@vitest/coverage-v8":"^4.0.17",eslint:"^9.39.2","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.5",msw:"^2.12.7",prettier:"^3.8.0",tsup:"^8.5.1",typedoc:"^0.28.16",typescript:"^5.9.3","typescript-eslint":"^8.53.1",vitest:"^4.0.17"},dependencies:{"@insurup/contracts":"workspace:*"}};var Ve=Ie.version;var J=(o=>(o.Unknown="Unknown",o.JsonSerialization="JsonSerialization",o.JsonDeserialization="JsonDeserialization",o.NullResponse="NullResponse",o.Timeout="Timeout",o.HttpRequestFailed="HttpRequestFailed",o.UnexpectedNoContent="UnexpectedNoContent",o.GraphQLError="GraphQLError",o))(J||{}),ie=(R=>(R.Unknown="Unknown",R.AccessDenied="AccessDenied",R.BusinessValidation="BusinessValidation",R.FeatureNotSupported="FeatureNotSupported",R.InputValidation="InputValidation",R.ResourceDuplicate="ResourceDuplicate",R.ResourceInvalidState="ResourceInvalidState",R.ResourceNotFound="ResourceNotFound",R.EndpointNotFound="EndpointNotFound",R.UnsupportedMediaType="UnsupportedMediaType",R.MethodNotAllowed="MethodNotAllowed",R.Unauthorized="Unauthorized",R.Upstream="Upstream",R))(ie||{}),X=(l=>(l.Forbidden="FORBIDDEN",l.Unauthorized="UNAUTHORIZED",l.NotFound="NOT_FOUND",l.BadRequest="BAD_REQUEST",l.Conflict="CONFLICT",l.NotSupported="NOT_SUPPORTED",l.UpstreamError="UPSTREAM_ERROR",l.InternalError="INTERNAL_ERROR",l.ValidationError="VALIDATION_ERROR",l.FilterRequired="FILTER_REQUIRED",l.FilterMaxSpanExceeded="FILTER_MAX_SPAN_EXCEEDED",l.Unknown="UNKNOWN",l))(X||{});var $e={"https://api.insurup.com/problems/access-denied":"AccessDenied","https://api.insurup.com/problems/business-validation":"BusinessValidation","https://api.insurup.com/problems/feature-not-supported":"FeatureNotSupported","https://api.insurup.com/problems/input-validation":"InputValidation","https://api.insurup.com/problems/resource-duplicate":"ResourceDuplicate","https://api.insurup.com/problems/resource-invalid-state":"ResourceInvalidState","https://api.insurup.com/problems/resource-not-found":"ResourceNotFound","https://api.insurup.com/problems/endpoint-not-found":"EndpointNotFound","https://api.insurup.com/problems/unauthorized":"Unauthorized","https://api.insurup.com/problems/upstream-service":"Upstream","https://api.insurup.com/problems/unsupported-media-type":"UnsupportedMediaType","https://api.insurup.com/problems/method-not-allowed":"MethodNotAllowed"};function Qe(e){let t=e.toLowerCase().trim();return $e[t]??"Unknown"}function Ye(e){return!e||!Array.isArray(e)?[]:e.filter(t=>t!=null).map(t=>({propertyName:t.propertyName??"",errorMessage:t.errorMessage??"",attemptedValue:t.attemptedValue??null}))}function ae(e,t){let r={};try{if(t.trim()){let a=JSON.parse(t);typeof a=="object"&&a!==null&&(r=a)}}catch{}let s=r.type??"https://api.insurup.com/problems/unknown",n=Qe(s);return{kind:"server-error",isSuccess:!1,message:r.detail??(e.statusText||"Unknown server error"),type:n,typeString:s,title:r.title??`HTTP ${e.status}`,detail:r.detail??(e.statusText||"Unknown server error"),instance:r.instance??"",status:r.status??e.status,codes:r.codes??[],traceId:r.traceId??void 0,template:r.template??"",templateArgs:r.templateArgs??{},suggestions:r.suggestions??[],validationErrors:Ye(r.validationErrors)}}function ee(e){if(e instanceof Error){if(e.name==="AbortError"||e.message.includes("timeout"))return{kind:"client-error",isSuccess:!1,message:"Request timed out",type:"Timeout",error:e};let t=e.message.toLowerCase();return e.name==="TypeError"||t.includes("fetch")||t.includes("network")||t.includes("failed")||t.includes("econn")||t.includes("enotfound")?{kind:"client-error",isSuccess:!1,message:"HTTP request failed",type:"HttpRequestFailed",error:e}:{kind:"client-error",isSuccess:!1,message:"HTTP request failed",type:"HttpRequestFailed",error:e}}return{kind:"client-error",isSuccess:!1,message:"Unknown error occurred",type:"Unknown",error:e}}function ge(e){return{kind:"client-error",isSuccess:!1,message:e instanceof Error?e.message:"Failed to serialize request to JSON",type:"JsonSerialization",error:e}}function L(e){return{kind:"client-error",isSuccess:!1,message:"Failed to parse response JSON",type:"JsonDeserialization",error:e}}function ue(){return{kind:"client-error",isSuccess:!1,message:"Expected response data but received no content",type:"UnexpectedNoContent"}}function We(e){return e instanceof P?e.error:{kind:"client-error",isSuccess:!1,message:e.message,type:"Unknown"}}var P=class extends Error{constructor(r){super(r.message);I(this,"error");this.name="InsurUpError",this.error=r}};function b(e){return{kind:"success",isSuccess:!0,message:"Success",data:e}}function le(){return{kind:"success",isSuccess:!0,message:"Success"}}function je(e){if(e.isSuccess)return e.data;throw new P(e)}function ze(e){if(!e.isSuccess)throw new P(e)}function Ze(e){if(e.isSuccess)return e.data;throw new P(e)}function Je(e){if(!e.isSuccess)throw new P(e)}function pe(e){return{kind:"graphql-error",isSuccess:!1,message:e[0]?.message??"Unknown GraphQL error",errors:e}}var Xe={retries:3,factor:2,minTimeout:1e3,maxTimeout:1e4,randomize:!0,backoffStrategy:"exponential",retryableStatusCodes:[408,429,500,502,503,504],onFailedAttempt:()=>{}},et={info:(e,t)=>{t!==void 0?console.info(e,t):console.info(e)},warn:(e,t)=>{t!==void 0?console.warn(e,t):console.warn(e)},error:(e,t)=>{t!==void 0?console.error(e,t):console.error(e)}},_={baseUrl:"https://api.insurup.com/api/",customHeaders:{},userAgent:"@insurup/sdk",timeoutMs:3e4,logLevel:"none",logger:et,retry:void 0,tokenProvider:void 0,onRequest:void 0,onResponse:void 0};function ye(e){return{baseUrl:e?.baseUrl??_.baseUrl,customHeaders:{..._.customHeaders,...e?.customHeaders},userAgent:e?.userAgent??_.userAgent,timeoutMs:e?.timeoutMs??_.timeoutMs,logLevel:e?.logLevel??_.logLevel,logger:e?.logger??_.logger,retry:e?.retry?{...Xe,...e.retry}:void 0,tokenProvider:e?.tokenProvider,onRequest:e?.onRequest,onResponse:e?.onResponse}}async function Ce(e,t){let{retries:r,factor:s,minTimeout:n,maxTimeout:a,randomize:p,backoffStrategy:m,onFailedAttempt:o}=t,c=1;for(;;)try{return await e(c)}catch(u){if(c>r)throw u;let l;switch(m){case"linear":l=n*c;break;case"constant":l=n;break;default:l=n*Math.pow(s,c-1)}p&&(l*=1+Math.random()),l=Math.min(l,a),o&&o({attemptNumber:c,retriesLeft:r-c+1,name:u instanceof Error?u.name:"Error",message:u instanceof Error?u.message:String(u),error:u instanceof Error?u:new Error(String(u))}),await new Promise(R=>setTimeout(R,l)),c++}}var te=class{constructor(t){I(this,"options");this.options=ye(t)}async sendInternal(t,r,s,n,a=!0){let p=Date.now(),o={url:`${this.options.baseUrl.replace(/\/$/,"")}/${r.replace(/^\//,"")}`,method:t,headers:{...this.options.customHeaders,...n?.headers},body:s};if(this.options.onRequest)try{o=await this.options.onRequest(o)}catch(u){this.options.logLevel!=="none"&&this.options.logger.warn("Request interceptor failed:",u)}this.logRequest(t,r,s,n?.headers);let c=async u=>{try{let d=await this.sendSingleRequest(o.method,r,o.body,{headers:o.headers,signal:n?.signal,timeoutMs:n?.timeoutMs},a);if(d.kind==="success")return d;if(this.shouldRetryResult(d)){let l=new Error(d.message);throw l.result=d,l.attemptNumber=u,l}return d}catch(d){let l=ee(d);if(l.type==="Timeout")return l;if(l.type==="HttpRequestFailed"&&this.options.retry){let R=new Error(l.message);throw R.result=l,R.attemptNumber=u,R}return l}};try{let u;this.options.retry?u=await Ce(c,{...this.options.retry,onFailedAttempt:l=>{let R=l.error;R.result&&this.logRetry(l.attemptNumber,R.result),this.options.retry?.onFailedAttempt&&this.options.retry.onFailedAttempt(l)}}):u=await c(1);let d=Date.now()-p;if(this.logResponse("SUCCESS",d,1,u),this.options.onResponse)try{return await this.options.onResponse(u,o)}catch(l){this.options.logLevel!=="none"&&this.options.logger.warn("Response interceptor failed:",l)}return u}catch(u){let d=Date.now()-p,l=u;if(l.result){if(this.logResponse("ERROR",d,l.attemptNumber||1,l.result),this.options.onResponse)try{return await this.options.onResponse(l.result,o)}catch(oe){this.options.logLevel!=="none"&&this.options.logger.warn("Response interceptor failed:",oe)}return l.result}let R=ee(u);if(this.logResponse("ERROR",d,1,R),this.options.onResponse)try{return await this.options.onResponse(R,o)}catch(oe){this.options.logLevel!=="none"&&this.options.logger.warn("Response interceptor failed:",oe)}return R}}async sendSingleRequest(t,r,s,n,a=!0){let p=`${this.options.baseUrl.replace(/\/$/,"")}/${r.replace(/^\//,"")}`,m=await this.buildHeaders(n?.headers),o=null;if(s)if(s instanceof FormData)o=s;else try{o=JSON.stringify(s),this.hasContentTypeHeader(m)||(m["Content-Type"]="application/json")}catch(R){return ge(R)}let c=new AbortController,u=setTimeout(()=>c.abort(),n?.timeoutMs??this.options.timeoutMs),d;if(n?.signal)if(n.signal.aborted)c.abort();else{let R=()=>c.abort();n.signal.addEventListener("abort",R,{once:!0}),d=()=>n.signal.removeEventListener("abort",R)}let l;try{l=await fetch(p,{method:t,headers:m,body:o,signal:c.signal})}finally{clearTimeout(u),d?.()}return await this.handleResponse(l,a)}async get(t,r){return this.sendInternal("GET",t,null,r,!0)}async post(t,r,s){return this.sendInternal("POST",t,r,s,!0)}async postNoContent(t,r,s){return this.sendInternal("POST",t,r,s,!1)}async put(t,r,s){return this.sendInternal("PUT",t,r,s,!0)}async putNoContent(t,r,s){return this.sendInternal("PUT",t,r,s,!1)}async patch(t,r,s){return this.sendInternal("PATCH",t,r,s,!0)}async patchNoContent(t,r,s){return this.sendInternal("PATCH",t,r,s,!1)}async delete(t,r){return this.sendInternal("DELETE",t,null,r,!0)}async deleteNoContent(t,r){return this.sendInternal("DELETE",t,null,r,!1)}async getBlob(t,r){let s=`${this.options.baseUrl.replace(/\/$/,"")}/${t.replace(/^\//,"")}`,n=await this.buildHeaders(r?.headers),a={url:s,method:"GET",headers:n};if(this.options.onRequest)try{a=await this.options.onRequest(a)}catch(u){this.options.logLevel!=="none"&&this.options.logger.warn("Request interceptor failed:",u)}this.logRequest("GET",t,void 0,r?.headers);let p=new AbortController,m=setTimeout(()=>p.abort(),r?.timeoutMs??this.options.timeoutMs),o;if(r?.signal)if(r.signal.aborted)p.abort();else{let u=()=>p.abort();r.signal.addEventListener("abort",u,{once:!0}),o=()=>r.signal.removeEventListener("abort",u)}let c;try{c=await fetch(s,{method:"GET",headers:a.headers,signal:p.signal})}catch(u){let d=ee(u);if(this.options.onResponse)try{return await this.options.onResponse(d,a)}catch(l){this.options.logLevel!=="none"&&this.options.logger.warn("Response interceptor failed:",l)}return d}finally{clearTimeout(m),o?.()}if(!c.ok){let u=await c.text(),d=ae(c,u);if(this.options.onResponse)try{return await this.options.onResponse(d,a)}catch(l){this.options.logLevel!=="none"&&this.options.logger.warn("Response interceptor failed:",l)}return d}try{let u=await c.blob(),d=b(u);if(this.options.onResponse)try{return await this.options.onResponse(d,a)}catch(l){this.options.logLevel!=="none"&&this.options.logger.warn("Response interceptor failed:",l)}return d}catch(u){let d=L(u);if(this.options.onResponse)try{return await this.options.onResponse(d,a)}catch(l){this.options.logLevel!=="none"&&this.options.logger.warn("Response interceptor failed:",l)}return d}}async buildHeaders(t){let r={...this.options.customHeaders,...t};if(!(typeof globalThis=="object"&&"window"in globalThis)&&this.options.userAgent&&(r["User-Agent"]=this.options.userAgent),this.options.tokenProvider)try{let n=await this.options.tokenProvider();n&&(r.Authorization=`Bearer ${n}`)}catch(n){this.options.logLevel!=="none"&&this.options.logger.warn("Token provider failed:",n)}return r}hasContentTypeHeader(t){return Object.keys(t).some(r=>r.toLowerCase()==="content-type")}isJsonContentType(t){let r=t.toLowerCase();return r.includes("application/json")||r.includes("application/vnd.api+json")||r.includes("application/hal+json")||r.includes("application/problem+json")||r.includes("text/json")||/^application\/.*\+json/i.test(t)}async handleResponse(t,r){if(!t.ok){let a=await t.text();return ae(t,a)}if(t.status===204||t.status===205)return r?ue():le();let s=await t.text();if(!s.trim())return r?ue():le();let n=t.headers.get("content-type");return n&&!this.isJsonContentType(n)?L(new Error(`Expected JSON response but got ${n}`)):this.parseSuccessResponse(s)}parseSuccessResponse(t){try{let r=JSON.parse(t);return b(r)}catch(r){return L(r)}}shouldRetryResult(t){return this.options.retry?t.kind==="server-error"?this.options.retry.retryableStatusCodes.includes(t.status):t.kind==="client-error"?t.type==="HttpRequestFailed":!1:!1}logRequest(t,r,s,n){if(this.options.logLevel==="none")return;let a=`${this.options.baseUrl.replace(/\/$/,"")}/${r.replace(/^\//,"")}`;if(this.options.logLevel==="basic")this.options.logger.info(`${t} ${a}`);else if(this.options.logLevel==="detailed"){let p=this.sanitizeHeaders(n),m=this.sanitizeBody(s);this.options.logger.info(`Request: ${t} ${a}`,{headers:p,body:m})}}logResponse(t,r,s,n){if(this.options.logLevel==="none")return;let a=s>1?` (attempt ${s})`:"";if(this.options.logLevel==="basic")t==="SUCCESS"?this.options.logger.info(`${t} in ${r}ms${a}`):this.options.logger.error(`${t} in ${r}ms${a}`);else if(this.options.logLevel==="detailed")if(t==="SUCCESS"){let p=n.kind==="success"&&"data"in n?this.sanitizeResponseData(n.data):void 0;this.options.logger.info(`Response: ${t} in ${r}ms${a}`,{data:p})}else{let p=this.sanitizeError(n);this.options.logger.error(`Response: ${t} in ${r}ms${a}`,{error:p})}}logRetry(t,r){if(this.options.logLevel==="none")return;let s=r.kind==="server-error"?`HTTP ${r.status}`:r.kind==="client-error"?r.type:"Unknown error";this.options.logger.warn(`Retry attempt ${t} failed due to: ${s}`)}sanitizeHeaders(t){if(!t)return;let r={},s=["authorization","cookie","x-api-key","x-auth-token"];for(let[n,a]of Object.entries(t)){let p=n.toLowerCase();s.includes(p)?r[n]="[REDACTED]":r[n]=a}return r}sanitizeBody(t){if(t){if(t instanceof FormData)return"[FormData body]";if(typeof t=="string")return t.length>1e4?"[Large string body - truncated for logging]":t.length>1e3?`${t.substring(0,1e3)}... [truncated]`:t;if(typeof t=="number"||typeof t=="boolean")return t;try{if(this.isLargeObject(t))return"[Large object body - truncated for logging]";let r=JSON.stringify(t);return r.length>1e3?`${r.substring(0,1e3)}... [truncated]`:t}catch{return"[Unable to serialize body]"}}}isLargeObject(t){if(!t||typeof t!="object")return!1;try{let r=0,s=0,n=(a,p=0)=>{if(p>3||r>50)return!0;if(s=Math.max(s,p),Array.isArray(a)){if(a.length>100)return!0;for(let m=0;m<Math.min(a.length,10);m++)if(n(a[m],p+1))return!0}else if(a&&typeof a=="object"){let m=Object.keys(a);r+=m.length;for(let o of m.slice(0,10))if(n(a[o],p+1))return!0}return!1};return n(t)}catch{return!0}}sanitizeResponseData(t){if(t==null)return t;try{if(this.isLargeObject(t))return"[Large response data - truncated for logging]";let r=JSON.stringify(t);return r.length>1e3?`${r.substring(0,1e3)}... [truncated]`:t}catch{return"[Unable to serialize response data]"}}sanitizeError(t){return t.kind==="server-error"?{type:t.type,status:t.status,title:t.title,detail:t.detail,traceId:t.traceId}:t.kind==="client-error"?{type:t.type,message:t.message}:{message:"Unknown error type"}}};function tt(e){if(typeof e!="string")return"UNKNOWN";switch(e.toUpperCase()){case"FORBIDDEN":return"FORBIDDEN";case"UNAUTHORIZED":return"UNAUTHORIZED";case"NOT_FOUND":return"NOT_FOUND";case"BAD_REQUEST":return"BAD_REQUEST";case"CONFLICT":return"CONFLICT";case"NOT_SUPPORTED":return"NOT_SUPPORTED";case"UPSTREAM_ERROR":return"UPSTREAM_ERROR";case"INTERNAL_ERROR":return"INTERNAL_ERROR";case"VALIDATION_ERROR":return"VALIDATION_ERROR";case"FILTER_REQUIRED":return"FILTER_REQUIRED";case"FILTER_MAX_SPAN_EXCEEDED":return"FILTER_MAX_SPAN_EXCEEDED";default:return"UNKNOWN"}}function rt(e){return e?{...e,code:tt(e.code),traceId:typeof e.traceId=="string"?e.traceId:void 0,codes:Array.isArray(e.codes)?e.codes.filter(r=>typeof r=="string"):void 0,template:typeof e.template=="string"?e.template:void 0,templateArgs:typeof e.templateArgs=="object"&&e.templateArgs!==null?e.templateArgs:void 0,suggestions:Array.isArray(e.suggestions)?e.suggestions.filter(r=>typeof r=="string"):void 0}:void 0}function st(e){return e.map(t=>{let r=t.locations?.map(s=>({line:s.line,column:s.column}));return{message:t.message,locations:r,path:t.path,extensions:rt(t.extensions)}})}var v=class{constructor(t){this.http=t}async query(t,r,s){let n={query:t,variables:r},a=await this.http.post("graphql",n,s);if(!a.isSuccess)return a;let p=a.data;if(p.errors&&p.errors.length>0){let m=st(p.errors);return pe(m)}return p.data?b(p.data):L(new Error("GraphQL response contained no data and no errors"))}};var ve={};xe(ve,{addressParameters:()=>A,agentBranches:()=>N,agentRoles:()=>O,agentSetupRequests:()=>re,agentUsers:()=>y,agents:()=>h,b2c:()=>D,banks:()=>Se,cases:()=>g,contactForm:()=>nt,coverageChoices:()=>S,coverageGroups:()=>U,customers:()=>Pe,endpoints:()=>i,filePolicyTransfers:()=>Le,files:()=>se,financialInstitutions:()=>be,insuranceCompanies:()=>he,insuranceServices:()=>Ue,languages:()=>ne,policies:()=>Te,policyTransfers:()=>Oe,properties:()=>f,proposals:()=>Ne,releaseNotes:()=>_e,resourceKeys:()=>Ee,templates:()=>T,vehicleParameters:()=>Ae,vehicles:()=>fe,webhooks:()=>E});var nt={submit:"contact-form"},h={getCurrentAgent:"agents/me",updateCurrentAgent:"agents/me",reSyncCurrentAgentWithInsurance:"agents/me/re-sync",insuranceCompanies:{getMyInsuranceCompanies:"agents/me/insurance-companies",addInsuranceCompanyToAgent:"agents/me/insurance-companies",getBranches:{definition:"agents/me/insurance-companies/{AgentInsuranceCompanyId}/branches",render:e=>"agents/me/insurance-companies/{AgentInsuranceCompanyId}/branches".replace("{AgentInsuranceCompanyId}",encodeURIComponent(e))},getConnection:{definition:"agents/me/insurance-companies/{AgentInsuranceCompanyId}/connection",render:e=>"agents/me/insurance-companies/{AgentInsuranceCompanyId}/connection".replace("{AgentInsuranceCompanyId}",encodeURIComponent(e))},updateConnection:{definition:"agents/me/insurance-companies/{AgentInsuranceCompanyId}/connection",render:e=>"agents/me/insurance-companies/{AgentInsuranceCompanyId}/connection".replace("{AgentInsuranceCompanyId}",encodeURIComponent(e))},updateBranches:{definition:"agents/me/insurance-companies/{AgentInsuranceCompanyId}/branches",render:e=>"agents/me/insurance-companies/{AgentInsuranceCompanyId}/branches".replace("{AgentInsuranceCompanyId}",encodeURIComponent(e))},reSyncAgentInsuranceCompanyWithInsurance:{definition:"agents/me/insurance-companies/{AgentInsuranceCompanyId}/re-sync",render:e=>"agents/me/insurance-companies/{AgentInsuranceCompanyId}/re-sync".replace("{AgentInsuranceCompanyId}",encodeURIComponent(e))},remove:{definition:"agents/me/insurance-companies/{AgentInsuranceCompanyId}",render:e=>"agents/me/insurance-companies/{AgentInsuranceCompanyId}".replace("{AgentInsuranceCompanyId}",encodeURIComponent(e))}}},he={getInsuranceCompanies:"insurance-companies",getInsuranceCompanyProducts:{definition:"insurance-companies/{InsuranceCompanyId}/products",render:e=>"insurance-companies/{InsuranceCompanyId}/products".replace("{InsuranceCompanyId}",encodeURIComponent(e.toString()))},getAllProducts:"insurance-companies/products",connectionFields:{getAgentBasedConnectionFieldsByCompanyId:{definition:"insurance-companies/{InsuranceCompanyId}/connection-fields:agent-based",render:e=>"insurance-companies/{InsuranceCompanyId}/connection-fields:agent-based".replace("{InsuranceCompanyId}",encodeURIComponent(e.toString()))}}},Ee={getAll:"resource-keys"},Pe={createCustomer:"customers",getCurrentCustomer:"customers/me",externalLookup:"customers/external-lookup",setCustomerRepresentative:{definition:"customers/{CustomerId}/representative",render:e=>"customers/{CustomerId}/representative".replace("{CustomerId}",encodeURIComponent(e))},getCustomer:{definition:"customers/{CustomerId}",render:e=>"customers/{CustomerId}".replace("{CustomerId}",encodeURIComponent(e))},updateCustomer:{definition:"customers/{CustomerId}",render:e=>"customers/{CustomerId}".replace("{CustomerId}",encodeURIComponent(e))},deleteCustomer:{definition:"customers/{CustomerId}",render:e=>"customers/{CustomerId}".replace("{CustomerId}",encodeURIComponent(e))},getHealthInfo:{definition:"customers/{CustomerId}/health-info",render:e=>"customers/{CustomerId}/health-info".replace("{CustomerId}",encodeURIComponent(e))},updateHealthInfo:{definition:"customers/{CustomerId}/health-info",render:e=>"customers/{CustomerId}/health-info".replace("{CustomerId}",encodeURIComponent(e))},emails:{addCustomerEmail:{definition:"customers/{CustomerId}/emails",render:e=>"customers/{CustomerId}/emails".replace("{CustomerId}",encodeURIComponent(e))},removeCustomerEmail:{definition:"customers/{CustomerId}/emails/{Email}",render:e=>"customers/{CustomerId}/emails/{Email}".replace("{CustomerId}",encodeURIComponent(e.customerId)).replace("{Email}",encodeURIComponent(e.email))},changePrimaryCustomerEmail:{definition:"customers/{CustomerId}/emails/{Email}/primary",render:e=>"customers/{CustomerId}/emails/{Email}/primary".replace("{CustomerId}",encodeURIComponent(e.customerId)).replace("{Email}",encodeURIComponent(e.email))},getCustomerEmails:{definition:"customers/{CustomerId}/emails",render:e=>"customers/{CustomerId}/emails".replace("{CustomerId}",encodeURIComponent(e))}},phoneNumbers:{addCustomerPhoneNumber:{definition:"customers/{CustomerId}/phone-numbers",render:e=>"customers/{CustomerId}/phone-numbers".replace("{CustomerId}",encodeURIComponent(e))},removeCustomerPhoneNumber:{definition:"customers/{CustomerId}/phone-numbers/{CountryCode}-{PhoneNumber}",render:e=>"customers/{CustomerId}/phone-numbers/{CountryCode}-{PhoneNumber}".replace("{CustomerId}",encodeURIComponent(e.customerId)).replace("{CountryCode}",encodeURIComponent(e.countryCode.toString())).replace("{PhoneNumber}",encodeURIComponent(e.phoneNumber))},changePrimaryCustomerPhoneNumber:{definition:"customers/{CustomerId}/phone-numbers/{CountryCode}-{PhoneNumber}/primary",render:e=>"customers/{CustomerId}/phone-numbers/{CountryCode}-{PhoneNumber}/primary".replace("{CustomerId}",encodeURIComponent(e.customerId)).replace("{CountryCode}",encodeURIComponent(e.countryCode.toString())).replace("{PhoneNumber}",encodeURIComponent(e.phoneNumber))},getCustomerPhoneNumbers:{definition:"customers/{CustomerId}/phone-numbers",render:e=>"customers/{CustomerId}/phone-numbers".replace("{CustomerId}",encodeURIComponent(e))}},contactFlows:{getCustomerContactFlows:{definition:"customers/{CustomerId}/contact-flows",render:(e,t)=>{let r="customers/{CustomerId}/contact-flows".replace("{CustomerId}",encodeURIComponent(e));return t?r+"?caseRef="+encodeURIComponent(t):r}},createContactFlow:{definition:"customers/{CustomerId}/contact-flows",render:e=>"customers/{CustomerId}/contact-flows".replace("{CustomerId}",encodeURIComponent(e))},endContactFlow:{definition:"customers/{CustomerId}/contact-flows/{ContactFlowId}/end",render:(e,t)=>"customers/{CustomerId}/contact-flows/{ContactFlowId}/end".replace("{CustomerId}",encodeURIComponent(e)).replace("{ContactFlowId}",encodeURIComponent(t))}},contacts:{getCustomerContacts:{definition:"customers/{CustomerId}/contacts",render:(e,t)=>{let r="customers/{CustomerId}/contacts".replace("{CustomerId}",encodeURIComponent(e));return t?r+"?caseRef="+encodeURIComponent(t):r}},create:{definition:"customers/{CustomerId}/contacts",render:e=>"customers/{CustomerId}/contacts".replace("{CustomerId}",encodeURIComponent(e))}},setCustomerBranch:{definition:"customers/{CustomerId}/branch",render:e=>"customers/{CustomerId}/branch".replace("{CustomerId}",encodeURIComponent(e))},addresses:{create:{definition:"customers/{CustomerId}/addresses",render:e=>"customers/{CustomerId}/addresses".replace("{CustomerId}",encodeURIComponent(e))},update:{definition:"customers/{CustomerId}/addresses/{AddressId}",render:(e,t)=>"customers/{CustomerId}/addresses/{AddressId}".replace("{CustomerId}",encodeURIComponent(e)).replace("{AddressId}",encodeURIComponent(t))},getById:{definition:"customers/{CustomerId}/addresses/{AddressId}",render:(e,t)=>"customers/{CustomerId}/addresses/{AddressId}".replace("{CustomerId}",encodeURIComponent(e)).replace("{AddressId}",encodeURIComponent(t))},getAll:{definition:"customers/{CustomerId}/addresses",render:e=>"customers/{CustomerId}/addresses".replace("{CustomerId}",encodeURIComponent(e))},delete:{definition:"customers/{CustomerId}/addresses/{AddressId}",render:(e,t)=>"customers/{CustomerId}/addresses/{AddressId}".replace("{CustomerId}",encodeURIComponent(e)).replace("{AddressId}",encodeURIComponent(t))}},consents:{give:{definition:"customers/{CustomerId}/consents",render:e=>"customers/{CustomerId}/consents".replace("{CustomerId}",encodeURIComponent(e))},revoke:{definition:"customers/{CustomerId}/consents/revoke",render:e=>"customers/{CustomerId}/consents/revoke".replace("{CustomerId}",encodeURIComponent(e))},getAll:{definition:"customers/{CustomerId}/consents",render:e=>"customers/{CustomerId}/consents".replace("{CustomerId}",encodeURIComponent(e))}}},A={queryCities:"address-parameters/cities",queryDistricts:{definition:"address-parameters/districts",render:e=>"address-parameters/districts?cityReference={cityReference}".replace("{cityReference}",e.cityReference)},queryTowns:{definition:"address-parameters/towns",render:e=>"address-parameters/towns?districtReference={districtReference}".replace("{districtReference}",e.districtReference)},queryNeighbourhoods:{definition:"address-parameters/neighbourhoods",render:e=>"address-parameters/neighbourhoods?townReference={townReference}".replace("{townReference}",e.townReference)},queryStreets:{definition:"address-parameters/streets",render:e=>"address-parameters/streets?neighbourhoodReference={neighbourhoodReference}".replace("{neighbourhoodReference}",e.neighbourhoodReference)},queryBuildings:{definition:"address-parameters/buildings",render:e=>"address-parameters/buildings?streetReference={streetReference}".replace("{streetReference}",e.streetReference)},queryApartments:{definition:"address-parameters/apartments",render:e=>"address-parameters/apartments?buildingReference={buildingReference}".replace("{buildingReference}",e.buildingReference)}},Ae={queryBrands:"vehicle-parameters/brands",queryModels:{definition:"vehicle-parameters/models",render:e=>"vehicle-parameters/models?brandReference={brandReference}&year={year}".replace("{brandReference}",encodeURIComponent(e.brandReference)).replace("{year}",encodeURIComponent(e.year.toString()))}},fe={getCurrentCustomerVehicles:"customers/me/vehicles",externalLookup:{definition:"customers/{CustomerId}/vehicles/external-lookup",render:e=>"customers/{CustomerId}/vehicles/external-lookup".replace("{CustomerId}",encodeURIComponent(e))},create:{definition:"customers/{CustomerId}/vehicles",render:e=>"customers/{CustomerId}/vehicles".replace("{CustomerId}",encodeURIComponent(e))},update:{definition:"customers/{CustomerId}/vehicles/{VehicleId}",render:(e,t)=>"customers/{CustomerId}/vehicles/{VehicleId}".replace("{CustomerId}",encodeURIComponent(e)).replace("{VehicleId}",encodeURIComponent(t))},delete:{definition:"customers/{CustomerId}/vehicles/{VehicleId}",render:(e,t)=>"customers/{CustomerId}/vehicles/{VehicleId}".replace("{CustomerId}",encodeURIComponent(e)).replace("{VehicleId}",encodeURIComponent(t))},get:{definition:"customers/{CustomerId}/vehicles/{VehicleId}",render:(e,t)=>"customers/{CustomerId}/vehicles/{VehicleId}".replace("{CustomerId}",encodeURIComponent(e)).replace("{VehicleId}",encodeURIComponent(t))},getCustomerVehicles:{definition:"customers/{CustomerId}/vehicles",render:e=>"customers/{CustomerId}/vehicles".replace("{CustomerId}",encodeURIComponent(e))}},Ue={queryVehicleByBrandCode:"insurance-services/query-vehicle-by-brand-code"},f={getPropertyAddressByPropertyNumber:"properties/query-address-by-property-number",queryPropertyByDaskOldPolicy:"properties/query-property-by-dask-old-policy",getCurrentCustomerProperties:"customers/me/properties",getAll:{definition:"customers/{CustomerId}/properties",render:e=>"customers/{CustomerId}/properties".replace("{CustomerId}",encodeURIComponent(e))},create:{definition:"customers/{CustomerId}/properties",render:e=>"customers/{CustomerId}/properties".replace("{CustomerId}",encodeURIComponent(e))},getById:{definition:"customers/{CustomerId}/properties/{PropertyId}",render:(e,t)=>"customers/{CustomerId}/properties/{PropertyId}".replace("{CustomerId}",encodeURIComponent(e)).replace("{PropertyId}",encodeURIComponent(t))},update:{definition:"customers/{CustomerId}/properties/{PropertyId}",render:(e,t)=>"customers/{CustomerId}/properties/{PropertyId}".replace("{CustomerId}",encodeURIComponent(e)).replace("{PropertyId}",encodeURIComponent(t))},delete:{definition:"customers/{CustomerId}/properties/{PropertyId}",render:(e,t)=>"customers/{CustomerId}/properties/{PropertyId}".replace("{CustomerId}",encodeURIComponent(e)).replace("{PropertyId}",encodeURIComponent(t))}},Ne={create:"proposals",getProposalById:{definition:"proposals/{ProposalId}",render:e=>"proposals/{ProposalId}".replace("{ProposalId}",encodeURIComponent(e))},getProposalSnapshot:{definition:"proposals/{ProposalId}/snapshot",render:e=>"proposals/{ProposalId}/snapshot".replace("{ProposalId}",encodeURIComponent(e))},getProposalCoverage:{definition:"proposals/{ProposalId}/coverage",render:e=>"proposals/{ProposalId}/coverage".replace("{ProposalId}",encodeURIComponent(e))},getProposalProductCoverage:{definition:"proposals/{ProposalId}/products/{ProposalProductId}/coverage",render:(e,t)=>"proposals/{ProposalId}/products/{ProposalProductId}/coverage".replace("{ProposalId}",encodeURIComponent(e)).replace("{ProposalProductId}",encodeURIComponent(t))},retryFailedProposalProduct:{definition:"proposals/{ProposalId}/products/{ProposalProductId}/retry",render:(e,t)=>"proposals/{ProposalId}/products/{ProposalProductId}/retry".replace("{ProposalId}",encodeURIComponent(e)).replace("{ProposalProductId}",encodeURIComponent(t))},getProposalProductPremiumDetail:{definition:"proposals/{ProposalId}/products/{ProposalProductId}/premium-detail/{InstallmentNumber}",render:(e,t,r)=>"proposals/{ProposalId}/products/{ProposalProductId}/premium-detail/{InstallmentNumber}".replace("{ProposalId}",encodeURIComponent(e)).replace("{ProposalProductId}",encodeURIComponent(t)).replace("{InstallmentNumber}",encodeURIComponent(r.toString()))},purchaseProposalProductSync:{definition:"proposals/{ProposalId}/products/{ProposalProductId}/purchase/sync",render:(e,t)=>"proposals/{ProposalId}/products/{ProposalProductId}/purchase/sync".replace("{ProposalId}",encodeURIComponent(e)).replace("{ProposalProductId}",encodeURIComponent(t))},purchaseProposalProductAsync:{definition:"proposals/{ProposalId}/products/{ProposalProductId}/purchase/async",render:(e,t)=>"proposals/{ProposalId}/products/{ProposalProductId}/purchase/async".replace("{ProposalId}",encodeURIComponent(e)).replace("{ProposalProductId}",encodeURIComponent(t))},reviseProposal:{definition:"proposals/{ProposalId}/revise",render:e=>"proposals/{ProposalId}/revise".replace("{ProposalId}",encodeURIComponent(e))},reviseProposalProduct:{definition:"proposals/{ProposalId}/products/{ProposalProductId}/revise",render:(e,t)=>"proposals/{ProposalId}/products/{ProposalProductId}/revise".replace("{ProposalId}",encodeURIComponent(e)).replace("{ProposalProductId}",encodeURIComponent(t))},fetchProposalProductDocument:{definition:"proposals/{ProposalId}/products/{ProposalProductId}/document",render:(e,t)=>"proposals/{ProposalId}/products/{ProposalProductId}/document".replace("{ProposalId}",encodeURIComponent(e)).replace("{ProposalProductId}",encodeURIComponent(t))},fetchProposalInformationFormDocument:{definition:"proposals/{ProposalId}/products/{ProposalProductId}/information-form",render:(e,t)=>"proposals/{ProposalId}/products/{ProposalProductId}/information-form".replace("{ProposalId}",encodeURIComponent(e)).replace("{ProposalProductId}",encodeURIComponent(t))},sendProposalProductDocument:{definition:"proposals/{ProposalId}/products/{ProposalProductId}/document/send",render:(e,t)=>"proposals/{ProposalId}/products/{ProposalProductId}/document/send".replace("{ProposalId}",encodeURIComponent(e)).replace("{ProposalProductId}",encodeURIComponent(t))},sendProposalInformationFormDocument:{definition:"proposals/{ProposalId}/products/{ProposalProductId}/information-form/send",render:(e,t)=>"proposals/{ProposalId}/products/{ProposalProductId}/information-form/send".replace("{ProposalId}",encodeURIComponent(e)).replace("{ProposalProductId}",encodeURIComponent(t))},generateCompareProposalProductsPdf:{definition:"proposals/{ProposalId}/products/compare-pdf",render:e=>"proposals/{ProposalId}/products/compare-pdf".replace("{ProposalId}",encodeURIComponent(e))},sendCompareProposalProductsPdf:{definition:"proposals/{ProposalId}/products/compare-pdf/send",render:e=>"proposals/{ProposalId}/products/compare-pdf/send".replace("{ProposalId}",encodeURIComponent(e))},setProposalRepresentative:{definition:"proposals/{ProposalId}/representative",render:e=>"proposals/{ProposalId}/representative".replace("{ProposalId}",encodeURIComponent(e))},setProposalBranch:{definition:"proposals/{ProposalId}/branch",render:e=>"proposals/{ProposalId}/branch".replace("{ProposalId}",encodeURIComponent(e))},generateCustomerProposalDocumentPdf:{definition:"proposals/{ProposalId}/customer-document-pdf",render:e=>"proposals/{ProposalId}/customer-document-pdf".replace("{ProposalId}",encodeURIComponent(e))},getProposalConversionTrend:{definition:"proposals/analytics/conversion-trend"}},Te={getPolicyDetail:{definition:"policies/{PolicyId}",render:e=>"policies/{PolicyId}".replace("{PolicyId}",encodeURIComponent(e))},fetchPolicyDocument:{definition:"policies/{PolicyId}/document",render:e=>"policies/{PolicyId}/document".replace("{PolicyId}",encodeURIComponent(e))},sendPolicyDocument:{definition:"policies/{PolicyId}/document/send",render:e=>"policies/{PolicyId}/document/send".replace("{PolicyId}",encodeURIComponent(e))},setPolicyRepresentative:{definition:"policies/{PolicyId}/representative",render:e=>"policies/{PolicyId}/representative".replace("{PolicyId}",encodeURIComponent(e))},setPolicyBranch:{definition:"policies/{PolicyId}/branch",render:e=>"policies/{PolicyId}/branch".replace("{PolicyId}",encodeURIComponent(e))},createManualPolicy:{definition:"policies/manual"},updateManualPolicy:{definition:"policies/manual/{PolicyId}",render:e=>"policies/manual/{PolicyId}".replace("{PolicyId}",encodeURIComponent(e))},getPolicyCountAndPremiumAnalytics:{definition:"policies/analytics/count-and-premium"},getPolicyRenewalAnalytics:{definition:"policies/analytics/renewal"},getPolicyDistributionByBranch:{definition:"policies/analytics/distribution-by-branch"},getRepresentativeEarningsAnalytics:{definition:"policies/analytics/representative-earnings"}},Oe={create:"policy-transfers",getPolicyTransferDetail:{definition:"policy-transfers/{PolicyTransferId}",render:e=>"policy-transfers/{PolicyTransferId}".replace("{PolicyTransferId}",encodeURIComponent(e))},getPolicyTransferTriggerDetail:{definition:"policy-transfers/{PolicyTransferId}/triggers/{PolicyTransferTriggerId}",render:(e,t)=>"policy-transfers/{PolicyTransferId}/triggers/{PolicyTransferTriggerId}".replace("{PolicyTransferId}",encodeURIComponent(e)).replace("{PolicyTransferTriggerId}",encodeURIComponent(t))},triggerPolicyTransfer:{definition:"policy-transfers/{PolicyTransferId}/trigger",render:e=>"policy-transfers/{PolicyTransferId}/trigger".replace("{PolicyTransferId}",encodeURIComponent(e))}},Le={create:"file-policy-transfers",getFilePolicyTransferDetail:{definition:"file-policy-transfers/{FilePolicyTransferId}",render:e=>"file-policy-transfers/{FilePolicyTransferId}".replace("{FilePolicyTransferId}",encodeURIComponent(e))}},S={getKaskoCoverageChoices:{definition:"coverage-choices:kasko",render:e=>e!==void 0?"coverage-choices:kasko?vehicleUtilizationStyle={vehicleUtilizationStyle}".replace("{vehicleUtilizationStyle}",encodeURIComponent(e)):"coverage-choices:kasko"},getKonutCoverageChoices:{definition:"coverage-choices:konut",render:()=>"coverage-choices:konut"},getImmCoverageChoices:{definition:"coverage-choices:imm",render:()=>"coverage-choices:imm"},getTssCoverageChoices:{definition:"coverage-choices:tss",render:()=>"coverage-choices:tss"}},re={complete:"agent-setup-requests/complete",create:"agent-setup-requests",getAll:"agent-setup-requests",enter:"agent-setup-requests/enter",getAgentSetupRequestById:{definition:"agent-setup-requests/{Id}",render:e=>"agent-setup-requests/{Id}".replace("{Id}",encodeURIComponent(e))},disableAgentSetupRequest:{definition:"agent-setup-requests/{Id}/disable",render:e=>"agent-setup-requests/{Id}/disable".replace("{Id}",encodeURIComponent(e))}},y={forgotPassword:"agent-users/forgot-password",resetPassword:"agent-users/reset-password",checkAgentUserForgotPasswordToken:"agent-users/check-forgot-password-token",me:"agent-users/me",meRobotCode:"agent-users/me/robot-code",invite:"agent-users/invite",updateMyUser:"agent-users/me",acceptInvite:"agent-users/accept-invite",updatePassword:"agent-users/me/password",reSendInvite:{definition:"agent-users/{AgentUserId}/re-send-invite",render:e=>"agent-users/{AgentUserId}/re-send-invite".replace("{AgentUserId}",encodeURIComponent(e))},deactivate:{definition:"agent-users/{AgentUserId}/deactivate",render:e=>"agent-users/{AgentUserId}/deactivate".replace("{AgentUserId}",encodeURIComponent(e))},activate:{definition:"agent-users/{AgentUserId}/activate",render:e=>"agent-users/{AgentUserId}/activate".replace("{AgentUserId}",encodeURIComponent(e))},delete:{definition:"agent-users/{UserId}",render:e=>"agent-users/{UserId}".replace("{UserId}",encodeURIComponent(e))},getById:{definition:"agent-users/{UserId}",render:e=>"agent-users/{UserId}".replace("{UserId}",encodeURIComponent(e))},checkAgentUserInviteCode:{definition:"agent-users/check-invite-code",render:e=>"agent-users/check-invite-code?code={code}".replace("{code}",encodeURIComponent(e))},update:{definition:"agent-users/{Id}",render:e=>"agent-users/{Id}".replace("{Id}",encodeURIComponent(e))},migrate:{definition:"agent-users/{AgentUserId}/migrate",render:e=>"agent-users/{AgentUserId}/migrate".replace("{AgentUserId}",encodeURIComponent(e))},migrateAll:"agent-users/migrate-all"},O={getAll:"agent-roles",create:"agent-roles",update:{definition:"agent-roles/{Id}",render:e=>"agent-roles/{Id}".replace("{Id}",encodeURIComponent(e))},delete:{definition:"agent-roles/{Id}",render:e=>"agent-roles/{Id}".replace("{Id}",encodeURIComponent(e))},getById:{definition:"agent-roles/{Id}",render:e=>"agent-roles/{Id}".replace("{Id}",encodeURIComponent(e))}},E={getAll:"webhooks",create:"webhooks",getById:{definition:"webhooks/{Id}",render:e=>"webhooks/{Id}".replace("{Id}",encodeURIComponent(e))},update:{definition:"webhooks/{Id}",render:e=>"webhooks/{Id}".replace("{Id}",encodeURIComponent(e))},delete:{definition:"webhooks/{Id}",render:e=>"webhooks/{Id}".replace("{Id}",encodeURIComponent(e))},deliveries:{getById:{definition:"webhooks/{WebhookId}/deliveries/{WebhookDeliveryId}",render:(e,t)=>"webhooks/{WebhookId}/deliveries/{WebhookDeliveryId}".replace("{WebhookId}",encodeURIComponent(e)).replace("{WebhookDeliveryId}",encodeURIComponent(t))},redeliver:{definition:"webhooks/{WebhookId}/deliveries/{WebhookDeliveryId}/redeliver",render:(e,t)=>"webhooks/{WebhookId}/deliveries/{WebhookDeliveryId}/redeliver".replace("{WebhookId}",encodeURIComponent(e)).replace("{WebhookDeliveryId}",encodeURIComponent(t))}}},g={createNewSaleOpportunity:"cases:new-sale-opportunity",createCrossSaleOpportunity:"cases:cross-sale-opportunity",createCancel:"cases:cancel",createEndorsement:"cases:endorsement",createComplaint:"cases:complaint",assignRepresentative:{definition:"cases/{Ref}/representative",render:e=>"cases/{Ref}/representative".replace("{Ref}",encodeURIComponent(e))},addNoteToCase:{definition:"cases/{Ref}/notes",render:e=>"cases/{Ref}/notes".replace("{Ref}",encodeURIComponent(e))},changeChannel:{definition:"cases/{Ref}/channel",render:e=>"cases/{Ref}/channel".replace("{Ref}",encodeURIComponent(e))},changeState:{definition:"cases/{Ref}/state",render:e=>"cases/{Ref}/state".replace("{Ref}",encodeURIComponent(e))},getActivities:{definition:"cases/{Ref}/activities",render:e=>"cases/{Ref}/activities".replace("{Ref}",encodeURIComponent(e))},getCaseByRef:{definition:"cases/{Ref}",render:e=>"cases/{Ref}".replace("{Ref}",encodeURIComponent(e))},getProposals:{definition:"cases/{Ref}/proposals",render:e=>"cases/{Ref}/proposals".replace("{Ref}",encodeURIComponent(e))},getPolicies:{definition:"cases/{Ref}/policies",render:e=>"cases/{Ref}/policies".replace("{Ref}",encodeURIComponent(e))},setAsset:{definition:"cases/{Ref}/asset",render:e=>"cases/{Ref}/asset".replace("{Ref}",encodeURIComponent(e))},setBranch:{definition:"cases/{Ref}/branch",render:e=>"cases/{Ref}/branch".replace("{Ref}",encodeURIComponent(e))},getSalesOpportunityFunnelAnalytics:{definition:"cases/analytics/sales-opportunity-funnel"},getOpenCaseBacklogPivotAnalytics:{definition:"cases/analytics/open-case-backlog-pivot"},getFailedCasesReasonDistribution:{definition:"cases/analytics/failed-cases-reason-distribution"},communicationAutomations:{getAll:"cases/communication-automations"},getPriorityTemplates:"cases/priority-templates"},U={getAll:"coverage-groups",create:"coverage-groups",update:{definition:"coverage-groups/{Id}",render:e=>"coverage-groups/{Id}".replace("{Id}",encodeURIComponent(e))},delete:{definition:"coverage-groups/{Id}",render:e=>"coverage-groups/{Id}".replace("{Id}",encodeURIComponent(e))},getById:{definition:"coverage-groups/{Id}",render:e=>"coverage-groups/{Id}".replace("{Id}",encodeURIComponent(e))}},_e={getAll:"release-notes"},Se={getAll:"banks",getBranches:{definition:"banks/{BankId}/branches",render:e=>"banks/{BankId}/branches".replace("{BankId}",encodeURIComponent(e))}},be={getAll:"financial-institutions"},N={getAll:"agent-branches",create:"agent-branches",getById:{definition:"agent-branches/{Id}",render:e=>"agent-branches/{Id}".replace("{Id}",encodeURIComponent(e))},update:{definition:"agent-branches/{Id}",render:e=>"agent-branches/{Id}".replace("{Id}",encodeURIComponent(e))},delete:{definition:"agent-branches/{Id}",render:e=>"agent-branches/{Id}".replace("{Id}",encodeURIComponent(e))}},se={uploadPublicFile:"files/upload-public"},ne={getAll:"languages"},T={getDefinitions:"templates/definitions",getAll:"templates",getByKey:{definition:"templates/{Key}",render:e=>"templates/{Key}".replace("{Key}",encodeURIComponent(e))},update:{definition:"templates/{Key}",render:e=>"templates/{Key}".replace("{Key}",encodeURIComponent(e))},delete:{definition:"templates/{Key}",render:e=>"templates/{Key}".replace("{Key}",encodeURIComponent(e))}},D={configFields:{getAll:"b2c/config-fields",updateAll:"b2c/config-fields"}},i={customers:Pe,vehicles:fe,vehicleParameters:Ae,insuranceServices:Ue,agents:h,insuranceCompanies:he,resourceKeys:Ee,releaseNotes:_e,banks:Se,financialInstitutions:be,policies:Te,policyTransfers:Oe,filePolicyTransfers:Le,cases:g,coverageGroups:U,webhooks:E,agentBranches:N,files:se,languages:ne,templates:T,b2c:D,proposals:Ne};var G=class{constructor(t){this.http=t}async getCurrentAgent(t){return this.http.get(h.getCurrentAgent,t)}async updateCurrentAgent(t,r){return this.http.putNoContent(h.updateCurrentAgent,t,r)}async getAgentInsuranceCompaniesAsync(t){return this.http.get(h.insuranceCompanies.getMyInsuranceCompanies,t)}async getAgentInsuranceCompanyBranchesAsync(t,r){let s=h.insuranceCompanies.getBranches.render(t);return this.http.get(s,r)}async getAgentInsuranceCompanyConnectionAsync(t,r){let s=h.insuranceCompanies.getConnection.render(t);return this.http.get(s,r)}async addAgentInsuranceCompany(t,r){return this.http.postNoContent(h.insuranceCompanies.addInsuranceCompanyToAgent,t,r)}async removeAgentInsuranceCompany(t,r){let s=h.insuranceCompanies.remove.render(t);return this.http.deleteNoContent(s,r)}async updateAgentInsuranceCompanyConnection(t,r){let s=h.insuranceCompanies.updateConnection.render(t.agentInsuranceCompanyId);return this.http.putNoContent(s,t,r)}async updateAgentInsuranceCompanyBranches(t,r){let s=h.insuranceCompanies.updateBranches.render(t.agentInsuranceCompanyId);return this.http.putNoContent(s,t,r)}async reSyncAgentInsuranceCompanyWithInsurance(t,r){let s=h.insuranceCompanies.reSyncAgentInsuranceCompanyWithInsurance.render(t.agentInsuranceCompanyId);return this.http.postNoContent(s,t,r)}async getB2CConfigFields(t){return this.http.get(D.configFields.getAll,t)}async updateB2CConfigFields(t,r){return this.http.putNoContent(D.configFields.updateAll,t,r)}};var F=class{constructor(t){this.http=t}async createAgentBranch(t,r){return this.http.post(N.create,t,r)}async getAgentBranchById(t,r){let s=N.getById.render(t);return this.http.get(s,r)}async getAgentBranches(t){return this.http.get(N.getAll,t)}async updateAgentBranch(t,r){let s=N.update.render(t.id);return this.http.putNoContent(s,t,r)}async deleteAgentBranch(t,r){let s=N.delete.render(t.id);return this.http.deleteNoContent(s,r)}};var q=class{constructor(t){this.http=t}async createAgentRole(t,r){return this.http.postNoContent(O.create,t,r)}async getAgentRoleById(t,r){let s=O.getById.render(t);return this.http.get(s,r)}async getAgentRoles(t){return this.http.get(O.getAll,t)}async updateAgentRole(t,r){let s=O.update.render(t.id);return this.http.putNoContent(s,t,r)}async deleteAgentRole(t,r){let s=O.delete.render(t.id);return this.http.deleteNoContent(s,r)}};var M=class{constructor(t){this.http=t}async enterAgentSetupRequest(t,r){return this.http.post(re.enter,t,r)}async completeAgentSetupRequest(t,r){return this.http.postNoContent(re.complete,t,r)}};var ot=(e=>(e.Unknown="UNKNOWN",e.Manual="MANUAL",e.Website="WEBSITE",e.GoogleAds="GOOGLE_ADS",e.CallCenter="CALL_CENTER",e.SocialMedia="SOCIAL_MEDIA",e.MobileApp="MOBILE_APP",e.OfflineProposalForm="OFFLINE_PROPOSAL_FORM",e.Field="FIELD",e.PrintMedia="PRINT_MEDIA",e.FairEvent="FAIR_EVENT",e.BusinessPartner="BUSINESS_PARTNER",e.Chatbot="CHATBOT",e))(ot||{}),it=(e=>(e.Vehicle="VEHICLE",e.Property="PROPERTY",e))(it||{}),B=(e=>(e.Individual="INDIVIDUAL",e.Company="COMPANY",e.Foreign="FOREIGN",e))(B||{}),at=(e=>(e.Kasko="KASKO",e.Dask="DASK",e.Konut="KONUT",e.Trafik="TRAFIK",e.Tss="TSS",e.Imm="IMM",e.YesilKart="YESIL_KART",e.FerdiKaza="FERDI_KAZA",e.GrupHayat="GRUP_HAYAT",e.Saglik="SAGLIK",e.KartKimlikKoruma="KART_KIMLIK_KORUMA",e.UcuncuSahisMaliSorumluluk="UCUNCU_SAHIS_MALI_SORUMLULUK",e.IsyeriYangin="ISYERI_YANGIN",e.Seyahat="SEYAHAT",e.ElektronikCihaz="ELEKTRONIK_CIHAZ",e.Pet="PET",e.Bes="BES",e.InsaatAllRisk="INSAAT_ALL_RISK",e.LeasingAllRisk="LEASING_ALL_RISK",e.MontajAllRisk="MONTAJ_ALL_RISK",e.Nakliyat="NAKLIYAT",e.OzelGuvenlikMaliSorumluluk="OZEL_GUVENLIK_MALI_SORUMLULUK",e.AkilliTelefon="AKILLI_TELEFON",e.TehlikeliMaddelerMaliSorumluluk="TEHLIKELI_MADDELER_MALI_SORUMLULUK",e.YatGemiGezintiTeknesi="YAT_GEMI_GEZINTI_TEKNESI",e.Tarim="TARIM",e.MeslekiSorumluluk="MESLEKI_SORUMLULUK",e.Alacak="ALACAK",e.IsverenMaliMesuliyet="ISVEREN_MALI_MESULIYET",e.Muhendislik="MUHENDISLIK",e.HukuksalKoruma="HUKUKSAL_KORUMA",e.IlkAtesKonut="ILK_ATES_KONUT",e.Kefalet="KEFALET",e))(at||{}),ut=(e=>(e.Unknown="UNKNOWN",e.TurkishLira="TURKISH_LIRA",e.UnitedStatesDollar="UNITED_STATES_DOLLAR",e.Euro="EURO",e))(ut||{}),lt=(e=>(e.Unknown="UNKNOWN",e.SyncCreditCard="SYNC_CREDIT_CARD",e.SyncOpenAccount="SYNC_OPEN_ACCOUNT",e.Async3dSecure="ASYNC_3D_SECURE",e.AsyncInsuranceCompanyRedirect="ASYNC_INSURANCE_COMPANY_REDIRECT",e.AsyncThirdParty3dSecure="ASYNC_THIRD_PARTY_3D_SECURE",e))(lt||{}),pt=(e=>(e.Active="ACTIVE",e.EndOfLife="END_OF_LIFE",e.Cancelled="CANCELLED",e))(pt||{}),ct=(e=>(e.WebService="WEB_SERVICE",e.Robot="ROBOT",e))(ct||{}),dt=(e=>(e.Belirsiz="BELIRSIZ",e.AnlasmaliOzelServis="ANLASMALI_OZEL_SERVIS",e.AnlasmaliYetkiliServis="ANLASMALI_YETKILI_SERVIS",e.YetkiliServis="YETKILI_SERVIS",e.OzelServis="OZEL_SERVIS",e.SigortaliBelirler="SIGORTALI_BELIRLER",e))(dt||{}),mt=(e=>(e.Belirsiz="BELIRSIZ",e.OrijinalParca="ORIJINAL_PARCA",e.EsdegerParca="ESDEGER_PARCA",e))(mt||{}),Rt=(e=>(e.A="A",e.B="B",e.C="C",e.D="D",e.E="E",e.F="F",e.SegmenteSegment="SEGMENTE_SEGMENT",e))(Rt||{}),It=(e=>(e.Bilinmiyor="BILINMIYOR",e.DarKapsam="DAR_KAPSAM",e.StandartKapsam="STANDART_KAPSAM",e.GenisKapsam="GENIS_KAPSAM",e))(It||{}),gt=(e=>(e.Bilinmiyor="BILINMIYOR",e.Yatarak="YATARAK",e.YatarakAyakta="YATARAK_AYAKTA",e))(gt||{}),yt=(e=>(e.Belirsiz="BELIRSIZ",e.Yok="YOK",e.AgacKutukleriveKereste="AGAC_KUTUKLERIVE_KERESTE",e.Akaryakit="AKARYAKIT",e.AyakkabiSaraciye="AYAKKABI_SARACIYE",e.BakkaliyeveSharkuteriUrunleri="BAKKALIYE_VE_SHARKUTERI_URUNLERI",e.BilumumKirtasiyeMalzemeleri="BILUMUM_KIRTASIYE_MALZEMELERI",e.DokmeSuveSut="DOKME_SU_VE_SUT",e.HaliveKilim="HALI_VE_KILIM",e.HamYariMamulveMamulKagit="HAM_YARI_MAMUL_VE_MAMUL_KAGIT",e.HazirBeton="HAZIR_BETON",e.HerNeviEvAletleri="HER_NEVI_EV_ALETLERI",e.HerTurluDokmeKomurvOdun="HER_TURLU_DOKME_KOMUR_V_ODUN",e.HububatveBakliyat="HUBUBAT_VE_BAKLIYAT",e.KabaInsaatMalzemeleri="KABA_INSAAT_MALZEMELERI",e.LastikKaucukUrunleri="LASTIK_KAUCUK_URUNLERI",e.LikidKimyeviMadde="LIKID_KIMYEVI_MADDE",e.LpgGazTupu="LPG_GAZ_TUPU",e.MakineAksamveYedekleri="MAKINE_AKSAM_VE_YEDEKLERI",e.MobilyaMalzemesi="MOBILYA_MALZEMESI",e.MuhtelifEvEsyasi="MUHTELIF_EV_ESYASI",e.OtoYedekParcalari="OTO_YEDEK_PARCALARI",e.PlastikMamulleri="PLASTIK_MAMULLERI",e.SentetikElyafUrunleri="SENTETIK_ELYAF_URUNLERI",e.SentetikPlastikBoyaUrunleri="SENTETIK_PLASTIK_BOYA_URUNLERI",e.TekstilUrunleri="TEKSTIL_URUNLERI",e.TemizlikMaddeleri="TEMIZLIK_MADDELERI",e.YasMeyveveSebze="YAS_MEYVE_VE_SEBZE",e))(yt||{});function Ct(e){return typeof e=="object"&&e!==null&&"$type"in e&&typeof e.$type=="string"}function Jr(...e){if(e.length===0)throw new Error("Cannot merge empty coverage array");let t=e.filter(o=>o!=null);if(t.length===0)throw new Error("No valid coverages to merge");let s=t[0].productBranch;for(let o of t)if(o.productBranch!==s)throw new Error(`All coverages must have the same productBranch. Expected: ${s}, but found: ${o.productBranch}`);let n=o=>{let c=o.filter(d=>d!=null);if(c.length===0)return;let u=c.filter(d=>d.$type!=="UNDEFINED");return u.length>0?u[u.length-1]:{$type:"UNDEFINED"}},a=o=>{let c=o.filter(u=>u!=null);return c.length>0?c[c.length-1]:void 0},p=new Set;for(let o of t)Object.keys(o).forEach(c=>{c!=="productBranch"&&p.add(c)});let m={productBranch:s};for(let o of p){let c=t.map(d=>d[o]),u=c.find(d=>d!=null);Ct(u)?m[o]=n(c):m[o]=a(c)}return m}var ht=(e=>(e.Succeeded="SUCCEEDED",e.Failed="TRIGGER_STATUS_FAILED",e))(ht||{}),Et=(e=>(e.Unknown="UNKNOWN",e.CouldNotFetchPolicies="COULD_NOT_FETCH_POLICIES",e))(Et||{}),Pt=(e=>(e.Success="SUCCESS",e.Failed="TRANSFER_FAILED",e.Skipped="TRANSFER_SKIPPED",e))(Pt||{}),At=(e=>(e.Unknown="UNKNOWN",e.AlreadyTransferred="SKIP_ALREADY_TRANSFERRED",e.PreviousVersionNotFound="PREVIOUS_VERSION_NOT_FOUND",e.ProductBranchNotSupported="PRODUCT_BRANCH_NOT_SUPPORTED",e.ProductNotSupported="PRODUCT_NOT_SUPPORTED",e))(At||{}),ft=(e=>(e.Unknown="UNKNOWN",e.InvalidCustomerIdentityNumber="INVALID_CUSTOMER_IDENTITY_NUMBER",e.InvalidCustomerCompanyTitle="INVALID_CUSTOMER_COMPANY_TITLE",e.InvalidCustomerTaxNumber="INVALID_CUSTOMER_TAX_NUMBER",e.InvalidCustomerType="INVALID_CUSTOMER_TYPE",e.InvalidVehicle="INVALID_VEHICLE",e.InvalidProperty="INVALID_PROPERTY",e.InvalidEndDate="INVALID_END_DATE",e.InvalidStartDate="INVALID_START_DATE",e.InvalidProposalNumber="INVALID_PROPOSAL_NUMBER",e.InvalidPremium="INVALID_PREMIUM",e.InvalidCommission="INVALID_COMMISSION",e.InvalidPaymentType="INVALID_PAYMENT_TYPE",e.InvalidInsuredCustomer="INVALID_INSURED_CUSTOMER",e.InvalidInsurerCustomer="INVALID_INSURER_CUSTOMER",e))(ft||{}),Ut=(e=>(e.Unknown="UNKNOWN",e.SteelReinforcedConcrete="STEEL_REINFORCED_CONCRETE",e.Other="OTHER",e))(Ut||{}),Nt=(e=>(e.Unknown="UNKNOWN",e.None="NONE",e.SlightlyDamaged="SLIGHTLY_DAMAGED",e.ModeratelyDamaged="MODERATELY_DAMAGED",e.SeverelyDamaged="SEVERELY_DAMAGED",e))(Nt||{}),Tt=(e=>(e.Unknown="UNKNOWN",e.House="HOUSE",e.Business="BUSINESS",e.Other="OTHER",e))(Tt||{}),Ot=(e=>(e.Unknown="UNKNOWN",e.Proprietor="PROPRIETOR",e.Tenant="TENANT",e))(Ot||{}),Lt=(e=>(e.Bank="BANK",e.FinancialInstitution="FINANCIAL_INSTITUTION",e))(Lt||{}),_t=(e=>(e.Unknown="UNKNOWN",e.PrivateCar="PRIVATE_CAR",e.Taxi="TAXI",e.RouteBasedMinibus="ROUTE_BASED_MINIBUS",e.MediumBus="MEDIUM_BUS",e.LargeBus="LARGE_BUS",e.PickupTruck="PICKUP_TRUCK",e.PanelVan="PANEL_VAN",e.Truck="TRUCK",e.Tractor="TRACTOR",e.Motorcycle="MOTORCYCLE",e.RentalCar="RENTAL_CAR",e.ArmoredVehicle="ARMORED_VEHICLE",e.MinibusSharedTaxi="MINIBUS_SHARED_TAXI",e.Jeep="JEEP",e.JeepSAV="JEEP_SAV",e.JeepSUV="JEEP_SUV",e.Hearse="HEARSE",e.ChauffeuredRentalCar="CHAUFFEURED_RENTAL_CAR",e.OperationalRental="OPERATIONAL_RENTAL",e.PrivateMinibus="PRIVATE_MINIBUS",e.RouteMinibus="ROUTE_MINIBUS",e.ServiceMinibus="SERVICE_MINIBUS",e))(_t||{}),St=(e=>(e.Gasoline="GASOLINE",e.Diesel="DIESEL",e.Lpg="LPG",e.Electric="ELECTRIC",e.LpgGasoline="LPG_GASOLINE",e.Hybrid="HYBRID",e))(St||{}),bt=(e=>(e.Audio="audio",e.Display="display",e.Other="other",e))(bt||{}),Xr=class ce{constructor(t){I(this,"_value");this._value=typeof t=="string"?new Date(t):t}static fromDate(t){return new ce(t)}static now(){return new ce(new Date)}toDate(){return this._value}toISOString(){return this._value.toISOString()}toJSON(){return this.toISOString()}toString(){return this.toISOString()}valueOf(){return this._value.valueOf()}},es=class de{constructor(t){I(this,"_year");I(this,"_month");I(this,"_day");if(typeof t=="string"){let r=t.split("-").map(Number);this._year=r[0]??0,this._month=r[1]??1,this._day=r[2]??1}else this._year=t.getUTCFullYear(),this._month=t.getUTCMonth()+1,this._day=t.getUTCDate()}static fromDate(t){return new de(t)}static today(){return new de(new Date)}toDate(){return new Date(Date.UTC(this._year,this._month-1,this._day))}toString(){let t=this._year.toString().padStart(4,"0"),r=this._month.toString().padStart(2,"0"),s=this._day.toString().padStart(2,"0");return`${t}-${r}-${s}`}toJSON(){return this.toString()}valueOf(){return this.toDate().valueOf()}get year(){return this._year}get month(){return this._month}get day(){return this._day}},vt=(e=>(e.Unknown="UNKNOWN",e.Male="MALE",e.Female="FEMALE",e.Other="OTHER",e))(vt||{}),Dt=(e=>(e.Unknown="UNKNOWN",e.PrimarySchool="PRIMARY_SCHOOL",e.MiddleSchool="MIDDLE_SCHOOL",e.HighSchool="HIGH_SCHOOL",e.University="UNIVERSITY",e.Postgraduate="POSTGRADUATE",e.Doctorate="DOCTORATE",e.Other="OTHER",e))(Dt||{}),Gt=(e=>(e.Unknown="UNKNOWN",e.Turk="TURK",e.Other="OTHER",e))(Gt||{}),Ft=(e=>(e.Unknown="UNKNOWN",e.Single="SINGLE",e.Married="MARRIED",e))(Ft||{}),qt=(e=>(e.Unknown="UNKNOWN",e.Banker="BANKER",e.CorporateEmployee="CORPORATE_EMPLOYEE",e.LtdEmployee="LTD_EMPLOYEE",e.Police="POLICE",e.MilitaryPersonnel="MILITARY_PERSONNEL",e.RetiredSpouse="RETIRED_SPOUSE",e.Teacher="TEACHER",e.Doctor="DOCTOR",e.Pharmacist="PHARMACIST",e.Nurse="NURSE",e.HealthcareWorker="HEALTHCARE_WORKER",e.Lawyer="LAWYER",e.Judge="JUDGE",e.Prosecutor="PROSECUTOR",e.Freelancer="FREELANCER",e.Farmer="FARMER",e.Instructor="INSTRUCTOR",e.ReligiousOfficial="RELIGIOUS_OFFICIAL",e.AssociationManager="ASSOCIATION_MANAGER",e.Officer="OFFICER",e.Retired="RETIRED",e.Housewife="HOUSEWIFE",e))(qt||{}),Mt=(e=>(e.Active="ACTIVE",e.Succeeded="SUCCEEDED",e.Failed="FAILED",e))(Mt||{}),Bt=(e=>(e.PhoneCall="PHONE_CALL",e))(Bt||{}),wt=(e=>(e.Planned="PLANNED",e.Occurred="OCCURRED",e.NotOccurred="NOT_OCCURRED",e))(wt||{}),kt=(e=>(e.Other="OTHER",e.OrganTransplant="ORGAN_TRANSPLANT",e.BoneMarrowTransplant="BONE_MARROW_TRANSPLANT",e.HeartSurgery="HEART_SURGERY",e.BrainSurgery="BRAIN_SURGERY",e))(kt||{}),Kt=(e=>(e.Other="OTHER",e.KidneyFailure="KIDNEY_FAILURE",e.Cancer="CANCER",e.LiverDisease="LIVER_DISEASE",e.HeartFailure="HEART_FAILURE",e.HeartRhythmAndConductionDisorders="HEART_RHYTHM_AND_CONDUCTION_DISORDERS",e.ImmuneSystemDisorders="IMMUNE_SYSTEM_DISORDERS",e))(Kt||{}),xt=(e=>(e.KVKK="KVKK",e.ETK="ETK",e))(xt||{}),Ht=(e=>(e.SaleOpportunity="SALE_OPPORTUNITY",e.Endorsement="ENDORSEMENT",e.Cancel="CANCEL",e.Complaint="COMPLAINT",e))(Ht||{}),Vt=(e=>(e.Fail="FAIL",e.Open="OPEN",e.InProgress="IN_PROGRESS",e.Success="SUCCESS",e))(Vt||{}),$t=(e=>(e.FailNoResponse="FAIL_NO_RESPONSE",e.FailInvalidCase="FAIL_INVALID_CASE",e.FailCustomerWithdrawn="FAIL_CUSTOMER_WITHDRAWN",e.FailPaymentError="FAIL_PAYMENT_ERROR",e.FailDeclinedCardInformation="FAIL_DECLINED_CARD_INFORMATION",e.FailForeignUser="FAIL_FOREIGN_USER",e.FailTakenElsewhere="FAIL_TAKEN_ELSEWHERE",e.FailPriceTooHigh="FAIL_PRICE_TOO_HIGH",e.FailAssetAcquisition="FAIL_ASSET_ACQUISITION",e.FailAssetSold="FAIL_ASSET_SOLD",e.FailUnresolved="FAIL_UNRESOLVED",e.FailReferredToLegal="FAIL_REFERRED_TO_LEGAL",e.FailCustomerUnsatisfied="FAIL_CUSTOMER_UNSATISFIED",e.FailMissingDocuments="FAIL_MISSING_DOCUMENTS",e.FailInsurerDenied="FAIL_INSURER_DENIED",e.FailConditionsNotMet="FAIL_CONDITIONS_NOT_MET",e.OpenInitial="OPEN_INITIAL",e.OpenCollectingInformation="OPEN_COLLECTING_INFORMATION",e.OpenDelayed="OPEN_DELAYED",e.OpenWaiting="OPEN_WAITING",e.InProgressUnderAnalysis="IN_PROGRESS_UNDER_ANALYSIS",e.InProgressProposalPrepared="IN_PROGRESS_PROPOSAL_PREPARED",e.InProgressAwaitingApproval="IN_PROGRESS_AWAITING_APPROVAL",e.InProgressToBeRecontacted="IN_PROGRESS_TO_BE_RECONTACTED",e.SuccessCompleted="SUCCESS_COMPLETED",e))($t||{}),Qt=(e=>(e.Open="OPEN",e.Delayed="DELAYED",e.Success="SUCCESS",e.Fail="FAIL",e))(Qt||{}),Yt=(e=>(e.NewSale="NEW_SALE",e.CrossSale="CROSS_SALE",e.Renewal="RENEWAL",e))(Yt||{}),Wt=(e=>(e.OnlineCancellationRefund="ONLINE_CANCELLATION_REFUND",e.MebCancellation="MEB_CANCELLATION",e.PartialCancellation="PARTIAL_CANCELLATION",e.CancellationFromSale="CANCELLATION_FROM_SALE",e.CancellationDueToCollection="CANCELLATION_DUE_TO_COLLECTION",e.CancellationDueToDamage="CANCELLATION_DUE_TO_DAMAGE",e))(Wt||{}),jt=(e=>(e.ConsultantError="CONSULTANT_ERROR",e.PolicyOperations="POLICY_OPERATIONS",e.Collection="COLLECTION",e.DueToFrequentCalls="DUE_TO_FREQUENT_CALLS",e.Fraud="FRAUD",e.Damage="DAMAGE",e.ErroneousTransaction="ERRONEOUS_TRANSACTION",e.DelayInOperations="DELAY_IN_OPERATIONS",e.OnlineTransactionErrors="ONLINE_TRANSACTION_ERRORS",e.DelayInCancellationPeriod="DELAY_IN_CANCELLATION_PERIOD",e.NonReceiptOfPolicyOrEndorsement="NON_RECEIPT_OF_POLICY_OR_ENDORSEMENT",e.NonProductionOfPolicyOrEndorsement="NON_PRODUCTION_OF_POLICY_OR_ENDORSEMENT",e.DelayInEndorsementOperations="DELAY_IN_ENDORSEMENT_OPERATIONS",e.ErroneousPremiumCollection="ERRONEOUS_PREMIUM_COLLECTION",e.NonDeliveryOfRefundReceipt="NON_DELIVERY_OF_REFUND_RECEIPT",e.NonRefundOfPremium="NON_REFUND_OF_PREMIUM",e.StaffAttitude="STAFF_ATTITUDE",e.InsufficientOrErroneousInformation="INSUFFICIENT_OR_ERRONEOUS_INFORMATION",e.NoTimelyResponse="NO_TIMELY_RESPONSE",e))(jt||{}),zt=(e=>(e.VehicleChange="VEHICLE_CHANGE",e.ValueIncrease="VALUE_INCREASE",e.NoClaimBonusTransfer="NO_CLAIM_BONUS_TRANSFER",e.CoverageChange="COVERAGE_CHANGE",e.UsageTypeChange="USAGE_TYPE_CHANGE",e.TransferRequest="TRANSFER_REQUEST",e.LicensePlateChange="LICENSE_PLATE_CHANGE",e.BrandModelChange="BRAND_MODEL_CHANGE",e.EngineChassisNumberChange="ENGINE_CHASSIS_NUMBER_CHANGE",e.ContactAddressChange="CONTACT_ADDRESS_CHANGE",e.Other="OTHER",e.PledgeeCorrectionAddition="PLEDGEE_CORRECTION_ADDITION",e))(zt||{}),Zt=(e=>(e.Created="CREATED",e.Updated="UPDATED",e.StateChanged="STATE_CHANGED",e.ChannelChanged="CHANNEL_CHANGED",e.RepresentativeAssigned="REPRESENTATIVE_ASSIGNED",e.NoteAdded="NOTE_ADDED",e.AssetSet="ASSET_SET",e.PolicyAdded="POLICY_ADDED",e.ProposalAdded="PROPOSAL_ADDED",e.PolicyEndDateSet="POLICY_END_DATE_SET",e.CustomerUpdated="CUSTOMER_UPDATED",e.AssetUpdated="ASSET_UPDATED",e.PriorityAssessed="PRIORITY_ASSESSED",e.ProposalProductPurchaseAttempted="PROPOSAL_PRODUCT_PURCHASE_ATTEMPTED",e))(Zt||{}),Jt=(e=>(e.None="NONE",e.Desktop="DESKTOP",e.Server="SERVER",e))(Jt||{}),Xt=(e=>(e.None="NONE",e.Random="RANDOM",e.RoundRobin="ROUND_ROBIN",e.BranchImportanceBalance="BRANCH_IMPORTANCE_BALANCE",e))(Xt||{}),er=(e=>(e.Pending="PENDING",e.Failed="FAILED",e.Succeed="SUCCEED",e))(er||{}),tr=(e=>(e.WebService="WEB_SERVICE",e.Robot="ROBOT",e))(tr||{}),rr=(e=>(e.Default="Default",e.Teknomart="Teknomart",e.ArtiKurumsal="ArtiKurumsal",e.Verimor="Verimor",e))(rr||{}),sr=(e=>(e.None="None",e.AloTech="AloTech",e))(sr||{}),nr=(e=>(e.Pending="PENDING",e.Active="ACTIVE",e.Inactive="INACTIVE",e))(nr||{}),or=(e=>(e[e.Object=1]="Object",e[e.Array=2]="Array",e[e.Text=3]="Text",e[e.Number=4]="Number",e[e.Boolean=5]="Boolean",e[e.File=6]="File",e[e.Color=7]="Color",e[e.ProductBranch=8]="ProductBranch",e[e.Icon=9]="Icon",e[e.InsuranceCompany=10]="InsuranceCompany",e[e.MultiLineText=11]="MultiLineText",e[e.InsuranceProduct=12]="InsuranceProduct",e))(or||{}),ir=(e=>(e.ProposalPremiumReceived="proposal_premium.received",e.ProposalPremiumPurchasing="proposal_premium.purchasing",e.ProposalPremiumPurchased="proposal_premium.purchased",e.ProposalPremiumPurchaseFailed="proposal_premium.purchase_failed",e.PolicyCreated="policy.created",e.PolicyUpdated="policy.updated",e))(ir||{}),ar=(e=>(e.Waiting="WAITING",e.Active="ACTIVE",e.Purchasing="PURCHASING",e.Purchased="PURCHASED",e.Failed="FAILED",e))(ar||{}),ur=(e=>(e.Waiting="WAITING",e.Failed="FAILED",e.Active="ACTIVE",e.Purchasing="PURCHASING",e.Purchased="PURCHASED",e))(ur||{}),lr=(e=>(e.ASC="ASC",e.DESC="DESC",e))(lr||{});function C(e,t=" "){let r=[],s=new Map;for(let a of e){let p=a.indexOf(".");if(p!==-1){let m=a.slice(0,p),o=a.slice(p+1);s.has(m)||s.set(m,[]),s.get(m).push(o)}else r.push(a)}let n=[...r];for(let[a,p]of s)n.push(`${a} { ${p.join(" ")} }`);return n.join(`
|
|
2
2
|
${t}`)}var De=["agentBranchId","id","name","identityNumber","taxNumber","type","primaryEmail","primaryPhoneNumber","primaryPhoneNumberCountryCode","cityText","cityValue","districtText","districtValue","createdAt","birthDate","gender","educationStatus","nationality","maritalStatus","job","passportNumber","searchScore","agentBranch.id","agentBranch.name","agentBranch.parentId","agentBranch.parentName","consents.consentType","consents.isActive"],pr=(e=>(e.None="NONE",e.AdminPanel="ADMIN_PANEL",e.Agent="AGENT",e.Customer="CUSTOMER",e))(pr||{}),Ge=["agentBranchId","id","insurerCustomerId","insuredCustomerId","installmentNumber","productBranch","netPremium","grossPremium","commission","paymentType","currency","insuranceCompanyProposalNumber","insuranceCompanyPolicyNumber","createdAt","startDate","endDate","arrangementDate","insuredCustomerName","insuredCustomerIdentityNumber","insuredCustomerTaxNumber","insuredCustomerType","insuredCustomerCityText","insuredCustomerCityValue","insuredCustomerDistrictText","insuredCustomerDistrictValue","insuredCustomerBirthDate","insurerCustomerName","insurerCustomerIdentityNumber","insurerCustomerTaxNumber","insurerCustomerCityText","insurerCustomerCityValue","insurerCustomerDistrictText","insurerCustomerDistrictValue","insurerCustomerBirthDate","vehiclePlateCode","vehiclePlateCity","vehicleDocumentSerialCode","vehicleDocumentSerialNumber","vehicleModelBrandText","vehicleModelBrandValue","vehicleModelTypeText","vehicleModelTypeValue","vehicleModelYear","vehicleFuelType","productId","productName","insuranceCompanyId","insuranceCompanyName","insuranceCompanyLogo","state","propertyNumber","daskOldPolicyNumber","daskPolicyNumber","vehicleId","propertyId","channel","campaign","agentBranch.id","agentBranch.name","agentBranch.parentId","agentBranch.parentName","createdBy.id","createdBy.name","createdBy.email","createdBy.userType","representedBy.id","representedBy.name","representedBy.email","representedBy.userType"],Fe=["agentBranchId","id","productBranch","state","insurerCustomerId","insuredCustomerId","productsCount","succeedProductsCount","createdAt","successRate","insuredCustomerName","insuredCustomerIdentityNumber","insuredCustomerTaxNumber","insuredCustomerType","lowestPremium","highestPremium","channel","insuredCustomerCityText","insuredCustomerCityValue","insuredCustomerDistrictText","insuredCustomerDistrictValue","insuredCustomerPhoneNumber","insuredCustomerPhoneNumberCountryCode","insuredCustomerEmail","vehiclePlateCode","vehiclePlateCity","vehicleDocumentSerialCode","vehicleDocumentSerialNumber","vehicleModelBrandText","vehicleModelBrandValue","vehicleModelTypeText","vehicleModelTypeValue","vehicleModelYear","vehicleFuelType","utilizationStyle","insuredCustomerBirthDate","vehicleId","propertyId","agentBranch.id","agentBranch.name","agentBranch.parentId","agentBranch.parentName","agentUserCreatedBy.id","agentUserCreatedBy.name","agentUserCreatedBy.email","agentUserCreatedBy.userType"],qe=["agentBranchId","id","ref","type","status","cancelSubType","saleOpportunitySubType","endorsementSubType","complaintSubType","mainState","subState","productBranch","channel","createdAt","createdByName","createdById","createdByEmail","createdByType","representedByName","representedById","representedByEmail","representedByType","policyEndDate","assetType","assetId","sourceCaseId","policyCount","proposalCount","lastProposalDate","lastPolicyDate","lastUpdateDate","lastUpdatedByName","lastUpdatedById","lastUpdatedByEmail","lastUpdatedByType","priorityScore","customerId","customerName","customerType","customerIdentity","customerCityText","customerCityValue","customerDistrictText","customerDistrictValue","customerPrimaryPhoneNumber","customerPrimaryPhoneCountryCode","customerPrimaryEmail","customerBirthDate","customerPassportNumber","customerJob","vehiclePlateCode","vehiclePlateCity","vehicleModelBrandText","vehicleModelBrandValue","vehicleModelTypeText","vehicleModelTypeValue","vehicleModelYear","vehicleUtilizationStyle","vehicleEngineNumber","vehicleChassisNumber","vehicleRegistrationDate","vehicleFuelType","vehicleSeatNumber","vehicleDocumentSerialCode","vehicleDocumentSerialNumber","propertyNumber","propertySquareMeter","propertyConstructionYear","propertyDamageStatus","propertyFloorNumber","propertyStructure","propertyUtilizationStyle","propertyOwnershipType","propertyDaskPolicyNumber","advertisingSource","advertisingCampaign","searchScore","agentBranch.id","agentBranch.name","agentBranch.parentId","agentBranch.parentName","priorityRuleHits.label","priorityRuleHits.description","priorityRuleHits.ruleName","priorityRuleHits.score"],Me=["id","email","firstName","lastName","name","phoneNumber","phoneNumberCountryCode","state","createdAt","lastLoginAt","roles.id","roles.name","roles.isAdmin","branches.id","branches.name","branches.parentId","branches.parentName","branches.level","branches.hierarchy"],Be=["id","startDate","endDate","insuranceCompanyCount","policyTransferTriggerCount","policyCount"],we=["id","insuranceCompanyId","insuranceCompanyName","insuranceCompanyLogo","fileName","fileUrl","createdAt","totalPolicyCount","completedPolicyCount","failedPolicyCount","createdBy.id","createdBy.name","createdBy.email","createdBy.userType"],cr=(e=>(e.Pending="PENDING",e.Success="SUCCESS",e.Failed="FAILED",e))(cr||{}),ke=["id","webhookId","webhookName","event","state","responseStatusCode","createdAt","completedAt","retryCount"],dr={consentType:{type:"enum",values:["KVKK","ETK"],nullable:!1},isActive:{type:"boolean",nullable:!1}},mr={agentBranchId:{type:"string",nullable:!0},id:{type:"string",nullable:!1},name:{type:"string",nullable:!0},identityNumber:{type:"string",nullable:!0},taxNumber:{type:"string",nullable:!0},type:{type:"enum",values:["INDIVIDUAL","COMPANY","FOREIGN"],nullable:!1},primaryEmail:{type:"string",nullable:!0},primaryPhoneNumber:{type:"string",nullable:!0},primaryPhoneNumberCountryCode:{type:"number",nullable:!0},cityText:{type:"string",nullable:!0},cityValue:{type:"string",nullable:!0},districtText:{type:"string",nullable:!0},districtValue:{type:"string",nullable:!0},createdAt:{type:"DateTime",nullable:!1},birthDate:{type:"DateOnly",nullable:!0},gender:{type:"enum",values:["UNKNOWN","MALE","FEMALE","OTHER"],nullable:!0},educationStatus:{type:"enum",values:["UNKNOWN","PRIMARY_SCHOOL","MIDDLE_SCHOOL","HIGH_SCHOOL","UNIVERSITY","POSTGRADUATE","DOCTORATE","OTHER"],nullable:!0},nationality:{type:"enum",values:["UNKNOWN","TURK","OTHER"],nullable:!0},maritalStatus:{type:"enum",values:["UNKNOWN","SINGLE","MARRIED"],nullable:!0},job:{type:"enum",values:["UNKNOWN","BANKER","CORPORATE_EMPLOYEE","LTD_EMPLOYEE","POLICE","MILITARY_PERSONNEL","RETIRED_SPOUSE","TEACHER","DOCTOR","PHARMACIST","NURSE","HEALTHCARE_WORKER","LAWYER","JUDGE","PROSECUTOR","FREELANCER","FARMER","INSTRUCTOR","RELIGIOUS_OFFICIAL","ASSOCIATION_MANAGER","OFFICER","RETIRED","HOUSEWIFE"],nullable:!0},passportNumber:{type:"string",nullable:!0},searchScore:{type:"number",nullable:!0}},Rr={agentBranchId:{type:"string",nullable:!0},id:{type:"string",nullable:!1},ref:{type:"string",nullable:!1},type:{type:"enum",values:["SALE_OPPORTUNITY","ENDORSEMENT","CANCEL","COMPLAINT"],nullable:!1},status:{type:"enum",values:["OPEN","DELAYED","SUCCESS","FAIL"],nullable:!1},cancelSubType:{type:"enum",values:["ONLINE_CANCELLATION_REFUND","MEB_CANCELLATION","PARTIAL_CANCELLATION","CANCELLATION_FROM_SALE","CANCELLATION_DUE_TO_COLLECTION","CANCELLATION_DUE_TO_DAMAGE"],nullable:!0},saleOpportunitySubType:{type:"enum",values:["NEW_SALE","CROSS_SALE","RENEWAL"],nullable:!0},endorsementSubType:{type:"enum",values:["VEHICLE_CHANGE","VALUE_INCREASE","NO_CLAIM_BONUS_TRANSFER","COVERAGE_CHANGE","USAGE_TYPE_CHANGE","TRANSFER_REQUEST","LICENSE_PLATE_CHANGE","BRAND_MODEL_CHANGE","ENGINE_CHASSIS_NUMBER_CHANGE","CONTACT_ADDRESS_CHANGE","OTHER","PLEDGEE_CORRECTION_ADDITION"],nullable:!0},complaintSubType:{type:"enum",values:["CONSULTANT_ERROR","POLICY_OPERATIONS","COLLECTION","DUE_TO_FREQUENT_CALLS","FRAUD","DAMAGE","ERRONEOUS_TRANSACTION","DELAY_IN_OPERATIONS","ONLINE_TRANSACTION_ERRORS","DELAY_IN_CANCELLATION_PERIOD","NON_RECEIPT_OF_POLICY_OR_ENDORSEMENT","NON_PRODUCTION_OF_POLICY_OR_ENDORSEMENT","DELAY_IN_ENDORSEMENT_OPERATIONS","ERRONEOUS_PREMIUM_COLLECTION","NON_DELIVERY_OF_REFUND_RECEIPT","NON_REFUND_OF_PREMIUM","STAFF_ATTITUDE","INSUFFICIENT_OR_ERRONEOUS_INFORMATION","NO_TIMELY_RESPONSE"],nullable:!0},mainState:{type:"enum",values:["FAIL","OPEN","IN_PROGRESS","SUCCESS"],nullable:!1},subState:{type:"enum",values:["FAIL_NO_RESPONSE","FAIL_INVALID_CASE","FAIL_CUSTOMER_WITHDRAWN","FAIL_PAYMENT_ERROR","FAIL_DECLINED_CARD_INFORMATION","FAIL_FOREIGN_USER","FAIL_TAKEN_ELSEWHERE","FAIL_PRICE_TOO_HIGH","FAIL_ASSET_ACQUISITION","FAIL_ASSET_SOLD","FAIL_UNRESOLVED","FAIL_REFERRED_TO_LEGAL","FAIL_CUSTOMER_UNSATISFIED","FAIL_MISSING_DOCUMENTS","FAIL_INSURER_DENIED","FAIL_CONDITIONS_NOT_MET","OPEN_INITIAL","OPEN_COLLECTING_INFORMATION","OPEN_DELAYED","OPEN_WAITING","IN_PROGRESS_UNDER_ANALYSIS","IN_PROGRESS_PROPOSAL_PREPARED","IN_PROGRESS_AWAITING_APPROVAL","IN_PROGRESS_TO_BE_RECONTACTED","SUCCESS_COMPLETED"],nullable:!1},productBranch:{type:"enum",values:["KASKO","DASK","KONUT","TRAFIK","TSS","IMM","YESIL_KART","FERDI_KAZA","GRUP_HAYAT","SAGLIK","KART_KIMLIK_KORUMA","UCUNCU_SAHIS_MALI_SORUMLULUK","ISYERI_YANGIN","SEYAHAT","ELEKTRONIK_CIHAZ","PET","BES","INSAAT_ALL_RISK","LEASING_ALL_RISK","MONTAJ_ALL_RISK","NAKLIYAT","OZEL_GUVENLIK_MALI_SORUMLULUK","AKILLI_TELEFON","TEHLIKELI_MADDELER_MALI_SORUMLULUK","YAT_GEMI_GEZINTI_TEKNESI","TARIM","MESLEKI_SORUMLULUK","ALACAK","ISVEREN_MALI_MESULIYET","MUHENDISLIK","HUKUKSAL_KORUMA","ILK_ATES_KONUT","KEFALET"],nullable:!0},channel:{type:"enum",values:["UNKNOWN","MANUAL","WEBSITE","GOOGLE_ADS","CALL_CENTER","SOCIAL_MEDIA","MOBILE_APP","OFFLINE_PROPOSAL_FORM","FIELD","PRINT_MEDIA","FAIR_EVENT","BUSINESS_PARTNER","CHATBOT"],nullable:!0},createdAt:{type:"DateTime",nullable:!1},createdByName:{type:"string",nullable:!1},createdById:{type:"string",nullable:!1},createdByEmail:{type:"string",nullable:!0},createdByType:{type:"enum",values:["NONE","ADMIN_PANEL","AGENT","CUSTOMER"],nullable:!0},representedByName:{type:"string",nullable:!0},representedById:{type:"string",nullable:!0},representedByEmail:{type:"string",nullable:!0},representedByType:{type:"enum",values:["NONE","ADMIN_PANEL","AGENT","CUSTOMER"],nullable:!0},policyEndDate:{type:"DateOnly",nullable:!0},assetType:{type:"enum",values:["VEHICLE","PROPERTY"],nullable:!0},assetId:{type:"string",nullable:!0},sourceCaseId:{type:"string",nullable:!0},policyCount:{type:"number",nullable:!1},proposalCount:{type:"number",nullable:!1},lastProposalDate:{type:"DateTime",nullable:!0},lastPolicyDate:{type:"DateTime",nullable:!0},lastUpdateDate:{type:"DateTime",nullable:!0},lastUpdatedByName:{type:"string",nullable:!0},lastUpdatedById:{type:"string",nullable:!0},lastUpdatedByEmail:{type:"string",nullable:!0},lastUpdatedByType:{type:"enum",values:["NONE","ADMIN_PANEL","AGENT","CUSTOMER"],nullable:!0},priorityScore:{type:"number",nullable:!0},customerId:{type:"string",nullable:!0},customerName:{type:"string",nullable:!0},customerType:{type:"enum",values:["INDIVIDUAL","COMPANY","FOREIGN"],nullable:!0},customerIdentity:{type:"string",nullable:!0},customerCityText:{type:"string",nullable:!0},customerCityValue:{type:"string",nullable:!0},customerDistrictText:{type:"string",nullable:!0},customerDistrictValue:{type:"string",nullable:!0},customerPrimaryPhoneNumber:{type:"string",nullable:!0},customerPrimaryPhoneCountryCode:{type:"number",nullable:!0},customerPrimaryEmail:{type:"string",nullable:!0},customerBirthDate:{type:"DateOnly",nullable:!0},customerPassportNumber:{type:"string",nullable:!0},customerJob:{type:"enum",values:["UNKNOWN","BANKER","CORPORATE_EMPLOYEE","LTD_EMPLOYEE","POLICE","MILITARY_PERSONNEL","RETIRED_SPOUSE","TEACHER","DOCTOR","PHARMACIST","NURSE","HEALTHCARE_WORKER","LAWYER","JUDGE","PROSECUTOR","FREELANCER","FARMER","INSTRUCTOR","RELIGIOUS_OFFICIAL","ASSOCIATION_MANAGER","OFFICER","RETIRED","HOUSEWIFE"],nullable:!0},vehiclePlateCode:{type:"string",nullable:!0},vehiclePlateCity:{type:"number",nullable:!0},vehicleModelBrandText:{type:"string",nullable:!0},vehicleModelBrandValue:{type:"string",nullable:!0},vehicleModelTypeText:{type:"string",nullable:!0},vehicleModelTypeValue:{type:"string",nullable:!0},vehicleModelYear:{type:"number",nullable:!0},vehicleUtilizationStyle:{type:"enum",values:["UNKNOWN","PRIVATE_CAR","TAXI","ROUTE_BASED_MINIBUS","MEDIUM_BUS","LARGE_BUS","PICKUP_TRUCK","PANEL_VAN","TRUCK","TRACTOR","MOTORCYCLE","RENTAL_CAR","ARMORED_VEHICLE","MINIBUS_SHARED_TAXI","JEEP","JEEP_SAV","JEEP_SUV","HEARSE","CHAUFFEURED_RENTAL_CAR","OPERATIONAL_RENTAL","PRIVATE_MINIBUS","ROUTE_MINIBUS","SERVICE_MINIBUS"],nullable:!0},vehicleEngineNumber:{type:"string",nullable:!0},vehicleChassisNumber:{type:"string",nullable:!0},vehicleRegistrationDate:{type:"DateOnly",nullable:!0},vehicleFuelType:{type:"enum",values:["GASOLINE","DIESEL","LPG","ELECTRIC","LPG_GASOLINE","HYBRID"],nullable:!0},vehicleSeatNumber:{type:"number",nullable:!0},vehicleDocumentSerialCode:{type:"string",nullable:!0},vehicleDocumentSerialNumber:{type:"string",nullable:!0},propertyNumber:{type:"number",nullable:!0},propertySquareMeter:{type:"number",nullable:!0},propertyConstructionYear:{type:"number",nullable:!0},propertyDamageStatus:{type:"enum",values:["UNKNOWN","NONE","SLIGHTLY_DAMAGED","MODERATELY_DAMAGED","SEVERELY_DAMAGED"],nullable:!0},propertyFloorNumber:{type:"number",nullable:!0},propertyStructure:{type:"enum",values:["UNKNOWN","STEEL_REINFORCED_CONCRETE","OTHER"],nullable:!0},propertyUtilizationStyle:{type:"enum",values:["UNKNOWN","HOUSE","BUSINESS","OTHER"],nullable:!0},propertyOwnershipType:{type:"enum",values:["UNKNOWN","PROPRIETOR","TENANT"],nullable:!0},propertyDaskPolicyNumber:{type:"string",nullable:!0},advertisingSource:{type:"string",nullable:!0},advertisingCampaign:{type:"string",nullable:!0},searchScore:{type:"number",nullable:!0}},Ir={agentBranchId:{type:"string",nullable:!0},id:{type:"string",nullable:!1},insurerCustomerId:{type:"string",nullable:!1},insuredCustomerId:{type:"string",nullable:!1},installmentNumber:{type:"number",nullable:!0},productBranch:{type:"enum",values:["KASKO","DASK","KONUT","TRAFIK","TSS","IMM","YESIL_KART","FERDI_KAZA","GRUP_HAYAT","SAGLIK","KART_KIMLIK_KORUMA","UCUNCU_SAHIS_MALI_SORUMLULUK","ISYERI_YANGIN","SEYAHAT","ELEKTRONIK_CIHAZ","PET","BES","INSAAT_ALL_RISK","LEASING_ALL_RISK","MONTAJ_ALL_RISK","NAKLIYAT","OZEL_GUVENLIK_MALI_SORUMLULUK","AKILLI_TELEFON","TEHLIKELI_MADDELER_MALI_SORUMLULUK","YAT_GEMI_GEZINTI_TEKNESI","TARIM","MESLEKI_SORUMLULUK","ALACAK","ISVEREN_MALI_MESULIYET","MUHENDISLIK","HUKUKSAL_KORUMA","ILK_ATES_KONUT","KEFALET"],nullable:!1},netPremium:{type:"number",nullable:!0},grossPremium:{type:"number",nullable:!0},commission:{type:"number",nullable:!0},paymentType:{type:"enum",values:["UNKNOWN","SYNC_CREDIT_CARD","SYNC_OPEN_ACCOUNT","ASYNC_3D_SECURE","ASYNC_INSURANCE_COMPANY_REDIRECT","ASYNC_THIRD_PARTY_3D_SECURE"],nullable:!1},currency:{type:"enum",values:["UNKNOWN","TURKISH_LIRA","UNITED_STATES_DOLLAR","EURO"],nullable:!1},insuranceCompanyProposalNumber:{type:"string",nullable:!1},insuranceCompanyPolicyNumber:{type:"string",nullable:!1},createdAt:{type:"DateTime",nullable:!1},startDate:{type:"DateOnly",nullable:!1},endDate:{type:"DateOnly",nullable:!1},arrangementDate:{type:"DateOnly",nullable:!0},insuredCustomerName:{type:"string",nullable:!0},insuredCustomerIdentityNumber:{type:"string",nullable:!0},insuredCustomerTaxNumber:{type:"string",nullable:!0},insuredCustomerType:{type:"enum",values:["INDIVIDUAL","COMPANY","FOREIGN"],nullable:!1},insuredCustomerCityText:{type:"string",nullable:!0},insuredCustomerCityValue:{type:"string",nullable:!0},insuredCustomerDistrictText:{type:"string",nullable:!0},insuredCustomerDistrictValue:{type:"string",nullable:!0},insuredCustomerBirthDate:{type:"DateOnly",nullable:!0},insurerCustomerName:{type:"string",nullable:!0},insurerCustomerIdentityNumber:{type:"string",nullable:!0},insurerCustomerTaxNumber:{type:"string",nullable:!0},insurerCustomerCityText:{type:"string",nullable:!0},insurerCustomerCityValue:{type:"string",nullable:!0},insurerCustomerDistrictText:{type:"string",nullable:!0},insurerCustomerDistrictValue:{type:"string",nullable:!0},insurerCustomerBirthDate:{type:"DateOnly",nullable:!0},vehiclePlateCode:{type:"string",nullable:!0},vehiclePlateCity:{type:"number",nullable:!0},vehicleDocumentSerialCode:{type:"string",nullable:!0},vehicleDocumentSerialNumber:{type:"string",nullable:!0},vehicleModelBrandText:{type:"string",nullable:!0},vehicleModelBrandValue:{type:"string",nullable:!0},vehicleModelTypeText:{type:"string",nullable:!0},vehicleModelTypeValue:{type:"string",nullable:!0},vehicleModelYear:{type:"number",nullable:!0},vehicleFuelType:{type:"enum",values:["GASOLINE","DIESEL","LPG","ELECTRIC","LPG_GASOLINE","HYBRID"],nullable:!0},productId:{type:"number",nullable:!0},productName:{type:"string",nullable:!0},insuranceCompanyId:{type:"number",nullable:!1},insuranceCompanyName:{type:"string",nullable:!1},insuranceCompanyLogo:{type:"string",nullable:!0},state:{type:"enum",values:["ACTIVE","END_OF_LIFE","CANCELLED"],nullable:!1},propertyNumber:{type:"number",nullable:!0},daskOldPolicyNumber:{type:"number",nullable:!0},daskPolicyNumber:{type:"string",nullable:!0},vehicleId:{type:"string",nullable:!0},propertyId:{type:"string",nullable:!0},channel:{type:"enum",values:["UNKNOWN","MANUAL","WEBSITE","GOOGLE_ADS","CALL_CENTER","SOCIAL_MEDIA","MOBILE_APP","OFFLINE_PROPOSAL_FORM","FIELD","PRINT_MEDIA","FAIR_EVENT","BUSINESS_PARTNER","CHATBOT"],nullable:!1},campaign:{type:"string",nullable:!0}},gr={agentBranchId:{type:"string",nullable:!0},id:{type:"string",nullable:!1},productBranch:{type:"enum",values:["KASKO","DASK","KONUT","TRAFIK","TSS","IMM","YESIL_KART","FERDI_KAZA","GRUP_HAYAT","SAGLIK","KART_KIMLIK_KORUMA","UCUNCU_SAHIS_MALI_SORUMLULUK","ISYERI_YANGIN","SEYAHAT","ELEKTRONIK_CIHAZ","PET","BES","INSAAT_ALL_RISK","LEASING_ALL_RISK","MONTAJ_ALL_RISK","NAKLIYAT","OZEL_GUVENLIK_MALI_SORUMLULUK","AKILLI_TELEFON","TEHLIKELI_MADDELER_MALI_SORUMLULUK","YAT_GEMI_GEZINTI_TEKNESI","TARIM","MESLEKI_SORUMLULUK","ALACAK","ISVEREN_MALI_MESULIYET","MUHENDISLIK","HUKUKSAL_KORUMA","ILK_ATES_KONUT","KEFALET"],nullable:!1},state:{type:"enum",values:["WAITING","ACTIVE","PURCHASING","PURCHASED","FAILED"],nullable:!1},insurerCustomerId:{type:"string",nullable:!1},insuredCustomerId:{type:"string",nullable:!1},productsCount:{type:"number",nullable:!1},succeedProductsCount:{type:"number",nullable:!1},createdAt:{type:"DateTime",nullable:!1},successRate:{type:"number",nullable:!1},insuredCustomerName:{type:"string",nullable:!1},insuredCustomerIdentityNumber:{type:"string",nullable:!0},insuredCustomerTaxNumber:{type:"string",nullable:!0},insuredCustomerType:{type:"enum",values:["INDIVIDUAL","COMPANY","FOREIGN"],nullable:!1},lowestPremium:{type:"number",nullable:!0},highestPremium:{type:"number",nullable:!0},channel:{type:"enum",values:["UNKNOWN","MANUAL","WEBSITE","GOOGLE_ADS","CALL_CENTER","SOCIAL_MEDIA","MOBILE_APP","OFFLINE_PROPOSAL_FORM","FIELD","PRINT_MEDIA","FAIR_EVENT","BUSINESS_PARTNER","CHATBOT"],nullable:!1},insuredCustomerCityText:{type:"string",nullable:!0},insuredCustomerCityValue:{type:"string",nullable:!0},insuredCustomerDistrictText:{type:"string",nullable:!0},insuredCustomerDistrictValue:{type:"string",nullable:!0},insuredCustomerPhoneNumber:{type:"string",nullable:!0},insuredCustomerPhoneNumberCountryCode:{type:"number",nullable:!0},insuredCustomerEmail:{type:"string",nullable:!0},vehiclePlateCode:{type:"string",nullable:!0},vehiclePlateCity:{type:"number",nullable:!0},vehicleDocumentSerialCode:{type:"string",nullable:!0},vehicleDocumentSerialNumber:{type:"string",nullable:!0},vehicleModelBrandText:{type:"string",nullable:!0},vehicleModelBrandValue:{type:"string",nullable:!0},vehicleModelTypeText:{type:"string",nullable:!0},vehicleModelTypeValue:{type:"string",nullable:!0},vehicleModelYear:{type:"number",nullable:!0},vehicleFuelType:{type:"enum",values:["GASOLINE","DIESEL","LPG","ELECTRIC","LPG_GASOLINE","HYBRID"],nullable:!0},utilizationStyle:{type:"enum",values:["UNKNOWN","PRIVATE_CAR","TAXI","ROUTE_BASED_MINIBUS","MEDIUM_BUS","LARGE_BUS","PICKUP_TRUCK","PANEL_VAN","TRUCK","TRACTOR","MOTORCYCLE","RENTAL_CAR","ARMORED_VEHICLE","MINIBUS_SHARED_TAXI","JEEP","JEEP_SAV","JEEP_SUV","HEARSE","CHAUFFEURED_RENTAL_CAR","OPERATIONAL_RENTAL","PRIVATE_MINIBUS","ROUTE_MINIBUS","SERVICE_MINIBUS"],nullable:!0},insuredCustomerBirthDate:{type:"DateOnly",nullable:!0},vehicleId:{type:"string",nullable:!0},propertyId:{type:"string",nullable:!0}},yr={id:{type:"string",nullable:!1},email:{type:"string",nullable:!1},firstName:{type:"string",nullable:!1},lastName:{type:"string",nullable:!1},name:{type:"string",nullable:!1},phoneNumber:{type:"string",nullable:!0},phoneNumberCountryCode:{type:"number",nullable:!0},state:{type:"enum",values:["PENDING","ACTIVE","INACTIVE"],nullable:!1},createdAt:{type:"DateTime",nullable:!0},lastLoginAt:{type:"DateTime",nullable:!0}},Cr={id:{type:"string",nullable:!1},webhookId:{type:"string",nullable:!1},webhookName:{type:"string",nullable:!0},event:{type:"enum",values:["proposal_premium.received","proposal_premium.purchasing","proposal_premium.purchased","proposal_premium.purchase_failed","policy.created","policy.updated"],nullable:!1},state:{type:"enum",values:["PENDING","SUCCESS","FAILED"],nullable:!1},responseStatusCode:{type:"number",nullable:!0},createdAt:{type:"DateTime",nullable:!1},completedAt:{type:"DateTime",nullable:!0},retryCount:{type:"number",nullable:!1}},hr={id:{type:"string",nullable:!1},startDate:{type:"DateTime",nullable:!0},endDate:{type:"DateTime",nullable:!0},insuranceCompanyCount:{type:"number",nullable:!1},policyTransferTriggerCount:{type:"number",nullable:!1},policyCount:{type:"number",nullable:!1}},Er={id:{type:"string",nullable:!1},insuranceCompanyId:{type:"number",nullable:!1},insuranceCompanyName:{type:"string",nullable:!0},insuranceCompanyLogo:{type:"string",nullable:!0},fileName:{type:"string",nullable:!0},fileUrl:{type:"string",nullable:!0},createdAt:{type:"DateTime",nullable:!1},totalPolicyCount:{type:"number",nullable:!0},completedPolicyCount:{type:"number",nullable:!0},failedPolicyCount:{type:"number",nullable:!0}},Pr={QueryAgentUserResult:yr,QueryCaseModel:Rr,QueryCustomerConsentModel:dr,QueryCustomerModel:mr,QueryFilePolicyTransfersResult:Er,QueryPoliciesResult:Ir,QueryPolicyTransfersResult:hr,QueryProposalsResult:gr,QueryWebhookDeliveryResult:Cr};function ts(e){return Pr[e]}var w=class{constructor(t,r){this.http=t;this.graphql=r}async getMyAgentUser(t){return this.http.get(y.me,t)}async updateMyAgentUser(t,r){return this.http.putNoContent(y.updateMyUser,t,r)}async inviteAgentUser(t,r){return this.http.postNoContent(y.invite,t,r)}async activateAgentUser(t,r){let s=y.activate.render(t);return this.http.postNoContent(s,void 0,r)}async deactivateAgentUser(t,r){let s=y.deactivate.render(t);return this.http.postNoContent(s,void 0,r)}async checkAgentUserInviteCode(t,r){let s=y.checkAgentUserInviteCode.render(t);return this.http.get(s,r)}async deleteAgentUser(t,r){let s=y.delete.render(t);return this.http.deleteNoContent(s,r)}async getAgentUserById(t,r){let s=y.getById.render(t);return this.http.get(s,r)}async reSendInviteAgentUser(t,r){let s=y.reSendInvite.render(t);return this.http.postNoContent(s,void 0,r)}async acceptAgentUserInvite(t,r){return this.http.postNoContent(y.acceptInvite,t,r)}async updateAgentUser(t,r){let s=y.update.render(t.id);return this.http.putNoContent(s,t,r)}async updateAgentUserPassword(t,r){return this.http.putNoContent(y.updatePassword,t,r)}async getMyAgentUserRobotCode(t){return this.http.get(y.meRobotCode,t)}async migrateAgentUser(t,r){let s=y.migrate.render(t);return this.http.postNoContent(s,void 0,r)}async migrateAllAgentUsers(t){return this.http.post(y.migrateAll,void 0,t)}async getAgentUsers(t,r){if(!this.graphql)throw new Error("GraphQL transport is not available. Ensure the client is properly initialized.");let s=t?.select??Me,n=C(s),p=`
|
|
3
3
|
query GetAgentUsers(
|
|
4
4
|
$first: Int
|