Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/brave-moose-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@forgerock/ping-protect': patch
---

fixes the type of the options param in `PIProtect.start` so it better aligns with output from `PingOneProtectInitializeCallback.getConfig()` as defined in `javascript-sdk` (importantly it no longer expects `_type` and `_action` fields)
4 changes: 2 additions & 2 deletions packages/ping-protect/src/lib/ping-protect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export type InitParams = Omit<ProtectInitializeConfig, '_type' | '_action'>;
declare global {
interface Window {
_pingOneSignals: {
init: (initParams?: ProtectInitializeConfig) => Promise<void>;
init: (initParams?: InitParams) => Promise<void>;
getData: () => Promise<string>;
pauseBehavioralData: () => void;
resumeBehavioralData: () => void;
Expand Down Expand Up @@ -56,7 +56,7 @@ export abstract class PIProtect {
* @param {InitParams} options - The init parameters
* @returns {Promise<void>} - Returns a promise
*/
public static async start(options: ProtectInitializeConfig): Promise<void> {
public static async start(options: InitParams): Promise<void> {
try {
/*
* Load the Ping Signals SDK
Expand Down