sos-sdk-core-ts 0.1.6 → 0.2.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 +6 -5
- package/README.md +30 -9
- package/dist/emergency-authorization.d.ts +17 -6
- package/dist/emergency-authorization.js +3 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -3
- package/package.json +3 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 0.2.0
|
|
4
4
|
|
|
5
|
+
- Redefine `sos-sdk-core-ts` as the runtime-neutral orchestration layer consumed
|
|
6
|
+
by SOSChain, Vet and UHC, above `sos-data-utils-ts` and below product SDKs.
|
|
7
|
+
- Remove the accidental dependency on and root reexport of `uhc-sdk-core-ts`.
|
|
8
|
+
- Add neutral `authorizeEmergencyAction` and `EmergencyDeliveryTarget` APIs;
|
|
9
|
+
retain the older `Soschain*` names as deprecated compatibility aliases.
|
|
5
10
|
- Consume emergency evidence, Group/ServiceRequest and card-target contracts
|
|
6
11
|
from `sos-data-utils-ts@0.3.0` instead of maintaining SDK-local copies.
|
|
7
12
|
- Preserve the existing SDK root and subpath exports as compatibility aliases.
|
|
8
|
-
- Pin `uhc-sdk-core-ts@0.6.1` so the complete tree deduplicates to one
|
|
9
|
-
`sos-data-utils-ts@0.3.0` installation.
|
|
10
|
-
- Pin the first registry release to `uhc-sdk-core-ts@0.6.0` so SOSChain
|
|
11
|
-
consumers can remove the historical vendored package from staging builds.
|
|
12
13
|
|
|
13
14
|
## 0.1.5
|
|
14
15
|
|
package/README.md
CHANGED
|
@@ -1,12 +1,30 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Shared SOS SDK Core
|
|
2
2
|
|
|
3
|
-
Runtime-neutral SOSChain
|
|
4
|
-
types and builders come from `sos-data-utils-ts`; this SDK
|
|
5
|
-
and orchestration
|
|
3
|
+
Runtime-neutral shared SDK for SOSChain, VetChain and UHC. Deterministic
|
|
4
|
+
cross-product record types and builders come from `sos-data-utils-ts`; this SDK
|
|
5
|
+
owns reusable authorization and orchestration without Node, browser, gateway or
|
|
6
|
+
product-specific behavior.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
The canonical architecture keeps both shared layers visible:
|
|
9
|
+
|
|
10
|
+
```text
|
|
11
|
+
gdc-* frozen
|
|
12
|
+
↓
|
|
13
|
+
sos-data-utils-ts
|
|
14
|
+
↓
|
|
15
|
+
sos-sdk-core-ts
|
|
16
|
+
├──→ vet-sdk-core-ts
|
|
17
|
+
├──→ uhc-sdk-core-ts
|
|
18
|
+
└──→ sos-sdk-node-ts
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Vet and UHC may also depend directly on `sos-data-utils-ts` when they import or
|
|
22
|
+
expose its types. `sos-sdk-core-ts` never depends on or reexports either product
|
|
23
|
+
SDK. `sos-sdk-node-ts` owns SOSChain-specific Node transport, persistence and
|
|
24
|
+
jobs; those adapters do not belong here.
|
|
25
|
+
|
|
26
|
+
Git, workspace, vendored and `file:` dependencies are forbidden in committed
|
|
27
|
+
or deployed dependency state.
|
|
10
28
|
|
|
11
29
|
The emergency-group contract treats `emergencyGroupId`, `subjectId` and
|
|
12
30
|
`callerId` as opaque business identifiers. A group assistance request is one
|
|
@@ -16,14 +34,17 @@ other resource is projected only at an integration boundary.
|
|
|
16
34
|
Groups are named collections. A scanned card is attached to one selected group
|
|
17
35
|
before that group's identifiers are projected into a single service request.
|
|
18
36
|
|
|
19
|
-
`
|
|
37
|
+
`authorizeEmergencyAction` separately checks trusted evidence for every
|
|
20
38
|
member and for `sos:call` or `sos:request`. Identity verification alone never
|
|
21
39
|
grants an emergency capability. Regional/local delivery is represented by
|
|
22
|
-
`
|
|
40
|
+
`EmergencyDeliveryTarget`; transport and tenant routing stay outside FHIR.
|
|
23
41
|
The `incident-reporter` relationship represents a short-lived grant issued by
|
|
24
42
|
a trusted scan resolver to an already verified person at the scene; it does
|
|
25
43
|
not imply guardianship, control or professional status.
|
|
26
44
|
|
|
45
|
+
The older `SoschainEmergency*` names remain deprecated compatibility aliases
|
|
46
|
+
to the same types and implementation; they are not a second contract.
|
|
47
|
+
|
|
27
48
|
`buildSoschainPlaceCardAssociationClaims` records a UHC/VetChain card link to
|
|
28
49
|
a canonical SOSChain Place or vehicle without merging either identity.
|
|
29
50
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export type {
|
|
3
|
-
|
|
1
|
+
import type { EmergencyAuthorizationEvidence, EmergencyCapability, EvidenceDomain } from 'sos-data-utils-ts/emergency-evidence';
|
|
2
|
+
export type { EmergencyAuthorizationEvidence, EmergencyCapability, EvidenceDomain, } from 'sos-data-utils-ts/emergency-evidence';
|
|
3
|
+
/** Runtime-neutral endpoint selected after authorization succeeds. */
|
|
4
|
+
export type EmergencyDeliveryTarget = Readonly<{
|
|
4
5
|
tenantId: string;
|
|
5
6
|
jurisdiction: string;
|
|
6
7
|
locality?: string;
|
|
@@ -10,10 +11,20 @@ export type SoschainEmergencyDeliveryTarget = Readonly<{
|
|
|
10
11
|
* Requires current trusted evidence for every affected subject and capability.
|
|
11
12
|
* Identifier syntax and the legal meaning of each issuer remain policy concerns.
|
|
12
13
|
*/
|
|
13
|
-
export declare function
|
|
14
|
+
export declare function authorizeEmergencyAction(input: Readonly<{
|
|
14
15
|
callerId: string;
|
|
15
16
|
memberSubjectIds: readonly string[];
|
|
16
|
-
capability:
|
|
17
|
-
evidence: readonly
|
|
17
|
+
capability: EmergencyCapability;
|
|
18
|
+
evidence: readonly EmergencyAuthorizationEvidence[];
|
|
18
19
|
now?: string;
|
|
19
20
|
}>): readonly string[];
|
|
21
|
+
/** @deprecated Use `EmergencyDeliveryTarget`. */
|
|
22
|
+
export type SoschainEmergencyDeliveryTarget = EmergencyDeliveryTarget;
|
|
23
|
+
/** @deprecated Import `EmergencyAuthorizationEvidence` from this module. */
|
|
24
|
+
export type SoschainEmergencyAuthorizationEvidence = EmergencyAuthorizationEvidence;
|
|
25
|
+
/** @deprecated Import `EmergencyCapability` from this module. */
|
|
26
|
+
export type SoschainEmergencyCapability = EmergencyCapability;
|
|
27
|
+
/** @deprecated Import `EvidenceDomain` from this module. */
|
|
28
|
+
export type SoschainEvidenceDomain = EvidenceDomain;
|
|
29
|
+
/** @deprecated Use `authorizeEmergencyAction`. */
|
|
30
|
+
export declare const authorizeSoschainEmergencyAction: typeof authorizeEmergencyAction;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Requires current trusted evidence for every affected subject and capability.
|
|
3
3
|
* Identifier syntax and the legal meaning of each issuer remain policy concerns.
|
|
4
4
|
*/
|
|
5
|
-
export function
|
|
5
|
+
export function authorizeEmergencyAction(input) {
|
|
6
6
|
const at = Date.parse(input.now ?? new Date().toISOString());
|
|
7
7
|
const evidenceIds = new Set();
|
|
8
8
|
for (const subjectId of input.memberSubjectIds) {
|
|
@@ -17,3 +17,5 @@ export function authorizeSoschainEmergencyAction(input) {
|
|
|
17
17
|
}
|
|
18
18
|
return [...evidenceIds];
|
|
19
19
|
}
|
|
20
|
+
/** @deprecated Use `authorizeEmergencyAction`. */
|
|
21
|
+
export const authorizeSoschainEmergencyAction = authorizeEmergencyAction;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
/** Shared runtime-neutral orchestration remains independent from product SDKs. */
|
|
2
|
+
export { EmergencyCapabilities, EvidenceDomains, EvidenceRelationships, SoschainEmergencyCapabilities, SoschainEvidenceDomains, SoschainEvidenceRelationships, } from 'sos-data-utils-ts/emergency-evidence';
|
|
3
|
+
export type { EvidenceRelationship, SoschainEvidenceRelationship, } from 'sos-data-utils-ts/emergency-evidence';
|
|
4
4
|
export * from './emergency-group.js';
|
|
5
5
|
export * from './emergency-authorization.js';
|
|
6
6
|
export * from './place-card-association.js';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
export
|
|
3
|
-
export * from 'sos-data-utils-ts/emergency-evidence';
|
|
1
|
+
/** Shared runtime-neutral orchestration remains independent from product SDKs. */
|
|
2
|
+
export { EmergencyCapabilities, EvidenceDomains, EvidenceRelationships, SoschainEmergencyCapabilities, SoschainEvidenceDomains, SoschainEvidenceRelationships, } from 'sos-data-utils-ts/emergency-evidence';
|
|
4
3
|
export * from './emergency-group.js';
|
|
5
4
|
export * from './emergency-authorization.js';
|
|
6
5
|
export * from './place-card-association.js';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sos-sdk-core-ts",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Runtime-neutral
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Runtime-neutral shared orchestration for SOS, Vet and UHC products",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Connecting Solution & Applications Ltd",
|
|
7
7
|
"repository": {
|
|
@@ -39,8 +39,7 @@
|
|
|
39
39
|
"prepack": "npm run check"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"sos-data-utils-ts": "0.3.
|
|
43
|
-
"uhc-sdk-core-ts": "0.6.1"
|
|
42
|
+
"sos-data-utils-ts": "0.3.2"
|
|
44
43
|
},
|
|
45
44
|
"devDependencies": {
|
|
46
45
|
"@types/node": "^22.5.0",
|