@socotra/ec-react-schemas 2.35.0-next.2 → 2.35.0-next.3
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/README.md +17 -0
- package/dist/index.d.ts +211 -0
- package/dist/index.es.js +3199 -3116
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +5 -5
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -436,6 +436,23 @@ Follow instructions in the `packages/docs/README.md` file to build the documenta
|
|
|
436
436
|
| `resetQuoteRequestSchema` | `ResetQuoteRequest` |
|
|
437
437
|
| | `ResetQuoteFlagsAction` |
|
|
438
438
|
|
|
439
|
+
### Schedules
|
|
440
|
+
|
|
441
|
+
**schedule-schemas.ts**
|
|
442
|
+
|
|
443
|
+
| Zod Schema | Type |
|
|
444
|
+
|------------|------
|
|
445
|
+
| `scheduleItemSchema` | `ScheduleItem` |
|
|
446
|
+
| `scheduleItemsPageSchema` | `ScheduleItemsPage` |
|
|
447
|
+
| `elementScheduleSchema` | `ElementSchedule` |
|
|
448
|
+
| `elementSchedulesResponseSchema` | `ElementSchedulesResponse` |
|
|
449
|
+
| `scheduleUploadErrorSchema` | `ScheduleUploadError` |
|
|
450
|
+
| `scheduleValidationItemSchema` | |
|
|
451
|
+
| `scheduleCsvUploadResponseSchema` | `ScheduleCsvUploadResponse` |
|
|
452
|
+
| `scheduleDeserializationJobSchema` | `ScheduleDeserializationJob` |
|
|
453
|
+
| `scheduleJobStatusSchema` | `ScheduleJobStatus` |
|
|
454
|
+
| `scheduleJobSchema` | `ScheduleJob` |
|
|
455
|
+
|
|
439
456
|
### Shared
|
|
440
457
|
|
|
441
458
|
**anchor-mode.ts**
|
package/dist/index.d.ts
CHANGED
|
@@ -5596,6 +5596,70 @@ export declare const ElementResponseSchema: z.ZodType<Element_3>;
|
|
|
5596
5596
|
|
|
5597
5597
|
export declare const elementResponseSchema: z.ZodType<Element_2>;
|
|
5598
5598
|
|
|
5599
|
+
export declare type ElementSchedule = z.infer<typeof ElementScheduleSchema>;
|
|
5600
|
+
|
|
5601
|
+
/** One entry of `fetchSchedules` — the schedule attached to a single element. */
|
|
5602
|
+
export declare const ElementScheduleSchema: z.ZodObject<{
|
|
5603
|
+
staticElementLocator: z.ZodOptional<z.ZodString>;
|
|
5604
|
+
elementType: z.ZodOptional<z.ZodString>;
|
|
5605
|
+
scheduleItemType: z.ZodOptional<z.ZodString>;
|
|
5606
|
+
complexData: z.ZodOptional<z.ZodBoolean>;
|
|
5607
|
+
maxValidationErrors: z.ZodOptional<z.ZodNumber>;
|
|
5608
|
+
resetOnRenewal: z.ZodOptional<z.ZodBoolean>;
|
|
5609
|
+
fieldNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5610
|
+
}, z.core.$strip>;
|
|
5611
|
+
|
|
5612
|
+
export declare type ElementSchedulesResponse = z.infer<typeof ElementSchedulesResponseSchema>;
|
|
5613
|
+
|
|
5614
|
+
/**
|
|
5615
|
+
* `fetchSchedules` returns a **map** keyed by `staticElementLocator`, not a
|
|
5616
|
+
* list. Normalized to `{ items }` so consumers can iterate, with the key folded
|
|
5617
|
+
* in as `staticElementLocator` when the body omits it.
|
|
5618
|
+
*/
|
|
5619
|
+
export declare const ElementSchedulesResponseSchema: z.ZodPipe<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
5620
|
+
staticElementLocator: z.ZodOptional<z.ZodString>;
|
|
5621
|
+
elementType: z.ZodOptional<z.ZodString>;
|
|
5622
|
+
scheduleItemType: z.ZodOptional<z.ZodString>;
|
|
5623
|
+
complexData: z.ZodOptional<z.ZodBoolean>;
|
|
5624
|
+
maxValidationErrors: z.ZodOptional<z.ZodNumber>;
|
|
5625
|
+
resetOnRenewal: z.ZodOptional<z.ZodBoolean>;
|
|
5626
|
+
fieldNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5627
|
+
}, z.core.$strip>>, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
5628
|
+
staticElementLocator: z.ZodOptional<z.ZodString>;
|
|
5629
|
+
elementType: z.ZodOptional<z.ZodString>;
|
|
5630
|
+
scheduleItemType: z.ZodOptional<z.ZodString>;
|
|
5631
|
+
complexData: z.ZodOptional<z.ZodBoolean>;
|
|
5632
|
+
maxValidationErrors: z.ZodOptional<z.ZodNumber>;
|
|
5633
|
+
resetOnRenewal: z.ZodOptional<z.ZodBoolean>;
|
|
5634
|
+
fieldNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5635
|
+
}, z.core.$strip>>]>, z.ZodTransform<{
|
|
5636
|
+
items: {
|
|
5637
|
+
staticElementLocator?: string | undefined;
|
|
5638
|
+
elementType?: string | undefined;
|
|
5639
|
+
scheduleItemType?: string | undefined;
|
|
5640
|
+
complexData?: boolean | undefined;
|
|
5641
|
+
maxValidationErrors?: number | undefined;
|
|
5642
|
+
resetOnRenewal?: boolean | undefined;
|
|
5643
|
+
fieldNames?: string[] | undefined;
|
|
5644
|
+
}[];
|
|
5645
|
+
}, Record<string, {
|
|
5646
|
+
staticElementLocator?: string | undefined;
|
|
5647
|
+
elementType?: string | undefined;
|
|
5648
|
+
scheduleItemType?: string | undefined;
|
|
5649
|
+
complexData?: boolean | undefined;
|
|
5650
|
+
maxValidationErrors?: number | undefined;
|
|
5651
|
+
resetOnRenewal?: boolean | undefined;
|
|
5652
|
+
fieldNames?: string[] | undefined;
|
|
5653
|
+
}> | {
|
|
5654
|
+
staticElementLocator?: string | undefined;
|
|
5655
|
+
elementType?: string | undefined;
|
|
5656
|
+
scheduleItemType?: string | undefined;
|
|
5657
|
+
complexData?: boolean | undefined;
|
|
5658
|
+
maxValidationErrors?: number | undefined;
|
|
5659
|
+
resetOnRenewal?: boolean | undefined;
|
|
5660
|
+
fieldNames?: string[] | undefined;
|
|
5661
|
+
}[]>>;
|
|
5662
|
+
|
|
5599
5663
|
export declare type ElementSummary = z.infer<typeof elementSummarySchema>;
|
|
5600
5664
|
|
|
5601
5665
|
export declare const elementSummarySchema: z.ZodObject<{
|
|
@@ -12511,6 +12575,153 @@ export declare const RoleUpdateRequestSchema: z.ZodObject<{
|
|
|
12511
12575
|
description: z.ZodString;
|
|
12512
12576
|
}, z.core.$strip>;
|
|
12513
12577
|
|
|
12578
|
+
export declare type ScheduleDeserializationJob = z.infer<typeof ScheduleDeserializationJobSchema>;
|
|
12579
|
+
|
|
12580
|
+
/**
|
|
12581
|
+
* Result of kicking off an asynchronous deserialization job. The quote or
|
|
12582
|
+
* transaction is locked for modification until the job settles.
|
|
12583
|
+
*/
|
|
12584
|
+
export declare const ScheduleDeserializationJobSchema: z.ZodObject<{
|
|
12585
|
+
jobLocator: z.ZodString;
|
|
12586
|
+
}, z.core.$strip>;
|
|
12587
|
+
|
|
12588
|
+
export declare type ScheduleItem = z.infer<typeof ScheduleItemSchema>;
|
|
12589
|
+
|
|
12590
|
+
/** A single schedule item. `locator` is auto-generated and stable. */
|
|
12591
|
+
export declare const ScheduleItemSchema: z.ZodObject<{
|
|
12592
|
+
staticElementLocator: z.ZodOptional<z.ZodString>;
|
|
12593
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
12594
|
+
createdAt: z.ZodOptional<z.ZodISODateTime>;
|
|
12595
|
+
createdBy: z.ZodOptional<z.ZodString>;
|
|
12596
|
+
locator: z.ZodString;
|
|
12597
|
+
}, z.core.$strip>;
|
|
12598
|
+
|
|
12599
|
+
export declare type ScheduleItemsPage = z.infer<typeof ScheduleItemsPageSchema>;
|
|
12600
|
+
|
|
12601
|
+
/**
|
|
12602
|
+
* One page of schedule items.
|
|
12603
|
+
*
|
|
12604
|
+
* Pagination is **cursor based**: pass `lastSeenLocator` from the previous
|
|
12605
|
+
* response to walk forward. There is no offset access.
|
|
12606
|
+
*
|
|
12607
|
+
* Accepts a bare array as well as the paged envelope, and always yields the
|
|
12608
|
+
* envelope, so consumers read one shape. `count` and `listCompleted` are added
|
|
12609
|
+
* by the BFF's list wrapper rather than by Kernel, so both are optional.
|
|
12610
|
+
*/
|
|
12611
|
+
export declare const ScheduleItemsPageSchema: z.ZodPipe<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
12612
|
+
staticElementLocator: z.ZodOptional<z.ZodString>;
|
|
12613
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
12614
|
+
createdAt: z.ZodOptional<z.ZodISODateTime>;
|
|
12615
|
+
createdBy: z.ZodOptional<z.ZodString>;
|
|
12616
|
+
locator: z.ZodString;
|
|
12617
|
+
}, z.core.$strip>>, z.ZodObject<{
|
|
12618
|
+
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
12619
|
+
staticElementLocator: z.ZodOptional<z.ZodString>;
|
|
12620
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
12621
|
+
createdAt: z.ZodOptional<z.ZodISODateTime>;
|
|
12622
|
+
createdBy: z.ZodOptional<z.ZodString>;
|
|
12623
|
+
locator: z.ZodString;
|
|
12624
|
+
}, z.core.$strip>>>;
|
|
12625
|
+
lastSeenLocator: z.ZodOptional<z.ZodString>;
|
|
12626
|
+
listCompleted: z.ZodOptional<z.ZodBoolean>;
|
|
12627
|
+
count: z.ZodOptional<z.ZodNumber>;
|
|
12628
|
+
}, z.core.$strip>]>, z.ZodTransform<{
|
|
12629
|
+
items: {
|
|
12630
|
+
locator: string;
|
|
12631
|
+
staticElementLocator?: string | undefined;
|
|
12632
|
+
data?: Record<string, any> | undefined;
|
|
12633
|
+
createdAt?: string | undefined;
|
|
12634
|
+
createdBy?: string | undefined;
|
|
12635
|
+
}[];
|
|
12636
|
+
lastSeenLocator?: string | undefined;
|
|
12637
|
+
listCompleted?: boolean | undefined;
|
|
12638
|
+
count?: number | undefined;
|
|
12639
|
+
}, {
|
|
12640
|
+
locator: string;
|
|
12641
|
+
staticElementLocator?: string | undefined;
|
|
12642
|
+
data?: Record<string, any> | undefined;
|
|
12643
|
+
createdAt?: string | undefined;
|
|
12644
|
+
createdBy?: string | undefined;
|
|
12645
|
+
}[] | {
|
|
12646
|
+
items?: {
|
|
12647
|
+
locator: string;
|
|
12648
|
+
staticElementLocator?: string | undefined;
|
|
12649
|
+
data?: Record<string, any> | undefined;
|
|
12650
|
+
createdAt?: string | undefined;
|
|
12651
|
+
createdBy?: string | undefined;
|
|
12652
|
+
}[] | undefined;
|
|
12653
|
+
lastSeenLocator?: string | undefined;
|
|
12654
|
+
listCompleted?: boolean | undefined;
|
|
12655
|
+
count?: number | undefined;
|
|
12656
|
+
}>>;
|
|
12657
|
+
|
|
12658
|
+
export declare type ScheduleJob = z.infer<typeof ScheduleJobSchema>;
|
|
12659
|
+
|
|
12660
|
+
/** Status of an async deserialization run. No generated equivalent today. */
|
|
12661
|
+
export declare const ScheduleJobSchema: z.ZodObject<{
|
|
12662
|
+
locator: z.ZodString;
|
|
12663
|
+
status: z.ZodEnum<{
|
|
12664
|
+
failed: "failed";
|
|
12665
|
+
running: "running";
|
|
12666
|
+
finished: "finished";
|
|
12667
|
+
}>;
|
|
12668
|
+
itemCount: z.ZodOptional<z.ZodNumber>;
|
|
12669
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
12670
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
12671
|
+
itemNumber: z.ZodOptional<z.ZodNumber>;
|
|
12672
|
+
message: z.ZodOptional<z.ZodString>;
|
|
12673
|
+
field: z.ZodOptional<z.ZodString>;
|
|
12674
|
+
}, z.core.$strip>>>;
|
|
12675
|
+
}, z.core.$strip>;
|
|
12676
|
+
|
|
12677
|
+
export declare type ScheduleJobStatus = z.infer<typeof ScheduleJobStatusSchema>;
|
|
12678
|
+
|
|
12679
|
+
export declare const ScheduleJobStatusSchema: z.ZodEnum<{
|
|
12680
|
+
failed: "failed";
|
|
12681
|
+
running: "running";
|
|
12682
|
+
finished: "finished";
|
|
12683
|
+
}>;
|
|
12684
|
+
|
|
12685
|
+
export declare type ScheduleUploadError = z.infer<typeof ScheduleUploadErrorSchema>;
|
|
12686
|
+
|
|
12687
|
+
/**
|
|
12688
|
+
* A single row-level problem reported by a deserialization job. `itemNumber` is
|
|
12689
|
+
* the 1-based position in the uploaded file. Not in the OpenAPI spec — the
|
|
12690
|
+
* synchronous path reports failures as {@link ScheduleUploadResultSchema}
|
|
12691
|
+
* instead.
|
|
12692
|
+
*/
|
|
12693
|
+
export declare const ScheduleUploadErrorSchema: z.ZodObject<{
|
|
12694
|
+
itemNumber: z.ZodOptional<z.ZodNumber>;
|
|
12695
|
+
message: z.ZodOptional<z.ZodString>;
|
|
12696
|
+
field: z.ZodOptional<z.ZodString>;
|
|
12697
|
+
}, z.core.$strip>;
|
|
12698
|
+
|
|
12699
|
+
export declare type ScheduleUploadResult = z.infer<typeof ScheduleUploadResultSchema>;
|
|
12700
|
+
|
|
12701
|
+
/**
|
|
12702
|
+
* Result of a synchronous CSV import — the shared validation result, since
|
|
12703
|
+
* that is what the upload endpoint returns.
|
|
12704
|
+
*
|
|
12705
|
+
* A rejected file still comes back as **HTTP 200** with `success: false` and a
|
|
12706
|
+
* `validationItems` list, so callers must inspect the body rather than trusting
|
|
12707
|
+
* the status code. `itemCount` and `errors` are outside the spec but have been
|
|
12708
|
+
* observed on responses, so they are tolerated rather than stripped.
|
|
12709
|
+
*/
|
|
12710
|
+
export declare const ScheduleUploadResultSchema: z.ZodObject<{
|
|
12711
|
+
itemCount: z.ZodOptional<z.ZodNumber>;
|
|
12712
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
12713
|
+
itemNumber: z.ZodOptional<z.ZodNumber>;
|
|
12714
|
+
message: z.ZodOptional<z.ZodString>;
|
|
12715
|
+
field: z.ZodOptional<z.ZodString>;
|
|
12716
|
+
}, z.core.$strip>>>;
|
|
12717
|
+
validationItems: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
12718
|
+
locator: z.ZodOptional<z.ZodULID>;
|
|
12719
|
+
elementType: z.ZodOptional<z.ZodString>;
|
|
12720
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
12721
|
+
}, z.core.$strip>>>;
|
|
12722
|
+
success: z.ZodOptional<z.ZodBoolean>;
|
|
12723
|
+
}, z.core.$strip>;
|
|
12724
|
+
|
|
12514
12725
|
export declare const SearchByTokenQueryParamsSchema: z.ZodObject<{
|
|
12515
12726
|
searchToken: z.ZodString;
|
|
12516
12727
|
offset: z.ZodOptional<z.ZodString>;
|