Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfarrell76 committed Jan 4, 2024
2 parents cba2294 + 2111349 commit 1bd2af2
Show file tree
Hide file tree
Showing 6 changed files with 471 additions and 433 deletions.
856 changes: 428 additions & 428 deletions .pnp.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "Transcend Inc.",
"name": "@transcend-io/airgap.js-types",
"description": "TypeScript types for airgap.js interoperability with custom consent UIs",
"version": "10.11.0",
"version": "10.12.0",
"homepage": "https://github.com/transcend-io/airgap.js-types",
"repository": {
"type": "git",
Expand Down
6 changes: 3 additions & 3 deletions src/enums/consentExpiry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import { makeEnum } from '@transcend-io/type-utils';
*/
export const OnConsentExpiry = makeEnum({
/** Reprompts the user to change or confirm their selection */
Prompt: 'prompt',
Prompt: 'Prompt',
/** Resets the user's consent and reprompts them */
Reset: 'reset',
ResetAll: 'ResetAll',
/** Resets the user's opted-in purposes and reprompts them */
ResetOptIns: 'reset-opt-ins',
ResetOptIns: 'ResetOptIns',
});
/** Override type */
export type OnConsentExpiry =
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ export * from './ui';
export * from './enums';
export * from './constants';
export * from './experience';
export * from './mobile';
37 changes: 37 additions & 0 deletions src/mobile.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import * as t from 'io-ts';

export const ConsentSDK = t.type({
/** Unique identifier for the SDK */
id: t.string,
/** airgap purposes applicable to this SDK */
purposes: t.array(t.string),
});

/**
* Type override
*/
export type ConsentSDK = t.TypeOf<typeof ConsentSDK>;

export const ConsentService = t.intersection([
t.type({
name: t.string,
}),
t.partial({
sdks: t.array(ConsentSDK),
tcfId: t.number,
}),
]);

/**
* Type override
*/
export type ConsentService = t.TypeOf<typeof ConsentService>;

export const MobileConfig = t.type({
services: t.array(ConsentService),
});

/**
* Type override
*/
export type MobileConfig = t.TypeOf<typeof MobileConfig>;
2 changes: 1 addition & 1 deletion src/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export type ConsentManagerAPI = Readonly<{
options?: ShowConsentManagerOptions,
): Promise<void>;
/** Sets local tcf string (does not sync to xdi or preference store) */
setTCFConsent?: (tcString: string) => Promise<void>;
setTCFConsent?: (auth: AirgapAuth, tcString: string) => Promise<void>;
}> &
EventTarget;

Expand Down

0 comments on commit 1bd2af2

Please sign in to comment.