@insurup/sdk 0.1.1 → 0.1.2
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/README.md +102 -3
- package/dist/index.cjs +1280 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1539 -20
- package/dist/index.d.ts +1539 -20
- package/dist/index.js +1263 -14
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -7,14 +7,15 @@ var __export = (target, all) => {
|
|
|
7
7
|
// package.json
|
|
8
8
|
var package_default = {
|
|
9
9
|
name: "@insurup/sdk",
|
|
10
|
-
version: "0.1.
|
|
11
|
-
description: "Type-safe TypeScript SDK for the InsurUp insurance platform. Zero dependencies, tree-shakeable, works everywhere.",
|
|
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.",
|
|
12
12
|
keywords: [
|
|
13
13
|
"insurup",
|
|
14
14
|
"insurance",
|
|
15
15
|
"sdk",
|
|
16
16
|
"typescript",
|
|
17
17
|
"api-client",
|
|
18
|
+
"graphql",
|
|
18
19
|
"policy",
|
|
19
20
|
"claims",
|
|
20
21
|
"coverage",
|
|
@@ -89,6 +90,7 @@ var InsurUpClientErrorType = /* @__PURE__ */ ((InsurUpClientErrorType2) => {
|
|
|
89
90
|
InsurUpClientErrorType2["Timeout"] = "Timeout";
|
|
90
91
|
InsurUpClientErrorType2["HttpRequestFailed"] = "HttpRequestFailed";
|
|
91
92
|
InsurUpClientErrorType2["UnexpectedNoContent"] = "UnexpectedNoContent";
|
|
93
|
+
InsurUpClientErrorType2["GraphQLError"] = "GraphQLError";
|
|
92
94
|
return InsurUpClientErrorType2;
|
|
93
95
|
})(InsurUpClientErrorType || {});
|
|
94
96
|
var InsurUpServerErrorType = /* @__PURE__ */ ((InsurUpServerErrorType2) => {
|
|
@@ -1119,6 +1121,52 @@ var HttpTransport = class {
|
|
|
1119
1121
|
}
|
|
1120
1122
|
};
|
|
1121
1123
|
|
|
1124
|
+
// src/client/graphql.ts
|
|
1125
|
+
var GraphQLTransport = class {
|
|
1126
|
+
constructor(http) {
|
|
1127
|
+
this.http = http;
|
|
1128
|
+
}
|
|
1129
|
+
/**
|
|
1130
|
+
* Executes a GraphQL query or mutation
|
|
1131
|
+
* @param query The GraphQL query string
|
|
1132
|
+
* @param variables Optional variables for the query
|
|
1133
|
+
* @param options Optional request options
|
|
1134
|
+
* @returns Promise resolving to InsurUpResult<T>
|
|
1135
|
+
*/
|
|
1136
|
+
async query(query, variables, options) {
|
|
1137
|
+
const payload = {
|
|
1138
|
+
query,
|
|
1139
|
+
variables
|
|
1140
|
+
};
|
|
1141
|
+
const result = await this.http.post(
|
|
1142
|
+
"graphql",
|
|
1143
|
+
payload,
|
|
1144
|
+
options
|
|
1145
|
+
);
|
|
1146
|
+
if (!result.isSuccess) {
|
|
1147
|
+
return result;
|
|
1148
|
+
}
|
|
1149
|
+
const response = result.data;
|
|
1150
|
+
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;
|
|
1160
|
+
}
|
|
1161
|
+
if (!response.data) {
|
|
1162
|
+
return createDeserializationError(
|
|
1163
|
+
new Error("GraphQL response contained no data and no errors")
|
|
1164
|
+
);
|
|
1165
|
+
}
|
|
1166
|
+
return createSuccess(response.data);
|
|
1167
|
+
}
|
|
1168
|
+
};
|
|
1169
|
+
|
|
1122
1170
|
// src/core/endpoints.ts
|
|
1123
1171
|
var endpoints_exports = {};
|
|
1124
1172
|
__export(endpoints_exports, {
|
|
@@ -2399,10 +2447,159 @@ var InsurUpAgentSetupClient = class {
|
|
|
2399
2447
|
}
|
|
2400
2448
|
};
|
|
2401
2449
|
|
|
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
|
+
|
|
2402
2598
|
// src/clients/agentUser.ts
|
|
2403
2599
|
var InsurUpAgentUserClient = class {
|
|
2404
|
-
constructor(http) {
|
|
2600
|
+
constructor(http, graphql) {
|
|
2405
2601
|
this.http = http;
|
|
2602
|
+
this.graphql = graphql;
|
|
2406
2603
|
}
|
|
2407
2604
|
/**
|
|
2408
2605
|
* Retrieves the current agent user's profile information including personal details and platform settings.
|
|
@@ -2583,12 +2780,137 @@ var InsurUpAgentUserClient = class {
|
|
|
2583
2780
|
options
|
|
2584
2781
|
);
|
|
2585
2782
|
}
|
|
2783
|
+
// ============================================================================
|
|
2784
|
+
// GRAPHQL QUERIES
|
|
2785
|
+
// ============================================================================
|
|
2786
|
+
/**
|
|
2787
|
+
* Queries agent users using GraphQL with advanced filtering, searching, sorting, and field selection.
|
|
2788
|
+
* Supports cursor-based pagination and type-safe field selection.
|
|
2789
|
+
*
|
|
2790
|
+
* Gelişmiş filtreleme, arama, sıralama ve alan seçimi ile GraphQL kullanarak acente kullanıcılarını sorgular.
|
|
2791
|
+
* İmleç tabanlı sayfalama ve tip-güvenli alan seçimini destekler.
|
|
2792
|
+
*
|
|
2793
|
+
* @example
|
|
2794
|
+
* // Basic query with all fields
|
|
2795
|
+
* const result = await client.agentUsers.getAgentUsers({ first: 10 });
|
|
2796
|
+
*
|
|
2797
|
+
* @example
|
|
2798
|
+
* // Type-safe field selection
|
|
2799
|
+
* const result = await client.agentUsers.getAgentUsers({
|
|
2800
|
+
* select: ['id', 'email', 'name', 'state'] as const,
|
|
2801
|
+
* first: 10,
|
|
2802
|
+
* filter: { state: { eq: AgentUserState.Active } }
|
|
2803
|
+
* });
|
|
2804
|
+
*
|
|
2805
|
+
* @param requestOptions Query options including pagination, filters, search, and field selection
|
|
2806
|
+
* @returns Paginated connection of agent users with type-narrowed fields
|
|
2807
|
+
*/
|
|
2808
|
+
async getAgentUsers(requestOptions) {
|
|
2809
|
+
if (!this.graphql) {
|
|
2810
|
+
throw new Error(
|
|
2811
|
+
"GraphQL transport is not available. Ensure the client is properly initialized."
|
|
2812
|
+
);
|
|
2813
|
+
}
|
|
2814
|
+
const fields = requestOptions?.select ?? ALL_AGENT_USER_FIELDS;
|
|
2815
|
+
const fieldSelection = buildFieldSelection(fields);
|
|
2816
|
+
const query = `
|
|
2817
|
+
query GetAgentUsers(
|
|
2818
|
+
$first: Int
|
|
2819
|
+
$after: String
|
|
2820
|
+
$last: Int
|
|
2821
|
+
$before: String
|
|
2822
|
+
$search: searching_QueryAgentUserResultFilterInput
|
|
2823
|
+
$filter: filtering_QueryAgentUserResultFilterInput
|
|
2824
|
+
$order: [sorting_QueryAgentUserResultSortInput!]
|
|
2825
|
+
) {
|
|
2826
|
+
agentUsersNew(
|
|
2827
|
+
first: $first
|
|
2828
|
+
after: $after
|
|
2829
|
+
last: $last
|
|
2830
|
+
before: $before
|
|
2831
|
+
search: $search
|
|
2832
|
+
filter: $filter
|
|
2833
|
+
order: $order
|
|
2834
|
+
) {
|
|
2835
|
+
pageInfo {
|
|
2836
|
+
hasNextPage
|
|
2837
|
+
hasPreviousPage
|
|
2838
|
+
startCursor
|
|
2839
|
+
endCursor
|
|
2840
|
+
}
|
|
2841
|
+
totalCount
|
|
2842
|
+
edges {
|
|
2843
|
+
cursor
|
|
2844
|
+
node {
|
|
2845
|
+
${fieldSelection}
|
|
2846
|
+
}
|
|
2847
|
+
}
|
|
2848
|
+
nodes {
|
|
2849
|
+
${fieldSelection}
|
|
2850
|
+
}
|
|
2851
|
+
}
|
|
2852
|
+
}
|
|
2853
|
+
`;
|
|
2854
|
+
const variables = {
|
|
2855
|
+
first: requestOptions?.first,
|
|
2856
|
+
after: requestOptions?.after,
|
|
2857
|
+
last: requestOptions?.last,
|
|
2858
|
+
before: requestOptions?.before,
|
|
2859
|
+
search: requestOptions?.search,
|
|
2860
|
+
filter: requestOptions?.filter,
|
|
2861
|
+
order: requestOptions?.order
|
|
2862
|
+
};
|
|
2863
|
+
const result = await this.graphql.query(query, variables);
|
|
2864
|
+
if (!result.isSuccess) {
|
|
2865
|
+
return result;
|
|
2866
|
+
}
|
|
2867
|
+
return {
|
|
2868
|
+
...result,
|
|
2869
|
+
data: result.data.agentUsersNew
|
|
2870
|
+
};
|
|
2871
|
+
}
|
|
2586
2872
|
};
|
|
2587
2873
|
|
|
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
|
+
|
|
2588
2909
|
// src/clients/customer.ts
|
|
2589
2910
|
var InsurUpCustomerClient = class {
|
|
2590
|
-
constructor(http) {
|
|
2911
|
+
constructor(http, graphql) {
|
|
2591
2912
|
this.http = http;
|
|
2913
|
+
this.graphql = graphql;
|
|
2592
2914
|
}
|
|
2593
2915
|
/**
|
|
2594
2916
|
* Creates a new customer profile with essential personal and contact information.
|
|
@@ -2959,6 +3281,109 @@ var InsurUpCustomerClient = class {
|
|
|
2959
3281
|
options
|
|
2960
3282
|
);
|
|
2961
3283
|
}
|
|
3284
|
+
// ============================================
|
|
3285
|
+
// GraphQL Methods
|
|
3286
|
+
// ============================================
|
|
3287
|
+
/**
|
|
3288
|
+
* Retrieves a paginated list of customers using GraphQL with type-safe field selection.
|
|
3289
|
+
*
|
|
3290
|
+
* GraphQL kullanarak tip güvenli alan seçimi ile sayfalanmış müşteri listesi getirir.
|
|
3291
|
+
*
|
|
3292
|
+
* @example
|
|
3293
|
+
* // Get all fields
|
|
3294
|
+
* const result = await client.customers.getCustomers({ first: 10 });
|
|
3295
|
+
*
|
|
3296
|
+
* @example
|
|
3297
|
+
* // Type-safe field selection
|
|
3298
|
+
* const result = await client.customers.getCustomers({
|
|
3299
|
+
* select: ['id', 'name', 'type', 'primaryEmail'] as const,
|
|
3300
|
+
* first: 10,
|
|
3301
|
+
* filter: { type: { eq: CustomerType.INDIVIDUAL } }
|
|
3302
|
+
* });
|
|
3303
|
+
* // result.data.nodes[0].id - ✓ string
|
|
3304
|
+
* // result.data.nodes[0].name - ✓ string | null
|
|
3305
|
+
* // result.data.nodes[0].type - ✓ CustomerType
|
|
3306
|
+
* // result.data.nodes[0].birthDate - ✗ TypeScript Error!
|
|
3307
|
+
*
|
|
3308
|
+
* @param requestOptions Query options including pagination, filters, search, and field selection
|
|
3309
|
+
* @returns Paginated connection of customers with type-narrowed fields
|
|
3310
|
+
*/
|
|
3311
|
+
async getCustomers(requestOptions) {
|
|
3312
|
+
if (!this.graphql) {
|
|
3313
|
+
throw new Error(
|
|
3314
|
+
"GraphQL transport is not available. Ensure the client is properly initialized."
|
|
3315
|
+
);
|
|
3316
|
+
}
|
|
3317
|
+
const fields = requestOptions?.select ?? ALL_CUSTOMER_FIELDS;
|
|
3318
|
+
const fieldSelection = buildFieldSelection(fields);
|
|
3319
|
+
const query = `
|
|
3320
|
+
query GetCustomers(
|
|
3321
|
+
$first: Int
|
|
3322
|
+
$after: String
|
|
3323
|
+
$last: Int
|
|
3324
|
+
$before: String
|
|
3325
|
+
$search: QueryCustomerModelSearchInput
|
|
3326
|
+
$filter: QueryCustomerModelFilterInput
|
|
3327
|
+
$order: [QueryCustomerModelSortInput!]
|
|
3328
|
+
) {
|
|
3329
|
+
customersNew(
|
|
3330
|
+
first: $first
|
|
3331
|
+
after: $after
|
|
3332
|
+
last: $last
|
|
3333
|
+
before: $before
|
|
3334
|
+
search: $search
|
|
3335
|
+
where: $filter
|
|
3336
|
+
order: $order
|
|
3337
|
+
) {
|
|
3338
|
+
pageInfo {
|
|
3339
|
+
hasNextPage
|
|
3340
|
+
hasPreviousPage
|
|
3341
|
+
startCursor
|
|
3342
|
+
endCursor
|
|
3343
|
+
}
|
|
3344
|
+
totalCount
|
|
3345
|
+
edges {
|
|
3346
|
+
cursor
|
|
3347
|
+
node {
|
|
3348
|
+
${fieldSelection}
|
|
3349
|
+
}
|
|
3350
|
+
}
|
|
3351
|
+
}
|
|
3352
|
+
}
|
|
3353
|
+
`;
|
|
3354
|
+
const variables = {};
|
|
3355
|
+
if (requestOptions?.first === void 0 && requestOptions?.last === void 0) {
|
|
3356
|
+
variables.first = 50;
|
|
3357
|
+
} else {
|
|
3358
|
+
if (requestOptions?.first !== void 0)
|
|
3359
|
+
variables.first = requestOptions.first;
|
|
3360
|
+
if (requestOptions?.last !== void 0)
|
|
3361
|
+
variables.last = requestOptions.last;
|
|
3362
|
+
}
|
|
3363
|
+
if (requestOptions?.after !== void 0)
|
|
3364
|
+
variables.after = requestOptions.after;
|
|
3365
|
+
if (requestOptions?.before !== void 0)
|
|
3366
|
+
variables.before = requestOptions.before;
|
|
3367
|
+
if (requestOptions?.search !== void 0)
|
|
3368
|
+
variables.search = requestOptions.search;
|
|
3369
|
+
if (requestOptions?.filter !== void 0)
|
|
3370
|
+
variables.filter = requestOptions.filter;
|
|
3371
|
+
if (requestOptions?.order !== void 0)
|
|
3372
|
+
variables.order = requestOptions.order;
|
|
3373
|
+
const result = await this.graphql.query(query, variables);
|
|
3374
|
+
if (!result.isSuccess) {
|
|
3375
|
+
return result;
|
|
3376
|
+
}
|
|
3377
|
+
const edges = result.data.customersNew.edges;
|
|
3378
|
+
const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;
|
|
3379
|
+
return {
|
|
3380
|
+
...result,
|
|
3381
|
+
data: {
|
|
3382
|
+
...result.data.customersNew,
|
|
3383
|
+
nodes
|
|
3384
|
+
}
|
|
3385
|
+
};
|
|
3386
|
+
}
|
|
2962
3387
|
};
|
|
2963
3388
|
|
|
2964
3389
|
// src/clients/vehicle.ts
|
|
@@ -3299,10 +3724,125 @@ var InsurUpPropertyClient = class {
|
|
|
3299
3724
|
}
|
|
3300
3725
|
};
|
|
3301
3726
|
|
|
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
|
+
|
|
3302
3841
|
// src/clients/policy.ts
|
|
3303
3842
|
var InsurUpPolicyClient = class {
|
|
3304
|
-
constructor(http) {
|
|
3843
|
+
constructor(http, graphql) {
|
|
3305
3844
|
this.http = http;
|
|
3845
|
+
this.graphql = graphql;
|
|
3306
3846
|
}
|
|
3307
3847
|
/**
|
|
3308
3848
|
* Retrieves comprehensive details of a specific policy including coverage information, premium details, and current status.
|
|
@@ -3579,12 +4119,350 @@ var InsurUpPolicyClient = class {
|
|
|
3579
4119
|
options
|
|
3580
4120
|
);
|
|
3581
4121
|
}
|
|
4122
|
+
// ============================================================================
|
|
4123
|
+
// GRAPHQL QUERIES
|
|
4124
|
+
// ============================================================================
|
|
4125
|
+
/**
|
|
4126
|
+
* Queries policies using GraphQL with advanced filtering, searching, sorting, and field selection.
|
|
4127
|
+
* Supports cursor-based pagination and type-safe field selection.
|
|
4128
|
+
*
|
|
4129
|
+
* Gelişmiş filtreleme, arama, sıralama ve alan seçimi ile GraphQL kullanarak poliçeleri sorgular.
|
|
4130
|
+
* İmleç tabanlı sayfalama ve tip-güvenli alan seçimini destekler.
|
|
4131
|
+
*
|
|
4132
|
+
* @example
|
|
4133
|
+
* // Basic query with all fields
|
|
4134
|
+
* const result = await client.policies.getPolicies({ first: 10 });
|
|
4135
|
+
*
|
|
4136
|
+
* @example
|
|
4137
|
+
* // Type-safe field selection
|
|
4138
|
+
* const result = await client.policies.getPolicies({
|
|
4139
|
+
* select: ['id', 'productBranch', 'grossPremium', 'state'] as const,
|
|
4140
|
+
* first: 10,
|
|
4141
|
+
* filter: { state: { eq: PolicyState.Active } }
|
|
4142
|
+
* });
|
|
4143
|
+
*
|
|
4144
|
+
* @param requestOptions Query options including pagination, filters, search, and field selection
|
|
4145
|
+
* @returns Paginated connection of policies with type-narrowed fields
|
|
4146
|
+
*/
|
|
4147
|
+
async getPolicies(requestOptions) {
|
|
4148
|
+
if (!this.graphql) {
|
|
4149
|
+
throw new Error(
|
|
4150
|
+
"GraphQL transport is not available. Ensure the client is properly initialized."
|
|
4151
|
+
);
|
|
4152
|
+
}
|
|
4153
|
+
const fields = requestOptions?.select ?? ALL_POLICY_FIELDS;
|
|
4154
|
+
const fieldSelection = buildFieldSelection(fields);
|
|
4155
|
+
const query = `
|
|
4156
|
+
query GetPolicies(
|
|
4157
|
+
$first: Int
|
|
4158
|
+
$after: String
|
|
4159
|
+
$last: Int
|
|
4160
|
+
$before: String
|
|
4161
|
+
$search: searching_QueryPoliciesResultFilterInput
|
|
4162
|
+
$filter: filtering_QueryPoliciesResultFilterInput
|
|
4163
|
+
$order: [sorting_QueryPoliciesResultSortInput!]
|
|
4164
|
+
) {
|
|
4165
|
+
policiesNew(
|
|
4166
|
+
first: $first
|
|
4167
|
+
after: $after
|
|
4168
|
+
last: $last
|
|
4169
|
+
before: $before
|
|
4170
|
+
search: $search
|
|
4171
|
+
filter: $filter
|
|
4172
|
+
order: $order
|
|
4173
|
+
) {
|
|
4174
|
+
pageInfo {
|
|
4175
|
+
hasNextPage
|
|
4176
|
+
hasPreviousPage
|
|
4177
|
+
startCursor
|
|
4178
|
+
endCursor
|
|
4179
|
+
}
|
|
4180
|
+
totalCount
|
|
4181
|
+
edges {
|
|
4182
|
+
cursor
|
|
4183
|
+
node {
|
|
4184
|
+
${fieldSelection}
|
|
4185
|
+
}
|
|
4186
|
+
}
|
|
4187
|
+
nodes {
|
|
4188
|
+
${fieldSelection}
|
|
4189
|
+
}
|
|
4190
|
+
}
|
|
4191
|
+
}
|
|
4192
|
+
`;
|
|
4193
|
+
const variables = {
|
|
4194
|
+
first: requestOptions?.first,
|
|
4195
|
+
after: requestOptions?.after,
|
|
4196
|
+
last: requestOptions?.last,
|
|
4197
|
+
before: requestOptions?.before,
|
|
4198
|
+
search: requestOptions?.search,
|
|
4199
|
+
filter: requestOptions?.filter,
|
|
4200
|
+
order: requestOptions?.order
|
|
4201
|
+
};
|
|
4202
|
+
const result = await this.graphql.query(query, variables);
|
|
4203
|
+
if (!result.isSuccess) {
|
|
4204
|
+
return result;
|
|
4205
|
+
}
|
|
4206
|
+
return {
|
|
4207
|
+
...result,
|
|
4208
|
+
data: result.data.policiesNew
|
|
4209
|
+
};
|
|
4210
|
+
}
|
|
4211
|
+
/**
|
|
4212
|
+
* Queries policy transfers using GraphQL with advanced filtering, searching, sorting, and field selection.
|
|
4213
|
+
* Supports cursor-based pagination and type-safe field selection.
|
|
4214
|
+
*
|
|
4215
|
+
* Gelişmiş filtreleme, arama, sıralama ve alan seçimi ile GraphQL kullanarak poliçe transferlerini sorgular.
|
|
4216
|
+
* İmleç tabanlı sayfalama ve tip-güvenli alan seçimini destekler.
|
|
4217
|
+
*
|
|
4218
|
+
* @example
|
|
4219
|
+
* // Basic query with all fields
|
|
4220
|
+
* const result = await client.policies.getPolicyTransfers({ first: 10 });
|
|
4221
|
+
*
|
|
4222
|
+
* @param requestOptions Query options including pagination, filters, search, and field selection
|
|
4223
|
+
* @returns Paginated connection of policy transfers with type-narrowed fields
|
|
4224
|
+
*/
|
|
4225
|
+
async getPolicyTransfers(requestOptions) {
|
|
4226
|
+
if (!this.graphql) {
|
|
4227
|
+
throw new Error(
|
|
4228
|
+
"GraphQL transport is not available. Ensure the client is properly initialized."
|
|
4229
|
+
);
|
|
4230
|
+
}
|
|
4231
|
+
const fields = requestOptions?.select ?? ALL_POLICY_TRANSFER_FIELDS;
|
|
4232
|
+
const fieldSelection = buildFieldSelection(fields);
|
|
4233
|
+
const query = `
|
|
4234
|
+
query GetPolicyTransfers(
|
|
4235
|
+
$first: Int
|
|
4236
|
+
$after: String
|
|
4237
|
+
$last: Int
|
|
4238
|
+
$before: String
|
|
4239
|
+
$search: searching_QueryPolicyTransfersResultFilterInput
|
|
4240
|
+
$filter: filtering_QueryPolicyTransfersResultFilterInput
|
|
4241
|
+
$order: [sorting_QueryPolicyTransfersResultSortInput!]
|
|
4242
|
+
) {
|
|
4243
|
+
policyTransfersNew(
|
|
4244
|
+
first: $first
|
|
4245
|
+
after: $after
|
|
4246
|
+
last: $last
|
|
4247
|
+
before: $before
|
|
4248
|
+
search: $search
|
|
4249
|
+
filter: $filter
|
|
4250
|
+
order: $order
|
|
4251
|
+
) {
|
|
4252
|
+
pageInfo {
|
|
4253
|
+
hasNextPage
|
|
4254
|
+
hasPreviousPage
|
|
4255
|
+
startCursor
|
|
4256
|
+
endCursor
|
|
4257
|
+
}
|
|
4258
|
+
totalCount
|
|
4259
|
+
edges {
|
|
4260
|
+
cursor
|
|
4261
|
+
node {
|
|
4262
|
+
${fieldSelection}
|
|
4263
|
+
}
|
|
4264
|
+
}
|
|
4265
|
+
nodes {
|
|
4266
|
+
${fieldSelection}
|
|
4267
|
+
}
|
|
4268
|
+
}
|
|
4269
|
+
}
|
|
4270
|
+
`;
|
|
4271
|
+
const variables = {
|
|
4272
|
+
first: requestOptions?.first,
|
|
4273
|
+
after: requestOptions?.after,
|
|
4274
|
+
last: requestOptions?.last,
|
|
4275
|
+
before: requestOptions?.before,
|
|
4276
|
+
search: requestOptions?.search,
|
|
4277
|
+
filter: requestOptions?.filter,
|
|
4278
|
+
order: requestOptions?.order
|
|
4279
|
+
};
|
|
4280
|
+
const result = await this.graphql.query(query, variables);
|
|
4281
|
+
if (!result.isSuccess) {
|
|
4282
|
+
return result;
|
|
4283
|
+
}
|
|
4284
|
+
return {
|
|
4285
|
+
...result,
|
|
4286
|
+
data: result.data.policyTransfersNew
|
|
4287
|
+
};
|
|
4288
|
+
}
|
|
4289
|
+
/**
|
|
4290
|
+
* Queries file policy transfers using GraphQL with advanced filtering, searching, sorting, and field selection.
|
|
4291
|
+
* Supports cursor-based pagination and type-safe field selection.
|
|
4292
|
+
*
|
|
4293
|
+
* Gelişmiş filtreleme, arama, sıralama ve alan seçimi ile GraphQL kullanarak dosya bazlı poliçe transferlerini sorgular.
|
|
4294
|
+
* İmleç tabanlı sayfalama ve tip-güvenli alan seçimini destekler.
|
|
4295
|
+
*
|
|
4296
|
+
* @example
|
|
4297
|
+
* // Basic query with all fields
|
|
4298
|
+
* const result = await client.policies.getFilePolicyTransfers({ first: 10 });
|
|
4299
|
+
*
|
|
4300
|
+
* @param requestOptions Query options including pagination, filters, search, and field selection
|
|
4301
|
+
* @returns Paginated connection of file policy transfers with type-narrowed fields
|
|
4302
|
+
*/
|
|
4303
|
+
async getFilePolicyTransfers(requestOptions) {
|
|
4304
|
+
if (!this.graphql) {
|
|
4305
|
+
throw new Error(
|
|
4306
|
+
"GraphQL transport is not available. Ensure the client is properly initialized."
|
|
4307
|
+
);
|
|
4308
|
+
}
|
|
4309
|
+
const fields = requestOptions?.select ?? ALL_FILE_POLICY_TRANSFER_FIELDS;
|
|
4310
|
+
const fieldSelection = buildFieldSelection(fields);
|
|
4311
|
+
const query = `
|
|
4312
|
+
query GetFilePolicyTransfers(
|
|
4313
|
+
$first: Int
|
|
4314
|
+
$after: String
|
|
4315
|
+
$last: Int
|
|
4316
|
+
$before: String
|
|
4317
|
+
$search: searching_QueryFilePolicyTransfersResultFilterInput
|
|
4318
|
+
$filter: filtering_QueryFilePolicyTransfersResultFilterInput
|
|
4319
|
+
$order: [sorting_QueryFilePolicyTransfersResultSortInput!]
|
|
4320
|
+
) {
|
|
4321
|
+
filePolicyTransfersNew(
|
|
4322
|
+
first: $first
|
|
4323
|
+
after: $after
|
|
4324
|
+
last: $last
|
|
4325
|
+
before: $before
|
|
4326
|
+
search: $search
|
|
4327
|
+
filter: $filter
|
|
4328
|
+
order: $order
|
|
4329
|
+
) {
|
|
4330
|
+
pageInfo {
|
|
4331
|
+
hasNextPage
|
|
4332
|
+
hasPreviousPage
|
|
4333
|
+
startCursor
|
|
4334
|
+
endCursor
|
|
4335
|
+
}
|
|
4336
|
+
totalCount
|
|
4337
|
+
edges {
|
|
4338
|
+
cursor
|
|
4339
|
+
node {
|
|
4340
|
+
${fieldSelection}
|
|
4341
|
+
}
|
|
4342
|
+
}
|
|
4343
|
+
nodes {
|
|
4344
|
+
${fieldSelection}
|
|
4345
|
+
}
|
|
4346
|
+
}
|
|
4347
|
+
}
|
|
4348
|
+
`;
|
|
4349
|
+
const variables = {
|
|
4350
|
+
first: requestOptions?.first,
|
|
4351
|
+
after: requestOptions?.after,
|
|
4352
|
+
last: requestOptions?.last,
|
|
4353
|
+
before: requestOptions?.before,
|
|
4354
|
+
search: requestOptions?.search,
|
|
4355
|
+
filter: requestOptions?.filter,
|
|
4356
|
+
order: requestOptions?.order
|
|
4357
|
+
};
|
|
4358
|
+
const result = await this.graphql.query(query, variables);
|
|
4359
|
+
if (!result.isSuccess) {
|
|
4360
|
+
return result;
|
|
4361
|
+
}
|
|
4362
|
+
return {
|
|
4363
|
+
...result,
|
|
4364
|
+
data: result.data.filePolicyTransfersNew
|
|
4365
|
+
};
|
|
4366
|
+
}
|
|
3582
4367
|
};
|
|
3583
4368
|
|
|
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
|
+
|
|
3584
4461
|
// src/clients/case.ts
|
|
3585
4462
|
var InsurUpCaseClient = class {
|
|
3586
|
-
constructor(http) {
|
|
4463
|
+
constructor(http, graphql) {
|
|
3587
4464
|
this.http = http;
|
|
4465
|
+
this.graphql = graphql;
|
|
3588
4466
|
}
|
|
3589
4467
|
/**
|
|
3590
4468
|
* Assigns a case representative to handle a specific customer case, ensuring proper ownership and accountability.
|
|
@@ -3847,12 +4725,121 @@ var InsurUpCaseClient = class {
|
|
|
3847
4725
|
options
|
|
3848
4726
|
);
|
|
3849
4727
|
}
|
|
4728
|
+
// ============================================================================
|
|
4729
|
+
// GRAPHQL QUERIES
|
|
4730
|
+
// ============================================================================
|
|
4731
|
+
/**
|
|
4732
|
+
* Queries cases using GraphQL with advanced filtering, searching, sorting, and field selection.
|
|
4733
|
+
* Supports cursor-based pagination and type-safe field selection.
|
|
4734
|
+
*
|
|
4735
|
+
* Gelişmiş filtreleme, arama, sıralama ve alan seçimi ile GraphQL kullanarak talepleri sorgular.
|
|
4736
|
+
* İmleç tabanlı sayfalama ve tip-güvenli alan seçimini destekler.
|
|
4737
|
+
*
|
|
4738
|
+
* @example
|
|
4739
|
+
* // Basic query with all fields
|
|
4740
|
+
* const result = await client.cases.getCases({ first: 10 });
|
|
4741
|
+
*
|
|
4742
|
+
* @example
|
|
4743
|
+
* // Type-safe field selection
|
|
4744
|
+
* const result = await client.cases.getCases({
|
|
4745
|
+
* select: ['id', 'ref', 'type', 'status', 'mainState'] as const,
|
|
4746
|
+
* first: 10,
|
|
4747
|
+
* filter: { type: { eq: CaseType.NewSaleOpportunity } }
|
|
4748
|
+
* });
|
|
4749
|
+
*
|
|
4750
|
+
* @param requestOptions Query options including pagination, filters, search, and field selection
|
|
4751
|
+
* @returns Paginated connection of cases with type-narrowed fields
|
|
4752
|
+
*/
|
|
4753
|
+
async getCases(requestOptions) {
|
|
4754
|
+
if (!this.graphql) {
|
|
4755
|
+
throw new Error(
|
|
4756
|
+
"GraphQL transport is not available. Ensure the client is properly initialized."
|
|
4757
|
+
);
|
|
4758
|
+
}
|
|
4759
|
+
const fields = requestOptions?.select ?? ALL_CASE_FIELDS;
|
|
4760
|
+
const fieldSelection = buildFieldSelection(fields);
|
|
4761
|
+
const query = `
|
|
4762
|
+
query GetCases(
|
|
4763
|
+
$first: Int
|
|
4764
|
+
$after: String
|
|
4765
|
+
$last: Int
|
|
4766
|
+
$before: String
|
|
4767
|
+
$search: searching_QueryCaseModelFilterInput
|
|
4768
|
+
$filter: filtering_QueryCaseModelFilterInput
|
|
4769
|
+
$order: [sorting_QueryCaseModelSortInput!]
|
|
4770
|
+
) {
|
|
4771
|
+
casesNew(
|
|
4772
|
+
first: $first
|
|
4773
|
+
after: $after
|
|
4774
|
+
last: $last
|
|
4775
|
+
before: $before
|
|
4776
|
+
search: $search
|
|
4777
|
+
filter: $filter
|
|
4778
|
+
order: $order
|
|
4779
|
+
) {
|
|
4780
|
+
pageInfo {
|
|
4781
|
+
hasNextPage
|
|
4782
|
+
hasPreviousPage
|
|
4783
|
+
startCursor
|
|
4784
|
+
endCursor
|
|
4785
|
+
}
|
|
4786
|
+
totalCount
|
|
4787
|
+
edges {
|
|
4788
|
+
cursor
|
|
4789
|
+
node {
|
|
4790
|
+
${fieldSelection}
|
|
4791
|
+
}
|
|
4792
|
+
}
|
|
4793
|
+
nodes {
|
|
4794
|
+
${fieldSelection}
|
|
4795
|
+
}
|
|
4796
|
+
}
|
|
4797
|
+
}
|
|
4798
|
+
`;
|
|
4799
|
+
const variables = {
|
|
4800
|
+
first: requestOptions?.first,
|
|
4801
|
+
after: requestOptions?.after,
|
|
4802
|
+
last: requestOptions?.last,
|
|
4803
|
+
before: requestOptions?.before,
|
|
4804
|
+
search: requestOptions?.search,
|
|
4805
|
+
filter: requestOptions?.filter,
|
|
4806
|
+
order: requestOptions?.order
|
|
4807
|
+
};
|
|
4808
|
+
const result = await this.graphql.query(query, variables);
|
|
4809
|
+
if (!result.isSuccess) {
|
|
4810
|
+
return result;
|
|
4811
|
+
}
|
|
4812
|
+
return {
|
|
4813
|
+
...result,
|
|
4814
|
+
data: result.data.casesNew
|
|
4815
|
+
};
|
|
4816
|
+
}
|
|
3850
4817
|
};
|
|
3851
4818
|
|
|
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
|
+
|
|
3852
4838
|
// src/clients/webhook.ts
|
|
3853
4839
|
var InsurUpWebhookClient = class {
|
|
3854
|
-
constructor(http) {
|
|
4840
|
+
constructor(http, graphql) {
|
|
3855
4841
|
this.http = http;
|
|
4842
|
+
this.graphql = graphql;
|
|
3856
4843
|
}
|
|
3857
4844
|
/**
|
|
3858
4845
|
* Creates a new webhook configuration to receive event notifications from the InsurUp platform.
|
|
@@ -3947,6 +4934,95 @@ var InsurUpWebhookClient = class {
|
|
|
3947
4934
|
);
|
|
3948
4935
|
return this.http.postNoContent(endpoint, void 0, options);
|
|
3949
4936
|
}
|
|
4937
|
+
// ============================================================================
|
|
4938
|
+
// GRAPHQL QUERIES
|
|
4939
|
+
// ============================================================================
|
|
4940
|
+
/**
|
|
4941
|
+
* Queries webhook deliveries using GraphQL with advanced filtering, searching, sorting, and field selection.
|
|
4942
|
+
* Supports cursor-based pagination and type-safe field selection.
|
|
4943
|
+
*
|
|
4944
|
+
* Gelişmiş filtreleme, arama, sıralama ve alan seçimi ile GraphQL kullanarak webhook teslimatlarını sorgular.
|
|
4945
|
+
* İmleç tabanlı sayfalama ve tip-güvenli alan seçimini destekler.
|
|
4946
|
+
*
|
|
4947
|
+
* @example
|
|
4948
|
+
* // Basic query with all fields
|
|
4949
|
+
* const result = await client.webhooks.getWebhookDeliveries({ first: 10 });
|
|
4950
|
+
*
|
|
4951
|
+
* @example
|
|
4952
|
+
* // Type-safe field selection with filter
|
|
4953
|
+
* const result = await client.webhooks.getWebhookDeliveries({
|
|
4954
|
+
* select: ['id', 'webhookId', 'event', 'state'] as const,
|
|
4955
|
+
* first: 10,
|
|
4956
|
+
* filter: { state: { eq: WebhookDeliveryState.Failed } }
|
|
4957
|
+
* });
|
|
4958
|
+
*
|
|
4959
|
+
* @param requestOptions Query options including pagination, filters, search, and field selection
|
|
4960
|
+
* @returns Paginated connection of webhook deliveries with type-narrowed fields
|
|
4961
|
+
*/
|
|
4962
|
+
async getWebhookDeliveries(requestOptions) {
|
|
4963
|
+
if (!this.graphql) {
|
|
4964
|
+
throw new Error(
|
|
4965
|
+
"GraphQL transport is not available. Ensure the client is properly initialized."
|
|
4966
|
+
);
|
|
4967
|
+
}
|
|
4968
|
+
const fields = requestOptions?.select ?? ALL_WEBHOOK_DELIVERY_FIELDS;
|
|
4969
|
+
const fieldSelection = buildFieldSelection(fields);
|
|
4970
|
+
const query = `
|
|
4971
|
+
query GetWebhookDeliveries(
|
|
4972
|
+
$first: Int
|
|
4973
|
+
$after: String
|
|
4974
|
+
$last: Int
|
|
4975
|
+
$before: String
|
|
4976
|
+
$search: searching_QueryWebhookDeliveryResultFilterInput
|
|
4977
|
+
$filter: filtering_QueryWebhookDeliveryResultFilterInput
|
|
4978
|
+
$order: [sorting_QueryWebhookDeliveryResultSortInput!]
|
|
4979
|
+
) {
|
|
4980
|
+
webhookDeliveriesNew(
|
|
4981
|
+
first: $first
|
|
4982
|
+
after: $after
|
|
4983
|
+
last: $last
|
|
4984
|
+
before: $before
|
|
4985
|
+
search: $search
|
|
4986
|
+
filter: $filter
|
|
4987
|
+
order: $order
|
|
4988
|
+
) {
|
|
4989
|
+
pageInfo {
|
|
4990
|
+
hasNextPage
|
|
4991
|
+
hasPreviousPage
|
|
4992
|
+
startCursor
|
|
4993
|
+
endCursor
|
|
4994
|
+
}
|
|
4995
|
+
totalCount
|
|
4996
|
+
edges {
|
|
4997
|
+
cursor
|
|
4998
|
+
node {
|
|
4999
|
+
${fieldSelection}
|
|
5000
|
+
}
|
|
5001
|
+
}
|
|
5002
|
+
nodes {
|
|
5003
|
+
${fieldSelection}
|
|
5004
|
+
}
|
|
5005
|
+
}
|
|
5006
|
+
}
|
|
5007
|
+
`;
|
|
5008
|
+
const variables = {
|
|
5009
|
+
first: requestOptions?.first,
|
|
5010
|
+
after: requestOptions?.after,
|
|
5011
|
+
last: requestOptions?.last,
|
|
5012
|
+
before: requestOptions?.before,
|
|
5013
|
+
search: requestOptions?.search,
|
|
5014
|
+
filter: requestOptions?.filter,
|
|
5015
|
+
order: requestOptions?.order
|
|
5016
|
+
};
|
|
5017
|
+
const result = await this.graphql.query(query, variables);
|
|
5018
|
+
if (!result.isSuccess) {
|
|
5019
|
+
return result;
|
|
5020
|
+
}
|
|
5021
|
+
return {
|
|
5022
|
+
...result,
|
|
5023
|
+
data: result.data.webhookDeliveriesNew
|
|
5024
|
+
};
|
|
5025
|
+
}
|
|
3950
5026
|
};
|
|
3951
5027
|
|
|
3952
5028
|
// src/clients/coverage.ts
|
|
@@ -4198,10 +5274,64 @@ var InsurUpInsuranceClient = class {
|
|
|
4198
5274
|
}
|
|
4199
5275
|
};
|
|
4200
5276
|
|
|
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
|
+
|
|
4201
5330
|
// src/clients/proposal.ts
|
|
4202
5331
|
var InsurUpProposalClient = class {
|
|
4203
|
-
constructor(http) {
|
|
5332
|
+
constructor(http, graphql) {
|
|
4204
5333
|
this.http = http;
|
|
5334
|
+
this.graphql = graphql;
|
|
4205
5335
|
}
|
|
4206
5336
|
/**
|
|
4207
5337
|
* Creates a new insurance proposal with customer information, coverage selections, and product options for quotation.
|
|
@@ -4528,6 +5658,95 @@ var InsurUpProposalClient = class {
|
|
|
4528
5658
|
options
|
|
4529
5659
|
);
|
|
4530
5660
|
}
|
|
5661
|
+
// ============================================================================
|
|
5662
|
+
// GRAPHQL QUERIES
|
|
5663
|
+
// ============================================================================
|
|
5664
|
+
/**
|
|
5665
|
+
* Queries proposals using GraphQL with advanced filtering, searching, sorting, and field selection.
|
|
5666
|
+
* Supports cursor-based pagination and type-safe field selection.
|
|
5667
|
+
*
|
|
5668
|
+
* Gelişmiş filtreleme, arama, sıralama ve alan seçimi ile GraphQL kullanarak teklifleri sorgular.
|
|
5669
|
+
* İmleç tabanlı sayfalama ve tip-güvenli alan seçimini destekler.
|
|
5670
|
+
*
|
|
5671
|
+
* @example
|
|
5672
|
+
* // Basic query with all fields
|
|
5673
|
+
* const result = await client.proposals.getProposals({ first: 10 });
|
|
5674
|
+
*
|
|
5675
|
+
* @example
|
|
5676
|
+
* // Type-safe field selection
|
|
5677
|
+
* const result = await client.proposals.getProposals({
|
|
5678
|
+
* select: ['id', 'productBranch', 'state', 'insuredCustomerName'] as const,
|
|
5679
|
+
* first: 10,
|
|
5680
|
+
* filter: { state: { eq: ProposalState.Active } }
|
|
5681
|
+
* });
|
|
5682
|
+
*
|
|
5683
|
+
* @param requestOptions Query options including pagination, filters, search, and field selection
|
|
5684
|
+
* @returns Paginated connection of proposals with type-narrowed fields
|
|
5685
|
+
*/
|
|
5686
|
+
async getProposals(requestOptions) {
|
|
5687
|
+
if (!this.graphql) {
|
|
5688
|
+
throw new Error(
|
|
5689
|
+
"GraphQL transport is not available. Ensure the client is properly initialized."
|
|
5690
|
+
);
|
|
5691
|
+
}
|
|
5692
|
+
const fields = requestOptions?.select ?? ALL_PROPOSAL_FIELDS;
|
|
5693
|
+
const fieldSelection = buildFieldSelection(fields);
|
|
5694
|
+
const query = `
|
|
5695
|
+
query GetProposals(
|
|
5696
|
+
$first: Int
|
|
5697
|
+
$after: String
|
|
5698
|
+
$last: Int
|
|
5699
|
+
$before: String
|
|
5700
|
+
$search: searching_QueryProposalsResultFilterInput
|
|
5701
|
+
$filter: filtering_QueryProposalsResultFilterInput
|
|
5702
|
+
$order: [sorting_QueryProposalsResultSortInput!]
|
|
5703
|
+
) {
|
|
5704
|
+
proposalsNew(
|
|
5705
|
+
first: $first
|
|
5706
|
+
after: $after
|
|
5707
|
+
last: $last
|
|
5708
|
+
before: $before
|
|
5709
|
+
search: $search
|
|
5710
|
+
filter: $filter
|
|
5711
|
+
order: $order
|
|
5712
|
+
) {
|
|
5713
|
+
pageInfo {
|
|
5714
|
+
hasNextPage
|
|
5715
|
+
hasPreviousPage
|
|
5716
|
+
startCursor
|
|
5717
|
+
endCursor
|
|
5718
|
+
}
|
|
5719
|
+
totalCount
|
|
5720
|
+
edges {
|
|
5721
|
+
cursor
|
|
5722
|
+
node {
|
|
5723
|
+
${fieldSelection}
|
|
5724
|
+
}
|
|
5725
|
+
}
|
|
5726
|
+
nodes {
|
|
5727
|
+
${fieldSelection}
|
|
5728
|
+
}
|
|
5729
|
+
}
|
|
5730
|
+
}
|
|
5731
|
+
`;
|
|
5732
|
+
const variables = {
|
|
5733
|
+
first: requestOptions?.first,
|
|
5734
|
+
after: requestOptions?.after,
|
|
5735
|
+
last: requestOptions?.last,
|
|
5736
|
+
before: requestOptions?.before,
|
|
5737
|
+
search: requestOptions?.search,
|
|
5738
|
+
filter: requestOptions?.filter,
|
|
5739
|
+
order: requestOptions?.order
|
|
5740
|
+
};
|
|
5741
|
+
const result = await this.graphql.query(query, variables);
|
|
5742
|
+
if (!result.isSuccess) {
|
|
5743
|
+
return result;
|
|
5744
|
+
}
|
|
5745
|
+
return {
|
|
5746
|
+
...result,
|
|
5747
|
+
data: result.data.proposalsNew
|
|
5748
|
+
};
|
|
5749
|
+
}
|
|
4531
5750
|
};
|
|
4532
5751
|
|
|
4533
5752
|
// src/clients/file.ts
|
|
@@ -4662,6 +5881,7 @@ var InsurUpTemplateClient = class {
|
|
|
4662
5881
|
// src/client/client.ts
|
|
4663
5882
|
var DefaultInsurUpClient = class {
|
|
4664
5883
|
http;
|
|
5884
|
+
graphql;
|
|
4665
5885
|
/**
|
|
4666
5886
|
* Agent Management Client
|
|
4667
5887
|
*
|
|
@@ -4784,21 +6004,22 @@ var DefaultInsurUpClient = class {
|
|
|
4784
6004
|
options;
|
|
4785
6005
|
constructor(options) {
|
|
4786
6006
|
this.http = new HttpTransport(options);
|
|
6007
|
+
this.graphql = new GraphQLTransport(this.http);
|
|
4787
6008
|
this.options = options || {};
|
|
4788
6009
|
this.agents = new InsurUpAgentClient(this.http);
|
|
4789
6010
|
this.agentBranches = new InsurUpAgentBranchClient(this.http);
|
|
4790
6011
|
this.agentRoles = new InsurUpAgentRoleClient(this.http);
|
|
4791
6012
|
this.agentSetup = new InsurUpAgentSetupClient(this.http);
|
|
4792
|
-
this.agentUsers = new InsurUpAgentUserClient(this.http);
|
|
4793
|
-
this.customers = new InsurUpCustomerClient(this.http);
|
|
6013
|
+
this.agentUsers = new InsurUpAgentUserClient(this.http, this.graphql);
|
|
6014
|
+
this.customers = new InsurUpCustomerClient(this.http, this.graphql);
|
|
4794
6015
|
this.vehicles = new InsurUpVehicleClient(this.http);
|
|
4795
6016
|
this.properties = new InsurUpPropertyClient(this.http);
|
|
4796
|
-
this.policies = new InsurUpPolicyClient(this.http);
|
|
4797
|
-
this.cases = new InsurUpCaseClient(this.http);
|
|
4798
|
-
this.webhooks = new InsurUpWebhookClient(this.http);
|
|
6017
|
+
this.policies = new InsurUpPolicyClient(this.http, this.graphql);
|
|
6018
|
+
this.cases = new InsurUpCaseClient(this.http, this.graphql);
|
|
6019
|
+
this.webhooks = new InsurUpWebhookClient(this.http, this.graphql);
|
|
4799
6020
|
this.coverage = new InsurUpCoverageClient(this.http);
|
|
4800
6021
|
this.insurance = new InsurUpInsuranceClient(this.http);
|
|
4801
|
-
this.proposals = new InsurUpProposalClient(this.http);
|
|
6022
|
+
this.proposals = new InsurUpProposalClient(this.http, this.graphql);
|
|
4802
6023
|
this.files = new InsurUpFileClient(this.http);
|
|
4803
6024
|
this.languages = new InsurUpLanguageClient(this.http);
|
|
4804
6025
|
this.templates = new InsurUpTemplateClient(this.http);
|
|
@@ -5245,6 +6466,11 @@ var Disease = /* @__PURE__ */ ((Disease2) => {
|
|
|
5245
6466
|
Disease2["ImmuneSystemDisorders"] = "IMMUNE_SYSTEM_DISORDERS";
|
|
5246
6467
|
return Disease2;
|
|
5247
6468
|
})(Disease || {});
|
|
6469
|
+
var ConsentType = /* @__PURE__ */ ((ConsentType2) => {
|
|
6470
|
+
ConsentType2["KVKK"] = "KVKK";
|
|
6471
|
+
ConsentType2["ETK"] = "ETK";
|
|
6472
|
+
return ConsentType2;
|
|
6473
|
+
})(ConsentType || {});
|
|
5248
6474
|
|
|
5249
6475
|
// src/contracts/cases.ts
|
|
5250
6476
|
var CaseType = /* @__PURE__ */ ((CaseType2) => {
|
|
@@ -5403,6 +6629,12 @@ var CallCenterImplementation = /* @__PURE__ */ ((CallCenterImplementation2) => {
|
|
|
5403
6629
|
CallCenterImplementation2["AloTech"] = "AloTech";
|
|
5404
6630
|
return CallCenterImplementation2;
|
|
5405
6631
|
})(CallCenterImplementation || {});
|
|
6632
|
+
var AgentUserState = /* @__PURE__ */ ((AgentUserState2) => {
|
|
6633
|
+
AgentUserState2["Pending"] = "PENDING";
|
|
6634
|
+
AgentUserState2["Active"] = "ACTIVE";
|
|
6635
|
+
AgentUserState2["Inactive"] = "INACTIVE";
|
|
6636
|
+
return AgentUserState2;
|
|
6637
|
+
})(AgentUserState || {});
|
|
5406
6638
|
var B2CConfigFieldType = /* @__PURE__ */ ((B2CConfigFieldType2) => {
|
|
5407
6639
|
B2CConfigFieldType2[B2CConfigFieldType2["Object"] = 1] = "Object";
|
|
5408
6640
|
B2CConfigFieldType2[B2CConfigFieldType2["Array"] = 2] = "Array";
|
|
@@ -5448,7 +6680,16 @@ var ProposalProductState = /* @__PURE__ */ ((ProposalProductState2) => {
|
|
|
5448
6680
|
return ProposalProductState2;
|
|
5449
6681
|
})(ProposalProductState || {});
|
|
5450
6682
|
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,
|
|
5451
6691
|
AgentInsuranceCompanyType,
|
|
6692
|
+
AgentUserState,
|
|
5452
6693
|
AracSegment,
|
|
5453
6694
|
AssetType,
|
|
5454
6695
|
B2CConfigFieldType,
|
|
@@ -5462,17 +6703,21 @@ export {
|
|
|
5462
6703
|
CaseType,
|
|
5463
6704
|
Channel,
|
|
5464
6705
|
ComplaintCaseSubType,
|
|
6706
|
+
ConsentType,
|
|
5465
6707
|
ContactFlowState,
|
|
5466
6708
|
ContactState,
|
|
5467
6709
|
ContactType,
|
|
5468
6710
|
Currency,
|
|
5469
6711
|
CustomerType,
|
|
6712
|
+
DateOnly,
|
|
6713
|
+
DateTime,
|
|
5470
6714
|
DefaultInsurUpClient,
|
|
5471
6715
|
Disease,
|
|
5472
6716
|
EducationStatus,
|
|
5473
6717
|
EndorsementCaseSubType,
|
|
5474
6718
|
endpoints_exports as Endpoints,
|
|
5475
6719
|
Gender,
|
|
6720
|
+
GraphQLTransport,
|
|
5476
6721
|
HastaneAgi,
|
|
5477
6722
|
InsurUpAgentBranchClient,
|
|
5478
6723
|
InsurUpAgentClient,
|
|
@@ -5516,17 +6761,21 @@ export {
|
|
|
5516
6761
|
SaglikPaketiTedaviSekli,
|
|
5517
6762
|
SaleOpportunityCaseSubType,
|
|
5518
6763
|
SmsImplementation,
|
|
6764
|
+
SortEnumType,
|
|
5519
6765
|
Surgery,
|
|
5520
6766
|
TasinanYuk,
|
|
5521
6767
|
TransferredPolicyFailureReason,
|
|
5522
6768
|
TransferredPolicySkipReason,
|
|
5523
6769
|
TransferredPolicyStatus,
|
|
6770
|
+
UserType,
|
|
5524
6771
|
VERSION,
|
|
5525
6772
|
VehicleAccessoryType,
|
|
5526
6773
|
VehicleFuelType,
|
|
5527
6774
|
VehicleUtilizationStyle,
|
|
6775
|
+
WebhookDeliveryState,
|
|
5528
6776
|
WebhookEvent,
|
|
5529
6777
|
YedekParcaTuru,
|
|
6778
|
+
buildFieldSelection,
|
|
5530
6779
|
extractError,
|
|
5531
6780
|
getDataOrThrow,
|
|
5532
6781
|
mergeCoverage,
|