@socotra/ec-react-utils 2.16.0-next.1 → 2.16.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.
package/dist/index.d.ts CHANGED
@@ -31,7 +31,7 @@ import { z } from 'zod';
31
31
  */
32
32
  declare type AccountRequestAdvancedFields = z.infer<typeof advancedFieldSchema_2>;
33
33
 
34
- declare const advancedFieldSchema: z.ZodRecord<z.ZodEnum<["currency", "timezone", "billingLevel", "billingTrigger", "durationBasis", "delinquencyPlanName", "autoRenewalPlanName", "installmentPlanName"]>, z.ZodOptional<z.ZodString>>;
34
+ declare const advancedFieldSchema: z.ZodRecord<z.ZodEnum<["billingLevel", "billingTrigger", "durationBasis", "delinquencyPlanName", "autoRenewalPlanName"]>, z.ZodOptional<z.ZodString>>;
35
35
 
36
36
  declare const advancedFieldSchema_2: z.ZodObject<{
37
37
  autoRenewalPlanName: z.ZodOptional<z.ZodString>;
@@ -42,18 +42,18 @@ declare const advancedFieldSchema_2: z.ZodObject<{
42
42
  invoiceDocument: z.ZodOptional<z.ZodString>;
43
43
  installmentPlanName: z.ZodOptional<z.ZodString>;
44
44
  }, "strip", z.ZodTypeAny, {
45
+ installmentPlanName?: string | undefined;
45
46
  billingLevel?: "account" | "policy" | undefined;
46
47
  delinquencyPlanName?: string | undefined;
47
48
  autoRenewalPlanName?: string | undefined;
48
- installmentPlanName?: string | undefined;
49
49
  shortfallTolerancePlanName?: string | undefined;
50
50
  excessCreditPlanName?: string | undefined;
51
51
  invoiceDocument?: string | undefined;
52
52
  }, {
53
+ installmentPlanName?: string | undefined;
53
54
  billingLevel?: "account" | "policy" | undefined;
54
55
  delinquencyPlanName?: string | undefined;
55
56
  autoRenewalPlanName?: string | undefined;
56
- installmentPlanName?: string | undefined;
57
57
  shortfallTolerancePlanName?: string | undefined;
58
58
  excessCreditPlanName?: string | undefined;
59
59
  invoiceDocument?: string | undefined;
@@ -105,6 +105,8 @@ declare interface DataModelToJsonSchemaProps {
105
105
  hiddenExceptions?: string[];
106
106
  }
107
107
 
108
+ declare const defaultFieldSchema: z.ZodRecord<z.ZodEnum<["startTime", "endTime", "expirationTime", "installmentPlanName", "timezone", "currency"]>, z.ZodOptional<z.ZodString>>;
109
+
108
110
  declare interface ElementFormData {
109
111
  data: {
110
112
  [key: string]: any;
@@ -193,7 +195,7 @@ export declare const extractElementsFromQuote: (elements: Array<ElementResponse>
193
195
  type: string;
194
196
  staticLocator: string;
195
197
  data?: Record<string, any> | undefined;
196
- coverageTerms?: Record<string, string> | undefined;
198
+ coverageTerms?: Record<string, any> | undefined;
197
199
  parentLocator?: string | undefined;
198
200
  originalEffectiveTime?: string | undefined;
199
201
  tenantLocator?: string | undefined;
@@ -204,7 +206,7 @@ export declare const extractElementsFromQuote: (elements: Array<ElementResponse>
204
206
  type: string;
205
207
  staticLocator: string;
206
208
  data?: Record<string, any> | undefined;
207
- coverageTerms?: Record<string, string> | undefined;
209
+ coverageTerms?: Record<string, any> | undefined;
208
210
  parentLocator?: string | undefined;
209
211
  originalEffectiveTime?: string | undefined;
210
212
  tenantLocator?: string | undefined;
@@ -217,7 +219,7 @@ export declare const extractElementsFromTransactionSegment: (elements: Array<Ele
217
219
  type: string;
218
220
  staticLocator: string;
219
221
  data?: Record<string, any> | undefined;
220
- coverageTerms?: Record<string, string> | undefined;
222
+ coverageTerms?: Record<string, any> | undefined;
221
223
  parentLocator?: string | undefined;
222
224
  originalEffectiveTime?: string | undefined;
223
225
  tenantLocator?: string | undefined;
@@ -228,7 +230,7 @@ export declare const extractElementsFromTransactionSegment: (elements: Array<Ele
228
230
  type: string;
229
231
  staticLocator: string;
230
232
  data?: Record<string, any> | undefined;
231
- coverageTerms?: Record<string, string> | undefined;
233
+ coverageTerms?: Record<string, any> | undefined;
232
234
  parentLocator?: string | undefined;
233
235
  originalEffectiveTime?: string | undefined;
234
236
  tenantLocator?: string | undefined;
@@ -381,23 +383,26 @@ export declare const getDefaultInitializedTransactionValues: ({ elementResponse,
381
383
  */
382
384
  export declare const getDefaultQuoteValues: (quote: QuoteResponse, productModel: ProductConfig, dataModel: DataModel) => {
383
385
  default: {
386
+ currency: string | undefined;
387
+ timezone: string | undefined;
388
+ installmentPlanName: any;
384
389
  startTime: string;
385
390
  endTime: string;
386
391
  expirationTime: string;
387
392
  } | {
393
+ currency: string | undefined;
394
+ timezone: string | undefined;
395
+ installmentPlanName: any;
388
396
  startTime: string;
389
397
  expirationTime: string;
390
398
  endTime?: undefined;
391
399
  };
392
400
  advanced: {
393
- currency: string | undefined;
394
- timezone: string | undefined;
395
401
  billingLevel: string | undefined;
396
402
  billingTrigger: string | undefined;
397
403
  durationBasis: string | undefined;
398
404
  delinquencyPlanName: string | undefined;
399
405
  autoRenewalPlanName: string | undefined;
400
- installmentPlanName: any;
401
406
  };
402
407
  coverageTerms: Record<string, string>;
403
408
  };
@@ -436,7 +441,7 @@ export declare const getModifyChangeInstructionCreateRequestFromFormData: ({ dat
436
441
  staticLocator: string;
437
442
  setData?: Record<string, any> | undefined;
438
443
  removeData?: Record<string, any> | undefined;
439
- setCoverageTerms?: Record<string, string> | undefined;
444
+ setCoverageTerms?: Record<string, any> | undefined;
440
445
  removeCoverageTerms?: Record<string, any> | undefined;
441
446
  };
442
447
 
@@ -481,11 +486,7 @@ declare interface QuoteFormData {
481
486
  data: {
482
487
  [key: string]: any;
483
488
  };
484
- default?: {
485
- startTime?: string;
486
- endTime?: string;
487
- expirationTime?: string;
488
- };
489
+ default?: QuoteRequestDefaultFields;
489
490
  advanced?: QuoteRequestAdvancedFields;
490
491
  coverageTerms?: {
491
492
  [key: string]: string;
@@ -499,6 +500,12 @@ declare interface QuoteFormData {
499
500
  */
500
501
  export declare type QuoteRequestAdvancedFields = z.infer<typeof advancedFieldSchema>;
501
502
 
503
+ /**
504
+ * The type `QuoteRequestDefaultFields` is a zod infererred type that represents the default fields of a quote request.
505
+ * It follows the fields that are found on the QuoteForm in @socotra/ec-react-components
506
+ */
507
+ export declare type QuoteRequestDefaultFields = z.infer<typeof defaultFieldSchema>;
508
+
502
509
  /**
503
510
  * The function `splitInputAndQuantifier` takes a string input, removes certain characters from it, and
504
511
  * extracts a quantifier if present.