@@ -74,7 +74,7 @@ export class PromptsManager {
7474 // show native prompt
7575 const nativePromptOptions = this . getDelayedPromptOptions (
7676 userPromptOptions ,
77- DelayedPromptType . Native ,
77+ DelayedPromptType . _Native ,
7878 ) ;
7979 const isPageViewConditionMetForNative : boolean =
8080 this . isPageViewConditionMet ( nativePromptOptions ) ;
@@ -85,7 +85,7 @@ export class PromptsManager {
8585
8686 if ( conditionMetWithNativeOptions && ! forceSlidedownWithNativeOptions ) {
8787 this . internalShowDelayedPrompt (
88- DelayedPromptType . Native ,
88+ DelayedPromptType . _Native ,
8989 nativePromptOptions . timeDelay || 0 ,
9090 ) ;
9191 return ;
@@ -94,12 +94,12 @@ export class PromptsManager {
9494 // if slidedown not configured, condition met with native options, & should force slidedown over native:
9595 const isPushSlidedownConfigured = ! ! getFirstSlidedownPromptOptionsWithType (
9696 userPromptOptions ?. slidedown ?. prompts ,
97- DelayedPromptType . Push ,
97+ DelayedPromptType . _Push ,
9898 ) ;
9999
100100 if ( forceSlidedownWithNativeOptions && ! isPushSlidedownConfigured ) {
101101 this . internalShowDelayedPrompt (
102- DelayedPromptType . Push ,
102+ DelayedPromptType . _Push ,
103103 nativePromptOptions . timeDelay || 0 ,
104104 ) ;
105105 }
@@ -145,31 +145,31 @@ export class PromptsManager {
145145 return ;
146146 }
147147
148- if ( requiresUserInteraction ( ) && type === DelayedPromptType . Native ) {
149- type = DelayedPromptType . Push ; // Push Slidedown for cases where user interaction is needed
148+ if ( requiresUserInteraction ( ) && type === DelayedPromptType . _Native ) {
149+ type = DelayedPromptType . _Push ; // Push Slidedown for cases where user interaction is needed
150150 }
151151
152152 if ( timeDelaySeconds > 0 ) {
153153 await delay ( timeDelaySeconds * 1_000 ) ;
154154 }
155155
156156 switch ( type ) {
157- case DelayedPromptType . Native :
157+ case DelayedPromptType . _Native :
158158 await this . internalShowNativePrompt ( ) ;
159159 break ;
160- case DelayedPromptType . Push :
160+ case DelayedPromptType . _Push :
161161 await this . internalShowSlidedownPrompt ( options ) ;
162162 break ;
163- case DelayedPromptType . Category :
163+ case DelayedPromptType . _Category :
164164 await this . internalShowCategorySlidedown ( options ) ;
165165 break ;
166- case DelayedPromptType . Sms :
166+ case DelayedPromptType . _Sms :
167167 await this . internalShowSmsSlidedown ( options ) ;
168168 break ;
169- case DelayedPromptType . Email :
169+ case DelayedPromptType . _Email :
170170 await this . internalShowEmailSlidedown ( options ) ;
171171 break ;
172- case DelayedPromptType . SmsAndEmail :
172+ case DelayedPromptType . _SmsAndEmail :
173173 await this . internalShowSmsAndEmailSlidedown ( options ) ;
174174 break ;
175175 default :
@@ -222,7 +222,7 @@ export class PromptsManager {
222222 ) : Promise < void > {
223223 logMethodCall ( 'internalShowCategorySlidedown' ) ;
224224 await this . internalShowParticularSlidedown (
225- DelayedPromptType . Category ,
225+ DelayedPromptType . _Category ,
226226 options ,
227227 ) ;
228228 }
@@ -231,15 +231,15 @@ export class PromptsManager {
231231 options ?: AutoPromptOptions ,
232232 ) : Promise < void > {
233233 logMethodCall ( 'internalShowSmsSlidedown' ) ;
234- await this . internalShowParticularSlidedown ( DelayedPromptType . Sms , options ) ;
234+ await this . internalShowParticularSlidedown ( DelayedPromptType . _Sms , options ) ;
235235 }
236236
237237 public async internalShowEmailSlidedown (
238238 options ?: AutoPromptOptions ,
239239 ) : Promise < void > {
240240 logMethodCall ( 'internalShowEmailSlidedown' ) ;
241241 await this . internalShowParticularSlidedown (
242- DelayedPromptType . Email ,
242+ DelayedPromptType . _Email ,
243243 options ,
244244 ) ;
245245 }
@@ -249,7 +249,7 @@ export class PromptsManager {
249249 ) : Promise < void > {
250250 logMethodCall ( 'internalShowSmsAndEmailSlidedown' ) ;
251251 await this . internalShowParticularSlidedown (
252- DelayedPromptType . SmsAndEmail ,
252+ DelayedPromptType . _SmsAndEmail ,
253253 options ,
254254 ) ;
255255 }
@@ -272,7 +272,7 @@ export class PromptsManager {
272272 getFirstSlidedownPromptOptionsWithType ( prompts , typeToPullFromConfig ) ;
273273
274274 if ( ! slidedownPromptOptions ) {
275- if ( typeToPullFromConfig !== DelayedPromptType . Push ) {
275+ if ( typeToPullFromConfig !== DelayedPromptType . _Push ) {
276276 Log . _error (
277277 `OneSignal: slidedown of type '${ typeToPullFromConfig } ' couldn't be shown. Check your configuration` +
278278 ` on the OneSignal dashboard or your custom code initialization.` ,
@@ -313,10 +313,10 @@ export class PromptsManager {
313313 return ;
314314 }
315315
316- const type = this . context . _slidedownManager . _slidedown ?. options . type ;
316+ const type = this . context . _slidedownManager . _slidedown ?. _options . type ;
317317 switch ( type ) {
318- case DelayedPromptType . Push :
319- case DelayedPromptType . Category :
318+ case DelayedPromptType . _Push :
319+ case DelayedPromptType . _Category :
320320 Log . _debug (
321321 'Setting flag to not show the slidedown to the user again.' ,
322322 ) ;
@@ -362,7 +362,7 @@ export class PromptsManager {
362362 }
363363
364364 switch ( type ) {
365- case DelayedPromptType . Native : {
365+ case DelayedPromptType . _Native : {
366366 const nativePromptOptions = promptOptions . native ;
367367 return {
368368 enabled : nativePromptOptions ?. enabled ,
@@ -371,11 +371,11 @@ export class PromptsManager {
371371 pageViews : nativePromptOptions ?. pageViews ,
372372 } ;
373373 }
374- case DelayedPromptType . Push :
375- case DelayedPromptType . Category :
376- case DelayedPromptType . Email :
377- case DelayedPromptType . Sms :
378- case DelayedPromptType . SmsAndEmail : {
374+ case DelayedPromptType . _Push :
375+ case DelayedPromptType . _Category :
376+ case DelayedPromptType . _Email :
377+ case DelayedPromptType . _Sms :
378+ case DelayedPromptType . _SmsAndEmail : {
379379 const { userConfig } = this . context . _appConfig ;
380380 const options = getFirstSlidedownPromptOptionsWithType (
381381 userConfig . promptOptions ?. slidedown ?. prompts || [ ] ,
0 commit comments