@smvtech/x-flux 1.1.20 → 1.1.22

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/dist/index.d.mts CHANGED
@@ -80,20 +80,6 @@ declare enum FIX_TYPE {
80
80
  MANUAL = "manual",
81
81
  NONE = "none"
82
82
  }
83
- declare enum ANSWER_STATUS {
84
- ANSWERED = "ANSWERED",
85
- APPROVED = "APPROVED",
86
- REJECTED = "REJECTED",
87
- NA = "NA",
88
- UNSTARTED = "UNSTARTED",
89
- PENDING = "PENDING"
90
- }
91
- declare enum ASSET_STATUS {
92
- ANSWERED = "ANSWERED",
93
- APPROVED = "APPROVED",
94
- REJECTED = "REJECTED",
95
- DELETED = "DELETED"
96
- }
97
83
  declare const QuestionnaireSchema: z.ZodObject<{
98
84
  questionsWithRank: z.ZodArray<z.ZodObject<{
99
85
  id: z.ZodString;
@@ -116,6 +102,7 @@ declare const QuestionnaireSchema: z.ZodObject<{
116
102
  is_root: z.ZodBoolean;
117
103
  type: z.ZodNativeEnum<typeof QUESTION_TYPE>;
118
104
  doc_type: z.ZodOptional<z.ZodNativeEnum<typeof DOC_TYPES>>;
105
+ automation_label: z.ZodOptional<z.ZodString>;
119
106
  renders: z.ZodArray<z.ZodObject<{
120
107
  operation: z.ZodString;
121
108
  value: z.ZodString;
@@ -145,6 +132,7 @@ declare const QuestionnaireSchema: z.ZodObject<{
145
132
  question_ids: string[];
146
133
  }[];
147
134
  doc_type?: DOC_TYPES | undefined;
135
+ automation_label?: string | undefined;
148
136
  }, {
149
137
  options: string[];
150
138
  type: QUESTION_TYPE;
@@ -161,6 +149,7 @@ declare const QuestionnaireSchema: z.ZodObject<{
161
149
  question_ids: string[];
162
150
  }[];
163
151
  doc_type?: DOC_TYPES | undefined;
152
+ automation_label?: string | undefined;
164
153
  }>>;
165
154
  }, "strip", z.ZodTypeAny, {
166
155
  questionsWithRank: {
@@ -183,6 +172,7 @@ declare const QuestionnaireSchema: z.ZodObject<{
183
172
  question_ids: string[];
184
173
  }[];
185
174
  doc_type?: DOC_TYPES | undefined;
175
+ automation_label?: string | undefined;
186
176
  }>;
187
177
  }, {
188
178
  questionsWithRank: {
@@ -205,6 +195,7 @@ declare const QuestionnaireSchema: z.ZodObject<{
205
195
  question_ids: string[];
206
196
  }[];
207
197
  doc_type?: DOC_TYPES | undefined;
198
+ automation_label?: string | undefined;
208
199
  }>;
209
200
  }>;
210
201
  declare const ApplicationSchema: z.ZodObject<{
@@ -382,19 +373,19 @@ declare const AnswerSchema: z.ZodObject<{
382
373
  assets_id: z.ZodArray<z.ZodObject<{
383
374
  doc_id: z.ZodString;
384
375
  issue_reason: z.ZodNullable<z.ZodString>;
385
- status: z.ZodNativeEnum<typeof ASSET_STATUS>;
376
+ status: z.ZodEnum<["ANSWERED", "APPROVED", "REJECTED", "DELETED"]>;
386
377
  }, "strip", z.ZodTypeAny, {
387
- status: ASSET_STATUS;
378
+ status: "ANSWERED" | "APPROVED" | "REJECTED" | "DELETED";
388
379
  doc_id: string;
389
380
  issue_reason: string | null;
390
381
  }, {
391
- status: ASSET_STATUS;
382
+ status: "ANSWERED" | "APPROVED" | "REJECTED" | "DELETED";
392
383
  doc_id: string;
393
384
  issue_reason: string | null;
394
385
  }>, "many">;
395
386
  answer: z.ZodArray<z.ZodString, "many">;
396
387
  issue_reason: z.ZodNullable<z.ZodString>;
397
- status: z.ZodNativeEnum<typeof ANSWER_STATUS>;
388
+ status: z.ZodEnum<["ANSWERED", "APPROVED", "REJECTED", "NA", "UNSTARTED", "PENDING"]>;
398
389
  is_deleted: z.ZodBoolean;
399
390
  visa_order_id: z.ZodString;
400
391
  validations: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -420,7 +411,7 @@ declare const AnswerSchema: z.ZodObject<{
420
411
  created_at: z.ZodString;
421
412
  updated_at: z.ZodString;
422
413
  }, "strip", z.ZodTypeAny, {
423
- status: ANSWER_STATUS;
414
+ status: "NA" | "ANSWERED" | "APPROVED" | "REJECTED" | "UNSTARTED" | "PENDING";
424
415
  _id: string;
425
416
  visa_order_id: string;
426
417
  created_at: string;
@@ -431,7 +422,7 @@ declare const AnswerSchema: z.ZodObject<{
431
422
  visa_questions_id: string;
432
423
  traveller_id: string;
433
424
  assets_id: {
434
- status: ASSET_STATUS;
425
+ status: "ANSWERED" | "APPROVED" | "REJECTED" | "DELETED";
435
426
  doc_id: string;
436
427
  issue_reason: string | null;
437
428
  }[];
@@ -445,7 +436,7 @@ declare const AnswerSchema: z.ZodObject<{
445
436
  time_saved: number;
446
437
  }[] | undefined;
447
438
  }, {
448
- status: ANSWER_STATUS;
439
+ status: "NA" | "ANSWERED" | "APPROVED" | "REJECTED" | "UNSTARTED" | "PENDING";
449
440
  _id: string;
450
441
  visa_order_id: string;
451
442
  created_at: string;
@@ -456,7 +447,7 @@ declare const AnswerSchema: z.ZodObject<{
456
447
  visa_questions_id: string;
457
448
  traveller_id: string;
458
449
  assets_id: {
459
- status: ASSET_STATUS;
450
+ status: "ANSWERED" | "APPROVED" | "REJECTED" | "DELETED";
460
451
  doc_id: string;
461
452
  issue_reason: string | null;
462
453
  }[];
@@ -5449,8 +5440,6 @@ type TUpdateAnswerPayload = {
5449
5440
  answer: string;
5450
5441
  traveller_id: string;
5451
5442
  file?: File | Blob | string | null;
5452
- autoApproveAnswers?: boolean;
5453
- forceRunValidations?: boolean;
5454
5443
  };
5455
5444
  type TUploadProgressEvent = {
5456
5445
  percent: number;
@@ -5475,23 +5464,7 @@ type ValidationResult = {
5475
5464
  perfect: ValidationResultGroup;
5476
5465
  totalTimeSaved: number;
5477
5466
  } | null;
5478
- type TQuestionRenderInfo = {
5479
- status: ANSWER_STATUS;
5480
- rejectionReasons: string[];
5481
- rejectedAssets: {
5482
- doc_id: string;
5483
- reason: string;
5484
- }[];
5485
- validationResult: ValidationResult;
5486
- };
5487
- type TQuestionValidationEntry = TQuestionRenderInfo & {
5488
- name: string;
5489
- };
5490
5467
 
5491
- declare enum EDCFormMode {
5492
- CREATE = "CREATE",
5493
- FIX = "FIX"
5494
- }
5495
5468
  type TEDCFlowContext = {
5496
5469
  orderId: string | null;
5497
5470
  order: TVisaOrder | null;
@@ -5502,7 +5475,6 @@ type TEDCFlowContext = {
5502
5475
  loading: boolean;
5503
5476
  error: string | null;
5504
5477
  success: string | null;
5505
- mode: EDCFormMode;
5506
5478
  refreshOrder: () => Promise<void>;
5507
5479
  refreshApplicant: (application_id: string) => Promise<void>;
5508
5480
  addApplicant: (payload: TAddTravellerPayload) => Promise<TEDCApplicant | null>;
@@ -5512,12 +5484,11 @@ type TEDCFlowContext = {
5512
5484
  acceptOrderQCTermsAndConditions: () => Promise<void>;
5513
5485
  runAllValidations: () => Promise<void>;
5514
5486
  runApplicantValidations: (applicationId: string) => Promise<void>;
5515
- applyAutoFix: (applicationId: string, answerId: string, force_fix?: boolean) => Promise<void>;
5487
+ applyAutoFix: (applicationId: string, answerId: string) => Promise<void>;
5516
5488
  };
5517
5489
  type TEDCFlowProviderProps = {
5518
5490
  children: ReactNode;
5519
5491
  orderId: string;
5520
- mode?: EDCFormMode;
5521
5492
  };
5522
5493
  declare const EDCFlowProvider: react__default.FC<TEDCFlowProviderProps>;
5523
5494
  declare const useEDCFlow: () => TEDCFlowContext;
@@ -5533,13 +5504,25 @@ declare function getSignedUrlFromAsset(docId: string): Promise<string | null>;
5533
5504
  declare function getDisplayableQuestions(questions: TEDCApplicant["questions"], questionAnswerSources: ANSWER_SOURCE[]): TEDCApplicant["questions"];
5534
5505
  declare function getDisplayableDocuments(questions: TEDCApplicant["questions"], documentAnswerSources: ANSWER_SOURCE[]): TEDCApplicant["questions"];
5535
5506
  declare function getValidationErrors(validations?: TAnswer["validations"] | null): ValidationResult;
5536
- declare function getValidationResult(question: TEDCApplicant["questions"][0]): TQuestionRenderInfo;
5537
- declare function validateApplicantQuestions(applicant: TEDCApplicant, questionAnswerSources: ANSWER_SOURCE[]): TQuestionValidationEntry[];
5538
- declare function validateApplicantDocuments(applicant: TEDCApplicant, documentAnswerSources: ANSWER_SOURCE[]): TQuestionValidationEntry[];
5507
+ declare function getValidationResult(question: TEDCApplicant["questions"][0]): ValidationResult;
5508
+ declare function validateApplicantQuestions(applicant: TEDCApplicant, questionAnswerSources: ANSWER_SOURCE[]): Array<{
5509
+ name: string;
5510
+ validationResult: ValidationResult;
5511
+ }>;
5512
+ declare function validateApplicantDocuments(applicant: TEDCApplicant, documentAnswerSources: ANSWER_SOURCE[]): Array<{
5513
+ name: string;
5514
+ validationResult: ValidationResult;
5515
+ }>;
5539
5516
  declare function validateApplicant(applicant: TEDCApplicant, questionAnswerSources: ANSWER_SOURCE[], documentAnswerSources: ANSWER_SOURCE[]): {
5540
5517
  isComplete: boolean;
5541
- questionValidations: TQuestionValidationEntry[];
5542
- documentValidations: TQuestionValidationEntry[];
5518
+ questionValidations: Array<{
5519
+ name: string;
5520
+ validationResult: ValidationResult;
5521
+ }>;
5522
+ documentValidations: Array<{
5523
+ name: string;
5524
+ validationResult: ValidationResult;
5525
+ }>;
5543
5526
  applicantValidations: ValidationResult;
5544
5527
  };
5545
5528
  declare function validateAllApplicants(applicants: Record<string, TEDCApplicant> | TEDCApplicant[], questionAnswerSources: ANSWER_SOURCE[], documentAnswerSources: ANSWER_SOURCE[]): {
@@ -5547,8 +5530,14 @@ declare function validateAllApplicants(applicants: Record<string, TEDCApplicant>
5547
5530
  applicantValidations: Array<{
5548
5531
  applicantId: string;
5549
5532
  applicantName: string;
5550
- questionValidations: TQuestionValidationEntry[];
5551
- documentValidations: TQuestionValidationEntry[];
5533
+ questionValidations: Array<{
5534
+ name: string;
5535
+ validationResult: ValidationResult;
5536
+ }>;
5537
+ documentValidations: Array<{
5538
+ name: string;
5539
+ validationResult: ValidationResult;
5540
+ }>;
5552
5541
  applicantValidations: ValidationResult;
5553
5542
  }>;
5554
5543
  };
@@ -5558,13 +5547,18 @@ declare function validateOrder(order: TVisaOrder | null | undefined, applicants:
5558
5547
  applicantValidations: Array<{
5559
5548
  applicantId: string;
5560
5549
  applicantName: string;
5561
- questionValidations: TQuestionValidationEntry[];
5562
- documentValidations: TQuestionValidationEntry[];
5550
+ questionValidations: Array<{
5551
+ name: string;
5552
+ validationResult: ValidationResult;
5553
+ }>;
5554
+ documentValidations: Array<{
5555
+ name: string;
5556
+ validationResult: ValidationResult;
5557
+ }>;
5563
5558
  applicantValidations: ValidationResult;
5564
5559
  }>;
5565
5560
  };
5566
5561
  declare function getFixTypeFromFixableItems(fixableItems: ValidationItem[]): FIX_TYPE;
5567
- declare function getQuestionRenderInfo(question: TQuestionWithAnswer): TQuestionRenderInfo;
5568
5562
 
5569
5563
  declare const initializeEDCFlow: (config: EDCConfig) => void;
5570
5564
  declare const EDCFlow: {
@@ -5572,7 +5566,6 @@ declare const EDCFlow: {
5572
5566
  Provider: react.FC<{
5573
5567
  children: react.ReactNode;
5574
5568
  orderId: string;
5575
- mode?: EDCFormMode;
5576
5569
  }>;
5577
5570
  useEDCFlow: () => {
5578
5571
  orderId: string | null;
@@ -5584,7 +5577,6 @@ declare const EDCFlow: {
5584
5577
  loading: boolean;
5585
5578
  error: string | null;
5586
5579
  success: string | null;
5587
- mode: EDCFormMode;
5588
5580
  refreshOrder: () => Promise<void>;
5589
5581
  refreshApplicant: (application_id: string) => Promise<void>;
5590
5582
  addApplicant: (payload: TAddTravellerPayload) => Promise<TEDCApplicant | null>;
@@ -5594,8 +5586,8 @@ declare const EDCFlow: {
5594
5586
  acceptOrderQCTermsAndConditions: () => Promise<void>;
5595
5587
  runAllValidations: () => Promise<void>;
5596
5588
  runApplicantValidations: (applicationId: string) => Promise<void>;
5597
- applyAutoFix: (applicationId: string, answerId: string, force_fix?: boolean) => Promise<void>;
5589
+ applyAutoFix: (applicationId: string, answerId: string) => Promise<void>;
5598
5590
  };
5599
5591
  };
5600
5592
 
5601
- export { ANSWER_SOURCE, ANSWER_STATUS, APPLICATION_STATUS, APPLICATION_TAGS, ASSET_STATUS, AnswerSchema, type ApiResponse, ApplicationSchema, DOC_TYPES, type EDCConfig, EDCFlowProvider, EDCFormMode, FIX_TYPE, INTERNAL_ORDER_TAGS, PROCESSING_BLOCKED_ON_PAYMENT_STATUS, QUESTION_TYPE, QuestionnaireSchema, TA_QC_EXTRACTION_STATUS, type TAddTravellerPayload, type TAnswer, type TEDCApplicant, TIMELINE_STEP, type TQuestionRenderInfo, type TQuestionValidationEntry, type TQuestionWithAnswer, type TQuestionnaire, type TRenderRule, type TTraveller, type TUpdateAnswerPayload, type TUpdateTravellerPayload, type TUploadProgressEvent, type TVisaOrder, TimelinePaymentStatus, TravellerSchema, type UploadProgressEvent, VALIDATION_STATUS, VISA_TYPE_INTERNAL_TAGS, type ValidationItem, type ValidationResult, type ValidationResultGroup, createAllQuestionsWithAnswers, createApplicantData, EDCFlow as default, filterConditionalQuestions, formatAnswerFromResponse, formatTravellerFromResponse, getDisplayableDocuments, getDisplayableQuestions, getFixTypeFromFixableItems, getQuestionRenderInfo, getSignedUrlFromAsset, getValidationErrors, getValidationResult, getVisibleQuestions, initializeEDCFlow, updateApplicantWithAnswer, useEDCFlow, validateAllApplicants, validateApplicant, validateApplicantDocuments, validateApplicantQuestions, validateOrder };
5593
+ export { ANSWER_SOURCE, APPLICATION_STATUS, APPLICATION_TAGS, AnswerSchema, type ApiResponse, ApplicationSchema, DOC_TYPES, type EDCConfig, EDCFlowProvider, FIX_TYPE, INTERNAL_ORDER_TAGS, PROCESSING_BLOCKED_ON_PAYMENT_STATUS, QUESTION_TYPE, QuestionnaireSchema, TA_QC_EXTRACTION_STATUS, type TAddTravellerPayload, type TAnswer, type TEDCApplicant, TIMELINE_STEP, type TQuestionWithAnswer, type TQuestionnaire, type TRenderRule, type TTraveller, type TUpdateAnswerPayload, type TUpdateTravellerPayload, type TUploadProgressEvent, type TVisaOrder, TimelinePaymentStatus, TravellerSchema, type UploadProgressEvent, VALIDATION_STATUS, VISA_TYPE_INTERNAL_TAGS, type ValidationItem, type ValidationResult, type ValidationResultGroup, createAllQuestionsWithAnswers, createApplicantData, EDCFlow as default, filterConditionalQuestions, formatAnswerFromResponse, formatTravellerFromResponse, getDisplayableDocuments, getDisplayableQuestions, getFixTypeFromFixableItems, getSignedUrlFromAsset, getValidationErrors, getValidationResult, getVisibleQuestions, initializeEDCFlow, updateApplicantWithAnswer, useEDCFlow, validateAllApplicants, validateApplicant, validateApplicantDocuments, validateApplicantQuestions, validateOrder };
package/dist/index.d.ts CHANGED
@@ -80,20 +80,6 @@ declare enum FIX_TYPE {
80
80
  MANUAL = "manual",
81
81
  NONE = "none"
82
82
  }
83
- declare enum ANSWER_STATUS {
84
- ANSWERED = "ANSWERED",
85
- APPROVED = "APPROVED",
86
- REJECTED = "REJECTED",
87
- NA = "NA",
88
- UNSTARTED = "UNSTARTED",
89
- PENDING = "PENDING"
90
- }
91
- declare enum ASSET_STATUS {
92
- ANSWERED = "ANSWERED",
93
- APPROVED = "APPROVED",
94
- REJECTED = "REJECTED",
95
- DELETED = "DELETED"
96
- }
97
83
  declare const QuestionnaireSchema: z.ZodObject<{
98
84
  questionsWithRank: z.ZodArray<z.ZodObject<{
99
85
  id: z.ZodString;
@@ -116,6 +102,7 @@ declare const QuestionnaireSchema: z.ZodObject<{
116
102
  is_root: z.ZodBoolean;
117
103
  type: z.ZodNativeEnum<typeof QUESTION_TYPE>;
118
104
  doc_type: z.ZodOptional<z.ZodNativeEnum<typeof DOC_TYPES>>;
105
+ automation_label: z.ZodOptional<z.ZodString>;
119
106
  renders: z.ZodArray<z.ZodObject<{
120
107
  operation: z.ZodString;
121
108
  value: z.ZodString;
@@ -145,6 +132,7 @@ declare const QuestionnaireSchema: z.ZodObject<{
145
132
  question_ids: string[];
146
133
  }[];
147
134
  doc_type?: DOC_TYPES | undefined;
135
+ automation_label?: string | undefined;
148
136
  }, {
149
137
  options: string[];
150
138
  type: QUESTION_TYPE;
@@ -161,6 +149,7 @@ declare const QuestionnaireSchema: z.ZodObject<{
161
149
  question_ids: string[];
162
150
  }[];
163
151
  doc_type?: DOC_TYPES | undefined;
152
+ automation_label?: string | undefined;
164
153
  }>>;
165
154
  }, "strip", z.ZodTypeAny, {
166
155
  questionsWithRank: {
@@ -183,6 +172,7 @@ declare const QuestionnaireSchema: z.ZodObject<{
183
172
  question_ids: string[];
184
173
  }[];
185
174
  doc_type?: DOC_TYPES | undefined;
175
+ automation_label?: string | undefined;
186
176
  }>;
187
177
  }, {
188
178
  questionsWithRank: {
@@ -205,6 +195,7 @@ declare const QuestionnaireSchema: z.ZodObject<{
205
195
  question_ids: string[];
206
196
  }[];
207
197
  doc_type?: DOC_TYPES | undefined;
198
+ automation_label?: string | undefined;
208
199
  }>;
209
200
  }>;
210
201
  declare const ApplicationSchema: z.ZodObject<{
@@ -382,19 +373,19 @@ declare const AnswerSchema: z.ZodObject<{
382
373
  assets_id: z.ZodArray<z.ZodObject<{
383
374
  doc_id: z.ZodString;
384
375
  issue_reason: z.ZodNullable<z.ZodString>;
385
- status: z.ZodNativeEnum<typeof ASSET_STATUS>;
376
+ status: z.ZodEnum<["ANSWERED", "APPROVED", "REJECTED", "DELETED"]>;
386
377
  }, "strip", z.ZodTypeAny, {
387
- status: ASSET_STATUS;
378
+ status: "ANSWERED" | "APPROVED" | "REJECTED" | "DELETED";
388
379
  doc_id: string;
389
380
  issue_reason: string | null;
390
381
  }, {
391
- status: ASSET_STATUS;
382
+ status: "ANSWERED" | "APPROVED" | "REJECTED" | "DELETED";
392
383
  doc_id: string;
393
384
  issue_reason: string | null;
394
385
  }>, "many">;
395
386
  answer: z.ZodArray<z.ZodString, "many">;
396
387
  issue_reason: z.ZodNullable<z.ZodString>;
397
- status: z.ZodNativeEnum<typeof ANSWER_STATUS>;
388
+ status: z.ZodEnum<["ANSWERED", "APPROVED", "REJECTED", "NA", "UNSTARTED", "PENDING"]>;
398
389
  is_deleted: z.ZodBoolean;
399
390
  visa_order_id: z.ZodString;
400
391
  validations: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -420,7 +411,7 @@ declare const AnswerSchema: z.ZodObject<{
420
411
  created_at: z.ZodString;
421
412
  updated_at: z.ZodString;
422
413
  }, "strip", z.ZodTypeAny, {
423
- status: ANSWER_STATUS;
414
+ status: "NA" | "ANSWERED" | "APPROVED" | "REJECTED" | "UNSTARTED" | "PENDING";
424
415
  _id: string;
425
416
  visa_order_id: string;
426
417
  created_at: string;
@@ -431,7 +422,7 @@ declare const AnswerSchema: z.ZodObject<{
431
422
  visa_questions_id: string;
432
423
  traveller_id: string;
433
424
  assets_id: {
434
- status: ASSET_STATUS;
425
+ status: "ANSWERED" | "APPROVED" | "REJECTED" | "DELETED";
435
426
  doc_id: string;
436
427
  issue_reason: string | null;
437
428
  }[];
@@ -445,7 +436,7 @@ declare const AnswerSchema: z.ZodObject<{
445
436
  time_saved: number;
446
437
  }[] | undefined;
447
438
  }, {
448
- status: ANSWER_STATUS;
439
+ status: "NA" | "ANSWERED" | "APPROVED" | "REJECTED" | "UNSTARTED" | "PENDING";
449
440
  _id: string;
450
441
  visa_order_id: string;
451
442
  created_at: string;
@@ -456,7 +447,7 @@ declare const AnswerSchema: z.ZodObject<{
456
447
  visa_questions_id: string;
457
448
  traveller_id: string;
458
449
  assets_id: {
459
- status: ASSET_STATUS;
450
+ status: "ANSWERED" | "APPROVED" | "REJECTED" | "DELETED";
460
451
  doc_id: string;
461
452
  issue_reason: string | null;
462
453
  }[];
@@ -5449,8 +5440,6 @@ type TUpdateAnswerPayload = {
5449
5440
  answer: string;
5450
5441
  traveller_id: string;
5451
5442
  file?: File | Blob | string | null;
5452
- autoApproveAnswers?: boolean;
5453
- forceRunValidations?: boolean;
5454
5443
  };
5455
5444
  type TUploadProgressEvent = {
5456
5445
  percent: number;
@@ -5475,23 +5464,7 @@ type ValidationResult = {
5475
5464
  perfect: ValidationResultGroup;
5476
5465
  totalTimeSaved: number;
5477
5466
  } | null;
5478
- type TQuestionRenderInfo = {
5479
- status: ANSWER_STATUS;
5480
- rejectionReasons: string[];
5481
- rejectedAssets: {
5482
- doc_id: string;
5483
- reason: string;
5484
- }[];
5485
- validationResult: ValidationResult;
5486
- };
5487
- type TQuestionValidationEntry = TQuestionRenderInfo & {
5488
- name: string;
5489
- };
5490
5467
 
5491
- declare enum EDCFormMode {
5492
- CREATE = "CREATE",
5493
- FIX = "FIX"
5494
- }
5495
5468
  type TEDCFlowContext = {
5496
5469
  orderId: string | null;
5497
5470
  order: TVisaOrder | null;
@@ -5502,7 +5475,6 @@ type TEDCFlowContext = {
5502
5475
  loading: boolean;
5503
5476
  error: string | null;
5504
5477
  success: string | null;
5505
- mode: EDCFormMode;
5506
5478
  refreshOrder: () => Promise<void>;
5507
5479
  refreshApplicant: (application_id: string) => Promise<void>;
5508
5480
  addApplicant: (payload: TAddTravellerPayload) => Promise<TEDCApplicant | null>;
@@ -5512,12 +5484,11 @@ type TEDCFlowContext = {
5512
5484
  acceptOrderQCTermsAndConditions: () => Promise<void>;
5513
5485
  runAllValidations: () => Promise<void>;
5514
5486
  runApplicantValidations: (applicationId: string) => Promise<void>;
5515
- applyAutoFix: (applicationId: string, answerId: string, force_fix?: boolean) => Promise<void>;
5487
+ applyAutoFix: (applicationId: string, answerId: string) => Promise<void>;
5516
5488
  };
5517
5489
  type TEDCFlowProviderProps = {
5518
5490
  children: ReactNode;
5519
5491
  orderId: string;
5520
- mode?: EDCFormMode;
5521
5492
  };
5522
5493
  declare const EDCFlowProvider: react__default.FC<TEDCFlowProviderProps>;
5523
5494
  declare const useEDCFlow: () => TEDCFlowContext;
@@ -5533,13 +5504,25 @@ declare function getSignedUrlFromAsset(docId: string): Promise<string | null>;
5533
5504
  declare function getDisplayableQuestions(questions: TEDCApplicant["questions"], questionAnswerSources: ANSWER_SOURCE[]): TEDCApplicant["questions"];
5534
5505
  declare function getDisplayableDocuments(questions: TEDCApplicant["questions"], documentAnswerSources: ANSWER_SOURCE[]): TEDCApplicant["questions"];
5535
5506
  declare function getValidationErrors(validations?: TAnswer["validations"] | null): ValidationResult;
5536
- declare function getValidationResult(question: TEDCApplicant["questions"][0]): TQuestionRenderInfo;
5537
- declare function validateApplicantQuestions(applicant: TEDCApplicant, questionAnswerSources: ANSWER_SOURCE[]): TQuestionValidationEntry[];
5538
- declare function validateApplicantDocuments(applicant: TEDCApplicant, documentAnswerSources: ANSWER_SOURCE[]): TQuestionValidationEntry[];
5507
+ declare function getValidationResult(question: TEDCApplicant["questions"][0]): ValidationResult;
5508
+ declare function validateApplicantQuestions(applicant: TEDCApplicant, questionAnswerSources: ANSWER_SOURCE[]): Array<{
5509
+ name: string;
5510
+ validationResult: ValidationResult;
5511
+ }>;
5512
+ declare function validateApplicantDocuments(applicant: TEDCApplicant, documentAnswerSources: ANSWER_SOURCE[]): Array<{
5513
+ name: string;
5514
+ validationResult: ValidationResult;
5515
+ }>;
5539
5516
  declare function validateApplicant(applicant: TEDCApplicant, questionAnswerSources: ANSWER_SOURCE[], documentAnswerSources: ANSWER_SOURCE[]): {
5540
5517
  isComplete: boolean;
5541
- questionValidations: TQuestionValidationEntry[];
5542
- documentValidations: TQuestionValidationEntry[];
5518
+ questionValidations: Array<{
5519
+ name: string;
5520
+ validationResult: ValidationResult;
5521
+ }>;
5522
+ documentValidations: Array<{
5523
+ name: string;
5524
+ validationResult: ValidationResult;
5525
+ }>;
5543
5526
  applicantValidations: ValidationResult;
5544
5527
  };
5545
5528
  declare function validateAllApplicants(applicants: Record<string, TEDCApplicant> | TEDCApplicant[], questionAnswerSources: ANSWER_SOURCE[], documentAnswerSources: ANSWER_SOURCE[]): {
@@ -5547,8 +5530,14 @@ declare function validateAllApplicants(applicants: Record<string, TEDCApplicant>
5547
5530
  applicantValidations: Array<{
5548
5531
  applicantId: string;
5549
5532
  applicantName: string;
5550
- questionValidations: TQuestionValidationEntry[];
5551
- documentValidations: TQuestionValidationEntry[];
5533
+ questionValidations: Array<{
5534
+ name: string;
5535
+ validationResult: ValidationResult;
5536
+ }>;
5537
+ documentValidations: Array<{
5538
+ name: string;
5539
+ validationResult: ValidationResult;
5540
+ }>;
5552
5541
  applicantValidations: ValidationResult;
5553
5542
  }>;
5554
5543
  };
@@ -5558,13 +5547,18 @@ declare function validateOrder(order: TVisaOrder | null | undefined, applicants:
5558
5547
  applicantValidations: Array<{
5559
5548
  applicantId: string;
5560
5549
  applicantName: string;
5561
- questionValidations: TQuestionValidationEntry[];
5562
- documentValidations: TQuestionValidationEntry[];
5550
+ questionValidations: Array<{
5551
+ name: string;
5552
+ validationResult: ValidationResult;
5553
+ }>;
5554
+ documentValidations: Array<{
5555
+ name: string;
5556
+ validationResult: ValidationResult;
5557
+ }>;
5563
5558
  applicantValidations: ValidationResult;
5564
5559
  }>;
5565
5560
  };
5566
5561
  declare function getFixTypeFromFixableItems(fixableItems: ValidationItem[]): FIX_TYPE;
5567
- declare function getQuestionRenderInfo(question: TQuestionWithAnswer): TQuestionRenderInfo;
5568
5562
 
5569
5563
  declare const initializeEDCFlow: (config: EDCConfig) => void;
5570
5564
  declare const EDCFlow: {
@@ -5572,7 +5566,6 @@ declare const EDCFlow: {
5572
5566
  Provider: react.FC<{
5573
5567
  children: react.ReactNode;
5574
5568
  orderId: string;
5575
- mode?: EDCFormMode;
5576
5569
  }>;
5577
5570
  useEDCFlow: () => {
5578
5571
  orderId: string | null;
@@ -5584,7 +5577,6 @@ declare const EDCFlow: {
5584
5577
  loading: boolean;
5585
5578
  error: string | null;
5586
5579
  success: string | null;
5587
- mode: EDCFormMode;
5588
5580
  refreshOrder: () => Promise<void>;
5589
5581
  refreshApplicant: (application_id: string) => Promise<void>;
5590
5582
  addApplicant: (payload: TAddTravellerPayload) => Promise<TEDCApplicant | null>;
@@ -5594,8 +5586,8 @@ declare const EDCFlow: {
5594
5586
  acceptOrderQCTermsAndConditions: () => Promise<void>;
5595
5587
  runAllValidations: () => Promise<void>;
5596
5588
  runApplicantValidations: (applicationId: string) => Promise<void>;
5597
- applyAutoFix: (applicationId: string, answerId: string, force_fix?: boolean) => Promise<void>;
5589
+ applyAutoFix: (applicationId: string, answerId: string) => Promise<void>;
5598
5590
  };
5599
5591
  };
5600
5592
 
5601
- export { ANSWER_SOURCE, ANSWER_STATUS, APPLICATION_STATUS, APPLICATION_TAGS, ASSET_STATUS, AnswerSchema, type ApiResponse, ApplicationSchema, DOC_TYPES, type EDCConfig, EDCFlowProvider, EDCFormMode, FIX_TYPE, INTERNAL_ORDER_TAGS, PROCESSING_BLOCKED_ON_PAYMENT_STATUS, QUESTION_TYPE, QuestionnaireSchema, TA_QC_EXTRACTION_STATUS, type TAddTravellerPayload, type TAnswer, type TEDCApplicant, TIMELINE_STEP, type TQuestionRenderInfo, type TQuestionValidationEntry, type TQuestionWithAnswer, type TQuestionnaire, type TRenderRule, type TTraveller, type TUpdateAnswerPayload, type TUpdateTravellerPayload, type TUploadProgressEvent, type TVisaOrder, TimelinePaymentStatus, TravellerSchema, type UploadProgressEvent, VALIDATION_STATUS, VISA_TYPE_INTERNAL_TAGS, type ValidationItem, type ValidationResult, type ValidationResultGroup, createAllQuestionsWithAnswers, createApplicantData, EDCFlow as default, filterConditionalQuestions, formatAnswerFromResponse, formatTravellerFromResponse, getDisplayableDocuments, getDisplayableQuestions, getFixTypeFromFixableItems, getQuestionRenderInfo, getSignedUrlFromAsset, getValidationErrors, getValidationResult, getVisibleQuestions, initializeEDCFlow, updateApplicantWithAnswer, useEDCFlow, validateAllApplicants, validateApplicant, validateApplicantDocuments, validateApplicantQuestions, validateOrder };
5593
+ export { ANSWER_SOURCE, APPLICATION_STATUS, APPLICATION_TAGS, AnswerSchema, type ApiResponse, ApplicationSchema, DOC_TYPES, type EDCConfig, EDCFlowProvider, FIX_TYPE, INTERNAL_ORDER_TAGS, PROCESSING_BLOCKED_ON_PAYMENT_STATUS, QUESTION_TYPE, QuestionnaireSchema, TA_QC_EXTRACTION_STATUS, type TAddTravellerPayload, type TAnswer, type TEDCApplicant, TIMELINE_STEP, type TQuestionWithAnswer, type TQuestionnaire, type TRenderRule, type TTraveller, type TUpdateAnswerPayload, type TUpdateTravellerPayload, type TUploadProgressEvent, type TVisaOrder, TimelinePaymentStatus, TravellerSchema, type UploadProgressEvent, VALIDATION_STATUS, VISA_TYPE_INTERNAL_TAGS, type ValidationItem, type ValidationResult, type ValidationResultGroup, createAllQuestionsWithAnswers, createApplicantData, EDCFlow as default, filterConditionalQuestions, formatAnswerFromResponse, formatTravellerFromResponse, getDisplayableDocuments, getDisplayableQuestions, getFixTypeFromFixableItems, getSignedUrlFromAsset, getValidationErrors, getValidationResult, getVisibleQuestions, initializeEDCFlow, updateApplicantWithAnswer, useEDCFlow, validateAllApplicants, validateApplicant, validateApplicantDocuments, validateApplicantQuestions, validateOrder };