Skip to content

Commit 1940a2e

Browse files
Undo changes to type of ConsentOptions.confirmed and CoreTrackingConsentDetails.confirmed (#171)
1 parent aabfa44 commit 1940a2e

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"author": "Transcend Inc.",
33
"name": "@transcend-io/airgap.js-types",
44
"description": "TypeScript types for airgap.js interoperability with custom consent UIs",
5-
"version": "12.13.0",
5+
"version": "12.13.1",
66
"homepage": "https://github.com/transcend-io/airgap.js-types",
77
"repository": {
88
"type": "git",

src/core.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,8 @@ export type Metadata = Record<string, unknown>;
143143

144144
/** setConsent() options */
145145
export interface ConsentOptions {
146-
/**
147-
* - `true` if consent has been confirmed by the user and has not expired
148-
* - `0` if consent has been confirmed by the user and has expired
149-
* - `false` if consent has not been confirmed by the user
150-
*/
151-
confirmed?: boolean | 0;
146+
/** Was consent confirmed by the user? */
147+
confirmed?: boolean;
152148
/**
153149
* Was the UI shown to the user?
154150
* @deprecated It was discovered that this value was not being set reliably in some versions, and was not being used.
@@ -608,11 +604,10 @@ const ReservedMetadata = t.partial({
608604
export const CoreTrackingConsentDetails = t.intersection([
609605
t.type({
610606
/**
611-
* - `true` if consent has been confirmed by the user and has not expired
612-
* - `0` if consent has been confirmed by the user and has expired
613-
* - `false` if consent has not been confirmed by the user
607+
* Was tracking consent confirmed by the user?
608+
* If this is false, the consent was resolved from defaults & is not yet confirmed
614609
*/
615-
confirmed: t.union([t.boolean, t.literal(0)]),
610+
confirmed: t.boolean,
616611
/** Consent resolution/last-modified timestamp (ISO 8601) */
617612
timestamp: t.string,
618613
}),

0 commit comments

Comments
 (0)