@insurance-broker/api-client 4.15.0 → 4.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/schema.d.ts +240 -3
- package/package.json +1 -1
package/dist/schema.d.ts
CHANGED
|
@@ -1207,6 +1207,30 @@ export interface paths {
|
|
|
1207
1207
|
patch?: never;
|
|
1208
1208
|
trace?: never;
|
|
1209
1209
|
};
|
|
1210
|
+
"/api/v1/form-submissions/for-customer": {
|
|
1211
|
+
parameters: {
|
|
1212
|
+
query?: never;
|
|
1213
|
+
header?: never;
|
|
1214
|
+
path?: never;
|
|
1215
|
+
cookie?: never;
|
|
1216
|
+
};
|
|
1217
|
+
get?: never;
|
|
1218
|
+
put?: never;
|
|
1219
|
+
/**
|
|
1220
|
+
* Starts answering a form for a named customer, pinning the version that is live now.
|
|
1221
|
+
* @description Starts a submission of the named form that belongs to the named customer — the broker taking a quotation by telephone. Answer and submit it through the ordinary staff routes. It is marked `enteredBy: Staff`, the customer sees it in their own list, and a quote request may be raised against it once it is submitted. It reconfirms a renewal only if the customer enters every answer and submits it themselves (REN-003).
|
|
1222
|
+
*
|
|
1223
|
+
* **A `400` on `customerId` is one answer** for a customer this broker does not have, whether the identifier belongs to another broker or to nobody.
|
|
1224
|
+
*
|
|
1225
|
+
* **A `409` here is a settled fact, and `type` says which.** `urn:brokerplatform:problem:draft-already-open` means this customer already has a draft of this form open, named in `submissionId`; continue that one. `urn:brokerplatform:problem:product-not-open-to-new-business` means the product is not open to new business, or no longer exists. `urn:brokerplatform:problem:form-has-no-live-version` means no version of this form is published.
|
|
1226
|
+
*/
|
|
1227
|
+
post: operations["StartFormSubmissionForCustomer"];
|
|
1228
|
+
delete?: never;
|
|
1229
|
+
options?: never;
|
|
1230
|
+
head?: never;
|
|
1231
|
+
patch?: never;
|
|
1232
|
+
trace?: never;
|
|
1233
|
+
};
|
|
1210
1234
|
"/api/v1/form-submissions/{id}": {
|
|
1211
1235
|
parameters: {
|
|
1212
1236
|
query?: never;
|
|
@@ -6488,6 +6512,7 @@ export interface components {
|
|
|
6488
6512
|
answers: components["schemas"]["CustomerSubmittedAnswerResponse"][];
|
|
6489
6513
|
evidence: components["schemas"]["SubmittedEvidenceResponse"][];
|
|
6490
6514
|
isSatisfied: boolean;
|
|
6515
|
+
enteredBy: string;
|
|
6491
6516
|
};
|
|
6492
6517
|
CustomerInsurerOutcomeResponse: {
|
|
6493
6518
|
/** Format: uuid */
|
|
@@ -7022,6 +7047,163 @@ export interface components {
|
|
|
7022
7047
|
producedAtUtc: string;
|
|
7023
7048
|
producedBySubjectId: string;
|
|
7024
7049
|
};
|
|
7050
|
+
/** @description A published form version's body, in body language version 1 (ADR-0026 section 4). Only a Published or Retired version's body is promised to match; a draft's body is any JSON object. Referenced by no operation: opt into it after reading the version's status. */
|
|
7051
|
+
FormBodyV1: {
|
|
7052
|
+
/** @description The questions, in the order they are asked. May be empty only when the body asks for at least one document. */
|
|
7053
|
+
questions: components["schemas"]["FormBodyV1Question"][];
|
|
7054
|
+
/** @description The documents the form asks for, in order. Omitted when there are none. */
|
|
7055
|
+
evidence?: components["schemas"]["FormBodyV1Evidence"][];
|
|
7056
|
+
};
|
|
7057
|
+
/** @description A predicate tree: exactly one of all, any, not, or a leaf. Nests at most 10 levels and holds at most 200 nodes. */
|
|
7058
|
+
FormBodyV1Condition: {
|
|
7059
|
+
all: components["schemas"]["FormBodyV1Condition"][];
|
|
7060
|
+
} | {
|
|
7061
|
+
any: components["schemas"]["FormBodyV1Condition"][];
|
|
7062
|
+
} | {
|
|
7063
|
+
not: components["schemas"]["FormBodyV1Condition"];
|
|
7064
|
+
} | components["schemas"]["FormBodyV1ConditionLeaf"];
|
|
7065
|
+
/** @description Compares one question's answer with a literal, or asks whether it has one. The question is a key declared in the same body; nothing else can be named. */
|
|
7066
|
+
FormBodyV1ConditionLeaf: {
|
|
7067
|
+
/** @description The question whose answer is compared. */
|
|
7068
|
+
question: string;
|
|
7069
|
+
/** @enum {string} */
|
|
7070
|
+
op: "isAnswered" | "isBlank";
|
|
7071
|
+
} | {
|
|
7072
|
+
/** @description The question whose answer is compared. */
|
|
7073
|
+
question: string;
|
|
7074
|
+
/** @enum {string} */
|
|
7075
|
+
op: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
|
|
7076
|
+
value: components["schemas"]["FormBodyV1Literal"];
|
|
7077
|
+
} | {
|
|
7078
|
+
/** @description The question whose answer is compared. */
|
|
7079
|
+
question: string;
|
|
7080
|
+
/** @enum {string} */
|
|
7081
|
+
op: "in" | "notIn";
|
|
7082
|
+
/** @description The literals, all of one kind. */
|
|
7083
|
+
value: components["schemas"]["FormBodyV1Literal"][];
|
|
7084
|
+
};
|
|
7085
|
+
/**
|
|
7086
|
+
* @description A condition leaf's comparison: the closed operator set of ADR-0026 section 4.
|
|
7087
|
+
* @enum {string}
|
|
7088
|
+
*/
|
|
7089
|
+
FormBodyV1ConditionOperator: "eq" | "ne" | "in" | "notIn" | "gt" | "gte" | "lt" | "lte" | "isAnswered" | "isBlank";
|
|
7090
|
+
/** @description One document the form asks for. */
|
|
7091
|
+
FormBodyV1Evidence: {
|
|
7092
|
+
/** @description The document's key. Unique in the body, across questions and documents. */
|
|
7093
|
+
key: string;
|
|
7094
|
+
/** @description What the customer is asked for. */
|
|
7095
|
+
label: string;
|
|
7096
|
+
/** @description Guidance shown with the request. */
|
|
7097
|
+
help?: string;
|
|
7098
|
+
/** @description When the document is required. Absent means always; a condition that cannot be decided requires it. */
|
|
7099
|
+
requiredWhen?: components["schemas"]["FormBodyV1Condition"];
|
|
7100
|
+
};
|
|
7101
|
+
/** @description Text, a number, or true or false, of the kind the question it is compared with holds. A date is text written yyyy-MM-dd; a choice is an option value. */
|
|
7102
|
+
FormBodyV1Literal: boolean | number | string;
|
|
7103
|
+
/** @description One permitted answer of a choice question. */
|
|
7104
|
+
FormBodyV1Option: {
|
|
7105
|
+
/** @description What is stored when this option is chosen. */
|
|
7106
|
+
value: string;
|
|
7107
|
+
/** @description What the customer sees. */
|
|
7108
|
+
label: string;
|
|
7109
|
+
};
|
|
7110
|
+
/** @description One question. options is present exactly when the type is singleChoice or multiChoice. */
|
|
7111
|
+
FormBodyV1Question: {
|
|
7112
|
+
/** @description The property the answer is stored under. Unique in the body, across questions and documents. */
|
|
7113
|
+
key: string;
|
|
7114
|
+
type: components["schemas"]["FormBodyV1QuestionType"];
|
|
7115
|
+
/** @description What the customer is asked. */
|
|
7116
|
+
label: string;
|
|
7117
|
+
/** @description Guidance shown with the question. */
|
|
7118
|
+
help?: string;
|
|
7119
|
+
/** @description The display grouping. A heading only: it carries no visibility of its own. */
|
|
7120
|
+
section?: string;
|
|
7121
|
+
/** @description The permitted answers of a choice question, in display order. Values are unique. */
|
|
7122
|
+
options?: components["schemas"]["FormBodyV1Option"][];
|
|
7123
|
+
/** @description When the question is shown. Absent means always. */
|
|
7124
|
+
visibleWhen?: components["schemas"]["FormBodyV1Condition"];
|
|
7125
|
+
/** @description The rules an answer must satisfy. Each rule at most once. */
|
|
7126
|
+
validators?: components["schemas"]["FormBodyV1Validator"][];
|
|
7127
|
+
};
|
|
7128
|
+
/**
|
|
7129
|
+
* @description What a question asks for: the closed set of ADR-0026 section 4. text takes validators required, minLength, maxLength, pattern, oneOf and is compared with eq, ne, in, notIn, isAnswered, isBlank. longText takes validators required, minLength, maxLength, pattern, oneOf and is compared with eq, ne, in, notIn, isAnswered, isBlank. number takes validators required, min, max, oneOf, decimalPlaces and is compared with eq, ne, in, notIn, gt, gte, lt, lte, isAnswered, isBlank. yesNo takes validators required and is compared with eq, ne, isAnswered, isBlank. date takes validators required, minDate, maxDate, minAge, maxAge, minDaysAhead, maxDaysAhead and is compared with eq, ne, in, notIn, gt, gte, lt, lte, isAnswered, isBlank. singleChoice takes validators required and is compared with eq, ne, in, notIn, isAnswered, isBlank. multiChoice takes validators required and is compared with in, notIn, isAnswered, isBlank.
|
|
7130
|
+
* @enum {string}
|
|
7131
|
+
*/
|
|
7132
|
+
FormBodyV1QuestionType: "text" | "longText" | "number" | "yesNo" | "date" | "singleChoice" | "multiChoice";
|
|
7133
|
+
/**
|
|
7134
|
+
* @description A validator's rule: the closed catalogue of ADR-0026 section 4.
|
|
7135
|
+
* @enum {string}
|
|
7136
|
+
*/
|
|
7137
|
+
FormBodyV1ValidationRule: "required" | "minLength" | "maxLength" | "pattern" | "min" | "max" | "minDate" | "maxDate" | "minAge" | "maxAge" | "oneOf" | "decimalPlaces" | "minDaysAhead" | "maxDaysAhead";
|
|
7138
|
+
/** @description One rule on a question: one variant per rule, each with the parameter it takes. */
|
|
7139
|
+
FormBodyV1Validator: {
|
|
7140
|
+
/** @constant */
|
|
7141
|
+
rule: "required";
|
|
7142
|
+
} | {
|
|
7143
|
+
/** @constant */
|
|
7144
|
+
rule: "minLength";
|
|
7145
|
+
value: number;
|
|
7146
|
+
} | {
|
|
7147
|
+
/** @constant */
|
|
7148
|
+
rule: "maxLength";
|
|
7149
|
+
value: number;
|
|
7150
|
+
} | {
|
|
7151
|
+
/** @constant */
|
|
7152
|
+
rule: "pattern";
|
|
7153
|
+
/** @description A regular expression, matched non-backtracking with a timeout. */
|
|
7154
|
+
value: string;
|
|
7155
|
+
} | {
|
|
7156
|
+
/** @constant */
|
|
7157
|
+
rule: "min";
|
|
7158
|
+
value: number;
|
|
7159
|
+
} | {
|
|
7160
|
+
/** @constant */
|
|
7161
|
+
rule: "max";
|
|
7162
|
+
value: number;
|
|
7163
|
+
} | {
|
|
7164
|
+
/** @constant */
|
|
7165
|
+
rule: "minDate";
|
|
7166
|
+
/**
|
|
7167
|
+
* Format: date
|
|
7168
|
+
* @description A calendar date written yyyy-MM-dd.
|
|
7169
|
+
*/
|
|
7170
|
+
value: string;
|
|
7171
|
+
} | {
|
|
7172
|
+
/** @constant */
|
|
7173
|
+
rule: "maxDate";
|
|
7174
|
+
/**
|
|
7175
|
+
* Format: date
|
|
7176
|
+
* @description A calendar date written yyyy-MM-dd.
|
|
7177
|
+
*/
|
|
7178
|
+
value: string;
|
|
7179
|
+
} | {
|
|
7180
|
+
/** @constant */
|
|
7181
|
+
rule: "minAge";
|
|
7182
|
+
value: number;
|
|
7183
|
+
} | {
|
|
7184
|
+
/** @constant */
|
|
7185
|
+
rule: "maxAge";
|
|
7186
|
+
value: number;
|
|
7187
|
+
} | {
|
|
7188
|
+
/** @constant */
|
|
7189
|
+
rule: "oneOf";
|
|
7190
|
+
/** @description The permitted answers, all of the question's own kind. */
|
|
7191
|
+
value: components["schemas"]["FormBodyV1Literal"][];
|
|
7192
|
+
} | {
|
|
7193
|
+
/** @constant */
|
|
7194
|
+
rule: "decimalPlaces";
|
|
7195
|
+
value: number;
|
|
7196
|
+
} | {
|
|
7197
|
+
/** @constant */
|
|
7198
|
+
rule: "minDaysAhead";
|
|
7199
|
+
/** @description Whole days ahead of the date the submission is assessed on; negative for behind it. */
|
|
7200
|
+
value: number;
|
|
7201
|
+
} | {
|
|
7202
|
+
/** @constant */
|
|
7203
|
+
rule: "maxDaysAhead";
|
|
7204
|
+
/** @description Whole days ahead of the date the submission is assessed on; negative for behind it. */
|
|
7205
|
+
value: number;
|
|
7206
|
+
};
|
|
7025
7207
|
FormBodyViolationResponse: {
|
|
7026
7208
|
path: string;
|
|
7027
7209
|
/** @description Which refusal this is, as a stable name from a closed set. Key grouping, counting and translation on this, never on message. A new code is additive; renaming one is a break. */
|
|
@@ -7036,7 +7218,7 @@ export interface components {
|
|
|
7036
7218
|
productId: string;
|
|
7037
7219
|
productKey: string;
|
|
7038
7220
|
productName: string;
|
|
7039
|
-
kind:
|
|
7221
|
+
kind: components["schemas"]["FormKind"];
|
|
7040
7222
|
key: string;
|
|
7041
7223
|
name: string;
|
|
7042
7224
|
/** Format: date-time */
|
|
@@ -7048,6 +7230,8 @@ export interface components {
|
|
|
7048
7230
|
/** Format: int32 */
|
|
7049
7231
|
versionCount: number | string;
|
|
7050
7232
|
};
|
|
7233
|
+
/** @enum {string} */
|
|
7234
|
+
FormKind: "Quote" | "Claim";
|
|
7051
7235
|
FormQuestionOptionResponse: {
|
|
7052
7236
|
value: string;
|
|
7053
7237
|
label: string;
|
|
@@ -7085,6 +7269,9 @@ export interface components {
|
|
|
7085
7269
|
answers: components["schemas"]["SubmittedAnswerResponse"][];
|
|
7086
7270
|
evidence: components["schemas"]["SubmittedEvidenceResponse"][];
|
|
7087
7271
|
isSatisfied: boolean;
|
|
7272
|
+
/** Format: uuid */
|
|
7273
|
+
customerId: null | string;
|
|
7274
|
+
enteredBy: string;
|
|
7088
7275
|
};
|
|
7089
7276
|
FormTeamRequest: {
|
|
7090
7277
|
code: string;
|
|
@@ -7101,7 +7288,7 @@ export interface components {
|
|
|
7101
7288
|
id: string;
|
|
7102
7289
|
/** Format: int32 */
|
|
7103
7290
|
versionNumber: number | string;
|
|
7104
|
-
status:
|
|
7291
|
+
status: components["schemas"]["FormVersionStatus"];
|
|
7105
7292
|
/** Format: int32 */
|
|
7106
7293
|
bodySchemaVersion: number | string;
|
|
7107
7294
|
contentHash: null | string;
|
|
@@ -7115,6 +7302,8 @@ export interface components {
|
|
|
7115
7302
|
retiredAtUtc: null | string;
|
|
7116
7303
|
retiredBySubjectId: null | string;
|
|
7117
7304
|
};
|
|
7305
|
+
/** @enum {string} */
|
|
7306
|
+
FormVersionStatus: "Draft" | "Published" | "Retired";
|
|
7118
7307
|
GenerateDocumentRequest: {
|
|
7119
7308
|
format: null | string;
|
|
7120
7309
|
};
|
|
@@ -7569,7 +7758,7 @@ export interface components {
|
|
|
7569
7758
|
id: string;
|
|
7570
7759
|
key: string;
|
|
7571
7760
|
name: string;
|
|
7572
|
-
kind:
|
|
7761
|
+
kind: components["schemas"]["FormKind"];
|
|
7573
7762
|
/** Format: int32 */
|
|
7574
7763
|
publishedVersionNumber: number | string;
|
|
7575
7764
|
};
|
|
@@ -8733,6 +8922,12 @@ export interface components {
|
|
|
8733
8922
|
/** Format: uuid */
|
|
8734
8923
|
copyFromVersionId: null | string;
|
|
8735
8924
|
};
|
|
8925
|
+
StartFormSubmissionForCustomerRequest: {
|
|
8926
|
+
/** Format: uuid */
|
|
8927
|
+
formDefinitionId: null | string;
|
|
8928
|
+
/** Format: uuid */
|
|
8929
|
+
customerId: null | string;
|
|
8930
|
+
};
|
|
8736
8931
|
StartFormSubmissionRequest: {
|
|
8737
8932
|
/** Format: uuid */
|
|
8738
8933
|
formDefinitionId: null | string;
|
|
@@ -11931,6 +12126,48 @@ export interface operations {
|
|
|
11931
12126
|
};
|
|
11932
12127
|
};
|
|
11933
12128
|
};
|
|
12129
|
+
StartFormSubmissionForCustomer: {
|
|
12130
|
+
parameters: {
|
|
12131
|
+
query?: never;
|
|
12132
|
+
header?: never;
|
|
12133
|
+
path?: never;
|
|
12134
|
+
cookie?: never;
|
|
12135
|
+
};
|
|
12136
|
+
requestBody: {
|
|
12137
|
+
content: {
|
|
12138
|
+
"application/json": components["schemas"]["StartFormSubmissionForCustomerRequest"];
|
|
12139
|
+
};
|
|
12140
|
+
};
|
|
12141
|
+
responses: {
|
|
12142
|
+
/** @description Created */
|
|
12143
|
+
201: {
|
|
12144
|
+
headers: {
|
|
12145
|
+
[name: string]: unknown;
|
|
12146
|
+
};
|
|
12147
|
+
content: {
|
|
12148
|
+
"application/json": components["schemas"]["FormSubmissionResponse"];
|
|
12149
|
+
};
|
|
12150
|
+
};
|
|
12151
|
+
/** @description Bad Request */
|
|
12152
|
+
400: {
|
|
12153
|
+
headers: {
|
|
12154
|
+
[name: string]: unknown;
|
|
12155
|
+
};
|
|
12156
|
+
content: {
|
|
12157
|
+
"application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
|
|
12158
|
+
};
|
|
12159
|
+
};
|
|
12160
|
+
/** @description Conflict. A type of urn:brokerplatform:problem:concurrency-conflict means someone else changed the record first and nothing was written: read it again and decide again. Any other type is a conflict this operation decided itself, and retrying it unchanged will not help. */
|
|
12161
|
+
409: {
|
|
12162
|
+
headers: {
|
|
12163
|
+
[name: string]: unknown;
|
|
12164
|
+
};
|
|
12165
|
+
content: {
|
|
12166
|
+
"application/problem+json": components["schemas"]["ConcurrencyConflictProblem"] | components["schemas"]["ProblemDetails"];
|
|
12167
|
+
};
|
|
12168
|
+
};
|
|
12169
|
+
};
|
|
12170
|
+
};
|
|
11934
12171
|
GetFormSubmission: {
|
|
11935
12172
|
parameters: {
|
|
11936
12173
|
query?: never;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@insurance-broker/api-client",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.17.0",
|
|
4
4
|
"description": "Generated TypeScript client for the Insurance Broker Platform API. Do not edit by hand: regenerate with scripts/update-api-contract.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"private": false,
|