@insurance-broker/api-client 1.30.0 → 1.32.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 +290 -0
- package/package.json +1 -1
package/dist/schema.d.ts
CHANGED
|
@@ -194,6 +194,104 @@ export interface paths {
|
|
|
194
194
|
patch?: never;
|
|
195
195
|
trace?: never;
|
|
196
196
|
};
|
|
197
|
+
"/api/v1/obligations/{id}/payments": {
|
|
198
|
+
parameters: {
|
|
199
|
+
query?: never;
|
|
200
|
+
header?: never;
|
|
201
|
+
path?: never;
|
|
202
|
+
cookie?: never;
|
|
203
|
+
};
|
|
204
|
+
get?: never;
|
|
205
|
+
put?: never;
|
|
206
|
+
/**
|
|
207
|
+
* Record money that arrived against this charge
|
|
208
|
+
* @description PAY-001, ADR-0042 sections 4 and 5. Records that money arrived somewhere else. **The platform never asserts that it did**: under `ExternalRecordOnly` there is no gateway, nothing is collected here, and every payment carries the source it came through and the reference that source gave it.
|
|
209
|
+
*
|
|
210
|
+
* **Those two fields are the idempotency key.** `(tenant, source, externalReference)` is unique, so the same money cannot be recorded twice — not because a handler checks, but because the row is unrepresentable (BR-009). There is deliberately **no `idempotencyKey` field**: a caller-invented key answers "is this the same request", and only "is this the same money" has A8's answer in it.
|
|
211
|
+
*
|
|
212
|
+
* **A refusal is recorded, not merely returned.** Every attempt is written before the posting is tried, so a refused duplicate is findable in the reconciliation history read below.
|
|
213
|
+
*
|
|
214
|
+
* The currency is **not** a field: it is the obligation's, held by a foreign key rather than by this handler. Nil is refused — a payment of nothing is nothing having arrived.
|
|
215
|
+
*/
|
|
216
|
+
post: operations["RecordPayment"];
|
|
217
|
+
delete?: never;
|
|
218
|
+
options?: never;
|
|
219
|
+
head?: never;
|
|
220
|
+
patch?: never;
|
|
221
|
+
trace?: never;
|
|
222
|
+
};
|
|
223
|
+
"/api/v1/obligations/{id}/payment-attempts": {
|
|
224
|
+
parameters: {
|
|
225
|
+
query?: never;
|
|
226
|
+
header?: never;
|
|
227
|
+
path?: never;
|
|
228
|
+
cookie?: never;
|
|
229
|
+
};
|
|
230
|
+
/**
|
|
231
|
+
* The reconciliation history for this charge
|
|
232
|
+
* @description **A8's second half**: a duplicate posting must be *visible* in reconciliation history and not merely refused. One row per attempt — what arrived, from where, with which reference, at what instant, and by which subject — stamped with what the platform decided.
|
|
233
|
+
*
|
|
234
|
+
* An `outcome` of `null` is a real state and not missing data: the attempt is written before the posting is tried, so it means a posting in flight, or a process that died between the two. That case is exactly what this read exists to surface.
|
|
235
|
+
*
|
|
236
|
+
* `existingAmount` appears on one outcome only — a refusal because that reference is already recorded for a **different** figure. Both amounts survive and neither overwrites the other (BR-010).
|
|
237
|
+
*/
|
|
238
|
+
get: operations["ReadPaymentAttempts"];
|
|
239
|
+
put?: never;
|
|
240
|
+
post?: never;
|
|
241
|
+
delete?: never;
|
|
242
|
+
options?: never;
|
|
243
|
+
head?: never;
|
|
244
|
+
patch?: never;
|
|
245
|
+
trace?: never;
|
|
246
|
+
};
|
|
247
|
+
"/api/v1/payments/{id}": {
|
|
248
|
+
parameters: {
|
|
249
|
+
query?: never;
|
|
250
|
+
header?: never;
|
|
251
|
+
path?: never;
|
|
252
|
+
cookie?: never;
|
|
253
|
+
};
|
|
254
|
+
/**
|
|
255
|
+
* Read one payment
|
|
256
|
+
* @description Another broker's payment and another customer's are invisible here rather than refused: the tenant and owner query filters remove them before the read runs, so all three cases answer the same `404` (ADR-0008, ADR-0030).
|
|
257
|
+
*
|
|
258
|
+
* There is **no approval field**: approval is a separate recorded act and arrives in step 9.6, so a field here would be an unreachable `false` a reader would take for a fact.
|
|
259
|
+
*/
|
|
260
|
+
get: operations["GetPayment"];
|
|
261
|
+
put?: never;
|
|
262
|
+
post?: never;
|
|
263
|
+
delete?: never;
|
|
264
|
+
options?: never;
|
|
265
|
+
head?: never;
|
|
266
|
+
patch?: never;
|
|
267
|
+
trace?: never;
|
|
268
|
+
};
|
|
269
|
+
"/api/v1/payments/{id}/events": {
|
|
270
|
+
parameters: {
|
|
271
|
+
query?: never;
|
|
272
|
+
header?: never;
|
|
273
|
+
path?: never;
|
|
274
|
+
cookie?: never;
|
|
275
|
+
};
|
|
276
|
+
/**
|
|
277
|
+
* What happened to this payment, and who said so
|
|
278
|
+
* @description ADR-0042 section 8's *"every payment's history is explainable"*. One row per thing that happened to this payment, in the order it happened, each naming the subject that caused it.
|
|
279
|
+
*
|
|
280
|
+
* **Append-only in the strong sense.** `UPDATE` and `DELETE` are revoked from the application role on this table, so a row here cannot be rewritten by a data fix or a restored backup - which is the half a convention cannot give.
|
|
281
|
+
*
|
|
282
|
+
* **It is not an event source.** The payment carries its own state and this explains how it got there; deriving the state by replaying these rows would be a second representation able to disagree with the first.
|
|
283
|
+
*
|
|
284
|
+
* A refusal row **names the attempt** it is about rather than repeating its figures. The amounts, the source and the reference are on that attempt, which the reconciliation history read returns.
|
|
285
|
+
*/
|
|
286
|
+
get: operations["ReadPaymentHistory"];
|
|
287
|
+
put?: never;
|
|
288
|
+
post?: never;
|
|
289
|
+
delete?: never;
|
|
290
|
+
options?: never;
|
|
291
|
+
head?: never;
|
|
292
|
+
patch?: never;
|
|
293
|
+
trace?: never;
|
|
294
|
+
};
|
|
197
295
|
"/api/v1/insurers": {
|
|
198
296
|
parameters: {
|
|
199
297
|
query?: never;
|
|
@@ -4543,6 +4641,54 @@ export interface components {
|
|
|
4543
4641
|
/** Format: date-time */
|
|
4544
4642
|
acceptedAtUtc: null | string;
|
|
4545
4643
|
};
|
|
4644
|
+
PaymentAttemptResponse: {
|
|
4645
|
+
/** Format: uuid */
|
|
4646
|
+
id: string;
|
|
4647
|
+
/** Format: uuid */
|
|
4648
|
+
obligationId: string;
|
|
4649
|
+
/** Format: double */
|
|
4650
|
+
amount: number | string;
|
|
4651
|
+
currency: string;
|
|
4652
|
+
source: string;
|
|
4653
|
+
externalReference: string;
|
|
4654
|
+
attemptedBySubjectId: string;
|
|
4655
|
+
/** Format: date-time */
|
|
4656
|
+
attemptedAtUtc: string;
|
|
4657
|
+
outcome: null | string;
|
|
4658
|
+
/** Format: date-time */
|
|
4659
|
+
concludedAtUtc: null | string;
|
|
4660
|
+
/** Format: uuid */
|
|
4661
|
+
paymentId: null | string;
|
|
4662
|
+
/** Format: double */
|
|
4663
|
+
existingAmount: null | number | string;
|
|
4664
|
+
};
|
|
4665
|
+
PaymentEventResponse: {
|
|
4666
|
+
/** Format: uuid */
|
|
4667
|
+
id: string;
|
|
4668
|
+
kind: string;
|
|
4669
|
+
/** Format: date-time */
|
|
4670
|
+
occurredAtUtc: string;
|
|
4671
|
+
actorSubjectId: string;
|
|
4672
|
+
/** Format: uuid */
|
|
4673
|
+
paymentAttemptId: null | string;
|
|
4674
|
+
};
|
|
4675
|
+
PaymentResponse: {
|
|
4676
|
+
/** Format: uuid */
|
|
4677
|
+
id: string;
|
|
4678
|
+
/** Format: uuid */
|
|
4679
|
+
obligationId: string;
|
|
4680
|
+
/** Format: uuid */
|
|
4681
|
+
customerId: string;
|
|
4682
|
+
/** Format: double */
|
|
4683
|
+
amount: number | string;
|
|
4684
|
+
currency: string;
|
|
4685
|
+
source: string;
|
|
4686
|
+
externalReference: string;
|
|
4687
|
+
status: string;
|
|
4688
|
+
recordedBySubjectId: string;
|
|
4689
|
+
/** Format: date-time */
|
|
4690
|
+
postedAtUtc: string;
|
|
4691
|
+
};
|
|
4546
4692
|
PlaceLegalHoldRequest: {
|
|
4547
4693
|
moduleName: null | string;
|
|
4548
4694
|
entityType: null | string;
|
|
@@ -4932,6 +5078,12 @@ export interface components {
|
|
|
4932
5078
|
/** Format: date */
|
|
4933
5079
|
submittedOn: string;
|
|
4934
5080
|
};
|
|
5081
|
+
RecordPaymentRequest: {
|
|
5082
|
+
/** Format: double */
|
|
5083
|
+
amount: number | string;
|
|
5084
|
+
source: string;
|
|
5085
|
+
externalReference: string;
|
|
5086
|
+
};
|
|
4935
5087
|
RecordRenewalCustomerInformationRequest: {
|
|
4936
5088
|
/** Format: uuid */
|
|
4937
5089
|
formSubmissionId: null | string;
|
|
@@ -5588,6 +5740,144 @@ export interface operations {
|
|
|
5588
5740
|
};
|
|
5589
5741
|
};
|
|
5590
5742
|
};
|
|
5743
|
+
RecordPayment: {
|
|
5744
|
+
parameters: {
|
|
5745
|
+
query?: never;
|
|
5746
|
+
header?: never;
|
|
5747
|
+
path: {
|
|
5748
|
+
id: string;
|
|
5749
|
+
};
|
|
5750
|
+
cookie?: never;
|
|
5751
|
+
};
|
|
5752
|
+
requestBody: {
|
|
5753
|
+
content: {
|
|
5754
|
+
"application/json": components["schemas"]["RecordPaymentRequest"];
|
|
5755
|
+
};
|
|
5756
|
+
};
|
|
5757
|
+
responses: {
|
|
5758
|
+
/** @description Created */
|
|
5759
|
+
201: {
|
|
5760
|
+
headers: {
|
|
5761
|
+
[name: string]: unknown;
|
|
5762
|
+
};
|
|
5763
|
+
content: {
|
|
5764
|
+
"application/json": components["schemas"]["PaymentResponse"];
|
|
5765
|
+
};
|
|
5766
|
+
};
|
|
5767
|
+
/** @description Bad Request */
|
|
5768
|
+
400: {
|
|
5769
|
+
headers: {
|
|
5770
|
+
[name: string]: unknown;
|
|
5771
|
+
};
|
|
5772
|
+
content: {
|
|
5773
|
+
"application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
|
|
5774
|
+
};
|
|
5775
|
+
};
|
|
5776
|
+
/** @description Not Found */
|
|
5777
|
+
404: {
|
|
5778
|
+
headers: {
|
|
5779
|
+
[name: string]: unknown;
|
|
5780
|
+
};
|
|
5781
|
+
content?: never;
|
|
5782
|
+
};
|
|
5783
|
+
/** @description Conflict */
|
|
5784
|
+
409: {
|
|
5785
|
+
headers: {
|
|
5786
|
+
[name: string]: unknown;
|
|
5787
|
+
};
|
|
5788
|
+
content: {
|
|
5789
|
+
"application/problem+json": components["schemas"]["ProblemDetails"];
|
|
5790
|
+
};
|
|
5791
|
+
};
|
|
5792
|
+
};
|
|
5793
|
+
};
|
|
5794
|
+
ReadPaymentAttempts: {
|
|
5795
|
+
parameters: {
|
|
5796
|
+
query?: never;
|
|
5797
|
+
header?: never;
|
|
5798
|
+
path: {
|
|
5799
|
+
id: string;
|
|
5800
|
+
};
|
|
5801
|
+
cookie?: never;
|
|
5802
|
+
};
|
|
5803
|
+
requestBody?: never;
|
|
5804
|
+
responses: {
|
|
5805
|
+
/** @description OK */
|
|
5806
|
+
200: {
|
|
5807
|
+
headers: {
|
|
5808
|
+
[name: string]: unknown;
|
|
5809
|
+
};
|
|
5810
|
+
content: {
|
|
5811
|
+
"application/json": components["schemas"]["PaymentAttemptResponse"][];
|
|
5812
|
+
};
|
|
5813
|
+
};
|
|
5814
|
+
/** @description Not Found */
|
|
5815
|
+
404: {
|
|
5816
|
+
headers: {
|
|
5817
|
+
[name: string]: unknown;
|
|
5818
|
+
};
|
|
5819
|
+
content?: never;
|
|
5820
|
+
};
|
|
5821
|
+
};
|
|
5822
|
+
};
|
|
5823
|
+
GetPayment: {
|
|
5824
|
+
parameters: {
|
|
5825
|
+
query?: never;
|
|
5826
|
+
header?: never;
|
|
5827
|
+
path: {
|
|
5828
|
+
id: string;
|
|
5829
|
+
};
|
|
5830
|
+
cookie?: never;
|
|
5831
|
+
};
|
|
5832
|
+
requestBody?: never;
|
|
5833
|
+
responses: {
|
|
5834
|
+
/** @description OK */
|
|
5835
|
+
200: {
|
|
5836
|
+
headers: {
|
|
5837
|
+
[name: string]: unknown;
|
|
5838
|
+
};
|
|
5839
|
+
content: {
|
|
5840
|
+
"application/json": components["schemas"]["PaymentResponse"];
|
|
5841
|
+
};
|
|
5842
|
+
};
|
|
5843
|
+
/** @description Not Found */
|
|
5844
|
+
404: {
|
|
5845
|
+
headers: {
|
|
5846
|
+
[name: string]: unknown;
|
|
5847
|
+
};
|
|
5848
|
+
content?: never;
|
|
5849
|
+
};
|
|
5850
|
+
};
|
|
5851
|
+
};
|
|
5852
|
+
ReadPaymentHistory: {
|
|
5853
|
+
parameters: {
|
|
5854
|
+
query?: never;
|
|
5855
|
+
header?: never;
|
|
5856
|
+
path: {
|
|
5857
|
+
id: string;
|
|
5858
|
+
};
|
|
5859
|
+
cookie?: never;
|
|
5860
|
+
};
|
|
5861
|
+
requestBody?: never;
|
|
5862
|
+
responses: {
|
|
5863
|
+
/** @description OK */
|
|
5864
|
+
200: {
|
|
5865
|
+
headers: {
|
|
5866
|
+
[name: string]: unknown;
|
|
5867
|
+
};
|
|
5868
|
+
content: {
|
|
5869
|
+
"application/json": components["schemas"]["PaymentEventResponse"][];
|
|
5870
|
+
};
|
|
5871
|
+
};
|
|
5872
|
+
/** @description Not Found */
|
|
5873
|
+
404: {
|
|
5874
|
+
headers: {
|
|
5875
|
+
[name: string]: unknown;
|
|
5876
|
+
};
|
|
5877
|
+
content?: never;
|
|
5878
|
+
};
|
|
5879
|
+
};
|
|
5880
|
+
};
|
|
5591
5881
|
ListInsurers: {
|
|
5592
5882
|
parameters: {
|
|
5593
5883
|
query?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@insurance-broker/api-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.32.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,
|