@forgerock/login-widget 1.2.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,417 @@
1
+ /**
2
+ *
3
+ * Copyright © 2025-2026 Ping Identity Corporation. All right reserved.
4
+ *
5
+ * This software may be modified and distributed under the terms
6
+ * of the MIT license. See the LICENSE file for details.
7
+ *
8
+ **/
9
+ import { z } from 'zod';
10
+ import type { Writable } from 'svelte/store';
11
+ export declare const stringsSchema: z.ZodObject<{
12
+ adminRegInvalidInviteHeader: z.ZodString;
13
+ adminRegInvalidInviteDescription: z.ZodString;
14
+ adminRegOtpDescription: z.ZodString;
15
+ adminRegOtpError: z.ZodString;
16
+ adminRegOtpHeader: z.ZodString;
17
+ adminRegOtpResendPrompt: z.ZodString;
18
+ adminRegOtpResend: z.ZodString;
19
+ adminRegPrivacyPolicyAgreement: z.ZodString;
20
+ adminRegPrivacyPolicyDescription: z.ZodString;
21
+ adminRegPrivacyPolicyHeader: z.ZodString;
22
+ adminRegPrivacyPolicySelectRegion: z.ZodString;
23
+ adminRegSendVerificationCode: z.ZodString;
24
+ adminRegWelcomeDescriptionPre: z.ZodString;
25
+ adminRegWelcomeDescriptionPost: z.ZodString;
26
+ adminRegWelcomeVerification: z.ZodString;
27
+ adminRegWelcomeHeader: z.ZodString;
28
+ alreadyHaveAnAccount: z.ZodString;
29
+ backToDefault: z.ZodString;
30
+ backToLogin: z.ZodString;
31
+ captchaError: z.ZodString;
32
+ dontHaveAnAccount: z.ZodString;
33
+ closeModal: z.ZodString;
34
+ charactersCannotRepeatMoreThan: z.ZodString;
35
+ charactersCannotRepeatMoreThanCaseInsensitive: z.ZodString;
36
+ checkYourEmail: z.ZodString;
37
+ chooseDifferentUsername: z.ZodString;
38
+ chooseYourDeviceForIdentityVerification: z.ZodString;
39
+ confirmPassword: z.ZodString;
40
+ constraintViolationForPassword: z.ZodString;
41
+ constraintViolationForValue: z.ZodString;
42
+ continueButton: z.ZodString;
43
+ continueWith: z.ZodString;
44
+ downloadTheApp: z.ZodString;
45
+ getAuthenticatorApp: z.ZodString;
46
+ getAuthenticatorAppDescription: z.ZodString;
47
+ getAuthenticatorAppLinks: z.ZodString;
48
+ copyUrl: z.ZodString;
49
+ copyAndPasteUrlBelow: z.ZodString;
50
+ customSecurityQuestion: z.ZodString;
51
+ dontGetLockedOut: z.ZodString;
52
+ doesNotMeetMinimumCharacterLength: z.ZodString;
53
+ deviceName: z.ZodString;
54
+ ensurePasswordIsMoreThan: z.ZodString;
55
+ ensurePasswordHasOne: z.ZodString;
56
+ enterVerificationCode: z.ZodString;
57
+ exceedsMaximumCharacterLength: z.ZodString;
58
+ fieldCanNotContainFollowingCharacters: z.ZodString;
59
+ fieldCanNotContainFollowingValues: z.ZodString;
60
+ forgotPassword: z.ZodString;
61
+ forgotUsername: z.ZodString;
62
+ givenName: z.ZodString;
63
+ inputRequiredError: z.ZodString;
64
+ loading: z.ZodString;
65
+ loginButton: z.ZodString;
66
+ loginFailure: z.ZodString;
67
+ loginHeader: z.ZodString;
68
+ loginSuccess: z.ZodString;
69
+ mail: z.ZodString;
70
+ minimumNumberOfNumbers: z.ZodString;
71
+ minimumNumberOfLowercase: z.ZodString;
72
+ minimumNumberOfUppercase: z.ZodString;
73
+ minimumNumberOfSymbols: z.ZodString;
74
+ nameCallback: z.ZodString;
75
+ nameYourDevice: z.ZodString;
76
+ next: z.ZodString;
77
+ nextButton: z.ZodString;
78
+ notToExceedMaximumCharacterLength: z.ZodString;
79
+ noLessThanMinimumCharacterLength: z.ZodString;
80
+ useOneOfTheseCodes: z.ZodString;
81
+ onMobileOpenInAuthenticator: z.ZodString;
82
+ optionallyNameDevice: z.ZodString;
83
+ passwordCallback: z.ZodString;
84
+ passwordCannotContainCommonPasswords: z.ZodString;
85
+ passwordCannotContainCommonPasswordsOrBeReversible: z.ZodString;
86
+ passwordCannotContainCommonPasswordsOrBeReversibleStringsLessThan: z.ZodString;
87
+ passwordRequirements: z.ZodString;
88
+ pleaseCheckValue: z.ZodString;
89
+ pleaseConfirm: z.ZodString;
90
+ preferencesMarketing: z.ZodString;
91
+ preferencesUpdates: z.ZodString;
92
+ provideCustomQuestion: z.ZodString;
93
+ qrCodeNotWorking: z.ZodString;
94
+ qrCodeFailedToRender: z.ZodString;
95
+ qrCodeImportFailure: z.ZodString;
96
+ redirectingTo: z.ZodString;
97
+ registerButton: z.ZodString;
98
+ registerHeader: z.ZodString;
99
+ registerSuccess: z.ZodString;
100
+ registerYourDevice: z.ZodString;
101
+ requiredField: z.ZodString;
102
+ securityAnswer: z.ZodString;
103
+ setupTwoStepVerification: z.ZodString;
104
+ setupTwoStepVerificationButton: z.ZodString;
105
+ setupTwoStepVerificationDescription: z.ZodString;
106
+ setupTwoStepVerificationWarning: z.ZodString;
107
+ skipForNow: z.ZodString;
108
+ scanQrCodeWithAuthenticator: z.ZodString;
109
+ securityQuestions: z.ZodString;
110
+ securityQuestionsPrompt: z.ZodString;
111
+ shouldContainANumber: z.ZodString;
112
+ shouldContainAnUppercase: z.ZodString;
113
+ shouldContainALowercase: z.ZodString;
114
+ shouldContainASymbol: z.ZodString;
115
+ showPassword: z.ZodString;
116
+ signalsEvaluation: z.ZodString;
117
+ skipButton: z.ZodString;
118
+ sn: z.ZodString;
119
+ submit: z.ZodString;
120
+ submitButton: z.ZodString;
121
+ successMessage: z.ZodString;
122
+ termsAndConditions: z.ZodString;
123
+ termsAndConditionsLinkText: z.ZodString;
124
+ tryAgain: z.ZodString;
125
+ twoFactorAuthentication: z.ZodString;
126
+ useThisNewMfaToHelpVerifyYourIdentity: z.ZodString;
127
+ useValidEmail: z.ZodString;
128
+ unrecoverableError: z.ZodString;
129
+ unknownLoginError: z.ZodString;
130
+ unknownNetworkError: z.ZodString;
131
+ url: z.ZodString;
132
+ useDeviceForIdentityVerification: z.ZodString;
133
+ userName: z.ZodString;
134
+ usernameRequirements: z.ZodString;
135
+ useTheAuthenticatorAppOnYourPhone: z.ZodString;
136
+ validatedCreatePasswordCallback: z.ZodString;
137
+ validatedCreateUsernameCallback: z.ZodString;
138
+ valueRequirements: z.ZodString;
139
+ verifyYourIdentity: z.ZodString;
140
+ yourDevice: z.ZodString;
141
+ yourMultiFactorAuthIsEnabled: z.ZodString;
142
+ yourRecoveryCodesToAccessAccountForLostDevice: z.ZodString;
143
+ }, z.core.$strict>;
144
+ export declare const partialStringsSchema: z.ZodObject<{
145
+ adminRegInvalidInviteHeader: z.ZodOptional<z.ZodString>;
146
+ adminRegInvalidInviteDescription: z.ZodOptional<z.ZodString>;
147
+ adminRegOtpDescription: z.ZodOptional<z.ZodString>;
148
+ adminRegOtpError: z.ZodOptional<z.ZodString>;
149
+ adminRegOtpHeader: z.ZodOptional<z.ZodString>;
150
+ adminRegOtpResendPrompt: z.ZodOptional<z.ZodString>;
151
+ adminRegOtpResend: z.ZodOptional<z.ZodString>;
152
+ adminRegPrivacyPolicyAgreement: z.ZodOptional<z.ZodString>;
153
+ adminRegPrivacyPolicyDescription: z.ZodOptional<z.ZodString>;
154
+ adminRegPrivacyPolicyHeader: z.ZodOptional<z.ZodString>;
155
+ adminRegPrivacyPolicySelectRegion: z.ZodOptional<z.ZodString>;
156
+ adminRegSendVerificationCode: z.ZodOptional<z.ZodString>;
157
+ adminRegWelcomeDescriptionPre: z.ZodOptional<z.ZodString>;
158
+ adminRegWelcomeDescriptionPost: z.ZodOptional<z.ZodString>;
159
+ adminRegWelcomeVerification: z.ZodOptional<z.ZodString>;
160
+ adminRegWelcomeHeader: z.ZodOptional<z.ZodString>;
161
+ alreadyHaveAnAccount: z.ZodOptional<z.ZodString>;
162
+ backToDefault: z.ZodOptional<z.ZodString>;
163
+ backToLogin: z.ZodOptional<z.ZodString>;
164
+ captchaError: z.ZodOptional<z.ZodString>;
165
+ dontHaveAnAccount: z.ZodOptional<z.ZodString>;
166
+ closeModal: z.ZodOptional<z.ZodString>;
167
+ charactersCannotRepeatMoreThan: z.ZodOptional<z.ZodString>;
168
+ charactersCannotRepeatMoreThanCaseInsensitive: z.ZodOptional<z.ZodString>;
169
+ checkYourEmail: z.ZodOptional<z.ZodString>;
170
+ chooseDifferentUsername: z.ZodOptional<z.ZodString>;
171
+ chooseYourDeviceForIdentityVerification: z.ZodOptional<z.ZodString>;
172
+ confirmPassword: z.ZodOptional<z.ZodString>;
173
+ constraintViolationForPassword: z.ZodOptional<z.ZodString>;
174
+ constraintViolationForValue: z.ZodOptional<z.ZodString>;
175
+ continueButton: z.ZodOptional<z.ZodString>;
176
+ continueWith: z.ZodOptional<z.ZodString>;
177
+ downloadTheApp: z.ZodOptional<z.ZodString>;
178
+ getAuthenticatorApp: z.ZodOptional<z.ZodString>;
179
+ getAuthenticatorAppDescription: z.ZodOptional<z.ZodString>;
180
+ getAuthenticatorAppLinks: z.ZodOptional<z.ZodString>;
181
+ copyUrl: z.ZodOptional<z.ZodString>;
182
+ copyAndPasteUrlBelow: z.ZodOptional<z.ZodString>;
183
+ customSecurityQuestion: z.ZodOptional<z.ZodString>;
184
+ dontGetLockedOut: z.ZodOptional<z.ZodString>;
185
+ doesNotMeetMinimumCharacterLength: z.ZodOptional<z.ZodString>;
186
+ deviceName: z.ZodOptional<z.ZodString>;
187
+ ensurePasswordIsMoreThan: z.ZodOptional<z.ZodString>;
188
+ ensurePasswordHasOne: z.ZodOptional<z.ZodString>;
189
+ enterVerificationCode: z.ZodOptional<z.ZodString>;
190
+ exceedsMaximumCharacterLength: z.ZodOptional<z.ZodString>;
191
+ fieldCanNotContainFollowingCharacters: z.ZodOptional<z.ZodString>;
192
+ fieldCanNotContainFollowingValues: z.ZodOptional<z.ZodString>;
193
+ forgotPassword: z.ZodOptional<z.ZodString>;
194
+ forgotUsername: z.ZodOptional<z.ZodString>;
195
+ givenName: z.ZodOptional<z.ZodString>;
196
+ inputRequiredError: z.ZodOptional<z.ZodString>;
197
+ loading: z.ZodOptional<z.ZodString>;
198
+ loginButton: z.ZodOptional<z.ZodString>;
199
+ loginFailure: z.ZodOptional<z.ZodString>;
200
+ loginHeader: z.ZodOptional<z.ZodString>;
201
+ loginSuccess: z.ZodOptional<z.ZodString>;
202
+ mail: z.ZodOptional<z.ZodString>;
203
+ minimumNumberOfNumbers: z.ZodOptional<z.ZodString>;
204
+ minimumNumberOfLowercase: z.ZodOptional<z.ZodString>;
205
+ minimumNumberOfUppercase: z.ZodOptional<z.ZodString>;
206
+ minimumNumberOfSymbols: z.ZodOptional<z.ZodString>;
207
+ nameCallback: z.ZodOptional<z.ZodString>;
208
+ nameYourDevice: z.ZodOptional<z.ZodString>;
209
+ next: z.ZodOptional<z.ZodString>;
210
+ nextButton: z.ZodOptional<z.ZodString>;
211
+ notToExceedMaximumCharacterLength: z.ZodOptional<z.ZodString>;
212
+ noLessThanMinimumCharacterLength: z.ZodOptional<z.ZodString>;
213
+ useOneOfTheseCodes: z.ZodOptional<z.ZodString>;
214
+ onMobileOpenInAuthenticator: z.ZodOptional<z.ZodString>;
215
+ optionallyNameDevice: z.ZodOptional<z.ZodString>;
216
+ passwordCallback: z.ZodOptional<z.ZodString>;
217
+ passwordCannotContainCommonPasswords: z.ZodOptional<z.ZodString>;
218
+ passwordCannotContainCommonPasswordsOrBeReversible: z.ZodOptional<z.ZodString>;
219
+ passwordCannotContainCommonPasswordsOrBeReversibleStringsLessThan: z.ZodOptional<z.ZodString>;
220
+ passwordRequirements: z.ZodOptional<z.ZodString>;
221
+ pleaseCheckValue: z.ZodOptional<z.ZodString>;
222
+ pleaseConfirm: z.ZodOptional<z.ZodString>;
223
+ preferencesMarketing: z.ZodOptional<z.ZodString>;
224
+ preferencesUpdates: z.ZodOptional<z.ZodString>;
225
+ provideCustomQuestion: z.ZodOptional<z.ZodString>;
226
+ qrCodeNotWorking: z.ZodOptional<z.ZodString>;
227
+ qrCodeFailedToRender: z.ZodOptional<z.ZodString>;
228
+ qrCodeImportFailure: z.ZodOptional<z.ZodString>;
229
+ redirectingTo: z.ZodOptional<z.ZodString>;
230
+ registerButton: z.ZodOptional<z.ZodString>;
231
+ registerHeader: z.ZodOptional<z.ZodString>;
232
+ registerSuccess: z.ZodOptional<z.ZodString>;
233
+ registerYourDevice: z.ZodOptional<z.ZodString>;
234
+ requiredField: z.ZodOptional<z.ZodString>;
235
+ securityAnswer: z.ZodOptional<z.ZodString>;
236
+ setupTwoStepVerification: z.ZodOptional<z.ZodString>;
237
+ setupTwoStepVerificationButton: z.ZodOptional<z.ZodString>;
238
+ setupTwoStepVerificationDescription: z.ZodOptional<z.ZodString>;
239
+ setupTwoStepVerificationWarning: z.ZodOptional<z.ZodString>;
240
+ skipForNow: z.ZodOptional<z.ZodString>;
241
+ scanQrCodeWithAuthenticator: z.ZodOptional<z.ZodString>;
242
+ securityQuestions: z.ZodOptional<z.ZodString>;
243
+ securityQuestionsPrompt: z.ZodOptional<z.ZodString>;
244
+ shouldContainANumber: z.ZodOptional<z.ZodString>;
245
+ shouldContainAnUppercase: z.ZodOptional<z.ZodString>;
246
+ shouldContainALowercase: z.ZodOptional<z.ZodString>;
247
+ shouldContainASymbol: z.ZodOptional<z.ZodString>;
248
+ showPassword: z.ZodOptional<z.ZodString>;
249
+ signalsEvaluation: z.ZodOptional<z.ZodString>;
250
+ skipButton: z.ZodOptional<z.ZodString>;
251
+ sn: z.ZodOptional<z.ZodString>;
252
+ submit: z.ZodOptional<z.ZodString>;
253
+ submitButton: z.ZodOptional<z.ZodString>;
254
+ successMessage: z.ZodOptional<z.ZodString>;
255
+ termsAndConditions: z.ZodOptional<z.ZodString>;
256
+ termsAndConditionsLinkText: z.ZodOptional<z.ZodString>;
257
+ tryAgain: z.ZodOptional<z.ZodString>;
258
+ twoFactorAuthentication: z.ZodOptional<z.ZodString>;
259
+ useThisNewMfaToHelpVerifyYourIdentity: z.ZodOptional<z.ZodString>;
260
+ useValidEmail: z.ZodOptional<z.ZodString>;
261
+ unrecoverableError: z.ZodOptional<z.ZodString>;
262
+ unknownLoginError: z.ZodOptional<z.ZodString>;
263
+ unknownNetworkError: z.ZodOptional<z.ZodString>;
264
+ url: z.ZodOptional<z.ZodString>;
265
+ useDeviceForIdentityVerification: z.ZodOptional<z.ZodString>;
266
+ userName: z.ZodOptional<z.ZodString>;
267
+ usernameRequirements: z.ZodOptional<z.ZodString>;
268
+ useTheAuthenticatorAppOnYourPhone: z.ZodOptional<z.ZodString>;
269
+ validatedCreatePasswordCallback: z.ZodOptional<z.ZodString>;
270
+ validatedCreateUsernameCallback: z.ZodOptional<z.ZodString>;
271
+ valueRequirements: z.ZodOptional<z.ZodString>;
272
+ verifyYourIdentity: z.ZodOptional<z.ZodString>;
273
+ yourDevice: z.ZodOptional<z.ZodString>;
274
+ yourMultiFactorAuthIsEnabled: z.ZodOptional<z.ZodString>;
275
+ yourRecoveryCodesToAccessAccountForLostDevice: z.ZodOptional<z.ZodString>;
276
+ }, z.core.$strict>;
277
+ export declare const locale: Writable<string | null>;
278
+ export declare const stringsStore: Writable<Record<string, string> | null>;
279
+ /**
280
+ * @function initialize - Initialize the locale store
281
+ * @param {object} userLocale - An object of custom locale strings to merge with the default
282
+ * @returns {object} - The locale store
283
+ * @example initialize({ loginHeader: 'Welcome to the login page' });
284
+ */
285
+ export declare function initialize(userLocale?: z.infer<typeof partialStringsSchema>): z.ZodObject<{
286
+ adminRegInvalidInviteHeader: z.ZodString;
287
+ adminRegInvalidInviteDescription: z.ZodString;
288
+ adminRegOtpDescription: z.ZodString;
289
+ adminRegOtpError: z.ZodString;
290
+ adminRegOtpHeader: z.ZodString;
291
+ adminRegOtpResendPrompt: z.ZodString;
292
+ adminRegOtpResend: z.ZodString;
293
+ adminRegPrivacyPolicyAgreement: z.ZodString;
294
+ adminRegPrivacyPolicyDescription: z.ZodString;
295
+ adminRegPrivacyPolicyHeader: z.ZodString;
296
+ adminRegPrivacyPolicySelectRegion: z.ZodString;
297
+ adminRegSendVerificationCode: z.ZodString;
298
+ adminRegWelcomeDescriptionPre: z.ZodString;
299
+ adminRegWelcomeDescriptionPost: z.ZodString;
300
+ adminRegWelcomeVerification: z.ZodString;
301
+ adminRegWelcomeHeader: z.ZodString;
302
+ alreadyHaveAnAccount: z.ZodString;
303
+ backToDefault: z.ZodString;
304
+ backToLogin: z.ZodString;
305
+ captchaError: z.ZodString;
306
+ dontHaveAnAccount: z.ZodString;
307
+ closeModal: z.ZodString;
308
+ charactersCannotRepeatMoreThan: z.ZodString;
309
+ charactersCannotRepeatMoreThanCaseInsensitive: z.ZodString;
310
+ checkYourEmail: z.ZodString;
311
+ chooseDifferentUsername: z.ZodString;
312
+ chooseYourDeviceForIdentityVerification: z.ZodString;
313
+ confirmPassword: z.ZodString;
314
+ constraintViolationForPassword: z.ZodString;
315
+ constraintViolationForValue: z.ZodString;
316
+ continueButton: z.ZodString;
317
+ continueWith: z.ZodString;
318
+ downloadTheApp: z.ZodString;
319
+ getAuthenticatorApp: z.ZodString;
320
+ getAuthenticatorAppDescription: z.ZodString;
321
+ getAuthenticatorAppLinks: z.ZodString;
322
+ copyUrl: z.ZodString;
323
+ copyAndPasteUrlBelow: z.ZodString;
324
+ customSecurityQuestion: z.ZodString;
325
+ dontGetLockedOut: z.ZodString;
326
+ doesNotMeetMinimumCharacterLength: z.ZodString;
327
+ deviceName: z.ZodString;
328
+ ensurePasswordIsMoreThan: z.ZodString;
329
+ ensurePasswordHasOne: z.ZodString;
330
+ enterVerificationCode: z.ZodString;
331
+ exceedsMaximumCharacterLength: z.ZodString;
332
+ fieldCanNotContainFollowingCharacters: z.ZodString;
333
+ fieldCanNotContainFollowingValues: z.ZodString;
334
+ forgotPassword: z.ZodString;
335
+ forgotUsername: z.ZodString;
336
+ givenName: z.ZodString;
337
+ inputRequiredError: z.ZodString;
338
+ loading: z.ZodString;
339
+ loginButton: z.ZodString;
340
+ loginFailure: z.ZodString;
341
+ loginHeader: z.ZodString;
342
+ loginSuccess: z.ZodString;
343
+ mail: z.ZodString;
344
+ minimumNumberOfNumbers: z.ZodString;
345
+ minimumNumberOfLowercase: z.ZodString;
346
+ minimumNumberOfUppercase: z.ZodString;
347
+ minimumNumberOfSymbols: z.ZodString;
348
+ nameCallback: z.ZodString;
349
+ nameYourDevice: z.ZodString;
350
+ next: z.ZodString;
351
+ nextButton: z.ZodString;
352
+ notToExceedMaximumCharacterLength: z.ZodString;
353
+ noLessThanMinimumCharacterLength: z.ZodString;
354
+ useOneOfTheseCodes: z.ZodString;
355
+ onMobileOpenInAuthenticator: z.ZodString;
356
+ optionallyNameDevice: z.ZodString;
357
+ passwordCallback: z.ZodString;
358
+ passwordCannotContainCommonPasswords: z.ZodString;
359
+ passwordCannotContainCommonPasswordsOrBeReversible: z.ZodString;
360
+ passwordCannotContainCommonPasswordsOrBeReversibleStringsLessThan: z.ZodString;
361
+ passwordRequirements: z.ZodString;
362
+ pleaseCheckValue: z.ZodString;
363
+ pleaseConfirm: z.ZodString;
364
+ preferencesMarketing: z.ZodString;
365
+ preferencesUpdates: z.ZodString;
366
+ provideCustomQuestion: z.ZodString;
367
+ qrCodeNotWorking: z.ZodString;
368
+ qrCodeFailedToRender: z.ZodString;
369
+ qrCodeImportFailure: z.ZodString;
370
+ redirectingTo: z.ZodString;
371
+ registerButton: z.ZodString;
372
+ registerHeader: z.ZodString;
373
+ registerSuccess: z.ZodString;
374
+ registerYourDevice: z.ZodString;
375
+ requiredField: z.ZodString;
376
+ securityAnswer: z.ZodString;
377
+ setupTwoStepVerification: z.ZodString;
378
+ setupTwoStepVerificationButton: z.ZodString;
379
+ setupTwoStepVerificationDescription: z.ZodString;
380
+ setupTwoStepVerificationWarning: z.ZodString;
381
+ skipForNow: z.ZodString;
382
+ scanQrCodeWithAuthenticator: z.ZodString;
383
+ securityQuestions: z.ZodString;
384
+ securityQuestionsPrompt: z.ZodString;
385
+ shouldContainANumber: z.ZodString;
386
+ shouldContainAnUppercase: z.ZodString;
387
+ shouldContainALowercase: z.ZodString;
388
+ shouldContainASymbol: z.ZodString;
389
+ showPassword: z.ZodString;
390
+ signalsEvaluation: z.ZodString;
391
+ skipButton: z.ZodString;
392
+ sn: z.ZodString;
393
+ submit: z.ZodString;
394
+ submitButton: z.ZodString;
395
+ successMessage: z.ZodString;
396
+ termsAndConditions: z.ZodString;
397
+ termsAndConditionsLinkText: z.ZodString;
398
+ tryAgain: z.ZodString;
399
+ twoFactorAuthentication: z.ZodString;
400
+ useThisNewMfaToHelpVerifyYourIdentity: z.ZodString;
401
+ useValidEmail: z.ZodString;
402
+ unrecoverableError: z.ZodString;
403
+ unknownLoginError: z.ZodString;
404
+ unknownNetworkError: z.ZodString;
405
+ url: z.ZodString;
406
+ useDeviceForIdentityVerification: z.ZodString;
407
+ userName: z.ZodString;
408
+ usernameRequirements: z.ZodString;
409
+ useTheAuthenticatorAppOnYourPhone: z.ZodString;
410
+ validatedCreatePasswordCallback: z.ZodString;
411
+ validatedCreateUsernameCallback: z.ZodString;
412
+ valueRequirements: z.ZodString;
413
+ verifyYourIdentity: z.ZodString;
414
+ yourDevice: z.ZodString;
415
+ yourMultiFactorAuthIsEnabled: z.ZodString;
416
+ yourRecoveryCodesToAccessAccountForLostDevice: z.ZodString;
417
+ }, z.core.$strict>;
@@ -0,0 +1,33 @@
1
+ /**
2
+ *
3
+ * Copyright © 2025 - 2026 Ping Identity Corporation. All right reserved.
4
+ *
5
+ * This software may be modified and distributed under the terms
6
+ * of the MIT license. See the LICENSE file for details.
7
+ *
8
+ **/
9
+ import type { GetTokensOptions, OauthTokens, OidcClient } from '@forgerock/oidc-client/types';
10
+ import type { Readable, Writable } from 'svelte/store';
11
+ import type { Maybe } from '../interfaces';
12
+ export interface OAuthStore extends Pick<Writable<OAuthTokenStoreValue>, 'subscribe'> {
13
+ get: (getOptions?: GetTokensOptions) => Promise<OAuthTokenStoreValue>;
14
+ reset: () => void;
15
+ }
16
+ export interface OAuthTokenStoreValue {
17
+ completed: boolean;
18
+ error: Maybe<{
19
+ code?: Maybe<number>;
20
+ message: Maybe<string>;
21
+ troubleshoot: Maybe<string>;
22
+ }>;
23
+ loading: boolean;
24
+ successful: boolean;
25
+ response: Maybe<OauthTokens> | void;
26
+ }
27
+ /**
28
+ * @function initialize - Initializes the OAuth store with a get function and a reset function
29
+ * @param {Readable<OidcClient | null>} oidcClientStore - The OIDC client store to read the client from
30
+ * @param {GetTokensOptions} initOptions - Default options to pass to `token.get`
31
+ * @returns {OAuthStore} - The OAuth store
32
+ */
33
+ export declare function initialize(oidcClientStore: Readable<OidcClient | null> | undefined, initOptions?: GetTokensOptions): OAuthStore;
@@ -0,0 +1,45 @@
1
+ /**
2
+ *
3
+ * Copyright © 2026 Ping Identity Corporation. All right reserved.
4
+ *
5
+ * This software may be modified and distributed under the terms
6
+ * of the MIT license. See the LICENSE file for details.
7
+ *
8
+ **/
9
+ import { z } from 'zod';
10
+ import type { OidcClient } from '@forgerock/oidc-client/types';
11
+ import type { Readable } from 'svelte/store';
12
+ /**
13
+ * Configure the OIDC Client.
14
+ */
15
+ export declare const oidcClientConfigSchema: z.ZodObject<{
16
+ clientId: z.ZodString;
17
+ redirectUri: z.ZodString;
18
+ scope: z.ZodDefault<z.ZodString>;
19
+ serverConfig: z.ZodObject<{
20
+ wellknown: z.ZodString;
21
+ }, z.core.$strict>;
22
+ }, z.core.$strict>;
23
+ export type OidcClientConfig = z.infer<typeof oidcClientConfigSchema>;
24
+ export type OidcClientStore = Readable<OidcClient | null> & {
25
+ /**
26
+ * Resolves with the constructed client (or a `GenericError` if construction
27
+ * failed). Awaiting this is the readiness gate — the store is already
28
+ * populated by the time it resolves, so callers never see the `null` window.
29
+ */
30
+ getClient: () => Promise<OidcClient>;
31
+ };
32
+ /**
33
+ * @function createOidcClientStore
34
+ *
35
+ * Wraps the `oidc()` factory in a Svelte store. The client is constructed once;
36
+ * `getClient()` shares that single construction promise so awaiting it is the
37
+ * readiness gate. `subscribe` exposes the same client reactively — `null` until
38
+ * construction settles, then the resolved client (or a `GenericError`).
39
+ * Inject the returned store into OAuth and User stores so both share the same
40
+ * client instance without module-level state.
41
+ *
42
+ * @param {OidcClientConfig} config — OIDC client configuration (validated by Zod).
43
+ * @returns {OidcClientStore}
44
+ */
45
+ export declare function createOidcClientStore(config: OidcClientConfig): OidcClientStore;
@@ -0,0 +1,77 @@
1
+ /**
2
+ *
3
+ * Copyright © 2026 Ping Identity Corporation. All right reserved.
4
+ *
5
+ * This software may be modified and distributed under the terms
6
+ * of the MIT license. See the LICENSE file for details.
7
+ *
8
+ **/
9
+ import { z } from 'zod';
10
+ import type { Protect, SignalsInitializationOptions } from '@forgerock/protect/types';
11
+ import type { Readable } from 'svelte/store';
12
+ /**
13
+ * Public API config schema. Requires `envId`; types the fields we know.
14
+ *
15
+ * `z.looseObject` keeps unlisted keys (unlike `z.object`, which drops them). We list only
16
+ * a subset of the fields AM sends, and the SDK forwards them all to `_pingOneSignals.init()`
17
+ * unvalidated — so extra keys like `customHost` must pass through untouched.
18
+ * @see https://zod.dev/api#zlooseobject (`z.looseObject` — allow unknown keys through)
19
+ * @see https://github.com/ForgeRock/ping-javascript-sdk/blob/@forgerock/protect@2.1.0/packages/protect/src/lib/protect.types.ts#L20 (SDK ProtectConfig — only envId required)
20
+ * @see https://github.com/ForgeRock/ping-javascript-sdk/blob/@forgerock/journey-client@2.1.0/packages/journey-client/src/lib/callbacks/ping-protect-initialize-callback.ts#L38-L49 (AM callback fields we don't list)
21
+ */
22
+ export declare const protectConfigSchema: z.ZodObject<{
23
+ envId: z.ZodString;
24
+ waitForWindowLoad: z.ZodOptional<z.ZodBoolean>;
25
+ hubUrl: z.ZodOptional<z.ZodString>;
26
+ disableHub: z.ZodOptional<z.ZodBoolean>;
27
+ deviceAttributesToIgnore: z.ZodOptional<z.ZodArray<z.ZodString>>;
28
+ behavioralDataCollection: z.ZodOptional<z.ZodBoolean>;
29
+ disableTags: z.ZodOptional<z.ZodBoolean>;
30
+ externalIdentifiers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
31
+ universalDeviceIdentification: z.ZodOptional<z.ZodBoolean>;
32
+ agentIdentification: z.ZodOptional<z.ZodBoolean>;
33
+ agentTimeout: z.ZodOptional<z.ZodNumber>;
34
+ agentPort: z.ZodOptional<z.ZodNumber>;
35
+ consoleLogEnabled: z.ZodOptional<z.ZodBoolean>;
36
+ }, z.core.$loose>;
37
+ /**
38
+ * Schema for callback-provided PingOne Signals initialization options.
39
+ * The Ping JS SDK defines this as an arbitrary string key-value map.
40
+ */
41
+ export declare const signalsInitializationOptionsSchema: z.ZodRecord<z.ZodString, z.ZodString>;
42
+ /**
43
+ * Schema for all supported Protect start config shapes.
44
+ * This replaces the previous manual `'envId' in config` branching.
45
+ */
46
+ export declare const protectStartConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
47
+ envId: z.ZodString;
48
+ waitForWindowLoad: z.ZodOptional<z.ZodBoolean>;
49
+ hubUrl: z.ZodOptional<z.ZodString>;
50
+ disableHub: z.ZodOptional<z.ZodBoolean>;
51
+ deviceAttributesToIgnore: z.ZodOptional<z.ZodArray<z.ZodString>>;
52
+ behavioralDataCollection: z.ZodOptional<z.ZodBoolean>;
53
+ disableTags: z.ZodOptional<z.ZodBoolean>;
54
+ externalIdentifiers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
55
+ universalDeviceIdentification: z.ZodOptional<z.ZodBoolean>;
56
+ agentIdentification: z.ZodOptional<z.ZodBoolean>;
57
+ agentTimeout: z.ZodOptional<z.ZodNumber>;
58
+ agentPort: z.ZodOptional<z.ZodNumber>;
59
+ consoleLogEnabled: z.ZodOptional<z.ZodBoolean>;
60
+ }, z.core.$loose>, z.ZodRecord<z.ZodString, z.ZodString>]>;
61
+ export type ProtectConfig = z.infer<typeof protectConfigSchema>;
62
+ export type ProtectStartConfig = z.infer<typeof protectStartConfigSchema>;
63
+ export interface ProtectStore extends Readable<Protect | null> {
64
+ start: (config: ProtectConfig | SignalsInitializationOptions) => Promise<void | {
65
+ error: string;
66
+ }>;
67
+ getData: () => Promise<string | {
68
+ error: string;
69
+ }>;
70
+ pauseBehavioralData: () => void | {
71
+ error: string;
72
+ };
73
+ resumeBehavioralData: () => void | {
74
+ error: string;
75
+ };
76
+ }
77
+ export declare const protectStore: ProtectStore;