gdc-common-utils-ts 1.20.2 → 1.21.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/README.md +2 -2
- package/dist/claims/claims-helpers-related-person.d.ts +14 -0
- package/dist/claims/claims-helpers-related-person.js +28 -0
- package/dist/constants/Schemas.d.ts +3 -0
- package/dist/constants/Schemas.js +3 -0
- package/dist/constants/fhir-code-systems.d.ts +1 -0
- package/dist/constants/fhir-code-systems.js +1 -0
- package/dist/constants/index.d.ts +3 -0
- package/dist/constants/index.js +3 -0
- package/dist/constants/individual-sections.d.ts +210 -0
- package/dist/constants/individual-sections.js +35 -0
- package/dist/constants/lifecycle.d.ts +17 -0
- package/dist/constants/lifecycle.js +18 -0
- package/dist/constants/observation-category.d.ts +72 -0
- package/dist/constants/observation-category.js +30 -0
- package/dist/constants/schemaorg.d.ts +4 -0
- package/dist/constants/schemaorg.js +4 -0
- package/dist/constants/vital-signs.d.ts +2 -17
- package/dist/constants/vital-signs.js +1 -6
- package/dist/convert/convert-observation.d.ts +20 -2
- package/dist/convert/convert-observation.js +80 -9
- package/dist/examples/index.d.ts +1 -0
- package/dist/examples/index.js +1 -0
- package/dist/examples/license.d.ts +161 -0
- package/dist/examples/license.js +136 -7
- package/dist/examples/lifecycle.d.ts +44 -0
- package/dist/examples/lifecycle.js +25 -0
- package/dist/examples/related-person.d.ts +348 -0
- package/dist/examples/related-person.js +184 -2
- package/dist/examples/shared.d.ts +94 -8
- package/dist/examples/shared.js +113 -17
- package/dist/examples/vital-signs.d.ts +56 -0
- package/dist/examples/vital-signs.js +159 -0
- package/dist/models/indexing.d.ts +68 -6
- package/dist/models/indexing.js +294 -11
- package/dist/models/interoperable-claims/observation-claims.d.ts +253 -1
- package/dist/models/interoperable-claims/observation-claims.js +249 -3
- package/dist/models/urlPath.d.ts +3 -1
- package/dist/models/urlPath.js +2 -0
- package/dist/utils/bundle-document-builder.js +22 -4
- package/dist/utils/bundle-editor.d.ts +105 -2
- package/dist/utils/bundle-editor.js +282 -2
- package/dist/utils/clinical-resource-converters.d.ts +4 -4
- package/dist/utils/clinical-resource-converters.js +5 -5
- package/dist/utils/communication-attached-bundle-session.d.ts +11 -0
- package/dist/utils/communication-attached-bundle-session.js +29 -0
- package/dist/utils/consent-lifecycle-result-reader.d.ts +24 -0
- package/dist/utils/consent-lifecycle-result-reader.js +27 -0
- package/dist/utils/employee.d.ts +25 -0
- package/dist/utils/employee.js +57 -0
- package/dist/utils/gw-core-path.d.ts +24 -0
- package/dist/utils/gw-core-path.js +21 -0
- package/dist/utils/index.d.ts +10 -0
- package/dist/utils/index.js +10 -0
- package/dist/utils/individual-bundle-vault.d.ts +144 -0
- package/dist/utils/individual-bundle-vault.js +455 -0
- package/dist/utils/individual-organization-lifecycle.d.ts +104 -0
- package/dist/utils/individual-organization-lifecycle.js +179 -0
- package/dist/utils/interoperable-resource-operation.d.ts +158 -0
- package/dist/utils/interoperable-resource-operation.js +244 -0
- package/dist/utils/license-commercial-search.d.ts +118 -0
- package/dist/utils/license-commercial-search.js +228 -0
- package/dist/utils/license-list-search.d.ts +105 -0
- package/dist/utils/license-list-search.js +209 -0
- package/dist/utils/license-offer-order.d.ts +107 -0
- package/dist/utils/license-offer-order.js +262 -0
- package/dist/utils/license.d.ts +6 -0
- package/dist/utils/license.js +6 -0
- package/dist/utils/lifecycle-result-reader.d.ts +33 -0
- package/dist/utils/lifecycle-result-reader.js +99 -0
- package/dist/utils/related-person-list.d.ts +20 -0
- package/dist/utils/related-person-list.js +54 -0
- package/package.json +2 -1
|
@@ -2,20 +2,68 @@
|
|
|
2
2
|
// File: src/utils/convert-observation.ts
|
|
3
3
|
import { ObservationClaim } from '../models/interoperable-claims/observation-claims.js';
|
|
4
4
|
import { codingFromValue, codingListToCsv, codingToValue, referenceListToCsv, referenceToValue } from './convert-shared.js';
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Converts flat editable Observation claims into a FHIR R4 Observation.
|
|
7
|
+
*
|
|
8
|
+
* Naming convention:
|
|
9
|
+
* - place the concrete FHIR version suffix at the end of the helper name
|
|
10
|
+
* - prefer `observationFromFlatToFhirR4` / `observationToFlatFhirR4`
|
|
11
|
+
* - avoid `observationFhirR4ToFlat`
|
|
12
|
+
*/
|
|
13
|
+
export function observationFromFlatToFhirR4(claims) {
|
|
6
14
|
const subject = claims[ObservationClaim.Subject] ?? claims[ObservationClaim.Patient];
|
|
15
|
+
const codeToken = claims[ObservationClaim.Code]
|
|
16
|
+
?? codingToValue({
|
|
17
|
+
system: claims[ObservationClaim.CodeSystem],
|
|
18
|
+
code: claims[ObservationClaim.CodeValue],
|
|
19
|
+
});
|
|
20
|
+
const valueConceptToken = claims[ObservationClaim.ValueConcept]
|
|
21
|
+
?? codingToValue({
|
|
22
|
+
system: claims[ObservationClaim.ValueConceptSystem],
|
|
23
|
+
code: claims[ObservationClaim.ValueConceptValue],
|
|
24
|
+
});
|
|
25
|
+
const valueQuantityCoding = codingFromValue(claims[ObservationClaim.ValueQuantityUnit])?.[0];
|
|
7
26
|
return {
|
|
8
27
|
resourceType: 'Observation',
|
|
9
28
|
identifier: claims[ObservationClaim.Identifier] ? [{ value: claims[ObservationClaim.Identifier] }] : undefined,
|
|
10
29
|
status: claims[ObservationClaim.Status],
|
|
11
30
|
category: claims[ObservationClaim.Category] ? claims[ObservationClaim.Category].split(',').map((value) => ({ coding: codingFromValue(value.trim()) })) : undefined,
|
|
12
|
-
code:
|
|
31
|
+
code: codeToken
|
|
32
|
+
? {
|
|
33
|
+
coding: codingFromValue(codeToken),
|
|
34
|
+
...(claims[ObservationClaim.CodeText] || claims[ObservationClaim.CodeDisplay]
|
|
35
|
+
? { text: claims[ObservationClaim.CodeText] ?? claims[ObservationClaim.CodeDisplay] }
|
|
36
|
+
: {}),
|
|
37
|
+
}
|
|
38
|
+
: undefined,
|
|
13
39
|
subject: subject ? { reference: subject } : undefined,
|
|
14
40
|
effectiveDateTime: claims[ObservationClaim.EffectiveDateTime] ?? claims[ObservationClaim.Date],
|
|
15
41
|
issued: claims[ObservationClaim.EffectiveDateTime] ? undefined : claims[ObservationClaim.Date],
|
|
16
42
|
performer: claims[ObservationClaim.Performer] ? claims[ObservationClaim.Performer].split(',').map((reference) => ({ reference: reference.trim() })) : undefined,
|
|
17
|
-
valueCodeableConcept:
|
|
43
|
+
valueCodeableConcept: valueConceptToken
|
|
44
|
+
? {
|
|
45
|
+
coding: codingFromValue(valueConceptToken),
|
|
46
|
+
...(claims[ObservationClaim.ValueConceptText] || claims[ObservationClaim.ValueConceptDisplay]
|
|
47
|
+
? { text: claims[ObservationClaim.ValueConceptText] ?? claims[ObservationClaim.ValueConceptDisplay] }
|
|
48
|
+
: {}),
|
|
49
|
+
}
|
|
50
|
+
: undefined,
|
|
18
51
|
valueDateTime: claims[ObservationClaim.ValueDate],
|
|
52
|
+
valueQuantity: claims[ObservationClaim.ValueQuantityNumber]
|
|
53
|
+
? {
|
|
54
|
+
value: Number(claims[ObservationClaim.ValueQuantityNumber]),
|
|
55
|
+
...(claims[ObservationClaim.ValueQuantityComparator]
|
|
56
|
+
? { comparator: claims[ObservationClaim.ValueQuantityComparator] }
|
|
57
|
+
: {}),
|
|
58
|
+
...(claims[ObservationClaim.ValueQuantityUnit]
|
|
59
|
+
? {
|
|
60
|
+
unit: claims[ObservationClaim.ValueQuantityUnit],
|
|
61
|
+
...(valueQuantityCoding?.system ? { system: valueQuantityCoding.system } : {}),
|
|
62
|
+
...(valueQuantityCoding?.code ? { code: valueQuantityCoding.code } : {}),
|
|
63
|
+
}
|
|
64
|
+
: {}),
|
|
65
|
+
}
|
|
66
|
+
: undefined,
|
|
19
67
|
valueString: claims[ObservationClaim.ValueString],
|
|
20
68
|
note: claims[ObservationClaim.Note] ? [{ text: claims[ObservationClaim.Note] }] : undefined,
|
|
21
69
|
basedOn: claims[ObservationClaim.BasedOn] ? claims[ObservationClaim.BasedOn].split(',').map((reference) => ({ reference: reference.trim() })) : undefined,
|
|
@@ -25,16 +73,27 @@ export function observationFlatToFhirR4(claims) {
|
|
|
25
73
|
hasMember: claims[ObservationClaim.HasMember] ? claims[ObservationClaim.HasMember].split(',').map((reference) => ({ reference: reference.trim() })) : undefined,
|
|
26
74
|
method: claims[ObservationClaim.Method] ? { coding: codingFromValue(claims[ObservationClaim.Method]) } : undefined,
|
|
27
75
|
specimen: claims[ObservationClaim.Specimen] ? { reference: claims[ObservationClaim.Specimen] } : undefined,
|
|
28
|
-
component: claims[ObservationClaim.ComponentCode] ? [{ code: { coding: codingFromValue(claims[ObservationClaim.ComponentCode]) } }] : undefined,
|
|
29
76
|
};
|
|
30
77
|
}
|
|
31
|
-
|
|
78
|
+
/**
|
|
79
|
+
* Converts a FHIR R4 Observation into the flat editable claims contract.
|
|
80
|
+
*
|
|
81
|
+
* `Observation.category` stays in `Observation.category`.
|
|
82
|
+
* Coded result values belong in `Observation.value-concept-*`.
|
|
83
|
+
*/
|
|
84
|
+
export function observationToFlatFhirR4(resource) {
|
|
32
85
|
const valueCodeableConcept = resource.valueCodeableConcept;
|
|
33
|
-
const
|
|
86
|
+
const codeCoding = resource.code?.coding?.[0];
|
|
87
|
+
const valueConceptCoding = valueCodeableConcept?.coding?.[0];
|
|
88
|
+
const valueQuantity = resource.valueQuantity;
|
|
34
89
|
return {
|
|
35
90
|
[ObservationClaim.BasedOn]: referenceListToCsv(resource.basedOn),
|
|
36
91
|
[ObservationClaim.Category]: codingListToCsv(resource.category?.flatMap((item) => item.coding || [])),
|
|
37
|
-
[ObservationClaim.Code]: codingToValue(
|
|
92
|
+
[ObservationClaim.Code]: codingToValue(codeCoding),
|
|
93
|
+
[ObservationClaim.CodeSystem]: codeCoding?.system,
|
|
94
|
+
[ObservationClaim.CodeValue]: codeCoding?.code,
|
|
95
|
+
[ObservationClaim.CodeText]: resource.code?.text,
|
|
96
|
+
[ObservationClaim.CodeDisplay]: codeCoding?.display,
|
|
38
97
|
[ObservationClaim.Date]: resource.effectiveDateTime || resource.issued,
|
|
39
98
|
[ObservationClaim.Device]: referenceToValue(resource.device),
|
|
40
99
|
[ObservationClaim.Encounter]: referenceToValue(resource.encounter),
|
|
@@ -47,11 +106,23 @@ export function observationFhirR4ToFlat(resource) {
|
|
|
47
106
|
[ObservationClaim.Specimen]: referenceToValue(resource.specimen),
|
|
48
107
|
[ObservationClaim.Status]: resource.status,
|
|
49
108
|
[ObservationClaim.Subject]: referenceToValue(resource.subject),
|
|
50
|
-
[ObservationClaim.ValueConcept]: codingToValue(
|
|
109
|
+
[ObservationClaim.ValueConcept]: codingToValue(valueConceptCoding),
|
|
110
|
+
[ObservationClaim.ValueConceptSystem]: valueConceptCoding?.system,
|
|
111
|
+
[ObservationClaim.ValueConceptValue]: valueConceptCoding?.code,
|
|
112
|
+
[ObservationClaim.ValueConceptText]: valueCodeableConcept?.text,
|
|
113
|
+
[ObservationClaim.ValueConceptDisplay]: valueConceptCoding?.display,
|
|
51
114
|
[ObservationClaim.ValueDate]: resource.valueDateTime,
|
|
115
|
+
[ObservationClaim.ValueQuantityComparator]: valueQuantity?.comparator,
|
|
116
|
+
[ObservationClaim.ValueQuantityNumber]: valueQuantity?.value !== undefined ? String(valueQuantity.value) : undefined,
|
|
117
|
+
[ObservationClaim.ValueQuantityUnit]: codingToValue(valueQuantity?.system || valueQuantity?.code
|
|
118
|
+
? { system: valueQuantity?.system, code: valueQuantity?.code }
|
|
119
|
+
: undefined) || valueQuantity?.unit,
|
|
52
120
|
[ObservationClaim.ValueString]: resource.valueString,
|
|
53
|
-
[ObservationClaim.ComponentCode]: codingToValue(component?.code?.coding?.[0]),
|
|
54
121
|
[ObservationClaim.Note]: resource.note?.[0]?.text,
|
|
55
122
|
[ObservationClaim.EffectiveDateTime]: resource.effectiveDateTime,
|
|
56
123
|
};
|
|
57
124
|
}
|
|
125
|
+
/** @deprecated Prefer `observationFromFlatToFhirR4`. */
|
|
126
|
+
export const observationFlatToFhirR4 = observationFromFlatToFhirR4;
|
|
127
|
+
/** @deprecated Prefer `observationToFlatFhirR4`. */
|
|
128
|
+
export const observationFhirR4ToFlat = observationToFlatFhirR4;
|
package/dist/examples/index.d.ts
CHANGED
package/dist/examples/index.js
CHANGED
|
@@ -25,8 +25,169 @@ export declare const EXAMPLE_LICENSE_ACTIVE_RECORD: Readonly<{
|
|
|
25
25
|
readonly "org.schema.Person.hasOccupation.identifier.value": "ISCO-08|2211";
|
|
26
26
|
};
|
|
27
27
|
}>;
|
|
28
|
+
export declare const EXAMPLE_LICENSE_AVAILABLE_RECORD: Readonly<{
|
|
29
|
+
readonly id: "8a8a5e1b-0d8e-4a7c-8c39-3b8034440009";
|
|
30
|
+
readonly status: "available";
|
|
31
|
+
readonly subjectId: "urn:uuid:subject-license-available-001";
|
|
32
|
+
readonly claims: {
|
|
33
|
+
readonly "org.schema.IndividualProduct.serialNumber": "8a8a5e1b-0d8e-4a7c-8c39-3b8034440009";
|
|
34
|
+
readonly '@context': "org.schema";
|
|
35
|
+
readonly "org.schema.IndividualProduct.category": "professional";
|
|
36
|
+
readonly "org.schema.IndividualProduct.additionalType": "mobile";
|
|
37
|
+
readonly "org.schema.Person.email": "controller@acme.org";
|
|
38
|
+
readonly "org.schema.Person.hasOccupation.identifier.value": "ISCO-08|2211";
|
|
39
|
+
};
|
|
40
|
+
}>;
|
|
41
|
+
export declare const EXAMPLE_LICENSE_LIST_RESPONSE_BODY: Readonly<{
|
|
42
|
+
readonly data: readonly [{
|
|
43
|
+
readonly meta: {
|
|
44
|
+
readonly status: "active";
|
|
45
|
+
readonly subjectId: "urn:uuid:employee-controller-active-001";
|
|
46
|
+
readonly claims: {
|
|
47
|
+
readonly '@context': "org.schema";
|
|
48
|
+
readonly "org.schema.IndividualProduct.serialNumber": "8a8a5e1b-0d8e-4a7c-8c39-3b8034440001";
|
|
49
|
+
readonly "org.schema.IndividualProduct.category": "professional";
|
|
50
|
+
readonly "org.schema.IndividualProduct.additionalType": "mobile";
|
|
51
|
+
readonly "org.schema.Person.email": "controller@acme.org";
|
|
52
|
+
readonly "org.schema.Person.hasOccupation.identifier.value": "ISCO-08|2211";
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
}, {
|
|
56
|
+
readonly meta: {
|
|
57
|
+
readonly status: "available";
|
|
58
|
+
readonly subjectId: "urn:uuid:subject-license-available-001";
|
|
59
|
+
readonly claims: {
|
|
60
|
+
readonly "org.schema.IndividualProduct.serialNumber": "8a8a5e1b-0d8e-4a7c-8c39-3b8034440009";
|
|
61
|
+
readonly '@context': "org.schema";
|
|
62
|
+
readonly "org.schema.IndividualProduct.category": "professional";
|
|
63
|
+
readonly "org.schema.IndividualProduct.additionalType": "mobile";
|
|
64
|
+
readonly "org.schema.Person.email": "controller@acme.org";
|
|
65
|
+
readonly "org.schema.Person.hasOccupation.identifier.value": "ISCO-08|2211";
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
}];
|
|
69
|
+
}>;
|
|
28
70
|
export declare function buildExampleLicenseIssueClaims(): Readonly<Record<string, unknown>>;
|
|
29
71
|
export declare function buildExampleLicensePurchaseClaims(): Readonly<Record<string, unknown>>;
|
|
30
72
|
export declare const EXAMPLE_LICENSE_PURCHASE_CLAIMS: Readonly<Record<string, unknown>>;
|
|
31
73
|
export declare const EXAMPLE_LICENSE_ISSUE_CLAIMS: Readonly<Record<string, unknown>>;
|
|
32
74
|
export declare const EXAMPLE_LICENSE_PURCHASE_EXPECTED_SERIAL_NUMBER: string;
|
|
75
|
+
/**
|
|
76
|
+
* Shared high-level preview used by SDK/runtime tests when an onboarding start
|
|
77
|
+
* flow returns an `Offer`.
|
|
78
|
+
*/
|
|
79
|
+
export declare const EXAMPLE_LICENSE_OFFER_PREVIEW: Readonly<Readonly<{
|
|
80
|
+
offerId?: string;
|
|
81
|
+
amount?: string;
|
|
82
|
+
currency?: string;
|
|
83
|
+
seats?: number;
|
|
84
|
+
planName?: string;
|
|
85
|
+
sku?: string;
|
|
86
|
+
paymentMethod?: string;
|
|
87
|
+
checkoutUrl?: string;
|
|
88
|
+
}>>;
|
|
89
|
+
/**
|
|
90
|
+
* Shared high-level summary used by SDK/runtime tests when an order is
|
|
91
|
+
* confirmed and GW returns payment/activation fields.
|
|
92
|
+
*/
|
|
93
|
+
export declare const EXAMPLE_LICENSE_ORDER_SUMMARY: Readonly<Readonly<{
|
|
94
|
+
acceptedOfferId?: string;
|
|
95
|
+
paymentUrl?: string;
|
|
96
|
+
invoiceId?: string;
|
|
97
|
+
paymentMethod?: string;
|
|
98
|
+
activationCode?: string;
|
|
99
|
+
amount?: string;
|
|
100
|
+
currency?: string;
|
|
101
|
+
seats?: number;
|
|
102
|
+
}>>;
|
|
103
|
+
/**
|
|
104
|
+
* Shared operational defaults reused by runtime tests that need stored
|
|
105
|
+
* `DeviceLicense` examples instead of higher-level Offer/Order claims.
|
|
106
|
+
*/
|
|
107
|
+
export declare const EXAMPLE_LICENSE_RUNTIME_DEFAULTS: Readonly<{
|
|
108
|
+
readonly plan: "default";
|
|
109
|
+
readonly renewalCycle: "12m";
|
|
110
|
+
readonly reactivationEnabled: true;
|
|
111
|
+
}>;
|
|
112
|
+
export declare const EXAMPLE_LICENSE_OFFER_RESPONSE_BODY: Readonly<{
|
|
113
|
+
readonly data: readonly [{
|
|
114
|
+
readonly meta: {
|
|
115
|
+
readonly claims: {
|
|
116
|
+
readonly "org.schema.Offer.identifier": "urn:offer:family-003";
|
|
117
|
+
readonly "org.schema.Offer.price": "9.99";
|
|
118
|
+
readonly "org.schema.Offer.priceCurrency": "EUR";
|
|
119
|
+
readonly "org.schema.Offer.eligibleQuantity.value": 2;
|
|
120
|
+
readonly "org.schema.Offer.itemOffered.name": "Family starter";
|
|
121
|
+
readonly "org.schema.Offer.itemOffered.sku": "FAM-START";
|
|
122
|
+
readonly "org.schema.Offer.acceptedPaymentMethod": "invoice";
|
|
123
|
+
readonly "org.schema.Offer.checkoutPageURLTemplate": "https://pay.example/offer-001";
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
}];
|
|
127
|
+
}>;
|
|
128
|
+
export declare const EXAMPLE_LICENSE_ORDER_RESPONSE_BODY: Readonly<{
|
|
129
|
+
readonly body: {
|
|
130
|
+
readonly data: readonly [{
|
|
131
|
+
readonly resource: {
|
|
132
|
+
readonly meta: {
|
|
133
|
+
readonly claims: {
|
|
134
|
+
readonly "org.schema.Order.acceptedOffer.identifier": "urn:offer:family-003";
|
|
135
|
+
readonly "org.schema.Order.paymentUrl": "https://pay.example/invoice-001";
|
|
136
|
+
readonly "org.schema.Order.partOfInvoice": "invoice-001";
|
|
137
|
+
readonly "org.schema.Order.paymentMethod": "invoice";
|
|
138
|
+
readonly "org.schema.Offer.price": "9.99";
|
|
139
|
+
readonly "org.schema.Offer.priceCurrency": "EUR";
|
|
140
|
+
readonly "org.schema.Offer.eligibleQuantity.value": string;
|
|
141
|
+
readonly "org.schema.IndividualProduct.serialNumber": "ACT-001";
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
}];
|
|
146
|
+
};
|
|
147
|
+
}>;
|
|
148
|
+
export declare const EXAMPLE_LICENSE_OFFER_LIST_RESPONSE_BODY: Readonly<{
|
|
149
|
+
readonly data: readonly [{
|
|
150
|
+
readonly resource: {
|
|
151
|
+
readonly total: 1;
|
|
152
|
+
readonly data: readonly [{
|
|
153
|
+
readonly id: "urn:offer:family-003";
|
|
154
|
+
readonly meta: {
|
|
155
|
+
readonly status: "active";
|
|
156
|
+
readonly claims: {
|
|
157
|
+
readonly "org.schema.Offer.identifier": "urn:offer:family-003";
|
|
158
|
+
readonly "org.schema.Offer.price": "9.99";
|
|
159
|
+
readonly "org.schema.Offer.priceCurrency": "EUR";
|
|
160
|
+
readonly "org.schema.Offer.eligibleQuantity.value": 2;
|
|
161
|
+
readonly "org.schema.Offer.itemOffered.name": "Family starter";
|
|
162
|
+
readonly "org.schema.Offer.itemOffered.sku": "FAM-START";
|
|
163
|
+
readonly "org.schema.Offer.acceptedPaymentMethod": "invoice";
|
|
164
|
+
readonly "org.schema.Offer.checkoutPageURLTemplate": "https://pay.example/offer-001";
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
}];
|
|
168
|
+
};
|
|
169
|
+
}];
|
|
170
|
+
}>;
|
|
171
|
+
export declare const EXAMPLE_LICENSE_ORDER_LIST_RESPONSE_BODY: Readonly<{
|
|
172
|
+
readonly data: readonly [{
|
|
173
|
+
readonly resource: {
|
|
174
|
+
readonly total: 1;
|
|
175
|
+
readonly data: readonly [{
|
|
176
|
+
readonly id: "urn:offer:family-003";
|
|
177
|
+
readonly meta: {
|
|
178
|
+
readonly status: "active";
|
|
179
|
+
readonly claims: {
|
|
180
|
+
readonly "org.schema.Order.acceptedOffer.identifier": "urn:offer:family-003";
|
|
181
|
+
readonly "org.schema.Order.paymentUrl": "https://pay.example/invoice-001";
|
|
182
|
+
readonly "org.schema.Order.partOfInvoice": "invoice-001";
|
|
183
|
+
readonly "org.schema.Order.paymentMethod": "invoice";
|
|
184
|
+
readonly "org.schema.Offer.price": "9.99";
|
|
185
|
+
readonly "org.schema.Offer.priceCurrency": "EUR";
|
|
186
|
+
readonly "org.schema.Offer.eligibleQuantity.value": string;
|
|
187
|
+
readonly "org.schema.IndividualProduct.serialNumber": "ACT-001";
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
}];
|
|
191
|
+
};
|
|
192
|
+
}];
|
|
193
|
+
}>;
|
package/dist/examples/license.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { DeviceAppTypes, DeviceUserClasses } from '../constants/device.js';
|
|
2
|
-
import { ClaimsIndividualProductSchemaorg, ClaimsOfferSchemaorg, ClaimsPersonSchemaorg, } from '../constants/schemaorg.js';
|
|
3
|
-
import { buildLicenseIssueClaims, buildLicensePurchaseClaims, LicenseCategories, LicenseStatuses, } from '../utils/license.js';
|
|
4
|
-
import {
|
|
2
|
+
import { ClaimsOrderSchemaorg, ClaimsIndividualProductSchemaorg, ClaimsOfferSchemaorg, ClaimsPersonSchemaorg, } from '../constants/schemaorg.js';
|
|
3
|
+
import { buildLicenseIssueClaims, buildLicensePurchaseClaims, LicenseClaimContext, LicenseCategories, LicenseStatuses, } from '../utils/license.js';
|
|
4
|
+
import { createLicenseOfferOrderEditor } from '../utils/license-offer-order.js';
|
|
5
|
+
import { EXAMPLE_LICENSE_ACCEPTED_OFFER_ID, EXAMPLE_LICENSE_AMOUNT, EXAMPLE_LICENSE_CHECKOUT_URL, EXAMPLE_LICENSE_CURRENCY, EXAMPLE_EMAIL_CONTROLLER_ORG, EXAMPLE_EMPLOYEE_ACTIVATION_CODE, EXAMPLE_HEALTHCARE_ACTOR_ROLE_GENERALIST_MEDICAL_PRACTITIONER, EXAMPLE_LICENSE_INVOICE_ID, EXAMPLE_LICENSE_OFFER_ID, EXAMPLE_LICENSE_PLAN_DEFAULT, EXAMPLE_LICENSE_PAYMENT_METHOD_INVOICE, EXAMPLE_LICENSE_PAYMENT_URL, EXAMPLE_LICENSE_RENEWAL_CYCLE_YEARLY, EXAMPLE_LICENSE_PLAN_NAME, EXAMPLE_LICENSE_SEAT_UUID_ACTIVE, EXAMPLE_LICENSE_SEAT_UUID_AVAILABLE, EXAMPLE_LICENSE_SEAT_UUID_SECONDARY, EXAMPLE_LICENSE_SKU, EXAMPLE_LICENSE_SUBJECT_ID_ACTIVE, EXAMPLE_LICENSE_SUBJECT_ID_AVAILABLE, } from './shared.js';
|
|
5
6
|
export const EXAMPLE_LICENSE_SEAT_UUIDS = Object.freeze([
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
EXAMPLE_LICENSE_SEAT_UUID_ACTIVE,
|
|
8
|
+
EXAMPLE_LICENSE_SEAT_UUID_SECONDARY,
|
|
8
9
|
]);
|
|
9
10
|
export const EXAMPLE_LICENSE_ISSUE_INPUT = Object.freeze({
|
|
10
11
|
email: EXAMPLE_EMAIL_CONTROLLER_ORG,
|
|
@@ -22,9 +23,9 @@ export const EXAMPLE_LICENSE_ACTIVE_RECORD = Object.freeze({
|
|
|
22
23
|
id: EXAMPLE_LICENSE_SEAT_UUIDS[0],
|
|
23
24
|
status: LicenseStatuses.Active,
|
|
24
25
|
activationCode: EXAMPLE_EMPLOYEE_ACTIVATION_CODE,
|
|
25
|
-
subjectId:
|
|
26
|
+
subjectId: EXAMPLE_LICENSE_SUBJECT_ID_ACTIVE,
|
|
26
27
|
claims: {
|
|
27
|
-
'@context':
|
|
28
|
+
'@context': LicenseClaimContext.SchemaOrg,
|
|
28
29
|
[ClaimsIndividualProductSchemaorg.serialNumber]: EXAMPLE_LICENSE_SEAT_UUIDS[0],
|
|
29
30
|
[ClaimsIndividualProductSchemaorg.category]: LicenseCategories.Professional,
|
|
30
31
|
[ClaimsIndividualProductSchemaorg.additionalType]: DeviceAppTypes.Mobile,
|
|
@@ -32,6 +33,33 @@ export const EXAMPLE_LICENSE_ACTIVE_RECORD = Object.freeze({
|
|
|
32
33
|
[ClaimsPersonSchemaorg.hasOccupationalRoleValue]: EXAMPLE_HEALTHCARE_ACTOR_ROLE_GENERALIST_MEDICAL_PRACTITIONER,
|
|
33
34
|
},
|
|
34
35
|
});
|
|
36
|
+
export const EXAMPLE_LICENSE_AVAILABLE_RECORD = Object.freeze({
|
|
37
|
+
id: EXAMPLE_LICENSE_SEAT_UUID_AVAILABLE,
|
|
38
|
+
status: LicenseStatuses.Available,
|
|
39
|
+
subjectId: EXAMPLE_LICENSE_SUBJECT_ID_AVAILABLE,
|
|
40
|
+
claims: {
|
|
41
|
+
...EXAMPLE_LICENSE_ACTIVE_RECORD.claims,
|
|
42
|
+
[ClaimsIndividualProductSchemaorg.serialNumber]: EXAMPLE_LICENSE_SEAT_UUID_AVAILABLE,
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
export const EXAMPLE_LICENSE_LIST_RESPONSE_BODY = Object.freeze({
|
|
46
|
+
data: [
|
|
47
|
+
{
|
|
48
|
+
meta: {
|
|
49
|
+
status: EXAMPLE_LICENSE_ACTIVE_RECORD.status,
|
|
50
|
+
subjectId: EXAMPLE_LICENSE_ACTIVE_RECORD.subjectId,
|
|
51
|
+
claims: EXAMPLE_LICENSE_ACTIVE_RECORD.claims,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
meta: {
|
|
56
|
+
status: EXAMPLE_LICENSE_AVAILABLE_RECORD.status,
|
|
57
|
+
subjectId: EXAMPLE_LICENSE_AVAILABLE_RECORD.subjectId,
|
|
58
|
+
claims: EXAMPLE_LICENSE_AVAILABLE_RECORD.claims,
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
});
|
|
35
63
|
export function buildExampleLicenseIssueClaims() {
|
|
36
64
|
return Object.freeze(buildLicenseIssueClaims(EXAMPLE_LICENSE_ISSUE_INPUT));
|
|
37
65
|
}
|
|
@@ -41,3 +69,104 @@ export function buildExampleLicensePurchaseClaims() {
|
|
|
41
69
|
export const EXAMPLE_LICENSE_PURCHASE_CLAIMS = buildExampleLicensePurchaseClaims();
|
|
42
70
|
export const EXAMPLE_LICENSE_ISSUE_CLAIMS = buildExampleLicenseIssueClaims();
|
|
43
71
|
export const EXAMPLE_LICENSE_PURCHASE_EXPECTED_SERIAL_NUMBER = EXAMPLE_LICENSE_PURCHASE_CLAIMS[ClaimsOfferSchemaorg.serialNumber];
|
|
72
|
+
/**
|
|
73
|
+
* Shared high-level preview used by SDK/runtime tests when an onboarding start
|
|
74
|
+
* flow returns an `Offer`.
|
|
75
|
+
*/
|
|
76
|
+
export const EXAMPLE_LICENSE_OFFER_PREVIEW = Object.freeze(createLicenseOfferOrderEditor()
|
|
77
|
+
.setOfferId(EXAMPLE_LICENSE_OFFER_ID)
|
|
78
|
+
.setAmount(EXAMPLE_LICENSE_AMOUNT)
|
|
79
|
+
.setCurrency(EXAMPLE_LICENSE_CURRENCY)
|
|
80
|
+
.setSeats(EXAMPLE_LICENSE_SEAT_UUIDS.length)
|
|
81
|
+
.setPlanName(EXAMPLE_LICENSE_PLAN_NAME)
|
|
82
|
+
.setSku(EXAMPLE_LICENSE_SKU)
|
|
83
|
+
.setPaymentMethod(EXAMPLE_LICENSE_PAYMENT_METHOD_INVOICE)
|
|
84
|
+
.setCheckoutUrl(EXAMPLE_LICENSE_CHECKOUT_URL)
|
|
85
|
+
.getOfferPreview());
|
|
86
|
+
/**
|
|
87
|
+
* Shared high-level summary used by SDK/runtime tests when an order is
|
|
88
|
+
* confirmed and GW returns payment/activation fields.
|
|
89
|
+
*/
|
|
90
|
+
export const EXAMPLE_LICENSE_ORDER_SUMMARY = Object.freeze(createLicenseOfferOrderEditor()
|
|
91
|
+
.setAcceptedOfferId(EXAMPLE_LICENSE_ACCEPTED_OFFER_ID)
|
|
92
|
+
.setAmount(EXAMPLE_LICENSE_AMOUNT)
|
|
93
|
+
.setCurrency(EXAMPLE_LICENSE_CURRENCY)
|
|
94
|
+
.setSeats(EXAMPLE_LICENSE_SEAT_UUIDS.length + 1)
|
|
95
|
+
.setPaymentMethod(EXAMPLE_LICENSE_PAYMENT_METHOD_INVOICE)
|
|
96
|
+
.setPaymentUrl(EXAMPLE_LICENSE_PAYMENT_URL)
|
|
97
|
+
.setInvoiceId(EXAMPLE_LICENSE_INVOICE_ID)
|
|
98
|
+
.setActivationCode(EXAMPLE_EMPLOYEE_ACTIVATION_CODE)
|
|
99
|
+
.getOrderSummary());
|
|
100
|
+
/**
|
|
101
|
+
* Shared operational defaults reused by runtime tests that need stored
|
|
102
|
+
* `DeviceLicense` examples instead of higher-level Offer/Order claims.
|
|
103
|
+
*/
|
|
104
|
+
export const EXAMPLE_LICENSE_RUNTIME_DEFAULTS = Object.freeze({
|
|
105
|
+
plan: EXAMPLE_LICENSE_PLAN_DEFAULT,
|
|
106
|
+
renewalCycle: EXAMPLE_LICENSE_RENEWAL_CYCLE_YEARLY,
|
|
107
|
+
reactivationEnabled: true,
|
|
108
|
+
});
|
|
109
|
+
export const EXAMPLE_LICENSE_OFFER_RESPONSE_BODY = Object.freeze({
|
|
110
|
+
data: [{
|
|
111
|
+
meta: {
|
|
112
|
+
claims: {
|
|
113
|
+
[ClaimsOfferSchemaorg.identifier]: EXAMPLE_LICENSE_OFFER_ID,
|
|
114
|
+
[ClaimsOfferSchemaorg.price]: EXAMPLE_LICENSE_AMOUNT,
|
|
115
|
+
[ClaimsOfferSchemaorg.priceCurrency]: EXAMPLE_LICENSE_CURRENCY,
|
|
116
|
+
[ClaimsOfferSchemaorg.eligibleQuantityValue]: EXAMPLE_LICENSE_SEAT_UUIDS.length,
|
|
117
|
+
[ClaimsOfferSchemaorg.itemOfferedName]: EXAMPLE_LICENSE_PLAN_NAME,
|
|
118
|
+
[ClaimsOfferSchemaorg.itemOfferedSku]: EXAMPLE_LICENSE_SKU,
|
|
119
|
+
[ClaimsOfferSchemaorg.acceptedPaymentMethod]: EXAMPLE_LICENSE_PAYMENT_METHOD_INVOICE,
|
|
120
|
+
[ClaimsOfferSchemaorg.checkoutPageURLTemplate]: EXAMPLE_LICENSE_CHECKOUT_URL,
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
}],
|
|
124
|
+
});
|
|
125
|
+
export const EXAMPLE_LICENSE_ORDER_RESPONSE_BODY = Object.freeze({
|
|
126
|
+
body: {
|
|
127
|
+
data: [{
|
|
128
|
+
resource: {
|
|
129
|
+
meta: {
|
|
130
|
+
claims: {
|
|
131
|
+
[ClaimsOrderSchemaorg.acceptedOfferIdentifier]: EXAMPLE_LICENSE_ACCEPTED_OFFER_ID,
|
|
132
|
+
[ClaimsOrderSchemaorg.paymentUrl]: EXAMPLE_LICENSE_PAYMENT_URL,
|
|
133
|
+
[ClaimsOrderSchemaorg.partOfInvoice]: EXAMPLE_LICENSE_INVOICE_ID,
|
|
134
|
+
[ClaimsOrderSchemaorg.paymentMethod]: EXAMPLE_LICENSE_PAYMENT_METHOD_INVOICE,
|
|
135
|
+
[ClaimsOfferSchemaorg.price]: EXAMPLE_LICENSE_AMOUNT,
|
|
136
|
+
[ClaimsOfferSchemaorg.priceCurrency]: EXAMPLE_LICENSE_CURRENCY,
|
|
137
|
+
[ClaimsOfferSchemaorg.eligibleQuantityValue]: String(EXAMPLE_LICENSE_SEAT_UUIDS.length + 1),
|
|
138
|
+
[ClaimsIndividualProductSchemaorg.serialNumber]: EXAMPLE_EMPLOYEE_ACTIVATION_CODE,
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
}],
|
|
143
|
+
},
|
|
144
|
+
});
|
|
145
|
+
export const EXAMPLE_LICENSE_OFFER_LIST_RESPONSE_BODY = Object.freeze({
|
|
146
|
+
data: [{
|
|
147
|
+
resource: {
|
|
148
|
+
total: 1,
|
|
149
|
+
data: [{
|
|
150
|
+
id: EXAMPLE_LICENSE_OFFER_ID,
|
|
151
|
+
meta: {
|
|
152
|
+
status: 'active',
|
|
153
|
+
claims: EXAMPLE_LICENSE_OFFER_RESPONSE_BODY.data[0].meta.claims,
|
|
154
|
+
},
|
|
155
|
+
}],
|
|
156
|
+
},
|
|
157
|
+
}],
|
|
158
|
+
});
|
|
159
|
+
export const EXAMPLE_LICENSE_ORDER_LIST_RESPONSE_BODY = Object.freeze({
|
|
160
|
+
data: [{
|
|
161
|
+
resource: {
|
|
162
|
+
total: 1,
|
|
163
|
+
data: [{
|
|
164
|
+
id: EXAMPLE_LICENSE_ACCEPTED_OFFER_ID,
|
|
165
|
+
meta: {
|
|
166
|
+
status: 'active',
|
|
167
|
+
claims: EXAMPLE_LICENSE_ORDER_RESPONSE_BODY.body.data[0].resource.meta.claims,
|
|
168
|
+
},
|
|
169
|
+
}],
|
|
170
|
+
},
|
|
171
|
+
}],
|
|
172
|
+
});
|
|
@@ -10,6 +10,8 @@ export declare const EXAMPLE_LIFECYCLE_OPERATIONS: {
|
|
|
10
10
|
readonly disable: "disable";
|
|
11
11
|
readonly delete: "delete";
|
|
12
12
|
};
|
|
13
|
+
export declare const EXAMPLE_INDIVIDUAL_ORGANIZATION_DISABLE_REQUEST_TYPE: "Family-disable-request-v1.0";
|
|
14
|
+
export declare const EXAMPLE_INDIVIDUAL_ORGANIZATION_PURGE_REQUEST_TYPE: "Family-purge-request-v1.0";
|
|
13
15
|
/**
|
|
14
16
|
* Shared placeholder values used by copy/paste examples.
|
|
15
17
|
*
|
|
@@ -179,6 +181,27 @@ export declare const EXAMPLE_INDIVIDUAL_DISABLE_MESSAGE: {
|
|
|
179
181
|
readonly erasesPersonalDataImmediately: false;
|
|
180
182
|
};
|
|
181
183
|
};
|
|
184
|
+
export declare const EXAMPLE_INDIVIDUAL_ORGANIZATION_DISABLE_ENTRY: Readonly<{
|
|
185
|
+
type: string;
|
|
186
|
+
request: {
|
|
187
|
+
method: "POST";
|
|
188
|
+
};
|
|
189
|
+
meta: {
|
|
190
|
+
claims: import("..").IndividualOrganizationLifecycleClaims;
|
|
191
|
+
};
|
|
192
|
+
resource: {
|
|
193
|
+
id?: string;
|
|
194
|
+
meta: {
|
|
195
|
+
claims: import("..").IndividualOrganizationLifecycleClaims;
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
}>;
|
|
199
|
+
export declare const EXAMPLE_INDIVIDUAL_ORGANIZATION_DISABLE_PAYLOAD: Readonly<{
|
|
200
|
+
thid: string;
|
|
201
|
+
body: {
|
|
202
|
+
data: import("..").IndividualOrganizationLifecycleDataEntry[];
|
|
203
|
+
};
|
|
204
|
+
}>;
|
|
182
205
|
export declare const EXAMPLE_INDIVIDUAL_DELETE_MESSAGE: {
|
|
183
206
|
readonly operation: "delete";
|
|
184
207
|
readonly resourceType: "IndividualOrganization";
|
|
@@ -199,6 +222,27 @@ export declare const EXAMPLE_INDIVIDUAL_DELETE_MESSAGE: {
|
|
|
199
222
|
readonly keepsMinimumAuditTrailRequiredByLaw: true;
|
|
200
223
|
};
|
|
201
224
|
};
|
|
225
|
+
export declare const EXAMPLE_INDIVIDUAL_ORGANIZATION_PURGE_ENTRY: Readonly<{
|
|
226
|
+
type: string;
|
|
227
|
+
request: {
|
|
228
|
+
method: "POST";
|
|
229
|
+
};
|
|
230
|
+
meta: {
|
|
231
|
+
claims: import("..").IndividualOrganizationLifecycleClaims;
|
|
232
|
+
};
|
|
233
|
+
resource: {
|
|
234
|
+
id?: string;
|
|
235
|
+
meta: {
|
|
236
|
+
claims: import("..").IndividualOrganizationLifecycleClaims;
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
}>;
|
|
240
|
+
export declare const EXAMPLE_INDIVIDUAL_ORGANIZATION_PURGE_PAYLOAD: Readonly<{
|
|
241
|
+
thid: string;
|
|
242
|
+
body: {
|
|
243
|
+
data: import("..").IndividualOrganizationLifecycleDataEntry[];
|
|
244
|
+
};
|
|
245
|
+
}>;
|
|
202
246
|
export declare const EXAMPLE_CONSENT_ENABLE_MESSAGE: {
|
|
203
247
|
readonly operation: "enable";
|
|
204
248
|
readonly resourceType: "Consent";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
2
|
import { ClaimsOrganizationSchemaorg, ClaimsPersonSchemaorg, } from '../constants/schemaorg.js';
|
|
3
3
|
import { ClaimConsent } from '../models/consent-rule.js';
|
|
4
|
+
import { IndividualOrganizationLifecycleDraft, IndividualOrganizationLifecycleOperations, } from '../utils/individual-organization-lifecycle.js';
|
|
4
5
|
import { EXAMPLE_EMAIL_CONTROLLER_INDIVIDUAL, EXAMPLE_EMAIL_CONTROLLER_ORG, EXAMPLE_CLINICAL_SECTION_ALLERGIES, EXAMPLE_CONSENT_PURPOSE_TREATMENT, EXAMPLE_HEALTHCARE_ACTOR_ROLE_PHYSICIAN, EXAMPLE_JURISDICTION, EXAMPLE_SECTOR, EXAMPLE_TENANT_IDENTIFIER, } from './shared.js';
|
|
5
6
|
/**
|
|
6
7
|
* Canonical lifecycle naming for `v1`.
|
|
@@ -14,6 +15,8 @@ export const EXAMPLE_LIFECYCLE_OPERATIONS = {
|
|
|
14
15
|
disable: 'disable',
|
|
15
16
|
delete: 'delete',
|
|
16
17
|
};
|
|
18
|
+
export const EXAMPLE_INDIVIDUAL_ORGANIZATION_DISABLE_REQUEST_TYPE = 'Family-disable-request-v1.0';
|
|
19
|
+
export const EXAMPLE_INDIVIDUAL_ORGANIZATION_PURGE_REQUEST_TYPE = 'Family-purge-request-v1.0';
|
|
17
20
|
/**
|
|
18
21
|
* Shared placeholder values used by copy/paste examples.
|
|
19
22
|
*
|
|
@@ -183,6 +186,17 @@ export const EXAMPLE_INDIVIDUAL_DISABLE_MESSAGE = {
|
|
|
183
186
|
erasesPersonalDataImmediately: false,
|
|
184
187
|
},
|
|
185
188
|
};
|
|
189
|
+
export const EXAMPLE_INDIVIDUAL_ORGANIZATION_DISABLE_ENTRY = new IndividualOrganizationLifecycleDraft()
|
|
190
|
+
.setClaims(EXAMPLE_INDIVIDUAL_DISABLE_MESSAGE.claims)
|
|
191
|
+
.setOperation(IndividualOrganizationLifecycleOperations.Disable)
|
|
192
|
+
.setRequestType(EXAMPLE_INDIVIDUAL_ORGANIZATION_DISABLE_REQUEST_TYPE)
|
|
193
|
+
.buildCurrentGwDataEntry();
|
|
194
|
+
export const EXAMPLE_INDIVIDUAL_ORGANIZATION_DISABLE_PAYLOAD = new IndividualOrganizationLifecycleDraft()
|
|
195
|
+
.setClaims(EXAMPLE_INDIVIDUAL_DISABLE_MESSAGE.claims)
|
|
196
|
+
.setOperation(IndividualOrganizationLifecycleOperations.Disable)
|
|
197
|
+
.setRequestType(EXAMPLE_INDIVIDUAL_ORGANIZATION_DISABLE_REQUEST_TYPE)
|
|
198
|
+
.setThreadId('individual-organization-disable-example-001')
|
|
199
|
+
.buildCurrentGwPayload();
|
|
186
200
|
export const EXAMPLE_INDIVIDUAL_DELETE_MESSAGE = {
|
|
187
201
|
operation: EXAMPLE_LIFECYCLE_OPERATIONS.delete,
|
|
188
202
|
resourceType: 'IndividualOrganization',
|
|
@@ -203,6 +217,17 @@ export const EXAMPLE_INDIVIDUAL_DELETE_MESSAGE = {
|
|
|
203
217
|
keepsMinimumAuditTrailRequiredByLaw: true,
|
|
204
218
|
},
|
|
205
219
|
};
|
|
220
|
+
export const EXAMPLE_INDIVIDUAL_ORGANIZATION_PURGE_ENTRY = new IndividualOrganizationLifecycleDraft()
|
|
221
|
+
.setClaims(EXAMPLE_INDIVIDUAL_DISABLE_MESSAGE.claims)
|
|
222
|
+
.setOperation(IndividualOrganizationLifecycleOperations.Purge)
|
|
223
|
+
.setRequestType(EXAMPLE_INDIVIDUAL_ORGANIZATION_PURGE_REQUEST_TYPE)
|
|
224
|
+
.buildCurrentGwDataEntry();
|
|
225
|
+
export const EXAMPLE_INDIVIDUAL_ORGANIZATION_PURGE_PAYLOAD = new IndividualOrganizationLifecycleDraft()
|
|
226
|
+
.setClaims(EXAMPLE_INDIVIDUAL_DISABLE_MESSAGE.claims)
|
|
227
|
+
.setOperation(IndividualOrganizationLifecycleOperations.Purge)
|
|
228
|
+
.setRequestType(EXAMPLE_INDIVIDUAL_ORGANIZATION_PURGE_REQUEST_TYPE)
|
|
229
|
+
.setThreadId('individual-organization-purge-example-001')
|
|
230
|
+
.buildCurrentGwPayload();
|
|
206
231
|
export const EXAMPLE_CONSENT_ENABLE_MESSAGE = {
|
|
207
232
|
operation: EXAMPLE_LIFECYCLE_OPERATIONS.enable,
|
|
208
233
|
resourceType: 'Consent',
|