@insurup/sdk 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -7,8 +7,8 @@ var __export = (target, all) => {
7
7
  // package.json
8
8
  var package_default = {
9
9
  name: "@insurup/sdk",
10
- version: "0.1.2",
11
- description: "Type-safe TypeScript SDK for the InsurUp insurance platform with GraphQL support. Zero dependencies, tree-shakeable, works everywhere.",
10
+ version: "0.1.3",
11
+ description: "Type-safe TypeScript SDK for the InsurUp insurance platform with GraphQL support. Tree-shakeable, works everywhere.",
12
12
  keywords: [
13
13
  "insurup",
14
14
  "insurance",
@@ -24,13 +24,13 @@ var package_default = {
24
24
  ],
25
25
  author: "InsurUp Team",
26
26
  license: "MIT",
27
- homepage: "https://github.com/InsurUp/ts-sdk#readme",
27
+ homepage: "https://github.com/InsurUp/ts-toolkit#readme",
28
28
  repository: {
29
29
  type: "git",
30
- url: "git+https://github.com/InsurUp/ts-sdk.git"
30
+ url: "git+https://github.com/InsurUp/ts-toolkit.git"
31
31
  },
32
32
  bugs: {
33
- url: "https://github.com/InsurUp/ts-sdk/issues"
33
+ url: "https://github.com/InsurUp/ts-toolkit/issues"
34
34
  },
35
35
  engines: {
36
36
  node: ">=18"
@@ -48,6 +48,10 @@ var package_default = {
48
48
  types: "./dist/index.d.ts",
49
49
  import: "./dist/index.js",
50
50
  require: "./dist/index.cjs"
51
+ },
52
+ "./browser": {
53
+ types: "./dist/index.d.ts",
54
+ import: "./dist/index.browser.js"
51
55
  }
52
56
  },
53
57
  scripts: {
@@ -61,6 +65,9 @@ var package_default = {
61
65
  "test:watch": "vitest",
62
66
  "test:coverage": "vitest run --coverage"
63
67
  },
68
+ publishConfig: {
69
+ access: "public"
70
+ },
64
71
  devDependencies: {
65
72
  "@eslint/js": "^9.39.2",
66
73
  "@vitest/coverage-v8": "^4.0.17",
@@ -75,7 +82,9 @@ var package_default = {
75
82
  "typescript-eslint": "^8.53.1",
76
83
  vitest: "^4.0.17"
77
84
  },
78
- dependencies: {}
85
+ dependencies: {
86
+ "@insurup/contracts": "workspace:*"
87
+ }
79
88
  };
80
89
 
81
90
  // src/version.ts
@@ -109,6 +118,21 @@ var InsurUpServerErrorType = /* @__PURE__ */ ((InsurUpServerErrorType2) => {
109
118
  InsurUpServerErrorType2["Upstream"] = "Upstream";
110
119
  return InsurUpServerErrorType2;
111
120
  })(InsurUpServerErrorType || {});
121
+ var InsurUpGraphQLErrorCode = /* @__PURE__ */ ((InsurUpGraphQLErrorCode2) => {
122
+ InsurUpGraphQLErrorCode2["Forbidden"] = "FORBIDDEN";
123
+ InsurUpGraphQLErrorCode2["Unauthorized"] = "UNAUTHORIZED";
124
+ InsurUpGraphQLErrorCode2["NotFound"] = "NOT_FOUND";
125
+ InsurUpGraphQLErrorCode2["BadRequest"] = "BAD_REQUEST";
126
+ InsurUpGraphQLErrorCode2["Conflict"] = "CONFLICT";
127
+ InsurUpGraphQLErrorCode2["NotSupported"] = "NOT_SUPPORTED";
128
+ InsurUpGraphQLErrorCode2["UpstreamError"] = "UPSTREAM_ERROR";
129
+ InsurUpGraphQLErrorCode2["InternalError"] = "INTERNAL_ERROR";
130
+ InsurUpGraphQLErrorCode2["ValidationError"] = "VALIDATION_ERROR";
131
+ InsurUpGraphQLErrorCode2["FilterRequired"] = "FILTER_REQUIRED";
132
+ InsurUpGraphQLErrorCode2["FilterMaxSpanExceeded"] = "FILTER_MAX_SPAN_EXCEEDED";
133
+ InsurUpGraphQLErrorCode2["Unknown"] = "UNKNOWN";
134
+ return InsurUpGraphQLErrorCode2;
135
+ })(InsurUpGraphQLErrorCode || {});
112
136
 
113
137
  // src/core/errors.ts
114
138
  var ERROR_TYPE_URLS = {
@@ -248,7 +272,7 @@ function extractError(error) {
248
272
  }
249
273
  var InsurUpError = class extends Error {
250
274
  /**
251
- * The original client or server error object
275
+ * The original client, server, or GraphQL error object
252
276
  */
253
277
  error;
254
278
  constructor(error) {
@@ -286,6 +310,26 @@ function throwIfError(result) {
286
310
  }
287
311
  throw new InsurUpError(result);
288
312
  }
313
+ function getGraphQLDataOrThrow(result) {
314
+ if (result.isSuccess) {
315
+ return result.data;
316
+ }
317
+ throw new InsurUpError(result);
318
+ }
319
+ function throwIfGraphQLError(result) {
320
+ if (result.isSuccess) {
321
+ return;
322
+ }
323
+ throw new InsurUpError(result);
324
+ }
325
+ function createGraphQLErrors(errors) {
326
+ return {
327
+ kind: "graphql-error",
328
+ isSuccess: false,
329
+ message: errors[0]?.message ?? "Unknown GraphQL error",
330
+ errors
331
+ };
332
+ }
289
333
 
290
334
  // src/core/config.ts
291
335
  var DEFAULT_RETRY_OPTIONS = {
@@ -844,7 +888,8 @@ var HttpTransport = class {
844
888
  ...this.options.customHeaders,
845
889
  ...additionalHeaders
846
890
  };
847
- if (typeof window === "undefined" && this.options.userAgent) {
891
+ const isBrowser = typeof globalThis === "object" && "window" in globalThis;
892
+ if (!isBrowser && this.options.userAgent) {
848
893
  headers["User-Agent"] = this.options.userAgent;
849
894
  }
850
895
  if (this.options.tokenProvider) {
@@ -1122,6 +1167,69 @@ var HttpTransport = class {
1122
1167
  };
1123
1168
 
1124
1169
  // src/client/graphql.ts
1170
+ function mapGraphQLErrorCode(code) {
1171
+ if (typeof code !== "string") {
1172
+ return "UNKNOWN" /* Unknown */;
1173
+ }
1174
+ const upperCode = code.toUpperCase();
1175
+ switch (upperCode) {
1176
+ case "FORBIDDEN":
1177
+ return "FORBIDDEN" /* Forbidden */;
1178
+ case "UNAUTHORIZED":
1179
+ return "UNAUTHORIZED" /* Unauthorized */;
1180
+ case "NOT_FOUND":
1181
+ return "NOT_FOUND" /* NotFound */;
1182
+ case "BAD_REQUEST":
1183
+ return "BAD_REQUEST" /* BadRequest */;
1184
+ case "CONFLICT":
1185
+ return "CONFLICT" /* Conflict */;
1186
+ case "NOT_SUPPORTED":
1187
+ return "NOT_SUPPORTED" /* NotSupported */;
1188
+ case "UPSTREAM_ERROR":
1189
+ return "UPSTREAM_ERROR" /* UpstreamError */;
1190
+ case "INTERNAL_ERROR":
1191
+ return "INTERNAL_ERROR" /* InternalError */;
1192
+ case "VALIDATION_ERROR":
1193
+ return "VALIDATION_ERROR" /* ValidationError */;
1194
+ case "FILTER_REQUIRED":
1195
+ return "FILTER_REQUIRED" /* FilterRequired */;
1196
+ case "FILTER_MAX_SPAN_EXCEEDED":
1197
+ return "FILTER_MAX_SPAN_EXCEEDED" /* FilterMaxSpanExceeded */;
1198
+ default:
1199
+ return "UNKNOWN" /* Unknown */;
1200
+ }
1201
+ }
1202
+ function parseExtensions(raw) {
1203
+ if (!raw) {
1204
+ return void 0;
1205
+ }
1206
+ const extensions = {
1207
+ ...raw,
1208
+ code: mapGraphQLErrorCode(raw.code),
1209
+ traceId: typeof raw.traceId === "string" ? raw.traceId : void 0,
1210
+ codes: Array.isArray(raw.codes) ? raw.codes.filter((c) => typeof c === "string") : void 0,
1211
+ template: typeof raw.template === "string" ? raw.template : void 0,
1212
+ templateArgs: typeof raw.templateArgs === "object" && raw.templateArgs !== null ? raw.templateArgs : void 0,
1213
+ suggestions: Array.isArray(raw.suggestions) ? raw.suggestions.filter((s) => typeof s === "string") : void 0
1214
+ };
1215
+ return extensions;
1216
+ }
1217
+ function parseGraphQLErrors(rawErrors) {
1218
+ return rawErrors.map((error) => {
1219
+ const locations = error.locations?.map(
1220
+ (loc) => ({
1221
+ line: loc.line,
1222
+ column: loc.column
1223
+ })
1224
+ );
1225
+ return {
1226
+ message: error.message,
1227
+ locations,
1228
+ path: error.path,
1229
+ extensions: parseExtensions(error.extensions)
1230
+ };
1231
+ });
1232
+ }
1125
1233
  var GraphQLTransport = class {
1126
1234
  constructor(http) {
1127
1235
  this.http = http;
@@ -1131,7 +1239,7 @@ var GraphQLTransport = class {
1131
1239
  * @param query The GraphQL query string
1132
1240
  * @param variables Optional variables for the query
1133
1241
  * @param options Optional request options
1134
- * @returns Promise resolving to InsurUpResult<T>
1242
+ * @returns Promise resolving to InsurUpGraphQLResult<T>
1135
1243
  */
1136
1244
  async query(query, variables, options) {
1137
1245
  const payload = {
@@ -1148,15 +1256,8 @@ var GraphQLTransport = class {
1148
1256
  }
1149
1257
  const response = result.data;
1150
1258
  if (response.errors && response.errors.length > 0) {
1151
- const firstError = response.errors[0];
1152
- const clientError = {
1153
- kind: "client-error",
1154
- isSuccess: false,
1155
- message: firstError.message,
1156
- type: "Unknown" /* Unknown */,
1157
- error: response.errors
1158
- };
1159
- return clientError;
1259
+ const parsedErrors = parseGraphQLErrors(response.errors);
1260
+ return createGraphQLErrors(parsedErrors);
1160
1261
  }
1161
1262
  if (!response.data) {
1162
1263
  return createDeserializationError(
@@ -2447,155 +2548,11 @@ var InsurUpAgentSetupClient = class {
2447
2548
  }
2448
2549
  };
2449
2550
 
2450
- // src/contracts/graphql/agentUsers.ts
2451
- var ALL_AGENT_USER_FIELDS = [
2452
- // Primitive fields
2453
- "id",
2454
- "email",
2455
- "firstName",
2456
- "lastName",
2457
- "name",
2458
- "phoneNumber",
2459
- "phoneNumberCountryCode",
2460
- "state",
2461
- "createdAt",
2462
- "lastLoginAt",
2463
- // Nested roles fields
2464
- "roles.id",
2465
- "roles.name",
2466
- "roles.isAdmin",
2467
- // Nested branches fields
2468
- "branches.id",
2469
- "branches.name",
2470
- "branches.parentId",
2471
- "branches.parentName",
2472
- "branches.level",
2473
- "branches.hierarchy"
2474
- ];
2475
-
2476
- // src/contracts/common.date.ts
2477
- var DateTime = class _DateTime {
2478
- _value;
2479
- constructor(value) {
2480
- this._value = typeof value === "string" ? new Date(value) : value;
2481
- }
2482
- /** Creates DateTime from a native Date object */
2483
- static fromDate(date) {
2484
- return new _DateTime(date);
2485
- }
2486
- /** Creates DateTime from current time */
2487
- static now() {
2488
- return new _DateTime(/* @__PURE__ */ new Date());
2489
- }
2490
- /** Returns the native Date object */
2491
- toDate() {
2492
- return this._value;
2493
- }
2494
- /** Returns ISO 8601 string representation */
2495
- toISOString() {
2496
- return this._value.toISOString();
2497
- }
2498
- /** Returns ISO 8601 string (for JSON serialization) */
2499
- toJSON() {
2500
- return this.toISOString();
2501
- }
2502
- /** Returns ISO 8601 string */
2503
- toString() {
2504
- return this.toISOString();
2505
- }
2506
- /** Returns timestamp in milliseconds */
2507
- valueOf() {
2508
- return this._value.valueOf();
2509
- }
2510
- };
2511
- var DateOnly = class _DateOnly {
2512
- _year;
2513
- _month;
2514
- _day;
2515
- constructor(value) {
2516
- if (typeof value === "string") {
2517
- const parts = value.split("-").map(Number);
2518
- this._year = parts[0] ?? 0;
2519
- this._month = parts[1] ?? 1;
2520
- this._day = parts[2] ?? 1;
2521
- } else {
2522
- this._year = value.getUTCFullYear();
2523
- this._month = value.getUTCMonth() + 1;
2524
- this._day = value.getUTCDate();
2525
- }
2526
- }
2527
- /** Creates DateOnly from a native Date object */
2528
- static fromDate(date) {
2529
- return new _DateOnly(date);
2530
- }
2531
- /** Creates DateOnly from current date */
2532
- static today() {
2533
- return new _DateOnly(/* @__PURE__ */ new Date());
2534
- }
2535
- /** Returns the native Date object (at midnight UTC) */
2536
- toDate() {
2537
- return new Date(Date.UTC(this._year, this._month - 1, this._day));
2538
- }
2539
- /** Returns YYYY-MM-DD string representation */
2540
- toString() {
2541
- const y = this._year.toString().padStart(4, "0");
2542
- const m = this._month.toString().padStart(2, "0");
2543
- const d = this._day.toString().padStart(2, "0");
2544
- return `${y}-${m}-${d}`;
2545
- }
2546
- /** Returns YYYY-MM-DD string (for JSON serialization) */
2547
- toJSON() {
2548
- return this.toString();
2549
- }
2550
- /** Returns timestamp in milliseconds */
2551
- valueOf() {
2552
- return this.toDate().valueOf();
2553
- }
2554
- /** Gets the year */
2555
- get year() {
2556
- return this._year;
2557
- }
2558
- /** Gets the month (1-12) */
2559
- get month() {
2560
- return this._month;
2561
- }
2562
- /** Gets the day (1-31) */
2563
- get day() {
2564
- return this._day;
2565
- }
2566
- };
2567
-
2568
- // src/contracts/graphql/common.ts
2569
- var SortEnumType = /* @__PURE__ */ ((SortEnumType2) => {
2570
- SortEnumType2["ASC"] = "ASC";
2571
- SortEnumType2["DESC"] = "DESC";
2572
- return SortEnumType2;
2573
- })(SortEnumType || {});
2574
- function buildFieldSelection(fields, indent = " ") {
2575
- const simpleFields = [];
2576
- const nestedFields = /* @__PURE__ */ new Map();
2577
- for (const field of fields) {
2578
- const dotIndex = field.indexOf(".");
2579
- if (dotIndex !== -1) {
2580
- const parent = field.slice(0, dotIndex);
2581
- const nested = field.slice(dotIndex + 1);
2582
- if (!nestedFields.has(parent)) {
2583
- nestedFields.set(parent, []);
2584
- }
2585
- nestedFields.get(parent).push(nested);
2586
- } else {
2587
- simpleFields.push(field);
2588
- }
2589
- }
2590
- const selections = [...simpleFields];
2591
- for (const [parent, nestedKeys] of nestedFields) {
2592
- selections.push(`${parent} { ${nestedKeys.join(" ")} }`);
2593
- }
2594
- return selections.join(`
2595
- ${indent}`);
2596
- }
2597
-
2598
2551
  // src/clients/agentUser.ts
2552
+ import {
2553
+ ALL_AGENT_USER_FIELDS
2554
+ } from "@insurup/contracts";
2555
+ import { buildFieldSelection } from "@insurup/contracts";
2599
2556
  var InsurUpAgentUserClient = class {
2600
2557
  constructor(http, graphql) {
2601
2558
  this.http = http;
@@ -2805,7 +2762,7 @@ var InsurUpAgentUserClient = class {
2805
2762
  * @param requestOptions Query options including pagination, filters, search, and field selection
2806
2763
  * @returns Paginated connection of agent users with type-narrowed fields
2807
2764
  */
2808
- async getAgentUsers(requestOptions) {
2765
+ async getAgentUsers(requestOptions, options) {
2809
2766
  if (!this.graphql) {
2810
2767
  throw new Error(
2811
2768
  "GraphQL transport is not available. Ensure the client is properly initialized."
@@ -2845,9 +2802,6 @@ var InsurUpAgentUserClient = class {
2845
2802
  ${fieldSelection}
2846
2803
  }
2847
2804
  }
2848
- nodes {
2849
- ${fieldSelection}
2850
- }
2851
2805
  }
2852
2806
  }
2853
2807
  `;
@@ -2860,53 +2814,28 @@ var InsurUpAgentUserClient = class {
2860
2814
  filter: requestOptions?.filter,
2861
2815
  order: requestOptions?.order
2862
2816
  };
2863
- const result = await this.graphql.query(query, variables);
2817
+ const result = await this.graphql.query(query, variables, options);
2864
2818
  if (!result.isSuccess) {
2865
2819
  return result;
2866
2820
  }
2821
+ const edges = result.data.agentUsersNew.edges;
2822
+ const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;
2867
2823
  return {
2868
2824
  ...result,
2869
- data: result.data.agentUsersNew
2825
+ data: {
2826
+ ...result.data.agentUsersNew,
2827
+ nodes
2828
+ }
2870
2829
  };
2871
2830
  }
2872
2831
  };
2873
2832
 
2874
- // src/contracts/graphql/customers.ts
2875
- var ALL_CUSTOMER_FIELDS = [
2876
- // Primitive fields
2877
- "agentBranchId",
2878
- "id",
2879
- "name",
2880
- "identityNumber",
2881
- "taxNumber",
2882
- "type",
2883
- "primaryEmail",
2884
- "primaryPhoneNumber",
2885
- "primaryPhoneNumberCountryCode",
2886
- "cityText",
2887
- "cityValue",
2888
- "districtText",
2889
- "districtValue",
2890
- "createdAt",
2891
- "birthDate",
2892
- "gender",
2893
- "educationStatus",
2894
- "nationality",
2895
- "maritalStatus",
2896
- "job",
2897
- "passportNumber",
2898
- "searchScore",
2899
- // Nested agentBranch fields
2900
- "agentBranch.id",
2901
- "agentBranch.name",
2902
- "agentBranch.parentId",
2903
- "agentBranch.parentName",
2904
- // Nested consents fields
2905
- "consents.consentType",
2906
- "consents.isActive"
2907
- ];
2908
-
2909
2833
  // src/clients/customer.ts
2834
+ import {
2835
+ ALL_CUSTOMER_FIELDS,
2836
+ CustomerType
2837
+ } from "@insurup/contracts";
2838
+ import { buildFieldSelection as buildFieldSelection2 } from "@insurup/contracts";
2910
2839
  var InsurUpCustomerClient = class {
2911
2840
  constructor(http, graphql) {
2912
2841
  this.http = http;
@@ -2916,9 +2845,22 @@ var InsurUpCustomerClient = class {
2916
2845
  * Creates a new customer profile with essential personal and contact information.
2917
2846
  */
2918
2847
  async createCustomer(request, options) {
2848
+ const { type, ...rest } = request;
2849
+ let $type;
2850
+ switch (type) {
2851
+ case CustomerType.Individual:
2852
+ $type = "individual";
2853
+ break;
2854
+ case CustomerType.Company:
2855
+ $type = "company";
2856
+ break;
2857
+ case CustomerType.Foreign:
2858
+ $type = "foreign";
2859
+ break;
2860
+ }
2919
2861
  return this.http.post(
2920
2862
  endpoints.customers.createCustomer,
2921
- request,
2863
+ { $type, ...rest },
2922
2864
  options
2923
2865
  );
2924
2866
  }
@@ -3308,23 +3250,24 @@ var InsurUpCustomerClient = class {
3308
3250
  * @param requestOptions Query options including pagination, filters, search, and field selection
3309
3251
  * @returns Paginated connection of customers with type-narrowed fields
3310
3252
  */
3311
- async getCustomers(requestOptions) {
3253
+ async getCustomers(requestOptions, options) {
3312
3254
  if (!this.graphql) {
3313
3255
  throw new Error(
3314
3256
  "GraphQL transport is not available. Ensure the client is properly initialized."
3315
3257
  );
3316
3258
  }
3317
3259
  const fields = requestOptions?.select ?? ALL_CUSTOMER_FIELDS;
3318
- const fieldSelection = buildFieldSelection(fields);
3260
+ const fieldSelection = buildFieldSelection2(fields);
3261
+ const includeTotalCount = requestOptions?.includeTotalCount !== false;
3319
3262
  const query = `
3320
3263
  query GetCustomers(
3321
3264
  $first: Int
3322
3265
  $after: String
3323
3266
  $last: Int
3324
3267
  $before: String
3325
- $search: QueryCustomerModelSearchInput
3326
- $filter: QueryCustomerModelFilterInput
3327
- $order: [QueryCustomerModelSortInput!]
3268
+ $search: searching_QueryCustomerModelFilterInput
3269
+ $filter: filtering_QueryCustomerModelFilterInput
3270
+ $order: [sorting_QueryCustomerModelSortInput!]
3328
3271
  ) {
3329
3272
  customersNew(
3330
3273
  first: $first
@@ -3332,7 +3275,7 @@ var InsurUpCustomerClient = class {
3332
3275
  last: $last
3333
3276
  before: $before
3334
3277
  search: $search
3335
- where: $filter
3278
+ filter: $filter
3336
3279
  order: $order
3337
3280
  ) {
3338
3281
  pageInfo {
@@ -3341,7 +3284,7 @@ var InsurUpCustomerClient = class {
3341
3284
  startCursor
3342
3285
  endCursor
3343
3286
  }
3344
- totalCount
3287
+ ${includeTotalCount ? "totalCount" : ""}
3345
3288
  edges {
3346
3289
  cursor
3347
3290
  node {
@@ -3370,7 +3313,7 @@ var InsurUpCustomerClient = class {
3370
3313
  variables.filter = requestOptions.filter;
3371
3314
  if (requestOptions?.order !== void 0)
3372
3315
  variables.order = requestOptions.order;
3373
- const result = await this.graphql.query(query, variables);
3316
+ const result = await this.graphql.query(query, variables, options);
3374
3317
  if (!result.isSuccess) {
3375
3318
  return result;
3376
3319
  }
@@ -3724,121 +3667,17 @@ var InsurUpPropertyClient = class {
3724
3667
  }
3725
3668
  };
3726
3669
 
3727
- // src/contracts/graphql/policies.ts
3728
- var UserType = /* @__PURE__ */ ((UserType2) => {
3729
- UserType2["None"] = "NONE";
3730
- UserType2["AdminPanel"] = "ADMIN_PANEL";
3731
- UserType2["Agent"] = "AGENT";
3732
- UserType2["Customer"] = "CUSTOMER";
3733
- return UserType2;
3734
- })(UserType || {});
3735
- var ALL_POLICY_FIELDS = [
3736
- // Primitive fields
3737
- "agentBranchId",
3738
- "id",
3739
- "insurerCustomerId",
3740
- "insuredCustomerId",
3741
- "installmentNumber",
3742
- "productBranch",
3743
- "netPremium",
3744
- "grossPremium",
3745
- "commission",
3746
- "paymentType",
3747
- "currency",
3748
- "insuranceCompanyProposalNumber",
3749
- "insuranceCompanyPolicyNumber",
3750
- "createdAt",
3751
- "startDate",
3752
- "endDate",
3753
- "arrangementDate",
3754
- "insuredCustomerName",
3755
- "insuredCustomerIdentityNumber",
3756
- "insuredCustomerTaxNumber",
3757
- "insuredCustomerType",
3758
- "insuredCustomerCityText",
3759
- "insuredCustomerCityValue",
3760
- "insuredCustomerDistrictText",
3761
- "insuredCustomerDistrictValue",
3762
- "insuredCustomerBirthDate",
3763
- "insurerCustomerName",
3764
- "insurerCustomerIdentityNumber",
3765
- "insurerCustomerTaxNumber",
3766
- "insurerCustomerCityText",
3767
- "insurerCustomerCityValue",
3768
- "insurerCustomerDistrictText",
3769
- "insurerCustomerDistrictValue",
3770
- "insurerCustomerBirthDate",
3771
- "vehiclePlateCode",
3772
- "vehiclePlateCity",
3773
- "vehicleDocumentSerialCode",
3774
- "vehicleDocumentSerialNumber",
3775
- "vehicleModelBrandText",
3776
- "vehicleModelBrandValue",
3777
- "vehicleModelTypeText",
3778
- "vehicleModelTypeValue",
3779
- "vehicleModelYear",
3780
- "vehicleFuelType",
3781
- "productId",
3782
- "productName",
3783
- "insuranceCompanyId",
3784
- "insuranceCompanyName",
3785
- "insuranceCompanyLogo",
3786
- "state",
3787
- "propertyNumber",
3788
- "daskOldPolicyNumber",
3789
- "daskPolicyNumber",
3790
- "vehicleId",
3791
- "propertyId",
3792
- "channel",
3793
- "campaign",
3794
- // Nested agentBranch fields
3795
- "agentBranch.id",
3796
- "agentBranch.name",
3797
- "agentBranch.parentId",
3798
- "agentBranch.parentName",
3799
- // Nested createdBy fields
3800
- "createdBy.id",
3801
- "createdBy.name",
3802
- "createdBy.email",
3803
- "createdBy.userType",
3804
- // Nested representedBy fields
3805
- "representedBy.id",
3806
- "representedBy.name",
3807
- "representedBy.email",
3808
- "representedBy.userType"
3809
- ];
3810
-
3811
- // src/contracts/graphql/policyTransfers.ts
3812
- var ALL_POLICY_TRANSFER_FIELDS = [
3813
- "id",
3814
- "startDate",
3815
- "endDate",
3816
- "insuranceCompanyCount",
3817
- "policyTransferTriggerCount",
3818
- "policyCount"
3819
- ];
3820
-
3821
- // src/contracts/graphql/filePolicyTransfers.ts
3822
- var ALL_FILE_POLICY_TRANSFER_FIELDS = [
3823
- // Primitive fields
3824
- "id",
3825
- "insuranceCompanyId",
3826
- "insuranceCompanyName",
3827
- "insuranceCompanyLogo",
3828
- "fileName",
3829
- "fileUrl",
3830
- "createdAt",
3831
- "totalPolicyCount",
3832
- "completedPolicyCount",
3833
- "failedPolicyCount",
3834
- // Nested createdBy fields
3835
- "createdBy.id",
3836
- "createdBy.name",
3837
- "createdBy.email",
3838
- "createdBy.userType"
3839
- ];
3840
-
3841
3670
  // src/clients/policy.ts
3671
+ import {
3672
+ ALL_POLICY_FIELDS
3673
+ } from "@insurup/contracts";
3674
+ import {
3675
+ ALL_POLICY_TRANSFER_FIELDS
3676
+ } from "@insurup/contracts";
3677
+ import {
3678
+ ALL_FILE_POLICY_TRANSFER_FIELDS
3679
+ } from "@insurup/contracts";
3680
+ import { buildFieldSelection as buildFieldSelection3 } from "@insurup/contracts";
3842
3681
  var InsurUpPolicyClient = class {
3843
3682
  constructor(http, graphql) {
3844
3683
  this.http = http;
@@ -4144,14 +3983,15 @@ var InsurUpPolicyClient = class {
4144
3983
  * @param requestOptions Query options including pagination, filters, search, and field selection
4145
3984
  * @returns Paginated connection of policies with type-narrowed fields
4146
3985
  */
4147
- async getPolicies(requestOptions) {
3986
+ async getPolicies(requestOptions, options) {
4148
3987
  if (!this.graphql) {
4149
3988
  throw new Error(
4150
3989
  "GraphQL transport is not available. Ensure the client is properly initialized."
4151
3990
  );
4152
3991
  }
4153
3992
  const fields = requestOptions?.select ?? ALL_POLICY_FIELDS;
4154
- const fieldSelection = buildFieldSelection(fields);
3993
+ const fieldSelection = buildFieldSelection3(fields);
3994
+ const includeTotalCount = requestOptions?.includeTotalCount !== false;
4155
3995
  const query = `
4156
3996
  query GetPolicies(
4157
3997
  $first: Int
@@ -4177,16 +4017,13 @@ var InsurUpPolicyClient = class {
4177
4017
  startCursor
4178
4018
  endCursor
4179
4019
  }
4180
- totalCount
4020
+ ${includeTotalCount ? "totalCount" : ""}
4181
4021
  edges {
4182
4022
  cursor
4183
4023
  node {
4184
4024
  ${fieldSelection}
4185
4025
  }
4186
4026
  }
4187
- nodes {
4188
- ${fieldSelection}
4189
- }
4190
4027
  }
4191
4028
  }
4192
4029
  `;
@@ -4199,13 +4036,18 @@ var InsurUpPolicyClient = class {
4199
4036
  filter: requestOptions?.filter,
4200
4037
  order: requestOptions?.order
4201
4038
  };
4202
- const result = await this.graphql.query(query, variables);
4039
+ const result = await this.graphql.query(query, variables, options);
4203
4040
  if (!result.isSuccess) {
4204
4041
  return result;
4205
4042
  }
4043
+ const edges = result.data.policiesNew.edges;
4044
+ const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;
4206
4045
  return {
4207
4046
  ...result,
4208
- data: result.data.policiesNew
4047
+ data: {
4048
+ ...result.data.policiesNew,
4049
+ nodes
4050
+ }
4209
4051
  };
4210
4052
  }
4211
4053
  /**
@@ -4222,14 +4064,14 @@ var InsurUpPolicyClient = class {
4222
4064
  * @param requestOptions Query options including pagination, filters, search, and field selection
4223
4065
  * @returns Paginated connection of policy transfers with type-narrowed fields
4224
4066
  */
4225
- async getPolicyTransfers(requestOptions) {
4067
+ async getPolicyTransfers(requestOptions, options) {
4226
4068
  if (!this.graphql) {
4227
4069
  throw new Error(
4228
4070
  "GraphQL transport is not available. Ensure the client is properly initialized."
4229
4071
  );
4230
4072
  }
4231
4073
  const fields = requestOptions?.select ?? ALL_POLICY_TRANSFER_FIELDS;
4232
- const fieldSelection = buildFieldSelection(fields);
4074
+ const fieldSelection = buildFieldSelection3(fields);
4233
4075
  const query = `
4234
4076
  query GetPolicyTransfers(
4235
4077
  $first: Int
@@ -4262,9 +4104,6 @@ var InsurUpPolicyClient = class {
4262
4104
  ${fieldSelection}
4263
4105
  }
4264
4106
  }
4265
- nodes {
4266
- ${fieldSelection}
4267
- }
4268
4107
  }
4269
4108
  }
4270
4109
  `;
@@ -4277,13 +4116,18 @@ var InsurUpPolicyClient = class {
4277
4116
  filter: requestOptions?.filter,
4278
4117
  order: requestOptions?.order
4279
4118
  };
4280
- const result = await this.graphql.query(query, variables);
4119
+ const result = await this.graphql.query(query, variables, options);
4281
4120
  if (!result.isSuccess) {
4282
4121
  return result;
4283
4122
  }
4123
+ const edges = result.data.policyTransfersNew.edges;
4124
+ const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;
4284
4125
  return {
4285
4126
  ...result,
4286
- data: result.data.policyTransfersNew
4127
+ data: {
4128
+ ...result.data.policyTransfersNew,
4129
+ nodes
4130
+ }
4287
4131
  };
4288
4132
  }
4289
4133
  /**
@@ -4300,14 +4144,14 @@ var InsurUpPolicyClient = class {
4300
4144
  * @param requestOptions Query options including pagination, filters, search, and field selection
4301
4145
  * @returns Paginated connection of file policy transfers with type-narrowed fields
4302
4146
  */
4303
- async getFilePolicyTransfers(requestOptions) {
4147
+ async getFilePolicyTransfers(requestOptions, options) {
4304
4148
  if (!this.graphql) {
4305
4149
  throw new Error(
4306
4150
  "GraphQL transport is not available. Ensure the client is properly initialized."
4307
4151
  );
4308
4152
  }
4309
4153
  const fields = requestOptions?.select ?? ALL_FILE_POLICY_TRANSFER_FIELDS;
4310
- const fieldSelection = buildFieldSelection(fields);
4154
+ const fieldSelection = buildFieldSelection3(fields);
4311
4155
  const query = `
4312
4156
  query GetFilePolicyTransfers(
4313
4157
  $first: Int
@@ -4340,9 +4184,6 @@ var InsurUpPolicyClient = class {
4340
4184
  ${fieldSelection}
4341
4185
  }
4342
4186
  }
4343
- nodes {
4344
- ${fieldSelection}
4345
- }
4346
4187
  }
4347
4188
  }
4348
4189
  `;
@@ -4355,110 +4196,27 @@ var InsurUpPolicyClient = class {
4355
4196
  filter: requestOptions?.filter,
4356
4197
  order: requestOptions?.order
4357
4198
  };
4358
- const result = await this.graphql.query(query, variables);
4199
+ const result = await this.graphql.query(query, variables, options);
4359
4200
  if (!result.isSuccess) {
4360
4201
  return result;
4361
4202
  }
4203
+ const edges = result.data.filePolicyTransfersNew.edges;
4204
+ const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;
4362
4205
  return {
4363
4206
  ...result,
4364
- data: result.data.filePolicyTransfersNew
4207
+ data: {
4208
+ ...result.data.filePolicyTransfersNew,
4209
+ nodes
4210
+ }
4365
4211
  };
4366
4212
  }
4367
4213
  };
4368
4214
 
4369
- // src/contracts/graphql/cases.ts
4370
- var ALL_CASE_FIELDS = [
4371
- // Primitive fields
4372
- "agentBranchId",
4373
- "id",
4374
- "ref",
4375
- "type",
4376
- "status",
4377
- "cancelSubType",
4378
- "saleOpportunitySubType",
4379
- "endorsementSubType",
4380
- "complaintSubType",
4381
- "mainState",
4382
- "subState",
4383
- "productBranch",
4384
- "channel",
4385
- "createdAt",
4386
- "createdByName",
4387
- "createdById",
4388
- "createdByEmail",
4389
- "createdByType",
4390
- "representedByName",
4391
- "representedById",
4392
- "representedByEmail",
4393
- "representedByType",
4394
- "policyEndDate",
4395
- "assetType",
4396
- "assetId",
4397
- "sourceCaseId",
4398
- "policyCount",
4399
- "proposalCount",
4400
- "lastProposalDate",
4401
- "lastPolicyDate",
4402
- "lastUpdateDate",
4403
- "lastUpdatedByName",
4404
- "lastUpdatedById",
4405
- "lastUpdatedByEmail",
4406
- "lastUpdatedByType",
4407
- "priorityScore",
4408
- "customerId",
4409
- "customerName",
4410
- "customerType",
4411
- "customerIdentity",
4412
- "customerCityText",
4413
- "customerCityValue",
4414
- "customerDistrictText",
4415
- "customerDistrictValue",
4416
- "customerPrimaryPhoneNumber",
4417
- "customerPrimaryPhoneCountryCode",
4418
- "customerPrimaryEmail",
4419
- "customerBirthDate",
4420
- "customerPassportNumber",
4421
- "customerJob",
4422
- "vehiclePlateCode",
4423
- "vehiclePlateCity",
4424
- "vehicleModelBrandText",
4425
- "vehicleModelBrandValue",
4426
- "vehicleModelTypeText",
4427
- "vehicleModelTypeValue",
4428
- "vehicleModelYear",
4429
- "vehicleUtilizationStyle",
4430
- "vehicleEngineNumber",
4431
- "vehicleChassisNumber",
4432
- "vehicleRegistrationDate",
4433
- "vehicleFuelType",
4434
- "vehicleSeatNumber",
4435
- "vehicleDocumentSerialCode",
4436
- "vehicleDocumentSerialNumber",
4437
- "propertyNumber",
4438
- "propertySquareMeter",
4439
- "propertyConstructionYear",
4440
- "propertyDamageStatus",
4441
- "propertyFloorNumber",
4442
- "propertyStructure",
4443
- "propertyUtilizationStyle",
4444
- "propertyOwnershipType",
4445
- "propertyDaskPolicyNumber",
4446
- "advertisingSource",
4447
- "advertisingCampaign",
4448
- "searchScore",
4449
- // Nested agentBranch fields
4450
- "agentBranch.id",
4451
- "agentBranch.name",
4452
- "agentBranch.parentId",
4453
- "agentBranch.parentName",
4454
- // Nested priorityRuleHits fields
4455
- "priorityRuleHits.label",
4456
- "priorityRuleHits.description",
4457
- "priorityRuleHits.ruleName",
4458
- "priorityRuleHits.score"
4459
- ];
4460
-
4461
4215
  // src/clients/case.ts
4216
+ import {
4217
+ ALL_CASE_FIELDS
4218
+ } from "@insurup/contracts";
4219
+ import { buildFieldSelection as buildFieldSelection4 } from "@insurup/contracts";
4462
4220
  var InsurUpCaseClient = class {
4463
4221
  constructor(http, graphql) {
4464
4222
  this.http = http;
@@ -4664,8 +4422,9 @@ var InsurUpCaseClient = class {
4664
4422
  * @returns Funnel analytics response / Huni analitiği yanıtı
4665
4423
  */
4666
4424
  async getSalesOpportunityFunnelAnalytics(request, options) {
4667
- return await this.http.get(
4425
+ return await this.http.post(
4668
4426
  cases.getSalesOpportunityFunnelAnalytics.definition,
4427
+ request,
4669
4428
  options
4670
4429
  );
4671
4430
  }
@@ -4750,14 +4509,14 @@ var InsurUpCaseClient = class {
4750
4509
  * @param requestOptions Query options including pagination, filters, search, and field selection
4751
4510
  * @returns Paginated connection of cases with type-narrowed fields
4752
4511
  */
4753
- async getCases(requestOptions) {
4512
+ async getCases(requestOptions, options) {
4754
4513
  if (!this.graphql) {
4755
4514
  throw new Error(
4756
4515
  "GraphQL transport is not available. Ensure the client is properly initialized."
4757
4516
  );
4758
4517
  }
4759
4518
  const fields = requestOptions?.select ?? ALL_CASE_FIELDS;
4760
- const fieldSelection = buildFieldSelection(fields);
4519
+ const fieldSelection = buildFieldSelection4(fields);
4761
4520
  const query = `
4762
4521
  query GetCases(
4763
4522
  $first: Int
@@ -4790,9 +4549,6 @@ var InsurUpCaseClient = class {
4790
4549
  ${fieldSelection}
4791
4550
  }
4792
4551
  }
4793
- nodes {
4794
- ${fieldSelection}
4795
- }
4796
4552
  }
4797
4553
  }
4798
4554
  `;
@@ -4805,37 +4561,27 @@ var InsurUpCaseClient = class {
4805
4561
  filter: requestOptions?.filter,
4806
4562
  order: requestOptions?.order
4807
4563
  };
4808
- const result = await this.graphql.query(query, variables);
4564
+ const result = await this.graphql.query(query, variables, options);
4809
4565
  if (!result.isSuccess) {
4810
4566
  return result;
4811
4567
  }
4568
+ const edges = result.data.casesNew.edges;
4569
+ const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;
4812
4570
  return {
4813
4571
  ...result,
4814
- data: result.data.casesNew
4572
+ data: {
4573
+ ...result.data.casesNew,
4574
+ nodes
4575
+ }
4815
4576
  };
4816
4577
  }
4817
4578
  };
4818
4579
 
4819
- // src/contracts/graphql/webhookDeliveries.ts
4820
- var WebhookDeliveryState = /* @__PURE__ */ ((WebhookDeliveryState2) => {
4821
- WebhookDeliveryState2["Pending"] = "PENDING";
4822
- WebhookDeliveryState2["Success"] = "SUCCESS";
4823
- WebhookDeliveryState2["Failed"] = "FAILED";
4824
- return WebhookDeliveryState2;
4825
- })(WebhookDeliveryState || {});
4826
- var ALL_WEBHOOK_DELIVERY_FIELDS = [
4827
- "id",
4828
- "webhookId",
4829
- "webhookName",
4830
- "event",
4831
- "state",
4832
- "responseStatusCode",
4833
- "createdAt",
4834
- "completedAt",
4835
- "retryCount"
4836
- ];
4837
-
4838
4580
  // src/clients/webhook.ts
4581
+ import {
4582
+ ALL_WEBHOOK_DELIVERY_FIELDS
4583
+ } from "@insurup/contracts";
4584
+ import { buildFieldSelection as buildFieldSelection5 } from "@insurup/contracts";
4839
4585
  var InsurUpWebhookClient = class {
4840
4586
  constructor(http, graphql) {
4841
4587
  this.http = http;
@@ -4959,14 +4705,14 @@ var InsurUpWebhookClient = class {
4959
4705
  * @param requestOptions Query options including pagination, filters, search, and field selection
4960
4706
  * @returns Paginated connection of webhook deliveries with type-narrowed fields
4961
4707
  */
4962
- async getWebhookDeliveries(requestOptions) {
4708
+ async getWebhookDeliveries(requestOptions, options) {
4963
4709
  if (!this.graphql) {
4964
4710
  throw new Error(
4965
4711
  "GraphQL transport is not available. Ensure the client is properly initialized."
4966
4712
  );
4967
4713
  }
4968
4714
  const fields = requestOptions?.select ?? ALL_WEBHOOK_DELIVERY_FIELDS;
4969
- const fieldSelection = buildFieldSelection(fields);
4715
+ const fieldSelection = buildFieldSelection5(fields);
4970
4716
  const query = `
4971
4717
  query GetWebhookDeliveries(
4972
4718
  $first: Int
@@ -4999,9 +4745,6 @@ var InsurUpWebhookClient = class {
4999
4745
  ${fieldSelection}
5000
4746
  }
5001
4747
  }
5002
- nodes {
5003
- ${fieldSelection}
5004
- }
5005
4748
  }
5006
4749
  }
5007
4750
  `;
@@ -5014,13 +4757,18 @@ var InsurUpWebhookClient = class {
5014
4757
  filter: requestOptions?.filter,
5015
4758
  order: requestOptions?.order
5016
4759
  };
5017
- const result = await this.graphql.query(query, variables);
4760
+ const result = await this.graphql.query(query, variables, options);
5018
4761
  if (!result.isSuccess) {
5019
4762
  return result;
5020
4763
  }
4764
+ const edges = result.data.webhookDeliveriesNew.edges;
4765
+ const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;
5021
4766
  return {
5022
4767
  ...result,
5023
- data: result.data.webhookDeliveriesNew
4768
+ data: {
4769
+ ...result.data.webhookDeliveriesNew,
4770
+ nodes
4771
+ }
5024
4772
  };
5025
4773
  }
5026
4774
  };
@@ -5274,60 +5022,11 @@ var InsurUpInsuranceClient = class {
5274
5022
  }
5275
5023
  };
5276
5024
 
5277
- // src/contracts/graphql/proposals.ts
5278
- var ALL_PROPOSAL_FIELDS = [
5279
- // Primitive fields
5280
- "agentBranchId",
5281
- "id",
5282
- "productBranch",
5283
- "state",
5284
- "insurerCustomerId",
5285
- "insuredCustomerId",
5286
- "productsCount",
5287
- "succeedProductsCount",
5288
- "createdAt",
5289
- "successRate",
5290
- "insuredCustomerName",
5291
- "insuredCustomerIdentityNumber",
5292
- "insuredCustomerTaxNumber",
5293
- "insuredCustomerType",
5294
- "lowestPremium",
5295
- "highestPremium",
5296
- "channel",
5297
- "insuredCustomerCityText",
5298
- "insuredCustomerCityValue",
5299
- "insuredCustomerDistrictText",
5300
- "insuredCustomerDistrictValue",
5301
- "insuredCustomerPhoneNumber",
5302
- "insuredCustomerPhoneNumberCountryCode",
5303
- "insuredCustomerEmail",
5304
- "vehiclePlateCode",
5305
- "vehiclePlateCity",
5306
- "vehicleDocumentSerialCode",
5307
- "vehicleDocumentSerialNumber",
5308
- "vehicleModelBrandText",
5309
- "vehicleModelBrandValue",
5310
- "vehicleModelTypeText",
5311
- "vehicleModelTypeValue",
5312
- "vehicleModelYear",
5313
- "vehicleFuelType",
5314
- "utilizationStyle",
5315
- "insuredCustomerBirthDate",
5316
- "vehicleId",
5317
- "propertyId",
5318
- // Nested agentBranch fields
5319
- "agentBranch.id",
5320
- "agentBranch.name",
5321
- "agentBranch.parentId",
5322
- "agentBranch.parentName",
5323
- // Nested agentUserCreatedBy fields
5324
- "agentUserCreatedBy.id",
5325
- "agentUserCreatedBy.name",
5326
- "agentUserCreatedBy.email",
5327
- "agentUserCreatedBy.userType"
5328
- ];
5329
-
5330
5025
  // src/clients/proposal.ts
5026
+ import {
5027
+ ALL_PROPOSAL_FIELDS
5028
+ } from "@insurup/contracts";
5029
+ import { buildFieldSelection as buildFieldSelection6 } from "@insurup/contracts";
5331
5030
  var InsurUpProposalClient = class {
5332
5031
  constructor(http, graphql) {
5333
5032
  this.http = http;
@@ -5683,14 +5382,14 @@ var InsurUpProposalClient = class {
5683
5382
  * @param requestOptions Query options including pagination, filters, search, and field selection
5684
5383
  * @returns Paginated connection of proposals with type-narrowed fields
5685
5384
  */
5686
- async getProposals(requestOptions) {
5385
+ async getProposals(requestOptions, options) {
5687
5386
  if (!this.graphql) {
5688
5387
  throw new Error(
5689
5388
  "GraphQL transport is not available. Ensure the client is properly initialized."
5690
5389
  );
5691
5390
  }
5692
5391
  const fields = requestOptions?.select ?? ALL_PROPOSAL_FIELDS;
5693
- const fieldSelection = buildFieldSelection(fields);
5392
+ const fieldSelection = buildFieldSelection6(fields);
5694
5393
  const query = `
5695
5394
  query GetProposals(
5696
5395
  $first: Int
@@ -5723,9 +5422,6 @@ var InsurUpProposalClient = class {
5723
5422
  ${fieldSelection}
5724
5423
  }
5725
5424
  }
5726
- nodes {
5727
- ${fieldSelection}
5728
- }
5729
5425
  }
5730
5426
  }
5731
5427
  `;
@@ -5738,13 +5434,18 @@ var InsurUpProposalClient = class {
5738
5434
  filter: requestOptions?.filter,
5739
5435
  order: requestOptions?.order
5740
5436
  };
5741
- const result = await this.graphql.query(query, variables);
5437
+ const result = await this.graphql.query(query, variables, options);
5742
5438
  if (!result.isSuccess) {
5743
5439
  return result;
5744
5440
  }
5441
+ const edges = result.data.proposalsNew.edges;
5442
+ const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;
5745
5443
  return {
5746
5444
  ...result,
5747
- data: result.data.proposalsNew
5445
+ data: {
5446
+ ...result.data.proposalsNew,
5447
+ nodes
5448
+ }
5748
5449
  };
5749
5450
  }
5750
5451
  };
@@ -6026,699 +5727,12 @@ var DefaultInsurUpClient = class {
6026
5727
  }
6027
5728
  };
6028
5729
 
6029
- // src/contracts/common.base.ts
6030
- var Channel = /* @__PURE__ */ ((Channel2) => {
6031
- Channel2["Unknown"] = "UNKNOWN";
6032
- Channel2["Manual"] = "MANUAL";
6033
- Channel2["Website"] = "WEBSITE";
6034
- Channel2["GoogleAds"] = "GOOGLE_ADS";
6035
- Channel2["CallCenter"] = "CALL_CENTER";
6036
- Channel2["SocialMedia"] = "SOCIAL_MEDIA";
6037
- Channel2["MobileApp"] = "MOBILE_APP";
6038
- Channel2["OfflineProposalForm"] = "OFFLINE_PROPOSAL_FORM";
6039
- Channel2["Field"] = "FIELD";
6040
- Channel2["PrintMedia"] = "PRINT_MEDIA";
6041
- Channel2["FairEvent"] = "FAIR_EVENT";
6042
- Channel2["BusinessPartner"] = "BUSINESS_PARTNER";
6043
- Channel2["Chatbot"] = "CHATBOT";
6044
- return Channel2;
6045
- })(Channel || {});
6046
- var AssetType = /* @__PURE__ */ ((AssetType2) => {
6047
- AssetType2["Vehicle"] = "VEHICLE";
6048
- AssetType2["Property"] = "PROPERTY";
6049
- return AssetType2;
6050
- })(AssetType || {});
6051
- var CustomerType = /* @__PURE__ */ ((CustomerType2) => {
6052
- CustomerType2["Individual"] = "INDIVIDUAL";
6053
- CustomerType2["Company"] = "COMPANY";
6054
- CustomerType2["Foreign"] = "FOREIGN";
6055
- return CustomerType2;
6056
- })(CustomerType || {});
6057
- var ProductBranch = /* @__PURE__ */ ((ProductBranch2) => {
6058
- ProductBranch2["Kasko"] = "KASKO";
6059
- ProductBranch2["Dask"] = "DASK";
6060
- ProductBranch2["Konut"] = "KONUT";
6061
- ProductBranch2["Trafik"] = "TRAFIK";
6062
- ProductBranch2["Tss"] = "TSS";
6063
- ProductBranch2["Imm"] = "IMM";
6064
- ProductBranch2["YesilKart"] = "YESIL_KART";
6065
- ProductBranch2["FerdiKaza"] = "FERDI_KAZA";
6066
- ProductBranch2["GrupHayat"] = "GRUP_HAYAT";
6067
- ProductBranch2["Saglik"] = "SAGLIK";
6068
- ProductBranch2["KartKimlikKoruma"] = "KART_KIMLIK_KORUMA";
6069
- ProductBranch2["UcuncuSahisMaliSorumluluk"] = "UCUNCU_SAHIS_MALI_SORUMLULUK";
6070
- ProductBranch2["IsyeriYangin"] = "ISYERI_YANGIN";
6071
- ProductBranch2["Seyahat"] = "SEYAHAT";
6072
- ProductBranch2["ElektronikCihaz"] = "ELEKTRONIK_CIHAZ";
6073
- ProductBranch2["Pet"] = "PET";
6074
- ProductBranch2["Bes"] = "BES";
6075
- ProductBranch2["InsaatAllRisk"] = "INSAAT_ALL_RISK";
6076
- ProductBranch2["LeasingAllRisk"] = "LEASING_ALL_RISK";
6077
- ProductBranch2["MontajAllRisk"] = "MONTAJ_ALL_RISK";
6078
- ProductBranch2["Nakliyat"] = "NAKLIYAT";
6079
- ProductBranch2["OzelGuvenlikMaliSorumluluk"] = "OZEL_GUVENLIK_MALI_SORUMLULUK";
6080
- ProductBranch2["AkilliTelefon"] = "AKILLI_TELEFON";
6081
- ProductBranch2["TehlikeliMaddelerMaliSorumluluk"] = "TEHLIKELI_MADDELER_MALI_SORUMLULUK";
6082
- ProductBranch2["YatGemiGezintiTeknesi"] = "YAT_GEMI_GEZINTI_TEKNESI";
6083
- ProductBranch2["Tarim"] = "TARIM";
6084
- ProductBranch2["MeslekiSorumluluk"] = "MESLEKI_SORUMLULUK";
6085
- ProductBranch2["Alacak"] = "ALACAK";
6086
- ProductBranch2["IsverenMaliMesuliyet"] = "ISVEREN_MALI_MESULIYET";
6087
- ProductBranch2["Muhendislik"] = "MUHENDISLIK";
6088
- ProductBranch2["HukuksalKoruma"] = "HUKUKSAL_KORUMA";
6089
- ProductBranch2["IlkAtesKonut"] = "ILK_ATES_KONUT";
6090
- ProductBranch2["Kefalet"] = "KEFALET";
6091
- return ProductBranch2;
6092
- })(ProductBranch || {});
6093
- var Currency = /* @__PURE__ */ ((Currency2) => {
6094
- Currency2["Unknown"] = "UNKNOWN";
6095
- Currency2["TurkishLira"] = "TURKISH_LIRA";
6096
- Currency2["UnitedStatesDollar"] = "UNITED_STATES_DOLLAR";
6097
- Currency2["Euro"] = "EURO";
6098
- return Currency2;
6099
- })(Currency || {});
6100
- var PaymentOption = /* @__PURE__ */ ((PaymentOption2) => {
6101
- PaymentOption2["Unknown"] = "UNKNOWN";
6102
- PaymentOption2["SyncCreditCard"] = "SYNC_CREDIT_CARD";
6103
- PaymentOption2["SyncOpenAccount"] = "SYNC_OPEN_ACCOUNT";
6104
- PaymentOption2["Async3dSecure"] = "ASYNC_3D_SECURE";
6105
- PaymentOption2["AsyncInsuranceCompanyRedirect"] = "ASYNC_INSURANCE_COMPANY_REDIRECT";
6106
- PaymentOption2["AsyncThirdParty3dSecure"] = "ASYNC_THIRD_PARTY_3D_SECURE";
6107
- return PaymentOption2;
6108
- })(PaymentOption || {});
6109
- var PolicyState = /* @__PURE__ */ ((PolicyState2) => {
6110
- PolicyState2["Active"] = "ACTIVE";
6111
- PolicyState2["EndOfLife"] = "END_OF_LIFE";
6112
- PolicyState2["Cancelled"] = "CANCELLED";
6113
- return PolicyState2;
6114
- })(PolicyState || {});
6115
- var InsuranceProductType = /* @__PURE__ */ ((InsuranceProductType2) => {
6116
- InsuranceProductType2["WebService"] = "WEB_SERVICE";
6117
- InsuranceProductType2["Robot"] = "ROBOT";
6118
- return InsuranceProductType2;
6119
- })(InsuranceProductType || {});
6120
-
6121
- // src/contracts/common.coverage.ts
6122
- var OnarimServisTuru = /* @__PURE__ */ ((OnarimServisTuru2) => {
6123
- OnarimServisTuru2["Belirsiz"] = "BELIRSIZ";
6124
- OnarimServisTuru2["AnlasmaliOzelServis"] = "ANLASMALI_OZEL_SERVIS";
6125
- OnarimServisTuru2["AnlasmaliYetkiliServis"] = "ANLASMALI_YETKILI_SERVIS";
6126
- OnarimServisTuru2["YetkiliServis"] = "YETKILI_SERVIS";
6127
- OnarimServisTuru2["OzelServis"] = "OZEL_SERVIS";
6128
- OnarimServisTuru2["SigortaliBelirler"] = "SIGORTALI_BELIRLER";
6129
- return OnarimServisTuru2;
6130
- })(OnarimServisTuru || {});
6131
- var YedekParcaTuru = /* @__PURE__ */ ((YedekParcaTuru2) => {
6132
- YedekParcaTuru2["Belirsiz"] = "BELIRSIZ";
6133
- YedekParcaTuru2["OrijinalParca"] = "ORIJINAL_PARCA";
6134
- YedekParcaTuru2["EsdegerParca"] = "ESDEGER_PARCA";
6135
- return YedekParcaTuru2;
6136
- })(YedekParcaTuru || {});
6137
- var AracSegment = /* @__PURE__ */ ((AracSegment2) => {
6138
- AracSegment2["A"] = "A";
6139
- AracSegment2["B"] = "B";
6140
- AracSegment2["C"] = "C";
6141
- AracSegment2["D"] = "D";
6142
- AracSegment2["E"] = "E";
6143
- AracSegment2["F"] = "F";
6144
- AracSegment2["SegmenteSegment"] = "SEGMENTE_SEGMENT";
6145
- return AracSegment2;
6146
- })(AracSegment || {});
6147
- var HastaneAgi = /* @__PURE__ */ ((HastaneAgi2) => {
6148
- HastaneAgi2["Bilinmiyor"] = "BILINMIYOR";
6149
- HastaneAgi2["DarKapsam"] = "DAR_KAPSAM";
6150
- HastaneAgi2["StandartKapsam"] = "STANDART_KAPSAM";
6151
- HastaneAgi2["GenisKapsam"] = "GENIS_KAPSAM";
6152
- return HastaneAgi2;
6153
- })(HastaneAgi || {});
6154
- var SaglikPaketiTedaviSekli = /* @__PURE__ */ ((SaglikPaketiTedaviSekli2) => {
6155
- SaglikPaketiTedaviSekli2["Bilinmiyor"] = "BILINMIYOR";
6156
- SaglikPaketiTedaviSekli2["Yatarak"] = "YATARAK";
6157
- SaglikPaketiTedaviSekli2["YatarakAyakta"] = "YATARAK_AYAKTA";
6158
- return SaglikPaketiTedaviSekli2;
6159
- })(SaglikPaketiTedaviSekli || {});
6160
- var TasinanYuk = /* @__PURE__ */ ((TasinanYuk2) => {
6161
- TasinanYuk2["Belirsiz"] = "BELIRSIZ";
6162
- TasinanYuk2["Yok"] = "YOK";
6163
- TasinanYuk2["AgacKutukleriveKereste"] = "AGAC_KUTUKLERIVE_KERESTE";
6164
- TasinanYuk2["Akaryakit"] = "AKARYAKIT";
6165
- TasinanYuk2["AyakkabiSaraciye"] = "AYAKKABI_SARACIYE";
6166
- TasinanYuk2["BakkaliyeveSharkuteriUrunleri"] = "BAKKALIYE_VE_SHARKUTERI_URUNLERI";
6167
- TasinanYuk2["BilumumKirtasiyeMalzemeleri"] = "BILUMUM_KIRTASIYE_MALZEMELERI";
6168
- TasinanYuk2["DokmeSuveSut"] = "DOKME_SU_VE_SUT";
6169
- TasinanYuk2["HaliveKilim"] = "HALI_VE_KILIM";
6170
- TasinanYuk2["HamYariMamulveMamulKagit"] = "HAM_YARI_MAMUL_VE_MAMUL_KAGIT";
6171
- TasinanYuk2["HazirBeton"] = "HAZIR_BETON";
6172
- TasinanYuk2["HerNeviEvAletleri"] = "HER_NEVI_EV_ALETLERI";
6173
- TasinanYuk2["HerTurluDokmeKomurvOdun"] = "HER_TURLU_DOKME_KOMUR_V_ODUN";
6174
- TasinanYuk2["HububatveBakliyat"] = "HUBUBAT_VE_BAKLIYAT";
6175
- TasinanYuk2["KabaInsaatMalzemeleri"] = "KABA_INSAAT_MALZEMELERI";
6176
- TasinanYuk2["LastikKaucukUrunleri"] = "LASTIK_KAUCUK_URUNLERI";
6177
- TasinanYuk2["LikidKimyeviMadde"] = "LIKID_KIMYEVI_MADDE";
6178
- TasinanYuk2["LpgGazTupu"] = "LPG_GAZ_TUPU";
6179
- TasinanYuk2["MakineAksamveYedekleri"] = "MAKINE_AKSAM_VE_YEDEKLERI";
6180
- TasinanYuk2["MobilyaMalzemesi"] = "MOBILYA_MALZEMESI";
6181
- TasinanYuk2["MuhtelifEvEsyasi"] = "MUHTELIF_EV_ESYASI";
6182
- TasinanYuk2["OtoYedekParcalari"] = "OTO_YEDEK_PARCALARI";
6183
- TasinanYuk2["PlastikMamulleri"] = "PLASTIK_MAMULLERI";
6184
- TasinanYuk2["SentetikElyafUrunleri"] = "SENTETIK_ELYAF_URUNLERI";
6185
- TasinanYuk2["SentetikPlastikBoyaUrunleri"] = "SENTETIK_PLASTIK_BOYA_URUNLERI";
6186
- TasinanYuk2["TekstilUrunleri"] = "TEKSTIL_URUNLERI";
6187
- TasinanYuk2["TemizlikMaddeleri"] = "TEMIZLIK_MADDELERI";
6188
- TasinanYuk2["YasMeyveveSebze"] = "YAS_MEYVE_VE_SEBZE";
6189
- return TasinanYuk2;
6190
- })(TasinanYuk || {});
6191
- function isCoverageValue(value) {
6192
- return typeof value === "object" && value !== null && "$type" in value && typeof value.$type === "string";
6193
- }
6194
- function mergeCoverage(...coverages) {
6195
- if (coverages.length === 0) {
6196
- throw new Error("Cannot merge empty coverage array");
6197
- }
6198
- const validCoverages = coverages.filter(
6199
- (coverage) => coverage != null
6200
- );
6201
- if (validCoverages.length === 0) {
6202
- throw new Error("No valid coverages to merge");
6203
- }
6204
- const firstCoverage = validCoverages[0];
6205
- const productBranch = firstCoverage.productBranch;
6206
- for (const coverage of validCoverages) {
6207
- if (coverage.productBranch !== productBranch) {
6208
- throw new Error(
6209
- `All coverages must have the same productBranch. Expected: ${productBranch}, but found: ${coverage.productBranch}`
6210
- );
6211
- }
6212
- }
6213
- const mergeCoverageValue = (values) => {
6214
- const definedValues = values.filter(
6215
- (value) => value != null
6216
- );
6217
- if (definedValues.length === 0) {
6218
- return void 0;
6219
- }
6220
- const nonUndefinedValues = definedValues.filter(
6221
- (value) => value.$type !== "UNDEFINED"
6222
- );
6223
- if (nonUndefinedValues.length > 0) {
6224
- return nonUndefinedValues[nonUndefinedValues.length - 1];
6225
- }
6226
- return { $type: "UNDEFINED" };
6227
- };
6228
- const mergeProperty = (values) => {
6229
- const definedValues = values.filter((value) => value != null);
6230
- return definedValues.length > 0 ? definedValues[definedValues.length - 1] : void 0;
6231
- };
6232
- const allKeys = /* @__PURE__ */ new Set();
6233
- for (const coverage of validCoverages) {
6234
- Object.keys(coverage).forEach((key) => {
6235
- if (key !== "productBranch") {
6236
- allKeys.add(key);
6237
- }
6238
- });
6239
- }
6240
- const merged = {
6241
- productBranch
6242
- };
6243
- for (const key of allKeys) {
6244
- const values = validCoverages.map(
6245
- (coverage) => coverage[key]
6246
- );
6247
- const sampleValue = values.find((v) => v != null);
6248
- if (isCoverageValue(sampleValue)) {
6249
- merged[key] = mergeCoverageValue(values);
6250
- } else {
6251
- merged[key] = mergeProperty(values);
6252
- }
6253
- }
6254
- return merged;
6255
- }
6256
-
6257
- // src/contracts/common.policy.ts
6258
- var PolicyTransferTriggerStatus = /* @__PURE__ */ ((PolicyTransferTriggerStatus2) => {
6259
- PolicyTransferTriggerStatus2["Succeeded"] = "SUCCEEDED";
6260
- PolicyTransferTriggerStatus2["Failed"] = "TRIGGER_STATUS_FAILED";
6261
- return PolicyTransferTriggerStatus2;
6262
- })(PolicyTransferTriggerStatus || {});
6263
- var PolicyTransferCompanyFailureReason = /* @__PURE__ */ ((PolicyTransferCompanyFailureReason2) => {
6264
- PolicyTransferCompanyFailureReason2["Unknown"] = "UNKNOWN";
6265
- PolicyTransferCompanyFailureReason2["CouldNotFetchPolicies"] = "COULD_NOT_FETCH_POLICIES";
6266
- return PolicyTransferCompanyFailureReason2;
6267
- })(PolicyTransferCompanyFailureReason || {});
6268
- var TransferredPolicyStatus = /* @__PURE__ */ ((TransferredPolicyStatus2) => {
6269
- TransferredPolicyStatus2["Success"] = "SUCCESS";
6270
- TransferredPolicyStatus2["Failed"] = "TRANSFER_FAILED";
6271
- TransferredPolicyStatus2["Skipped"] = "TRANSFER_SKIPPED";
6272
- return TransferredPolicyStatus2;
6273
- })(TransferredPolicyStatus || {});
6274
- var TransferredPolicySkipReason = /* @__PURE__ */ ((TransferredPolicySkipReason2) => {
6275
- TransferredPolicySkipReason2["Unknown"] = "UNKNOWN";
6276
- TransferredPolicySkipReason2["AlreadyTransferred"] = "SKIP_ALREADY_TRANSFERRED";
6277
- TransferredPolicySkipReason2["PreviousVersionNotFound"] = "PREVIOUS_VERSION_NOT_FOUND";
6278
- TransferredPolicySkipReason2["ProductBranchNotSupported"] = "PRODUCT_BRANCH_NOT_SUPPORTED";
6279
- TransferredPolicySkipReason2["ProductNotSupported"] = "PRODUCT_NOT_SUPPORTED";
6280
- return TransferredPolicySkipReason2;
6281
- })(TransferredPolicySkipReason || {});
6282
- var TransferredPolicyFailureReason = /* @__PURE__ */ ((TransferredPolicyFailureReason2) => {
6283
- TransferredPolicyFailureReason2["Unknown"] = "UNKNOWN";
6284
- TransferredPolicyFailureReason2["InvalidCustomerIdentityNumber"] = "INVALID_CUSTOMER_IDENTITY_NUMBER";
6285
- TransferredPolicyFailureReason2["InvalidCustomerCompanyTitle"] = "INVALID_CUSTOMER_COMPANY_TITLE";
6286
- TransferredPolicyFailureReason2["InvalidCustomerTaxNumber"] = "INVALID_CUSTOMER_TAX_NUMBER";
6287
- TransferredPolicyFailureReason2["InvalidCustomerType"] = "INVALID_CUSTOMER_TYPE";
6288
- TransferredPolicyFailureReason2["InvalidVehicle"] = "INVALID_VEHICLE";
6289
- TransferredPolicyFailureReason2["InvalidProperty"] = "INVALID_PROPERTY";
6290
- TransferredPolicyFailureReason2["InvalidEndDate"] = "INVALID_END_DATE";
6291
- TransferredPolicyFailureReason2["InvalidStartDate"] = "INVALID_START_DATE";
6292
- TransferredPolicyFailureReason2["InvalidProposalNumber"] = "INVALID_PROPOSAL_NUMBER";
6293
- TransferredPolicyFailureReason2["InvalidPremium"] = "INVALID_PREMIUM";
6294
- TransferredPolicyFailureReason2["InvalidCommission"] = "INVALID_COMMISSION";
6295
- TransferredPolicyFailureReason2["InvalidPaymentType"] = "INVALID_PAYMENT_TYPE";
6296
- TransferredPolicyFailureReason2["InvalidInsuredCustomer"] = "INVALID_INSURED_CUSTOMER";
6297
- TransferredPolicyFailureReason2["InvalidInsurerCustomer"] = "INVALID_INSURER_CUSTOMER";
6298
- return TransferredPolicyFailureReason2;
6299
- })(TransferredPolicyFailureReason || {});
6300
-
6301
- // src/contracts/common.property.ts
6302
- var PropertyStructure = /* @__PURE__ */ ((PropertyStructure2) => {
6303
- PropertyStructure2["Unknown"] = "UNKNOWN";
6304
- PropertyStructure2["SteelReinforcedConcrete"] = "STEEL_REINFORCED_CONCRETE";
6305
- PropertyStructure2["Other"] = "OTHER";
6306
- return PropertyStructure2;
6307
- })(PropertyStructure || {});
6308
- var PropertyDamageStatus = /* @__PURE__ */ ((PropertyDamageStatus2) => {
6309
- PropertyDamageStatus2["Unknown"] = "UNKNOWN";
6310
- PropertyDamageStatus2["None"] = "NONE";
6311
- PropertyDamageStatus2["SlightlyDamaged"] = "SLIGHTLY_DAMAGED";
6312
- PropertyDamageStatus2["ModeratelyDamaged"] = "MODERATELY_DAMAGED";
6313
- PropertyDamageStatus2["SeverelyDamaged"] = "SEVERELY_DAMAGED";
6314
- return PropertyDamageStatus2;
6315
- })(PropertyDamageStatus || {});
6316
- var PropertyUtilizationStyle = /* @__PURE__ */ ((PropertyUtilizationStyle2) => {
6317
- PropertyUtilizationStyle2["Unknown"] = "UNKNOWN";
6318
- PropertyUtilizationStyle2["House"] = "HOUSE";
6319
- PropertyUtilizationStyle2["Business"] = "BUSINESS";
6320
- PropertyUtilizationStyle2["Other"] = "OTHER";
6321
- return PropertyUtilizationStyle2;
6322
- })(PropertyUtilizationStyle || {});
6323
- var PropertyOwnershipType = /* @__PURE__ */ ((PropertyOwnershipType2) => {
6324
- PropertyOwnershipType2["Unknown"] = "UNKNOWN";
6325
- PropertyOwnershipType2["Proprietor"] = "PROPRIETOR";
6326
- PropertyOwnershipType2["Tenant"] = "TENANT";
6327
- return PropertyOwnershipType2;
6328
- })(PropertyOwnershipType || {});
6329
- var LossPayeeClauseType = /* @__PURE__ */ ((LossPayeeClauseType2) => {
6330
- LossPayeeClauseType2["Bank"] = "BANK";
6331
- LossPayeeClauseType2["FinancialInstitution"] = "FINANCIAL_INSTITUTION";
6332
- return LossPayeeClauseType2;
6333
- })(LossPayeeClauseType || {});
6334
-
6335
- // src/contracts/common.vehicle.ts
6336
- var VehicleUtilizationStyle = /* @__PURE__ */ ((VehicleUtilizationStyle2) => {
6337
- VehicleUtilizationStyle2["Unknown"] = "UNKNOWN";
6338
- VehicleUtilizationStyle2["PrivateCar"] = "PRIVATE_CAR";
6339
- VehicleUtilizationStyle2["Taxi"] = "TAXI";
6340
- VehicleUtilizationStyle2["RouteBasedMinibus"] = "ROUTE_BASED_MINIBUS";
6341
- VehicleUtilizationStyle2["MediumBus"] = "MEDIUM_BUS";
6342
- VehicleUtilizationStyle2["LargeBus"] = "LARGE_BUS";
6343
- VehicleUtilizationStyle2["PickupTruck"] = "PICKUP_TRUCK";
6344
- VehicleUtilizationStyle2["PanelVan"] = "PANEL_VAN";
6345
- VehicleUtilizationStyle2["Truck"] = "TRUCK";
6346
- VehicleUtilizationStyle2["Tractor"] = "TRACTOR";
6347
- VehicleUtilizationStyle2["Motorcycle"] = "MOTORCYCLE";
6348
- VehicleUtilizationStyle2["RentalCar"] = "RENTAL_CAR";
6349
- VehicleUtilizationStyle2["ArmoredVehicle"] = "ARMORED_VEHICLE";
6350
- VehicleUtilizationStyle2["MinibusSharedTaxi"] = "MINIBUS_SHARED_TAXI";
6351
- VehicleUtilizationStyle2["Jeep"] = "JEEP";
6352
- VehicleUtilizationStyle2["JeepSAV"] = "JEEP_SAV";
6353
- VehicleUtilizationStyle2["JeepSUV"] = "JEEP_SUV";
6354
- VehicleUtilizationStyle2["Hearse"] = "HEARSE";
6355
- VehicleUtilizationStyle2["ChauffeuredRentalCar"] = "CHAUFFEURED_RENTAL_CAR";
6356
- VehicleUtilizationStyle2["OperationalRental"] = "OPERATIONAL_RENTAL";
6357
- VehicleUtilizationStyle2["PrivateMinibus"] = "PRIVATE_MINIBUS";
6358
- VehicleUtilizationStyle2["RouteMinibus"] = "ROUTE_MINIBUS";
6359
- VehicleUtilizationStyle2["ServiceMinibus"] = "SERVICE_MINIBUS";
6360
- return VehicleUtilizationStyle2;
6361
- })(VehicleUtilizationStyle || {});
6362
- var VehicleFuelType = /* @__PURE__ */ ((VehicleFuelType2) => {
6363
- VehicleFuelType2["Gasoline"] = "GASOLINE";
6364
- VehicleFuelType2["Diesel"] = "DIESEL";
6365
- VehicleFuelType2["Lpg"] = "LPG";
6366
- VehicleFuelType2["Electric"] = "ELECTRIC";
6367
- VehicleFuelType2["LpgGasoline"] = "LPG_GASOLINE";
6368
- VehicleFuelType2["Hybrid"] = "HYBRID";
6369
- return VehicleFuelType2;
6370
- })(VehicleFuelType || {});
6371
- var VehicleAccessoryType = /* @__PURE__ */ ((VehicleAccessoryType2) => {
6372
- VehicleAccessoryType2["Audio"] = "audio";
6373
- VehicleAccessoryType2["Display"] = "display";
6374
- VehicleAccessoryType2["Other"] = "other";
6375
- return VehicleAccessoryType2;
6376
- })(VehicleAccessoryType || {});
6377
-
6378
- // src/contracts/customers.ts
6379
- var Gender = /* @__PURE__ */ ((Gender2) => {
6380
- Gender2["Unknown"] = "UNKNOWN";
6381
- Gender2["Male"] = "MALE";
6382
- Gender2["Female"] = "FEMALE";
6383
- Gender2["Other"] = "OTHER";
6384
- return Gender2;
6385
- })(Gender || {});
6386
- var EducationStatus = /* @__PURE__ */ ((EducationStatus2) => {
6387
- EducationStatus2["Unknown"] = "UNKNOWN";
6388
- EducationStatus2["PrimarySchool"] = "PRIMARY_SCHOOL";
6389
- EducationStatus2["MiddleSchool"] = "MIDDLE_SCHOOL";
6390
- EducationStatus2["HighSchool"] = "HIGH_SCHOOL";
6391
- EducationStatus2["University"] = "UNIVERSITY";
6392
- EducationStatus2["Postgraduate"] = "POSTGRADUATE";
6393
- EducationStatus2["Doctorate"] = "DOCTORATE";
6394
- EducationStatus2["Other"] = "OTHER";
6395
- return EducationStatus2;
6396
- })(EducationStatus || {});
6397
- var Nationality = /* @__PURE__ */ ((Nationality2) => {
6398
- Nationality2["Unknown"] = "UNKNOWN";
6399
- Nationality2["Turk"] = "TURK";
6400
- Nationality2["Other"] = "OTHER";
6401
- return Nationality2;
6402
- })(Nationality || {});
6403
- var MaritalStatus = /* @__PURE__ */ ((MaritalStatus2) => {
6404
- MaritalStatus2["Unknown"] = "UNKNOWN";
6405
- MaritalStatus2["Single"] = "SINGLE";
6406
- MaritalStatus2["Married"] = "MARRIED";
6407
- return MaritalStatus2;
6408
- })(MaritalStatus || {});
6409
- var Job = /* @__PURE__ */ ((Job2) => {
6410
- Job2["Unknown"] = "UNKNOWN";
6411
- Job2["Banker"] = "BANKER";
6412
- Job2["CorporateEmployee"] = "CORPORATE_EMPLOYEE";
6413
- Job2["LtdEmployee"] = "LTD_EMPLOYEE";
6414
- Job2["Police"] = "POLICE";
6415
- Job2["MilitaryPersonnel"] = "MILITARY_PERSONNEL";
6416
- Job2["RetiredSpouse"] = "RETIRED_SPOUSE";
6417
- Job2["Teacher"] = "TEACHER";
6418
- Job2["Doctor"] = "DOCTOR";
6419
- Job2["Pharmacist"] = "PHARMACIST";
6420
- Job2["Nurse"] = "NURSE";
6421
- Job2["HealthcareWorker"] = "HEALTHCARE_WORKER";
6422
- Job2["Lawyer"] = "LAWYER";
6423
- Job2["Judge"] = "JUDGE";
6424
- Job2["Prosecutor"] = "PROSECUTOR";
6425
- Job2["Freelancer"] = "FREELANCER";
6426
- Job2["Farmer"] = "FARMER";
6427
- Job2["Instructor"] = "INSTRUCTOR";
6428
- Job2["ReligiousOfficial"] = "RELIGIOUS_OFFICIAL";
6429
- Job2["AssociationManager"] = "ASSOCIATION_MANAGER";
6430
- Job2["Officer"] = "OFFICER";
6431
- Job2["Retired"] = "RETIRED";
6432
- Job2["Housewife"] = "HOUSEWIFE";
6433
- return Job2;
6434
- })(Job || {});
6435
- var ContactFlowState = /* @__PURE__ */ ((ContactFlowState2) => {
6436
- ContactFlowState2["Active"] = "ACTIVE";
6437
- ContactFlowState2["Succeeded"] = "SUCCEEDED";
6438
- ContactFlowState2["Failed"] = "FAILED";
6439
- return ContactFlowState2;
6440
- })(ContactFlowState || {});
6441
- var ContactType = /* @__PURE__ */ ((ContactType2) => {
6442
- ContactType2["PhoneCall"] = "PHONE_CALL";
6443
- return ContactType2;
6444
- })(ContactType || {});
6445
- var ContactState = /* @__PURE__ */ ((ContactState2) => {
6446
- ContactState2["Planned"] = "PLANNED";
6447
- ContactState2["Occurred"] = "OCCURRED";
6448
- ContactState2["NotOccurred"] = "NOT_OCCURRED";
6449
- return ContactState2;
6450
- })(ContactState || {});
6451
- var Surgery = /* @__PURE__ */ ((Surgery2) => {
6452
- Surgery2["Other"] = "OTHER";
6453
- Surgery2["OrganTransplant"] = "ORGAN_TRANSPLANT";
6454
- Surgery2["BoneMarrowTransplant"] = "BONE_MARROW_TRANSPLANT";
6455
- Surgery2["HeartSurgery"] = "HEART_SURGERY";
6456
- Surgery2["BrainSurgery"] = "BRAIN_SURGERY";
6457
- return Surgery2;
6458
- })(Surgery || {});
6459
- var Disease = /* @__PURE__ */ ((Disease2) => {
6460
- Disease2["Other"] = "OTHER";
6461
- Disease2["KidneyFailure"] = "KIDNEY_FAILURE";
6462
- Disease2["Cancer"] = "CANCER";
6463
- Disease2["LiverDisease"] = "LIVER_DISEASE";
6464
- Disease2["HeartFailure"] = "HEART_FAILURE";
6465
- Disease2["HeartRhythmAndConductionDisorders"] = "HEART_RHYTHM_AND_CONDUCTION_DISORDERS";
6466
- Disease2["ImmuneSystemDisorders"] = "IMMUNE_SYSTEM_DISORDERS";
6467
- return Disease2;
6468
- })(Disease || {});
6469
- var ConsentType = /* @__PURE__ */ ((ConsentType2) => {
6470
- ConsentType2["KVKK"] = "KVKK";
6471
- ConsentType2["ETK"] = "ETK";
6472
- return ConsentType2;
6473
- })(ConsentType || {});
6474
-
6475
- // src/contracts/cases.ts
6476
- var CaseType = /* @__PURE__ */ ((CaseType2) => {
6477
- CaseType2["SaleOpportunity"] = "SALE_OPPORTUNITY";
6478
- CaseType2["Endorsement"] = "ENDORSEMENT";
6479
- CaseType2["Cancel"] = "CANCEL";
6480
- CaseType2["Complaint"] = "COMPLAINT";
6481
- return CaseType2;
6482
- })(CaseType || {});
6483
- var CaseMainState = /* @__PURE__ */ ((CaseMainState2) => {
6484
- CaseMainState2["Fail"] = "FAIL";
6485
- CaseMainState2["Open"] = "OPEN";
6486
- CaseMainState2["InProgress"] = "IN_PROGRESS";
6487
- CaseMainState2["Success"] = "SUCCESS";
6488
- return CaseMainState2;
6489
- })(CaseMainState || {});
6490
- var CaseSubState = /* @__PURE__ */ ((CaseSubState2) => {
6491
- CaseSubState2["FailNoResponse"] = "FAIL_NO_RESPONSE";
6492
- CaseSubState2["FailInvalidCase"] = "FAIL_INVALID_CASE";
6493
- CaseSubState2["FailCustomerWithdrawn"] = "FAIL_CUSTOMER_WITHDRAWN";
6494
- CaseSubState2["FailPaymentError"] = "FAIL_PAYMENT_ERROR";
6495
- CaseSubState2["FailDeclinedCardInformation"] = "FAIL_DECLINED_CARD_INFORMATION";
6496
- CaseSubState2["FailForeignUser"] = "FAIL_FOREIGN_USER";
6497
- CaseSubState2["FailTakenElsewhere"] = "FAIL_TAKEN_ELSEWHERE";
6498
- CaseSubState2["FailPriceTooHigh"] = "FAIL_PRICE_TOO_HIGH";
6499
- CaseSubState2["FailAssetAcquisition"] = "FAIL_ASSET_ACQUISITION";
6500
- CaseSubState2["FailAssetSold"] = "FAIL_ASSET_SOLD";
6501
- CaseSubState2["FailUnresolved"] = "FAIL_UNRESOLVED";
6502
- CaseSubState2["FailReferredToLegal"] = "FAIL_REFERRED_TO_LEGAL";
6503
- CaseSubState2["FailCustomerUnsatisfied"] = "FAIL_CUSTOMER_UNSATISFIED";
6504
- CaseSubState2["FailMissingDocuments"] = "FAIL_MISSING_DOCUMENTS";
6505
- CaseSubState2["FailInsurerDenied"] = "FAIL_INSURER_DENIED";
6506
- CaseSubState2["FailConditionsNotMet"] = "FAIL_CONDITIONS_NOT_MET";
6507
- CaseSubState2["OpenInitial"] = "OPEN_INITIAL";
6508
- CaseSubState2["OpenCollectingInformation"] = "OPEN_COLLECTING_INFORMATION";
6509
- CaseSubState2["OpenDelayed"] = "OPEN_DELAYED";
6510
- CaseSubState2["OpenWaiting"] = "OPEN_WAITING";
6511
- CaseSubState2["InProgressUnderAnalysis"] = "IN_PROGRESS_UNDER_ANALYSIS";
6512
- CaseSubState2["InProgressProposalPrepared"] = "IN_PROGRESS_PROPOSAL_PREPARED";
6513
- CaseSubState2["InProgressAwaitingApproval"] = "IN_PROGRESS_AWAITING_APPROVAL";
6514
- CaseSubState2["InProgressToBeRecontacted"] = "IN_PROGRESS_TO_BE_RECONTACTED";
6515
- CaseSubState2["SuccessCompleted"] = "SUCCESS_COMPLETED";
6516
- return CaseSubState2;
6517
- })(CaseSubState || {});
6518
- var CaseStatus = /* @__PURE__ */ ((CaseStatus2) => {
6519
- CaseStatus2["Open"] = "OPEN";
6520
- CaseStatus2["Delayed"] = "DELAYED";
6521
- CaseStatus2["Success"] = "SUCCESS";
6522
- CaseStatus2["Fail"] = "FAIL";
6523
- return CaseStatus2;
6524
- })(CaseStatus || {});
6525
- var SaleOpportunityCaseSubType = /* @__PURE__ */ ((SaleOpportunityCaseSubType2) => {
6526
- SaleOpportunityCaseSubType2["NewSale"] = "NEW_SALE";
6527
- SaleOpportunityCaseSubType2["CrossSale"] = "CROSS_SALE";
6528
- SaleOpportunityCaseSubType2["Renewal"] = "RENEWAL";
6529
- return SaleOpportunityCaseSubType2;
6530
- })(SaleOpportunityCaseSubType || {});
6531
- var CancelCaseSubType = /* @__PURE__ */ ((CancelCaseSubType2) => {
6532
- CancelCaseSubType2["OnlineCancellationRefund"] = "ONLINE_CANCELLATION_REFUND";
6533
- CancelCaseSubType2["MebCancellation"] = "MEB_CANCELLATION";
6534
- CancelCaseSubType2["PartialCancellation"] = "PARTIAL_CANCELLATION";
6535
- CancelCaseSubType2["CancellationFromSale"] = "CANCELLATION_FROM_SALE";
6536
- CancelCaseSubType2["CancellationDueToCollection"] = "CANCELLATION_DUE_TO_COLLECTION";
6537
- CancelCaseSubType2["CancellationDueToDamage"] = "CANCELLATION_DUE_TO_DAMAGE";
6538
- return CancelCaseSubType2;
6539
- })(CancelCaseSubType || {});
6540
- var ComplaintCaseSubType = /* @__PURE__ */ ((ComplaintCaseSubType2) => {
6541
- ComplaintCaseSubType2["ConsultantError"] = "CONSULTANT_ERROR";
6542
- ComplaintCaseSubType2["PolicyOperations"] = "POLICY_OPERATIONS";
6543
- ComplaintCaseSubType2["Collection"] = "COLLECTION";
6544
- ComplaintCaseSubType2["DueToFrequentCalls"] = "DUE_TO_FREQUENT_CALLS";
6545
- ComplaintCaseSubType2["Fraud"] = "FRAUD";
6546
- ComplaintCaseSubType2["Damage"] = "DAMAGE";
6547
- ComplaintCaseSubType2["ErroneousTransaction"] = "ERRONEOUS_TRANSACTION";
6548
- ComplaintCaseSubType2["DelayInOperations"] = "DELAY_IN_OPERATIONS";
6549
- ComplaintCaseSubType2["OnlineTransactionErrors"] = "ONLINE_TRANSACTION_ERRORS";
6550
- ComplaintCaseSubType2["DelayInCancellationPeriod"] = "DELAY_IN_CANCELLATION_PERIOD";
6551
- ComplaintCaseSubType2["NonReceiptOfPolicyOrEndorsement"] = "NON_RECEIPT_OF_POLICY_OR_ENDORSEMENT";
6552
- ComplaintCaseSubType2["NonProductionOfPolicyOrEndorsement"] = "NON_PRODUCTION_OF_POLICY_OR_ENDORSEMENT";
6553
- ComplaintCaseSubType2["DelayInEndorsementOperations"] = "DELAY_IN_ENDORSEMENT_OPERATIONS";
6554
- ComplaintCaseSubType2["ErroneousPremiumCollection"] = "ERRONEOUS_PREMIUM_COLLECTION";
6555
- ComplaintCaseSubType2["NonDeliveryOfRefundReceipt"] = "NON_DELIVERY_OF_REFUND_RECEIPT";
6556
- ComplaintCaseSubType2["NonRefundOfPremium"] = "NON_REFUND_OF_PREMIUM";
6557
- ComplaintCaseSubType2["StaffAttitude"] = "STAFF_ATTITUDE";
6558
- ComplaintCaseSubType2["InsufficientOrErroneousInformation"] = "INSUFFICIENT_OR_ERRONEOUS_INFORMATION";
6559
- ComplaintCaseSubType2["NoTimelyResponse"] = "NO_TIMELY_RESPONSE";
6560
- return ComplaintCaseSubType2;
6561
- })(ComplaintCaseSubType || {});
6562
- var EndorsementCaseSubType = /* @__PURE__ */ ((EndorsementCaseSubType2) => {
6563
- EndorsementCaseSubType2["VehicleChange"] = "VEHICLE_CHANGE";
6564
- EndorsementCaseSubType2["ValueIncrease"] = "VALUE_INCREASE";
6565
- EndorsementCaseSubType2["NoClaimBonusTransfer"] = "NO_CLAIM_BONUS_TRANSFER";
6566
- EndorsementCaseSubType2["CoverageChange"] = "COVERAGE_CHANGE";
6567
- EndorsementCaseSubType2["UsageTypeChange"] = "USAGE_TYPE_CHANGE";
6568
- EndorsementCaseSubType2["TransferRequest"] = "TRANSFER_REQUEST";
6569
- EndorsementCaseSubType2["LicensePlateChange"] = "LICENSE_PLATE_CHANGE";
6570
- EndorsementCaseSubType2["BrandModelChange"] = "BRAND_MODEL_CHANGE";
6571
- EndorsementCaseSubType2["EngineChassisNumberChange"] = "ENGINE_CHASSIS_NUMBER_CHANGE";
6572
- EndorsementCaseSubType2["ContactAddressChange"] = "CONTACT_ADDRESS_CHANGE";
6573
- EndorsementCaseSubType2["Other"] = "OTHER";
6574
- EndorsementCaseSubType2["PledgeeCorrectionAddition"] = "PLEDGEE_CORRECTION_ADDITION";
6575
- return EndorsementCaseSubType2;
6576
- })(EndorsementCaseSubType || {});
6577
- var CaseActivityAction = /* @__PURE__ */ ((CaseActivityAction2) => {
6578
- CaseActivityAction2["Created"] = "CREATED";
6579
- CaseActivityAction2["Updated"] = "UPDATED";
6580
- CaseActivityAction2["StateChanged"] = "STATE_CHANGED";
6581
- CaseActivityAction2["ChannelChanged"] = "CHANNEL_CHANGED";
6582
- CaseActivityAction2["RepresentativeAssigned"] = "REPRESENTATIVE_ASSIGNED";
6583
- CaseActivityAction2["NoteAdded"] = "NOTE_ADDED";
6584
- CaseActivityAction2["AssetSet"] = "ASSET_SET";
6585
- CaseActivityAction2["PolicyAdded"] = "POLICY_ADDED";
6586
- CaseActivityAction2["ProposalAdded"] = "PROPOSAL_ADDED";
6587
- CaseActivityAction2["PolicyEndDateSet"] = "POLICY_END_DATE_SET";
6588
- CaseActivityAction2["CustomerUpdated"] = "CUSTOMER_UPDATED";
6589
- CaseActivityAction2["AssetUpdated"] = "ASSET_UPDATED";
6590
- CaseActivityAction2["PriorityAssessed"] = "PRIORITY_ASSESSED";
6591
- CaseActivityAction2["ProposalProductPurchaseAttempted"] = "PROPOSAL_PRODUCT_PURCHASE_ATTEMPTED";
6592
- return CaseActivityAction2;
6593
- })(CaseActivityAction || {});
6594
-
6595
- // src/contracts/agents.ts
6596
- var RobotMode = /* @__PURE__ */ ((RobotMode2) => {
6597
- RobotMode2["None"] = "NONE";
6598
- RobotMode2["Desktop"] = "DESKTOP";
6599
- RobotMode2["Server"] = "SERVER";
6600
- return RobotMode2;
6601
- })(RobotMode || {});
6602
- var CaseRepresentativeAssignmentMode = /* @__PURE__ */ ((CaseRepresentativeAssignmentMode2) => {
6603
- CaseRepresentativeAssignmentMode2["None"] = "NONE";
6604
- CaseRepresentativeAssignmentMode2["Random"] = "RANDOM";
6605
- CaseRepresentativeAssignmentMode2["RoundRobin"] = "ROUND_ROBIN";
6606
- CaseRepresentativeAssignmentMode2["BranchImportanceBalance"] = "BRANCH_IMPORTANCE_BALANCE";
6607
- return CaseRepresentativeAssignmentMode2;
6608
- })(CaseRepresentativeAssignmentMode || {});
6609
- var InsuranceSyncState = /* @__PURE__ */ ((InsuranceSyncState2) => {
6610
- InsuranceSyncState2["Pending"] = "PENDING";
6611
- InsuranceSyncState2["Failed"] = "FAILED";
6612
- InsuranceSyncState2["Succeed"] = "SUCCEED";
6613
- return InsuranceSyncState2;
6614
- })(InsuranceSyncState || {});
6615
- var AgentInsuranceCompanyType = /* @__PURE__ */ ((AgentInsuranceCompanyType2) => {
6616
- AgentInsuranceCompanyType2["WebService"] = "WEB_SERVICE";
6617
- AgentInsuranceCompanyType2["Robot"] = "ROBOT";
6618
- return AgentInsuranceCompanyType2;
6619
- })(AgentInsuranceCompanyType || {});
6620
- var SmsImplementation = /* @__PURE__ */ ((SmsImplementation2) => {
6621
- SmsImplementation2["Default"] = "Default";
6622
- SmsImplementation2["Teknomart"] = "Teknomart";
6623
- SmsImplementation2["ArtiKurumsal"] = "ArtiKurumsal";
6624
- SmsImplementation2["Verimor"] = "Verimor";
6625
- return SmsImplementation2;
6626
- })(SmsImplementation || {});
6627
- var CallCenterImplementation = /* @__PURE__ */ ((CallCenterImplementation2) => {
6628
- CallCenterImplementation2["None"] = "None";
6629
- CallCenterImplementation2["AloTech"] = "AloTech";
6630
- return CallCenterImplementation2;
6631
- })(CallCenterImplementation || {});
6632
- var AgentUserState = /* @__PURE__ */ ((AgentUserState2) => {
6633
- AgentUserState2["Pending"] = "PENDING";
6634
- AgentUserState2["Active"] = "ACTIVE";
6635
- AgentUserState2["Inactive"] = "INACTIVE";
6636
- return AgentUserState2;
6637
- })(AgentUserState || {});
6638
- var B2CConfigFieldType = /* @__PURE__ */ ((B2CConfigFieldType2) => {
6639
- B2CConfigFieldType2[B2CConfigFieldType2["Object"] = 1] = "Object";
6640
- B2CConfigFieldType2[B2CConfigFieldType2["Array"] = 2] = "Array";
6641
- B2CConfigFieldType2[B2CConfigFieldType2["Text"] = 3] = "Text";
6642
- B2CConfigFieldType2[B2CConfigFieldType2["Number"] = 4] = "Number";
6643
- B2CConfigFieldType2[B2CConfigFieldType2["Boolean"] = 5] = "Boolean";
6644
- B2CConfigFieldType2[B2CConfigFieldType2["File"] = 6] = "File";
6645
- B2CConfigFieldType2[B2CConfigFieldType2["Color"] = 7] = "Color";
6646
- B2CConfigFieldType2[B2CConfigFieldType2["ProductBranch"] = 8] = "ProductBranch";
6647
- B2CConfigFieldType2[B2CConfigFieldType2["Icon"] = 9] = "Icon";
6648
- B2CConfigFieldType2[B2CConfigFieldType2["InsuranceCompany"] = 10] = "InsuranceCompany";
6649
- B2CConfigFieldType2[B2CConfigFieldType2["MultiLineText"] = 11] = "MultiLineText";
6650
- B2CConfigFieldType2[B2CConfigFieldType2["InsuranceProduct"] = 12] = "InsuranceProduct";
6651
- return B2CConfigFieldType2;
6652
- })(B2CConfigFieldType || {});
6653
-
6654
- // src/contracts/webhooks.ts
6655
- var WebhookEvent = /* @__PURE__ */ ((WebhookEvent2) => {
6656
- WebhookEvent2["ProposalPremiumReceived"] = "proposal_premium.received";
6657
- WebhookEvent2["ProposalPremiumPurchasing"] = "proposal_premium.purchasing";
6658
- WebhookEvent2["ProposalPremiumPurchased"] = "proposal_premium.purchased";
6659
- WebhookEvent2["ProposalPremiumPurchaseFailed"] = "proposal_premium.purchase_failed";
6660
- WebhookEvent2["PolicyCreated"] = "policy.created";
6661
- WebhookEvent2["PolicyUpdated"] = "policy.updated";
6662
- return WebhookEvent2;
6663
- })(WebhookEvent || {});
6664
-
6665
- // src/contracts/proposals.ts
6666
- var ProposalState = /* @__PURE__ */ ((ProposalState2) => {
6667
- ProposalState2["Waiting"] = "WAITING";
6668
- ProposalState2["Active"] = "ACTIVE";
6669
- ProposalState2["Purchasing"] = "PURCHASING";
6670
- ProposalState2["Purchased"] = "PURCHASED";
6671
- ProposalState2["Failed"] = "FAILED";
6672
- return ProposalState2;
6673
- })(ProposalState || {});
6674
- var ProposalProductState = /* @__PURE__ */ ((ProposalProductState2) => {
6675
- ProposalProductState2["Waiting"] = "WAITING";
6676
- ProposalProductState2["Failed"] = "FAILED";
6677
- ProposalProductState2["Active"] = "ACTIVE";
6678
- ProposalProductState2["Purchasing"] = "PURCHASING";
6679
- ProposalProductState2["Purchased"] = "PURCHASED";
6680
- return ProposalProductState2;
6681
- })(ProposalProductState || {});
5730
+ // src/index.ts
5731
+ export * from "@insurup/contracts";
6682
5732
  export {
6683
- ALL_AGENT_USER_FIELDS,
6684
- ALL_CASE_FIELDS,
6685
- ALL_CUSTOMER_FIELDS,
6686
- ALL_FILE_POLICY_TRANSFER_FIELDS,
6687
- ALL_POLICY_FIELDS,
6688
- ALL_POLICY_TRANSFER_FIELDS,
6689
- ALL_PROPOSAL_FIELDS,
6690
- ALL_WEBHOOK_DELIVERY_FIELDS,
6691
- AgentInsuranceCompanyType,
6692
- AgentUserState,
6693
- AracSegment,
6694
- AssetType,
6695
- B2CConfigFieldType,
6696
- CallCenterImplementation,
6697
- CancelCaseSubType,
6698
- CaseActivityAction,
6699
- CaseMainState,
6700
- CaseRepresentativeAssignmentMode,
6701
- CaseStatus,
6702
- CaseSubState,
6703
- CaseType,
6704
- Channel,
6705
- ComplaintCaseSubType,
6706
- ConsentType,
6707
- ContactFlowState,
6708
- ContactState,
6709
- ContactType,
6710
- Currency,
6711
- CustomerType,
6712
- DateOnly,
6713
- DateTime,
6714
5733
  DefaultInsurUpClient,
6715
- Disease,
6716
- EducationStatus,
6717
- EndorsementCaseSubType,
6718
5734
  endpoints_exports as Endpoints,
6719
- Gender,
6720
5735
  GraphQLTransport,
6721
- HastaneAgi,
6722
5736
  InsurUpAgentBranchClient,
6723
5737
  InsurUpAgentClient,
6724
5738
  InsurUpAgentRoleClient,
@@ -6730,6 +5744,7 @@ export {
6730
5744
  InsurUpCustomerClient,
6731
5745
  InsurUpError,
6732
5746
  InsurUpFileClient,
5747
+ InsurUpGraphQLErrorCode,
6733
5748
  InsurUpInsuranceClient,
6734
5749
  InsurUpLanguageClient,
6735
5750
  InsurUpPolicyClient,
@@ -6739,46 +5754,12 @@ export {
6739
5754
  InsurUpTemplateClient,
6740
5755
  InsurUpVehicleClient,
6741
5756
  InsurUpWebhookClient,
6742
- InsuranceProductType,
6743
- InsuranceSyncState,
6744
- Job,
6745
- LossPayeeClauseType,
6746
- MaritalStatus,
6747
- Nationality,
6748
- OnarimServisTuru,
6749
- PaymentOption,
6750
- PolicyState,
6751
- PolicyTransferCompanyFailureReason,
6752
- PolicyTransferTriggerStatus,
6753
- ProductBranch,
6754
- PropertyDamageStatus,
6755
- PropertyOwnershipType,
6756
- PropertyStructure,
6757
- PropertyUtilizationStyle,
6758
- ProposalProductState,
6759
- ProposalState,
6760
- RobotMode,
6761
- SaglikPaketiTedaviSekli,
6762
- SaleOpportunityCaseSubType,
6763
- SmsImplementation,
6764
- SortEnumType,
6765
- Surgery,
6766
- TasinanYuk,
6767
- TransferredPolicyFailureReason,
6768
- TransferredPolicySkipReason,
6769
- TransferredPolicyStatus,
6770
- UserType,
6771
5757
  VERSION,
6772
- VehicleAccessoryType,
6773
- VehicleFuelType,
6774
- VehicleUtilizationStyle,
6775
- WebhookDeliveryState,
6776
- WebhookEvent,
6777
- YedekParcaTuru,
6778
- buildFieldSelection,
5758
+ createGraphQLErrors,
6779
5759
  extractError,
6780
5760
  getDataOrThrow,
6781
- mergeCoverage,
6782
- throwIfError
5761
+ getGraphQLDataOrThrow,
5762
+ throwIfError,
5763
+ throwIfGraphQLError
6783
5764
  };
6784
5765
  //# sourceMappingURL=index.js.map