All files / lib/packages/shared-types/opensearch/main index.ts

100% Statements 2/2
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102                                                                                                                                                                        186x                                  
import { z } from "zod";
import { ItemResult as Changelog } from "../changelog";
import { AggQuery, Filterable as FIL, Hit, QueryState, Response as Res } from "./../_";
import {
  appK,
  capitatedAmendment,
  capitatedInitial,
  capitatedRenewal,
  changedDate,
  contractingAmendment,
  contractingInitial,
  contractingRenewal,
  legacyPackageView,
  newChipSubmission,
  newMedicaidSubmission,
  respondToRai,
  seatool,
  temporaryExtension,
  toggleWithdrawRai,
  uploadSubsequentDocuments,
  withdrawPackage,
  withdrawRai,
} from "./transforms";
 
export type AppkDocument = z.infer<appK.Schema>;
export type CapitatedAmendmentDocument = z.infer<capitatedAmendment.Schema>;
export type CapitatedInitialDocument = z.infer<capitatedInitial.Schema>;
export type CapitatedRenewalDocument = z.infer<capitatedRenewal.Schema>;
export type ChangedDateDocument = z.infer<changedDate.Schema>;
export type ContractingAmendmentDocument = z.infer<contractingAmendment.Schema>;
export type ContractingInitialDocument = z.infer<contractingInitial.Schema>;
export type ContractingRenewalDocument = z.infer<contractingAmendment.Schema>;
export type LegacyPackageViewDocument = z.infer<legacyPackageView.Schema>;
export type NewChipSubmissionDocument = z.infer<newChipSubmission.Schema>;
export type NewMedicaidSubmissionDocument = z.infer<newMedicaidSubmission.Schema>;
export type RespondToRaiDocument = z.infer<respondToRai.Schema>;
export type SeatoolDocument = z.infer<seatool.Schema>;
export type TemporaryExtensionDocument = z.infer<temporaryExtension.Schema>;
export type ToggleWithdrawRaiDocument = z.infer<toggleWithdrawRai.Schema>;
export type UploadSubsequentDocuments = z.infer<uploadSubsequentDocuments.Schema>;
export type WithdrawPackageDocument = z.infer<withdrawPackage.Schema>;
export type WithdrawRaiDocument = z.infer<withdrawRai.Schema>;
 
export type Document = AppkDocument &
  CapitatedAmendmentDocument &
  CapitatedInitialDocument &
  CapitatedRenewalDocument &
  ChangedDateDocument &
  ContractingAmendmentDocument &
  ContractingInitialDocument &
  ContractingRenewalDocument &
  LegacyPackageViewDocument &
  NewChipSubmissionDocument &
  NewMedicaidSubmissionDocument &
  RespondToRaiDocument &
  SeatoolDocument &
  TemporaryExtensionDocument &
  ToggleWithdrawRaiDocument &
  UploadSubsequentDocuments &
  WithdrawPackageDocument &
  WithdrawRaiDocument & {
    makoChangedDate: string;
    changelog?: Changelog[];
    appkChildren?: Omit<ItemResult, "found">[];
    deleted?: boolean;
    adminChangeType?: string;
    changeMade?: string;
    idToBeUpdated?: string;
    mockEvent?: string;
    withdrawEmailSent?: boolean;
  };
 
export type Response = Res<Document>;
export type ItemResult = Hit<Document> & {
  found: boolean;
};
 
export type Field = keyof Document | `${keyof Document}.keyword`;
export type Filterable = FIL<Field>;
export type State = QueryState<Field>;
export type Aggs = AggQuery<Field>;
 
export * from "./transforms";
 
export const transforms = {
  "app-k": appK,
  "capitated-amendment": capitatedAmendment,
  "capitated-initial": capitatedInitial,
  "capitated-renewal": capitatedRenewal,
  "contracting-amendment": contractingAmendment,
  "contracting-initial": contractingInitial,
  "contracting-renewal": contractingRenewal,
  "new-chip-submission": newChipSubmission,
  "new-medicaid-submission": newMedicaidSubmission,
  "respond-to-rai": respondToRai,
  "temporary-extension": temporaryExtension,
  "toggle-withdraw-rai": toggleWithdrawRai,
  "upload-subsequent-documents": uploadSubsequentDocuments,
  "withdraw-package": withdrawPackage,
  "withdraw-rai": withdrawRai,
};