@oneaddress/partner-sdk 2.3.0 → 2.4.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/CHANGELOG.md +57 -0
- package/dist/{chunk-VGE5OE4D.mjs → chunk-4WYW6BM3.mjs} +7 -1
- package/dist/edge.js +7 -1
- package/dist/edge.mjs +1 -1
- package/dist/index.d.mts +29 -16
- package/dist/index.d.ts +29 -16
- package/dist/index.js +7 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,63 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2.4.0] - 2026-10-01
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **The skip response names the callback it is missing.** A handler built on this
|
|
15
|
+
SDK acknowledges an event whose callback was never wired with HTTP 200 and
|
|
16
|
+
skips it, which is correct. The response now also carries
|
|
17
|
+
`missing_callback: 'onTest'` (or `'onVerify'` / `'onAccountVerify'`) so the
|
|
18
|
+
SENDER can say what to do about it.
|
|
19
|
+
|
|
20
|
+
Why that matters, and it is a real incident rather than tidiness. OneAddress
|
|
21
|
+
sends five `address.test` records before a partner goes live, and the SDK routes
|
|
22
|
+
them to `onTest`, never to `onUpdate`, because the identities inside are
|
|
23
|
+
fabricated and must not reach a real customer record. A handler with no `onTest`
|
|
24
|
+
therefore answers all five with a clean 200 and processes none: delivery looks
|
|
25
|
+
perfect, nothing decrypts, no verification block is printed, and there is
|
|
26
|
+
nothing for the partner to return. The console warning this SDK already emits
|
|
27
|
+
names the callback correctly, but it lands in the receiver's own log, which is
|
|
28
|
+
precisely where nobody is looking when the person watching the verification run
|
|
29
|
+
is at the other end.
|
|
30
|
+
|
|
31
|
+
**Deliberately absent for an event this build has never heard of**, where no
|
|
32
|
+
callback name is the answer and upgrading the SDK is. A field naming one there
|
|
33
|
+
would be a confident wrong answer.
|
|
34
|
+
|
|
35
|
+
### Documentation
|
|
36
|
+
|
|
37
|
+
- **The blind-index deprecation notes cited the wrong rule and named the wrong
|
|
38
|
+
field.** 2.3.0's `@deprecated` note on `OneAddressVerifyEvent.customer` said
|
|
39
|
+
`customer` is refused because it is in `D5_BODY_NEVER`, and told the reader to
|
|
40
|
+
decrypt `session_envelope` instead. Both halves are wrong for that event, and
|
|
41
|
+
the conclusion is still right, which is why it survived review.
|
|
42
|
+
|
|
43
|
+
`OneAddressVerifyEvent` is `address.verify`, a LEGACY-shaped body: its
|
|
44
|
+
ciphertext is `address_encrypted`, not a `session_envelope`, and the D5 body
|
|
45
|
+
contract governs `address.updated` / `contact.updated` only. That body in fact
|
|
46
|
+
carries three other `D5_BODY_NEVER` keys quite legitimately (`version`,
|
|
47
|
+
`encryption_status`, `address_encrypted`), being one of the two legacy
|
|
48
|
+
composers. `customer` is absent from it because the relay stopped sending a
|
|
49
|
+
cleartext customer block in protocol 2026.2, which is a different and simpler
|
|
50
|
+
reason.
|
|
51
|
+
|
|
52
|
+
The practical correction: on `address.verify` the SDK decrypts
|
|
53
|
+
`address_encrypted` for you before calling `onVerify`, so read the verified
|
|
54
|
+
name, known names and account reference from `event.raw`. A reader following
|
|
55
|
+
the old note would have gone looking for a `session_envelope` that event never
|
|
56
|
+
carries.
|
|
57
|
+
|
|
58
|
+
`OneAddressCustomerMatch`'s own docblock had the same `session_envelope`
|
|
59
|
+
instruction and is now explicit about which field holds the ciphertext on which
|
|
60
|
+
event.
|
|
61
|
+
|
|
62
|
+
Nothing on the wire changed and no signature moved. Found while checking the
|
|
63
|
+
five-dispatch connection-verification path, where the `address.test` sender
|
|
64
|
+
does populate a `customer` block with a fabricated identity on purpose, as
|
|
65
|
+
`OneAddressTestEvent` documents.
|
|
66
|
+
|
|
10
67
|
## [2.3.0] - 2026-10-01
|
|
11
68
|
|
|
12
69
|
Documentation, and nothing in this package's own API. **No exported symbol was
|
|
@@ -1408,7 +1408,13 @@ function createOneAddressHandler(options) {
|
|
|
1408
1408
|
// NOSONAR
|
|
1409
1409
|
);
|
|
1410
1410
|
}
|
|
1411
|
-
return new Response(JSON.stringify({
|
|
1411
|
+
return new Response(JSON.stringify({
|
|
1412
|
+
ok: true,
|
|
1413
|
+
skipped: true,
|
|
1414
|
+
event: evt,
|
|
1415
|
+
...unwired ? { missing_callback: unwired } : {},
|
|
1416
|
+
accepted_update_types: acceptedUpdateTypes
|
|
1417
|
+
}), {
|
|
1412
1418
|
status: 200,
|
|
1413
1419
|
headers: { "Content-Type": "application/json" }
|
|
1414
1420
|
});
|
package/dist/edge.js
CHANGED
|
@@ -5804,7 +5804,13 @@ function createOneAddressHandler(options) {
|
|
|
5804
5804
|
// NOSONAR
|
|
5805
5805
|
);
|
|
5806
5806
|
}
|
|
5807
|
-
return new Response(JSON.stringify({
|
|
5807
|
+
return new Response(JSON.stringify({
|
|
5808
|
+
ok: true,
|
|
5809
|
+
skipped: true,
|
|
5810
|
+
event: evt,
|
|
5811
|
+
...unwired ? { missing_callback: unwired } : {},
|
|
5812
|
+
accepted_update_types: acceptedUpdateTypes
|
|
5813
|
+
}), {
|
|
5808
5814
|
status: 200,
|
|
5809
5815
|
headers: { "Content-Type": "application/json" }
|
|
5810
5816
|
});
|
package/dist/edge.mjs
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -442,12 +442,17 @@ interface OneAddressCustomer {
|
|
|
442
442
|
* It described a matching shape where each value was
|
|
443
443
|
* `base64url( HMAC-SHA256(yourBlindIndexSecret, normalize(field)) )`, so a
|
|
444
444
|
* receiver could locate a record WITHOUT decrypting the envelope. That shape
|
|
445
|
-
* is gone:
|
|
446
|
-
*
|
|
447
|
-
*
|
|
448
|
-
*
|
|
449
|
-
*
|
|
450
|
-
*
|
|
445
|
+
* is gone: no dispatch carries the block, the D5 body contract
|
|
446
|
+
* (`D5_BODY_NEVER`) refuses it outright on an `address.updated` /
|
|
447
|
+
* `contact.updated` body, and the portal control that enabled it has been
|
|
448
|
+
* removed.
|
|
449
|
+
*
|
|
450
|
+
* Nothing about the consumer is knowable before decryption, so match on the
|
|
451
|
+
* decrypted payload. Which field holds the ciphertext depends on the event: a
|
|
452
|
+
* D5 dispatch carries `session_envelope`, whose `SessionData` gives the
|
|
453
|
+
* verified name, known names and account number; the legacy-shaped
|
|
454
|
+
* `address.verify` carries `address_encrypted` instead, which this SDK decrypts
|
|
455
|
+
* for you (see {@link OneAddressVerifyEvent.raw}).
|
|
451
456
|
*
|
|
452
457
|
* The type is retained so an existing import compiles; it will go in the next
|
|
453
458
|
* major.
|
|
@@ -597,17 +602,25 @@ interface OneAddressVerifyEvent {
|
|
|
597
602
|
dispatchId: string;
|
|
598
603
|
batch_id: number;
|
|
599
604
|
user_id: string;
|
|
600
|
-
/** @deprecated NOT SENT.
|
|
601
|
-
*
|
|
602
|
-
*
|
|
603
|
-
*
|
|
604
|
-
*
|
|
605
|
-
*
|
|
606
|
-
*
|
|
605
|
+
/** @deprecated NOT SENT. The relay stopped putting a cleartext customer block
|
|
606
|
+
* on `address.verify` in protocol 2026.2. The consumer's name, known names
|
|
607
|
+
* and account reference travel encrypted inside `address_encrypted`, which
|
|
608
|
+
* this SDK decrypts for you before calling `onVerify`, so read them from
|
|
609
|
+
* {@link OneAddressVerifyEvent.raw} (the decrypted payload) rather than from
|
|
610
|
+
* here.
|
|
611
|
+
*
|
|
612
|
+
* Note that `address.verify` is a LEGACY-shaped body: the ciphertext is
|
|
613
|
+
* `address_encrypted`, not a `session_envelope`, and the D5 body contract
|
|
614
|
+
* (`D5_BODY_NEVER`) does not govern it. An earlier version of this comment
|
|
615
|
+
* cited that contract and named the wrong field.
|
|
616
|
+
*
|
|
617
|
+
* Kept optional so an existing narrowing check still compiles; it will never
|
|
618
|
+
* be populated. */
|
|
607
619
|
customer?: OneAddressCustomer;
|
|
608
|
-
/** @deprecated NOT SENT, and
|
|
609
|
-
* {@link OneAddressCustomerMatch}. Neither this nor `customer` is
|
|
610
|
-
* the earlier "exactly one of" described a shape that no longer
|
|
620
|
+
/** @deprecated NOT SENT, and no dispatch of any kind carries this block any
|
|
621
|
+
* more. See {@link OneAddressCustomerMatch}. Neither this nor `customer` is
|
|
622
|
+
* present, so the earlier "exactly one of" described a shape that no longer
|
|
623
|
+
* exists; match on the decrypted payload instead. */
|
|
611
624
|
customer_match?: OneAddressCustomerMatch;
|
|
612
625
|
address: OneAddressAddress;
|
|
613
626
|
/** The Letter of Authority. On D5 dispatches this is the structured
|
package/dist/index.d.ts
CHANGED
|
@@ -442,12 +442,17 @@ interface OneAddressCustomer {
|
|
|
442
442
|
* It described a matching shape where each value was
|
|
443
443
|
* `base64url( HMAC-SHA256(yourBlindIndexSecret, normalize(field)) )`, so a
|
|
444
444
|
* receiver could locate a record WITHOUT decrypting the envelope. That shape
|
|
445
|
-
* is gone:
|
|
446
|
-
*
|
|
447
|
-
*
|
|
448
|
-
*
|
|
449
|
-
*
|
|
450
|
-
*
|
|
445
|
+
* is gone: no dispatch carries the block, the D5 body contract
|
|
446
|
+
* (`D5_BODY_NEVER`) refuses it outright on an `address.updated` /
|
|
447
|
+
* `contact.updated` body, and the portal control that enabled it has been
|
|
448
|
+
* removed.
|
|
449
|
+
*
|
|
450
|
+
* Nothing about the consumer is knowable before decryption, so match on the
|
|
451
|
+
* decrypted payload. Which field holds the ciphertext depends on the event: a
|
|
452
|
+
* D5 dispatch carries `session_envelope`, whose `SessionData` gives the
|
|
453
|
+
* verified name, known names and account number; the legacy-shaped
|
|
454
|
+
* `address.verify` carries `address_encrypted` instead, which this SDK decrypts
|
|
455
|
+
* for you (see {@link OneAddressVerifyEvent.raw}).
|
|
451
456
|
*
|
|
452
457
|
* The type is retained so an existing import compiles; it will go in the next
|
|
453
458
|
* major.
|
|
@@ -597,17 +602,25 @@ interface OneAddressVerifyEvent {
|
|
|
597
602
|
dispatchId: string;
|
|
598
603
|
batch_id: number;
|
|
599
604
|
user_id: string;
|
|
600
|
-
/** @deprecated NOT SENT.
|
|
601
|
-
*
|
|
602
|
-
*
|
|
603
|
-
*
|
|
604
|
-
*
|
|
605
|
-
*
|
|
606
|
-
*
|
|
605
|
+
/** @deprecated NOT SENT. The relay stopped putting a cleartext customer block
|
|
606
|
+
* on `address.verify` in protocol 2026.2. The consumer's name, known names
|
|
607
|
+
* and account reference travel encrypted inside `address_encrypted`, which
|
|
608
|
+
* this SDK decrypts for you before calling `onVerify`, so read them from
|
|
609
|
+
* {@link OneAddressVerifyEvent.raw} (the decrypted payload) rather than from
|
|
610
|
+
* here.
|
|
611
|
+
*
|
|
612
|
+
* Note that `address.verify` is a LEGACY-shaped body: the ciphertext is
|
|
613
|
+
* `address_encrypted`, not a `session_envelope`, and the D5 body contract
|
|
614
|
+
* (`D5_BODY_NEVER`) does not govern it. An earlier version of this comment
|
|
615
|
+
* cited that contract and named the wrong field.
|
|
616
|
+
*
|
|
617
|
+
* Kept optional so an existing narrowing check still compiles; it will never
|
|
618
|
+
* be populated. */
|
|
607
619
|
customer?: OneAddressCustomer;
|
|
608
|
-
/** @deprecated NOT SENT, and
|
|
609
|
-
* {@link OneAddressCustomerMatch}. Neither this nor `customer` is
|
|
610
|
-
* the earlier "exactly one of" described a shape that no longer
|
|
620
|
+
/** @deprecated NOT SENT, and no dispatch of any kind carries this block any
|
|
621
|
+
* more. See {@link OneAddressCustomerMatch}. Neither this nor `customer` is
|
|
622
|
+
* present, so the earlier "exactly one of" described a shape that no longer
|
|
623
|
+
* exists; match on the decrypted payload instead. */
|
|
611
624
|
customer_match?: OneAddressCustomerMatch;
|
|
612
625
|
address: OneAddressAddress;
|
|
613
626
|
/** The Letter of Authority. On D5 dispatches this is the structured
|
package/dist/index.js
CHANGED
|
@@ -6166,7 +6166,13 @@ function createOneAddressHandler(options) {
|
|
|
6166
6166
|
// NOSONAR
|
|
6167
6167
|
);
|
|
6168
6168
|
}
|
|
6169
|
-
return new Response(JSON.stringify({
|
|
6169
|
+
return new Response(JSON.stringify({
|
|
6170
|
+
ok: true,
|
|
6171
|
+
skipped: true,
|
|
6172
|
+
event: evt,
|
|
6173
|
+
...unwired ? { missing_callback: unwired } : {},
|
|
6174
|
+
accepted_update_types: acceptedUpdateTypes
|
|
6175
|
+
}), {
|
|
6170
6176
|
status: 200,
|
|
6171
6177
|
headers: { "Content-Type": "application/json" }
|
|
6172
6178
|
});
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oneaddress/partner-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "Official OneAddress partner integration SDK — webhook verification, address decryption (legacy + D5 session-envelope), LOA validation",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|