@insurup/sdk 0.1.1 → 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/README.md +102 -3
- package/dist/index.browser.js +275 -0
- package/dist/index.browser.js.map +1 -0
- package/dist/index.cjs +943 -780
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1194 -12781
- package/dist/index.d.ts +1194 -12781
- package/dist/index.js +952 -722
- package/dist/index.js.map +1 -1
- package/package.json +16 -6
package/dist/index.cjs
CHANGED
|
@@ -15,37 +15,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
}
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
18
19
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
20
|
|
|
20
21
|
// src/index.ts
|
|
21
22
|
var index_exports = {};
|
|
22
23
|
__export(index_exports, {
|
|
23
|
-
AgentInsuranceCompanyType: () => AgentInsuranceCompanyType,
|
|
24
|
-
AracSegment: () => AracSegment,
|
|
25
|
-
AssetType: () => AssetType,
|
|
26
|
-
B2CConfigFieldType: () => B2CConfigFieldType,
|
|
27
|
-
CallCenterImplementation: () => CallCenterImplementation,
|
|
28
|
-
CancelCaseSubType: () => CancelCaseSubType,
|
|
29
|
-
CaseActivityAction: () => CaseActivityAction,
|
|
30
|
-
CaseMainState: () => CaseMainState,
|
|
31
|
-
CaseRepresentativeAssignmentMode: () => CaseRepresentativeAssignmentMode,
|
|
32
|
-
CaseStatus: () => CaseStatus,
|
|
33
|
-
CaseSubState: () => CaseSubState,
|
|
34
|
-
CaseType: () => CaseType,
|
|
35
|
-
Channel: () => Channel,
|
|
36
|
-
ComplaintCaseSubType: () => ComplaintCaseSubType,
|
|
37
|
-
ContactFlowState: () => ContactFlowState,
|
|
38
|
-
ContactState: () => ContactState,
|
|
39
|
-
ContactType: () => ContactType,
|
|
40
|
-
Currency: () => Currency,
|
|
41
|
-
CustomerType: () => CustomerType,
|
|
42
24
|
DefaultInsurUpClient: () => DefaultInsurUpClient,
|
|
43
|
-
Disease: () => Disease,
|
|
44
|
-
EducationStatus: () => EducationStatus,
|
|
45
|
-
EndorsementCaseSubType: () => EndorsementCaseSubType,
|
|
46
25
|
Endpoints: () => endpoints_exports,
|
|
47
|
-
|
|
48
|
-
HastaneAgi: () => HastaneAgi,
|
|
26
|
+
GraphQLTransport: () => GraphQLTransport,
|
|
49
27
|
InsurUpAgentBranchClient: () => InsurUpAgentBranchClient,
|
|
50
28
|
InsurUpAgentClient: () => InsurUpAgentClient,
|
|
51
29
|
InsurUpAgentRoleClient: () => InsurUpAgentRoleClient,
|
|
@@ -57,6 +35,7 @@ __export(index_exports, {
|
|
|
57
35
|
InsurUpCustomerClient: () => InsurUpCustomerClient,
|
|
58
36
|
InsurUpError: () => InsurUpError,
|
|
59
37
|
InsurUpFileClient: () => InsurUpFileClient,
|
|
38
|
+
InsurUpGraphQLErrorCode: () => InsurUpGraphQLErrorCode,
|
|
60
39
|
InsurUpInsuranceClient: () => InsurUpInsuranceClient,
|
|
61
40
|
InsurUpLanguageClient: () => InsurUpLanguageClient,
|
|
62
41
|
InsurUpPolicyClient: () => InsurUpPolicyClient,
|
|
@@ -66,57 +45,28 @@ __export(index_exports, {
|
|
|
66
45
|
InsurUpTemplateClient: () => InsurUpTemplateClient,
|
|
67
46
|
InsurUpVehicleClient: () => InsurUpVehicleClient,
|
|
68
47
|
InsurUpWebhookClient: () => InsurUpWebhookClient,
|
|
69
|
-
InsuranceProductType: () => InsuranceProductType,
|
|
70
|
-
InsuranceSyncState: () => InsuranceSyncState,
|
|
71
|
-
Job: () => Job,
|
|
72
|
-
LossPayeeClauseType: () => LossPayeeClauseType,
|
|
73
|
-
MaritalStatus: () => MaritalStatus,
|
|
74
|
-
Nationality: () => Nationality,
|
|
75
|
-
OnarimServisTuru: () => OnarimServisTuru,
|
|
76
|
-
PaymentOption: () => PaymentOption,
|
|
77
|
-
PolicyState: () => PolicyState,
|
|
78
|
-
PolicyTransferCompanyFailureReason: () => PolicyTransferCompanyFailureReason,
|
|
79
|
-
PolicyTransferTriggerStatus: () => PolicyTransferTriggerStatus,
|
|
80
|
-
ProductBranch: () => ProductBranch,
|
|
81
|
-
PropertyDamageStatus: () => PropertyDamageStatus,
|
|
82
|
-
PropertyOwnershipType: () => PropertyOwnershipType,
|
|
83
|
-
PropertyStructure: () => PropertyStructure,
|
|
84
|
-
PropertyUtilizationStyle: () => PropertyUtilizationStyle,
|
|
85
|
-
ProposalProductState: () => ProposalProductState,
|
|
86
|
-
ProposalState: () => ProposalState,
|
|
87
|
-
RobotMode: () => RobotMode,
|
|
88
|
-
SaglikPaketiTedaviSekli: () => SaglikPaketiTedaviSekli,
|
|
89
|
-
SaleOpportunityCaseSubType: () => SaleOpportunityCaseSubType,
|
|
90
|
-
SmsImplementation: () => SmsImplementation,
|
|
91
|
-
Surgery: () => Surgery,
|
|
92
|
-
TasinanYuk: () => TasinanYuk,
|
|
93
|
-
TransferredPolicyFailureReason: () => TransferredPolicyFailureReason,
|
|
94
|
-
TransferredPolicySkipReason: () => TransferredPolicySkipReason,
|
|
95
|
-
TransferredPolicyStatus: () => TransferredPolicyStatus,
|
|
96
48
|
VERSION: () => VERSION,
|
|
97
|
-
|
|
98
|
-
VehicleFuelType: () => VehicleFuelType,
|
|
99
|
-
VehicleUtilizationStyle: () => VehicleUtilizationStyle,
|
|
100
|
-
WebhookEvent: () => WebhookEvent,
|
|
101
|
-
YedekParcaTuru: () => YedekParcaTuru,
|
|
49
|
+
createGraphQLErrors: () => createGraphQLErrors,
|
|
102
50
|
extractError: () => extractError,
|
|
103
51
|
getDataOrThrow: () => getDataOrThrow,
|
|
104
|
-
|
|
105
|
-
throwIfError: () => throwIfError
|
|
52
|
+
getGraphQLDataOrThrow: () => getGraphQLDataOrThrow,
|
|
53
|
+
throwIfError: () => throwIfError,
|
|
54
|
+
throwIfGraphQLError: () => throwIfGraphQLError
|
|
106
55
|
});
|
|
107
56
|
module.exports = __toCommonJS(index_exports);
|
|
108
57
|
|
|
109
58
|
// package.json
|
|
110
59
|
var package_default = {
|
|
111
60
|
name: "@insurup/sdk",
|
|
112
|
-
version: "0.1.
|
|
113
|
-
description: "Type-safe TypeScript SDK for the InsurUp insurance platform
|
|
61
|
+
version: "0.1.3",
|
|
62
|
+
description: "Type-safe TypeScript SDK for the InsurUp insurance platform with GraphQL support. Tree-shakeable, works everywhere.",
|
|
114
63
|
keywords: [
|
|
115
64
|
"insurup",
|
|
116
65
|
"insurance",
|
|
117
66
|
"sdk",
|
|
118
67
|
"typescript",
|
|
119
68
|
"api-client",
|
|
69
|
+
"graphql",
|
|
120
70
|
"policy",
|
|
121
71
|
"claims",
|
|
122
72
|
"coverage",
|
|
@@ -125,13 +75,13 @@ var package_default = {
|
|
|
125
75
|
],
|
|
126
76
|
author: "InsurUp Team",
|
|
127
77
|
license: "MIT",
|
|
128
|
-
homepage: "https://github.com/InsurUp/ts-
|
|
78
|
+
homepage: "https://github.com/InsurUp/ts-toolkit#readme",
|
|
129
79
|
repository: {
|
|
130
80
|
type: "git",
|
|
131
|
-
url: "git+https://github.com/InsurUp/ts-
|
|
81
|
+
url: "git+https://github.com/InsurUp/ts-toolkit.git"
|
|
132
82
|
},
|
|
133
83
|
bugs: {
|
|
134
|
-
url: "https://github.com/InsurUp/ts-
|
|
84
|
+
url: "https://github.com/InsurUp/ts-toolkit/issues"
|
|
135
85
|
},
|
|
136
86
|
engines: {
|
|
137
87
|
node: ">=18"
|
|
@@ -149,6 +99,10 @@ var package_default = {
|
|
|
149
99
|
types: "./dist/index.d.ts",
|
|
150
100
|
import: "./dist/index.js",
|
|
151
101
|
require: "./dist/index.cjs"
|
|
102
|
+
},
|
|
103
|
+
"./browser": {
|
|
104
|
+
types: "./dist/index.d.ts",
|
|
105
|
+
import: "./dist/index.browser.js"
|
|
152
106
|
}
|
|
153
107
|
},
|
|
154
108
|
scripts: {
|
|
@@ -162,6 +116,9 @@ var package_default = {
|
|
|
162
116
|
"test:watch": "vitest",
|
|
163
117
|
"test:coverage": "vitest run --coverage"
|
|
164
118
|
},
|
|
119
|
+
publishConfig: {
|
|
120
|
+
access: "public"
|
|
121
|
+
},
|
|
165
122
|
devDependencies: {
|
|
166
123
|
"@eslint/js": "^9.39.2",
|
|
167
124
|
"@vitest/coverage-v8": "^4.0.17",
|
|
@@ -176,7 +133,9 @@ var package_default = {
|
|
|
176
133
|
"typescript-eslint": "^8.53.1",
|
|
177
134
|
vitest: "^4.0.17"
|
|
178
135
|
},
|
|
179
|
-
dependencies: {
|
|
136
|
+
dependencies: {
|
|
137
|
+
"@insurup/contracts": "workspace:*"
|
|
138
|
+
}
|
|
180
139
|
};
|
|
181
140
|
|
|
182
141
|
// src/version.ts
|
|
@@ -191,6 +150,7 @@ var InsurUpClientErrorType = /* @__PURE__ */ ((InsurUpClientErrorType2) => {
|
|
|
191
150
|
InsurUpClientErrorType2["Timeout"] = "Timeout";
|
|
192
151
|
InsurUpClientErrorType2["HttpRequestFailed"] = "HttpRequestFailed";
|
|
193
152
|
InsurUpClientErrorType2["UnexpectedNoContent"] = "UnexpectedNoContent";
|
|
153
|
+
InsurUpClientErrorType2["GraphQLError"] = "GraphQLError";
|
|
194
154
|
return InsurUpClientErrorType2;
|
|
195
155
|
})(InsurUpClientErrorType || {});
|
|
196
156
|
var InsurUpServerErrorType = /* @__PURE__ */ ((InsurUpServerErrorType2) => {
|
|
@@ -209,6 +169,21 @@ var InsurUpServerErrorType = /* @__PURE__ */ ((InsurUpServerErrorType2) => {
|
|
|
209
169
|
InsurUpServerErrorType2["Upstream"] = "Upstream";
|
|
210
170
|
return InsurUpServerErrorType2;
|
|
211
171
|
})(InsurUpServerErrorType || {});
|
|
172
|
+
var InsurUpGraphQLErrorCode = /* @__PURE__ */ ((InsurUpGraphQLErrorCode2) => {
|
|
173
|
+
InsurUpGraphQLErrorCode2["Forbidden"] = "FORBIDDEN";
|
|
174
|
+
InsurUpGraphQLErrorCode2["Unauthorized"] = "UNAUTHORIZED";
|
|
175
|
+
InsurUpGraphQLErrorCode2["NotFound"] = "NOT_FOUND";
|
|
176
|
+
InsurUpGraphQLErrorCode2["BadRequest"] = "BAD_REQUEST";
|
|
177
|
+
InsurUpGraphQLErrorCode2["Conflict"] = "CONFLICT";
|
|
178
|
+
InsurUpGraphQLErrorCode2["NotSupported"] = "NOT_SUPPORTED";
|
|
179
|
+
InsurUpGraphQLErrorCode2["UpstreamError"] = "UPSTREAM_ERROR";
|
|
180
|
+
InsurUpGraphQLErrorCode2["InternalError"] = "INTERNAL_ERROR";
|
|
181
|
+
InsurUpGraphQLErrorCode2["ValidationError"] = "VALIDATION_ERROR";
|
|
182
|
+
InsurUpGraphQLErrorCode2["FilterRequired"] = "FILTER_REQUIRED";
|
|
183
|
+
InsurUpGraphQLErrorCode2["FilterMaxSpanExceeded"] = "FILTER_MAX_SPAN_EXCEEDED";
|
|
184
|
+
InsurUpGraphQLErrorCode2["Unknown"] = "UNKNOWN";
|
|
185
|
+
return InsurUpGraphQLErrorCode2;
|
|
186
|
+
})(InsurUpGraphQLErrorCode || {});
|
|
212
187
|
|
|
213
188
|
// src/core/errors.ts
|
|
214
189
|
var ERROR_TYPE_URLS = {
|
|
@@ -348,7 +323,7 @@ function extractError(error) {
|
|
|
348
323
|
}
|
|
349
324
|
var InsurUpError = class extends Error {
|
|
350
325
|
/**
|
|
351
|
-
* The original client or
|
|
326
|
+
* The original client, server, or GraphQL error object
|
|
352
327
|
*/
|
|
353
328
|
error;
|
|
354
329
|
constructor(error) {
|
|
@@ -386,6 +361,26 @@ function throwIfError(result) {
|
|
|
386
361
|
}
|
|
387
362
|
throw new InsurUpError(result);
|
|
388
363
|
}
|
|
364
|
+
function getGraphQLDataOrThrow(result) {
|
|
365
|
+
if (result.isSuccess) {
|
|
366
|
+
return result.data;
|
|
367
|
+
}
|
|
368
|
+
throw new InsurUpError(result);
|
|
369
|
+
}
|
|
370
|
+
function throwIfGraphQLError(result) {
|
|
371
|
+
if (result.isSuccess) {
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
throw new InsurUpError(result);
|
|
375
|
+
}
|
|
376
|
+
function createGraphQLErrors(errors) {
|
|
377
|
+
return {
|
|
378
|
+
kind: "graphql-error",
|
|
379
|
+
isSuccess: false,
|
|
380
|
+
message: errors[0]?.message ?? "Unknown GraphQL error",
|
|
381
|
+
errors
|
|
382
|
+
};
|
|
383
|
+
}
|
|
389
384
|
|
|
390
385
|
// src/core/config.ts
|
|
391
386
|
var DEFAULT_RETRY_OPTIONS = {
|
|
@@ -944,7 +939,8 @@ var HttpTransport = class {
|
|
|
944
939
|
...this.options.customHeaders,
|
|
945
940
|
...additionalHeaders
|
|
946
941
|
};
|
|
947
|
-
|
|
942
|
+
const isBrowser = typeof globalThis === "object" && "window" in globalThis;
|
|
943
|
+
if (!isBrowser && this.options.userAgent) {
|
|
948
944
|
headers["User-Agent"] = this.options.userAgent;
|
|
949
945
|
}
|
|
950
946
|
if (this.options.tokenProvider) {
|
|
@@ -1221,6 +1217,108 @@ var HttpTransport = class {
|
|
|
1221
1217
|
}
|
|
1222
1218
|
};
|
|
1223
1219
|
|
|
1220
|
+
// src/client/graphql.ts
|
|
1221
|
+
function mapGraphQLErrorCode(code) {
|
|
1222
|
+
if (typeof code !== "string") {
|
|
1223
|
+
return "UNKNOWN" /* Unknown */;
|
|
1224
|
+
}
|
|
1225
|
+
const upperCode = code.toUpperCase();
|
|
1226
|
+
switch (upperCode) {
|
|
1227
|
+
case "FORBIDDEN":
|
|
1228
|
+
return "FORBIDDEN" /* Forbidden */;
|
|
1229
|
+
case "UNAUTHORIZED":
|
|
1230
|
+
return "UNAUTHORIZED" /* Unauthorized */;
|
|
1231
|
+
case "NOT_FOUND":
|
|
1232
|
+
return "NOT_FOUND" /* NotFound */;
|
|
1233
|
+
case "BAD_REQUEST":
|
|
1234
|
+
return "BAD_REQUEST" /* BadRequest */;
|
|
1235
|
+
case "CONFLICT":
|
|
1236
|
+
return "CONFLICT" /* Conflict */;
|
|
1237
|
+
case "NOT_SUPPORTED":
|
|
1238
|
+
return "NOT_SUPPORTED" /* NotSupported */;
|
|
1239
|
+
case "UPSTREAM_ERROR":
|
|
1240
|
+
return "UPSTREAM_ERROR" /* UpstreamError */;
|
|
1241
|
+
case "INTERNAL_ERROR":
|
|
1242
|
+
return "INTERNAL_ERROR" /* InternalError */;
|
|
1243
|
+
case "VALIDATION_ERROR":
|
|
1244
|
+
return "VALIDATION_ERROR" /* ValidationError */;
|
|
1245
|
+
case "FILTER_REQUIRED":
|
|
1246
|
+
return "FILTER_REQUIRED" /* FilterRequired */;
|
|
1247
|
+
case "FILTER_MAX_SPAN_EXCEEDED":
|
|
1248
|
+
return "FILTER_MAX_SPAN_EXCEEDED" /* FilterMaxSpanExceeded */;
|
|
1249
|
+
default:
|
|
1250
|
+
return "UNKNOWN" /* Unknown */;
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
function parseExtensions(raw) {
|
|
1254
|
+
if (!raw) {
|
|
1255
|
+
return void 0;
|
|
1256
|
+
}
|
|
1257
|
+
const extensions = {
|
|
1258
|
+
...raw,
|
|
1259
|
+
code: mapGraphQLErrorCode(raw.code),
|
|
1260
|
+
traceId: typeof raw.traceId === "string" ? raw.traceId : void 0,
|
|
1261
|
+
codes: Array.isArray(raw.codes) ? raw.codes.filter((c) => typeof c === "string") : void 0,
|
|
1262
|
+
template: typeof raw.template === "string" ? raw.template : void 0,
|
|
1263
|
+
templateArgs: typeof raw.templateArgs === "object" && raw.templateArgs !== null ? raw.templateArgs : void 0,
|
|
1264
|
+
suggestions: Array.isArray(raw.suggestions) ? raw.suggestions.filter((s) => typeof s === "string") : void 0
|
|
1265
|
+
};
|
|
1266
|
+
return extensions;
|
|
1267
|
+
}
|
|
1268
|
+
function parseGraphQLErrors(rawErrors) {
|
|
1269
|
+
return rawErrors.map((error) => {
|
|
1270
|
+
const locations = error.locations?.map(
|
|
1271
|
+
(loc) => ({
|
|
1272
|
+
line: loc.line,
|
|
1273
|
+
column: loc.column
|
|
1274
|
+
})
|
|
1275
|
+
);
|
|
1276
|
+
return {
|
|
1277
|
+
message: error.message,
|
|
1278
|
+
locations,
|
|
1279
|
+
path: error.path,
|
|
1280
|
+
extensions: parseExtensions(error.extensions)
|
|
1281
|
+
};
|
|
1282
|
+
});
|
|
1283
|
+
}
|
|
1284
|
+
var GraphQLTransport = class {
|
|
1285
|
+
constructor(http) {
|
|
1286
|
+
this.http = http;
|
|
1287
|
+
}
|
|
1288
|
+
/**
|
|
1289
|
+
* Executes a GraphQL query or mutation
|
|
1290
|
+
* @param query The GraphQL query string
|
|
1291
|
+
* @param variables Optional variables for the query
|
|
1292
|
+
* @param options Optional request options
|
|
1293
|
+
* @returns Promise resolving to InsurUpGraphQLResult<T>
|
|
1294
|
+
*/
|
|
1295
|
+
async query(query, variables, options) {
|
|
1296
|
+
const payload = {
|
|
1297
|
+
query,
|
|
1298
|
+
variables
|
|
1299
|
+
};
|
|
1300
|
+
const result = await this.http.post(
|
|
1301
|
+
"graphql",
|
|
1302
|
+
payload,
|
|
1303
|
+
options
|
|
1304
|
+
);
|
|
1305
|
+
if (!result.isSuccess) {
|
|
1306
|
+
return result;
|
|
1307
|
+
}
|
|
1308
|
+
const response = result.data;
|
|
1309
|
+
if (response.errors && response.errors.length > 0) {
|
|
1310
|
+
const parsedErrors = parseGraphQLErrors(response.errors);
|
|
1311
|
+
return createGraphQLErrors(parsedErrors);
|
|
1312
|
+
}
|
|
1313
|
+
if (!response.data) {
|
|
1314
|
+
return createDeserializationError(
|
|
1315
|
+
new Error("GraphQL response contained no data and no errors")
|
|
1316
|
+
);
|
|
1317
|
+
}
|
|
1318
|
+
return createSuccess(response.data);
|
|
1319
|
+
}
|
|
1320
|
+
};
|
|
1321
|
+
|
|
1224
1322
|
// src/core/endpoints.ts
|
|
1225
1323
|
var endpoints_exports = {};
|
|
1226
1324
|
__export(endpoints_exports, {
|
|
@@ -2502,9 +2600,12 @@ var InsurUpAgentSetupClient = class {
|
|
|
2502
2600
|
};
|
|
2503
2601
|
|
|
2504
2602
|
// src/clients/agentUser.ts
|
|
2603
|
+
var import_contracts = require("@insurup/contracts");
|
|
2604
|
+
var import_contracts2 = require("@insurup/contracts");
|
|
2505
2605
|
var InsurUpAgentUserClient = class {
|
|
2506
|
-
constructor(http) {
|
|
2606
|
+
constructor(http, graphql) {
|
|
2507
2607
|
this.http = http;
|
|
2608
|
+
this.graphql = graphql;
|
|
2508
2609
|
}
|
|
2509
2610
|
/**
|
|
2510
2611
|
* Retrieves the current agent user's profile information including personal details and platform settings.
|
|
@@ -2685,20 +2786,127 @@ var InsurUpAgentUserClient = class {
|
|
|
2685
2786
|
options
|
|
2686
2787
|
);
|
|
2687
2788
|
}
|
|
2789
|
+
// ============================================================================
|
|
2790
|
+
// GRAPHQL QUERIES
|
|
2791
|
+
// ============================================================================
|
|
2792
|
+
/**
|
|
2793
|
+
* Queries agent users using GraphQL with advanced filtering, searching, sorting, and field selection.
|
|
2794
|
+
* Supports cursor-based pagination and type-safe field selection.
|
|
2795
|
+
*
|
|
2796
|
+
* Gelişmiş filtreleme, arama, sıralama ve alan seçimi ile GraphQL kullanarak acente kullanıcılarını sorgular.
|
|
2797
|
+
* İmleç tabanlı sayfalama ve tip-güvenli alan seçimini destekler.
|
|
2798
|
+
*
|
|
2799
|
+
* @example
|
|
2800
|
+
* // Basic query with all fields
|
|
2801
|
+
* const result = await client.agentUsers.getAgentUsers({ first: 10 });
|
|
2802
|
+
*
|
|
2803
|
+
* @example
|
|
2804
|
+
* // Type-safe field selection
|
|
2805
|
+
* const result = await client.agentUsers.getAgentUsers({
|
|
2806
|
+
* select: ['id', 'email', 'name', 'state'] as const,
|
|
2807
|
+
* first: 10,
|
|
2808
|
+
* filter: { state: { eq: AgentUserState.Active } }
|
|
2809
|
+
* });
|
|
2810
|
+
*
|
|
2811
|
+
* @param requestOptions Query options including pagination, filters, search, and field selection
|
|
2812
|
+
* @returns Paginated connection of agent users with type-narrowed fields
|
|
2813
|
+
*/
|
|
2814
|
+
async getAgentUsers(requestOptions, options) {
|
|
2815
|
+
if (!this.graphql) {
|
|
2816
|
+
throw new Error(
|
|
2817
|
+
"GraphQL transport is not available. Ensure the client is properly initialized."
|
|
2818
|
+
);
|
|
2819
|
+
}
|
|
2820
|
+
const fields = requestOptions?.select ?? import_contracts.ALL_AGENT_USER_FIELDS;
|
|
2821
|
+
const fieldSelection = (0, import_contracts2.buildFieldSelection)(fields);
|
|
2822
|
+
const query = `
|
|
2823
|
+
query GetAgentUsers(
|
|
2824
|
+
$first: Int
|
|
2825
|
+
$after: String
|
|
2826
|
+
$last: Int
|
|
2827
|
+
$before: String
|
|
2828
|
+
$search: searching_QueryAgentUserResultFilterInput
|
|
2829
|
+
$filter: filtering_QueryAgentUserResultFilterInput
|
|
2830
|
+
$order: [sorting_QueryAgentUserResultSortInput!]
|
|
2831
|
+
) {
|
|
2832
|
+
agentUsersNew(
|
|
2833
|
+
first: $first
|
|
2834
|
+
after: $after
|
|
2835
|
+
last: $last
|
|
2836
|
+
before: $before
|
|
2837
|
+
search: $search
|
|
2838
|
+
filter: $filter
|
|
2839
|
+
order: $order
|
|
2840
|
+
) {
|
|
2841
|
+
pageInfo {
|
|
2842
|
+
hasNextPage
|
|
2843
|
+
hasPreviousPage
|
|
2844
|
+
startCursor
|
|
2845
|
+
endCursor
|
|
2846
|
+
}
|
|
2847
|
+
totalCount
|
|
2848
|
+
edges {
|
|
2849
|
+
cursor
|
|
2850
|
+
node {
|
|
2851
|
+
${fieldSelection}
|
|
2852
|
+
}
|
|
2853
|
+
}
|
|
2854
|
+
}
|
|
2855
|
+
}
|
|
2856
|
+
`;
|
|
2857
|
+
const variables = {
|
|
2858
|
+
first: requestOptions?.first,
|
|
2859
|
+
after: requestOptions?.after,
|
|
2860
|
+
last: requestOptions?.last,
|
|
2861
|
+
before: requestOptions?.before,
|
|
2862
|
+
search: requestOptions?.search,
|
|
2863
|
+
filter: requestOptions?.filter,
|
|
2864
|
+
order: requestOptions?.order
|
|
2865
|
+
};
|
|
2866
|
+
const result = await this.graphql.query(query, variables, options);
|
|
2867
|
+
if (!result.isSuccess) {
|
|
2868
|
+
return result;
|
|
2869
|
+
}
|
|
2870
|
+
const edges = result.data.agentUsersNew.edges;
|
|
2871
|
+
const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;
|
|
2872
|
+
return {
|
|
2873
|
+
...result,
|
|
2874
|
+
data: {
|
|
2875
|
+
...result.data.agentUsersNew,
|
|
2876
|
+
nodes
|
|
2877
|
+
}
|
|
2878
|
+
};
|
|
2879
|
+
}
|
|
2688
2880
|
};
|
|
2689
2881
|
|
|
2690
2882
|
// src/clients/customer.ts
|
|
2883
|
+
var import_contracts3 = require("@insurup/contracts");
|
|
2884
|
+
var import_contracts4 = require("@insurup/contracts");
|
|
2691
2885
|
var InsurUpCustomerClient = class {
|
|
2692
|
-
constructor(http) {
|
|
2886
|
+
constructor(http, graphql) {
|
|
2693
2887
|
this.http = http;
|
|
2888
|
+
this.graphql = graphql;
|
|
2694
2889
|
}
|
|
2695
2890
|
/**
|
|
2696
2891
|
* Creates a new customer profile with essential personal and contact information.
|
|
2697
2892
|
*/
|
|
2698
2893
|
async createCustomer(request, options) {
|
|
2894
|
+
const { type, ...rest } = request;
|
|
2895
|
+
let $type;
|
|
2896
|
+
switch (type) {
|
|
2897
|
+
case import_contracts3.CustomerType.Individual:
|
|
2898
|
+
$type = "individual";
|
|
2899
|
+
break;
|
|
2900
|
+
case import_contracts3.CustomerType.Company:
|
|
2901
|
+
$type = "company";
|
|
2902
|
+
break;
|
|
2903
|
+
case import_contracts3.CustomerType.Foreign:
|
|
2904
|
+
$type = "foreign";
|
|
2905
|
+
break;
|
|
2906
|
+
}
|
|
2699
2907
|
return this.http.post(
|
|
2700
2908
|
endpoints.customers.createCustomer,
|
|
2701
|
-
|
|
2909
|
+
{ $type, ...rest },
|
|
2702
2910
|
options
|
|
2703
2911
|
);
|
|
2704
2912
|
}
|
|
@@ -3061,6 +3269,110 @@ var InsurUpCustomerClient = class {
|
|
|
3061
3269
|
options
|
|
3062
3270
|
);
|
|
3063
3271
|
}
|
|
3272
|
+
// ============================================
|
|
3273
|
+
// GraphQL Methods
|
|
3274
|
+
// ============================================
|
|
3275
|
+
/**
|
|
3276
|
+
* Retrieves a paginated list of customers using GraphQL with type-safe field selection.
|
|
3277
|
+
*
|
|
3278
|
+
* GraphQL kullanarak tip güvenli alan seçimi ile sayfalanmış müşteri listesi getirir.
|
|
3279
|
+
*
|
|
3280
|
+
* @example
|
|
3281
|
+
* // Get all fields
|
|
3282
|
+
* const result = await client.customers.getCustomers({ first: 10 });
|
|
3283
|
+
*
|
|
3284
|
+
* @example
|
|
3285
|
+
* // Type-safe field selection
|
|
3286
|
+
* const result = await client.customers.getCustomers({
|
|
3287
|
+
* select: ['id', 'name', 'type', 'primaryEmail'] as const,
|
|
3288
|
+
* first: 10,
|
|
3289
|
+
* filter: { type: { eq: CustomerType.INDIVIDUAL } }
|
|
3290
|
+
* });
|
|
3291
|
+
* // result.data.nodes[0].id - ✓ string
|
|
3292
|
+
* // result.data.nodes[0].name - ✓ string | null
|
|
3293
|
+
* // result.data.nodes[0].type - ✓ CustomerType
|
|
3294
|
+
* // result.data.nodes[0].birthDate - ✗ TypeScript Error!
|
|
3295
|
+
*
|
|
3296
|
+
* @param requestOptions Query options including pagination, filters, search, and field selection
|
|
3297
|
+
* @returns Paginated connection of customers with type-narrowed fields
|
|
3298
|
+
*/
|
|
3299
|
+
async getCustomers(requestOptions, options) {
|
|
3300
|
+
if (!this.graphql) {
|
|
3301
|
+
throw new Error(
|
|
3302
|
+
"GraphQL transport is not available. Ensure the client is properly initialized."
|
|
3303
|
+
);
|
|
3304
|
+
}
|
|
3305
|
+
const fields = requestOptions?.select ?? import_contracts3.ALL_CUSTOMER_FIELDS;
|
|
3306
|
+
const fieldSelection = (0, import_contracts4.buildFieldSelection)(fields);
|
|
3307
|
+
const includeTotalCount = requestOptions?.includeTotalCount !== false;
|
|
3308
|
+
const query = `
|
|
3309
|
+
query GetCustomers(
|
|
3310
|
+
$first: Int
|
|
3311
|
+
$after: String
|
|
3312
|
+
$last: Int
|
|
3313
|
+
$before: String
|
|
3314
|
+
$search: searching_QueryCustomerModelFilterInput
|
|
3315
|
+
$filter: filtering_QueryCustomerModelFilterInput
|
|
3316
|
+
$order: [sorting_QueryCustomerModelSortInput!]
|
|
3317
|
+
) {
|
|
3318
|
+
customersNew(
|
|
3319
|
+
first: $first
|
|
3320
|
+
after: $after
|
|
3321
|
+
last: $last
|
|
3322
|
+
before: $before
|
|
3323
|
+
search: $search
|
|
3324
|
+
filter: $filter
|
|
3325
|
+
order: $order
|
|
3326
|
+
) {
|
|
3327
|
+
pageInfo {
|
|
3328
|
+
hasNextPage
|
|
3329
|
+
hasPreviousPage
|
|
3330
|
+
startCursor
|
|
3331
|
+
endCursor
|
|
3332
|
+
}
|
|
3333
|
+
${includeTotalCount ? "totalCount" : ""}
|
|
3334
|
+
edges {
|
|
3335
|
+
cursor
|
|
3336
|
+
node {
|
|
3337
|
+
${fieldSelection}
|
|
3338
|
+
}
|
|
3339
|
+
}
|
|
3340
|
+
}
|
|
3341
|
+
}
|
|
3342
|
+
`;
|
|
3343
|
+
const variables = {};
|
|
3344
|
+
if (requestOptions?.first === void 0 && requestOptions?.last === void 0) {
|
|
3345
|
+
variables.first = 50;
|
|
3346
|
+
} else {
|
|
3347
|
+
if (requestOptions?.first !== void 0)
|
|
3348
|
+
variables.first = requestOptions.first;
|
|
3349
|
+
if (requestOptions?.last !== void 0)
|
|
3350
|
+
variables.last = requestOptions.last;
|
|
3351
|
+
}
|
|
3352
|
+
if (requestOptions?.after !== void 0)
|
|
3353
|
+
variables.after = requestOptions.after;
|
|
3354
|
+
if (requestOptions?.before !== void 0)
|
|
3355
|
+
variables.before = requestOptions.before;
|
|
3356
|
+
if (requestOptions?.search !== void 0)
|
|
3357
|
+
variables.search = requestOptions.search;
|
|
3358
|
+
if (requestOptions?.filter !== void 0)
|
|
3359
|
+
variables.filter = requestOptions.filter;
|
|
3360
|
+
if (requestOptions?.order !== void 0)
|
|
3361
|
+
variables.order = requestOptions.order;
|
|
3362
|
+
const result = await this.graphql.query(query, variables, options);
|
|
3363
|
+
if (!result.isSuccess) {
|
|
3364
|
+
return result;
|
|
3365
|
+
}
|
|
3366
|
+
const edges = result.data.customersNew.edges;
|
|
3367
|
+
const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;
|
|
3368
|
+
return {
|
|
3369
|
+
...result,
|
|
3370
|
+
data: {
|
|
3371
|
+
...result.data.customersNew,
|
|
3372
|
+
nodes
|
|
3373
|
+
}
|
|
3374
|
+
};
|
|
3375
|
+
}
|
|
3064
3376
|
};
|
|
3065
3377
|
|
|
3066
3378
|
// src/clients/vehicle.ts
|
|
@@ -3402,9 +3714,14 @@ var InsurUpPropertyClient = class {
|
|
|
3402
3714
|
};
|
|
3403
3715
|
|
|
3404
3716
|
// src/clients/policy.ts
|
|
3717
|
+
var import_contracts5 = require("@insurup/contracts");
|
|
3718
|
+
var import_contracts6 = require("@insurup/contracts");
|
|
3719
|
+
var import_contracts7 = require("@insurup/contracts");
|
|
3720
|
+
var import_contracts8 = require("@insurup/contracts");
|
|
3405
3721
|
var InsurUpPolicyClient = class {
|
|
3406
|
-
constructor(http) {
|
|
3722
|
+
constructor(http, graphql) {
|
|
3407
3723
|
this.http = http;
|
|
3724
|
+
this.graphql = graphql;
|
|
3408
3725
|
}
|
|
3409
3726
|
/**
|
|
3410
3727
|
* Retrieves comprehensive details of a specific policy including coverage information, premium details, and current status.
|
|
@@ -3681,12 +3998,267 @@ var InsurUpPolicyClient = class {
|
|
|
3681
3998
|
options
|
|
3682
3999
|
);
|
|
3683
4000
|
}
|
|
4001
|
+
// ============================================================================
|
|
4002
|
+
// GRAPHQL QUERIES
|
|
4003
|
+
// ============================================================================
|
|
4004
|
+
/**
|
|
4005
|
+
* Queries policies using GraphQL with advanced filtering, searching, sorting, and field selection.
|
|
4006
|
+
* Supports cursor-based pagination and type-safe field selection.
|
|
4007
|
+
*
|
|
4008
|
+
* Gelişmiş filtreleme, arama, sıralama ve alan seçimi ile GraphQL kullanarak poliçeleri sorgular.
|
|
4009
|
+
* İmleç tabanlı sayfalama ve tip-güvenli alan seçimini destekler.
|
|
4010
|
+
*
|
|
4011
|
+
* @example
|
|
4012
|
+
* // Basic query with all fields
|
|
4013
|
+
* const result = await client.policies.getPolicies({ first: 10 });
|
|
4014
|
+
*
|
|
4015
|
+
* @example
|
|
4016
|
+
* // Type-safe field selection
|
|
4017
|
+
* const result = await client.policies.getPolicies({
|
|
4018
|
+
* select: ['id', 'productBranch', 'grossPremium', 'state'] as const,
|
|
4019
|
+
* first: 10,
|
|
4020
|
+
* filter: { state: { eq: PolicyState.Active } }
|
|
4021
|
+
* });
|
|
4022
|
+
*
|
|
4023
|
+
* @param requestOptions Query options including pagination, filters, search, and field selection
|
|
4024
|
+
* @returns Paginated connection of policies with type-narrowed fields
|
|
4025
|
+
*/
|
|
4026
|
+
async getPolicies(requestOptions, options) {
|
|
4027
|
+
if (!this.graphql) {
|
|
4028
|
+
throw new Error(
|
|
4029
|
+
"GraphQL transport is not available. Ensure the client is properly initialized."
|
|
4030
|
+
);
|
|
4031
|
+
}
|
|
4032
|
+
const fields = requestOptions?.select ?? import_contracts5.ALL_POLICY_FIELDS;
|
|
4033
|
+
const fieldSelection = (0, import_contracts8.buildFieldSelection)(fields);
|
|
4034
|
+
const includeTotalCount = requestOptions?.includeTotalCount !== false;
|
|
4035
|
+
const query = `
|
|
4036
|
+
query GetPolicies(
|
|
4037
|
+
$first: Int
|
|
4038
|
+
$after: String
|
|
4039
|
+
$last: Int
|
|
4040
|
+
$before: String
|
|
4041
|
+
$search: searching_QueryPoliciesResultFilterInput
|
|
4042
|
+
$filter: filtering_QueryPoliciesResultFilterInput
|
|
4043
|
+
$order: [sorting_QueryPoliciesResultSortInput!]
|
|
4044
|
+
) {
|
|
4045
|
+
policiesNew(
|
|
4046
|
+
first: $first
|
|
4047
|
+
after: $after
|
|
4048
|
+
last: $last
|
|
4049
|
+
before: $before
|
|
4050
|
+
search: $search
|
|
4051
|
+
filter: $filter
|
|
4052
|
+
order: $order
|
|
4053
|
+
) {
|
|
4054
|
+
pageInfo {
|
|
4055
|
+
hasNextPage
|
|
4056
|
+
hasPreviousPage
|
|
4057
|
+
startCursor
|
|
4058
|
+
endCursor
|
|
4059
|
+
}
|
|
4060
|
+
${includeTotalCount ? "totalCount" : ""}
|
|
4061
|
+
edges {
|
|
4062
|
+
cursor
|
|
4063
|
+
node {
|
|
4064
|
+
${fieldSelection}
|
|
4065
|
+
}
|
|
4066
|
+
}
|
|
4067
|
+
}
|
|
4068
|
+
}
|
|
4069
|
+
`;
|
|
4070
|
+
const variables = {
|
|
4071
|
+
first: requestOptions?.first,
|
|
4072
|
+
after: requestOptions?.after,
|
|
4073
|
+
last: requestOptions?.last,
|
|
4074
|
+
before: requestOptions?.before,
|
|
4075
|
+
search: requestOptions?.search,
|
|
4076
|
+
filter: requestOptions?.filter,
|
|
4077
|
+
order: requestOptions?.order
|
|
4078
|
+
};
|
|
4079
|
+
const result = await this.graphql.query(query, variables, options);
|
|
4080
|
+
if (!result.isSuccess) {
|
|
4081
|
+
return result;
|
|
4082
|
+
}
|
|
4083
|
+
const edges = result.data.policiesNew.edges;
|
|
4084
|
+
const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;
|
|
4085
|
+
return {
|
|
4086
|
+
...result,
|
|
4087
|
+
data: {
|
|
4088
|
+
...result.data.policiesNew,
|
|
4089
|
+
nodes
|
|
4090
|
+
}
|
|
4091
|
+
};
|
|
4092
|
+
}
|
|
4093
|
+
/**
|
|
4094
|
+
* Queries policy transfers using GraphQL with advanced filtering, searching, sorting, and field selection.
|
|
4095
|
+
* Supports cursor-based pagination and type-safe field selection.
|
|
4096
|
+
*
|
|
4097
|
+
* Gelişmiş filtreleme, arama, sıralama ve alan seçimi ile GraphQL kullanarak poliçe transferlerini sorgular.
|
|
4098
|
+
* İmleç tabanlı sayfalama ve tip-güvenli alan seçimini destekler.
|
|
4099
|
+
*
|
|
4100
|
+
* @example
|
|
4101
|
+
* // Basic query with all fields
|
|
4102
|
+
* const result = await client.policies.getPolicyTransfers({ first: 10 });
|
|
4103
|
+
*
|
|
4104
|
+
* @param requestOptions Query options including pagination, filters, search, and field selection
|
|
4105
|
+
* @returns Paginated connection of policy transfers with type-narrowed fields
|
|
4106
|
+
*/
|
|
4107
|
+
async getPolicyTransfers(requestOptions, options) {
|
|
4108
|
+
if (!this.graphql) {
|
|
4109
|
+
throw new Error(
|
|
4110
|
+
"GraphQL transport is not available. Ensure the client is properly initialized."
|
|
4111
|
+
);
|
|
4112
|
+
}
|
|
4113
|
+
const fields = requestOptions?.select ?? import_contracts6.ALL_POLICY_TRANSFER_FIELDS;
|
|
4114
|
+
const fieldSelection = (0, import_contracts8.buildFieldSelection)(fields);
|
|
4115
|
+
const query = `
|
|
4116
|
+
query GetPolicyTransfers(
|
|
4117
|
+
$first: Int
|
|
4118
|
+
$after: String
|
|
4119
|
+
$last: Int
|
|
4120
|
+
$before: String
|
|
4121
|
+
$search: searching_QueryPolicyTransfersResultFilterInput
|
|
4122
|
+
$filter: filtering_QueryPolicyTransfersResultFilterInput
|
|
4123
|
+
$order: [sorting_QueryPolicyTransfersResultSortInput!]
|
|
4124
|
+
) {
|
|
4125
|
+
policyTransfersNew(
|
|
4126
|
+
first: $first
|
|
4127
|
+
after: $after
|
|
4128
|
+
last: $last
|
|
4129
|
+
before: $before
|
|
4130
|
+
search: $search
|
|
4131
|
+
filter: $filter
|
|
4132
|
+
order: $order
|
|
4133
|
+
) {
|
|
4134
|
+
pageInfo {
|
|
4135
|
+
hasNextPage
|
|
4136
|
+
hasPreviousPage
|
|
4137
|
+
startCursor
|
|
4138
|
+
endCursor
|
|
4139
|
+
}
|
|
4140
|
+
totalCount
|
|
4141
|
+
edges {
|
|
4142
|
+
cursor
|
|
4143
|
+
node {
|
|
4144
|
+
${fieldSelection}
|
|
4145
|
+
}
|
|
4146
|
+
}
|
|
4147
|
+
}
|
|
4148
|
+
}
|
|
4149
|
+
`;
|
|
4150
|
+
const variables = {
|
|
4151
|
+
first: requestOptions?.first,
|
|
4152
|
+
after: requestOptions?.after,
|
|
4153
|
+
last: requestOptions?.last,
|
|
4154
|
+
before: requestOptions?.before,
|
|
4155
|
+
search: requestOptions?.search,
|
|
4156
|
+
filter: requestOptions?.filter,
|
|
4157
|
+
order: requestOptions?.order
|
|
4158
|
+
};
|
|
4159
|
+
const result = await this.graphql.query(query, variables, options);
|
|
4160
|
+
if (!result.isSuccess) {
|
|
4161
|
+
return result;
|
|
4162
|
+
}
|
|
4163
|
+
const edges = result.data.policyTransfersNew.edges;
|
|
4164
|
+
const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;
|
|
4165
|
+
return {
|
|
4166
|
+
...result,
|
|
4167
|
+
data: {
|
|
4168
|
+
...result.data.policyTransfersNew,
|
|
4169
|
+
nodes
|
|
4170
|
+
}
|
|
4171
|
+
};
|
|
4172
|
+
}
|
|
4173
|
+
/**
|
|
4174
|
+
* Queries file policy transfers using GraphQL with advanced filtering, searching, sorting, and field selection.
|
|
4175
|
+
* Supports cursor-based pagination and type-safe field selection.
|
|
4176
|
+
*
|
|
4177
|
+
* Gelişmiş filtreleme, arama, sıralama ve alan seçimi ile GraphQL kullanarak dosya bazlı poliçe transferlerini sorgular.
|
|
4178
|
+
* İmleç tabanlı sayfalama ve tip-güvenli alan seçimini destekler.
|
|
4179
|
+
*
|
|
4180
|
+
* @example
|
|
4181
|
+
* // Basic query with all fields
|
|
4182
|
+
* const result = await client.policies.getFilePolicyTransfers({ first: 10 });
|
|
4183
|
+
*
|
|
4184
|
+
* @param requestOptions Query options including pagination, filters, search, and field selection
|
|
4185
|
+
* @returns Paginated connection of file policy transfers with type-narrowed fields
|
|
4186
|
+
*/
|
|
4187
|
+
async getFilePolicyTransfers(requestOptions, options) {
|
|
4188
|
+
if (!this.graphql) {
|
|
4189
|
+
throw new Error(
|
|
4190
|
+
"GraphQL transport is not available. Ensure the client is properly initialized."
|
|
4191
|
+
);
|
|
4192
|
+
}
|
|
4193
|
+
const fields = requestOptions?.select ?? import_contracts7.ALL_FILE_POLICY_TRANSFER_FIELDS;
|
|
4194
|
+
const fieldSelection = (0, import_contracts8.buildFieldSelection)(fields);
|
|
4195
|
+
const query = `
|
|
4196
|
+
query GetFilePolicyTransfers(
|
|
4197
|
+
$first: Int
|
|
4198
|
+
$after: String
|
|
4199
|
+
$last: Int
|
|
4200
|
+
$before: String
|
|
4201
|
+
$search: searching_QueryFilePolicyTransfersResultFilterInput
|
|
4202
|
+
$filter: filtering_QueryFilePolicyTransfersResultFilterInput
|
|
4203
|
+
$order: [sorting_QueryFilePolicyTransfersResultSortInput!]
|
|
4204
|
+
) {
|
|
4205
|
+
filePolicyTransfersNew(
|
|
4206
|
+
first: $first
|
|
4207
|
+
after: $after
|
|
4208
|
+
last: $last
|
|
4209
|
+
before: $before
|
|
4210
|
+
search: $search
|
|
4211
|
+
filter: $filter
|
|
4212
|
+
order: $order
|
|
4213
|
+
) {
|
|
4214
|
+
pageInfo {
|
|
4215
|
+
hasNextPage
|
|
4216
|
+
hasPreviousPage
|
|
4217
|
+
startCursor
|
|
4218
|
+
endCursor
|
|
4219
|
+
}
|
|
4220
|
+
totalCount
|
|
4221
|
+
edges {
|
|
4222
|
+
cursor
|
|
4223
|
+
node {
|
|
4224
|
+
${fieldSelection}
|
|
4225
|
+
}
|
|
4226
|
+
}
|
|
4227
|
+
}
|
|
4228
|
+
}
|
|
4229
|
+
`;
|
|
4230
|
+
const variables = {
|
|
4231
|
+
first: requestOptions?.first,
|
|
4232
|
+
after: requestOptions?.after,
|
|
4233
|
+
last: requestOptions?.last,
|
|
4234
|
+
before: requestOptions?.before,
|
|
4235
|
+
search: requestOptions?.search,
|
|
4236
|
+
filter: requestOptions?.filter,
|
|
4237
|
+
order: requestOptions?.order
|
|
4238
|
+
};
|
|
4239
|
+
const result = await this.graphql.query(query, variables, options);
|
|
4240
|
+
if (!result.isSuccess) {
|
|
4241
|
+
return result;
|
|
4242
|
+
}
|
|
4243
|
+
const edges = result.data.filePolicyTransfersNew.edges;
|
|
4244
|
+
const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;
|
|
4245
|
+
return {
|
|
4246
|
+
...result,
|
|
4247
|
+
data: {
|
|
4248
|
+
...result.data.filePolicyTransfersNew,
|
|
4249
|
+
nodes
|
|
4250
|
+
}
|
|
4251
|
+
};
|
|
4252
|
+
}
|
|
3684
4253
|
};
|
|
3685
4254
|
|
|
3686
4255
|
// src/clients/case.ts
|
|
4256
|
+
var import_contracts9 = require("@insurup/contracts");
|
|
4257
|
+
var import_contracts10 = require("@insurup/contracts");
|
|
3687
4258
|
var InsurUpCaseClient = class {
|
|
3688
|
-
constructor(http) {
|
|
4259
|
+
constructor(http, graphql) {
|
|
3689
4260
|
this.http = http;
|
|
4261
|
+
this.graphql = graphql;
|
|
3690
4262
|
}
|
|
3691
4263
|
/**
|
|
3692
4264
|
* Assigns a case representative to handle a specific customer case, ensuring proper ownership and accountability.
|
|
@@ -3888,8 +4460,9 @@ var InsurUpCaseClient = class {
|
|
|
3888
4460
|
* @returns Funnel analytics response / Huni analitiği yanıtı
|
|
3889
4461
|
*/
|
|
3890
4462
|
async getSalesOpportunityFunnelAnalytics(request, options) {
|
|
3891
|
-
return await this.http.
|
|
4463
|
+
return await this.http.post(
|
|
3892
4464
|
cases.getSalesOpportunityFunnelAnalytics.definition,
|
|
4465
|
+
request,
|
|
3893
4466
|
options
|
|
3894
4467
|
);
|
|
3895
4468
|
}
|
|
@@ -3949,12 +4522,106 @@ var InsurUpCaseClient = class {
|
|
|
3949
4522
|
options
|
|
3950
4523
|
);
|
|
3951
4524
|
}
|
|
4525
|
+
// ============================================================================
|
|
4526
|
+
// GRAPHQL QUERIES
|
|
4527
|
+
// ============================================================================
|
|
4528
|
+
/**
|
|
4529
|
+
* Queries cases using GraphQL with advanced filtering, searching, sorting, and field selection.
|
|
4530
|
+
* Supports cursor-based pagination and type-safe field selection.
|
|
4531
|
+
*
|
|
4532
|
+
* Gelişmiş filtreleme, arama, sıralama ve alan seçimi ile GraphQL kullanarak talepleri sorgular.
|
|
4533
|
+
* İmleç tabanlı sayfalama ve tip-güvenli alan seçimini destekler.
|
|
4534
|
+
*
|
|
4535
|
+
* @example
|
|
4536
|
+
* // Basic query with all fields
|
|
4537
|
+
* const result = await client.cases.getCases({ first: 10 });
|
|
4538
|
+
*
|
|
4539
|
+
* @example
|
|
4540
|
+
* // Type-safe field selection
|
|
4541
|
+
* const result = await client.cases.getCases({
|
|
4542
|
+
* select: ['id', 'ref', 'type', 'status', 'mainState'] as const,
|
|
4543
|
+
* first: 10,
|
|
4544
|
+
* filter: { type: { eq: CaseType.NewSaleOpportunity } }
|
|
4545
|
+
* });
|
|
4546
|
+
*
|
|
4547
|
+
* @param requestOptions Query options including pagination, filters, search, and field selection
|
|
4548
|
+
* @returns Paginated connection of cases with type-narrowed fields
|
|
4549
|
+
*/
|
|
4550
|
+
async getCases(requestOptions, options) {
|
|
4551
|
+
if (!this.graphql) {
|
|
4552
|
+
throw new Error(
|
|
4553
|
+
"GraphQL transport is not available. Ensure the client is properly initialized."
|
|
4554
|
+
);
|
|
4555
|
+
}
|
|
4556
|
+
const fields = requestOptions?.select ?? import_contracts9.ALL_CASE_FIELDS;
|
|
4557
|
+
const fieldSelection = (0, import_contracts10.buildFieldSelection)(fields);
|
|
4558
|
+
const query = `
|
|
4559
|
+
query GetCases(
|
|
4560
|
+
$first: Int
|
|
4561
|
+
$after: String
|
|
4562
|
+
$last: Int
|
|
4563
|
+
$before: String
|
|
4564
|
+
$search: searching_QueryCaseModelFilterInput
|
|
4565
|
+
$filter: filtering_QueryCaseModelFilterInput
|
|
4566
|
+
$order: [sorting_QueryCaseModelSortInput!]
|
|
4567
|
+
) {
|
|
4568
|
+
casesNew(
|
|
4569
|
+
first: $first
|
|
4570
|
+
after: $after
|
|
4571
|
+
last: $last
|
|
4572
|
+
before: $before
|
|
4573
|
+
search: $search
|
|
4574
|
+
filter: $filter
|
|
4575
|
+
order: $order
|
|
4576
|
+
) {
|
|
4577
|
+
pageInfo {
|
|
4578
|
+
hasNextPage
|
|
4579
|
+
hasPreviousPage
|
|
4580
|
+
startCursor
|
|
4581
|
+
endCursor
|
|
4582
|
+
}
|
|
4583
|
+
totalCount
|
|
4584
|
+
edges {
|
|
4585
|
+
cursor
|
|
4586
|
+
node {
|
|
4587
|
+
${fieldSelection}
|
|
4588
|
+
}
|
|
4589
|
+
}
|
|
4590
|
+
}
|
|
4591
|
+
}
|
|
4592
|
+
`;
|
|
4593
|
+
const variables = {
|
|
4594
|
+
first: requestOptions?.first,
|
|
4595
|
+
after: requestOptions?.after,
|
|
4596
|
+
last: requestOptions?.last,
|
|
4597
|
+
before: requestOptions?.before,
|
|
4598
|
+
search: requestOptions?.search,
|
|
4599
|
+
filter: requestOptions?.filter,
|
|
4600
|
+
order: requestOptions?.order
|
|
4601
|
+
};
|
|
4602
|
+
const result = await this.graphql.query(query, variables, options);
|
|
4603
|
+
if (!result.isSuccess) {
|
|
4604
|
+
return result;
|
|
4605
|
+
}
|
|
4606
|
+
const edges = result.data.casesNew.edges;
|
|
4607
|
+
const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;
|
|
4608
|
+
return {
|
|
4609
|
+
...result,
|
|
4610
|
+
data: {
|
|
4611
|
+
...result.data.casesNew,
|
|
4612
|
+
nodes
|
|
4613
|
+
}
|
|
4614
|
+
};
|
|
4615
|
+
}
|
|
3952
4616
|
};
|
|
3953
4617
|
|
|
3954
4618
|
// src/clients/webhook.ts
|
|
4619
|
+
var import_contracts11 = require("@insurup/contracts");
|
|
4620
|
+
var import_contracts12 = require("@insurup/contracts");
|
|
3955
4621
|
var InsurUpWebhookClient = class {
|
|
3956
|
-
constructor(http) {
|
|
4622
|
+
constructor(http, graphql) {
|
|
3957
4623
|
this.http = http;
|
|
4624
|
+
this.graphql = graphql;
|
|
3958
4625
|
}
|
|
3959
4626
|
/**
|
|
3960
4627
|
* Creates a new webhook configuration to receive event notifications from the InsurUp platform.
|
|
@@ -4049,6 +4716,97 @@ var InsurUpWebhookClient = class {
|
|
|
4049
4716
|
);
|
|
4050
4717
|
return this.http.postNoContent(endpoint, void 0, options);
|
|
4051
4718
|
}
|
|
4719
|
+
// ============================================================================
|
|
4720
|
+
// GRAPHQL QUERIES
|
|
4721
|
+
// ============================================================================
|
|
4722
|
+
/**
|
|
4723
|
+
* Queries webhook deliveries using GraphQL with advanced filtering, searching, sorting, and field selection.
|
|
4724
|
+
* Supports cursor-based pagination and type-safe field selection.
|
|
4725
|
+
*
|
|
4726
|
+
* Gelişmiş filtreleme, arama, sıralama ve alan seçimi ile GraphQL kullanarak webhook teslimatlarını sorgular.
|
|
4727
|
+
* İmleç tabanlı sayfalama ve tip-güvenli alan seçimini destekler.
|
|
4728
|
+
*
|
|
4729
|
+
* @example
|
|
4730
|
+
* // Basic query with all fields
|
|
4731
|
+
* const result = await client.webhooks.getWebhookDeliveries({ first: 10 });
|
|
4732
|
+
*
|
|
4733
|
+
* @example
|
|
4734
|
+
* // Type-safe field selection with filter
|
|
4735
|
+
* const result = await client.webhooks.getWebhookDeliveries({
|
|
4736
|
+
* select: ['id', 'webhookId', 'event', 'state'] as const,
|
|
4737
|
+
* first: 10,
|
|
4738
|
+
* filter: { state: { eq: WebhookDeliveryState.Failed } }
|
|
4739
|
+
* });
|
|
4740
|
+
*
|
|
4741
|
+
* @param requestOptions Query options including pagination, filters, search, and field selection
|
|
4742
|
+
* @returns Paginated connection of webhook deliveries with type-narrowed fields
|
|
4743
|
+
*/
|
|
4744
|
+
async getWebhookDeliveries(requestOptions, options) {
|
|
4745
|
+
if (!this.graphql) {
|
|
4746
|
+
throw new Error(
|
|
4747
|
+
"GraphQL transport is not available. Ensure the client is properly initialized."
|
|
4748
|
+
);
|
|
4749
|
+
}
|
|
4750
|
+
const fields = requestOptions?.select ?? import_contracts11.ALL_WEBHOOK_DELIVERY_FIELDS;
|
|
4751
|
+
const fieldSelection = (0, import_contracts12.buildFieldSelection)(fields);
|
|
4752
|
+
const query = `
|
|
4753
|
+
query GetWebhookDeliveries(
|
|
4754
|
+
$first: Int
|
|
4755
|
+
$after: String
|
|
4756
|
+
$last: Int
|
|
4757
|
+
$before: String
|
|
4758
|
+
$search: searching_QueryWebhookDeliveryResultFilterInput
|
|
4759
|
+
$filter: filtering_QueryWebhookDeliveryResultFilterInput
|
|
4760
|
+
$order: [sorting_QueryWebhookDeliveryResultSortInput!]
|
|
4761
|
+
) {
|
|
4762
|
+
webhookDeliveriesNew(
|
|
4763
|
+
first: $first
|
|
4764
|
+
after: $after
|
|
4765
|
+
last: $last
|
|
4766
|
+
before: $before
|
|
4767
|
+
search: $search
|
|
4768
|
+
filter: $filter
|
|
4769
|
+
order: $order
|
|
4770
|
+
) {
|
|
4771
|
+
pageInfo {
|
|
4772
|
+
hasNextPage
|
|
4773
|
+
hasPreviousPage
|
|
4774
|
+
startCursor
|
|
4775
|
+
endCursor
|
|
4776
|
+
}
|
|
4777
|
+
totalCount
|
|
4778
|
+
edges {
|
|
4779
|
+
cursor
|
|
4780
|
+
node {
|
|
4781
|
+
${fieldSelection}
|
|
4782
|
+
}
|
|
4783
|
+
}
|
|
4784
|
+
}
|
|
4785
|
+
}
|
|
4786
|
+
`;
|
|
4787
|
+
const variables = {
|
|
4788
|
+
first: requestOptions?.first,
|
|
4789
|
+
after: requestOptions?.after,
|
|
4790
|
+
last: requestOptions?.last,
|
|
4791
|
+
before: requestOptions?.before,
|
|
4792
|
+
search: requestOptions?.search,
|
|
4793
|
+
filter: requestOptions?.filter,
|
|
4794
|
+
order: requestOptions?.order
|
|
4795
|
+
};
|
|
4796
|
+
const result = await this.graphql.query(query, variables, options);
|
|
4797
|
+
if (!result.isSuccess) {
|
|
4798
|
+
return result;
|
|
4799
|
+
}
|
|
4800
|
+
const edges = result.data.webhookDeliveriesNew.edges;
|
|
4801
|
+
const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;
|
|
4802
|
+
return {
|
|
4803
|
+
...result,
|
|
4804
|
+
data: {
|
|
4805
|
+
...result.data.webhookDeliveriesNew,
|
|
4806
|
+
nodes
|
|
4807
|
+
}
|
|
4808
|
+
};
|
|
4809
|
+
}
|
|
4052
4810
|
};
|
|
4053
4811
|
|
|
4054
4812
|
// src/clients/coverage.ts
|
|
@@ -4301,9 +5059,12 @@ var InsurUpInsuranceClient = class {
|
|
|
4301
5059
|
};
|
|
4302
5060
|
|
|
4303
5061
|
// src/clients/proposal.ts
|
|
5062
|
+
var import_contracts13 = require("@insurup/contracts");
|
|
5063
|
+
var import_contracts14 = require("@insurup/contracts");
|
|
4304
5064
|
var InsurUpProposalClient = class {
|
|
4305
|
-
constructor(http) {
|
|
5065
|
+
constructor(http, graphql) {
|
|
4306
5066
|
this.http = http;
|
|
5067
|
+
this.graphql = graphql;
|
|
4307
5068
|
}
|
|
4308
5069
|
/**
|
|
4309
5070
|
* Creates a new insurance proposal with customer information, coverage selections, and product options for quotation.
|
|
@@ -4630,6 +5391,97 @@ var InsurUpProposalClient = class {
|
|
|
4630
5391
|
options
|
|
4631
5392
|
);
|
|
4632
5393
|
}
|
|
5394
|
+
// ============================================================================
|
|
5395
|
+
// GRAPHQL QUERIES
|
|
5396
|
+
// ============================================================================
|
|
5397
|
+
/**
|
|
5398
|
+
* Queries proposals using GraphQL with advanced filtering, searching, sorting, and field selection.
|
|
5399
|
+
* Supports cursor-based pagination and type-safe field selection.
|
|
5400
|
+
*
|
|
5401
|
+
* Gelişmiş filtreleme, arama, sıralama ve alan seçimi ile GraphQL kullanarak teklifleri sorgular.
|
|
5402
|
+
* İmleç tabanlı sayfalama ve tip-güvenli alan seçimini destekler.
|
|
5403
|
+
*
|
|
5404
|
+
* @example
|
|
5405
|
+
* // Basic query with all fields
|
|
5406
|
+
* const result = await client.proposals.getProposals({ first: 10 });
|
|
5407
|
+
*
|
|
5408
|
+
* @example
|
|
5409
|
+
* // Type-safe field selection
|
|
5410
|
+
* const result = await client.proposals.getProposals({
|
|
5411
|
+
* select: ['id', 'productBranch', 'state', 'insuredCustomerName'] as const,
|
|
5412
|
+
* first: 10,
|
|
5413
|
+
* filter: { state: { eq: ProposalState.Active } }
|
|
5414
|
+
* });
|
|
5415
|
+
*
|
|
5416
|
+
* @param requestOptions Query options including pagination, filters, search, and field selection
|
|
5417
|
+
* @returns Paginated connection of proposals with type-narrowed fields
|
|
5418
|
+
*/
|
|
5419
|
+
async getProposals(requestOptions, options) {
|
|
5420
|
+
if (!this.graphql) {
|
|
5421
|
+
throw new Error(
|
|
5422
|
+
"GraphQL transport is not available. Ensure the client is properly initialized."
|
|
5423
|
+
);
|
|
5424
|
+
}
|
|
5425
|
+
const fields = requestOptions?.select ?? import_contracts13.ALL_PROPOSAL_FIELDS;
|
|
5426
|
+
const fieldSelection = (0, import_contracts14.buildFieldSelection)(fields);
|
|
5427
|
+
const query = `
|
|
5428
|
+
query GetProposals(
|
|
5429
|
+
$first: Int
|
|
5430
|
+
$after: String
|
|
5431
|
+
$last: Int
|
|
5432
|
+
$before: String
|
|
5433
|
+
$search: searching_QueryProposalsResultFilterInput
|
|
5434
|
+
$filter: filtering_QueryProposalsResultFilterInput
|
|
5435
|
+
$order: [sorting_QueryProposalsResultSortInput!]
|
|
5436
|
+
) {
|
|
5437
|
+
proposalsNew(
|
|
5438
|
+
first: $first
|
|
5439
|
+
after: $after
|
|
5440
|
+
last: $last
|
|
5441
|
+
before: $before
|
|
5442
|
+
search: $search
|
|
5443
|
+
filter: $filter
|
|
5444
|
+
order: $order
|
|
5445
|
+
) {
|
|
5446
|
+
pageInfo {
|
|
5447
|
+
hasNextPage
|
|
5448
|
+
hasPreviousPage
|
|
5449
|
+
startCursor
|
|
5450
|
+
endCursor
|
|
5451
|
+
}
|
|
5452
|
+
totalCount
|
|
5453
|
+
edges {
|
|
5454
|
+
cursor
|
|
5455
|
+
node {
|
|
5456
|
+
${fieldSelection}
|
|
5457
|
+
}
|
|
5458
|
+
}
|
|
5459
|
+
}
|
|
5460
|
+
}
|
|
5461
|
+
`;
|
|
5462
|
+
const variables = {
|
|
5463
|
+
first: requestOptions?.first,
|
|
5464
|
+
after: requestOptions?.after,
|
|
5465
|
+
last: requestOptions?.last,
|
|
5466
|
+
before: requestOptions?.before,
|
|
5467
|
+
search: requestOptions?.search,
|
|
5468
|
+
filter: requestOptions?.filter,
|
|
5469
|
+
order: requestOptions?.order
|
|
5470
|
+
};
|
|
5471
|
+
const result = await this.graphql.query(query, variables, options);
|
|
5472
|
+
if (!result.isSuccess) {
|
|
5473
|
+
return result;
|
|
5474
|
+
}
|
|
5475
|
+
const edges = result.data.proposalsNew.edges;
|
|
5476
|
+
const nodes = edges?.map((edge) => edge?.node ?? null) ?? null;
|
|
5477
|
+
return {
|
|
5478
|
+
...result,
|
|
5479
|
+
data: {
|
|
5480
|
+
...result.data.proposalsNew,
|
|
5481
|
+
nodes
|
|
5482
|
+
}
|
|
5483
|
+
};
|
|
5484
|
+
}
|
|
4633
5485
|
};
|
|
4634
5486
|
|
|
4635
5487
|
// src/clients/file.ts
|
|
@@ -4764,6 +5616,7 @@ var InsurUpTemplateClient = class {
|
|
|
4764
5616
|
// src/client/client.ts
|
|
4765
5617
|
var DefaultInsurUpClient = class {
|
|
4766
5618
|
http;
|
|
5619
|
+
graphql;
|
|
4767
5620
|
/**
|
|
4768
5621
|
* Agent Management Client
|
|
4769
5622
|
*
|
|
@@ -4886,697 +5739,35 @@ var DefaultInsurUpClient = class {
|
|
|
4886
5739
|
options;
|
|
4887
5740
|
constructor(options) {
|
|
4888
5741
|
this.http = new HttpTransport(options);
|
|
5742
|
+
this.graphql = new GraphQLTransport(this.http);
|
|
4889
5743
|
this.options = options || {};
|
|
4890
5744
|
this.agents = new InsurUpAgentClient(this.http);
|
|
4891
5745
|
this.agentBranches = new InsurUpAgentBranchClient(this.http);
|
|
4892
5746
|
this.agentRoles = new InsurUpAgentRoleClient(this.http);
|
|
4893
5747
|
this.agentSetup = new InsurUpAgentSetupClient(this.http);
|
|
4894
|
-
this.agentUsers = new InsurUpAgentUserClient(this.http);
|
|
4895
|
-
this.customers = new InsurUpCustomerClient(this.http);
|
|
5748
|
+
this.agentUsers = new InsurUpAgentUserClient(this.http, this.graphql);
|
|
5749
|
+
this.customers = new InsurUpCustomerClient(this.http, this.graphql);
|
|
4896
5750
|
this.vehicles = new InsurUpVehicleClient(this.http);
|
|
4897
5751
|
this.properties = new InsurUpPropertyClient(this.http);
|
|
4898
|
-
this.policies = new InsurUpPolicyClient(this.http);
|
|
4899
|
-
this.cases = new InsurUpCaseClient(this.http);
|
|
4900
|
-
this.webhooks = new InsurUpWebhookClient(this.http);
|
|
5752
|
+
this.policies = new InsurUpPolicyClient(this.http, this.graphql);
|
|
5753
|
+
this.cases = new InsurUpCaseClient(this.http, this.graphql);
|
|
5754
|
+
this.webhooks = new InsurUpWebhookClient(this.http, this.graphql);
|
|
4901
5755
|
this.coverage = new InsurUpCoverageClient(this.http);
|
|
4902
5756
|
this.insurance = new InsurUpInsuranceClient(this.http);
|
|
4903
|
-
this.proposals = new InsurUpProposalClient(this.http);
|
|
5757
|
+
this.proposals = new InsurUpProposalClient(this.http, this.graphql);
|
|
4904
5758
|
this.files = new InsurUpFileClient(this.http);
|
|
4905
5759
|
this.languages = new InsurUpLanguageClient(this.http);
|
|
4906
5760
|
this.templates = new InsurUpTemplateClient(this.http);
|
|
4907
5761
|
}
|
|
4908
5762
|
};
|
|
4909
5763
|
|
|
4910
|
-
// src/
|
|
4911
|
-
|
|
4912
|
-
Channel2["Unknown"] = "UNKNOWN";
|
|
4913
|
-
Channel2["Manual"] = "MANUAL";
|
|
4914
|
-
Channel2["Website"] = "WEBSITE";
|
|
4915
|
-
Channel2["GoogleAds"] = "GOOGLE_ADS";
|
|
4916
|
-
Channel2["CallCenter"] = "CALL_CENTER";
|
|
4917
|
-
Channel2["SocialMedia"] = "SOCIAL_MEDIA";
|
|
4918
|
-
Channel2["MobileApp"] = "MOBILE_APP";
|
|
4919
|
-
Channel2["OfflineProposalForm"] = "OFFLINE_PROPOSAL_FORM";
|
|
4920
|
-
Channel2["Field"] = "FIELD";
|
|
4921
|
-
Channel2["PrintMedia"] = "PRINT_MEDIA";
|
|
4922
|
-
Channel2["FairEvent"] = "FAIR_EVENT";
|
|
4923
|
-
Channel2["BusinessPartner"] = "BUSINESS_PARTNER";
|
|
4924
|
-
Channel2["Chatbot"] = "CHATBOT";
|
|
4925
|
-
return Channel2;
|
|
4926
|
-
})(Channel || {});
|
|
4927
|
-
var AssetType = /* @__PURE__ */ ((AssetType2) => {
|
|
4928
|
-
AssetType2["Vehicle"] = "VEHICLE";
|
|
4929
|
-
AssetType2["Property"] = "PROPERTY";
|
|
4930
|
-
return AssetType2;
|
|
4931
|
-
})(AssetType || {});
|
|
4932
|
-
var CustomerType = /* @__PURE__ */ ((CustomerType2) => {
|
|
4933
|
-
CustomerType2["Individual"] = "INDIVIDUAL";
|
|
4934
|
-
CustomerType2["Company"] = "COMPANY";
|
|
4935
|
-
CustomerType2["Foreign"] = "FOREIGN";
|
|
4936
|
-
return CustomerType2;
|
|
4937
|
-
})(CustomerType || {});
|
|
4938
|
-
var ProductBranch = /* @__PURE__ */ ((ProductBranch2) => {
|
|
4939
|
-
ProductBranch2["Kasko"] = "KASKO";
|
|
4940
|
-
ProductBranch2["Dask"] = "DASK";
|
|
4941
|
-
ProductBranch2["Konut"] = "KONUT";
|
|
4942
|
-
ProductBranch2["Trafik"] = "TRAFIK";
|
|
4943
|
-
ProductBranch2["Tss"] = "TSS";
|
|
4944
|
-
ProductBranch2["Imm"] = "IMM";
|
|
4945
|
-
ProductBranch2["YesilKart"] = "YESIL_KART";
|
|
4946
|
-
ProductBranch2["FerdiKaza"] = "FERDI_KAZA";
|
|
4947
|
-
ProductBranch2["GrupHayat"] = "GRUP_HAYAT";
|
|
4948
|
-
ProductBranch2["Saglik"] = "SAGLIK";
|
|
4949
|
-
ProductBranch2["KartKimlikKoruma"] = "KART_KIMLIK_KORUMA";
|
|
4950
|
-
ProductBranch2["UcuncuSahisMaliSorumluluk"] = "UCUNCU_SAHIS_MALI_SORUMLULUK";
|
|
4951
|
-
ProductBranch2["IsyeriYangin"] = "ISYERI_YANGIN";
|
|
4952
|
-
ProductBranch2["Seyahat"] = "SEYAHAT";
|
|
4953
|
-
ProductBranch2["ElektronikCihaz"] = "ELEKTRONIK_CIHAZ";
|
|
4954
|
-
ProductBranch2["Pet"] = "PET";
|
|
4955
|
-
ProductBranch2["Bes"] = "BES";
|
|
4956
|
-
ProductBranch2["InsaatAllRisk"] = "INSAAT_ALL_RISK";
|
|
4957
|
-
ProductBranch2["LeasingAllRisk"] = "LEASING_ALL_RISK";
|
|
4958
|
-
ProductBranch2["MontajAllRisk"] = "MONTAJ_ALL_RISK";
|
|
4959
|
-
ProductBranch2["Nakliyat"] = "NAKLIYAT";
|
|
4960
|
-
ProductBranch2["OzelGuvenlikMaliSorumluluk"] = "OZEL_GUVENLIK_MALI_SORUMLULUK";
|
|
4961
|
-
ProductBranch2["AkilliTelefon"] = "AKILLI_TELEFON";
|
|
4962
|
-
ProductBranch2["TehlikeliMaddelerMaliSorumluluk"] = "TEHLIKELI_MADDELER_MALI_SORUMLULUK";
|
|
4963
|
-
ProductBranch2["YatGemiGezintiTeknesi"] = "YAT_GEMI_GEZINTI_TEKNESI";
|
|
4964
|
-
ProductBranch2["Tarim"] = "TARIM";
|
|
4965
|
-
ProductBranch2["MeslekiSorumluluk"] = "MESLEKI_SORUMLULUK";
|
|
4966
|
-
ProductBranch2["Alacak"] = "ALACAK";
|
|
4967
|
-
ProductBranch2["IsverenMaliMesuliyet"] = "ISVEREN_MALI_MESULIYET";
|
|
4968
|
-
ProductBranch2["Muhendislik"] = "MUHENDISLIK";
|
|
4969
|
-
ProductBranch2["HukuksalKoruma"] = "HUKUKSAL_KORUMA";
|
|
4970
|
-
ProductBranch2["IlkAtesKonut"] = "ILK_ATES_KONUT";
|
|
4971
|
-
ProductBranch2["Kefalet"] = "KEFALET";
|
|
4972
|
-
return ProductBranch2;
|
|
4973
|
-
})(ProductBranch || {});
|
|
4974
|
-
var Currency = /* @__PURE__ */ ((Currency2) => {
|
|
4975
|
-
Currency2["Unknown"] = "UNKNOWN";
|
|
4976
|
-
Currency2["TurkishLira"] = "TURKISH_LIRA";
|
|
4977
|
-
Currency2["UnitedStatesDollar"] = "UNITED_STATES_DOLLAR";
|
|
4978
|
-
Currency2["Euro"] = "EURO";
|
|
4979
|
-
return Currency2;
|
|
4980
|
-
})(Currency || {});
|
|
4981
|
-
var PaymentOption = /* @__PURE__ */ ((PaymentOption2) => {
|
|
4982
|
-
PaymentOption2["Unknown"] = "UNKNOWN";
|
|
4983
|
-
PaymentOption2["SyncCreditCard"] = "SYNC_CREDIT_CARD";
|
|
4984
|
-
PaymentOption2["SyncOpenAccount"] = "SYNC_OPEN_ACCOUNT";
|
|
4985
|
-
PaymentOption2["Async3dSecure"] = "ASYNC_3D_SECURE";
|
|
4986
|
-
PaymentOption2["AsyncInsuranceCompanyRedirect"] = "ASYNC_INSURANCE_COMPANY_REDIRECT";
|
|
4987
|
-
PaymentOption2["AsyncThirdParty3dSecure"] = "ASYNC_THIRD_PARTY_3D_SECURE";
|
|
4988
|
-
return PaymentOption2;
|
|
4989
|
-
})(PaymentOption || {});
|
|
4990
|
-
var PolicyState = /* @__PURE__ */ ((PolicyState2) => {
|
|
4991
|
-
PolicyState2["Active"] = "ACTIVE";
|
|
4992
|
-
PolicyState2["EndOfLife"] = "END_OF_LIFE";
|
|
4993
|
-
PolicyState2["Cancelled"] = "CANCELLED";
|
|
4994
|
-
return PolicyState2;
|
|
4995
|
-
})(PolicyState || {});
|
|
4996
|
-
var InsuranceProductType = /* @__PURE__ */ ((InsuranceProductType2) => {
|
|
4997
|
-
InsuranceProductType2["WebService"] = "WEB_SERVICE";
|
|
4998
|
-
InsuranceProductType2["Robot"] = "ROBOT";
|
|
4999
|
-
return InsuranceProductType2;
|
|
5000
|
-
})(InsuranceProductType || {});
|
|
5001
|
-
|
|
5002
|
-
// src/contracts/common.coverage.ts
|
|
5003
|
-
var OnarimServisTuru = /* @__PURE__ */ ((OnarimServisTuru2) => {
|
|
5004
|
-
OnarimServisTuru2["Belirsiz"] = "BELIRSIZ";
|
|
5005
|
-
OnarimServisTuru2["AnlasmaliOzelServis"] = "ANLASMALI_OZEL_SERVIS";
|
|
5006
|
-
OnarimServisTuru2["AnlasmaliYetkiliServis"] = "ANLASMALI_YETKILI_SERVIS";
|
|
5007
|
-
OnarimServisTuru2["YetkiliServis"] = "YETKILI_SERVIS";
|
|
5008
|
-
OnarimServisTuru2["OzelServis"] = "OZEL_SERVIS";
|
|
5009
|
-
OnarimServisTuru2["SigortaliBelirler"] = "SIGORTALI_BELIRLER";
|
|
5010
|
-
return OnarimServisTuru2;
|
|
5011
|
-
})(OnarimServisTuru || {});
|
|
5012
|
-
var YedekParcaTuru = /* @__PURE__ */ ((YedekParcaTuru2) => {
|
|
5013
|
-
YedekParcaTuru2["Belirsiz"] = "BELIRSIZ";
|
|
5014
|
-
YedekParcaTuru2["OrijinalParca"] = "ORIJINAL_PARCA";
|
|
5015
|
-
YedekParcaTuru2["EsdegerParca"] = "ESDEGER_PARCA";
|
|
5016
|
-
return YedekParcaTuru2;
|
|
5017
|
-
})(YedekParcaTuru || {});
|
|
5018
|
-
var AracSegment = /* @__PURE__ */ ((AracSegment2) => {
|
|
5019
|
-
AracSegment2["A"] = "A";
|
|
5020
|
-
AracSegment2["B"] = "B";
|
|
5021
|
-
AracSegment2["C"] = "C";
|
|
5022
|
-
AracSegment2["D"] = "D";
|
|
5023
|
-
AracSegment2["E"] = "E";
|
|
5024
|
-
AracSegment2["F"] = "F";
|
|
5025
|
-
AracSegment2["SegmenteSegment"] = "SEGMENTE_SEGMENT";
|
|
5026
|
-
return AracSegment2;
|
|
5027
|
-
})(AracSegment || {});
|
|
5028
|
-
var HastaneAgi = /* @__PURE__ */ ((HastaneAgi2) => {
|
|
5029
|
-
HastaneAgi2["Bilinmiyor"] = "BILINMIYOR";
|
|
5030
|
-
HastaneAgi2["DarKapsam"] = "DAR_KAPSAM";
|
|
5031
|
-
HastaneAgi2["StandartKapsam"] = "STANDART_KAPSAM";
|
|
5032
|
-
HastaneAgi2["GenisKapsam"] = "GENIS_KAPSAM";
|
|
5033
|
-
return HastaneAgi2;
|
|
5034
|
-
})(HastaneAgi || {});
|
|
5035
|
-
var SaglikPaketiTedaviSekli = /* @__PURE__ */ ((SaglikPaketiTedaviSekli2) => {
|
|
5036
|
-
SaglikPaketiTedaviSekli2["Bilinmiyor"] = "BILINMIYOR";
|
|
5037
|
-
SaglikPaketiTedaviSekli2["Yatarak"] = "YATARAK";
|
|
5038
|
-
SaglikPaketiTedaviSekli2["YatarakAyakta"] = "YATARAK_AYAKTA";
|
|
5039
|
-
return SaglikPaketiTedaviSekli2;
|
|
5040
|
-
})(SaglikPaketiTedaviSekli || {});
|
|
5041
|
-
var TasinanYuk = /* @__PURE__ */ ((TasinanYuk2) => {
|
|
5042
|
-
TasinanYuk2["Belirsiz"] = "BELIRSIZ";
|
|
5043
|
-
TasinanYuk2["Yok"] = "YOK";
|
|
5044
|
-
TasinanYuk2["AgacKutukleriveKereste"] = "AGAC_KUTUKLERIVE_KERESTE";
|
|
5045
|
-
TasinanYuk2["Akaryakit"] = "AKARYAKIT";
|
|
5046
|
-
TasinanYuk2["AyakkabiSaraciye"] = "AYAKKABI_SARACIYE";
|
|
5047
|
-
TasinanYuk2["BakkaliyeveSharkuteriUrunleri"] = "BAKKALIYE_VE_SHARKUTERI_URUNLERI";
|
|
5048
|
-
TasinanYuk2["BilumumKirtasiyeMalzemeleri"] = "BILUMUM_KIRTASIYE_MALZEMELERI";
|
|
5049
|
-
TasinanYuk2["DokmeSuveSut"] = "DOKME_SU_VE_SUT";
|
|
5050
|
-
TasinanYuk2["HaliveKilim"] = "HALI_VE_KILIM";
|
|
5051
|
-
TasinanYuk2["HamYariMamulveMamulKagit"] = "HAM_YARI_MAMUL_VE_MAMUL_KAGIT";
|
|
5052
|
-
TasinanYuk2["HazirBeton"] = "HAZIR_BETON";
|
|
5053
|
-
TasinanYuk2["HerNeviEvAletleri"] = "HER_NEVI_EV_ALETLERI";
|
|
5054
|
-
TasinanYuk2["HerTurluDokmeKomurvOdun"] = "HER_TURLU_DOKME_KOMUR_V_ODUN";
|
|
5055
|
-
TasinanYuk2["HububatveBakliyat"] = "HUBUBAT_VE_BAKLIYAT";
|
|
5056
|
-
TasinanYuk2["KabaInsaatMalzemeleri"] = "KABA_INSAAT_MALZEMELERI";
|
|
5057
|
-
TasinanYuk2["LastikKaucukUrunleri"] = "LASTIK_KAUCUK_URUNLERI";
|
|
5058
|
-
TasinanYuk2["LikidKimyeviMadde"] = "LIKID_KIMYEVI_MADDE";
|
|
5059
|
-
TasinanYuk2["LpgGazTupu"] = "LPG_GAZ_TUPU";
|
|
5060
|
-
TasinanYuk2["MakineAksamveYedekleri"] = "MAKINE_AKSAM_VE_YEDEKLERI";
|
|
5061
|
-
TasinanYuk2["MobilyaMalzemesi"] = "MOBILYA_MALZEMESI";
|
|
5062
|
-
TasinanYuk2["MuhtelifEvEsyasi"] = "MUHTELIF_EV_ESYASI";
|
|
5063
|
-
TasinanYuk2["OtoYedekParcalari"] = "OTO_YEDEK_PARCALARI";
|
|
5064
|
-
TasinanYuk2["PlastikMamulleri"] = "PLASTIK_MAMULLERI";
|
|
5065
|
-
TasinanYuk2["SentetikElyafUrunleri"] = "SENTETIK_ELYAF_URUNLERI";
|
|
5066
|
-
TasinanYuk2["SentetikPlastikBoyaUrunleri"] = "SENTETIK_PLASTIK_BOYA_URUNLERI";
|
|
5067
|
-
TasinanYuk2["TekstilUrunleri"] = "TEKSTIL_URUNLERI";
|
|
5068
|
-
TasinanYuk2["TemizlikMaddeleri"] = "TEMIZLIK_MADDELERI";
|
|
5069
|
-
TasinanYuk2["YasMeyveveSebze"] = "YAS_MEYVE_VE_SEBZE";
|
|
5070
|
-
return TasinanYuk2;
|
|
5071
|
-
})(TasinanYuk || {});
|
|
5072
|
-
function isCoverageValue(value) {
|
|
5073
|
-
return typeof value === "object" && value !== null && "$type" in value && typeof value.$type === "string";
|
|
5074
|
-
}
|
|
5075
|
-
function mergeCoverage(...coverages) {
|
|
5076
|
-
if (coverages.length === 0) {
|
|
5077
|
-
throw new Error("Cannot merge empty coverage array");
|
|
5078
|
-
}
|
|
5079
|
-
const validCoverages = coverages.filter(
|
|
5080
|
-
(coverage) => coverage != null
|
|
5081
|
-
);
|
|
5082
|
-
if (validCoverages.length === 0) {
|
|
5083
|
-
throw new Error("No valid coverages to merge");
|
|
5084
|
-
}
|
|
5085
|
-
const firstCoverage = validCoverages[0];
|
|
5086
|
-
const productBranch = firstCoverage.productBranch;
|
|
5087
|
-
for (const coverage of validCoverages) {
|
|
5088
|
-
if (coverage.productBranch !== productBranch) {
|
|
5089
|
-
throw new Error(
|
|
5090
|
-
`All coverages must have the same productBranch. Expected: ${productBranch}, but found: ${coverage.productBranch}`
|
|
5091
|
-
);
|
|
5092
|
-
}
|
|
5093
|
-
}
|
|
5094
|
-
const mergeCoverageValue = (values) => {
|
|
5095
|
-
const definedValues = values.filter(
|
|
5096
|
-
(value) => value != null
|
|
5097
|
-
);
|
|
5098
|
-
if (definedValues.length === 0) {
|
|
5099
|
-
return void 0;
|
|
5100
|
-
}
|
|
5101
|
-
const nonUndefinedValues = definedValues.filter(
|
|
5102
|
-
(value) => value.$type !== "UNDEFINED"
|
|
5103
|
-
);
|
|
5104
|
-
if (nonUndefinedValues.length > 0) {
|
|
5105
|
-
return nonUndefinedValues[nonUndefinedValues.length - 1];
|
|
5106
|
-
}
|
|
5107
|
-
return { $type: "UNDEFINED" };
|
|
5108
|
-
};
|
|
5109
|
-
const mergeProperty = (values) => {
|
|
5110
|
-
const definedValues = values.filter((value) => value != null);
|
|
5111
|
-
return definedValues.length > 0 ? definedValues[definedValues.length - 1] : void 0;
|
|
5112
|
-
};
|
|
5113
|
-
const allKeys = /* @__PURE__ */ new Set();
|
|
5114
|
-
for (const coverage of validCoverages) {
|
|
5115
|
-
Object.keys(coverage).forEach((key) => {
|
|
5116
|
-
if (key !== "productBranch") {
|
|
5117
|
-
allKeys.add(key);
|
|
5118
|
-
}
|
|
5119
|
-
});
|
|
5120
|
-
}
|
|
5121
|
-
const merged = {
|
|
5122
|
-
productBranch
|
|
5123
|
-
};
|
|
5124
|
-
for (const key of allKeys) {
|
|
5125
|
-
const values = validCoverages.map(
|
|
5126
|
-
(coverage) => coverage[key]
|
|
5127
|
-
);
|
|
5128
|
-
const sampleValue = values.find((v) => v != null);
|
|
5129
|
-
if (isCoverageValue(sampleValue)) {
|
|
5130
|
-
merged[key] = mergeCoverageValue(values);
|
|
5131
|
-
} else {
|
|
5132
|
-
merged[key] = mergeProperty(values);
|
|
5133
|
-
}
|
|
5134
|
-
}
|
|
5135
|
-
return merged;
|
|
5136
|
-
}
|
|
5137
|
-
|
|
5138
|
-
// src/contracts/common.policy.ts
|
|
5139
|
-
var PolicyTransferTriggerStatus = /* @__PURE__ */ ((PolicyTransferTriggerStatus2) => {
|
|
5140
|
-
PolicyTransferTriggerStatus2["Succeeded"] = "SUCCEEDED";
|
|
5141
|
-
PolicyTransferTriggerStatus2["Failed"] = "TRIGGER_STATUS_FAILED";
|
|
5142
|
-
return PolicyTransferTriggerStatus2;
|
|
5143
|
-
})(PolicyTransferTriggerStatus || {});
|
|
5144
|
-
var PolicyTransferCompanyFailureReason = /* @__PURE__ */ ((PolicyTransferCompanyFailureReason2) => {
|
|
5145
|
-
PolicyTransferCompanyFailureReason2["Unknown"] = "UNKNOWN";
|
|
5146
|
-
PolicyTransferCompanyFailureReason2["CouldNotFetchPolicies"] = "COULD_NOT_FETCH_POLICIES";
|
|
5147
|
-
return PolicyTransferCompanyFailureReason2;
|
|
5148
|
-
})(PolicyTransferCompanyFailureReason || {});
|
|
5149
|
-
var TransferredPolicyStatus = /* @__PURE__ */ ((TransferredPolicyStatus2) => {
|
|
5150
|
-
TransferredPolicyStatus2["Success"] = "SUCCESS";
|
|
5151
|
-
TransferredPolicyStatus2["Failed"] = "TRANSFER_FAILED";
|
|
5152
|
-
TransferredPolicyStatus2["Skipped"] = "TRANSFER_SKIPPED";
|
|
5153
|
-
return TransferredPolicyStatus2;
|
|
5154
|
-
})(TransferredPolicyStatus || {});
|
|
5155
|
-
var TransferredPolicySkipReason = /* @__PURE__ */ ((TransferredPolicySkipReason2) => {
|
|
5156
|
-
TransferredPolicySkipReason2["Unknown"] = "UNKNOWN";
|
|
5157
|
-
TransferredPolicySkipReason2["AlreadyTransferred"] = "SKIP_ALREADY_TRANSFERRED";
|
|
5158
|
-
TransferredPolicySkipReason2["PreviousVersionNotFound"] = "PREVIOUS_VERSION_NOT_FOUND";
|
|
5159
|
-
TransferredPolicySkipReason2["ProductBranchNotSupported"] = "PRODUCT_BRANCH_NOT_SUPPORTED";
|
|
5160
|
-
TransferredPolicySkipReason2["ProductNotSupported"] = "PRODUCT_NOT_SUPPORTED";
|
|
5161
|
-
return TransferredPolicySkipReason2;
|
|
5162
|
-
})(TransferredPolicySkipReason || {});
|
|
5163
|
-
var TransferredPolicyFailureReason = /* @__PURE__ */ ((TransferredPolicyFailureReason2) => {
|
|
5164
|
-
TransferredPolicyFailureReason2["Unknown"] = "UNKNOWN";
|
|
5165
|
-
TransferredPolicyFailureReason2["InvalidCustomerIdentityNumber"] = "INVALID_CUSTOMER_IDENTITY_NUMBER";
|
|
5166
|
-
TransferredPolicyFailureReason2["InvalidCustomerCompanyTitle"] = "INVALID_CUSTOMER_COMPANY_TITLE";
|
|
5167
|
-
TransferredPolicyFailureReason2["InvalidCustomerTaxNumber"] = "INVALID_CUSTOMER_TAX_NUMBER";
|
|
5168
|
-
TransferredPolicyFailureReason2["InvalidCustomerType"] = "INVALID_CUSTOMER_TYPE";
|
|
5169
|
-
TransferredPolicyFailureReason2["InvalidVehicle"] = "INVALID_VEHICLE";
|
|
5170
|
-
TransferredPolicyFailureReason2["InvalidProperty"] = "INVALID_PROPERTY";
|
|
5171
|
-
TransferredPolicyFailureReason2["InvalidEndDate"] = "INVALID_END_DATE";
|
|
5172
|
-
TransferredPolicyFailureReason2["InvalidStartDate"] = "INVALID_START_DATE";
|
|
5173
|
-
TransferredPolicyFailureReason2["InvalidProposalNumber"] = "INVALID_PROPOSAL_NUMBER";
|
|
5174
|
-
TransferredPolicyFailureReason2["InvalidPremium"] = "INVALID_PREMIUM";
|
|
5175
|
-
TransferredPolicyFailureReason2["InvalidCommission"] = "INVALID_COMMISSION";
|
|
5176
|
-
TransferredPolicyFailureReason2["InvalidPaymentType"] = "INVALID_PAYMENT_TYPE";
|
|
5177
|
-
TransferredPolicyFailureReason2["InvalidInsuredCustomer"] = "INVALID_INSURED_CUSTOMER";
|
|
5178
|
-
TransferredPolicyFailureReason2["InvalidInsurerCustomer"] = "INVALID_INSURER_CUSTOMER";
|
|
5179
|
-
return TransferredPolicyFailureReason2;
|
|
5180
|
-
})(TransferredPolicyFailureReason || {});
|
|
5181
|
-
|
|
5182
|
-
// src/contracts/common.property.ts
|
|
5183
|
-
var PropertyStructure = /* @__PURE__ */ ((PropertyStructure2) => {
|
|
5184
|
-
PropertyStructure2["Unknown"] = "UNKNOWN";
|
|
5185
|
-
PropertyStructure2["SteelReinforcedConcrete"] = "STEEL_REINFORCED_CONCRETE";
|
|
5186
|
-
PropertyStructure2["Other"] = "OTHER";
|
|
5187
|
-
return PropertyStructure2;
|
|
5188
|
-
})(PropertyStructure || {});
|
|
5189
|
-
var PropertyDamageStatus = /* @__PURE__ */ ((PropertyDamageStatus2) => {
|
|
5190
|
-
PropertyDamageStatus2["Unknown"] = "UNKNOWN";
|
|
5191
|
-
PropertyDamageStatus2["None"] = "NONE";
|
|
5192
|
-
PropertyDamageStatus2["SlightlyDamaged"] = "SLIGHTLY_DAMAGED";
|
|
5193
|
-
PropertyDamageStatus2["ModeratelyDamaged"] = "MODERATELY_DAMAGED";
|
|
5194
|
-
PropertyDamageStatus2["SeverelyDamaged"] = "SEVERELY_DAMAGED";
|
|
5195
|
-
return PropertyDamageStatus2;
|
|
5196
|
-
})(PropertyDamageStatus || {});
|
|
5197
|
-
var PropertyUtilizationStyle = /* @__PURE__ */ ((PropertyUtilizationStyle2) => {
|
|
5198
|
-
PropertyUtilizationStyle2["Unknown"] = "UNKNOWN";
|
|
5199
|
-
PropertyUtilizationStyle2["House"] = "HOUSE";
|
|
5200
|
-
PropertyUtilizationStyle2["Business"] = "BUSINESS";
|
|
5201
|
-
PropertyUtilizationStyle2["Other"] = "OTHER";
|
|
5202
|
-
return PropertyUtilizationStyle2;
|
|
5203
|
-
})(PropertyUtilizationStyle || {});
|
|
5204
|
-
var PropertyOwnershipType = /* @__PURE__ */ ((PropertyOwnershipType2) => {
|
|
5205
|
-
PropertyOwnershipType2["Unknown"] = "UNKNOWN";
|
|
5206
|
-
PropertyOwnershipType2["Proprietor"] = "PROPRIETOR";
|
|
5207
|
-
PropertyOwnershipType2["Tenant"] = "TENANT";
|
|
5208
|
-
return PropertyOwnershipType2;
|
|
5209
|
-
})(PropertyOwnershipType || {});
|
|
5210
|
-
var LossPayeeClauseType = /* @__PURE__ */ ((LossPayeeClauseType2) => {
|
|
5211
|
-
LossPayeeClauseType2["Bank"] = "BANK";
|
|
5212
|
-
LossPayeeClauseType2["FinancialInstitution"] = "FINANCIAL_INSTITUTION";
|
|
5213
|
-
return LossPayeeClauseType2;
|
|
5214
|
-
})(LossPayeeClauseType || {});
|
|
5215
|
-
|
|
5216
|
-
// src/contracts/common.vehicle.ts
|
|
5217
|
-
var VehicleUtilizationStyle = /* @__PURE__ */ ((VehicleUtilizationStyle2) => {
|
|
5218
|
-
VehicleUtilizationStyle2["Unknown"] = "UNKNOWN";
|
|
5219
|
-
VehicleUtilizationStyle2["PrivateCar"] = "PRIVATE_CAR";
|
|
5220
|
-
VehicleUtilizationStyle2["Taxi"] = "TAXI";
|
|
5221
|
-
VehicleUtilizationStyle2["RouteBasedMinibus"] = "ROUTE_BASED_MINIBUS";
|
|
5222
|
-
VehicleUtilizationStyle2["MediumBus"] = "MEDIUM_BUS";
|
|
5223
|
-
VehicleUtilizationStyle2["LargeBus"] = "LARGE_BUS";
|
|
5224
|
-
VehicleUtilizationStyle2["PickupTruck"] = "PICKUP_TRUCK";
|
|
5225
|
-
VehicleUtilizationStyle2["PanelVan"] = "PANEL_VAN";
|
|
5226
|
-
VehicleUtilizationStyle2["Truck"] = "TRUCK";
|
|
5227
|
-
VehicleUtilizationStyle2["Tractor"] = "TRACTOR";
|
|
5228
|
-
VehicleUtilizationStyle2["Motorcycle"] = "MOTORCYCLE";
|
|
5229
|
-
VehicleUtilizationStyle2["RentalCar"] = "RENTAL_CAR";
|
|
5230
|
-
VehicleUtilizationStyle2["ArmoredVehicle"] = "ARMORED_VEHICLE";
|
|
5231
|
-
VehicleUtilizationStyle2["MinibusSharedTaxi"] = "MINIBUS_SHARED_TAXI";
|
|
5232
|
-
VehicleUtilizationStyle2["Jeep"] = "JEEP";
|
|
5233
|
-
VehicleUtilizationStyle2["JeepSAV"] = "JEEP_SAV";
|
|
5234
|
-
VehicleUtilizationStyle2["JeepSUV"] = "JEEP_SUV";
|
|
5235
|
-
VehicleUtilizationStyle2["Hearse"] = "HEARSE";
|
|
5236
|
-
VehicleUtilizationStyle2["ChauffeuredRentalCar"] = "CHAUFFEURED_RENTAL_CAR";
|
|
5237
|
-
VehicleUtilizationStyle2["OperationalRental"] = "OPERATIONAL_RENTAL";
|
|
5238
|
-
VehicleUtilizationStyle2["PrivateMinibus"] = "PRIVATE_MINIBUS";
|
|
5239
|
-
VehicleUtilizationStyle2["RouteMinibus"] = "ROUTE_MINIBUS";
|
|
5240
|
-
VehicleUtilizationStyle2["ServiceMinibus"] = "SERVICE_MINIBUS";
|
|
5241
|
-
return VehicleUtilizationStyle2;
|
|
5242
|
-
})(VehicleUtilizationStyle || {});
|
|
5243
|
-
var VehicleFuelType = /* @__PURE__ */ ((VehicleFuelType2) => {
|
|
5244
|
-
VehicleFuelType2["Gasoline"] = "GASOLINE";
|
|
5245
|
-
VehicleFuelType2["Diesel"] = "DIESEL";
|
|
5246
|
-
VehicleFuelType2["Lpg"] = "LPG";
|
|
5247
|
-
VehicleFuelType2["Electric"] = "ELECTRIC";
|
|
5248
|
-
VehicleFuelType2["LpgGasoline"] = "LPG_GASOLINE";
|
|
5249
|
-
VehicleFuelType2["Hybrid"] = "HYBRID";
|
|
5250
|
-
return VehicleFuelType2;
|
|
5251
|
-
})(VehicleFuelType || {});
|
|
5252
|
-
var VehicleAccessoryType = /* @__PURE__ */ ((VehicleAccessoryType2) => {
|
|
5253
|
-
VehicleAccessoryType2["Audio"] = "audio";
|
|
5254
|
-
VehicleAccessoryType2["Display"] = "display";
|
|
5255
|
-
VehicleAccessoryType2["Other"] = "other";
|
|
5256
|
-
return VehicleAccessoryType2;
|
|
5257
|
-
})(VehicleAccessoryType || {});
|
|
5258
|
-
|
|
5259
|
-
// src/contracts/customers.ts
|
|
5260
|
-
var Gender = /* @__PURE__ */ ((Gender2) => {
|
|
5261
|
-
Gender2["Unknown"] = "UNKNOWN";
|
|
5262
|
-
Gender2["Male"] = "MALE";
|
|
5263
|
-
Gender2["Female"] = "FEMALE";
|
|
5264
|
-
Gender2["Other"] = "OTHER";
|
|
5265
|
-
return Gender2;
|
|
5266
|
-
})(Gender || {});
|
|
5267
|
-
var EducationStatus = /* @__PURE__ */ ((EducationStatus2) => {
|
|
5268
|
-
EducationStatus2["Unknown"] = "UNKNOWN";
|
|
5269
|
-
EducationStatus2["PrimarySchool"] = "PRIMARY_SCHOOL";
|
|
5270
|
-
EducationStatus2["MiddleSchool"] = "MIDDLE_SCHOOL";
|
|
5271
|
-
EducationStatus2["HighSchool"] = "HIGH_SCHOOL";
|
|
5272
|
-
EducationStatus2["University"] = "UNIVERSITY";
|
|
5273
|
-
EducationStatus2["Postgraduate"] = "POSTGRADUATE";
|
|
5274
|
-
EducationStatus2["Doctorate"] = "DOCTORATE";
|
|
5275
|
-
EducationStatus2["Other"] = "OTHER";
|
|
5276
|
-
return EducationStatus2;
|
|
5277
|
-
})(EducationStatus || {});
|
|
5278
|
-
var Nationality = /* @__PURE__ */ ((Nationality2) => {
|
|
5279
|
-
Nationality2["Unknown"] = "UNKNOWN";
|
|
5280
|
-
Nationality2["Turk"] = "TURK";
|
|
5281
|
-
Nationality2["Other"] = "OTHER";
|
|
5282
|
-
return Nationality2;
|
|
5283
|
-
})(Nationality || {});
|
|
5284
|
-
var MaritalStatus = /* @__PURE__ */ ((MaritalStatus2) => {
|
|
5285
|
-
MaritalStatus2["Unknown"] = "UNKNOWN";
|
|
5286
|
-
MaritalStatus2["Single"] = "SINGLE";
|
|
5287
|
-
MaritalStatus2["Married"] = "MARRIED";
|
|
5288
|
-
return MaritalStatus2;
|
|
5289
|
-
})(MaritalStatus || {});
|
|
5290
|
-
var Job = /* @__PURE__ */ ((Job2) => {
|
|
5291
|
-
Job2["Unknown"] = "UNKNOWN";
|
|
5292
|
-
Job2["Banker"] = "BANKER";
|
|
5293
|
-
Job2["CorporateEmployee"] = "CORPORATE_EMPLOYEE";
|
|
5294
|
-
Job2["LtdEmployee"] = "LTD_EMPLOYEE";
|
|
5295
|
-
Job2["Police"] = "POLICE";
|
|
5296
|
-
Job2["MilitaryPersonnel"] = "MILITARY_PERSONNEL";
|
|
5297
|
-
Job2["RetiredSpouse"] = "RETIRED_SPOUSE";
|
|
5298
|
-
Job2["Teacher"] = "TEACHER";
|
|
5299
|
-
Job2["Doctor"] = "DOCTOR";
|
|
5300
|
-
Job2["Pharmacist"] = "PHARMACIST";
|
|
5301
|
-
Job2["Nurse"] = "NURSE";
|
|
5302
|
-
Job2["HealthcareWorker"] = "HEALTHCARE_WORKER";
|
|
5303
|
-
Job2["Lawyer"] = "LAWYER";
|
|
5304
|
-
Job2["Judge"] = "JUDGE";
|
|
5305
|
-
Job2["Prosecutor"] = "PROSECUTOR";
|
|
5306
|
-
Job2["Freelancer"] = "FREELANCER";
|
|
5307
|
-
Job2["Farmer"] = "FARMER";
|
|
5308
|
-
Job2["Instructor"] = "INSTRUCTOR";
|
|
5309
|
-
Job2["ReligiousOfficial"] = "RELIGIOUS_OFFICIAL";
|
|
5310
|
-
Job2["AssociationManager"] = "ASSOCIATION_MANAGER";
|
|
5311
|
-
Job2["Officer"] = "OFFICER";
|
|
5312
|
-
Job2["Retired"] = "RETIRED";
|
|
5313
|
-
Job2["Housewife"] = "HOUSEWIFE";
|
|
5314
|
-
return Job2;
|
|
5315
|
-
})(Job || {});
|
|
5316
|
-
var ContactFlowState = /* @__PURE__ */ ((ContactFlowState2) => {
|
|
5317
|
-
ContactFlowState2["Active"] = "ACTIVE";
|
|
5318
|
-
ContactFlowState2["Succeeded"] = "SUCCEEDED";
|
|
5319
|
-
ContactFlowState2["Failed"] = "FAILED";
|
|
5320
|
-
return ContactFlowState2;
|
|
5321
|
-
})(ContactFlowState || {});
|
|
5322
|
-
var ContactType = /* @__PURE__ */ ((ContactType2) => {
|
|
5323
|
-
ContactType2["PhoneCall"] = "PHONE_CALL";
|
|
5324
|
-
return ContactType2;
|
|
5325
|
-
})(ContactType || {});
|
|
5326
|
-
var ContactState = /* @__PURE__ */ ((ContactState2) => {
|
|
5327
|
-
ContactState2["Planned"] = "PLANNED";
|
|
5328
|
-
ContactState2["Occurred"] = "OCCURRED";
|
|
5329
|
-
ContactState2["NotOccurred"] = "NOT_OCCURRED";
|
|
5330
|
-
return ContactState2;
|
|
5331
|
-
})(ContactState || {});
|
|
5332
|
-
var Surgery = /* @__PURE__ */ ((Surgery2) => {
|
|
5333
|
-
Surgery2["Other"] = "OTHER";
|
|
5334
|
-
Surgery2["OrganTransplant"] = "ORGAN_TRANSPLANT";
|
|
5335
|
-
Surgery2["BoneMarrowTransplant"] = "BONE_MARROW_TRANSPLANT";
|
|
5336
|
-
Surgery2["HeartSurgery"] = "HEART_SURGERY";
|
|
5337
|
-
Surgery2["BrainSurgery"] = "BRAIN_SURGERY";
|
|
5338
|
-
return Surgery2;
|
|
5339
|
-
})(Surgery || {});
|
|
5340
|
-
var Disease = /* @__PURE__ */ ((Disease2) => {
|
|
5341
|
-
Disease2["Other"] = "OTHER";
|
|
5342
|
-
Disease2["KidneyFailure"] = "KIDNEY_FAILURE";
|
|
5343
|
-
Disease2["Cancer"] = "CANCER";
|
|
5344
|
-
Disease2["LiverDisease"] = "LIVER_DISEASE";
|
|
5345
|
-
Disease2["HeartFailure"] = "HEART_FAILURE";
|
|
5346
|
-
Disease2["HeartRhythmAndConductionDisorders"] = "HEART_RHYTHM_AND_CONDUCTION_DISORDERS";
|
|
5347
|
-
Disease2["ImmuneSystemDisorders"] = "IMMUNE_SYSTEM_DISORDERS";
|
|
5348
|
-
return Disease2;
|
|
5349
|
-
})(Disease || {});
|
|
5350
|
-
|
|
5351
|
-
// src/contracts/cases.ts
|
|
5352
|
-
var CaseType = /* @__PURE__ */ ((CaseType2) => {
|
|
5353
|
-
CaseType2["SaleOpportunity"] = "SALE_OPPORTUNITY";
|
|
5354
|
-
CaseType2["Endorsement"] = "ENDORSEMENT";
|
|
5355
|
-
CaseType2["Cancel"] = "CANCEL";
|
|
5356
|
-
CaseType2["Complaint"] = "COMPLAINT";
|
|
5357
|
-
return CaseType2;
|
|
5358
|
-
})(CaseType || {});
|
|
5359
|
-
var CaseMainState = /* @__PURE__ */ ((CaseMainState2) => {
|
|
5360
|
-
CaseMainState2["Fail"] = "FAIL";
|
|
5361
|
-
CaseMainState2["Open"] = "OPEN";
|
|
5362
|
-
CaseMainState2["InProgress"] = "IN_PROGRESS";
|
|
5363
|
-
CaseMainState2["Success"] = "SUCCESS";
|
|
5364
|
-
return CaseMainState2;
|
|
5365
|
-
})(CaseMainState || {});
|
|
5366
|
-
var CaseSubState = /* @__PURE__ */ ((CaseSubState2) => {
|
|
5367
|
-
CaseSubState2["FailNoResponse"] = "FAIL_NO_RESPONSE";
|
|
5368
|
-
CaseSubState2["FailInvalidCase"] = "FAIL_INVALID_CASE";
|
|
5369
|
-
CaseSubState2["FailCustomerWithdrawn"] = "FAIL_CUSTOMER_WITHDRAWN";
|
|
5370
|
-
CaseSubState2["FailPaymentError"] = "FAIL_PAYMENT_ERROR";
|
|
5371
|
-
CaseSubState2["FailDeclinedCardInformation"] = "FAIL_DECLINED_CARD_INFORMATION";
|
|
5372
|
-
CaseSubState2["FailForeignUser"] = "FAIL_FOREIGN_USER";
|
|
5373
|
-
CaseSubState2["FailTakenElsewhere"] = "FAIL_TAKEN_ELSEWHERE";
|
|
5374
|
-
CaseSubState2["FailPriceTooHigh"] = "FAIL_PRICE_TOO_HIGH";
|
|
5375
|
-
CaseSubState2["FailAssetAcquisition"] = "FAIL_ASSET_ACQUISITION";
|
|
5376
|
-
CaseSubState2["FailAssetSold"] = "FAIL_ASSET_SOLD";
|
|
5377
|
-
CaseSubState2["FailUnresolved"] = "FAIL_UNRESOLVED";
|
|
5378
|
-
CaseSubState2["FailReferredToLegal"] = "FAIL_REFERRED_TO_LEGAL";
|
|
5379
|
-
CaseSubState2["FailCustomerUnsatisfied"] = "FAIL_CUSTOMER_UNSATISFIED";
|
|
5380
|
-
CaseSubState2["FailMissingDocuments"] = "FAIL_MISSING_DOCUMENTS";
|
|
5381
|
-
CaseSubState2["FailInsurerDenied"] = "FAIL_INSURER_DENIED";
|
|
5382
|
-
CaseSubState2["FailConditionsNotMet"] = "FAIL_CONDITIONS_NOT_MET";
|
|
5383
|
-
CaseSubState2["OpenInitial"] = "OPEN_INITIAL";
|
|
5384
|
-
CaseSubState2["OpenCollectingInformation"] = "OPEN_COLLECTING_INFORMATION";
|
|
5385
|
-
CaseSubState2["OpenDelayed"] = "OPEN_DELAYED";
|
|
5386
|
-
CaseSubState2["OpenWaiting"] = "OPEN_WAITING";
|
|
5387
|
-
CaseSubState2["InProgressUnderAnalysis"] = "IN_PROGRESS_UNDER_ANALYSIS";
|
|
5388
|
-
CaseSubState2["InProgressProposalPrepared"] = "IN_PROGRESS_PROPOSAL_PREPARED";
|
|
5389
|
-
CaseSubState2["InProgressAwaitingApproval"] = "IN_PROGRESS_AWAITING_APPROVAL";
|
|
5390
|
-
CaseSubState2["InProgressToBeRecontacted"] = "IN_PROGRESS_TO_BE_RECONTACTED";
|
|
5391
|
-
CaseSubState2["SuccessCompleted"] = "SUCCESS_COMPLETED";
|
|
5392
|
-
return CaseSubState2;
|
|
5393
|
-
})(CaseSubState || {});
|
|
5394
|
-
var CaseStatus = /* @__PURE__ */ ((CaseStatus2) => {
|
|
5395
|
-
CaseStatus2["Open"] = "OPEN";
|
|
5396
|
-
CaseStatus2["Delayed"] = "DELAYED";
|
|
5397
|
-
CaseStatus2["Success"] = "SUCCESS";
|
|
5398
|
-
CaseStatus2["Fail"] = "FAIL";
|
|
5399
|
-
return CaseStatus2;
|
|
5400
|
-
})(CaseStatus || {});
|
|
5401
|
-
var SaleOpportunityCaseSubType = /* @__PURE__ */ ((SaleOpportunityCaseSubType2) => {
|
|
5402
|
-
SaleOpportunityCaseSubType2["NewSale"] = "NEW_SALE";
|
|
5403
|
-
SaleOpportunityCaseSubType2["CrossSale"] = "CROSS_SALE";
|
|
5404
|
-
SaleOpportunityCaseSubType2["Renewal"] = "RENEWAL";
|
|
5405
|
-
return SaleOpportunityCaseSubType2;
|
|
5406
|
-
})(SaleOpportunityCaseSubType || {});
|
|
5407
|
-
var CancelCaseSubType = /* @__PURE__ */ ((CancelCaseSubType2) => {
|
|
5408
|
-
CancelCaseSubType2["OnlineCancellationRefund"] = "ONLINE_CANCELLATION_REFUND";
|
|
5409
|
-
CancelCaseSubType2["MebCancellation"] = "MEB_CANCELLATION";
|
|
5410
|
-
CancelCaseSubType2["PartialCancellation"] = "PARTIAL_CANCELLATION";
|
|
5411
|
-
CancelCaseSubType2["CancellationFromSale"] = "CANCELLATION_FROM_SALE";
|
|
5412
|
-
CancelCaseSubType2["CancellationDueToCollection"] = "CANCELLATION_DUE_TO_COLLECTION";
|
|
5413
|
-
CancelCaseSubType2["CancellationDueToDamage"] = "CANCELLATION_DUE_TO_DAMAGE";
|
|
5414
|
-
return CancelCaseSubType2;
|
|
5415
|
-
})(CancelCaseSubType || {});
|
|
5416
|
-
var ComplaintCaseSubType = /* @__PURE__ */ ((ComplaintCaseSubType2) => {
|
|
5417
|
-
ComplaintCaseSubType2["ConsultantError"] = "CONSULTANT_ERROR";
|
|
5418
|
-
ComplaintCaseSubType2["PolicyOperations"] = "POLICY_OPERATIONS";
|
|
5419
|
-
ComplaintCaseSubType2["Collection"] = "COLLECTION";
|
|
5420
|
-
ComplaintCaseSubType2["DueToFrequentCalls"] = "DUE_TO_FREQUENT_CALLS";
|
|
5421
|
-
ComplaintCaseSubType2["Fraud"] = "FRAUD";
|
|
5422
|
-
ComplaintCaseSubType2["Damage"] = "DAMAGE";
|
|
5423
|
-
ComplaintCaseSubType2["ErroneousTransaction"] = "ERRONEOUS_TRANSACTION";
|
|
5424
|
-
ComplaintCaseSubType2["DelayInOperations"] = "DELAY_IN_OPERATIONS";
|
|
5425
|
-
ComplaintCaseSubType2["OnlineTransactionErrors"] = "ONLINE_TRANSACTION_ERRORS";
|
|
5426
|
-
ComplaintCaseSubType2["DelayInCancellationPeriod"] = "DELAY_IN_CANCELLATION_PERIOD";
|
|
5427
|
-
ComplaintCaseSubType2["NonReceiptOfPolicyOrEndorsement"] = "NON_RECEIPT_OF_POLICY_OR_ENDORSEMENT";
|
|
5428
|
-
ComplaintCaseSubType2["NonProductionOfPolicyOrEndorsement"] = "NON_PRODUCTION_OF_POLICY_OR_ENDORSEMENT";
|
|
5429
|
-
ComplaintCaseSubType2["DelayInEndorsementOperations"] = "DELAY_IN_ENDORSEMENT_OPERATIONS";
|
|
5430
|
-
ComplaintCaseSubType2["ErroneousPremiumCollection"] = "ERRONEOUS_PREMIUM_COLLECTION";
|
|
5431
|
-
ComplaintCaseSubType2["NonDeliveryOfRefundReceipt"] = "NON_DELIVERY_OF_REFUND_RECEIPT";
|
|
5432
|
-
ComplaintCaseSubType2["NonRefundOfPremium"] = "NON_REFUND_OF_PREMIUM";
|
|
5433
|
-
ComplaintCaseSubType2["StaffAttitude"] = "STAFF_ATTITUDE";
|
|
5434
|
-
ComplaintCaseSubType2["InsufficientOrErroneousInformation"] = "INSUFFICIENT_OR_ERRONEOUS_INFORMATION";
|
|
5435
|
-
ComplaintCaseSubType2["NoTimelyResponse"] = "NO_TIMELY_RESPONSE";
|
|
5436
|
-
return ComplaintCaseSubType2;
|
|
5437
|
-
})(ComplaintCaseSubType || {});
|
|
5438
|
-
var EndorsementCaseSubType = /* @__PURE__ */ ((EndorsementCaseSubType2) => {
|
|
5439
|
-
EndorsementCaseSubType2["VehicleChange"] = "VEHICLE_CHANGE";
|
|
5440
|
-
EndorsementCaseSubType2["ValueIncrease"] = "VALUE_INCREASE";
|
|
5441
|
-
EndorsementCaseSubType2["NoClaimBonusTransfer"] = "NO_CLAIM_BONUS_TRANSFER";
|
|
5442
|
-
EndorsementCaseSubType2["CoverageChange"] = "COVERAGE_CHANGE";
|
|
5443
|
-
EndorsementCaseSubType2["UsageTypeChange"] = "USAGE_TYPE_CHANGE";
|
|
5444
|
-
EndorsementCaseSubType2["TransferRequest"] = "TRANSFER_REQUEST";
|
|
5445
|
-
EndorsementCaseSubType2["LicensePlateChange"] = "LICENSE_PLATE_CHANGE";
|
|
5446
|
-
EndorsementCaseSubType2["BrandModelChange"] = "BRAND_MODEL_CHANGE";
|
|
5447
|
-
EndorsementCaseSubType2["EngineChassisNumberChange"] = "ENGINE_CHASSIS_NUMBER_CHANGE";
|
|
5448
|
-
EndorsementCaseSubType2["ContactAddressChange"] = "CONTACT_ADDRESS_CHANGE";
|
|
5449
|
-
EndorsementCaseSubType2["Other"] = "OTHER";
|
|
5450
|
-
EndorsementCaseSubType2["PledgeeCorrectionAddition"] = "PLEDGEE_CORRECTION_ADDITION";
|
|
5451
|
-
return EndorsementCaseSubType2;
|
|
5452
|
-
})(EndorsementCaseSubType || {});
|
|
5453
|
-
var CaseActivityAction = /* @__PURE__ */ ((CaseActivityAction2) => {
|
|
5454
|
-
CaseActivityAction2["Created"] = "CREATED";
|
|
5455
|
-
CaseActivityAction2["Updated"] = "UPDATED";
|
|
5456
|
-
CaseActivityAction2["StateChanged"] = "STATE_CHANGED";
|
|
5457
|
-
CaseActivityAction2["ChannelChanged"] = "CHANNEL_CHANGED";
|
|
5458
|
-
CaseActivityAction2["RepresentativeAssigned"] = "REPRESENTATIVE_ASSIGNED";
|
|
5459
|
-
CaseActivityAction2["NoteAdded"] = "NOTE_ADDED";
|
|
5460
|
-
CaseActivityAction2["AssetSet"] = "ASSET_SET";
|
|
5461
|
-
CaseActivityAction2["PolicyAdded"] = "POLICY_ADDED";
|
|
5462
|
-
CaseActivityAction2["ProposalAdded"] = "PROPOSAL_ADDED";
|
|
5463
|
-
CaseActivityAction2["PolicyEndDateSet"] = "POLICY_END_DATE_SET";
|
|
5464
|
-
CaseActivityAction2["CustomerUpdated"] = "CUSTOMER_UPDATED";
|
|
5465
|
-
CaseActivityAction2["AssetUpdated"] = "ASSET_UPDATED";
|
|
5466
|
-
CaseActivityAction2["PriorityAssessed"] = "PRIORITY_ASSESSED";
|
|
5467
|
-
CaseActivityAction2["ProposalProductPurchaseAttempted"] = "PROPOSAL_PRODUCT_PURCHASE_ATTEMPTED";
|
|
5468
|
-
return CaseActivityAction2;
|
|
5469
|
-
})(CaseActivityAction || {});
|
|
5470
|
-
|
|
5471
|
-
// src/contracts/agents.ts
|
|
5472
|
-
var RobotMode = /* @__PURE__ */ ((RobotMode2) => {
|
|
5473
|
-
RobotMode2["None"] = "NONE";
|
|
5474
|
-
RobotMode2["Desktop"] = "DESKTOP";
|
|
5475
|
-
RobotMode2["Server"] = "SERVER";
|
|
5476
|
-
return RobotMode2;
|
|
5477
|
-
})(RobotMode || {});
|
|
5478
|
-
var CaseRepresentativeAssignmentMode = /* @__PURE__ */ ((CaseRepresentativeAssignmentMode2) => {
|
|
5479
|
-
CaseRepresentativeAssignmentMode2["None"] = "NONE";
|
|
5480
|
-
CaseRepresentativeAssignmentMode2["Random"] = "RANDOM";
|
|
5481
|
-
CaseRepresentativeAssignmentMode2["RoundRobin"] = "ROUND_ROBIN";
|
|
5482
|
-
CaseRepresentativeAssignmentMode2["BranchImportanceBalance"] = "BRANCH_IMPORTANCE_BALANCE";
|
|
5483
|
-
return CaseRepresentativeAssignmentMode2;
|
|
5484
|
-
})(CaseRepresentativeAssignmentMode || {});
|
|
5485
|
-
var InsuranceSyncState = /* @__PURE__ */ ((InsuranceSyncState2) => {
|
|
5486
|
-
InsuranceSyncState2["Pending"] = "PENDING";
|
|
5487
|
-
InsuranceSyncState2["Failed"] = "FAILED";
|
|
5488
|
-
InsuranceSyncState2["Succeed"] = "SUCCEED";
|
|
5489
|
-
return InsuranceSyncState2;
|
|
5490
|
-
})(InsuranceSyncState || {});
|
|
5491
|
-
var AgentInsuranceCompanyType = /* @__PURE__ */ ((AgentInsuranceCompanyType2) => {
|
|
5492
|
-
AgentInsuranceCompanyType2["WebService"] = "WEB_SERVICE";
|
|
5493
|
-
AgentInsuranceCompanyType2["Robot"] = "ROBOT";
|
|
5494
|
-
return AgentInsuranceCompanyType2;
|
|
5495
|
-
})(AgentInsuranceCompanyType || {});
|
|
5496
|
-
var SmsImplementation = /* @__PURE__ */ ((SmsImplementation2) => {
|
|
5497
|
-
SmsImplementation2["Default"] = "Default";
|
|
5498
|
-
SmsImplementation2["Teknomart"] = "Teknomart";
|
|
5499
|
-
SmsImplementation2["ArtiKurumsal"] = "ArtiKurumsal";
|
|
5500
|
-
SmsImplementation2["Verimor"] = "Verimor";
|
|
5501
|
-
return SmsImplementation2;
|
|
5502
|
-
})(SmsImplementation || {});
|
|
5503
|
-
var CallCenterImplementation = /* @__PURE__ */ ((CallCenterImplementation2) => {
|
|
5504
|
-
CallCenterImplementation2["None"] = "None";
|
|
5505
|
-
CallCenterImplementation2["AloTech"] = "AloTech";
|
|
5506
|
-
return CallCenterImplementation2;
|
|
5507
|
-
})(CallCenterImplementation || {});
|
|
5508
|
-
var B2CConfigFieldType = /* @__PURE__ */ ((B2CConfigFieldType2) => {
|
|
5509
|
-
B2CConfigFieldType2[B2CConfigFieldType2["Object"] = 1] = "Object";
|
|
5510
|
-
B2CConfigFieldType2[B2CConfigFieldType2["Array"] = 2] = "Array";
|
|
5511
|
-
B2CConfigFieldType2[B2CConfigFieldType2["Text"] = 3] = "Text";
|
|
5512
|
-
B2CConfigFieldType2[B2CConfigFieldType2["Number"] = 4] = "Number";
|
|
5513
|
-
B2CConfigFieldType2[B2CConfigFieldType2["Boolean"] = 5] = "Boolean";
|
|
5514
|
-
B2CConfigFieldType2[B2CConfigFieldType2["File"] = 6] = "File";
|
|
5515
|
-
B2CConfigFieldType2[B2CConfigFieldType2["Color"] = 7] = "Color";
|
|
5516
|
-
B2CConfigFieldType2[B2CConfigFieldType2["ProductBranch"] = 8] = "ProductBranch";
|
|
5517
|
-
B2CConfigFieldType2[B2CConfigFieldType2["Icon"] = 9] = "Icon";
|
|
5518
|
-
B2CConfigFieldType2[B2CConfigFieldType2["InsuranceCompany"] = 10] = "InsuranceCompany";
|
|
5519
|
-
B2CConfigFieldType2[B2CConfigFieldType2["MultiLineText"] = 11] = "MultiLineText";
|
|
5520
|
-
B2CConfigFieldType2[B2CConfigFieldType2["InsuranceProduct"] = 12] = "InsuranceProduct";
|
|
5521
|
-
return B2CConfigFieldType2;
|
|
5522
|
-
})(B2CConfigFieldType || {});
|
|
5523
|
-
|
|
5524
|
-
// src/contracts/webhooks.ts
|
|
5525
|
-
var WebhookEvent = /* @__PURE__ */ ((WebhookEvent2) => {
|
|
5526
|
-
WebhookEvent2["ProposalPremiumReceived"] = "proposal_premium.received";
|
|
5527
|
-
WebhookEvent2["ProposalPremiumPurchasing"] = "proposal_premium.purchasing";
|
|
5528
|
-
WebhookEvent2["ProposalPremiumPurchased"] = "proposal_premium.purchased";
|
|
5529
|
-
WebhookEvent2["ProposalPremiumPurchaseFailed"] = "proposal_premium.purchase_failed";
|
|
5530
|
-
WebhookEvent2["PolicyCreated"] = "policy.created";
|
|
5531
|
-
WebhookEvent2["PolicyUpdated"] = "policy.updated";
|
|
5532
|
-
return WebhookEvent2;
|
|
5533
|
-
})(WebhookEvent || {});
|
|
5534
|
-
|
|
5535
|
-
// src/contracts/proposals.ts
|
|
5536
|
-
var ProposalState = /* @__PURE__ */ ((ProposalState2) => {
|
|
5537
|
-
ProposalState2["Waiting"] = "WAITING";
|
|
5538
|
-
ProposalState2["Active"] = "ACTIVE";
|
|
5539
|
-
ProposalState2["Purchasing"] = "PURCHASING";
|
|
5540
|
-
ProposalState2["Purchased"] = "PURCHASED";
|
|
5541
|
-
ProposalState2["Failed"] = "FAILED";
|
|
5542
|
-
return ProposalState2;
|
|
5543
|
-
})(ProposalState || {});
|
|
5544
|
-
var ProposalProductState = /* @__PURE__ */ ((ProposalProductState2) => {
|
|
5545
|
-
ProposalProductState2["Waiting"] = "WAITING";
|
|
5546
|
-
ProposalProductState2["Failed"] = "FAILED";
|
|
5547
|
-
ProposalProductState2["Active"] = "ACTIVE";
|
|
5548
|
-
ProposalProductState2["Purchasing"] = "PURCHASING";
|
|
5549
|
-
ProposalProductState2["Purchased"] = "PURCHASED";
|
|
5550
|
-
return ProposalProductState2;
|
|
5551
|
-
})(ProposalProductState || {});
|
|
5764
|
+
// src/index.ts
|
|
5765
|
+
__reExport(index_exports, require("@insurup/contracts"), module.exports);
|
|
5552
5766
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5553
5767
|
0 && (module.exports = {
|
|
5554
|
-
AgentInsuranceCompanyType,
|
|
5555
|
-
AracSegment,
|
|
5556
|
-
AssetType,
|
|
5557
|
-
B2CConfigFieldType,
|
|
5558
|
-
CallCenterImplementation,
|
|
5559
|
-
CancelCaseSubType,
|
|
5560
|
-
CaseActivityAction,
|
|
5561
|
-
CaseMainState,
|
|
5562
|
-
CaseRepresentativeAssignmentMode,
|
|
5563
|
-
CaseStatus,
|
|
5564
|
-
CaseSubState,
|
|
5565
|
-
CaseType,
|
|
5566
|
-
Channel,
|
|
5567
|
-
ComplaintCaseSubType,
|
|
5568
|
-
ContactFlowState,
|
|
5569
|
-
ContactState,
|
|
5570
|
-
ContactType,
|
|
5571
|
-
Currency,
|
|
5572
|
-
CustomerType,
|
|
5573
5768
|
DefaultInsurUpClient,
|
|
5574
|
-
Disease,
|
|
5575
|
-
EducationStatus,
|
|
5576
|
-
EndorsementCaseSubType,
|
|
5577
5769
|
Endpoints,
|
|
5578
|
-
|
|
5579
|
-
HastaneAgi,
|
|
5770
|
+
GraphQLTransport,
|
|
5580
5771
|
InsurUpAgentBranchClient,
|
|
5581
5772
|
InsurUpAgentClient,
|
|
5582
5773
|
InsurUpAgentRoleClient,
|
|
@@ -5588,6 +5779,7 @@ var ProposalProductState = /* @__PURE__ */ ((ProposalProductState2) => {
|
|
|
5588
5779
|
InsurUpCustomerClient,
|
|
5589
5780
|
InsurUpError,
|
|
5590
5781
|
InsurUpFileClient,
|
|
5782
|
+
InsurUpGraphQLErrorCode,
|
|
5591
5783
|
InsurUpInsuranceClient,
|
|
5592
5784
|
InsurUpLanguageClient,
|
|
5593
5785
|
InsurUpPolicyClient,
|
|
@@ -5597,42 +5789,13 @@ var ProposalProductState = /* @__PURE__ */ ((ProposalProductState2) => {
|
|
|
5597
5789
|
InsurUpTemplateClient,
|
|
5598
5790
|
InsurUpVehicleClient,
|
|
5599
5791
|
InsurUpWebhookClient,
|
|
5600
|
-
InsuranceProductType,
|
|
5601
|
-
InsuranceSyncState,
|
|
5602
|
-
Job,
|
|
5603
|
-
LossPayeeClauseType,
|
|
5604
|
-
MaritalStatus,
|
|
5605
|
-
Nationality,
|
|
5606
|
-
OnarimServisTuru,
|
|
5607
|
-
PaymentOption,
|
|
5608
|
-
PolicyState,
|
|
5609
|
-
PolicyTransferCompanyFailureReason,
|
|
5610
|
-
PolicyTransferTriggerStatus,
|
|
5611
|
-
ProductBranch,
|
|
5612
|
-
PropertyDamageStatus,
|
|
5613
|
-
PropertyOwnershipType,
|
|
5614
|
-
PropertyStructure,
|
|
5615
|
-
PropertyUtilizationStyle,
|
|
5616
|
-
ProposalProductState,
|
|
5617
|
-
ProposalState,
|
|
5618
|
-
RobotMode,
|
|
5619
|
-
SaglikPaketiTedaviSekli,
|
|
5620
|
-
SaleOpportunityCaseSubType,
|
|
5621
|
-
SmsImplementation,
|
|
5622
|
-
Surgery,
|
|
5623
|
-
TasinanYuk,
|
|
5624
|
-
TransferredPolicyFailureReason,
|
|
5625
|
-
TransferredPolicySkipReason,
|
|
5626
|
-
TransferredPolicyStatus,
|
|
5627
5792
|
VERSION,
|
|
5628
|
-
|
|
5629
|
-
VehicleFuelType,
|
|
5630
|
-
VehicleUtilizationStyle,
|
|
5631
|
-
WebhookEvent,
|
|
5632
|
-
YedekParcaTuru,
|
|
5793
|
+
createGraphQLErrors,
|
|
5633
5794
|
extractError,
|
|
5634
5795
|
getDataOrThrow,
|
|
5635
|
-
|
|
5636
|
-
throwIfError
|
|
5796
|
+
getGraphQLDataOrThrow,
|
|
5797
|
+
throwIfError,
|
|
5798
|
+
throwIfGraphQLError,
|
|
5799
|
+
...require("@insurup/contracts")
|
|
5637
5800
|
});
|
|
5638
5801
|
//# sourceMappingURL=index.cjs.map
|