@idsoftsource/initial-process 2.5.3 → 2.5.5

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,14 +1222,43 @@ 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;
1231
1262
  libConfig: LibraryConfig;
1232
1263
  claimForm: FormGroup;
1233
1264
  roles: any[];
@@ -1244,15 +1275,26 @@ declare class ClaimProcessComponent implements OnInit {
1244
1275
  validatePage: number;
1245
1276
  userHasExistingDetails: boolean;
1246
1277
  resetPasswordEnabled: boolean;
1247
- isAuthenticated: boolean;
1248
- existingUserData: any;
1249
1278
  showRoleSelect: boolean;
1279
+ passwordStep: number;
1280
+ otpValue: string;
1281
+ isPasswordChanging: boolean;
1282
+ passwordChangeError: string | null;
1283
+ passwordChangeSuccess: boolean;
1284
+ otpMinutes: number;
1285
+ otpSeconds: number;
1286
+ otpExpired: boolean;
1287
+ canResendOtp: boolean;
1288
+ private otpTotalSeconds;
1289
+ private otpIntervalRef;
1250
1290
  private pendingUserRole;
1251
1291
  private rolesLoaded;
1252
1292
  profileFileName: string;
1253
1293
  profileFile: File | null;
1294
+ profilePreviewUrl: string;
1254
1295
  businessLogoName: string;
1255
1296
  businessLogoFile: File | null;
1297
+ logoPreviewUrl: string;
1256
1298
  model: {
1257
1299
  acceptTerms: boolean;
1258
1300
  privacy: boolean;
@@ -1265,34 +1307,35 @@ declare class ClaimProcessComponent implements OnInit {
1265
1307
  logo: string;
1266
1308
  displayName: string;
1267
1309
  };
1310
+ userId: string | null;
1268
1311
  googleOptions: {
1269
1312
  componentRestrictions: {
1270
1313
  country: string[];
1271
1314
  };
1272
1315
  };
1273
- /** True when the selected role requires business information. */
1274
1316
  get isBusinessRole(): boolean;
1275
- /** Password fields are shown when there are no existing details OR when the reset toggle is on. */
1276
1317
  get showPasswordFields(): boolean;
1277
- constructor(fb: FormBuilder, route: ActivatedRoute, router: Router, userDetailService: UserDetailService, roleService: RolesService, fileService: FileService, modalService: BsModalService, libConfig: LibraryConfig);
1318
+ constructor(fb: FormBuilder, route: ActivatedRoute, router: Router, claimService: ClaimProcessService, modalService: BsModalService, tokenService: TokenService, libConfig: LibraryConfig);
1278
1319
  private static readonly SESSION_KEY;
1279
- ngOnInit(): void;
1320
+ ngOnInit(): Promise<void>;
1280
1321
  get f(): {
1281
1322
  [key: string]: AbstractControl<any, any, any>;
1282
1323
  };
1283
- setPrivacyAndTerms(appType: string): void;
1284
1324
  openModal(template: TemplateRef<any>, title: string, event: Event): void;
1285
1325
  closeModal(): void;
1286
- /** Called when the "I accept" checkbox is toggled directly. */
1287
1326
  onTermsCheckboxChange(event: Event): void;
1288
- lookupUser(email: string): void;
1289
- getInitials(): string;
1290
- getRoles(): void;
1291
1327
  /**
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.
1328
+ * Primary path (ref: initial-process getUser).
1329
+ * Called when token returns a userId fetches the full DB profile and
1330
+ * pre-fills the form so the user can update or complete their profile.
1295
1331
  */
1332
+ private loadUserProfile;
1333
+ /**
1334
+ * Fallback path: invite-link without an active session.
1335
+ * Uses auth0 email lookup when no userId is present in the token.
1336
+ */
1337
+ private lookupUser;
1338
+ getRoles(): void;
1296
1339
  private applyUserRole;
1297
1340
  private updateRoleValidator;
1298
1341
  private updatePasswordValidators;
@@ -1302,11 +1345,17 @@ declare class ClaimProcessComponent implements OnInit {
1302
1345
  onBusinessAddressChange(address: any): void;
1303
1346
  onProfileFileChange(event: Event): void;
1304
1347
  onBusinessLogoChange(event: Event): void;
1348
+ getAssetUrl(relativePath: string): string;
1305
1349
  formatPhone(event: Event): void;
1306
1350
  onSubmit(): Promise<void>;
1307
- private generateGuid;
1308
- private isValidGuid;
1309
- private uploadToAws;
1351
+ private handleSubmitResult;
1352
+ private handleSubmitError;
1353
+ changePassword(isResend?: boolean): void;
1354
+ verifyPasswordOtp(): void;
1355
+ cancelPasswordChange(): void;
1356
+ private startOtpTimer;
1357
+ private stopOtpTimer;
1358
+ ngOnDestroy(): void;
1310
1359
  static ɵfac: i0.ɵɵFactoryDeclaration<ClaimProcessComponent, never>;
1311
1360
  static ɵcmp: i0.ɵɵComponentDeclaration<ClaimProcessComponent, "app-claim-process", never, {}, {}, never, never, false, never>;
1312
1361
  }
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.5",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^20.0.0",
6
6
  "@angular/core": "^20.0.0",