@@ -12,7 +12,7 @@ import { NativeEventEmitter } from 'react-native';
1212import { IdentityOptions } from './public/IdentityOptions' ;
1313import { EventEmitter } from 'events' ;
1414import { ConfigurationStatus } from './public/ConfigurationStatus' ;
15- import { ConfirmedAssignment } from './public/ConfirmedAssigments ' ;
15+ import { Assignment } from './public/Assigments ' ;
1616import type { PresentationResult } from './public/PresentationResult' ;
1717import { fromJson as paywallResultFromJson } from './public/PaywallResult' ;
1818import { EntitlementsInfo } from './public/EntitlementsInfo' ;
@@ -465,18 +465,34 @@ export default class Superwall {
465465 /**
466466 * Confirms all experiment assignments and returns them in an array.
467467 *
468- * This method tracks the {@link SuperwallEvent.confirmAllAssignments} event in the delegate.
469- *
470468 * Note that the assignments may differ when a placement is registered due to changes
471469 * in user, placement, or device parameters used in audience filters.
472470 *
473- * @returns {Promise<ConfirmedAssignment []> } A promise that resolves to an array of {@link ConfirmedAssignment } objects.
471+ * @returns {Promise<Assignment []> } A promise that resolves to an array of {@link Assignment } objects.
474472 */
475- async confirmAllAssignments ( ) : Promise < ConfirmedAssignment [ ] > {
473+ async confirmAllAssignments ( ) : Promise < Assignment [ ] > {
476474 await this . awaitConfig ( ) ;
477475 const assignments = await SuperwallReactNative . confirmAllAssignments ( ) ;
478476 return assignments . map ( ( assignment : any ) =>
479- ConfirmedAssignment . fromJson ( assignment )
477+ Assignment . fromJson ( assignment )
478+ ) ;
479+ }
480+
481+ /**
482+ * Gets all the experiment assignments and returns them in an array.
483+ *
484+ * This method tracks the {@link SuperwallEvent.getAssignments} event in the delegate.
485+ *
486+ * Note that the assignments may differ when a placement is registered due to changes
487+ * in user, placement, or device parameters used in audience filters.
488+ *
489+ * @returns {Promise<Assignment[]> } A promise that resolves to an array of {@link Assignment} objects.
490+ */
491+ async getAssignments ( ) : Promise < Assignment [ ] > {
492+ await this . awaitConfig ( ) ;
493+ const assignments = await SuperwallReactNative . getAssignments ( ) ;
494+ return assignments . map ( ( assignment : any ) =>
495+ Assignment . fromJson ( assignment )
480496 ) ;
481497 }
482498
0 commit comments