@idsoftsource/initial-process 2.5.3 → 2.5.6

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.
package/index.d.ts CHANGED
@@ -304,6 +304,8 @@ declare class UserDetailService {
304
304
  updateMyProfileData(model: any): Observable<Result>;
305
305
  getUserAccounts(query: any): Observable<GridResult<UserAccountReadModel>>;
306
306
  resetPassword(model: any): Observable<Result>;
307
+ sendOtp(model: any): Observable<Result>;
308
+ verifyOtp(model: any): Observable<Result>;
307
309
  private buildParams;
308
310
  getByUserId(userId: string, query?: any): Observable<UserAccountReadModel>;
309
311
  getAuth0UserDetails(email: string): Observable<any>;
@@ -1220,18 +1222,50 @@ declare class InitialProcessComponent implements OnInit {
1220
1222
  static ɵcmp: i0.ɵɵComponentDeclaration<InitialProcessComponent, "app-initial-process", never, {}, {}, never, never, false, never>;
1221
1223
  }
1222
1224
 
1223
- declare class ClaimProcessComponent implements OnInit {
1224
- private fb;
1225
- private route;
1226
- private router;
1225
+ declare class ClaimProcessService {
1227
1226
  private userDetailService;
1228
1227
  private roleService;
1228
+ private providerService;
1229
1229
  private fileService;
1230
+ constructor(userDetailService: UserDetailService, roleService: RolesService, providerService: ProvidersService, fileService: FileService);
1231
+ getPrivacyConfig(appType: string): PrivacyAndTerms;
1232
+ /** Load existing profile by token userId (ref: initial-process getUser + getByUserId) */
1233
+ getUserById(userId: string): Observable<any>;
1234
+ /** Fallback: auth0 account lookup by email (for invite-link without active session) */
1235
+ lookupUser(email: string): Observable<any>;
1236
+ getRoles(): Observable<any>;
1237
+ uploadFile(file: File, pathPrefix: string): Promise<{
1238
+ fileId: string;
1239
+ publicUrl: string;
1240
+ } | null>;
1241
+ buildAssetUrl(relativePath: string, cloudfrontUrl: any): string;
1242
+ submitExistingUser(val: any, userId: string, selectedRoleId: string, isBusinessRole: boolean, providerId: string, headshotFileId: string | null, headshotUrl: string | null, logoFileId: string | null, logoUrl: string | null): Observable<any>;
1243
+ claimNewUser(val: any, userId: string, providerId: string, isBusinessRole: boolean, headshotFileId: string | null, headshotUrl: string | null, logoFileId: string | null, logoUrl: string | null): Observable<any>;
1244
+ sendOtp(): Observable<any>;
1245
+ verifyOtp(otp: string, proposedPassword: string): Observable<any>;
1246
+ generateGuid(): string;
1247
+ isValidGuid(value: any): boolean;
1248
+ private buildUserDetailModel;
1249
+ private buildProviderPayload;
1250
+ private buildNewUserPayload;
1251
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClaimProcessService, never>;
1252
+ static ɵprov: i0.ɵɵInjectableDeclaration<ClaimProcessService>;
1253
+ }
1254
+
1255
+ declare class ClaimProcessComponent implements OnInit, OnDestroy {
1256
+ private fb;
1257
+ private route;
1258
+ private router;
1259
+ private claimService;
1230
1260
  private modalService;
1261
+ private tokenService;
1262
+ private authLogoutService;
1231
1263
  libConfig: LibraryConfig;
1232
1264
  claimForm: FormGroup;
1233
1265
  roles: any[];
1266
+ isInitializing: boolean;
1234
1267
  noEmailError: boolean;
1268
+ showAccountNotFound: boolean;
1235
1269
  userEmail: string;
1236
1270
  isLoadingUser: boolean;
1237
1271
  isSubmitting: boolean;
@@ -1244,15 +1278,27 @@ declare class ClaimProcessComponent implements OnInit {
1244
1278
  validatePage: number;
1245
1279
  userHasExistingDetails: boolean;
1246
1280
  resetPasswordEnabled: boolean;
1247
- isAuthenticated: boolean;
1248
- existingUserData: any;
1249
1281
  showRoleSelect: boolean;
1282
+ setPasswordEnabled: boolean;
1283
+ passwordStep: number;
1284
+ otpValue: string;
1285
+ isPasswordChanging: boolean;
1286
+ passwordChangeError: string | null;
1287
+ passwordChangeSuccess: boolean;
1288
+ otpMinutes: number;
1289
+ otpSeconds: number;
1290
+ otpExpired: boolean;
1291
+ canResendOtp: boolean;
1292
+ private otpTotalSeconds;
1293
+ private otpIntervalRef;
1250
1294
  private pendingUserRole;
1251
1295
  private rolesLoaded;
1252
1296
  profileFileName: string;
1253
1297
  profileFile: File | null;
1298
+ profilePreviewUrl: string;
1254
1299
  businessLogoName: string;
1255
1300
  businessLogoFile: File | null;
1301
+ logoPreviewUrl: string;
1256
1302
  model: {
1257
1303
  acceptTerms: boolean;
1258
1304
  privacy: boolean;
@@ -1265,48 +1311,59 @@ declare class ClaimProcessComponent implements OnInit {
1265
1311
  logo: string;
1266
1312
  displayName: string;
1267
1313
  };
1314
+ userId: string | null;
1268
1315
  googleOptions: {
1269
1316
  componentRestrictions: {
1270
1317
  country: string[];
1271
1318
  };
1272
1319
  };
1273
- /** True when the selected role requires business information. */
1274
1320
  get isBusinessRole(): boolean;
1275
- /** Password fields are shown when there are no existing details OR when the reset toggle is on. */
1276
1321
  get showPasswordFields(): boolean;
1277
- constructor(fb: FormBuilder, route: ActivatedRoute, router: Router, userDetailService: UserDetailService, roleService: RolesService, fileService: FileService, modalService: BsModalService, libConfig: LibraryConfig);
1322
+ get sectionPersonalDone(): boolean;
1323
+ get sectionAddressDone(): boolean;
1324
+ get sectionRoleDone(): boolean;
1325
+ get sectionPasswordDone(): boolean;
1326
+ get sectionBusinessDone(): boolean;
1327
+ get sectionPhotoDone(): boolean;
1328
+ get overallProgress(): number;
1329
+ constructor(fb: FormBuilder, route: ActivatedRoute, router: Router, claimService: ClaimProcessService, modalService: BsModalService, tokenService: TokenService, authLogoutService: AuthLogoutService, libConfig: LibraryConfig);
1278
1330
  private static readonly SESSION_KEY;
1279
- ngOnInit(): void;
1331
+ ngOnInit(): Promise<void>;
1280
1332
  get f(): {
1281
1333
  [key: string]: AbstractControl<any, any, any>;
1282
1334
  };
1283
- setPrivacyAndTerms(appType: string): void;
1284
1335
  openModal(template: TemplateRef<any>, title: string, event: Event): void;
1285
1336
  closeModal(): void;
1286
- /** Called when the "I accept" checkbox is toggled directly. */
1287
1337
  onTermsCheckboxChange(event: Event): void;
1288
- lookupUser(email: string): void;
1289
- getInitials(): string;
1290
- getRoles(): void;
1291
1338
  /**
1292
- * Matches the user's existing role against the loaded roles list.
1293
- * If the role is missing from the API result it is injected so the
1294
- * dropdown still shows the correct value.
1339
+ * Primary path (ref: initial-process getUser).
1340
+ * Called when token returns a userId fetches the full DB profile and
1341
+ * pre-fills the form so the user can update or complete their profile.
1295
1342
  */
1343
+ private loadUserProfile;
1344
+ getRoles(): void;
1296
1345
  private applyUserRole;
1297
1346
  private updateRoleValidator;
1298
1347
  private updatePasswordValidators;
1348
+ toggleSetPassword(): void;
1299
1349
  private updateBusinessRoleValidators;
1300
1350
  toggleResetPassword(): void;
1301
1351
  onAddressChange(address: any): void;
1302
1352
  onBusinessAddressChange(address: any): void;
1303
1353
  onProfileFileChange(event: Event): void;
1304
1354
  onBusinessLogoChange(event: Event): void;
1355
+ getAssetUrl(relativePath: string): string;
1305
1356
  formatPhone(event: Event): void;
1306
1357
  onSubmit(): Promise<void>;
1307
- private generateGuid;
1308
- private isValidGuid;
1309
- private uploadToAws;
1358
+ private handleSubmitResult;
1359
+ private handleSubmitError;
1360
+ changePassword(isResend?: boolean): void;
1361
+ verifyPasswordOtp(): void;
1362
+ cancelPasswordChange(): void;
1363
+ private startOtpTimer;
1364
+ private stopOtpTimer;
1365
+ logout(): Promise<void>;
1366
+ ngOnDestroy(): void;
1310
1367
  static ɵfac: i0.ɵɵFactoryDeclaration<ClaimProcessComponent, never>;
1311
1368
  static ɵcmp: i0.ɵɵComponentDeclaration<ClaimProcessComponent, "app-claim-process", never, {}, {}, never, never, false, never>;
1312
1369
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idsoftsource/initial-process",
3
- "version": "2.5.3",
3
+ "version": "2.5.6",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^20.0.0",
6
6
  "@angular/core": "^20.0.0",