@insurup/sdk 0.1.8 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- var Re=Object.defineProperty;var xe=(e,t,r)=>t in e?Re(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ke=(e,t)=>{for(var r in t)Re(e,r,{get:t[r],enumerable:!0})};var g=(e,t,r)=>xe(e,typeof t!="symbol"?t+"":t,r);var ge={name:"@insurup/sdk",version:"0.1.8",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 $e=ge.version;var J=(u=>(u.Unknown="Unknown",u.JsonSerialization="JsonSerialization",u.JsonDeserialization="JsonDeserialization",u.NullResponse="NullResponse",u.Timeout="Timeout",u.HttpRequestFailed="HttpRequestFailed",u.UnexpectedNoContent="UnexpectedNoContent",u.GraphQLError="GraphQLError",u))(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=(c=>(c.Forbidden="FORBIDDEN",c.Unauthorized="UNAUTHORIZED",c.NotFound="NOT_FOUND",c.BadRequest="BAD_REQUEST",c.Conflict="CONFLICT",c.NotSupported="NOT_SUPPORTED",c.UpstreamError="UPSTREAM_ERROR",c.InternalError="INTERNAL_ERROR",c.ValidationError="VALIDATION_ERROR",c.FilterRequired="FILTER_REQUIRED",c.FilterMaxSpanExceeded="FILTER_MAX_SPAN_EXCEEDED",c.Unknown="UNKNOWN",c))(X||{});var Qe={"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 Ve(e){let t=e.toLowerCase().trim();return Qe[t]??"Unknown"}function je(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 i=JSON.parse(t);typeof i=="object"&&i!==null&&(r=i)}}catch{}let s=r.type??"https://api.insurup.com/problems/unknown",o=Ve(s);return{kind:"server-error",isSuccess:!1,message:r.detail??(e.statusText||"Unknown server error"),type:o,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:je(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 Ie(e){return{kind:"client-error",isSuccess:!1,message:e instanceof Error?e.message:"Failed to serialize request to JSON",type:"JsonSerialization",error:e}}function v(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);g(this,"error");this.name="InsurUpError",this.error=r}};function D(e){return{kind:"success",isSuccess:!0,message:"Success",data:e}}function pe(){return{kind:"success",isSuccess:!0,message:"Success"}}function Ye(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 le(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)}},L={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 he(e){return{baseUrl:e?.baseUrl??L.baseUrl,customHeaders:{...L.customHeaders,...e?.customHeaders},userAgent:e?.userAgent??L.userAgent,timeoutMs:e?.timeoutMs??L.timeoutMs,logLevel:e?.logLevel??L.logLevel,logger:e?.logger??L.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:o,maxTimeout:i,randomize:l,backoffStrategy:a,onFailedAttempt:u}=t,d=1;for(;;)try{return await e(d)}catch(p){if(d>r)throw p;let c;switch(a){case"linear":c=o*d;break;case"constant":c=o;break;default:c=o*Math.pow(s,d-1)}l&&(c*=1+Math.random()),c=Math.min(c,i),u&&u({attemptNumber:d,retriesLeft:r-d+1,name:p instanceof Error?p.name:"Error",message:p instanceof Error?p.message:String(p),error:p instanceof Error?p:new Error(String(p))}),await new Promise(R=>setTimeout(R,c)),d++}}var te=class{constructor(t){g(this,"options");this.options=he(t)}async sendInternal(t,r,s,o,i=!0){let l=Date.now(),u={url:`${this.options.baseUrl.replace(/\/$/,"")}/${r.replace(/^\//,"")}`,method:t,headers:{...this.options.customHeaders,...o?.headers},body:s};if(this.options.onRequest)try{u=await this.options.onRequest(u)}catch(p){this.options.logLevel!=="none"&&this.options.logger.warn("Request interceptor failed:",p)}this.logRequest(t,r,s,o?.headers);let d=async p=>{try{let m=await this.sendSingleRequest(u.method,r,u.body,{headers:u.headers,signal:o?.signal,timeoutMs:o?.timeoutMs},i);if(m.kind==="success")return m;if(this.shouldRetryResult(m)){let c=new Error(m.message);throw c.result=m,c.attemptNumber=p,c}return m}catch(m){let c=ee(m);if(c.type==="Timeout")return c;if(c.type==="HttpRequestFailed"&&this.options.retry){let R=new Error(c.message);throw R.result=c,R.attemptNumber=p,R}return c}};try{let p;this.options.retry?p=await Ce(d,{...this.options.retry,onFailedAttempt:c=>{let R=c.error;R.result&&this.logRetry(c.attemptNumber,R.result),this.options.retry?.onFailedAttempt&&this.options.retry.onFailedAttempt(c)}}):p=await d(1);let m=Date.now()-l;if(this.logResponse("SUCCESS",m,1,p),this.options.onResponse)try{return await this.options.onResponse(p,u)}catch(c){this.options.logLevel!=="none"&&this.options.logger.warn("Response interceptor failed:",c)}return p}catch(p){let m=Date.now()-l,c=p;if(c.result){if(this.logResponse("ERROR",m,c.attemptNumber||1,c.result),this.options.onResponse)try{return await this.options.onResponse(c.result,u)}catch(oe){this.options.logLevel!=="none"&&this.options.logger.warn("Response interceptor failed:",oe)}return c.result}let R=ee(p);if(this.logResponse("ERROR",m,1,R),this.options.onResponse)try{return await this.options.onResponse(R,u)}catch(oe){this.options.logLevel!=="none"&&this.options.logger.warn("Response interceptor failed:",oe)}return R}}async sendSingleRequest(t,r,s,o,i=!0){let l=`${this.options.baseUrl.replace(/\/$/,"")}/${r.replace(/^\//,"")}`,a=await this.buildHeaders(o?.headers),u=null;if(s)if(s instanceof FormData)u=s;else try{u=JSON.stringify(s),this.hasContentTypeHeader(a)||(a["Content-Type"]="application/json")}catch(R){return Ie(R)}let d=new AbortController,p=setTimeout(()=>d.abort(),o?.timeoutMs??this.options.timeoutMs),m;if(o?.signal)if(o.signal.aborted)d.abort();else{let R=()=>d.abort();o.signal.addEventListener("abort",R,{once:!0}),m=()=>o.signal.removeEventListener("abort",R)}let c;try{c=await fetch(l,{method:t,headers:a,body:u,signal:d.signal})}finally{clearTimeout(p),m?.()}return await this.handleResponse(c,i)}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(/^\//,"")}`,o=await this.buildHeaders(r?.headers),i={url:s,method:"GET",headers:o};if(this.options.onRequest)try{i=await this.options.onRequest(i)}catch(p){this.options.logLevel!=="none"&&this.options.logger.warn("Request interceptor failed:",p)}this.logRequest("GET",t,void 0,r?.headers);let l=new AbortController,a=setTimeout(()=>l.abort(),r?.timeoutMs??this.options.timeoutMs),u;if(r?.signal)if(r.signal.aborted)l.abort();else{let p=()=>l.abort();r.signal.addEventListener("abort",p,{once:!0}),u=()=>r.signal.removeEventListener("abort",p)}let d;try{d=await fetch(s,{method:"GET",headers:i.headers,signal:l.signal})}catch(p){let m=ee(p);if(this.options.onResponse)try{return await this.options.onResponse(m,i)}catch(c){this.options.logLevel!=="none"&&this.options.logger.warn("Response interceptor failed:",c)}return m}finally{clearTimeout(a),u?.()}if(!d.ok){let p=await d.text(),m=ae(d,p);if(this.options.onResponse)try{return await this.options.onResponse(m,i)}catch(c){this.options.logLevel!=="none"&&this.options.logger.warn("Response interceptor failed:",c)}return m}try{let p=await d.blob(),m=D(p);if(this.options.onResponse)try{return await this.options.onResponse(m,i)}catch(c){this.options.logLevel!=="none"&&this.options.logger.warn("Response interceptor failed:",c)}return m}catch(p){let m=v(p);if(this.options.onResponse)try{return await this.options.onResponse(m,i)}catch(c){this.options.logLevel!=="none"&&this.options.logger.warn("Response interceptor failed:",c)}return m}}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 o=await this.options.tokenProvider();o&&(r.Authorization=`Bearer ${o}`)}catch(o){this.options.logLevel!=="none"&&this.options.logger.warn("Token provider failed:",o)}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 i=await t.text();return ae(t,i)}if(t.status===204||t.status===205)return r?ue():pe();let s=await t.text();if(!s.trim())return r?ue():pe();let o=t.headers.get("content-type");return o&&!this.isJsonContentType(o)?v(new Error(`Expected JSON response but got ${o}`)):this.parseSuccessResponse(s)}parseSuccessResponse(t){try{let r=JSON.parse(t);return D(r)}catch(r){return v(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,o){if(this.options.logLevel==="none")return;let i=`${this.options.baseUrl.replace(/\/$/,"")}/${r.replace(/^\//,"")}`;if(this.options.logLevel==="basic")this.options.logger.info(`${t} ${i}`);else if(this.options.logLevel==="detailed"){let l=this.sanitizeHeaders(o),a=this.sanitizeBody(s);this.options.logger.info(`Request: ${t} ${i}`,{headers:l,body:a})}}logResponse(t,r,s,o){if(this.options.logLevel==="none")return;let i=s>1?` (attempt ${s})`:"";if(this.options.logLevel==="basic")t==="SUCCESS"?this.options.logger.info(`${t} in ${r}ms${i}`):this.options.logger.error(`${t} in ${r}ms${i}`);else if(this.options.logLevel==="detailed")if(t==="SUCCESS"){let l=o.kind==="success"&&"data"in o?this.sanitizeResponseData(o.data):void 0;this.options.logger.info(`Response: ${t} in ${r}ms${i}`,{data:l})}else{let l=this.sanitizeError(o);this.options.logger.error(`Response: ${t} in ${r}ms${i}`,{error:l})}}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[o,i]of Object.entries(t)){let l=o.toLowerCase();s.includes(l)?r[o]="[REDACTED]":r[o]=i}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,o=(i,l=0)=>{if(l>3||r>50)return!0;if(s=Math.max(s,l),Array.isArray(i)){if(i.length>100)return!0;for(let a=0;a<Math.min(i.length,10);a++)if(o(i[a],l+1))return!0}else if(i&&typeof i=="object"){let a=Object.keys(i);r+=a.length;for(let u of a.slice(0,10))if(o(i[u],l+1))return!0}return!1};return o(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 q=class{constructor(t){this.http=t}async query(t,r,s){let o={query:t,variables:r},i=await this.http.post("graphql",o,s);if(!i.isSuccess)return i;let l=i.data;if(l.errors&&l.errors.length>0){let a=st(l.errors);return le(a)}return l.data?D(l.data):v(new Error("GraphQL response contained no data and no errors"))}};var qe={};Ke(qe,{addressParameters:()=>U,agentBranches:()=>N,agentRoles:()=>O,agentSetupRequests:()=>re,agentUsers:()=>h,agents:()=>y,b2c:()=>_,banks:()=>Se,cases:()=>I,contactForm:()=>nt,coverageChoices:()=>S,coverageGroups:()=>A,customers:()=>Pe,endpoints:()=>n,filePolicyTransfers:()=>ve,files:()=>se,financialInstitutions:()=>De,insuranceCompanies:()=>ye,insuranceServices:()=>Ae,languages:()=>ne,policies:()=>Te,policyTransfers:()=>Oe,properties:()=>E,proposals:()=>Ne,releaseNotes:()=>Le,resourceKeys:()=>fe,templates:()=>T,vehicleParameters:()=>Ue,vehicles:()=>Ee,webhooks:()=>f});var nt={submit:"contact-form"},y={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))}}},ye={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()))}}},fe={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))}}},U={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)}},Ue={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()))}},Ee={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))}},Ae={queryVehicleByBrandCode:"insurance-services/query-vehicle-by-brand-code"},E={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))}},ve={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))}},h={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))}},f={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))}}},I={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"},A={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))}},Le={getAll:"release-notes"},Se={getAll:"banks",getBranches:{definition:"banks/{BankId}/branches",render:e=>"banks/{BankId}/branches".replace("{BankId}",encodeURIComponent(e))}},De={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))}},_={configFields:{getAll:"b2c/config-fields",updateAll:"b2c/config-fields"}},n={customers:Pe,vehicles:Ee,vehicleParameters:Ue,insuranceServices:Ae,agents:y,insuranceCompanies:ye,resourceKeys:fe,releaseNotes:Le,banks:Se,financialInstitutions:De,policies:Te,policyTransfers:Oe,filePolicyTransfers:ve,cases:I,coverageGroups:A,webhooks:f,agentBranches:N,files:se,languages:ne,templates:T,b2c:_,proposals:Ne};var b=class{constructor(t){this.http=t}async getCurrentAgent(t){return this.http.get(y.getCurrentAgent,t)}async updateCurrentAgent(t,r){return this.http.putNoContent(y.updateCurrentAgent,t,r)}async getAgentInsuranceCompaniesAsync(t){return this.http.get(y.insuranceCompanies.getMyInsuranceCompanies,t)}async getAgentInsuranceCompanyBranchesAsync(t,r){let s=y.insuranceCompanies.getBranches.render(t);return this.http.get(s,r)}async getAgentInsuranceCompanyConnectionAsync(t,r){let s=y.insuranceCompanies.getConnection.render(t);return this.http.get(s,r)}async addAgentInsuranceCompany(t,r){return this.http.postNoContent(y.insuranceCompanies.addInsuranceCompanyToAgent,t,r)}async removeAgentInsuranceCompany(t,r){let s=y.insuranceCompanies.remove.render(t);return this.http.deleteNoContent(s,r)}async updateAgentInsuranceCompanyConnection(t,r){let s=y.insuranceCompanies.updateConnection.render(t.agentInsuranceCompanyId);return this.http.putNoContent(s,t,r)}async updateAgentInsuranceCompanyBranches(t,r){let s=y.insuranceCompanies.updateBranches.render(t.agentInsuranceCompanyId);return this.http.putNoContent(s,t,r)}async reSyncAgentInsuranceCompanyWithInsurance(t,r){let s=y.insuranceCompanies.reSyncAgentInsuranceCompanyWithInsurance.render(t.agentInsuranceCompanyId);return this.http.postNoContent(s,t,r)}async getB2CConfigFields(t){return this.http.get(_.configFields.getAll,t)}async updateB2CConfigFields(t,r){return this.http.putNoContent(_.configFields.updateAll,t,r)}};var G=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 w=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 F=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||{}),k=(e=>(e.Individual="INDIVIDUAL",e.Company="COMPANY",e.Foreign="FOREIGN",e))(k||{}),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||{}),pt=(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))(pt||{}),lt=(e=>(e.Active="ACTIVE",e.EndOfLife="END_OF_LIFE",e.Cancelled="CANCELLED",e))(lt||{}),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||{}),gt=(e=>(e.Bilinmiyor="BILINMIYOR",e.DarKapsam="DAR_KAPSAM",e.StandartKapsam="STANDART_KAPSAM",e.GenisKapsam="GENIS_KAPSAM",e))(gt||{}),It=(e=>(e.Bilinmiyor="BILINMIYOR",e.Yatarak="YATARAK",e.YatarakAyakta="YATARAK_AYAKTA",e))(It||{}),ht=(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))(ht||{});function Ct(e){return typeof e=="object"&&e!==null&&"$type"in e&&typeof e.$type=="string"}function Kr(...e){if(e.length===0)throw new Error("Cannot merge empty coverage array");let t=e.filter(u=>u!=null);if(t.length===0)throw new Error("No valid coverages to merge");let s=t[0].productBranch;for(let u of t)if(u.productBranch!==s)throw new Error(`All coverages must have the same productBranch. Expected: ${s}, but found: ${u.productBranch}`);let o=u=>{let d=u.filter(m=>m!=null);if(d.length===0)return;let p=d.filter(m=>m.$type!=="UNDEFINED");return p.length>0?p[p.length-1]:{$type:"UNDEFINED"}},i=u=>{let d=u.filter(p=>p!=null);return d.length>0?d[d.length-1]:void 0},l=new Set;for(let u of t)Object.keys(u).forEach(d=>{d!=="productBranch"&&l.add(d)});let a={productBranch:s};for(let u of l){let d=t.map(m=>m[u]),p=d.find(m=>m!=null);Ct(p)?a[u]=o(d):a[u]=i(d)}return a}var yt=(e=>(e.Succeeded="SUCCEEDED",e.Failed="TRIGGER_STATUS_FAILED",e))(yt||{}),ft=(e=>(e.Unknown="UNKNOWN",e.CouldNotFetchPolicies="COULD_NOT_FETCH_POLICIES",e))(ft||{}),Pt=(e=>(e.Success="SUCCESS",e.Failed="TRANSFER_FAILED",e.Skipped="TRANSFER_SKIPPED",e))(Pt||{}),Ut=(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))(Ut||{}),Et=(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))(Et||{}),At=(e=>(e.Unknown="UNKNOWN",e.SteelReinforcedConcrete="STEEL_REINFORCED_CONCRETE",e.Other="OTHER",e))(At||{}),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||{}),vt=(e=>(e.Bank="BANK",e.FinancialInstitution="FINANCIAL_INSTITUTION",e))(vt||{}),Lt=(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))(Lt||{}),St=(e=>(e.Gasoline="GASOLINE",e.Diesel="DIESEL",e.Lpg="LPG",e.Electric="ELECTRIC",e.LpgGasoline="LPG_GASOLINE",e.Hybrid="HYBRID",e))(St||{}),Dt=(e=>(e.Audio="audio",e.Display="display",e.Other="other",e))(Dt||{}),Hr=class ce{constructor(t){g(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()}},$r=class de{constructor(t){g(this,"_year");g(this,"_month");g(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}},qt=(e=>(e.Unknown="UNKNOWN",e.Male="MALE",e.Female="FEMALE",e.Other="OTHER",e))(qt||{}),_t=(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))(_t||{}),bt=(e=>(e.Unknown="UNKNOWN",e.Turk="TURK",e.Other="OTHER",e))(bt||{}),Gt=(e=>(e.Unknown="UNKNOWN",e.Single="SINGLE",e.Married="MARRIED",e))(Gt||{}),wt=(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))(wt||{}),Ft=(e=>(e.Active="ACTIVE",e.Succeeded="SUCCEEDED",e.Failed="FAILED",e))(Ft||{}),kt=(e=>(e.PhoneCall="PHONE_CALL",e))(kt||{}),Bt=(e=>(e.Planned="PLANNED",e.Occurred="OCCURRED",e.NotOccurred="NOT_OCCURRED",e))(Bt||{}),Mt=(e=>(e.Other="OTHER",e.OrganTransplant="ORGAN_TRANSPLANT",e.BoneMarrowTransplant="BONE_MARROW_TRANSPLANT",e.HeartSurgery="HEART_SURGERY",e.BrainSurgery="BRAIN_SURGERY",e))(Mt||{}),xt=(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))(xt||{}),Kt=(e=>(e.KVKK="KVKK",e.ETK="ETK",e))(Kt||{}),Ht=(e=>(e.SaleOpportunity="SALE_OPPORTUNITY",e.Endorsement="ENDORSEMENT",e.Cancel="CANCEL",e.Complaint="COMPLAINT",e))(Ht||{}),$t=(e=>(e.Fail="FAIL",e.Open="OPEN",e.InProgress="IN_PROGRESS",e.Success="SUCCESS",e))($t||{}),Qt=(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))(Qt||{}),Vt=(e=>(e.Open="OPEN",e.Delayed="DELAYED",e.Success="SUCCESS",e.Fail="FAIL",e))(Vt||{}),jt=(e=>(e.NewSale="NEW_SALE",e.CrossSale="CROSS_SALE",e.Renewal="RENEWAL",e))(jt||{}),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||{}),Yt=(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))(Yt||{}),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||{}),pr=(e=>(e.ASC="ASC",e.DESC="DESC",e))(pr||{});function C(e,t=" "){let r=[],s=new Map;for(let i of e){let l=i.indexOf(".");if(l!==-1){let a=i.slice(0,l),u=i.slice(l+1);s.has(a)||s.set(a,[]),s.get(a).push(u)}else r.push(i)}let o=[...r];for(let[i,l]of s)o.push(`${i} { ${l.join(" ")} }`);return o.join(`
2
- ${t}`)}var _e=["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"],lr=(e=>(e.None="NONE",e.AdminPanel="ADMIN_PANEL",e.Agent="AGENT",e.Customer="CUSTOMER",e))(lr||{}),be=["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"],Ge=["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"],we=["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"],Fe=["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"],ke=["id","startDate","endDate","insuranceCompanyCount","policyTransferTriggerCount","policyCount"],Be=["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||{}),Me=["id","webhookId","webhookName","event","state","responseStatusCode","createdAt","completedAt","retryCount"];var B=class{constructor(t,r){this.http=t;this.graphql=r}async getMyAgentUser(t){return this.http.get(h.me,t)}async updateMyAgentUser(t,r){return this.http.putNoContent(h.updateMyUser,t,r)}async inviteAgentUser(t,r){return this.http.postNoContent(h.invite,t,r)}async activateAgentUser(t,r){let s=h.activate.render(t);return this.http.postNoContent(s,void 0,r)}async deactivateAgentUser(t,r){let s=h.deactivate.render(t);return this.http.postNoContent(s,void 0,r)}async checkAgentUserInviteCode(t,r){let s=h.checkAgentUserInviteCode.render(t);return this.http.get(s,r)}async deleteAgentUser(t,r){let s=h.delete.render(t);return this.http.deleteNoContent(s,r)}async getAgentUserById(t,r){let s=h.getById.render(t);return this.http.get(s,r)}async reSendInviteAgentUser(t,r){let s=h.reSendInvite.render(t);return this.http.postNoContent(s,void 0,r)}async acceptAgentUserInvite(t,r){return this.http.postNoContent(h.acceptInvite,t,r)}async updateAgentUser(t,r){let s=h.update.render(t.id);return this.http.putNoContent(s,t,r)}async updateAgentUserPassword(t,r){return this.http.putNoContent(h.updatePassword,t,r)}async getMyAgentUserRobotCode(t){return this.http.get(h.meRobotCode,t)}async migrateAgentUser(t,r){let s=h.migrate.render(t);return this.http.postNoContent(s,void 0,r)}async migrateAllAgentUsers(t){return this.http.post(h.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??Fe,i=`
1
+ var Re=Object.defineProperty;var xe=(e,t,r)=>t in e?Re(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ke=(e,t)=>{for(var r in t)Re(e,r,{get:t[r],enumerable:!0})};var g=(e,t,r)=>xe(e,typeof t!="symbol"?t+"":t,r);var ge={name:"@insurup/sdk",version:"0.1.10",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 He=ge.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=(p=>(p.Forbidden="FORBIDDEN",p.Unauthorized="UNAUTHORIZED",p.NotFound="NOT_FOUND",p.BadRequest="BAD_REQUEST",p.Conflict="CONFLICT",p.NotSupported="NOT_SUPPORTED",p.UpstreamError="UPSTREAM_ERROR",p.InternalError="INTERNAL_ERROR",p.ValidationError="VALIDATION_ERROR",p.FilterRequired="FILTER_REQUIRED",p.FilterMaxSpanExceeded="FILTER_MAX_SPAN_EXCEEDED",p.Unknown="UNKNOWN",p))(X||{});var Qe={"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 Ve(e){let t=e.toLowerCase().trim();return Qe[t]??"Unknown"}function je(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=Ve(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:je(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 Ie(e){return{kind:"client-error",isSuccess:!1,message:e instanceof Error?e.message:"Failed to serialize request to JSON",type:"JsonSerialization",error:e}}function v(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);g(this,"error");this.name="InsurUpError",this.error=r}};function D(e){return{kind:"success",isSuccess:!0,message:"Success",data:e}}function pe(){return{kind:"success",isSuccess:!0,message:"Success"}}function Ye(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 le(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)}},L={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 he(e){return{baseUrl:e?.baseUrl??L.baseUrl,customHeaders:{...L.customHeaders,...e?.customHeaders},userAgent:e?.userAgent??L.userAgent,timeoutMs:e?.timeoutMs??L.timeoutMs,logLevel:e?.logLevel??L.logLevel,logger:e?.logger??L.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:l,backoffStrategy:m,onFailedAttempt:o}=t,c=1;for(;;)try{return await e(c)}catch(u){if(c>r)throw u;let p;switch(m){case"linear":p=n*c;break;case"constant":p=n;break;default:p=n*Math.pow(s,c-1)}l&&(p*=1+Math.random()),p=Math.min(p,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,p)),c++}}var te=class{constructor(t){g(this,"options");this.options=he(t)}async sendInternal(t,r,s,n,a=!0){let l=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 p=new Error(d.message);throw p.result=d,p.attemptNumber=u,p}return d}catch(d){let p=ee(d);if(p.type==="Timeout")return p;if(p.type==="HttpRequestFailed"&&this.options.retry){let R=new Error(p.message);throw R.result=p,R.attemptNumber=u,R}return p}};try{let u;this.options.retry?u=await Ce(c,{...this.options.retry,onFailedAttempt:p=>{let R=p.error;R.result&&this.logRetry(p.attemptNumber,R.result),this.options.retry?.onFailedAttempt&&this.options.retry.onFailedAttempt(p)}}):u=await c(1);let d=Date.now()-l;if(this.logResponse("SUCCESS",d,1,u),this.options.onResponse)try{return await this.options.onResponse(u,o)}catch(p){this.options.logLevel!=="none"&&this.options.logger.warn("Response interceptor failed:",p)}return u}catch(u){let d=Date.now()-l,p=u;if(p.result){if(this.logResponse("ERROR",d,p.attemptNumber||1,p.result),this.options.onResponse)try{return await this.options.onResponse(p.result,o)}catch(oe){this.options.logLevel!=="none"&&this.options.logger.warn("Response interceptor failed:",oe)}return p.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 l=`${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 Ie(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 p;try{p=await fetch(l,{method:t,headers:m,body:o,signal:c.signal})}finally{clearTimeout(u),d?.()}return await this.handleResponse(p,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 l=new AbortController,m=setTimeout(()=>l.abort(),r?.timeoutMs??this.options.timeoutMs),o;if(r?.signal)if(r.signal.aborted)l.abort();else{let u=()=>l.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:l.signal})}catch(u){let d=ee(u);if(this.options.onResponse)try{return await this.options.onResponse(d,a)}catch(p){this.options.logLevel!=="none"&&this.options.logger.warn("Response interceptor failed:",p)}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(p){this.options.logLevel!=="none"&&this.options.logger.warn("Response interceptor failed:",p)}return d}try{let u=await c.blob(),d=D(u);if(this.options.onResponse)try{return await this.options.onResponse(d,a)}catch(p){this.options.logLevel!=="none"&&this.options.logger.warn("Response interceptor failed:",p)}return d}catch(u){let d=v(u);if(this.options.onResponse)try{return await this.options.onResponse(d,a)}catch(p){this.options.logLevel!=="none"&&this.options.logger.warn("Response interceptor failed:",p)}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():pe();let s=await t.text();if(!s.trim())return r?ue():pe();let n=t.headers.get("content-type");return n&&!this.isJsonContentType(n)?v(new Error(`Expected JSON response but got ${n}`)):this.parseSuccessResponse(s)}parseSuccessResponse(t){try{let r=JSON.parse(t);return D(r)}catch(r){return v(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 l=this.sanitizeHeaders(n),m=this.sanitizeBody(s);this.options.logger.info(`Request: ${t} ${a}`,{headers:l,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 l=n.kind==="success"&&"data"in n?this.sanitizeResponseData(n.data):void 0;this.options.logger.info(`Response: ${t} in ${r}ms${a}`,{data:l})}else{let l=this.sanitizeError(n);this.options.logger.error(`Response: ${t} in ${r}ms${a}`,{error:l})}}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 l=n.toLowerCase();s.includes(l)?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,l=0)=>{if(l>3||r>50)return!0;if(s=Math.max(s,l),Array.isArray(a)){if(a.length>100)return!0;for(let m=0;m<Math.min(a.length,10);m++)if(n(a[m],l+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],l+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 q=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 l=a.data;if(l.errors&&l.errors.length>0){let m=st(l.errors);return le(m)}return l.data?D(l.data):v(new Error("GraphQL response contained no data and no errors"))}};var qe={};Ke(qe,{addressParameters:()=>U,agentBranches:()=>N,agentRoles:()=>O,agentSetupRequests:()=>re,agentUsers:()=>h,agents:()=>y,b2c:()=>_,banks:()=>Se,cases:()=>I,contactForm:()=>nt,coverageChoices:()=>S,coverageGroups:()=>A,customers:()=>Pe,endpoints:()=>i,filePolicyTransfers:()=>ve,files:()=>se,financialInstitutions:()=>De,insuranceCompanies:()=>ye,insuranceServices:()=>Ae,languages:()=>ne,policies:()=>Te,policyTransfers:()=>Oe,properties:()=>E,proposals:()=>Ne,releaseNotes:()=>Le,resourceKeys:()=>fe,templates:()=>T,vehicleParameters:()=>Ue,vehicles:()=>Ee,webhooks:()=>f});var nt={submit:"contact-form"},y={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))}}},ye={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()))}}},fe={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))}}},U={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)}},Ue={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()))}},Ee={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))}},Ae={queryVehicleByBrandCode:"insurance-services/query-vehicle-by-brand-code"},E={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))}},ve={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))}},h={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))}},f={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))}}},I={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"},A={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))}},Le={getAll:"release-notes"},Se={getAll:"banks",getBranches:{definition:"banks/{BankId}/branches",render:e=>"banks/{BankId}/branches".replace("{BankId}",encodeURIComponent(e))}},De={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))}},_={configFields:{getAll:"b2c/config-fields",updateAll:"b2c/config-fields"}},i={customers:Pe,vehicles:Ee,vehicleParameters:Ue,insuranceServices:Ae,agents:y,insuranceCompanies:ye,resourceKeys:fe,releaseNotes:Le,banks:Se,financialInstitutions:De,policies:Te,policyTransfers:Oe,filePolicyTransfers:ve,cases:I,coverageGroups:A,webhooks:f,agentBranches:N,files:se,languages:ne,templates:T,b2c:_,proposals:Ne};var b=class{constructor(t){this.http=t}async getCurrentAgent(t){return this.http.get(y.getCurrentAgent,t)}async updateCurrentAgent(t,r){return this.http.putNoContent(y.updateCurrentAgent,t,r)}async getAgentInsuranceCompaniesAsync(t){return this.http.get(y.insuranceCompanies.getMyInsuranceCompanies,t)}async getAgentInsuranceCompanyBranchesAsync(t,r){let s=y.insuranceCompanies.getBranches.render(t);return this.http.get(s,r)}async getAgentInsuranceCompanyConnectionAsync(t,r){let s=y.insuranceCompanies.getConnection.render(t);return this.http.get(s,r)}async addAgentInsuranceCompany(t,r){return this.http.postNoContent(y.insuranceCompanies.addInsuranceCompanyToAgent,t,r)}async removeAgentInsuranceCompany(t,r){let s=y.insuranceCompanies.remove.render(t);return this.http.deleteNoContent(s,r)}async updateAgentInsuranceCompanyConnection(t,r){let s=y.insuranceCompanies.updateConnection.render(t.agentInsuranceCompanyId);return this.http.putNoContent(s,t,r)}async updateAgentInsuranceCompanyBranches(t,r){let s=y.insuranceCompanies.updateBranches.render(t.agentInsuranceCompanyId);return this.http.putNoContent(s,t,r)}async reSyncAgentInsuranceCompanyWithInsurance(t,r){let s=y.insuranceCompanies.reSyncAgentInsuranceCompanyWithInsurance.render(t.agentInsuranceCompanyId);return this.http.postNoContent(s,t,r)}async getB2CConfigFields(t){return this.http.get(_.configFields.getAll,t)}async updateB2CConfigFields(t,r){return this.http.putNoContent(_.configFields.updateAll,t,r)}};var G=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 F=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 w=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||{}),k=(e=>(e.Individual="INDIVIDUAL",e.Company="COMPANY",e.Foreign="FOREIGN",e))(k||{}),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||{}),pt=(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))(pt||{}),lt=(e=>(e.Active="ACTIVE",e.EndOfLife="END_OF_LIFE",e.Cancelled="CANCELLED",e))(lt||{}),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||{}),gt=(e=>(e.Bilinmiyor="BILINMIYOR",e.DarKapsam="DAR_KAPSAM",e.StandartKapsam="STANDART_KAPSAM",e.GenisKapsam="GENIS_KAPSAM",e))(gt||{}),It=(e=>(e.Bilinmiyor="BILINMIYOR",e.Yatarak="YATARAK",e.YatarakAyakta="YATARAK_AYAKTA",e))(It||{}),ht=(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))(ht||{});function Ct(e){return typeof e=="object"&&e!==null&&"$type"in e&&typeof e.$type=="string"}function Kr(...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},l=new Set;for(let o of t)Object.keys(o).forEach(c=>{c!=="productBranch"&&l.add(c)});let m={productBranch:s};for(let o of l){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 yt=(e=>(e.Succeeded="SUCCEEDED",e.Failed="TRIGGER_STATUS_FAILED",e))(yt||{}),ft=(e=>(e.Unknown="UNKNOWN",e.CouldNotFetchPolicies="COULD_NOT_FETCH_POLICIES",e))(ft||{}),Pt=(e=>(e.Success="SUCCESS",e.Failed="TRANSFER_FAILED",e.Skipped="TRANSFER_SKIPPED",e))(Pt||{}),Ut=(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))(Ut||{}),Et=(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))(Et||{}),At=(e=>(e.Unknown="UNKNOWN",e.SteelReinforcedConcrete="STEEL_REINFORCED_CONCRETE",e.Other="OTHER",e))(At||{}),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||{}),vt=(e=>(e.Bank="BANK",e.FinancialInstitution="FINANCIAL_INSTITUTION",e))(vt||{}),Lt=(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))(Lt||{}),St=(e=>(e.Gasoline="GASOLINE",e.Diesel="DIESEL",e.Lpg="LPG",e.Electric="ELECTRIC",e.LpgGasoline="LPG_GASOLINE",e.Hybrid="HYBRID",e))(St||{}),Dt=(e=>(e.Audio="audio",e.Display="display",e.Other="other",e))(Dt||{}),$r=class ce{constructor(t){g(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()}},Hr=class de{constructor(t){g(this,"_year");g(this,"_month");g(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}},qt=(e=>(e.Unknown="UNKNOWN",e.Male="MALE",e.Female="FEMALE",e.Other="OTHER",e))(qt||{}),_t=(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))(_t||{}),bt=(e=>(e.Unknown="UNKNOWN",e.Turk="TURK",e.Other="OTHER",e))(bt||{}),Gt=(e=>(e.Unknown="UNKNOWN",e.Single="SINGLE",e.Married="MARRIED",e))(Gt||{}),Ft=(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))(Ft||{}),wt=(e=>(e.Active="ACTIVE",e.Succeeded="SUCCEEDED",e.Failed="FAILED",e))(wt||{}),kt=(e=>(e.PhoneCall="PHONE_CALL",e))(kt||{}),Bt=(e=>(e.Planned="PLANNED",e.Occurred="OCCURRED",e.NotOccurred="NOT_OCCURRED",e))(Bt||{}),Mt=(e=>(e.Other="OTHER",e.OrganTransplant="ORGAN_TRANSPLANT",e.BoneMarrowTransplant="BONE_MARROW_TRANSPLANT",e.HeartSurgery="HEART_SURGERY",e.BrainSurgery="BRAIN_SURGERY",e))(Mt||{}),xt=(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))(xt||{}),Kt=(e=>(e.KVKK="KVKK",e.ETK="ETK",e))(Kt||{}),$t=(e=>(e.SaleOpportunity="SALE_OPPORTUNITY",e.Endorsement="ENDORSEMENT",e.Cancel="CANCEL",e.Complaint="COMPLAINT",e))($t||{}),Ht=(e=>(e.Fail="FAIL",e.Open="OPEN",e.InProgress="IN_PROGRESS",e.Success="SUCCESS",e))(Ht||{}),Qt=(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))(Qt||{}),Vt=(e=>(e.Open="OPEN",e.Delayed="DELAYED",e.Success="SUCCESS",e.Fail="FAIL",e))(Vt||{}),jt=(e=>(e.NewSale="NEW_SALE",e.CrossSale="CROSS_SALE",e.Renewal="RENEWAL",e))(jt||{}),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||{}),Yt=(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))(Yt||{}),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||{}),pr=(e=>(e.ASC="ASC",e.DESC="DESC",e))(pr||{});function C(e,t=" "){let r=[],s=new Map;for(let a of e){let l=a.indexOf(".");if(l!==-1){let m=a.slice(0,l),o=a.slice(l+1);s.has(m)||s.set(m,[]),s.get(m).push(o)}else r.push(a)}let n=[...r];for(let[a,l]of s)n.push(`${a} { ${l.join(" ")} }`);return n.join(`
2
+ ${t}`)}var _e=["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"],lr=(e=>(e.None="NONE",e.AdminPanel="ADMIN_PANEL",e.Agent="AGENT",e.Customer="CUSTOMER",e))(lr||{}),be=["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"],Ge=["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"],Fe=["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"],we=["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"],ke=["id","startDate","endDate","insuranceCompanyCount","policyTransferTriggerCount","policyCount"],Be=["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||{}),Me=["id","webhookId","webhookName","event","state","responseStatusCode","createdAt","completedAt","retryCount"];var B=class{constructor(t,r){this.http=t;this.graphql=r}async getMyAgentUser(t){return this.http.get(h.me,t)}async updateMyAgentUser(t,r){return this.http.putNoContent(h.updateMyUser,t,r)}async inviteAgentUser(t,r){return this.http.postNoContent(h.invite,t,r)}async activateAgentUser(t,r){let s=h.activate.render(t);return this.http.postNoContent(s,void 0,r)}async deactivateAgentUser(t,r){let s=h.deactivate.render(t);return this.http.postNoContent(s,void 0,r)}async checkAgentUserInviteCode(t,r){let s=h.checkAgentUserInviteCode.render(t);return this.http.get(s,r)}async deleteAgentUser(t,r){let s=h.delete.render(t);return this.http.deleteNoContent(s,r)}async getAgentUserById(t,r){let s=h.getById.render(t);return this.http.get(s,r)}async reSendInviteAgentUser(t,r){let s=h.reSendInvite.render(t);return this.http.postNoContent(s,void 0,r)}async acceptAgentUserInvite(t,r){return this.http.postNoContent(h.acceptInvite,t,r)}async updateAgentUser(t,r){let s=h.update.render(t.id);return this.http.putNoContent(s,t,r)}async updateAgentUserPassword(t,r){return this.http.putNoContent(h.updatePassword,t,r)}async getMyAgentUserRobotCode(t){return this.http.get(h.meRobotCode,t)}async migrateAgentUser(t,r){let s=h.migrate.render(t);return this.http.postNoContent(s,void 0,r)}async migrateAllAgentUsers(t){return this.http.post(h.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??we,n=C(s),l=`
3
3
  query GetAgentUsers(
4
4
  $first: Int
5
5
  $after: String
@@ -25,15 +25,15 @@ ${t}`)}var _e=["agentBranchId","id","name","identityNumber","taxNumber","type","
25
25
  endCursor
26
26
  }
27
27
  totalCount
28
- edges {
28
+ ${n.length>0?`edges {
29
29
  cursor
30
30
  node {
31
- ${C(s)}
31
+ ${n}
32
32
  }
33
- }
33
+ }`:""}
34
34
  }
35
35
  }
36
- `,l={first:t?.first,after:t?.after,last:t?.last,before:t?.before,search:t?.search,filter:t?.filter,order:t?.order},a=await this.graphql.query(i,l,r);if(!a.isSuccess)return a;let d=a.data.agentUsersNew.edges?.map(p=>p?.node??null)??null;return{...a,data:{...a.data.agentUsersNew,nodes:d}}}};var M=class{constructor(t,r){this.http=t;this.graphql=r}async createCustomer(t,r){let{type:s,...o}=t,i;switch(s){case k.Individual:i="individual";break;case k.Company:i="company";break;case k.Foreign:i="foreign";break}return this.http.post(n.customers.createCustomer,{$type:i,...o},r)}async getCustomer(t,r){return this.http.get(n.customers.getCustomer.render(t),r)}async getCurrentCustomer(t){return this.http.get(n.customers.getCurrentCustomer,t)}async updateCustomer(t,r){return this.http.putNoContent(n.customers.updateCustomer.render(t.id),t,r)}async deleteCustomer(t,r){return this.http.deleteNoContent(n.customers.deleteCustomer.render(t),r)}async getCustomerEmails(t,r){return this.http.get(n.customers.emails.getCustomerEmails.render(t),r)}async addCustomerEmail(t,r){return this.http.postNoContent(n.customers.emails.addCustomerEmail.render(t.customerId),t,r)}async removeCustomerEmail(t,r){return this.http.deleteNoContent(n.customers.emails.removeCustomerEmail.render(t),r)}async changePrimaryCustomerEmail(t,r){return this.http.postNoContent(n.customers.emails.changePrimaryCustomerEmail.render(t),void 0,r)}async getCustomerPhoneNumbers(t,r){return this.http.get(n.customers.phoneNumbers.getCustomerPhoneNumbers.render(t),r)}async addCustomerPhoneNumber(t,r){return this.http.postNoContent(n.customers.phoneNumbers.addCustomerPhoneNumber.render(t.customerId),t,r)}async removeCustomerPhoneNumber(t,r){return this.http.deleteNoContent(n.customers.phoneNumbers.removeCustomerPhoneNumber.render(t),r)}async changePrimaryCustomerPhoneNumber(t,r){return this.http.postNoContent(n.customers.phoneNumbers.changePrimaryCustomerPhoneNumber.render(t),void 0,r)}async setCustomerRepresentative(t,r){return this.http.postNoContent(n.customers.setCustomerRepresentative.render(t.customerId),t,r)}async setCustomerBranch(t,r){return this.http.postNoContent(n.customers.setCustomerBranch.render(t.customerId),t,r)}async createCustomerAddress(t,r){return this.http.post(n.customers.addresses.create.render(t.customerId),t,r)}async updateCustomerAddress(t,r){return this.http.putNoContent(n.customers.addresses.update.render(t.customerId,t.addressId),t,r)}async getCustomerAddressById(t,r,s){return this.http.get(n.customers.addresses.getById.render(t,r),s)}async getCustomerAddresses(t,r){return this.http.get(n.customers.addresses.getAll.render(t),r)}async deleteCustomerAddress(t,r,s){return this.http.deleteNoContent(n.customers.addresses.delete.render(t,r),s)}async giveCustomerConsent(t,r,s){return this.http.postNoContent(n.customers.consents.give.render(t),r,s)}async revokeCustomerConsent(t,r,s){return this.http.postNoContent(n.customers.consents.revoke.render(t),r,s)}async getCustomerConsents(t,r){return this.http.get(n.customers.consents.getAll.render(t),r)}async getCustomerHealthInfo(t,r){return this.http.get(n.customers.getHealthInfo.render(t),r)}async updateCustomerHealthInfo(t,r){return this.http.putNoContent(n.customers.updateHealthInfo.render(t.customerId),t,r)}async createCustomerContactFlow(t,r){return this.http.postNoContent(n.customers.contactFlows.createContactFlow.render(t.customerId),t,r)}async createCustomerContact(t,r){return this.http.postNoContent(n.customers.contacts.create.render(t.customerId),t,r)}async endCustomerContactFlow(t,r){return this.http.postNoContent(n.customers.contactFlows.endContactFlow.render(t.customerId,t.contactFlowId),t,r)}async getCustomerContactFlows(t,r,s){return this.http.get(n.customers.contactFlows.getCustomerContactFlows.render(t,r),s)}async getCustomerContacts(t,r,s){return this.http.get(n.customers.contacts.getCustomerContacts.render(t,r),s)}async externalLookupCustomer(t,r){return this.http.post(n.customers.externalLookup,t,r)}async getCustomers(t,r){if(!this.graphql)throw new Error("GraphQL transport is not available. Ensure the client is properly initialized.");let s=t?.select??_e,o=C(s),l=`
36
+ `,m={first:t?.first,after:t?.after,last:t?.last,before:t?.before,search:t?.search,filter:t?.filter,order:t?.order},o=await this.graphql.query(l,m,r);if(!o.isSuccess)return o;let u=o.data.agentUsersNew.edges?.map(d=>d?.node??null)??null;return{...o,data:{...o.data.agentUsersNew,nodes:u}}}};var M=class{constructor(t,r){this.http=t;this.graphql=r}async createCustomer(t,r){let{type:s,...n}=t,a;switch(s){case k.Individual:a="individual";break;case k.Company:a="company";break;case k.Foreign:a="foreign";break}return this.http.post(i.customers.createCustomer,{$type:a,...n},r)}async getCustomer(t,r){return this.http.get(i.customers.getCustomer.render(t),r)}async getCurrentCustomer(t){return this.http.get(i.customers.getCurrentCustomer,t)}async updateCustomer(t,r){return this.http.putNoContent(i.customers.updateCustomer.render(t.id),t,r)}async deleteCustomer(t,r){return this.http.deleteNoContent(i.customers.deleteCustomer.render(t),r)}async getCustomerEmails(t,r){return this.http.get(i.customers.emails.getCustomerEmails.render(t),r)}async addCustomerEmail(t,r){return this.http.postNoContent(i.customers.emails.addCustomerEmail.render(t.customerId),t,r)}async removeCustomerEmail(t,r){return this.http.deleteNoContent(i.customers.emails.removeCustomerEmail.render(t),r)}async changePrimaryCustomerEmail(t,r){return this.http.postNoContent(i.customers.emails.changePrimaryCustomerEmail.render(t),void 0,r)}async getCustomerPhoneNumbers(t,r){return this.http.get(i.customers.phoneNumbers.getCustomerPhoneNumbers.render(t),r)}async addCustomerPhoneNumber(t,r){return this.http.postNoContent(i.customers.phoneNumbers.addCustomerPhoneNumber.render(t.customerId),t,r)}async removeCustomerPhoneNumber(t,r){return this.http.deleteNoContent(i.customers.phoneNumbers.removeCustomerPhoneNumber.render(t),r)}async changePrimaryCustomerPhoneNumber(t,r){return this.http.postNoContent(i.customers.phoneNumbers.changePrimaryCustomerPhoneNumber.render(t),void 0,r)}async setCustomerRepresentative(t,r){return this.http.postNoContent(i.customers.setCustomerRepresentative.render(t.customerId),t,r)}async setCustomerBranch(t,r){return this.http.postNoContent(i.customers.setCustomerBranch.render(t.customerId),t,r)}async createCustomerAddress(t,r){return this.http.post(i.customers.addresses.create.render(t.customerId),t,r)}async updateCustomerAddress(t,r){return this.http.putNoContent(i.customers.addresses.update.render(t.customerId,t.addressId),t,r)}async getCustomerAddressById(t,r,s){return this.http.get(i.customers.addresses.getById.render(t,r),s)}async getCustomerAddresses(t,r){return this.http.get(i.customers.addresses.getAll.render(t),r)}async deleteCustomerAddress(t,r,s){return this.http.deleteNoContent(i.customers.addresses.delete.render(t,r),s)}async giveCustomerConsent(t,r,s){return this.http.postNoContent(i.customers.consents.give.render(t),r,s)}async revokeCustomerConsent(t,r,s){return this.http.postNoContent(i.customers.consents.revoke.render(t),r,s)}async getCustomerConsents(t,r){return this.http.get(i.customers.consents.getAll.render(t),r)}async getCustomerHealthInfo(t,r){return this.http.get(i.customers.getHealthInfo.render(t),r)}async updateCustomerHealthInfo(t,r){return this.http.putNoContent(i.customers.updateHealthInfo.render(t.customerId),t,r)}async createCustomerContactFlow(t,r){return this.http.postNoContent(i.customers.contactFlows.createContactFlow.render(t.customerId),t,r)}async createCustomerContact(t,r){return this.http.postNoContent(i.customers.contacts.create.render(t.customerId),t,r)}async endCustomerContactFlow(t,r){return this.http.postNoContent(i.customers.contactFlows.endContactFlow.render(t.customerId,t.contactFlowId),t,r)}async getCustomerContactFlows(t,r,s){return this.http.get(i.customers.contactFlows.getCustomerContactFlows.render(t,r),s)}async getCustomerContacts(t,r,s){return this.http.get(i.customers.contacts.getCustomerContacts.render(t,r),s)}async externalLookupCustomer(t,r){return this.http.post(i.customers.externalLookup,t,r)}async getCustomers(t,r){if(!this.graphql)throw new Error("GraphQL transport is not available. Ensure the client is properly initialized.");let s=t?.select??_e,n=C(s),a=n.length>0,m=`
37
37
  query GetCustomers(
38
38
  $first: Int
39
39
  $after: String
@@ -59,15 +59,15 @@ ${t}`)}var _e=["agentBranchId","id","name","identityNumber","taxNumber","type","
59
59
  endCursor
60
60
  }
61
61
  ${t?.includeTotalCount!==!1?"totalCount":""}
62
- edges {
62
+ ${a?`edges {
63
63
  cursor
64
64
  node {
65
- ${o}
65
+ ${n}
66
66
  }
67
- }
67
+ }`:""}
68
68
  }
69
69
  }
70
- `,a={};t?.first===void 0&&t?.last===void 0?a.first=50:(t?.first!==void 0&&(a.first=t.first),t?.last!==void 0&&(a.last=t.last)),t?.after!==void 0&&(a.after=t.after),t?.before!==void 0&&(a.before=t.before),t?.search!==void 0&&(a.search=t.search),t?.filter!==void 0&&(a.filter=t.filter),t?.order!==void 0&&(a.order=t.order);let u=await this.graphql.query(l,a,r);if(!u.isSuccess)return u;let p=u.data.customersNew.edges?.map(m=>m?.node??null)??null;return{...u,data:{...u.data.customersNew,nodes:p}}}};var x=class{constructor(t){this.http=t}async addCustomerVehicle(t,r){let s=n.vehicles.create.render(t.customerId);return this.http.post(s,t,r)}async updateCustomerVehicle(t,r){let s=n.vehicles.update.render(t.customerId,t.vehicleId);return this.http.putNoContent(s,t,r)}async getCustomerVehicle(t,r,s){let o=n.vehicles.get.render(t,r);return this.http.get(o,s)}async getCustomerVehicles(t,r){let s=n.vehicles.getCustomerVehicles.render(t.customerId);return this.http.get(s,r)}async deleteCustomerVehicle(t,r,s){let o=n.vehicles.delete.render(t,r);return this.http.deleteNoContent(o,s)}async externalLookupVehicle(t,r){let s=n.vehicles.externalLookup.render(t.customerId);return this.http.post(s,t,r)}async queryVehicleBrands(t){let r=n.vehicleParameters.queryBrands;return this.http.get(r,t)}async queryVehicleModels(t,r){let s=n.vehicleParameters.queryModels.render(t);return this.http.get(s,r)}async queryVehicleByBrandCode(t,r){let s=n.insuranceServices.queryVehicleByBrandCode,o={brandCode:t};return this.http.post(s,o,r)}};var K=class{constructor(t){this.http=t}async queryCities(t){return this.http.get(U.queryCities,t)}async queryDistricts(t,r){return this.http.get(U.queryDistricts.render(t),r)}async queryTowns(t,r){return this.http.get(U.queryTowns.render(t),r)}async queryNeighborhoods(t,r){return this.http.get(U.queryNeighbourhoods.render(t),r)}async queryStreets(t,r){return this.http.get(U.queryStreets.render(t),r)}async queryBuildings(t,r){return this.http.get(U.queryBuildings.render(t),r)}async queryApartments(t,r){return this.http.get(U.queryApartments.render(t),r)}async createCustomerProperty(t,r){return this.http.post(E.create.render(t.customerId),t,r)}async updateCustomerProperty(t,r){return this.http.putNoContent(E.update.render(t.customerId,t.propertyId),t,r)}async getCustomerPropertyById(t,r,s){return this.http.get(E.getById.render(t,r),s)}async getCustomerProperties(t,r){return this.http.get(E.getAll.render(t),r)}async deleteCustomerProperty(t,r,s){return this.http.deleteNoContent(E.delete.render(t,r),s)}async getPropertyAddressByPropertyNumber(t,r){return this.http.post(E.getPropertyAddressByPropertyNumber,{propertyNumber:t},r)}async queryPropertyByDaskOldPolicy(t,r){return this.http.post(E.queryPropertyByDaskOldPolicy,{daskPolicyNumber:t},r)}};var H=class{constructor(t,r){this.http=t;this.graphql=r}async getPolicyDetail(t,r){return this.http.get(n.policies.getPolicyDetail.render(t.policyId),r)}async fetchPolicyDocument(t,r){return this.http.get(n.policies.fetchPolicyDocument.render(t.policyId),r)}async sendPolicyDocumentToCustomer(t,r){return this.http.postNoContent(n.policies.sendPolicyDocument.render(t.policyId),t,r)}async setPolicyRepresentative(t,r){return this.http.postNoContent(n.policies.setPolicyRepresentative.render(t.policyId),t,r)}async setPolicyBranch(t,r){return this.http.postNoContent(n.policies.setPolicyBranch.render(t.policyId),t,r)}async createManualPolicy(t,r){return this.http.post(n.policies.createManualPolicy.definition,t,r)}async updateManualPolicy(t,r){return this.http.putNoContent(n.policies.updateManualPolicy.render(t.policyId),t,r)}async getPolicyCountAndPremiumAnalytics(t,r){return this.http.post(n.policies.getPolicyCountAndPremiumAnalytics.definition,t,r)}async getPolicyRenewalAnalytics(t,r){return this.http.post(n.policies.getPolicyRenewalAnalytics.definition,t,r)}async getPolicyDistributionByBranch(t,r){return this.http.post(n.policies.getPolicyDistributionByBranch.definition,t,r)}async getRepresentativeEarningsAnalytics(t,r){return this.http.post(n.policies.getRepresentativeEarningsAnalytics.definition,t,r)}async getPolicyTransferDetail(t,r){return this.http.get(n.policyTransfers.getPolicyTransferDetail.render(t.policyTransferId),r)}async getPolicyTransferTriggerDetail(t,r){return this.http.get(n.policyTransfers.getPolicyTransferTriggerDetail.render(t.policyTransferId,t.policyTransferTriggerId),r)}async createPolicyTransfer(t,r){return this.http.post(n.policyTransfers.create,t,r)}async triggerPolicyTransfer(t,r){return this.http.postNoContent(n.policyTransfers.triggerPolicyTransfer.render(t.policyTransferId),t,r)}async createFilePolicyTransfer(t,r,s,o){let i=new FormData;return i.append("insuranceCompanyId",t.insuranceCompanyId.toString()),i.append("file",r,s),this.http.postNoContent(n.filePolicyTransfers.create,i,o)}async getFilePolicyTransferDetail(t,r){return this.http.get(n.filePolicyTransfers.getFilePolicyTransferDetail.render(t.filePolicyTransferId),r)}async getPolicies(t,r){if(!this.graphql)throw new Error("GraphQL transport is not available. Ensure the client is properly initialized.");let s=t?.select??be,o=C(s),l=`
70
+ `,o={};t?.first===void 0&&t?.last===void 0?o.first=50:(t?.first!==void 0&&(o.first=t.first),t?.last!==void 0&&(o.last=t.last)),t?.after!==void 0&&(o.after=t.after),t?.before!==void 0&&(o.before=t.before),t?.search!==void 0&&(o.search=t.search),t?.filter!==void 0&&(o.filter=t.filter),t?.order!==void 0&&(o.order=t.order);let c=await this.graphql.query(m,o,r);if(!c.isSuccess)return c;let d=c.data.customersNew.edges?.map(p=>p?.node??null)??null;return{...c,data:{...c.data.customersNew,nodes:d}}}};var x=class{constructor(t){this.http=t}async addCustomerVehicle(t,r){let s=i.vehicles.create.render(t.customerId);return this.http.post(s,t,r)}async updateCustomerVehicle(t,r){let s=i.vehicles.update.render(t.customerId,t.vehicleId);return this.http.putNoContent(s,t,r)}async getCustomerVehicle(t,r,s){let n=i.vehicles.get.render(t,r);return this.http.get(n,s)}async getCustomerVehicles(t,r){let s=i.vehicles.getCustomerVehicles.render(t.customerId);return this.http.get(s,r)}async deleteCustomerVehicle(t,r,s){let n=i.vehicles.delete.render(t,r);return this.http.deleteNoContent(n,s)}async externalLookupVehicle(t,r){let s=i.vehicles.externalLookup.render(t.customerId);return this.http.post(s,t,r)}async queryVehicleBrands(t){let r=i.vehicleParameters.queryBrands;return this.http.get(r,t)}async queryVehicleModels(t,r){let s=i.vehicleParameters.queryModels.render(t);return this.http.get(s,r)}async queryVehicleByBrandCode(t,r){let s=i.insuranceServices.queryVehicleByBrandCode,n={brandCode:t};return this.http.post(s,n,r)}};var K=class{constructor(t){this.http=t}async queryCities(t){return this.http.get(U.queryCities,t)}async queryDistricts(t,r){return this.http.get(U.queryDistricts.render(t),r)}async queryTowns(t,r){return this.http.get(U.queryTowns.render(t),r)}async queryNeighborhoods(t,r){return this.http.get(U.queryNeighbourhoods.render(t),r)}async queryStreets(t,r){return this.http.get(U.queryStreets.render(t),r)}async queryBuildings(t,r){return this.http.get(U.queryBuildings.render(t),r)}async queryApartments(t,r){return this.http.get(U.queryApartments.render(t),r)}async createCustomerProperty(t,r){return this.http.post(E.create.render(t.customerId),t,r)}async updateCustomerProperty(t,r){return this.http.putNoContent(E.update.render(t.customerId,t.propertyId),t,r)}async getCustomerPropertyById(t,r,s){return this.http.get(E.getById.render(t,r),s)}async getCustomerProperties(t,r){return this.http.get(E.getAll.render(t),r)}async deleteCustomerProperty(t,r,s){return this.http.deleteNoContent(E.delete.render(t,r),s)}async getPropertyAddressByPropertyNumber(t,r){return this.http.post(E.getPropertyAddressByPropertyNumber,{propertyNumber:t},r)}async queryPropertyByDaskOldPolicy(t,r){return this.http.post(E.queryPropertyByDaskOldPolicy,{daskPolicyNumber:t},r)}};var $=class{constructor(t,r){this.http=t;this.graphql=r}async getPolicyDetail(t,r){return this.http.get(i.policies.getPolicyDetail.render(t.policyId),r)}async fetchPolicyDocument(t,r){return this.http.get(i.policies.fetchPolicyDocument.render(t.policyId),r)}async sendPolicyDocumentToCustomer(t,r){return this.http.postNoContent(i.policies.sendPolicyDocument.render(t.policyId),t,r)}async setPolicyRepresentative(t,r){return this.http.postNoContent(i.policies.setPolicyRepresentative.render(t.policyId),t,r)}async setPolicyBranch(t,r){return this.http.postNoContent(i.policies.setPolicyBranch.render(t.policyId),t,r)}async createManualPolicy(t,r){return this.http.post(i.policies.createManualPolicy.definition,t,r)}async updateManualPolicy(t,r){return this.http.putNoContent(i.policies.updateManualPolicy.render(t.policyId),t,r)}async getPolicyCountAndPremiumAnalytics(t,r){return this.http.post(i.policies.getPolicyCountAndPremiumAnalytics.definition,t,r)}async getPolicyRenewalAnalytics(t,r){return this.http.post(i.policies.getPolicyRenewalAnalytics.definition,t,r)}async getPolicyDistributionByBranch(t,r){return this.http.post(i.policies.getPolicyDistributionByBranch.definition,t,r)}async getRepresentativeEarningsAnalytics(t,r){return this.http.post(i.policies.getRepresentativeEarningsAnalytics.definition,t,r)}async getPolicyTransferDetail(t,r){return this.http.get(i.policyTransfers.getPolicyTransferDetail.render(t.policyTransferId),r)}async getPolicyTransferTriggerDetail(t,r){return this.http.get(i.policyTransfers.getPolicyTransferTriggerDetail.render(t.policyTransferId,t.policyTransferTriggerId),r)}async createPolicyTransfer(t,r){return this.http.post(i.policyTransfers.create,t,r)}async triggerPolicyTransfer(t,r){return this.http.postNoContent(i.policyTransfers.triggerPolicyTransfer.render(t.policyTransferId),t,r)}async createFilePolicyTransfer(t,r,s,n){let a=new FormData;return a.append("insuranceCompanyId",t.insuranceCompanyId.toString()),a.append("file",r,s),this.http.postNoContent(i.filePolicyTransfers.create,a,n)}async getFilePolicyTransferDetail(t,r){return this.http.get(i.filePolicyTransfers.getFilePolicyTransferDetail.render(t.filePolicyTransferId),r)}async getPolicies(t,r){if(!this.graphql)throw new Error("GraphQL transport is not available. Ensure the client is properly initialized.");let s=t?.select??be,n=C(s),a=n.length>0,m=`
71
71
  query GetPolicies(
72
72
  $first: Int
73
73
  $after: String
@@ -93,15 +93,15 @@ ${t}`)}var _e=["agentBranchId","id","name","identityNumber","taxNumber","type","
93
93
  endCursor
94
94
  }
95
95
  ${t?.includeTotalCount!==!1?"totalCount":""}
96
- edges {
96
+ ${a?`edges {
97
97
  cursor
98
98
  node {
99
- ${o}
99
+ ${n}
100
100
  }
101
- }
101
+ }`:""}
102
102
  }
103
103
  }
104
- `,a={first:t?.first,after:t?.after,last:t?.last,before:t?.before,search:t?.search,filter:t?.filter,order:t?.order},u=await this.graphql.query(l,a,r);if(!u.isSuccess)return u;let p=u.data.policiesNew.edges?.map(m=>m?.node??null)??null;return{...u,data:{...u.data.policiesNew,nodes:p}}}async getPolicyTransfers(t,r){if(!this.graphql)throw new Error("GraphQL transport is not available. Ensure the client is properly initialized.");let s=t?.select??ke,i=`
104
+ `,o={first:t?.first,after:t?.after,last:t?.last,before:t?.before,search:t?.search,filter:t?.filter,order:t?.order},c=await this.graphql.query(m,o,r);if(!c.isSuccess)return c;let d=c.data.policiesNew.edges?.map(p=>p?.node??null)??null;return{...c,data:{...c.data.policiesNew,nodes:d}}}async getPolicyTransfers(t,r){if(!this.graphql)throw new Error("GraphQL transport is not available. Ensure the client is properly initialized.");let s=t?.select??ke,n=C(s),l=`
105
105
  query GetPolicyTransfers(
106
106
  $first: Int
107
107
  $after: String
@@ -127,15 +127,15 @@ ${t}`)}var _e=["agentBranchId","id","name","identityNumber","taxNumber","type","
127
127
  endCursor
128
128
  }
129
129
  totalCount
130
- edges {
130
+ ${n.length>0?`edges {
131
131
  cursor
132
132
  node {
133
- ${C(s)}
133
+ ${n}
134
134
  }
135
- }
135
+ }`:""}
136
136
  }
137
137
  }
138
- `,l={first:t?.first,after:t?.after,last:t?.last,before:t?.before,search:t?.search,filter:t?.filter,order:t?.order},a=await this.graphql.query(i,l,r);if(!a.isSuccess)return a;let d=a.data.policyTransfersNew.edges?.map(p=>p?.node??null)??null;return{...a,data:{...a.data.policyTransfersNew,nodes:d}}}async getFilePolicyTransfers(t,r){if(!this.graphql)throw new Error("GraphQL transport is not available. Ensure the client is properly initialized.");let s=t?.select??Be,i=`
138
+ `,m={first:t?.first,after:t?.after,last:t?.last,before:t?.before,search:t?.search,filter:t?.filter,order:t?.order},o=await this.graphql.query(l,m,r);if(!o.isSuccess)return o;let u=o.data.policyTransfersNew.edges?.map(d=>d?.node??null)??null;return{...o,data:{...o.data.policyTransfersNew,nodes:u}}}async getFilePolicyTransfers(t,r){if(!this.graphql)throw new Error("GraphQL transport is not available. Ensure the client is properly initialized.");let s=t?.select??Be,n=C(s),l=`
139
139
  query GetFilePolicyTransfers(
140
140
  $first: Int
141
141
  $after: String
@@ -161,15 +161,15 @@ ${t}`)}var _e=["agentBranchId","id","name","identityNumber","taxNumber","type","
161
161
  endCursor
162
162
  }
163
163
  totalCount
164
- edges {
164
+ ${n.length>0?`edges {
165
165
  cursor
166
166
  node {
167
- ${C(s)}
167
+ ${n}
168
168
  }
169
- }
169
+ }`:""}
170
170
  }
171
171
  }
172
- `,l={first:t?.first,after:t?.after,last:t?.last,before:t?.before,search:t?.search,filter:t?.filter,order:t?.order},a=await this.graphql.query(i,l,r);if(!a.isSuccess)return a;let d=a.data.filePolicyTransfersNew.edges?.map(p=>p?.node??null)??null;return{...a,data:{...a.data.filePolicyTransfersNew,nodes:d}}}};var $=class{constructor(t,r){this.http=t;this.graphql=r}async assignCaseRepresentative(t,r){let s=I.assignRepresentative.render(t.ref);return await this.http.putNoContent(s,t,r)}async changeCaseChannel(t,r){let s=I.changeChannel.render(t.ref);return await this.http.putNoContent(s,t,r)}async changeCaseState(t,r){let s=I.changeState.render(t.ref);return await this.http.putNoContent(s,t,r)}async createCancelCase(t,r){return await this.http.post(I.createCancel,t,r)}async createComplaintCase(t,r){return await this.http.post(I.createComplaint,t,r)}async createCrossSaleOpportunityCase(t,r){return await this.http.post(I.createCrossSaleOpportunity,t,r)}async createEndorsementCase(t,r){return await this.http.post(I.createEndorsement,t,r)}async createNewSaleOpportunityCase(t,r){return await this.http.post(I.createNewSaleOpportunity,t,r)}async getCasePolicies(t,r){let s=I.getPolicies.render(t);return await this.http.get(s,r)}async getCaseActivities(t,r){let s=I.getActivities.render(t);return await this.http.get(s,r)}async getCaseByRef(t,r){let s=I.getCaseByRef.render(t);return await this.http.get(s,r)}async getCaseProposals(t,r){let s=I.getProposals.render(t);return await this.http.get(s,r)}async addNoteToCase(t,r){let s=I.addNoteToCase.render(t.ref);return await this.http.putNoContent(s,t,r)}async setCaseAsset(t,r){let s=I.setAsset.render(t.ref);return await this.http.putNoContent(s,t,r)}async setCaseBranch(t,r){let s=I.setBranch.render(t.ref);return await this.http.putNoContent(s,t,r)}async getSalesOpportunityFunnelAnalytics(t,r){return await this.http.post(I.getSalesOpportunityFunnelAnalytics.definition,t,r)}async getOpenCaseBacklogPivotAnalytics(t,r){return await this.http.post(I.getOpenCaseBacklogPivotAnalytics.definition,t,r)}async getFailedCasesReasonDistribution(t,r){return await this.http.post(I.getFailedCasesReasonDistribution.definition,t,r)}async getAllCaseCommunicationAutomations(t){return await this.http.get(I.communicationAutomations.getAll,t)}async getCasePriorityTemplates(t){return await this.http.get(I.getPriorityTemplates,t)}async getCases(t,r){if(!this.graphql)throw new Error("GraphQL transport is not available. Ensure the client is properly initialized.");let s=t?.select??we,i=`
172
+ `,m={first:t?.first,after:t?.after,last:t?.last,before:t?.before,search:t?.search,filter:t?.filter,order:t?.order},o=await this.graphql.query(l,m,r);if(!o.isSuccess)return o;let u=o.data.filePolicyTransfersNew.edges?.map(d=>d?.node??null)??null;return{...o,data:{...o.data.filePolicyTransfersNew,nodes:u}}}};var H=class{constructor(t,r){this.http=t;this.graphql=r}async assignCaseRepresentative(t,r){let s=I.assignRepresentative.render(t.ref);return await this.http.putNoContent(s,t,r)}async changeCaseChannel(t,r){let s=I.changeChannel.render(t.ref);return await this.http.putNoContent(s,t,r)}async changeCaseState(t,r){let s=I.changeState.render(t.ref);return await this.http.putNoContent(s,t,r)}async createCancelCase(t,r){return await this.http.post(I.createCancel,t,r)}async createComplaintCase(t,r){return await this.http.post(I.createComplaint,t,r)}async createCrossSaleOpportunityCase(t,r){return await this.http.post(I.createCrossSaleOpportunity,t,r)}async createEndorsementCase(t,r){return await this.http.post(I.createEndorsement,t,r)}async createNewSaleOpportunityCase(t,r){return await this.http.post(I.createNewSaleOpportunity,t,r)}async getCasePolicies(t,r){let s=I.getPolicies.render(t);return await this.http.get(s,r)}async getCaseActivities(t,r){let s=I.getActivities.render(t);return await this.http.get(s,r)}async getCaseByRef(t,r){let s=I.getCaseByRef.render(t);return await this.http.get(s,r)}async getCaseProposals(t,r){let s=I.getProposals.render(t);return await this.http.get(s,r)}async addNoteToCase(t,r){let s=I.addNoteToCase.render(t.ref);return await this.http.putNoContent(s,t,r)}async setCaseAsset(t,r){let s=I.setAsset.render(t.ref);return await this.http.putNoContent(s,t,r)}async setCaseBranch(t,r){let s=I.setBranch.render(t.ref);return await this.http.putNoContent(s,t,r)}async getSalesOpportunityFunnelAnalytics(t,r){return await this.http.post(I.getSalesOpportunityFunnelAnalytics.definition,t,r)}async getOpenCaseBacklogPivotAnalytics(t,r){return await this.http.post(I.getOpenCaseBacklogPivotAnalytics.definition,t,r)}async getFailedCasesReasonDistribution(t,r){return await this.http.post(I.getFailedCasesReasonDistribution.definition,t,r)}async getAllCaseCommunicationAutomations(t){return await this.http.get(I.communicationAutomations.getAll,t)}async getCasePriorityTemplates(t){return await this.http.get(I.getPriorityTemplates,t)}async getCases(t,r){if(!this.graphql)throw new Error("GraphQL transport is not available. Ensure the client is properly initialized.");let s=t?.select??Fe,n=C(s),l=`
173
173
  query GetCases(
174
174
  $first: Int
175
175
  $after: String
@@ -195,15 +195,15 @@ ${t}`)}var _e=["agentBranchId","id","name","identityNumber","taxNumber","type","
195
195
  endCursor
196
196
  }
197
197
  totalCount
198
- edges {
198
+ ${n.length>0?`edges {
199
199
  cursor
200
200
  node {
201
- ${C(s)}
201
+ ${n}
202
202
  }
203
- }
203
+ }`:""}
204
204
  }
205
205
  }
206
- `,l={first:t?.first,after:t?.after,last:t?.last,before:t?.before,search:t?.search,filter:t?.filter,order:t?.order},a=await this.graphql.query(i,l,r);if(!a.isSuccess)return a;let d=a.data.casesNew.edges?.map(p=>p?.node??null)??null;return{...a,data:{...a.data.casesNew,nodes:d}}}};var Q=class{constructor(t,r){this.http=t;this.graphql=r}async createWebhook(t,r){return this.http.post(f.create,t,r)}async getWebhookById(t,r){let s=f.getById.render(t);return this.http.get(s,r)}async getWebhooks(t){return this.http.get(f.getAll,t)}async updateWebhook(t,r){let s=f.update.render(t.id);return this.http.putNoContent(s,t,r)}async deleteWebhook(t,r){let s=f.delete.render(t);return this.http.deleteNoContent(s,r)}async getWebhookDelivery(t,r,s){let o=f.deliveries.getById.render(t,r);return this.http.get(o,s)}async redeliverWebhookEvent(t,r,s){let o=f.deliveries.redeliver.render(t,r);return this.http.postNoContent(o,void 0,s)}async getWebhookDeliveries(t,r){if(!this.graphql)throw new Error("GraphQL transport is not available. Ensure the client is properly initialized.");let s=t?.select??Me,i=`
206
+ `,m={first:t?.first,after:t?.after,last:t?.last,before:t?.before,search:t?.search,filter:t?.filter,order:t?.order},o=await this.graphql.query(l,m,r);if(!o.isSuccess)return o;let u=o.data.casesNew.edges?.map(d=>d?.node??null)??null;return{...o,data:{...o.data.casesNew,nodes:u}}}};var Q=class{constructor(t,r){this.http=t;this.graphql=r}async createWebhook(t,r){return this.http.post(f.create,t,r)}async getWebhookById(t,r){let s=f.getById.render(t);return this.http.get(s,r)}async getWebhooks(t){return this.http.get(f.getAll,t)}async updateWebhook(t,r){let s=f.update.render(t.id);return this.http.putNoContent(s,t,r)}async deleteWebhook(t,r){let s=f.delete.render(t);return this.http.deleteNoContent(s,r)}async getWebhookDelivery(t,r,s){let n=f.deliveries.getById.render(t,r);return this.http.get(n,s)}async redeliverWebhookEvent(t,r,s){let n=f.deliveries.redeliver.render(t,r);return this.http.postNoContent(n,void 0,s)}async getWebhookDeliveries(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),l=`
207
207
  query GetWebhookDeliveries(
208
208
  $first: Int
209
209
  $after: String
@@ -229,15 +229,15 @@ ${t}`)}var _e=["agentBranchId","id","name","identityNumber","taxNumber","type","
229
229
  endCursor
230
230
  }
231
231
  totalCount
232
- edges {
232
+ ${n.length>0?`edges {
233
233
  cursor
234
234
  node {
235
- ${C(s)}
235
+ ${n}
236
236
  }
237
- }
237
+ }`:""}
238
238
  }
239
239
  }
240
- `,l={first:t?.first,after:t?.after,last:t?.last,before:t?.before,search:t?.search,filter:t?.filter,order:t?.order},a=await this.graphql.query(i,l,r);if(!a.isSuccess)return a;let d=a.data.webhookDeliveriesNew.edges?.map(p=>p?.node??null)??null;return{...a,data:{...a.data.webhookDeliveriesNew,nodes:d}}}};var V=class{constructor(t){this.http=t}async createCoverageGroup(t,r){return this.http.postNoContent(A.create,t,r)}async updateCoverageGroup(t,r){return this.http.putNoContent(A.update.render(t.id),t,r)}async deleteCoverageGroup(t,r){return this.http.deleteNoContent(A.delete.render(t.id),r)}async getCoverageGroupById(t,r){return this.http.get(A.getById.render(t),r)}async getAllCoverageGroups(t){return this.http.get(A.getAll,t)}async getKaskoCoverageChoices(t,r){let s=S.getKaskoCoverageChoices.render(t);return this.http.get(s,r)}async getKonutCoverageChoices(t){return this.http.get(S.getKonutCoverageChoices.render(),t)}async getTssCoverageChoices(t){return this.http.get(S.getTssCoverageChoices.render(),t)}async getImmCoverageChoices(t){return this.http.get(S.getImmCoverageChoices.render(),t)}};var j=class{constructor(t){this.http=t}async getResourceKeys(t){return this.http.get(n.resourceKeys.getAll,t)}async getInsuranceCompanies(t){return this.http.get(n.insuranceCompanies.getInsuranceCompanies,t)}async getInsuranceCompanyProducts(t,r){let s=n.insuranceCompanies.getInsuranceCompanyProducts.render(t);return this.http.get(s,r)}async getAllProducts(t){return this.http.get(n.insuranceCompanies.getAllProducts,t)}async getCompanyConnectionFields(t,r){let s=n.insuranceCompanies.connectionFields.getAgentBasedConnectionFieldsByCompanyId.render(t);return this.http.get(s,r)}async getAllReleaseNotes(t){return this.http.get(n.releaseNotes.getAll,t)}async getBanks(t){return this.http.get(n.banks.getAll,t)}async getBankBranches(t,r){let s=n.banks.getBranches.render(t);return this.http.get(s,r)}async getFinancialInstitutions(t){return this.http.get(n.financialInstitutions.getAll,t)}};var W=class{constructor(t,r){this.http=t;this.graphql=r}async createProposal(t,r){return this.http.post(n.proposals.create,t,r)}async retryFailedProposalProduct(t,r,s){let o={proposalId:t,proposalProductId:r};return this.http.postNoContent(n.proposals.retryFailedProposalProduct.render(t,r),o,s)}async getProposalDetail(t,r){return this.http.get(n.proposals.getProposalById.render(t),r)}async getProposalProductPremiumDetail(t,r,s,o){return this.http.get(n.proposals.getProposalProductPremiumDetail.render(t,r,s),o)}async purchaseProposalProductSync(t,r){return this.http.post(n.proposals.purchaseProposalProductSync.render(t.proposalId,t.proposalProductId),t,r)}async purchaseProposalProductAsync(t,r){return this.http.post(n.proposals.purchaseProposalProductAsync.render(t.proposalId,t.proposalProductId),t,r)}async getProposalProductCoverage(t,r,s){return this.http.get(n.proposals.getProposalProductCoverage.render(t,r),s)}async reviseProposal(t,r){return this.http.post(n.proposals.reviseProposal.render(t.proposalId),t,r)}async reviseProposalProduct(t,r){return this.http.postNoContent(n.proposals.reviseProposalProduct.render(t.proposalId,t.proposalProductId),t,r)}async fetchProposalProductDocument(t,r){return this.http.get(n.proposals.fetchProposalProductDocument.render(t.proposalId,t.proposalProductId),r)}async fetchProposalInformationFormDocument(t,r){return this.http.get(n.proposals.fetchProposalInformationFormDocument.render(t.proposalId,t.proposalProductId),r)}async sendProposalProductDocument(t,r){return this.http.postNoContent(n.proposals.sendProposalProductDocument.render(t.proposalId,t.proposalProductId),t,r)}async sendProposalInformationFormDocument(t,r){return this.http.postNoContent(n.proposals.sendProposalInformationFormDocument.render(t.proposalId,t.proposalProductId),t,r)}async generateCompareProposalProductsPdf(t,r){return this.http.post(n.proposals.generateCompareProposalProductsPdf.render(t.proposalId),t,r)}async sendCompareProposalProductsPdf(t,r){return this.http.postNoContent(n.proposals.sendCompareProposalProductsPdf.render(t.proposalId),t,r)}async generateCustomerProposalDocumentPdf(t,r){return this.http.post(n.proposals.generateCustomerProposalDocumentPdf.render(t.proposalId),t,r)}async setProposalBranch(t,r){return this.http.postNoContent(n.proposals.setProposalBranch.render(t.proposalId),t,r)}async getProposalConversionTrend(t,r){return this.http.post(n.proposals.getProposalConversionTrend.definition,t,r)}async setProposalRepresentative(t,r){return this.http.postNoContent(n.proposals.setProposalRepresentative.render(t.proposalId),t,r)}async getProposals(t,r){if(!this.graphql)throw new Error("GraphQL transport is not available. Ensure the client is properly initialized.");let s=t?.select??Ge,i=`
240
+ `,m={first:t?.first,after:t?.after,last:t?.last,before:t?.before,search:t?.search,filter:t?.filter,order:t?.order},o=await this.graphql.query(l,m,r);if(!o.isSuccess)return o;let u=o.data.webhookDeliveriesNew.edges?.map(d=>d?.node??null)??null;return{...o,data:{...o.data.webhookDeliveriesNew,nodes:u}}}};var V=class{constructor(t){this.http=t}async createCoverageGroup(t,r){return this.http.postNoContent(A.create,t,r)}async updateCoverageGroup(t,r){return this.http.putNoContent(A.update.render(t.id),t,r)}async deleteCoverageGroup(t,r){return this.http.deleteNoContent(A.delete.render(t.id),r)}async getCoverageGroupById(t,r){return this.http.get(A.getById.render(t),r)}async getAllCoverageGroups(t){return this.http.get(A.getAll,t)}async getKaskoCoverageChoices(t,r){let s=S.getKaskoCoverageChoices.render(t);return this.http.get(s,r)}async getKonutCoverageChoices(t){return this.http.get(S.getKonutCoverageChoices.render(),t)}async getTssCoverageChoices(t){return this.http.get(S.getTssCoverageChoices.render(),t)}async getImmCoverageChoices(t){return this.http.get(S.getImmCoverageChoices.render(),t)}};var j=class{constructor(t){this.http=t}async getResourceKeys(t){return this.http.get(i.resourceKeys.getAll,t)}async getInsuranceCompanies(t){return this.http.get(i.insuranceCompanies.getInsuranceCompanies,t)}async getInsuranceCompanyProducts(t,r){let s=i.insuranceCompanies.getInsuranceCompanyProducts.render(t);return this.http.get(s,r)}async getAllProducts(t){return this.http.get(i.insuranceCompanies.getAllProducts,t)}async getCompanyConnectionFields(t,r){let s=i.insuranceCompanies.connectionFields.getAgentBasedConnectionFieldsByCompanyId.render(t);return this.http.get(s,r)}async getAllReleaseNotes(t){return this.http.get(i.releaseNotes.getAll,t)}async getBanks(t){return this.http.get(i.banks.getAll,t)}async getBankBranches(t,r){let s=i.banks.getBranches.render(t);return this.http.get(s,r)}async getFinancialInstitutions(t){return this.http.get(i.financialInstitutions.getAll,t)}};var W=class{constructor(t,r){this.http=t;this.graphql=r}async createProposal(t,r){return this.http.post(i.proposals.create,t,r)}async retryFailedProposalProduct(t,r,s){let n={proposalId:t,proposalProductId:r};return this.http.postNoContent(i.proposals.retryFailedProposalProduct.render(t,r),n,s)}async getProposalDetail(t,r){return this.http.get(i.proposals.getProposalById.render(t),r)}async getProposalProductPremiumDetail(t,r,s,n){return this.http.get(i.proposals.getProposalProductPremiumDetail.render(t,r,s),n)}async purchaseProposalProductSync(t,r){return this.http.post(i.proposals.purchaseProposalProductSync.render(t.proposalId,t.proposalProductId),t,r)}async purchaseProposalProductAsync(t,r){return this.http.post(i.proposals.purchaseProposalProductAsync.render(t.proposalId,t.proposalProductId),t,r)}async getProposalProductCoverage(t,r,s){return this.http.get(i.proposals.getProposalProductCoverage.render(t,r),s)}async reviseProposal(t,r){return this.http.post(i.proposals.reviseProposal.render(t.proposalId),t,r)}async reviseProposalProduct(t,r){return this.http.postNoContent(i.proposals.reviseProposalProduct.render(t.proposalId,t.proposalProductId),t,r)}async fetchProposalProductDocument(t,r){return this.http.get(i.proposals.fetchProposalProductDocument.render(t.proposalId,t.proposalProductId),r)}async fetchProposalInformationFormDocument(t,r){return this.http.get(i.proposals.fetchProposalInformationFormDocument.render(t.proposalId,t.proposalProductId),r)}async sendProposalProductDocument(t,r){return this.http.postNoContent(i.proposals.sendProposalProductDocument.render(t.proposalId,t.proposalProductId),t,r)}async sendProposalInformationFormDocument(t,r){return this.http.postNoContent(i.proposals.sendProposalInformationFormDocument.render(t.proposalId,t.proposalProductId),t,r)}async generateCompareProposalProductsPdf(t,r){return this.http.post(i.proposals.generateCompareProposalProductsPdf.render(t.proposalId),t,r)}async sendCompareProposalProductsPdf(t,r){return this.http.postNoContent(i.proposals.sendCompareProposalProductsPdf.render(t.proposalId),t,r)}async generateCustomerProposalDocumentPdf(t,r){return this.http.post(i.proposals.generateCustomerProposalDocumentPdf.render(t.proposalId),t,r)}async setProposalBranch(t,r){return this.http.postNoContent(i.proposals.setProposalBranch.render(t.proposalId),t,r)}async getProposalConversionTrend(t,r){return this.http.post(i.proposals.getProposalConversionTrend.definition,t,r)}async setProposalRepresentative(t,r){return this.http.postNoContent(i.proposals.setProposalRepresentative.render(t.proposalId),t,r)}async getProposals(t,r){if(!this.graphql)throw new Error("GraphQL transport is not available. Ensure the client is properly initialized.");let s=t?.select??Ge,n=C(s),l=`
241
241
  query GetProposals(
242
242
  $first: Int
243
243
  $after: String
@@ -263,13 +263,13 @@ ${t}`)}var _e=["agentBranchId","id","name","identityNumber","taxNumber","type","
263
263
  endCursor
264
264
  }
265
265
  totalCount
266
- edges {
266
+ ${n.length>0?`edges {
267
267
  cursor
268
268
  node {
269
- ${C(s)}
269
+ ${n}
270
270
  }
271
- }
271
+ }`:""}
272
272
  }
273
273
  }
274
- `,l={first:t?.first,after:t?.after,last:t?.last,before:t?.before,search:t?.search,filter:t?.filter,order:t?.order},a=await this.graphql.query(i,l,r);if(!a.isSuccess)return a;let d=a.data.proposalsNew.edges?.map(p=>p?.node??null)??null;return{...a,data:{...a.data.proposalsNew,nodes:d}}}};var Y=class{constructor(t){this.http=t}async uploadPublicFile(t,r,s,o){let i=new FormData;return i.append("file",r,s),t.path&&i.append("path",t.path),this.http.post(se.uploadPublicFile,i,o)}};var z=class{constructor(t){this.http=t}async getLanguages(t){return this.http.get(ne.getAll,t)}};var Z=class{constructor(t){this.http=t}async getTemplateDefinitions(t){return this.http.get(T.getDefinitions,t)}async getAllTemplates(t){return this.http.get(T.getAll,t)}async getTemplateByKey(t,r,s){let o=`${T.getByKey.render(t)}?languageId=${r}`;return this.http.get(o,s)}async updateTemplate(t,r){let s=T.update.render(t.key);return this.http.putNoContent(s,t,r)}async deleteTemplate(t,r){let s=`${T.delete.render(t.key)}?languageId=${t.languageId}`;return this.http.deleteNoContent(s,r)}};var me=class{constructor(t){g(this,"http");g(this,"graphql");g(this,"agents");g(this,"agentBranches");g(this,"agentRoles");g(this,"agentSetup");g(this,"agentUsers");g(this,"customers");g(this,"vehicles");g(this,"properties");g(this,"policies");g(this,"cases");g(this,"webhooks");g(this,"coverage");g(this,"insurance");g(this,"proposals");g(this,"files");g(this,"languages");g(this,"templates");g(this,"options");this.http=new te(t),this.graphql=new q(this.http),this.options=t||{},this.agents=new b(this.http),this.agentBranches=new G(this.http),this.agentRoles=new w(this.http),this.agentSetup=new F(this.http),this.agentUsers=new B(this.http,this.graphql),this.customers=new M(this.http,this.graphql),this.vehicles=new x(this.http),this.properties=new K(this.http),this.policies=new H(this.http,this.graphql),this.cases=new $(this.http,this.graphql),this.webhooks=new Q(this.http,this.graphql),this.coverage=new V(this.http),this.insurance=new j(this.http),this.proposals=new W(this.http,this.graphql),this.files=new Y(this.http),this.languages=new z(this.http),this.templates=new Z(this.http)}};export{Fe as ALL_AGENT_USER_FIELDS,we as ALL_CASE_FIELDS,_e as ALL_CUSTOMER_FIELDS,Be as ALL_FILE_POLICY_TRANSFER_FIELDS,be as ALL_POLICY_FIELDS,ke as ALL_POLICY_TRANSFER_FIELDS,Ge as ALL_PROPOSAL_FIELDS,Me as ALL_WEBHOOK_DELIVERY_FIELDS,tr as AgentInsuranceCompanyType,nr as AgentUserState,Rt as AracSegment,it as AssetType,or as B2CConfigFieldType,sr as CallCenterImplementation,Wt as CancelCaseSubType,Zt as CaseActivityAction,$t as CaseMainState,Xt as CaseRepresentativeAssignmentMode,Vt as CaseStatus,Qt as CaseSubState,Ht as CaseType,ot as Channel,Yt as ComplaintCaseSubType,Kt as ConsentType,Ft as ContactFlowState,Bt as ContactState,kt as ContactType,ut as Currency,k as CustomerType,$r as DateOnly,Hr as DateTime,me as DefaultInsurUpClient,xt as Disease,_t as EducationStatus,zt as EndorsementCaseSubType,qe as Endpoints,qt as Gender,q as GraphQLTransport,gt as HastaneAgi,G as InsurUpAgentBranchClient,b as InsurUpAgentClient,w as InsurUpAgentRoleClient,F as InsurUpAgentSetupClient,B as InsurUpAgentUserClient,$ as InsurUpCaseClient,J as InsurUpClientErrorType,V as InsurUpCoverageClient,M as InsurUpCustomerClient,P as InsurUpError,Y as InsurUpFileClient,X as InsurUpGraphQLErrorCode,j as InsurUpInsuranceClient,z as InsurUpLanguageClient,H as InsurUpPolicyClient,K as InsurUpPropertyClient,W as InsurUpProposalClient,ie as InsurUpServerErrorType,Z as InsurUpTemplateClient,x as InsurUpVehicleClient,Q as InsurUpWebhookClient,ct as InsuranceProductType,er as InsuranceSyncState,wt as Job,vt as LossPayeeClauseType,Gt as MaritalStatus,bt as Nationality,dt as OnarimServisTuru,pt as PaymentOption,lt as PolicyState,ft as PolicyTransferCompanyFailureReason,yt as PolicyTransferTriggerStatus,at as ProductBranch,Nt as PropertyDamageStatus,Ot as PropertyOwnershipType,At as PropertyStructure,Tt as PropertyUtilizationStyle,ur as ProposalProductState,ar as ProposalState,Jt as RobotMode,It as SaglikPaketiTedaviSekli,jt as SaleOpportunityCaseSubType,rr as SmsImplementation,pr as SortEnumType,Mt as Surgery,ht as TasinanYuk,Et as TransferredPolicyFailureReason,Ut as TransferredPolicySkipReason,Pt as TransferredPolicyStatus,lr as UserType,$e as VERSION,Dt as VehicleAccessoryType,St as VehicleFuelType,Lt as VehicleUtilizationStyle,cr as WebhookDeliveryState,ir as WebhookEvent,mt as YedekParcaTuru,C as buildFieldSelection,le as createGraphQLErrors,We as extractError,Ye as getDataOrThrow,Ze as getGraphQLDataOrThrow,Kr as mergeCoverage,ze as throwIfError,Je as throwIfGraphQLError};
274
+ `,m={first:t?.first,after:t?.after,last:t?.last,before:t?.before,search:t?.search,filter:t?.filter,order:t?.order},o=await this.graphql.query(l,m,r);if(!o.isSuccess)return o;let u=o.data.proposalsNew.edges?.map(d=>d?.node??null)??null;return{...o,data:{...o.data.proposalsNew,nodes:u}}}};var Y=class{constructor(t){this.http=t}async uploadPublicFile(t,r,s,n){let a=new FormData;return a.append("file",r,s),t.path&&a.append("path",t.path),this.http.post(se.uploadPublicFile,a,n)}};var z=class{constructor(t){this.http=t}async getLanguages(t){return this.http.get(ne.getAll,t)}};var Z=class{constructor(t){this.http=t}async getTemplateDefinitions(t){return this.http.get(T.getDefinitions,t)}async getAllTemplates(t){return this.http.get(T.getAll,t)}async getTemplateByKey(t,r,s){let n=`${T.getByKey.render(t)}?languageId=${r}`;return this.http.get(n,s)}async updateTemplate(t,r){let s=T.update.render(t.key);return this.http.putNoContent(s,t,r)}async deleteTemplate(t,r){let s=`${T.delete.render(t.key)}?languageId=${t.languageId}`;return this.http.deleteNoContent(s,r)}};var me=class{constructor(t){g(this,"http");g(this,"graphql");g(this,"agents");g(this,"agentBranches");g(this,"agentRoles");g(this,"agentSetup");g(this,"agentUsers");g(this,"customers");g(this,"vehicles");g(this,"properties");g(this,"policies");g(this,"cases");g(this,"webhooks");g(this,"coverage");g(this,"insurance");g(this,"proposals");g(this,"files");g(this,"languages");g(this,"templates");g(this,"options");this.http=new te(t),this.graphql=new q(this.http),this.options=t||{},this.agents=new b(this.http),this.agentBranches=new G(this.http),this.agentRoles=new F(this.http),this.agentSetup=new w(this.http),this.agentUsers=new B(this.http,this.graphql),this.customers=new M(this.http,this.graphql),this.vehicles=new x(this.http),this.properties=new K(this.http),this.policies=new $(this.http,this.graphql),this.cases=new H(this.http,this.graphql),this.webhooks=new Q(this.http,this.graphql),this.coverage=new V(this.http),this.insurance=new j(this.http),this.proposals=new W(this.http,this.graphql),this.files=new Y(this.http),this.languages=new z(this.http),this.templates=new Z(this.http)}};export{we as ALL_AGENT_USER_FIELDS,Fe as ALL_CASE_FIELDS,_e as ALL_CUSTOMER_FIELDS,Be as ALL_FILE_POLICY_TRANSFER_FIELDS,be as ALL_POLICY_FIELDS,ke as ALL_POLICY_TRANSFER_FIELDS,Ge as ALL_PROPOSAL_FIELDS,Me as ALL_WEBHOOK_DELIVERY_FIELDS,tr as AgentInsuranceCompanyType,nr as AgentUserState,Rt as AracSegment,it as AssetType,or as B2CConfigFieldType,sr as CallCenterImplementation,Wt as CancelCaseSubType,Zt as CaseActivityAction,Ht as CaseMainState,Xt as CaseRepresentativeAssignmentMode,Vt as CaseStatus,Qt as CaseSubState,$t as CaseType,ot as Channel,Yt as ComplaintCaseSubType,Kt as ConsentType,wt as ContactFlowState,Bt as ContactState,kt as ContactType,ut as Currency,k as CustomerType,Hr as DateOnly,$r as DateTime,me as DefaultInsurUpClient,xt as Disease,_t as EducationStatus,zt as EndorsementCaseSubType,qe as Endpoints,qt as Gender,q as GraphQLTransport,gt as HastaneAgi,G as InsurUpAgentBranchClient,b as InsurUpAgentClient,F as InsurUpAgentRoleClient,w as InsurUpAgentSetupClient,B as InsurUpAgentUserClient,H as InsurUpCaseClient,J as InsurUpClientErrorType,V as InsurUpCoverageClient,M as InsurUpCustomerClient,P as InsurUpError,Y as InsurUpFileClient,X as InsurUpGraphQLErrorCode,j as InsurUpInsuranceClient,z as InsurUpLanguageClient,$ as InsurUpPolicyClient,K as InsurUpPropertyClient,W as InsurUpProposalClient,ie as InsurUpServerErrorType,Z as InsurUpTemplateClient,x as InsurUpVehicleClient,Q as InsurUpWebhookClient,ct as InsuranceProductType,er as InsuranceSyncState,Ft as Job,vt as LossPayeeClauseType,Gt as MaritalStatus,bt as Nationality,dt as OnarimServisTuru,pt as PaymentOption,lt as PolicyState,ft as PolicyTransferCompanyFailureReason,yt as PolicyTransferTriggerStatus,at as ProductBranch,Nt as PropertyDamageStatus,Ot as PropertyOwnershipType,At as PropertyStructure,Tt as PropertyUtilizationStyle,ur as ProposalProductState,ar as ProposalState,Jt as RobotMode,It as SaglikPaketiTedaviSekli,jt as SaleOpportunityCaseSubType,rr as SmsImplementation,pr as SortEnumType,Mt as Surgery,ht as TasinanYuk,Et as TransferredPolicyFailureReason,Ut as TransferredPolicySkipReason,Pt as TransferredPolicyStatus,lr as UserType,He as VERSION,Dt as VehicleAccessoryType,St as VehicleFuelType,Lt as VehicleUtilizationStyle,cr as WebhookDeliveryState,ir as WebhookEvent,mt as YedekParcaTuru,C as buildFieldSelection,le as createGraphQLErrors,We as extractError,Ye as getDataOrThrow,Ze as getGraphQLDataOrThrow,Kr as mergeCoverage,ze as throwIfError,Je as throwIfGraphQLError};
275
275
  //# sourceMappingURL=index.browser.js.map