gdc-common-utils-ts 2.9.3 → 2.9.4

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.
@@ -149,7 +149,8 @@ export declare function resolveSubjectIdentifier(input: SubjectIdentifierInput,
149
149
  errorPrefix?: string;
150
150
  }): string;
151
151
  /**
152
- * Builds a minimal consent claims object from simple business inputs.
152
+ * Builds an active consent-approval claims object from simple business
153
+ * inputs. Draft permission requests use the separate draft Bundle builder.
153
154
  *
154
155
  * @param input Consent actor/subject/business data.
155
156
  * @param options.errorPrefix Optional error prefix.
@@ -157,7 +158,9 @@ export declare function resolveSubjectIdentifier(input: SubjectIdentifierInput,
157
158
  */
158
159
  export declare function buildConsentClaimsSimple(input: BuildConsentClaimsSimpleInput, options?: BuildConsentClaimsSimpleOptions): ConsentClaimsSimpleResult;
159
160
  /**
160
- * Builds minimal consent claims and assigns a deterministic CID into the claims id.
161
+ * Builds active consent-approval claims and assigns a deterministic CID into
162
+ * the claims id. Permission requests use the separate draft Bundle builder;
163
+ * callers must not use this helper to represent an unapproved request.
161
164
  *
162
165
  * @param input Consent actor/subject/business data.
163
166
  * @param options.errorPrefix Optional error prefix.
@@ -163,7 +163,8 @@ export function resolveSubjectIdentifier(input, options = {}) {
163
163
  throw new Error(withPrefix(options.errorPrefix, 'grantProfessionalAccessSimple requires subjectDid or (subjectPhone + subjectGivenName).'));
164
164
  }
165
165
  /**
166
- * Builds a minimal consent claims object from simple business inputs.
166
+ * Builds an active consent-approval claims object from simple business
167
+ * inputs. Draft permission requests use the separate draft Bundle builder.
167
168
  *
168
169
  * @param input Consent actor/subject/business data.
169
170
  * @param options.errorPrefix Optional error prefix.
@@ -186,6 +187,7 @@ export function buildConsentClaimsSimple(input, options = {}) {
186
187
  subjectIdentifier,
187
188
  consentClaims: {
188
189
  '@context': 'org.hl7.fhir.api',
190
+ [ClaimConsent.status]: ConsentStatuses.Active,
189
191
  [ClaimConsent.decision]: input.decision || 'permit',
190
192
  [ClaimConsent.subject]: subjectIdentifier,
191
193
  [ClaimConsent.identifier]: consentIdentifier,
@@ -207,7 +209,9 @@ export function buildConsentClaimsSimple(input, options = {}) {
207
209
  };
208
210
  }
209
211
  /**
210
- * Builds minimal consent claims and assigns a deterministic CID into the claims id.
212
+ * Builds active consent-approval claims and assigns a deterministic CID into
213
+ * the claims id. Permission requests use the separate draft Bundle builder;
214
+ * callers must not use this helper to represent an unapproved request.
211
215
  *
212
216
  * @param input Consent actor/subject/business data.
213
217
  * @param options.errorPrefix Optional error prefix.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gdc-common-utils-ts",
3
- "version": "2.9.3",
3
+ "version": "2.9.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },