gdc-common-utils-ts 2.7.4 → 2.7.6

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.
Files changed (55) hide show
  1. package/dist/constants/Schemas.d.ts +2 -0
  2. package/dist/constants/Schemas.js +2 -0
  3. package/dist/constants/composition.d.ts +13 -0
  4. package/dist/constants/composition.js +15 -0
  5. package/dist/constants/data-capabilities.d.ts +7 -7
  6. package/dist/constants/didcomm.d.ts +4 -0
  7. package/dist/constants/didcomm.js +4 -0
  8. package/dist/constants/fhir-resource-types.d.ts +55 -0
  9. package/dist/constants/fhir-resource-types.js +14 -0
  10. package/dist/constants/gateway-response.d.ts +100 -0
  11. package/dist/constants/gateway-response.js +104 -0
  12. package/dist/constants/http.d.ts +14 -0
  13. package/dist/constants/http.js +14 -0
  14. package/dist/constants/index.d.ts +3 -0
  15. package/dist/constants/index.js +3 -0
  16. package/dist/constants/jsonld.d.ts +5 -0
  17. package/dist/constants/jsonld.js +5 -0
  18. package/dist/constants/schemaorg.d.ts +5 -0
  19. package/dist/constants/schemaorg.js +5 -0
  20. package/dist/constants/urn.d.ts +2 -0
  21. package/dist/constants/urn.js +2 -0
  22. package/dist/examples/communication-bundle-document-request.d.ts +0 -6
  23. package/dist/examples/index.d.ts +1 -0
  24. package/dist/examples/index.js +1 -0
  25. package/dist/examples/individual-controller.d.ts +15 -13
  26. package/dist/examples/individual-controller.js +16 -12
  27. package/dist/examples/license.d.ts +67 -65
  28. package/dist/examples/license.js +37 -39
  29. package/dist/examples/lifecycle.d.ts +0 -6
  30. package/dist/examples/related-person.d.ts +0 -36
  31. package/dist/examples/related-person.js +0 -2
  32. package/dist/examples/researcher-working-selection.d.ts +68 -0
  33. package/dist/examples/researcher-working-selection.js +59 -0
  34. package/dist/examples/shared.d.ts +1 -0
  35. package/dist/examples/shared.js +1 -0
  36. package/dist/models/bundle-editor-types.d.ts +3 -0
  37. package/dist/models/bundle-editor-types.js +3 -0
  38. package/dist/models/interoperable-claims/index.d.ts +1 -0
  39. package/dist/models/interoperable-claims/index.js +1 -0
  40. package/dist/models/interoperable-claims/research-subject-claims.d.ts +4 -0
  41. package/dist/models/interoperable-claims/research-subject-claims.js +4 -0
  42. package/dist/utils/communication-bundle-document-request.d.ts +0 -3
  43. package/dist/utils/communication-bundle-document-request.js +0 -2
  44. package/dist/utils/communication-didcomm-payload.js +0 -3
  45. package/dist/utils/individual-organization-lifecycle.d.ts +1 -4
  46. package/dist/utils/individual-organization-lifecycle.js +1 -2
  47. package/dist/utils/license-commercial-search.d.ts +0 -2
  48. package/dist/utils/license-commercial-search.js +5 -17
  49. package/dist/utils/license-list-search.js +1 -1
  50. package/dist/utils/license-offer-order.js +1 -1
  51. package/dist/utils/license.d.ts +16 -4
  52. package/dist/utils/license.js +19 -13
  53. package/dist/utils/organization-lifecycle.d.ts +0 -3
  54. package/dist/utils/organization-lifecycle.js +0 -1
  55. package/package.json +1 -1
@@ -95,29 +95,33 @@ export declare const EXAMPLE_DEVICE_LICENSE_AVAILABLE: Readonly<{
95
95
  }>;
96
96
  export declare const EXAMPLE_LICENSE_LIST_RESPONSE_BODY: Readonly<{
97
97
  readonly data: readonly [{
98
- readonly meta: {
99
- readonly status: "active";
100
- readonly subjectId: "urn:uuid:employee-controller-active-001";
101
- readonly claims: {
102
- readonly '@context': "org.schema";
103
- readonly "org.schema.IndividualProduct.serialNumber": "8a8a5e1b-0d8e-4a7c-8c39-3b8034440001";
104
- readonly "org.schema.IndividualProduct.category": "professional";
105
- readonly "org.schema.IndividualProduct.additionalType": "mobile";
106
- readonly "org.schema.Person.email": "controller@acme.org";
107
- readonly "org.schema.Person.hasOccupation.identifier.value": "ISCO-08|2211";
98
+ readonly resource: {
99
+ readonly meta: {
100
+ readonly status: "active";
101
+ readonly subjectId: "urn:uuid:employee-controller-active-001";
102
+ readonly claims: {
103
+ readonly '@context': "org.schema";
104
+ readonly "org.schema.IndividualProduct.serialNumber": "8a8a5e1b-0d8e-4a7c-8c39-3b8034440001";
105
+ readonly "org.schema.IndividualProduct.category": "professional";
106
+ readonly "org.schema.IndividualProduct.additionalType": "mobile";
107
+ readonly "org.schema.Person.email": "controller@acme.org";
108
+ readonly "org.schema.Person.hasOccupation.identifier.value": "ISCO-08|2211";
109
+ };
108
110
  };
109
111
  };
110
112
  }, {
111
- readonly meta: {
112
- readonly status: "available";
113
- readonly subjectId: "urn:uuid:subject-license-available-001";
114
- readonly claims: {
115
- readonly "org.schema.IndividualProduct.serialNumber": "8a8a5e1b-0d8e-4a7c-8c39-3b8034440009";
116
- readonly '@context': "org.schema";
117
- readonly "org.schema.IndividualProduct.category": "professional";
118
- readonly "org.schema.IndividualProduct.additionalType": "mobile";
119
- readonly "org.schema.Person.email": "controller@acme.org";
120
- readonly "org.schema.Person.hasOccupation.identifier.value": "ISCO-08|2211";
113
+ readonly resource: {
114
+ readonly meta: {
115
+ readonly status: "available";
116
+ readonly subjectId: "urn:uuid:subject-license-available-001";
117
+ readonly claims: {
118
+ readonly "org.schema.IndividualProduct.serialNumber": "8a8a5e1b-0d8e-4a7c-8c39-3b8034440009";
119
+ readonly '@context': "org.schema";
120
+ readonly "org.schema.IndividualProduct.category": "professional";
121
+ readonly "org.schema.IndividualProduct.additionalType": "mobile";
122
+ readonly "org.schema.Person.email": "controller@acme.org";
123
+ readonly "org.schema.Person.hasOccupation.identifier.value": "ISCO-08|2211";
124
+ };
121
125
  };
122
126
  };
123
127
  }];
@@ -130,9 +134,11 @@ export declare const EXAMPLE_LICENSE_ISSUE_RESPONSE_BODY: Readonly<{
130
134
  readonly data: readonly [{
131
135
  readonly type: "License:Issued";
132
136
  readonly id: "ACT-001";
133
- readonly meta: {
134
- readonly claims: {
135
- readonly "org.schema.IndividualProduct.serialNumber": "ACT-001";
137
+ readonly resource: {
138
+ readonly meta: {
139
+ readonly claims: {
140
+ readonly "org.schema.IndividualProduct.serialNumber": "ACT-001";
141
+ };
136
142
  };
137
143
  };
138
144
  }];
@@ -278,16 +284,18 @@ export declare const EXAMPLE_LICENSE_RUNTIME_DEFAULTS: Readonly<{
278
284
  }>;
279
285
  export declare const EXAMPLE_LICENSE_OFFER_RESPONSE_BODY: Readonly<{
280
286
  readonly data: readonly [{
281
- readonly meta: {
282
- readonly claims: {
283
- readonly "org.schema.Offer.identifier": "urn:offer:family-003";
284
- readonly "org.schema.Offer.price": "9.99";
285
- readonly "org.schema.Offer.priceCurrency": "EUR";
286
- readonly "org.schema.Offer.eligibleQuantity.value": 2;
287
- readonly "org.schema.Offer.itemOffered.name": "Family starter";
288
- readonly "org.schema.Offer.itemOffered.sku": "FAM-START";
289
- readonly "org.schema.Offer.acceptedPaymentMethod": "invoice";
290
- readonly "org.schema.Offer.checkoutPageURLTemplate": "https://pay.example/offer-001";
287
+ readonly resource: {
288
+ readonly meta: {
289
+ readonly claims: {
290
+ readonly "org.schema.Offer.identifier": "urn:offer:family-003";
291
+ readonly "org.schema.Offer.price": "9.99";
292
+ readonly "org.schema.Offer.priceCurrency": "EUR";
293
+ readonly "org.schema.Offer.eligibleQuantity.value": 2;
294
+ readonly "org.schema.Offer.itemOffered.name": "Family starter";
295
+ readonly "org.schema.Offer.itemOffered.sku": "FAM-START";
296
+ readonly "org.schema.Offer.acceptedPaymentMethod": "invoice";
297
+ readonly "org.schema.Offer.checkoutPageURLTemplate": "https://pay.example/offer-001";
298
+ };
291
299
  };
292
300
  };
293
301
  }];
@@ -315,46 +323,40 @@ export declare const EXAMPLE_LICENSE_ORDER_RESPONSE_BODY: Readonly<{
315
323
  export declare const EXAMPLE_LICENSE_OFFER_LIST_RESPONSE_BODY: Readonly<{
316
324
  readonly data: readonly [{
317
325
  readonly resource: {
318
- readonly total: 1;
319
- readonly data: readonly [{
320
- readonly id: "urn:offer:family-003";
321
- readonly meta: {
322
- readonly status: "active";
323
- readonly claims: {
324
- readonly "org.schema.Offer.identifier": "urn:offer:family-003";
325
- readonly "org.schema.Offer.price": "9.99";
326
- readonly "org.schema.Offer.priceCurrency": "EUR";
327
- readonly "org.schema.Offer.eligibleQuantity.value": 2;
328
- readonly "org.schema.Offer.itemOffered.name": "Family starter";
329
- readonly "org.schema.Offer.itemOffered.sku": "FAM-START";
330
- readonly "org.schema.Offer.acceptedPaymentMethod": "invoice";
331
- readonly "org.schema.Offer.checkoutPageURLTemplate": "https://pay.example/offer-001";
332
- };
326
+ readonly id: "urn:offer:family-003";
327
+ readonly meta: {
328
+ readonly status: "active";
329
+ readonly claims: {
330
+ readonly "org.schema.Offer.identifier": "urn:offer:family-003";
331
+ readonly "org.schema.Offer.price": "9.99";
332
+ readonly "org.schema.Offer.priceCurrency": "EUR";
333
+ readonly "org.schema.Offer.eligibleQuantity.value": 2;
334
+ readonly "org.schema.Offer.itemOffered.name": "Family starter";
335
+ readonly "org.schema.Offer.itemOffered.sku": "FAM-START";
336
+ readonly "org.schema.Offer.acceptedPaymentMethod": "invoice";
337
+ readonly "org.schema.Offer.checkoutPageURLTemplate": "https://pay.example/offer-001";
333
338
  };
334
- }];
339
+ };
335
340
  };
336
341
  }];
337
342
  }>;
338
343
  export declare const EXAMPLE_LICENSE_ORDER_LIST_RESPONSE_BODY: Readonly<{
339
344
  readonly data: readonly [{
340
345
  readonly resource: {
341
- readonly total: 1;
342
- readonly data: readonly [{
343
- readonly id: "urn:offer:family-003";
344
- readonly meta: {
345
- readonly status: "active";
346
- readonly claims: {
347
- readonly "org.schema.Order.acceptedOffer.identifier": "urn:offer:family-003";
348
- readonly "org.schema.Order.paymentUrl": "https://pay.example/invoice-001";
349
- readonly "org.schema.Order.partOfInvoice": "invoice-001";
350
- readonly "org.schema.Order.paymentMethod": "invoice";
351
- readonly "org.schema.Offer.price": "9.99";
352
- readonly "org.schema.Offer.priceCurrency": "EUR";
353
- readonly "org.schema.Offer.eligibleQuantity.value": string;
354
- readonly "org.schema.IndividualProduct.serialNumber": "ACT-001";
355
- };
346
+ readonly id: "urn:offer:family-003";
347
+ readonly meta: {
348
+ readonly status: "active";
349
+ readonly claims: {
350
+ readonly "org.schema.Order.acceptedOffer.identifier": "urn:offer:family-003";
351
+ readonly "org.schema.Order.paymentUrl": "https://pay.example/invoice-001";
352
+ readonly "org.schema.Order.partOfInvoice": "invoice-001";
353
+ readonly "org.schema.Order.paymentMethod": "invoice";
354
+ readonly "org.schema.Offer.price": "9.99";
355
+ readonly "org.schema.Offer.priceCurrency": "EUR";
356
+ readonly "org.schema.Offer.eligibleQuantity.value": string;
357
+ readonly "org.schema.IndividualProduct.serialNumber": "ACT-001";
356
358
  };
357
- }];
359
+ };
358
360
  };
359
361
  }];
360
362
  }>;
@@ -89,18 +89,18 @@ export const EXAMPLE_DEVICE_LICENSE_AVAILABLE = Object.freeze({
89
89
  export const EXAMPLE_LICENSE_LIST_RESPONSE_BODY = Object.freeze({
90
90
  data: [
91
91
  {
92
- meta: {
93
- status: EXAMPLE_LICENSE_ACTIVE_RECORD.status,
94
- subjectId: EXAMPLE_LICENSE_ACTIVE_RECORD.subjectId,
95
- claims: EXAMPLE_LICENSE_ACTIVE_RECORD.claims,
96
- },
92
+ resource: { meta: {
93
+ status: EXAMPLE_LICENSE_ACTIVE_RECORD.status,
94
+ subjectId: EXAMPLE_LICENSE_ACTIVE_RECORD.subjectId,
95
+ claims: EXAMPLE_LICENSE_ACTIVE_RECORD.claims,
96
+ } },
97
97
  },
98
98
  {
99
- meta: {
100
- status: EXAMPLE_LICENSE_AVAILABLE_RECORD.status,
101
- subjectId: EXAMPLE_LICENSE_AVAILABLE_RECORD.subjectId,
102
- claims: EXAMPLE_LICENSE_AVAILABLE_RECORD.claims,
103
- },
99
+ resource: { meta: {
100
+ status: EXAMPLE_LICENSE_AVAILABLE_RECORD.status,
101
+ subjectId: EXAMPLE_LICENSE_AVAILABLE_RECORD.subjectId,
102
+ claims: EXAMPLE_LICENSE_AVAILABLE_RECORD.claims,
103
+ } },
104
104
  },
105
105
  ],
106
106
  });
@@ -112,9 +112,11 @@ export const EXAMPLE_LICENSE_ISSUE_RESPONSE_BODY = Object.freeze({
112
112
  data: [{
113
113
  type: 'License:Issued',
114
114
  id: EXAMPLE_EMPLOYEE_ACTIVATION_CODE,
115
- meta: {
116
- claims: {
117
- [ClaimsIndividualProductSchemaorg.serialNumber]: EXAMPLE_EMPLOYEE_ACTIVATION_CODE,
115
+ resource: {
116
+ meta: {
117
+ claims: {
118
+ [ClaimsIndividualProductSchemaorg.serialNumber]: EXAMPLE_EMPLOYEE_ACTIVATION_CODE,
119
+ },
118
120
  },
119
121
  },
120
122
  }],
@@ -220,16 +222,18 @@ export const EXAMPLE_LICENSE_RUNTIME_DEFAULTS = Object.freeze({
220
222
  });
221
223
  export const EXAMPLE_LICENSE_OFFER_RESPONSE_BODY = Object.freeze({
222
224
  data: [{
223
- meta: {
224
- claims: {
225
- [ClaimsOfferSchemaorg.identifier]: EXAMPLE_LICENSE_OFFER_ID,
226
- [ClaimsOfferSchemaorg.price]: EXAMPLE_LICENSE_AMOUNT,
227
- [ClaimsOfferSchemaorg.priceCurrency]: EXAMPLE_LICENSE_CURRENCY,
228
- [ClaimsOfferSchemaorg.eligibleQuantityValue]: EXAMPLE_LICENSE_SEAT_UUIDS.length,
229
- [ClaimsOfferSchemaorg.itemOfferedName]: EXAMPLE_LICENSE_PLAN_NAME,
230
- [ClaimsOfferSchemaorg.itemOfferedSku]: EXAMPLE_LICENSE_SKU,
231
- [ClaimsOfferSchemaorg.acceptedPaymentMethod]: EXAMPLE_LICENSE_PAYMENT_METHOD_INVOICE,
232
- [ClaimsOfferSchemaorg.checkoutPageURLTemplate]: EXAMPLE_LICENSE_CHECKOUT_URL,
225
+ resource: {
226
+ meta: {
227
+ claims: {
228
+ [ClaimsOfferSchemaorg.identifier]: EXAMPLE_LICENSE_OFFER_ID,
229
+ [ClaimsOfferSchemaorg.price]: EXAMPLE_LICENSE_AMOUNT,
230
+ [ClaimsOfferSchemaorg.priceCurrency]: EXAMPLE_LICENSE_CURRENCY,
231
+ [ClaimsOfferSchemaorg.eligibleQuantityValue]: EXAMPLE_LICENSE_SEAT_UUIDS.length,
232
+ [ClaimsOfferSchemaorg.itemOfferedName]: EXAMPLE_LICENSE_PLAN_NAME,
233
+ [ClaimsOfferSchemaorg.itemOfferedSku]: EXAMPLE_LICENSE_SKU,
234
+ [ClaimsOfferSchemaorg.acceptedPaymentMethod]: EXAMPLE_LICENSE_PAYMENT_METHOD_INVOICE,
235
+ [ClaimsOfferSchemaorg.checkoutPageURLTemplate]: EXAMPLE_LICENSE_CHECKOUT_URL,
236
+ },
233
237
  },
234
238
  },
235
239
  }],
@@ -257,28 +261,22 @@ export const EXAMPLE_LICENSE_ORDER_RESPONSE_BODY = Object.freeze({
257
261
  export const EXAMPLE_LICENSE_OFFER_LIST_RESPONSE_BODY = Object.freeze({
258
262
  data: [{
259
263
  resource: {
260
- total: 1,
261
- data: [{
262
- id: EXAMPLE_LICENSE_OFFER_ID,
263
- meta: {
264
- status: 'active',
265
- claims: EXAMPLE_LICENSE_OFFER_RESPONSE_BODY.data[0].meta.claims,
266
- },
267
- }],
264
+ id: EXAMPLE_LICENSE_OFFER_ID,
265
+ meta: {
266
+ status: 'active',
267
+ claims: EXAMPLE_LICENSE_OFFER_RESPONSE_BODY.data[0].resource.meta.claims,
268
+ },
268
269
  },
269
270
  }],
270
271
  });
271
272
  export const EXAMPLE_LICENSE_ORDER_LIST_RESPONSE_BODY = Object.freeze({
272
273
  data: [{
273
274
  resource: {
274
- total: 1,
275
- data: [{
276
- id: EXAMPLE_LICENSE_ACCEPTED_OFFER_ID,
277
- meta: {
278
- status: 'active',
279
- claims: EXAMPLE_LICENSE_ORDER_RESPONSE_BODY.body.data[0].resource.meta.claims,
280
- },
281
- }],
275
+ id: EXAMPLE_LICENSE_ACCEPTED_OFFER_ID,
276
+ meta: {
277
+ status: 'active',
278
+ claims: EXAMPLE_LICENSE_ORDER_RESPONSE_BODY.body.data[0].resource.meta.claims,
279
+ },
282
280
  },
283
281
  }],
284
282
  });
@@ -192,9 +192,6 @@ export declare const EXAMPLE_INDIVIDUAL_ORGANIZATION_DISABLE_ENTRY: Readonly<{
192
192
  request: {
193
193
  method: "POST";
194
194
  };
195
- meta: {
196
- claims: import("..").IndividualOrganizationLifecycleClaims;
197
- };
198
195
  resource: {
199
196
  id?: string;
200
197
  meta: {
@@ -233,9 +230,6 @@ export declare const EXAMPLE_INDIVIDUAL_ORGANIZATION_PURGE_ENTRY: Readonly<{
233
230
  request: {
234
231
  method: "POST";
235
232
  };
236
- meta: {
237
- claims: import("..").IndividualOrganizationLifecycleClaims;
238
- };
239
233
  resource: {
240
234
  id?: string;
241
235
  meta: {
@@ -61,15 +61,6 @@ export declare const EXAMPLE_RELATED_PERSON_DISABLE_BUNDLE_ENTRY: {
61
61
  readonly request: {
62
62
  readonly method: "POST";
63
63
  };
64
- readonly meta: {
65
- readonly claims: {
66
- readonly '@context': "org.hl7.fhir.api";
67
- readonly "RelatedPerson.identifier": "rel-001";
68
- readonly "RelatedPerson.patient": string;
69
- readonly "RelatedPerson.telecom": "mailto:parent.guardian@example.org";
70
- readonly "RelatedPerson.relationship": "v3-RoleCode|RESPRSN";
71
- };
72
- };
73
64
  readonly resource: {
74
65
  readonly id: "rel-001";
75
66
  readonly resourceType: string;
@@ -95,15 +86,6 @@ export declare const EXAMPLE_RELATED_PERSON_DISABLE_BUNDLE_PAYLOAD: {
95
86
  readonly request: {
96
87
  readonly method: "POST";
97
88
  };
98
- readonly meta: {
99
- readonly claims: {
100
- readonly '@context': "org.hl7.fhir.api";
101
- readonly "RelatedPerson.identifier": "rel-001";
102
- readonly "RelatedPerson.patient": string;
103
- readonly "RelatedPerson.telecom": "mailto:parent.guardian@example.org";
104
- readonly "RelatedPerson.relationship": "v3-RoleCode|RESPRSN";
105
- };
106
- };
107
89
  readonly resource: {
108
90
  readonly id: "rel-001";
109
91
  readonly resourceType: string;
@@ -136,15 +118,6 @@ export declare const EXAMPLE_RELATED_PERSON_PURGE_BUNDLE_ENTRY: {
136
118
  readonly request: {
137
119
  readonly method: "POST";
138
120
  };
139
- readonly meta: {
140
- readonly claims: {
141
- readonly '@context': "org.hl7.fhir.api";
142
- readonly "RelatedPerson.identifier": "rel-001";
143
- readonly "RelatedPerson.patient": string;
144
- readonly "RelatedPerson.telecom": "mailto:parent.guardian@example.org";
145
- readonly "RelatedPerson.relationship": "v3-RoleCode|RESPRSN";
146
- };
147
- };
148
121
  readonly resource: {
149
122
  readonly id: "rel-001";
150
123
  readonly resourceType: string;
@@ -168,15 +141,6 @@ export declare const EXAMPLE_RELATED_PERSON_PURGE_BUNDLE_PAYLOAD: {
168
141
  readonly request: {
169
142
  readonly method: "POST";
170
143
  };
171
- readonly meta: {
172
- readonly claims: {
173
- readonly '@context': "org.hl7.fhir.api";
174
- readonly "RelatedPerson.identifier": "rel-001";
175
- readonly "RelatedPerson.patient": string;
176
- readonly "RelatedPerson.telecom": "mailto:parent.guardian@example.org";
177
- readonly "RelatedPerson.relationship": "v3-RoleCode|RESPRSN";
178
- };
179
- };
180
144
  readonly resource: {
181
145
  readonly id: "rel-001";
182
146
  readonly resourceType: string;
@@ -61,7 +61,6 @@ export const EXAMPLE_RELATED_PERSON_DISABLE_LIFECYCLE_RESOURCE = createInteroper
61
61
  */
62
62
  export const EXAMPLE_RELATED_PERSON_DISABLE_BUNDLE_ENTRY = {
63
63
  request: { method: InteroperableOperationMethods.Post },
64
- meta: { claims: { ...EXAMPLE_RELATED_PERSON_DISABLE_INPUT.memberClaims } },
65
64
  resource: {
66
65
  ...EXAMPLE_RELATED_PERSON_DISABLE_LIFECYCLE_RESOURCE,
67
66
  id: EXAMPLE_RELATED_PERSON_DISABLE_INPUT.resourceId,
@@ -88,7 +87,6 @@ export const EXAMPLE_RELATED_PERSON_PURGE_LIFECYCLE_RESOURCE = createInteroperab
88
87
  export const EXAMPLE_RELATED_PERSON_PURGE_BUNDLE_ENTRY = {
89
88
  type: EXAMPLE_RELATED_PERSON_PURGE_REQUEST_TYPE,
90
89
  request: { method: InteroperableOperationMethods.Post },
91
- meta: { claims: { ...EXAMPLE_RELATED_PERSON_DISABLE_INPUT.memberClaims } },
92
90
  resource: {
93
91
  ...EXAMPLE_RELATED_PERSON_PURGE_LIFECYCLE_RESOURCE,
94
92
  id: EXAMPLE_RELATED_PERSON_DISABLE_INPUT.resourceId,
@@ -0,0 +1,68 @@
1
+ export declare const EXAMPLE_RESEARCHER_WORKING_SELECTION_COMPOSITION_ID: "8a8a5e1b-0d8e-4a7c-8c39-3b8034440001";
2
+ export declare const EXAMPLE_RESEARCHER_WORKING_SELECTION_SUBJECT_ID: "urn:uuid:8a8a5e1b-0d8e-4a7c-8c39-3b8034440001";
3
+ export declare const EXAMPLE_RESEARCHER_WORKING_SELECTION_AUTHOR_ID: string;
4
+ export declare const EXAMPLE_RESEARCHER_WORKING_SELECTION_DATE: "2026-07-06T10:15:00Z";
5
+ export declare const EXAMPLE_RESEARCHER_WORKING_SELECTION_THREAD_ID: "researcher-selection-composition-save-001";
6
+ export declare const EXAMPLE_RESEARCHER_WORKING_SELECTION_SEARCH_THREAD_ID: "researcher-selection-composition-search-001";
7
+ export declare const EXAMPLE_RESEARCHER_WORKING_SELECTION_ACCESS_TOKEN: "demo-token";
8
+ export declare const EXAMPLE_RESEARCHER_WORKING_SELECTION_AUTHORIZATION: "Bearer demo-token";
9
+ export declare const EXAMPLE_RESEARCHER_WORKING_SELECTION_TAG: Readonly<{
10
+ id: "Composition.meta.tag[0]";
11
+ system: "urn:research:tag:score";
12
+ code: "10";
13
+ }>;
14
+ export type ResearcherWorkingSelectionInput = Readonly<{
15
+ compositionId?: string;
16
+ subjectId?: string;
17
+ authorId?: string;
18
+ date?: string;
19
+ tag?: Readonly<{
20
+ id: string;
21
+ system: string;
22
+ code: string;
23
+ }>;
24
+ }>;
25
+ export declare function buildResearcherWorkingSelectionBundle(input?: ResearcherWorkingSelectionInput): {
26
+ readonly resourceType: "Bundle";
27
+ readonly type: "batch";
28
+ readonly entry: readonly [{
29
+ readonly type: "Composition";
30
+ readonly request: {
31
+ readonly method: "POST";
32
+ readonly url: "digitaltwin/org.hl7.fhir.r4/Composition";
33
+ };
34
+ readonly resource: {
35
+ readonly resourceType: "Composition";
36
+ readonly id: string;
37
+ readonly meta: {
38
+ readonly tag: Readonly<{
39
+ id: string;
40
+ system: string;
41
+ code: string;
42
+ }>[];
43
+ readonly claims: {
44
+ readonly "@context": "org.hl7.fhir.r4";
45
+ readonly "@type": "Composition:ResearcherWorkingSelection";
46
+ readonly "Composition.identifier": string;
47
+ readonly "Composition.subject": string;
48
+ readonly "Composition.section": string;
49
+ readonly "Composition.type": string;
50
+ readonly "Composition.author": string;
51
+ readonly "Composition.date": string;
52
+ };
53
+ } | {
54
+ readonly tag?: undefined;
55
+ readonly claims: {
56
+ readonly "@context": "org.hl7.fhir.r4";
57
+ readonly "@type": "Composition:ResearcherWorkingSelection";
58
+ readonly "Composition.identifier": string;
59
+ readonly "Composition.subject": string;
60
+ readonly "Composition.section": string;
61
+ readonly "Composition.type": string;
62
+ readonly "Composition.author": string;
63
+ readonly "Composition.date": string;
64
+ };
65
+ };
66
+ };
67
+ }];
68
+ };
@@ -0,0 +1,59 @@
1
+ import { Format } from '../constants/Schemas.js';
2
+ import { CompositionRequestPaths, CompositionSemanticTypes } from '../constants/composition.js';
3
+ import { HealthcareBasicSections } from '../constants/healthcare.js';
4
+ import { HttpAuthorizationSchemes, HttpRequestMethods } from '../constants/http.js';
5
+ import { JsonLdKeywords } from '../constants/jsonld.js';
6
+ import { ResourceTypesFhirR4 } from '../constants/fhir-resource-types.js';
7
+ import { UrnPrefixes } from '../constants/urn.js';
8
+ import { BundleTypes } from '../models/bundle-editor-types.js';
9
+ import { CompositionClaim } from '../models/interoperable-claims/composition-claims.js';
10
+ import { EXAMPLE_COMPOSITION_DATE_MEDICATION_DOCUMENT, EXAMPLE_LICENSE_SEAT_UUID_ACTIVE, EXAMPLE_PROFESSIONAL_DID, } from './shared.js';
11
+ export const EXAMPLE_RESEARCHER_WORKING_SELECTION_COMPOSITION_ID = EXAMPLE_LICENSE_SEAT_UUID_ACTIVE;
12
+ export const EXAMPLE_RESEARCHER_WORKING_SELECTION_SUBJECT_ID = `${UrnPrefixes.Uuid}${EXAMPLE_LICENSE_SEAT_UUID_ACTIVE}`;
13
+ export const EXAMPLE_RESEARCHER_WORKING_SELECTION_AUTHOR_ID = EXAMPLE_PROFESSIONAL_DID;
14
+ export const EXAMPLE_RESEARCHER_WORKING_SELECTION_DATE = EXAMPLE_COMPOSITION_DATE_MEDICATION_DOCUMENT;
15
+ export const EXAMPLE_RESEARCHER_WORKING_SELECTION_THREAD_ID = 'researcher-selection-composition-save-001';
16
+ export const EXAMPLE_RESEARCHER_WORKING_SELECTION_SEARCH_THREAD_ID = 'researcher-selection-composition-search-001';
17
+ export const EXAMPLE_RESEARCHER_WORKING_SELECTION_ACCESS_TOKEN = 'demo-token';
18
+ export const EXAMPLE_RESEARCHER_WORKING_SELECTION_AUTHORIZATION = `${HttpAuthorizationSchemes.Bearer} ${EXAMPLE_RESEARCHER_WORKING_SELECTION_ACCESS_TOKEN}`;
19
+ export const EXAMPLE_RESEARCHER_WORKING_SELECTION_TAG = Object.freeze({
20
+ id: 'Composition.meta.tag[0]',
21
+ system: 'urn:research:tag:score',
22
+ code: '10',
23
+ });
24
+ export function buildResearcherWorkingSelectionBundle(input = {}) {
25
+ const compositionId = input.compositionId
26
+ ?? EXAMPLE_RESEARCHER_WORKING_SELECTION_COMPOSITION_ID;
27
+ const subjectId = input.subjectId ?? EXAMPLE_RESEARCHER_WORKING_SELECTION_SUBJECT_ID;
28
+ const authorId = input.authorId ?? EXAMPLE_RESEARCHER_WORKING_SELECTION_AUTHOR_ID;
29
+ const date = input.date ?? EXAMPLE_RESEARCHER_WORKING_SELECTION_DATE;
30
+ const tag = input.tag ? { tag: [input.tag] } : {};
31
+ return {
32
+ resourceType: ResourceTypesFhirR4.Bundle,
33
+ type: BundleTypes.batch,
34
+ entry: [{
35
+ type: ResourceTypesFhirR4.Composition,
36
+ request: {
37
+ method: HttpRequestMethods.Post,
38
+ url: CompositionRequestPaths.ResearcherWorkingSelection,
39
+ },
40
+ resource: {
41
+ resourceType: ResourceTypesFhirR4.Composition,
42
+ id: compositionId,
43
+ meta: {
44
+ claims: {
45
+ [JsonLdKeywords.Context]: Format.FHIR_R4,
46
+ [JsonLdKeywords.Type]: CompositionSemanticTypes.ResearcherWorkingSelection,
47
+ [CompositionClaim.Identifier]: compositionId,
48
+ [CompositionClaim.Subject]: subjectId,
49
+ [CompositionClaim.Section]: HealthcareBasicSections.HistoryOfMedicationUse.attributeValue,
50
+ [CompositionClaim.Type]: HealthcareBasicSections.PatientSummaryDocument.attributeValue,
51
+ [CompositionClaim.Author]: authorId,
52
+ [CompositionClaim.Date]: date,
53
+ },
54
+ ...tag,
55
+ },
56
+ },
57
+ }],
58
+ };
59
+ }
@@ -141,6 +141,7 @@ export declare const EXAMPLE_PROVIDER_ORGANIZATION_DID: "did:web:hospital.acme.o
141
141
  export declare const EXAMPLE_PROVIDER_ORGANIZATION_URL: "https://hospital.acme.org";
142
142
  export declare const EXAMPLE_GATEWAY_PUBLIC_ORIGIN: "https://gateway.example.com";
143
143
  export declare const EXAMPLE_HOST_PUBLIC_HOSTNAME: "host.example.com";
144
+ export declare const EXAMPLE_HOST_PUBLIC_DID: "did:web:host.example.com";
144
145
  export declare const EXAMPLE_PERSON_CARD_URI: "urn:example:card:person:subject-001";
145
146
  export declare const EXAMPLE_ANIMAL_CARD_URI: "urn:example:card:animal:subject-002";
146
147
  export declare const EXAMPLE_PROVIDER_TAX_ID: "VATES-B00112233";
@@ -159,6 +159,7 @@ export const EXAMPLE_PROVIDER_ORGANIZATION_DID = 'did:web:hospital.acme.org';
159
159
  export const EXAMPLE_PROVIDER_ORGANIZATION_URL = 'https://hospital.acme.org';
160
160
  export const EXAMPLE_GATEWAY_PUBLIC_ORIGIN = 'https://gateway.example.com';
161
161
  export const EXAMPLE_HOST_PUBLIC_HOSTNAME = 'host.example.com';
162
+ export const EXAMPLE_HOST_PUBLIC_DID = `did:web:${EXAMPLE_HOST_PUBLIC_HOSTNAME}`;
162
163
  export const EXAMPLE_PERSON_CARD_URI = 'urn:example:card:person:subject-001';
163
164
  export const EXAMPLE_ANIMAL_CARD_URI = 'urn:example:card:animal:subject-002';
164
165
  export const EXAMPLE_PROVIDER_TAX_ID = 'VATES-B00112233';
@@ -73,9 +73,12 @@ export type BuiltBundleEntry = {
73
73
  };
74
74
  export declare const BundleTypes: Readonly<{
75
75
  readonly batch: "batch";
76
+ readonly batchResponse: "batch-response";
76
77
  readonly document: "document";
77
78
  readonly collection: "collection";
79
+ readonly searchset: "searchset";
78
80
  readonly transaction: "transaction";
81
+ readonly transactionResponse: "transaction-response";
79
82
  }>;
80
83
  export type BundleType = (typeof BundleTypes)[keyof typeof BundleTypes];
81
84
  /** Canonical validation issues returned by `BundleEditor.validateDocumentAuthoring()`. */
@@ -37,9 +37,12 @@ export const BundleEditableResourceTypes = Object.freeze({
37
37
  });
38
38
  export const BundleTypes = Object.freeze({
39
39
  batch: 'batch',
40
+ batchResponse: 'batch-response',
40
41
  document: 'document',
41
42
  collection: 'collection',
43
+ searchset: 'searchset',
42
44
  transaction: 'transaction',
45
+ transactionResponse: 'transaction-response',
43
46
  });
44
47
  /** Canonical validation issues returned by `BundleEditor.validateDocumentAuthoring()`. */
45
48
  export const BundleEditorValidationIssues = Object.freeze({
@@ -20,6 +20,7 @@ export * from './appointment-claims';
20
20
  export * from './appointment-response-claims';
21
21
  export * from './encounter-claims';
22
22
  export * from './related-person-claims';
23
+ export * from './research-subject-claims';
23
24
  export * from './coverage-claims';
24
25
  export * from './clinical-impression-claims';
25
26
  export * from './task-claims';
@@ -22,6 +22,7 @@ export * from './appointment-claims.js';
22
22
  export * from './appointment-response-claims.js';
23
23
  export * from './encounter-claims.js';
24
24
  export * from './related-person-claims.js';
25
+ export * from './research-subject-claims.js';
25
26
  export * from './coverage-claims.js';
26
27
  export * from './clinical-impression-claims.js';
27
28
  export * from './task-claims.js';
@@ -0,0 +1,4 @@
1
+ /** Claims projected by GW for a FHIR ResearchSubject search result. */
2
+ export declare const ResearchSubjectClaim: Readonly<{
3
+ readonly Identifier: "ResearchSubject.identifier";
4
+ }>;
@@ -0,0 +1,4 @@
1
+ /** Claims projected by GW for a FHIR ResearchSubject search result. */
2
+ export const ResearchSubjectClaim = Object.freeze({
3
+ Identifier: 'ResearchSubject.identifier',
4
+ });
@@ -33,9 +33,6 @@ export type BundleDocumentRequestCommunicationPayload = Readonly<{
33
33
  body: Readonly<{
34
34
  data: ReadonlyArray<{
35
35
  type: string;
36
- meta: {
37
- claims: Record<string, unknown>;
38
- };
39
36
  resource: Record<string, unknown>;
40
37
  }>;
41
38
  }>;
@@ -108,7 +108,6 @@ export function buildBundleDocumentRequestCommunicationPayload(input) {
108
108
  data: [
109
109
  {
110
110
  type: BundleDocumentRequestMessageTypes.CommunicationRequestSearchWithReferenceUrl,
111
- meta: { claims },
112
111
  resource,
113
112
  },
114
113
  ],
@@ -200,7 +199,6 @@ export function createIpsSummarySearchDidcommMessage(input) {
200
199
  data: [
201
200
  {
202
201
  type: BundleDocumentRequestMessageTypes.CommunicationRequestSearchWithReferenceUrl,
203
- meta: { claims },
204
202
  resource,
205
203
  },
206
204
  ],
@@ -32,9 +32,6 @@ export function buildDidcommPayloadFromCommunicationClaims(input) {
32
32
  {
33
33
  id: String(claims[CommunicationClaim.Identifier] || input.jti || '').trim(),
34
34
  type: String(input.entryType || CommunicationDidcommEntryTypes.AttachedBundle).trim(),
35
- meta: {
36
- claims,
37
- },
38
35
  resource: communicationResource,
39
36
  },
40
37
  ],