sos-data-utils-ts 0.2.0 → 0.2.1

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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.1
4
+
5
+ - Add the shared product-neutral Task artifact schema backed by canonical flat
6
+ FHIR-like claims from `gdc-common-utils-ts`.
7
+ - Require standard `Task.status` and `Task.intent` instead of making a UI
8
+ display label mandatory for machine-created jobs.
9
+
3
10
  ## 0.2.0
4
11
 
5
12
  - Add the shared sector-and-country organization-verification policy for
package/README.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # sos-data-utils-ts
2
2
 
3
3
  Product-neutral contracts shared outward from SOS channel infrastructure into
4
- human-health and animal products. This package has no dependency on GW CORE,
5
- `gdc-*`, `uhc-*` or `vet-*` packages.
4
+ human-health and animal products. It may reuse product-neutral canonical
5
+ vocabulary from `gdc-common-utils-ts`, but has no dependency on GW CORE or any
6
+ `uhc-*` or `vet-*` package.
6
7
 
7
8
  The first contract defines capability-based BFF route roots. Public products
8
9
  use `/api/assistant/*`; `/api/internal/*` is reserved for authenticated
@@ -16,6 +17,11 @@ Sector behavior remains in its owner:
16
17
  - `vet-*`: animal/veterinary extensions;
17
18
  - the terminology service: international terminology and regional catalogs.
18
19
 
20
+ The shared Task authoring schema uses canonical flat FHIR-like claims from
21
+ `gdc-common-utils-ts`. `Task.status` and `Task.intent` are mandatory; display,
22
+ correlation and output claims remain optional so the same contract supports
23
+ human work items and machine-created asynchronous jobs.
24
+
19
25
  The organization-verification contract resolves policy by business sector and
20
26
  ISO country. The governed CA/US profiles are:
21
27
 
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './bff-api.js';
2
2
  export * from './organization-verification-policy.js';
3
+ export * from './task-artifact-schema.js';
package/dist/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './bff-api.js';
2
2
  export * from './organization-verification-policy.js';
3
+ export * from './task-artifact-schema.js';
@@ -0,0 +1,13 @@
1
+ export { TaskClaim } from 'gdc-common-utils-ts/models/interoperable-claims/task-claims';
2
+ /** Product-neutral authoring contract for flat FHIR-like Task claims. */
3
+ export type TaskArtifactSchemaContract = Readonly<{
4
+ resourceType: 'Task';
5
+ requiredClaims: readonly string[];
6
+ optionalClaims: readonly string[];
7
+ }>;
8
+ /**
9
+ * Shared Task contract used by human, animal, service and asynchronous-job
10
+ * channels. FHIR requires both status and intent; presentation fields remain
11
+ * optional because a machine-created job need not have a display title.
12
+ */
13
+ export declare const TaskArtifactSchema: TaskArtifactSchemaContract;
@@ -0,0 +1,61 @@
1
+ import { TaskClaim } from 'gdc-common-utils-ts/models/interoperable-claims/task-claims';
2
+ export { TaskClaim } from 'gdc-common-utils-ts/models/interoperable-claims/task-claims';
3
+ /**
4
+ * Shared Task contract used by human, animal, service and asynchronous-job
5
+ * channels. FHIR requires both status and intent; presentation fields remain
6
+ * optional because a machine-created job need not have a display title.
7
+ */
8
+ export const TaskArtifactSchema = Object.freeze({
9
+ resourceType: 'Task',
10
+ requiredClaims: Object.freeze([
11
+ TaskClaim.Status,
12
+ TaskClaim.Intent,
13
+ ]),
14
+ optionalClaims: Object.freeze([
15
+ TaskClaim.Id,
16
+ TaskClaim.Identifier,
17
+ TaskClaim.GroupIdentifier,
18
+ TaskClaim.StatusReason,
19
+ TaskClaim.BusinessStatus,
20
+ TaskClaim.Code,
21
+ TaskClaim.Description,
22
+ TaskClaim.Subject,
23
+ TaskClaim.For,
24
+ TaskClaim.Requester,
25
+ TaskClaim.Owner,
26
+ TaskClaim.Focus,
27
+ TaskClaim.PartOf,
28
+ TaskClaim.BasedOn,
29
+ TaskClaim.BasedOnDisplay,
30
+ TaskClaim.Language,
31
+ TaskClaim.Channel,
32
+ TaskClaim.AuthoredOn,
33
+ TaskClaim.LastModified,
34
+ TaskClaim.ScheduledAt,
35
+ TaskClaim.RetryIntervalMinutes,
36
+ TaskClaim.MaxAttempts,
37
+ TaskClaim.TriggerType,
38
+ TaskClaim.Attempt,
39
+ TaskClaim.WindowStart,
40
+ TaskClaim.WindowEnd,
41
+ TaskClaim.AutoCloseAt,
42
+ TaskClaim.EscalationRecipient,
43
+ TaskClaim.Confirmed,
44
+ TaskClaim.ConfirmedAt,
45
+ TaskClaim.Repetitions,
46
+ TaskClaim.DaysOfWeek,
47
+ TaskClaim.RepeatCount,
48
+ TaskClaim.RepeatDurationValue,
49
+ TaskClaim.RepeatDurationUnit,
50
+ TaskClaim.Modified,
51
+ TaskClaim.Priority,
52
+ TaskClaim.RestrictionPeriodStart,
53
+ TaskClaim.RestrictionPeriodEnd,
54
+ TaskClaim.ExecutionPeriodStart,
55
+ TaskClaim.ExecutionPeriodEnd,
56
+ TaskClaim.OutputType,
57
+ TaskClaim.OutputValueReference,
58
+ TaskClaim.OutputValueString,
59
+ TaskClaim.UserSelected,
60
+ ]),
61
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sos-data-utils-ts",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Product-neutral SOS channel and BFF contract utilities",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -18,6 +18,10 @@
18
18
  "./organization-verification-policy": {
19
19
  "types": "./dist/organization-verification-policy.d.ts",
20
20
  "default": "./dist/organization-verification-policy.js"
21
+ },
22
+ "./task-artifact-schema": {
23
+ "types": "./dist/task-artifact-schema.d.ts",
24
+ "default": "./dist/task-artifact-schema.js"
21
25
  }
22
26
  },
23
27
  "files": [
@@ -41,6 +45,9 @@
41
45
  "node": ">=24"
42
46
  },
43
47
  "private": false,
48
+ "dependencies": {
49
+ "gdc-common-utils-ts": "2.9.21"
50
+ },
44
51
  "publishConfig": {
45
52
  "access": "public"
46
53
  }