legiscan-ts 3.0.0 → 3.0.1
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 +25 -8
- package/dist/cli.mjs +71 -104
- package/dist/index.cjs +96 -105
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1059 -1391
- package/dist/index.d.ts +1059 -1391
- package/dist/index.js +72 -105
- package/dist/index.js.map +1 -1
- package/package.json +9 -8
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["z","z"],"sources":["../src/enums.ts","../src/schemas/types.ts","../src/client.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport const EventType = {\n Hearing: 1,\n ExecutiveSession: 2,\n MarkupSession: 3\n} as const;\n\nexport const Party = {\n Democrat: 1,\n Republican: 2,\n Independent: 3,\n GreenParty: 4,\n Libertarian: 5,\n Nonpartisan: 6\n} as const;\n\nexport const Progress = {\n Prefiled: 0,\n Introduced: 1,\n Engrossed: 2,\n Enrolled: 3,\n Passed: 4,\n Vetoed: 5,\n Failed: 6,\n Override: 7,\n Chaptered: 8,\n Refer: 9,\n ReportPass: 10,\n ReportDnp: 11,\n Draft: 12\n} as const;\n\nexport const Reason = {\n NewBill: 1,\n StatusChange: 2,\n Chamber: 3,\n Complete: 4,\n Title: 5,\n Description: 6,\n CommRefer: 7,\n CommReport: 8,\n SponsorAdd: 9,\n SponsorRemove: 10,\n SponsorChange: 11,\n HistoryAdd: 12,\n HistoryRemove: 13,\n HistoryRevised: 14,\n HistoryMajor: 15,\n HistoryMinor: 16,\n SubjectAdd: 17,\n SubjectRemove: 18,\n Sast: 19,\n Text: 20,\n Amendment: 21,\n Supplement: 22,\n Vote: 23,\n Calendar: 24,\n Progress: 25,\n VoteUpdate: 26,\n TextUpdate: 27,\n Icbm: 99\n} as const;\n\nexport const Role = {\n Representative: 1,\n Senator: 2,\n JointConference: 3\n} as const;\n\nexport const SastType = {\n SameAs: 1,\n SimilarTo: 2,\n ReplacedBy: 3,\n Replaces: 4,\n Crossfiled: 5,\n EnablingFor: 6,\n EnabledBy: 7,\n Related: 8,\n CarryOver: 9\n} as const;\n\nexport const SponsorType = {\n Sponsor: 0,\n PrimarySponsor: 1,\n CoSponsor: 2,\n JointSponsor: 3\n} as const;\n\nexport const Stance = {\n Watch: 0,\n Support: 1,\n Oppose: 2\n} as const;\n\nexport const SupplementType = {\n FiscalNote: 1,\n Analysis: 2,\n FiscalNoteAnalysis: 3,\n VoteImage: 4,\n LocalMandate: 5,\n CorrectionsImpact: 6,\n Misc: 7,\n VetoLetter: 8\n} as const;\n\nexport const TextType = {\n Introduced: 1,\n CommitteeSubstitute: 2,\n Amended: 3,\n Engrossed: 4,\n Enrolled: 5,\n Chaptered: 6,\n FiscalNote: 7,\n Analysis: 8,\n Draft: 9,\n ConferenceSubstitute: 10,\n Prefiled: 11,\n VetoMessage: 12,\n VetoResponse: 13,\n Substitute: 14\n} as const;\n\nexport const BillType = {\n Bill: 1,\n Resolution: 2,\n ConcurrentResolution: 3,\n JointResolution: 4,\n JointResolutionConstitutionalAmendment: 5,\n ExecutiveOrder: 6,\n ConstitutionalAmendment: 7,\n Memorial: 8,\n Claim: 9,\n Commendation: 10,\n CommitteeStudyRequest: 11,\n JointMemorial: 12,\n Proclamation: 13,\n StudyRequest: 14,\n Address: 15,\n ConcurrentMemorial: 16,\n Initiative: 17,\n Petition: 18,\n StudyBill: 19,\n InitiativePetition: 20,\n RepealBill: 21,\n Remonstration: 22,\n CommitteeBill: 23\n} as const;\n\nexport const Vote = {\n Yea: 1,\n Nay: 2,\n Abstain: 3,\n Absent: 4\n} as const;\n\nexport const State = {\n AL: 1,\n AK: 2,\n AZ: 3,\n AR: 4,\n CA: 5,\n CO: 6,\n CT: 7,\n DE: 8,\n FL: 9,\n GA: 10,\n HI: 11,\n ID: 12,\n IL: 13,\n IN: 14,\n IA: 15,\n KS: 16,\n KY: 17,\n LA: 18,\n ME: 19,\n MD: 20,\n MA: 21,\n MI: 22,\n MN: 23,\n MS: 24,\n MO: 25,\n MT: 26,\n NE: 27,\n NV: 28,\n NH: 29,\n NJ: 30,\n NM: 31,\n NY: 32,\n NC: 33,\n ND: 34,\n OH: 35,\n OK: 36,\n OR: 37,\n PA: 38,\n RI: 39,\n SC: 40,\n SD: 41,\n TN: 42,\n TX: 43,\n UT: 44,\n VT: 45,\n VA: 46,\n WA: 47,\n WV: 48,\n WI: 49,\n WY: 50,\n DC: 51,\n US: 52\n} as const;\n\nexport const Mime = {\n HTML: 1,\n PDF: 2,\n WPD: 3,\n DOC: 4,\n RTF: 5,\n DOCX: 6\n};\n\nexport type Needle = number | string;\n\nexport function asName<T extends Record<string, number>>(\n haystack: T,\n needle: Needle\n): keyof T | undefined {\n return Object.entries(haystack).find(\n ([k, v]) => k === String(needle) || v === Number(needle)\n )?.[0] as keyof T | undefined;\n}\n\nexport function asNumber<T extends Record<string, number>>(\n haystack: T,\n needle: Needle\n): number | undefined {\n return Object.entries(haystack).find(\n ([k, v]) => k === String(needle) || v === Number(needle)\n )?.[1] as T[keyof T] | undefined;\n}\n\nexport function zNames<T extends Record<string, number>>(haystack: T) {\n return z.union(Object.keys(haystack).map((k) => z.literal(k)));\n}\n\nexport function zNumbers<T extends Record<string, number>>(haystack: T) {\n return z.union(Object.values(haystack).map((n) => z.literal(n)));\n}\n","import { z } from \"zod\";\nimport {\n BillType,\n EventType,\n Mime,\n Party,\n Progress,\n Role,\n SastType,\n SponsorType,\n State,\n SupplementType,\n TextType,\n Vote,\n zNames,\n zNumbers\n} from \"../enums.ts\";\n\n/** @public */\nexport const _zSession = z.object({\n session_id: z.number().describe(\"Internal session id\"),\n session_name: z.string().describe(\"State specific session name\"),\n session_title: z\n .string()\n .describe(\"Normalized session title with year(s) and Regular/Nth Special Session\"),\n session_tag: z.unknown(), // undocumented\n\n state: zNames(State).describe(\"Normalized state\"),\n state_id: zNumbers(State).describe(\"Internal state id\"),\n\n year_start: z.number().describe(\"Starting year of session\"),\n year_end: z.number().describe(\"Ending year of session\"),\n\n special: z.boolean().describe(\"Flag for being a special session\"),\n prefile: z.boolean().describe(\"Flag for session being in prefile\"),\n prior: z.boolean().describe(\"Flag for session being archived\"),\n sine_die: z.boolean().describe(\"Flag for session being adjourned sine die\")\n});\nexport type _zSession = z.infer<typeof _zSession>;\n\n/** @public */\nexport const zGetSessionList = z.array(\n _zSession.extend({\n session_hash: z.hash(\"md5\").nullable().describe(\"Hash of session data, used for caching\"),\n dataset_hash: z.hash(\"md5\").nullable().describe(\"Hash of entire dataset, used for caching\")\n })\n);\nexport type zGetSessionList = z.infer<typeof zGetSessionList>;\n\n/** @public */\nexport const _zBillText = z.object({\n doc_id: z.number().describe(\"Internal document id\"),\n bill_id: z.number().optional().describe(\"Internal bill id\"),\n type: zNames(TextType).describe(\"Type of draft text\"),\n type_id: zNumbers(TextType).describe(\"Internal text type id\"),\n type_raw: z.string().describe(\"Internal text type name\"),\n date: z.iso.date().describe(\"Document date (if available)\"),\n url: z.url().describe(\"URL of document on legiscan.com\"),\n state_link: z.url().describe(\"URL of document on state website\"),\n\n mime: zNames(Mime).describe(\"Normalized file type, e.g. 'PDF'\"),\n mime_id: zNumbers(Mime).describe(\"Internal file type id\"),\n mime_raw: z.string().describe(\"Raw MIME type of the document, e.g. 'application/pdf'\"),\n text_size: z\n .number()\n .describe(\"Size in bytes of the decoded BASE64 document (add 33% for base64)\"),\n text_hash: z.hash(\"md5\").describe(\"MD5 hash of the decoded BASE64 document\"),\n\n alt_doc_id: z.number().nullable().describe(\"Internal alternate bill text id\"),\n alt_mime: zNames(Mime)\n .nullable()\n .describe(\"Normalized file type of alternate document, e.g. 'PDF'\"),\n alt_mime_id: zNumbers(Mime).nullable().describe(\"Internal file type id of alternate document\"),\n alt_mime_raw: z\n .string()\n .nullable()\n .describe(\"Raw MIME type of the alternate document, e.g. 'application/pdf'\"),\n alt_state_link: z.url().nullable().describe(\"URL of alternate document on state website\"),\n alt_text_size: z\n .number()\n .nullable()\n .describe(\"Size in bytes of the decoded BASE64 alternate document (add 33% for base64)\"),\n alt_text_hash: z\n .hash(\"md5\")\n .nullable()\n .describe(\"MD5 hash of the decoded BASE64 alternate document\")\n});\nexport type _zBillText = z.infer<typeof _zBillText>;\n\n/** @public */\nexport const zGetBillText = _zBillText.extend({\n doc: z.base64().describe(\"BASE64 encoded document\"),\n alt_doc: z.unknown() // undocumented\n});\nexport type zGetBillText = z.infer<typeof zGetBillText>;\n\n/** @public */\nexport const _zCommittee = z.object({\n committee_id: z.number().describe(\"Internal committee id\"),\n chamber_raw: z.string().describe(\"Internal chamber name, e.g. 'S' or 'H'\"),\n chamber_id: z.number().describe(\"Internal chamber id\"),\n name: z.string().describe(\"Committee name\")\n});\nexport type _zCommittee = z.infer<typeof _zCommittee>;\n\n/** @public */\nexport const _zCommitteeReferral = z.intersection(\n _zCommittee,\n z.object({ date: z.iso.date().describe(\"Date of referral\") })\n);\nexport type _zCommitteeReferral = z.infer<typeof _zCommitteeReferral>;\n\n/** @public */\nexport const _zBillProgress = z.object({\n date: z.iso.date().describe(\"Date of progress event\"),\n event: zNames(Progress).describe(\"Normalized progress event\"),\n event_id: zNumbers(Progress).describe(\"Internal progress event id\")\n});\nexport type _zBillProgress = z.infer<typeof _zBillProgress>;\n\n/** @public */\nexport const _zBillHistory = z.object({\n date: z.iso.date().describe(\"Date of action\"),\n action: z.string().describe(\"Description of action taken\"),\n chamber_raw: z.string().nullable().describe(\"Internal chamber name\"),\n chamber_id: z.number().nullable().describe(\"Internal chamber id\"),\n importance: z.boolean().describe(\"Flag for major steps (i.e. those included in progress list)\")\n});\nexport type _zBillHistory = z.infer<typeof _zBillHistory>;\n\n/** @public */\nexport const _zPerson = z.object({\n people_id: z.number().describe(\"Internal person id\"),\n person_hash: z.string().describe(\"Hash of the person's details, used for caching\"),\n party: zNames(Party).describe(\"Normalized party, e.g. 'Democrat' or 'Republican'\"),\n party_id: zNumbers(Party).describe(\"Internal party id\"),\n party_raw: z.string().describe(\"Internal party name\"),\n state: zNames(State).describe(\"Normalized state\"),\n state_id: zNumbers(State).describe(\"Internal state id\"),\n role: zNames(Role).describe(\"Normalized role, e.g. 'Senator' or 'Representative'\"),\n role_id: zNumbers(Role).describe(\"Internal role id\"),\n role_raw: z.string().describe(\"Internal role name\"),\n name: z.string().describe(\"Person's full name\"),\n first_name: z.string().describe(\"Person's first name\"),\n middle_name: z.string().nullable().describe(\"Person's middle name\"),\n last_name: z.string().describe(\"Person's last name\"),\n suffix: z.string().nullable().describe(\"Person's suffix\"),\n nickname: z.string().nullable().describe(\"Person's nickname\"),\n district: z.string().describe(\"Person's district\"),\n ftm_eid: z.number().nullable().describe(\"FollowTheMoney ID of the person\"),\n votesmart_id: z.number().nullable().describe(\"Votesmart ID of the person\"),\n opensecrets_id: z.number().nullable().describe(\"OpenSecrets ID of the person\"),\n knowwho_pid: z.number().nullable().describe(\"KnowWho PID of the person\"),\n ballotpedia: z.string().nullable().describe(\"Ballotpedia ID of the person\"),\n bioguide_id: z.string().nullable().describe(\"Bioguide ID of the person\"),\n\n committee_sponsor: z.boolean().describe(\"Flag for committee sponsorship\"),\n committee_id: z.number().nullable().describe(\"Internal committee id\"),\n state_federal: z.unknown(), // undocumented\n bio: z.unknown() // undocumented\n});\nexport type _zPerson = z.infer<typeof _zPerson>;\n\n/** @public */\nexport const zGetPerson = _zPerson.extend({});\nexport type zGetPerson = z.infer<typeof zGetPerson>;\n\n/** @public */\nexport const _zSast = z.object({\n type: zNames(SastType).describe(\"Normalized sast type\"),\n type_id: zNumbers(SastType).describe(\"Internal sast id\"),\n type_raw: z.string().describe(\"Internal sast type name\"),\n sast_bill_number: z.string().describe(\"Bill number of the sast, e.g. HB 1234\"),\n sast_bill_id: z.number().describe(\"Internal bill id of the sast\")\n});\nexport type _zSast = z.infer<typeof _zSast>;\n\n/** @public */\nexport const _zSubject = z.object({\n subject_id: z.number().describe(\"Internal subject id\"),\n subject_name: z.string().describe(\"Name of the subject\")\n});\nexport type _zSubject = z.infer<typeof _zSubject>;\n\n/** @public */\nexport const _zVote = z.object({\n roll_call_id: z.number().describe(\"Internal roll call id\"),\n date: z.iso.date().describe(\"Date of the vote\"),\n description: z.string().describe(\"Description of the vote\"),\n yea: z.number().describe(\"Number of votes for the bill\"),\n nay: z.number().describe(\"Number of votes against the bill\"),\n abstain: z.number().describe(\"Number of votes that abstained\"),\n absent: z.number().describe(\"Number of votes that were absent\"),\n total: z.number().describe(\"Total number of votes\"),\n passed: z.boolean().describe(\"Flag for whether the vote passed\"),\n chamber_id: z.number().describe(\"Internal chamber id\"),\n chamber_raw: z.string().describe(\"Internal chamber name, e.g. 'S' or 'H'\")\n});\nexport type _zVote = z.infer<typeof _zVote>;\n\n/** @public */\nexport const _zAmendment = z.object({\n amendment_id: z.number().describe(\"Internal amendment id\"),\n adopted: z.boolean().describe(\"Flag for whether the amendment was adopted\"),\n chamber_id: z.number().describe(\"Internal chamber id\"),\n chamber_raw: z.string().describe(\"Internal chamber name, e.g. 'S' or 'H'\"),\n date: z.iso.date().nullable().describe(\"Date of the amendment\"),\n title: z.string().describe(\"Official amendment title\"),\n description: z.string().describe(\"Official amendment description\"),\n mime: zNames(Mime).describe(\"Normalized file type, e.g. 'PDF'\"),\n mime_id: zNumbers(Mime).describe(\"Internal file type id\"),\n mime_raw: z.string().describe(\"Raw MIME type of the document, e.g. 'application/pdf'\"),\n url: z.url().describe(\"URL of the amendment on legiscan.com\"),\n state_link: z.url().describe(\"URL of the amendment on state website\"),\n amendment_size: z\n .number()\n .describe(\"Size in bytes of the decoded BASE64 document (add 33% for base64)\"),\n amendment_hash: z.hash(\"md5\").describe(\"MD5 hash of the decoded BASE64 document\"),\n alt_amendment: z.number().nullable().describe(\"Internal alternate amendment id\"),\n alt_mime: zNames(Mime)\n .nullable()\n .describe(\"Normalized file type of alternate document, e.g. 'PDF'\"),\n alt_mime_id: zNumbers(Mime).nullable().describe(\"Internal file type id of alternate document\"),\n alt_mime_raw: z\n .string()\n .nullable()\n .describe(\"Raw MIME type of the alternate document, e.g. 'application/pdf'\"),\n alt_state_link: z.url().nullable().describe(\"URL of the alternate document on state website\"),\n alt_amendment_size: z\n .number()\n .nullable()\n .describe(\"Size in bytes of the decoded alternate BASE64 document (add 33% for base64)\"),\n alt_amendment_hash: z\n .hash(\"md5\")\n .nullable()\n .describe(\"MD5 hash of the decoded alternate BASE64 document\")\n});\nexport type _zAmendment = z.infer<typeof _zAmendment>;\n\n/** @public */\nexport const zGetAmendment = _zAmendment.extend({\n bill_id: z.number().describe(\"Internal bill id the amendment belongs to\"),\n doc: z.base64().describe(\"BASE64 encoded document\"),\n alt_doc: z.base64().nullable().describe(\"BASE64 encoded alternate document\")\n});\nexport type zGetAmendment = z.infer<typeof zGetAmendment>;\n\n/** @public */\nexport const _zSupplement = z.object({\n supplement_id: z.number().describe(\"Internal supplement id\"),\n date: z.iso.date().nullable().describe(\"Date of the supplement\"),\n type: zNames(SupplementType).describe(\"Normalized supplement type\"),\n type_id: zNumbers(SupplementType).describe(\"Internal supplement type id\"),\n type_raw: z.string().describe(\"Internal supplement type name\"),\n mime: zNames(Mime).describe(\"Normalized file type, e.g. 'PDF'\"),\n mime_id: zNumbers(Mime).describe(\"Internal file type id\"),\n mime_raw: z.string().describe(\"Raw mime type of the document, e.g. 'application/pdf'\"),\n url: z.url().describe(\"URL of the supplement on legiscan.com\"),\n state_link: z.url().describe(\"URL of the supplement on state website\"),\n supplement_size: z\n .number()\n .describe(\"Size in bytes of the decoded BASE64 document (add 33% for base64)\"),\n supplement_hash: z.hash(\"md5\").describe(\"MD5 hash of the decoded BASE64 document\"),\n alt_supplement: z.number().nullable().describe(\"Internal alternate supplement id\"),\n alt_mime: zNames(Mime)\n .nullable()\n .describe(\"Normalized file type of alternate document, e.g. 'PDF'\"),\n alt_mime_id: zNumbers(Mime).nullable().describe(\"Internal file type id of alternate document\"),\n alt_mime_raw: z\n .string()\n .nullable()\n .describe(\"Raw MIME type of the alternate document, e.g. 'application/pdf'\"),\n alt_state_link: z.url().nullable().describe(\"URL of the alternate document on state website\"),\n alt_supplement_size: z\n .number()\n .nullable()\n .describe(\"Size in bytes of the decoded alternate BASE64 document (add 33% for base64)\"),\n alt_supplement_hash: z\n .hash(\"md5\")\n .nullable()\n .describe(\"MD5 hash of the decoded alternate BASE64 document\")\n});\nexport type _zSupplement = z.infer<typeof _zSupplement>;\n\n/** @public */\nexport const zGetSupplement = _zSupplement.extend({\n bill_id: z.number().describe(\"Internal bill id the supplement belongs to\"),\n doc: z.base64().describe(\"BASE64 encoded document\"),\n alt_doc: z.base64().nullable().describe(\"BASE64 encoded alternate document\")\n});\nexport type zGetSupplement = z.infer<typeof zGetSupplement>;\n\n/** @public */\nexport const _zEvent = z.object({\n type: zNames(EventType).describe(\"Normalized event type\"),\n type_id: zNumbers(EventType).describe(\"Internal event type id\"),\n type_raw: z.string().describe(\"Internal event type name\"),\n date: z.iso.date().describe(\"Date of the event\"),\n time: z.iso.time().nullable().describe(\"Time of the event (if available)\"),\n location: z.string().nullable().describe(\"Location of the event (if available)\"),\n description: z.string().describe(\"Description of the event\")\n});\nexport type _zEvent = z.infer<typeof _zEvent>;\n\n/** @public */\nexport const _zBill = z.object({\n bill_id: z.number().describe(\"Internal bill id\"),\n bill_number: z.string().describe(\"Bill number, e.g. HB 1234\"),\n title: z.string().describe(\"Official bill title\"),\n description: z.string().describe(\"Official bill description\"),\n url: z.url().describe(\"URL of bill on legiscan.com\"),\n\n status: zNames(Progress).describe(\"Latest bill progress, e.g. 'Introduced'\"),\n status_id: zNumbers(Progress).nullable().describe(\"Internal progress id\"),\n status_date: z.iso.date().nullable().describe(\"Date of last progress update (if available)\"),\n change_hash: z.hash(\"md5\").describe(\"Hash of bill data, used for caching\")\n});\nexport type _zBill = z.infer<typeof _zBill>;\n\n/** @public */\nexport const _zBillWithAction = _zBill.extend({\n last_action: z\n .string()\n .nullable()\n .describe(\"Description of the bill's last action (if available)\"),\n last_action_date: z.iso\n .date()\n .nullable()\n .describe(\"Date of the bill's last action (if available)\")\n});\n\nexport const zGetMasterList = z.array(_zBillWithAction);\nexport type zGetMasterList = z.infer<typeof zGetMasterList>;\n\n/** @public */\nexport const zGetSearch = z.array(\n _zBillWithAction\n .extend({\n relevance: z.number().describe(\"Relevance score of the search result\"),\n state: zNames(State).describe(\"Normalized state\"),\n state_id: zNumbers(State).describe(\"Internal state id\"),\n bill_id: z.number().describe(\"Internal bill id\"),\n text_url: z.url().describe(\"URL of the bill text on legiscan.com\"),\n research_url: z.url().describe(\"URL of the bill research page on legiscan.com\")\n })\n .omit({\n description: true,\n status: true,\n status_id: true,\n status_date: true\n })\n);\nexport type zGetSearch = z.infer<typeof zGetSearch>;\n\n/** @public */\nexport const _zBillVote = _zVote.extend({\n url: z.url().describe(\"URL of the vote on legiscan.com\"),\n state_link: z.url().describe(\"URL of the vote on state website\")\n});\n\n/** @public */\nexport const _zSponsor = _zPerson.extend({\n sponsor_type: zNames(SponsorType).describe(\"Normalized sponsor type\"),\n sponsor_type_id: zNumbers(SponsorType).describe(\"Internal sponsor type id\"),\n sponsor_order: z.number().describe(\"Order of sponsorship\")\n});\n\n/** @public */\nexport const zGetBill = _zBill.extend({\n session_id: z.number().describe(\"Internal session id\"),\n session: _zSession.describe(\"Session object\"),\n state_link: z.url().describe(\"URL of bill on state website\"),\n completed: z.boolean().describe(\"Flag for whether bill is completed\"),\n progress: z\n .array(_zBillProgress)\n .describe(\"Major history of the bill (i.e. important items from history)\"),\n state: zNames(State).describe(\"Normalized state\"),\n state_id: zNumbers(State).describe(\"Internal state id\"),\n state_raw: z.string().describe(\"Internal state name\"),\n bill_type: zNames(BillType).describe(\"Normalized bill type, e.g. 'JointResolution'\"),\n bill_type_id: zNumbers(BillType).describe(\"Internal bill type id\"),\n bill_type_raw: z.string().describe(\"Internal bill type name, e.g. 'JR'\"),\n body_id: z.number().describe(\"Internal body id (original)\"),\n body_raw: z.string().describe(\"Internal body name (original)\"),\n current_body_id: z.number().nullable().describe(\"Internal body id (current)\"),\n current_body_raw: z.string().nullable().describe(\"Internal body name (current)\"),\n pending_committee_id: z.number().describe(\"Internal committee id\"),\n committee: z.array(_zCommittee).describe(\"List of committees if pending\"),\n referrals: z.array(_zCommitteeReferral).describe(\"History of committee referrals\"),\n history: z.array(_zBillHistory).describe(\"Full history of the bill\"),\n sponsors: z.array(_zSponsor).describe(\"Sponsors of the bill\"),\n sasts: z.array(_zSast).describe(\"SASTs of the bill\"),\n subjects: z.array(_zSubject).describe(\"Subjects of the bill\"),\n texts: z.array(_zBillText).describe(\"Documents from the bill\"),\n votes: z.array(_zBillVote).describe(\"Votes for the bill\"),\n amendments: z.array(_zAmendment).describe(\"Amendments to the bill\"),\n supplements: z.array(_zSupplement).describe(\"Supplements to the bill\"),\n calendar: z.array(_zEvent).describe(\"Events related to the bill\")\n});\nexport type zGetBill = z.infer<typeof zGetBill>;\n\n/** @public */\nexport const _zRollCallVote = z.object({\n people_id: z.number().describe(\"Internal person id\"),\n vote: zNames(Vote).describe(\"Vote of the person\"),\n vote_id: zNumbers(Vote).describe(\"Internal vote id\"),\n vote_raw: z.string().describe(\"Internal vote name\")\n});\nexport type _zRollCallVote = z.infer<typeof _zRollCallVote>;\n\n/** @public */\nexport const zGetRollCall = _zVote.extend({\n bill_id: z.number().describe(\"Internal bill id the vote belongs to\"),\n votes: z.array(_zRollCallVote).describe(\"Individual votes for the roll call\")\n});\nexport type zGetRollCall = z.infer<typeof zGetRollCall>;\n\n/** @public */\nexport const zGetSessionPeople = z.array(_zPerson.extend({}));\nexport type zGetSessionPeople = z.infer<typeof zGetSessionPeople>;\n\n/** @public */\nexport const zGetSponsoredList = z.array(\n z.object({\n bill_id: z.number().describe(\"Internal bill id\"),\n bill_number: z.string().describe(\"Bill number, e.g. HB 1234\"),\n session: _zSession\n })\n);\nexport type zGetSponsoredList = z.infer<typeof zGetSponsoredList>;\n","// API docs: https://legiscan.com/misc/LegiScan_API_User_Manual.pdf\n\nimport {\n asName,\n asNumber,\n BillType,\n EventType,\n Mime,\n type Needle,\n Party,\n Progress,\n Role,\n SastType,\n SponsorType,\n State,\n SupplementType,\n TextType,\n Vote\n} from \"./enums.ts\";\nimport type {\n Amendment,\n Bill,\n BillText,\n MasterList,\n Person,\n RollCall,\n Search,\n SessionList,\n SessionPeople,\n SponsoredList,\n Supplement\n} from \"./generated/types.ts\";\nimport {\n type _zSession,\n zGetAmendment,\n zGetBill,\n zGetBillText,\n zGetMasterList,\n zGetPerson,\n zGetRollCall,\n type zGetSearch,\n zGetSessionList,\n zGetSessionPeople,\n zGetSponsoredList,\n zGetSupplement\n} from \"./schemas/types.ts\";\n\n/**\n * Converts a PHP object with numerical keys into entries for consumption by other JS methods\n * Discards any string keys it finds along the way\n * @param object numerically-keyed object to convert to an array\n */\n\nfunction* numericalEntries(object: Record<string, any>) {\n for (const k in object) {\n if (k.match(/^\\d+$/)) {\n yield [Number(k), object[k]];\n }\n }\n}\n\n/**\n * Converts a PHP object into a JS array using {@link numericalEntries}\n * @param object PHP-style object to convert\n */\n\nexport function numericalToArray(object: Record<string, any>) {\n return Array.from(numericalEntries(object), (entry) => entry[1]);\n}\n\n/**\n * Class to instantiate a client for the Legiscan API\n */\nexport class LegiscanClient {\n public key: string | undefined;\n\n /**\n * @param key the key for the API, defaults to your $LEGISCAN_API_KEY env variable\n */\n constructor(key?: string | undefined) {\n this.key = key ?? process?.env?.LEGISCAN_API_KEY;\n }\n\n /**\n * Make an API request, adding the key automatically\n * @param op The API endpoint to hit (e.g., getSearchRaw)\n * @param params Query parameters to add to the request URL\n */\n async request(op: string, params: Record<string, unknown> = {}) {\n const url = new URL(\"https://api.legiscan.com/\");\n url.search = new URLSearchParams({\n op: op,\n key: this.key!,\n ...params\n }).toString();\n\n const response = await (await fetch(url.toString())).json();\n if (response.status === \"ERROR\") {\n throw new Error(\n `Legiscan API rejected request: ${response.alert?.message ?? \"no reason given\"}`\n );\n }\n return response;\n }\n\n /*\n Other API methods to stub out:\n - getSearchRaw(query, { state?, year?, id? })\n - getDatasetList({ state?, year? })\n - getDataset(id, key)\n - getMonitorList(record?)\n - getMonitorListRaw(record?)\n - setMonitor(list, action, stance?)\n */\n\n /**\n * Get a list of sessions for a state\n * @cli {getSessionList} sessionlist\n * @param {State} [state] The US state, or all states if omitted\n */\n async getSessionList({ state }: { state?: Needle }): Promise<SessionList> {\n const { sessions } = await this.request(\"getSessionList\", {\n ...(state ? { state: asName(State, state) } : {})\n });\n return zGetSessionList.parse(\n sessions.map(\n (s: any) =>\n ({\n session_id: s.session_id,\n state: asName(State, s.state_id)!,\n state_id: s.state_id,\n year_start: s.year_start,\n year_end: s.year_end,\n special: Boolean(s.special),\n prefile: Boolean(s.prefile),\n prior: Boolean(s.prior),\n sine_die: Boolean(s.sine_die),\n session_name: s.session_name,\n session_title: s.session_title,\n session_tag: s.session_tag,\n\n dataset_hash: s.dataset_hash,\n session_hash: s.session_hash\n }) satisfies zGetSessionList[number]\n )\n ) as SessionList;\n }\n\n /**\n * Get a list of all bills for a given session or state\n * @cli {getMasterList} masterlist\n * @param {State} [state] US State, will return the current session\n * @param {number} [session] the ID retrieved from getSessionList()\n */\n async getMasterList({\n state,\n session\n }: {\n state?: Needle;\n session?: number;\n }): Promise<MasterList> {\n const { masterlist } = await this.request(\"getMasterList\", {\n ...(state ? { state: asName(State, state) } : {}),\n ...(session ? { id: session.toString() } : {})\n });\n return zGetMasterList.parse(\n numericalToArray(masterlist).map(\n (b: any) =>\n ({\n bill_id: b.bill_id,\n bill_number: b.number,\n title: b.title,\n description: b.description,\n url: b.url,\n status: asName(Progress, b.status)!,\n status_id: b.status,\n status_date: b.status_date,\n last_action: b.last_action,\n last_action_date: b.last_action_date !== \"0000-00-00\" ? b.last_action_date : null,\n change_hash: b.change_hash\n }) satisfies zGetMasterList[number]\n )\n ) as MasterList;\n }\n\n /**\n * Get the full text of a bill\n * @cli {getBillText} billtext\n * @param {number} id bill ID to request\n */\n async getBillText({ id }: { id: number }): Promise<BillText> {\n const { text } = await this.request(\"getBillText\", { id });\n return zGetBillText.parse({\n doc_id: text.doc_id,\n bill_id: text.bill_id,\n type: asName(TextType, text.type_id)!,\n type_id: text.type_id,\n type_raw: text.type,\n date: text.date,\n url: text.url,\n state_link: text.state_link,\n\n mime: asName(Mime, text.mime_id)!,\n mime_id: text.mime_id,\n mime_raw: text.mime,\n text_size: text.text_size,\n text_hash: text.text_hash,\n doc: text.doc,\n\n alt_doc_id: text.alt_bill_text || null,\n alt_mime: text.alt_mime_id ? asName(Mime, text.alt_mime_id)! : null,\n alt_mime_id: text.alt_mime_id || null,\n alt_mime_raw: text.alt_mime || null,\n alt_text_size: text.alt_text_size || null,\n alt_text_hash: text.alt_text_hash || null,\n alt_state_link: text.alt_state_link || null,\n alt_doc: text.alt_doc || null\n } satisfies zGetBillText) as BillText;\n }\n\n /**\n * Get the details for a bill (such as status or history)\n * @cli {getBill} bill\n * @param {number} id bill ID to request\n */\n async getBill({ id }: { id: number }): Promise<Bill> {\n const { bill } = await this.request(\"getBill\", { id });\n if (!Array.isArray(bill.committee)) bill.committee = [bill.committee];\n return zGetBill.parse({\n bill_id: bill.bill_id,\n change_hash: bill.change_hash,\n session_id: bill.session_id,\n session: {\n session_id: bill.session.session_id,\n state: asName(State, bill.session.state_id)!,\n state_id: bill.session.state_id,\n year_start: bill.session.year_start,\n year_end: bill.session.year_end,\n prefile: Boolean(bill.session.prefile),\n sine_die: Boolean(bill.session.sine_die),\n prior: Boolean(bill.session.prior),\n special: Boolean(bill.session.special),\n session_tag: bill.session.session_tag,\n session_title: bill.session.session_title,\n session_name: bill.session.session_name\n },\n url: bill.url,\n state_link: bill.state_link,\n completed: Boolean(bill.completed),\n status: asName(Progress, bill.status)!,\n status_id: bill.status,\n status_date: bill.status_date,\n progress: bill.progress.map((p: any): zGetBill[\"progress\"][number] => ({\n date: p.date,\n event: asName(Progress, p.event)!,\n event_id: p.event\n })),\n state: asName(State, bill.state_id)!,\n state_id: bill.state_id,\n state_raw: bill.state,\n bill_number: bill.bill_number,\n bill_type: asName(BillType, parseInt(bill.bill_type_id, 10))!,\n bill_type_id: parseInt(bill.bill_type_id, 10),\n bill_type_raw: bill.bill_type,\n body_id: bill.body_id,\n body_raw: bill.body,\n current_body_id: bill.current_body_id || null,\n current_body_raw: bill.current_body_raw || null,\n title: bill.title,\n description: bill.description,\n pending_committee_id: bill.pending_committee_id,\n committee: bill.committee.map((c: any): zGetBill[\"committee\"][number] => ({\n committee_id: c.committee_id,\n chamber_id: c.chamber_id,\n chamber_raw: c.chamber,\n name: c.name\n })),\n referrals: bill.referrals.map((r: any): zGetBill[\"referrals\"][number] => ({\n date: r.date,\n committee_id: r.committee_id,\n chamber_id: r.chamber_id,\n chamber_raw: r.chamber,\n name: r.name\n })),\n history: bill.history.map((h: any): zGetBill[\"history\"][number] => ({\n date: h.date,\n action: h.action,\n chamber_id: h.chamber_id || null,\n chamber_raw: h.chamber || null,\n importance: Boolean(h.importance)\n })),\n sponsors: bill.sponsors.map((s: any): zGetBill[\"sponsors\"][number] => ({\n people_id: s.people_id,\n person_hash: s.person_hash,\n party: asName(Party, parseInt(s.party_id, 10))!,\n party_id: parseInt(s.party_id, 10),\n party_raw: s.party,\n state: asName(State, s.state_id)!,\n state_id: s.state_id,\n role: asName(Role, s.role_id)!,\n role_id: s.role_id,\n role_raw: s.role,\n name: s.name,\n first_name: s.first_name,\n middle_name: s.middle_name || null,\n last_name: s.last_name,\n suffix: s.suffix || null,\n nickname: s.nickname || null,\n district: s.district,\n ftm_eid: s.ftm_eid,\n votesmart_id: s.votesmart_id || null,\n opensecrets_id: s.opensecrets_id || null,\n knowwho_pid: s.knowwho_pid || null,\n ballotpedia: s.ballotpedia || null,\n bioguide_id: s.bioguide_id || null,\n sponsor_type: asName(SponsorType, s.sponsor_type_id)!,\n sponsor_type_id: s.sponsor_type_id,\n sponsor_order: s.sponsor_order,\n committee_sponsor: Boolean(s.committee_sponsor),\n committee_id: s.committee_id || null,\n state_federal: Boolean(s.state_federal),\n bio: s.bio\n })),\n sasts: bill.sasts.map((s: any): zGetBill[\"sasts\"][number] => ({\n sast_bill_id: s.sast_bill_id,\n sast_bill_number: s.sast_bill_number,\n type: asName(SastType, s.type_id)!,\n type_id: s.type_id,\n type_raw: s.type\n })),\n subjects: bill.subjects.map((s: any): zGetBill[\"subjects\"][number] => ({\n subject_id: s.subject_id,\n subject_name: s.subject_name\n })),\n texts: bill.texts.map((t: any): zGetBill[\"texts\"][number] => ({\n doc_id: t.doc_id,\n bill_id: t.bill_id,\n type: asName(TextType, t.type_id)!,\n type_id: t.type_id,\n type_raw: t.type,\n date: t.date,\n url: t.url,\n state_link: t.state_link,\n mime: asName(Mime, t.mime_id)!,\n mime_id: t.mime_id,\n mime_raw: t.mime,\n text_size: t.text_size,\n text_hash: t.text_hash,\n alt_doc_id: t.alt_bill_text || null,\n alt_mime: t.alt_mime_id ? asName(Mime, t.alt_mime_id)! : null,\n alt_mime_id: t.alt_mime_id || null,\n alt_mime_raw: t.alt_mime || null,\n alt_state_link: t.alt_state_link || null,\n alt_text_size: t.alt_text_size || null,\n alt_text_hash: t.alt_text_hash || null\n })),\n votes: bill.votes.map((v: any): zGetBill[\"votes\"][number] => ({\n roll_call_id: v.roll_call_id,\n date: v.date,\n description: v.desc,\n yea: v.yea,\n nay: v.nay,\n abstain: v.nv,\n absent: v.absent,\n total: v.total,\n passed: Boolean(v.passed),\n chamber_id: v.chamber_id,\n chamber_raw: v.chamber,\n url: v.url,\n state_link: v.state_link\n })),\n amendments: bill.amendments.map((a: any): zGetBill[\"amendments\"][number] => ({\n amendment_id: a.amendment_id,\n adopted: Boolean(a.adopted),\n chamber_id: a.chamber_id,\n chamber_raw: a.chamber,\n date: a.date !== \"0000-00-00\" ? a.date : null,\n title: a.title,\n description: a.description,\n mime: asName(Mime, a.mime_id)!,\n mime_id: a.mime_id,\n mime_raw: a.mime,\n url: a.url,\n state_link: a.state_link,\n amendment_size: a.amendment_size,\n amendment_hash: a.amendment_hash,\n alt_amendment: a.alt_amendment || null,\n alt_mime: a.alt_mime_id ? asName(Mime, a.alt_mime_id)! : null,\n alt_mime_id: a.alt_mime_id || null,\n alt_mime_raw: a.alt_mime || null,\n alt_state_link: a.alt_state_link || null,\n alt_amendment_size: a.alt_amendment_size || null,\n alt_amendment_hash: a.alt_amendment_hash || null\n })),\n supplements: bill.supplements.map((s: any): zGetBill[\"supplements\"][number] => ({\n supplement_id: s.supplement_id,\n date: s.date,\n type: asName(SupplementType, s.type_id)!,\n type_id: s.type_id,\n type_raw: s.type,\n mime: asName(Mime, s.mime_id)!,\n mime_id: s.mime_id,\n mime_raw: s.mime,\n url: s.url,\n state_link: s.state_link,\n supplement_size: s.supplement_size,\n supplement_hash: s.supplement_hash,\n alt_supplement: s.alt_supplement || null,\n alt_mime: s.alt_mime_id ? asName(Mime, s.alt_mime_id)! : null,\n alt_mime_id: s.alt_mime_id || null,\n alt_mime_raw: s.alt_mime || null,\n alt_state_link: s.alt_state_link || null,\n alt_supplement_size: s.alt_supplement_size || null,\n alt_supplement_hash: s.alt_supplement_hash || null\n })),\n calendar: bill.calendar.map((c: any): zGetBill[\"calendar\"][number] => ({\n type: asName(EventType, c.type_id)!,\n type_id: c.type_id,\n type_raw: c.type,\n date: c.date,\n time: c.time || null,\n location: c.location || null,\n description: c.description\n }))\n }) as Bill;\n }\n\n /**\n * Get the text of an amendment\n * @cli {getAmendment} amendment\n * @param {number} id amendment ID number (probably from getBill)\n */\n async getAmendment({ id }: { id: number }): Promise<Amendment> {\n const { amendment } = await this.request(\"getAmendment\", { id });\n return zGetAmendment.parse({\n amendment_id: amendment.amendment_id,\n bill_id: amendment.bill_id,\n adopted: Boolean(amendment.adopted),\n chamber_id: amendment.chamber_id,\n chamber_raw: amendment.chamber,\n date: amendment.date !== \"0000-00-00\" ? amendment.date : null,\n title: amendment.title,\n description: amendment.description,\n mime: asName(Mime, amendment.mime_id)!,\n mime_id: amendment.mime_id,\n mime_raw: amendment.mime,\n url: amendment.url,\n state_link: amendment.state_link,\n amendment_size: amendment.amendment_size,\n amendment_hash: amendment.amendment_hash,\n doc: amendment.doc,\n alt_amendment: amendment.alt_amendment || null,\n alt_mime: amendment.alt_mime_id ? asName(Mime, amendment.mime_id)! : null,\n alt_mime_id: amendment.alt_mime_id || null,\n alt_mime_raw: amendment.alt_mime || null,\n alt_state_link: amendment.alt_state_link || null,\n alt_amendment_size: amendment.alt_amendment_size || null,\n alt_amendment_hash: amendment.alt_amendment_hash || null,\n alt_doc: amendment.alt_doc || null\n } satisfies zGetAmendment) as Amendment;\n }\n\n /**\n * Get the text of a supplement (such as a fiscal note or analysis)\n * @cli {getSupplement} supplement\n * @param {number} id supplement ID number (probably from getBill)\n */\n async getSupplement({ id }: { id: number }): Promise<Supplement> {\n const { supplement } = await this.request(\"getSupplement\", { id });\n return zGetSupplement.parse({\n supplement_id: supplement.supplement_id,\n bill_id: supplement.bill_id,\n date: supplement.date !== \"0000-00-00\" ? supplement.date : null,\n type: asName(SupplementType, supplement.type_id)!,\n type_id: supplement.type_id,\n type_raw: supplement.type,\n mime: asName(Mime, supplement.mime_id)!,\n mime_id: supplement.mime_id,\n mime_raw: supplement.mime,\n url: supplement.url,\n state_link: supplement.state_link,\n supplement_size: supplement.supplement_size,\n supplement_hash: supplement.supplement_hash,\n doc: supplement.doc,\n alt_supplement: supplement.alt_supplement || null,\n alt_mime: supplement.alt_mime_id ? asName(Mime, supplement.mime_id)! : null,\n alt_mime_id: supplement.alt_mime_id || null,\n alt_mime_raw: supplement.alt_mime || null,\n alt_state_link: supplement.alt_state_link || null,\n alt_supplement_size: supplement.alt_supplement_size || null,\n alt_supplement_hash: supplement.alt_supplement_hash || null,\n alt_doc: supplement.alt_doc || null\n } satisfies zGetSupplement) as Supplement;\n }\n\n /**\n * Get the details of a roll call vote\n * @cli {getRollCall} rollcall\n * @param {number} id vote ID number\n */\n async getRollCall({ id }: { id: number }): Promise<RollCall> {\n const { roll_call } = await this.request(\"getRollCall\", { id });\n return zGetRollCall.parse({\n roll_call_id: roll_call.roll_call_id,\n bill_id: roll_call.bill_id,\n date: roll_call.date,\n description: roll_call.desc,\n yea: roll_call.yea,\n nay: roll_call.nay,\n abstain: roll_call.nv,\n absent: roll_call.absent,\n total: roll_call.total,\n passed: Boolean(roll_call.passed),\n chamber_id: roll_call.chamber_id,\n chamber_raw: roll_call.chamber,\n votes: numericalToArray(roll_call.votes).map((v: any): zGetRollCall[\"votes\"][number] => ({\n people_id: v.people_id,\n vote: asName(Vote, v.vote_id)!,\n vote_id: v.vote_id,\n vote_raw: v.vote_text\n }))\n } satisfies zGetRollCall) as RollCall;\n }\n\n /**\n * Get details on a person by ID\n * @cli {getPerson} person\n * @param {number} id The Legiscan person ID\n */\n async getPerson({ id }: { id: number }): Promise<Person> {\n const { person } = await this.request(\"getPerson\", { id });\n return zGetPerson.parse({\n people_id: person.people_id,\n person_hash: person.person_hash,\n party: asName(Party, parseInt(person.party_id, 10))!,\n party_id: parseInt(person.party_id, 10),\n party_raw: person.party,\n state: asName(State, person.state_id)!,\n state_id: person.state_id,\n role: asName(Role, person.role_id)!,\n role_id: person.role_id,\n role_raw: person.role,\n name: person.name,\n first_name: person.first_name,\n middle_name: person.middle_name || null,\n last_name: person.last_name,\n suffix: person.suffix || null,\n nickname: person.nickname || null,\n district: person.district,\n ftm_eid: person.ftm_eid,\n votesmart_id: person.votesmart_id || null,\n opensecrets_id: person.opensecrets_id || null,\n knowwho_pid: person.knowwho_pid || null,\n ballotpedia: person.ballotpedia || null,\n bioguide_id: person.bioguide_id || null,\n committee_sponsor: Boolean(person.committee_sponsor),\n committee_id: person.committee_id || null,\n state_federal: Boolean(person.state_federal),\n bio: person.bio\n } satisfies zGetPerson) as Person;\n }\n\n /**\n * Get all active people in a given legislative session\n * @cli {getSessionPeople} sessionpeople\n * @param {number} id The Legiscan session ID\n */\n async getSessionPeople({ id }: { id: number }): Promise<SessionPeople> {\n const {\n sessionpeople: { people }\n } = await this.request(\"getSessionPeople\", { id });\n return zGetSessionPeople.parse(\n (people ?? []).map((person: any): zGetSessionPeople[number] => ({\n people_id: person.people_id,\n person_hash: person.person_hash,\n party: asName(Party, parseInt(person.party_id, 10))!,\n party_id: parseInt(person.party_id, 10),\n party_raw: person.party,\n state: asName(State, person.state_id)!,\n state_id: person.state_id,\n role: asName(Role, person.role_id)!,\n role_id: person.role_id,\n role_raw: person.role,\n name: person.name,\n first_name: person.first_name,\n middle_name: person.middle_name || null,\n last_name: person.last_name,\n suffix: person.suffix || null,\n nickname: person.nickname || null,\n district: person.district,\n ftm_eid: person.ftm_eid,\n votesmart_id: person.votesmart_id || null,\n opensecrets_id: person.opensecrets_id || null,\n knowwho_pid: person.knowwho_pid || null,\n ballotpedia: person.ballotpedia || null,\n bioguide_id: person.bioguide_id || null,\n committee_sponsor: Boolean(person.committee_sponsor),\n committee_id: person.committee_id || null,\n state_federal: Boolean(person.state_federal),\n bio: person.bio\n }))\n ) as SessionPeople;\n }\n\n /**\n * Get a list of bills sponsored by a specific person\n * @cli {getSponsoredList} sponsoredlist\n * @param {number} id Legiscan person ID for the sponsor\n */\n async getSponsoredList({ id }: { id: number }): Promise<SponsoredList> {\n const {\n sponsoredbills: { sessions, bills }\n } = await this.request(\"getSponsoredList\", { id });\n return zGetSponsoredList.parse(\n bills.map((b: any): zGetSponsoredList[number] => ({\n bill_id: b.bill_id,\n bill_number: b.number,\n session: sessions\n .map(\n (s: any): _zSession => ({\n session_id: s.session_id,\n state: asName(State, s.state_id)!,\n state_id: s.state_id,\n year_start: s.year_start,\n year_end: s.year_end,\n prefile: Boolean(s.prefile),\n sine_die: Boolean(s.sine_die),\n prior: Boolean(s.prior),\n special: Boolean(s.special),\n session_tag: s.session_tag,\n session_title: s.session_title,\n session_name: s.session_name\n })\n )\n .find((s: _zSession) => s.session_id === b.session_id)\n }))\n ) as SponsoredList;\n }\n\n /**\n * Get the results of a search as a complete array containing all response pages\n * @cli {getSearch} search\n * @param {string} query Full text query\n * @param {State} [state] US state for this search\n * @param {number} [year] Year where 1=all, 2=current, 3=recent, 4=prior, >1900=exact\n */\n async getSearch({\n query,\n state,\n year\n }: {\n query: string;\n state?: Needle;\n year?: number;\n }): Promise<Search> {\n const items: zGetSearch = [];\n for await (const result of this.getSearchAsync({ query, state, year })) {\n items.push(result);\n }\n return items as Search;\n }\n\n /**\n * Get the results of a search one at a time, as an async iterator\n * @param query\n * @param state US state for this search\n * @param year Year where 1=all, 2=current, 3=recent, 4=prior, >1900=exact\n */\n async *getSearchAsync({\n query,\n state,\n year\n }: {\n query: string;\n state?: Needle;\n year?: number;\n }): AsyncGenerator<Search[number]> {\n let page = 1;\n\n while (true) {\n const { searchresult } = await this.request(\"getSearch\", {\n query,\n page,\n ...(state ? { state: asName(State, state) } : {}),\n ...(year ? { year: year.toString() } : {})\n });\n const items = numericalToArray(searchresult).map(\n (b: any): zGetSearch[number] =>\n ({\n relevance: b.relevance,\n state: b.state,\n state_id: asNumber(State, b.state)!,\n bill_number: b.bill_number,\n bill_id: b.bill_id,\n change_hash: b.change_hash,\n url: b.url,\n text_url: b.text_url,\n research_url: b.research_url,\n last_action: b.last_action,\n last_action_date: b.last_action_date,\n title: b.title\n }) satisfies zGetSearch[number]\n );\n yield* items as Search;\n page++;\n\n if (searchresult.summary.page_total < page) return;\n }\n }\n}\n"],"mappings":";;;AAEA,MAAa,YAAY;CACvB,SAAS;CACT,kBAAkB;CAClB,eAAe;AACjB;AAEA,MAAa,QAAQ;CACnB,UAAU;CACV,YAAY;CACZ,aAAa;CACb,YAAY;CACZ,aAAa;CACb,aAAa;AACf;AAEA,MAAa,WAAW;CACtB,UAAU;CACV,YAAY;CACZ,WAAW;CACX,UAAU;CACV,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,UAAU;CACV,WAAW;CACX,OAAO;CACP,YAAY;CACZ,WAAW;CACX,OAAO;AACT;AAEA,MAAa,SAAS;CACpB,SAAS;CACT,cAAc;CACd,SAAS;CACT,UAAU;CACV,OAAO;CACP,aAAa;CACb,WAAW;CACX,YAAY;CACZ,Y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AAU,EAAE;IACZ,SAAS,QAAQ,EAAE,OAAO;IAC1B,UAAU,QAAQ,EAAE,QAAQ;IAC5B,OAAO,QAAQ,EAAE,KAAK;IACtB,SAAS,QAAQ,EAAE,OAAO;IAC1B,aAAa,EAAE;IACf,eAAe,EAAE;IACjB,cAAc,EAAE;GAClB,EACF,CAAC,CACA,MAAM,MAAiB,EAAE,eAAe,EAAE,UAAU;EACzD,EAAE,CACJ;CACF;;;;;;;;CASA,MAAM,UAAU,EACd,OACA,OACA,QAKkB;EAClB,MAAM,QAAoB,CAAC;EAC3B,WAAW,MAAM,UAAU,KAAK,eAAe;GAAE;GAAO;GAAO;EAAK,CAAC,GACnE,MAAM,KAAK,MAAM;EAEnB,OAAO;CACT;;;;;;;CAQA,OAAO,eAAe,EACpB,OACA,OACA,QAKiC;EACjC,IAAI,OAAO;EAEX,OAAO,MAAM;GACX,MAAM,EAAE,iBAAiB,MAAM,KAAK,QAAQ,aAAa;IACvD;IACA;IACA,GAAI,QAAQ,EAAE,OAAO,OAAO,OAAO,KAAK,EAAE,IAAI,CAAC;IAC/C,GAAI,OAAO,EAAE,MAAM,KAAK,SAAS,EAAE,IAAI,CAAC;GAC1C,CAAC;GAkBD,OAjBc,iBAAiB,YAAY,CAAC,CAAC,KAC1C,OACE;IACC,WAAW,EAAE;IACb,OAAO,EAAE;IACT,UAAU,SAAS,OAAO,EAAE,KAAK;IACjC,aAAa,EAAE;IACf,SAAS,EAAE;IACX,aAAa,EAAE;IACf,KAAK,EAAE;IACP,UAAU,EAAE;IACZ,cAAc,EAAE;IAChB,aAAa,EAAE;IACf,kBAAkB,EAAE;IACpB,OAAO,EAAE;GACX,EAEO;GACX;GAEA,IAAI,aAAa,QAAQ,aAAa,MAAM;EAC9C;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["z","z"],"sources":["../src/enums.ts","../src/types.ts","../src/client.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport const EventType = {\n\tHearing: 1,\n\tExecutiveSession: 2,\n\tMarkupSession: 3,\n} as const;\n\nexport const Party = {\n\tDemocrat: 1,\n\tRepublican: 2,\n\tIndependent: 3,\n\tGreenParty: 4,\n\tLibertarian: 5,\n\tNonpartisan: 6,\n} as const;\n\nexport const Progress = {\n\tPrefiled: 0,\n\tIntroduced: 1,\n\tEngrossed: 2,\n\tEnrolled: 3,\n\tPassed: 4,\n\tVetoed: 5,\n\tFailed: 6,\n\tOverride: 7,\n\tChaptered: 8,\n\tRefer: 9,\n\tReportPass: 10,\n\tReportDnp: 11,\n\tDraft: 12,\n} as const;\n\nexport const Reason = {\n\tNewBill: 1,\n\tStatusChange: 2,\n\tChamber: 3,\n\tComplete: 4,\n\tTitle: 5,\n\tDescription: 6,\n\tCommRefer: 7,\n\tCommReport: 8,\n\tSponsorAdd: 9,\n\tSponsorRemove: 10,\n\tSponsorChange: 11,\n\tHistoryAdd: 12,\n\tHistoryRemove: 13,\n\tHistoryRevised: 14,\n\tHistoryMajor: 15,\n\tHistoryMinor: 16,\n\tSubjectAdd: 17,\n\tSubjectRemove: 18,\n\tSast: 19,\n\tText: 20,\n\tAmendment: 21,\n\tSupplement: 22,\n\tVote: 23,\n\tCalendar: 24,\n\tProgress: 25,\n\tVoteUpdate: 26,\n\tTextUpdate: 27,\n\tIcbm: 99,\n} as const;\n\nexport const Role = {\n\tRepresentative: 1,\n\tSenator: 2,\n\tJointConference: 3,\n} as const;\n\nexport const SastType = {\n\tSameAs: 1,\n\tSimilarTo: 2,\n\tReplacedBy: 3,\n\tReplaces: 4,\n\tCrossfiled: 5,\n\tEnablingFor: 6,\n\tEnabledBy: 7,\n\tRelated: 8,\n\tCarryOver: 9,\n} as const;\n\nexport const SponsorType = {\n\tSponsor: 0,\n\tPrimarySponsor: 1,\n\tCoSponsor: 2,\n\tJointSponsor: 3,\n} as const;\n\nexport const Stance = {\n\tWatch: 0,\n\tSupport: 1,\n\tOppose: 2,\n} as const;\n\nexport const SupplementType = {\n\tFiscalNote: 1,\n\tAnalysis: 2,\n\tFiscalNoteAnalysis: 3,\n\tVoteImage: 4,\n\tLocalMandate: 5,\n\tCorrectionsImpact: 6,\n\tMisc: 7,\n\tVetoLetter: 8,\n} as const;\n\nexport const TextType = {\n\tIntroduced: 1,\n\tCommitteeSubstitute: 2,\n\tAmended: 3,\n\tEngrossed: 4,\n\tEnrolled: 5,\n\tChaptered: 6,\n\tFiscalNote: 7,\n\tAnalysis: 8,\n\tDraft: 9,\n\tConferenceSubstitute: 10,\n\tPrefiled: 11,\n\tVetoMessage: 12,\n\tVetoResponse: 13,\n\tSubstitute: 14,\n} as const;\n\nexport const BillType = {\n\tBill: 1,\n\tResolution: 2,\n\tConcurrentResolution: 3,\n\tJointResolution: 4,\n\tJointResolutionConstitutionalAmendment: 5,\n\tExecutiveOrder: 6,\n\tConstitutionalAmendment: 7,\n\tMemorial: 8,\n\tClaim: 9,\n\tCommendation: 10,\n\tCommitteeStudyRequest: 11,\n\tJointMemorial: 12,\n\tProclamation: 13,\n\tStudyRequest: 14,\n\tAddress: 15,\n\tConcurrentMemorial: 16,\n\tInitiative: 17,\n\tPetition: 18,\n\tStudyBill: 19,\n\tInitiativePetition: 20,\n\tRepealBill: 21,\n\tRemonstration: 22,\n\tCommitteeBill: 23,\n} as const;\n\nexport const VoteType = {\n\tYea: 1,\n\tNay: 2,\n\tAbstain: 3,\n\tAbsent: 4,\n} as const;\n\nexport const State = {\n\tAL: 1,\n\tAK: 2,\n\tAZ: 3,\n\tAR: 4,\n\tCA: 5,\n\tCO: 6,\n\tCT: 7,\n\tDE: 8,\n\tFL: 9,\n\tGA: 10,\n\tHI: 11,\n\tID: 12,\n\tIL: 13,\n\tIN: 14,\n\tIA: 15,\n\tKS: 16,\n\tKY: 17,\n\tLA: 18,\n\tME: 19,\n\tMD: 20,\n\tMA: 21,\n\tMI: 22,\n\tMN: 23,\n\tMS: 24,\n\tMO: 25,\n\tMT: 26,\n\tNE: 27,\n\tNV: 28,\n\tNH: 29,\n\tNJ: 30,\n\tNM: 31,\n\tNY: 32,\n\tNC: 33,\n\tND: 34,\n\tOH: 35,\n\tOK: 36,\n\tOR: 37,\n\tPA: 38,\n\tRI: 39,\n\tSC: 40,\n\tSD: 41,\n\tTN: 42,\n\tTX: 43,\n\tUT: 44,\n\tVT: 45,\n\tVA: 46,\n\tWA: 47,\n\tWV: 48,\n\tWI: 49,\n\tWY: 50,\n\tDC: 51,\n\tUS: 52,\n} as const;\n\nexport const Mime = {\n\tHTML: 1,\n\tPDF: 2,\n\tWPD: 3,\n\tDOC: 4,\n\tRTF: 5,\n\tDOCX: 6,\n} as const;\n\nexport type Needle = number | string;\n\nexport function asName<T extends Record<string, number>>(\n\thaystack: T,\n\tneedle: Needle,\n): keyof T | undefined {\n\treturn Object.entries(haystack).find(\n\t\t([k, v]) => k === String(needle) || v === Number(needle),\n\t)?.[0] as keyof T | undefined;\n}\n\nexport function asNumber<T extends Record<string, number>>(\n\thaystack: T,\n\tneedle: Needle,\n): number | undefined {\n\treturn Object.entries(haystack).find(\n\t\t([k, v]) => k === String(needle) || v === Number(needle),\n\t)?.[1] as T[keyof T] | undefined;\n}\n\nexport function zNames<T extends Record<string, number>>(haystack: T) {\n\treturn z.union(Object.keys(haystack).map((k) => z.literal(k)));\n}\n\nexport function zNumbers<T extends Record<string, number>>(haystack: T) {\n\treturn z.union(Object.values(haystack).map((n) => z.literal(n)));\n}\n","import { z } from \"zod\";\nimport {\n\tBillType,\n\tEventType,\n\tMime,\n\tParty,\n\tProgress,\n\tRole,\n\tSastType,\n\tSponsorType,\n\tState,\n\tSupplementType,\n\tTextType,\n\tVoteType,\n\tzNames,\n\tzNumbers,\n} from \"./enums.ts\";\n\nexport const SessionSchema = z.object({\n\tsession_id: z.number().describe(\"Internal session id\"),\n\tsession_name: z.string().describe(\"State specific session name\"),\n\tsession_title: z\n\t\t.string()\n\t\t.describe(\n\t\t\t\"Normalized session title with year(s) and Regular/Nth Special Session\",\n\t\t),\n\tsession_tag: z.unknown(), // undocumented\n\n\tstate: zNames(State).describe(\"Normalized state\"),\n\tstate_id: zNumbers(State).describe(\"Internal state id\"),\n\n\tyear_start: z.number().describe(\"Starting year of session\"),\n\tyear_end: z.number().describe(\"Ending year of session\"),\n\n\tspecial: z.boolean().describe(\"Flag for being a special session\"),\n\tprefile: z.boolean().describe(\"Flag for session being in prefile\"),\n\tprior: z.boolean().describe(\"Flag for session being archived\"),\n\tsine_die: z.boolean().describe(\"Flag for session being adjourned sine die\"),\n});\n\nexport const SessionListSchema = z.array(\n\tSessionSchema.extend({\n\t\tsession_hash: z\n\t\t\t.hash(\"md5\")\n\t\t\t.nullable()\n\t\t\t.describe(\"Hash of session data, used for caching\"),\n\t\tdataset_hash: z\n\t\t\t.hash(\"md5\")\n\t\t\t.nullable()\n\t\t\t.describe(\"Hash of entire dataset, used for caching\"),\n\t}),\n);\n\nexport const BillTextSchema = z.object({\n\tdoc_id: z.number().describe(\"Internal document id\"),\n\tbill_id: z.number().optional().describe(\"Internal bill id\"),\n\ttype: zNames(TextType).describe(\"Type of draft text\"),\n\ttype_id: zNumbers(TextType).describe(\"Internal text type id\"),\n\ttype_raw: z.string().describe(\"Internal text type name\"),\n\tdate: z.iso.date().describe(\"Document date (if available)\"),\n\turl: z.url().describe(\"URL of document on legiscan.com\"),\n\tstate_link: z.url().describe(\"URL of document on state website\"),\n\n\tmime: zNames(Mime).describe(\"Normalized file type, e.g. 'PDF'\"),\n\tmime_id: zNumbers(Mime).describe(\"Internal file type id\"),\n\tmime_raw: z\n\t\t.string()\n\t\t.describe(\"Raw MIME type of the document, e.g. 'application/pdf'\"),\n\ttext_size: z\n\t\t.number()\n\t\t.describe(\n\t\t\t\"Size in bytes of the decoded BASE64 document (add 33% for base64)\",\n\t\t),\n\ttext_hash: z.hash(\"md5\").describe(\"MD5 hash of the decoded BASE64 document\"),\n\n\talt_doc_id: z.number().nullable().describe(\"Internal alternate bill text id\"),\n\talt_mime: zNames(Mime)\n\t\t.nullable()\n\t\t.describe(\"Normalized file type of alternate document, e.g. 'PDF'\"),\n\talt_mime_id: zNumbers(Mime)\n\t\t.nullable()\n\t\t.describe(\"Internal file type id of alternate document\"),\n\talt_mime_raw: z\n\t\t.string()\n\t\t.nullable()\n\t\t.describe(\n\t\t\t\"Raw MIME type of the alternate document, e.g. 'application/pdf'\",\n\t\t),\n\talt_state_link: z\n\t\t.url()\n\t\t.nullable()\n\t\t.describe(\"URL of alternate document on state website\"),\n\talt_text_size: z\n\t\t.number()\n\t\t.nullable()\n\t\t.describe(\n\t\t\t\"Size in bytes of the decoded BASE64 alternate document (add 33% for base64)\",\n\t\t),\n\talt_text_hash: z\n\t\t.hash(\"md5\")\n\t\t.nullable()\n\t\t.describe(\"MD5 hash of the decoded BASE64 alternate document\"),\n\n\t// TODO - included on exact request only\n\tdoc: z.base64().describe(\"BASE64 encoded document\").nullish(),\n\talt_doc: z.base64().describe(\"BASE64 encoded alternate document\").nullish(), // undocumented\n});\n\nexport const CommitteeSchema = z.object({\n\tcommittee_id: z.number().describe(\"Internal committee id\"),\n\tchamber_raw: z.string().describe(\"Internal chamber name, e.g. 'S' or 'H'\"),\n\tchamber_id: z.number().describe(\"Internal chamber id\"),\n\tname: z.string().describe(\"Committee name\"),\n});\n\nexport const CommitteeReferralSchema = z.intersection(\n\tCommitteeSchema,\n\tz.object({\n\t\tdate: z.iso.date().describe(\"Date of referral\"),\n\t}),\n);\n\nexport const BillProgressSchema = z.object({\n\tdate: z.iso.date().describe(\"Date of progress event\"),\n\tevent: zNames(Progress).describe(\"Normalized progress event\"),\n\tevent_id: zNumbers(Progress).describe(\"Internal progress event id\"),\n});\n\nexport const BillHistorySchema = z.object({\n\tdate: z.iso.date().describe(\"Date of action\"),\n\taction: z.string().describe(\"Description of action taken\"),\n\tchamber_raw: z.string().nullable().describe(\"Internal chamber name\"),\n\tchamber_id: z.number().nullable().describe(\"Internal chamber id\"),\n\timportance: z\n\t\t.boolean()\n\t\t.describe(\"Flag for major steps (i.e. those included in progress list)\"),\n});\n\nexport const PersonSchema = z.object({\n\tpeople_id: z.number().describe(\"Internal person id\"),\n\tperson_hash: z\n\t\t.string()\n\t\t.describe(\"Hash of the person's details, used for caching\"),\n\tparty: zNames(Party).describe(\n\t\t\"Normalized party, e.g. 'Democrat' or 'Republican'\",\n\t),\n\tparty_id: zNumbers(Party).describe(\"Internal party id\"),\n\tparty_raw: z.string().describe(\"Internal party name\"),\n\tstate: zNames(State).describe(\"Normalized state\"),\n\tstate_id: zNumbers(State).describe(\"Internal state id\"),\n\trole: zNames(Role).describe(\n\t\t\"Normalized role, e.g. 'Senator' or 'Representative'\",\n\t),\n\trole_id: zNumbers(Role).describe(\"Internal role id\"),\n\trole_raw: z.string().describe(\"Internal role name\"),\n\tname: z.string().describe(\"Person's full name\"),\n\tfirst_name: z.string().describe(\"Person's first name\"),\n\tmiddle_name: z.string().nullable().describe(\"Person's middle name\"),\n\tlast_name: z.string().describe(\"Person's last name\"),\n\tsuffix: z.string().nullable().describe(\"Person's suffix\"),\n\tnickname: z.string().nullable().describe(\"Person's nickname\"),\n\tdistrict: z.string().describe(\"Person's district\"),\n\tftm_eid: z.number().nullable().describe(\"FollowTheMoney ID of the person\"),\n\tvotesmart_id: z.number().nullable().describe(\"Votesmart ID of the person\"),\n\topensecrets_id: z\n\t\t.number()\n\t\t.nullable()\n\t\t.describe(\"OpenSecrets ID of the person\"),\n\tknowwho_pid: z.number().nullable().describe(\"KnowWho PID of the person\"),\n\tballotpedia: z.string().nullable().describe(\"Ballotpedia ID of the person\"),\n\tbioguide_id: z.string().nullable().describe(\"Bioguide ID of the person\"),\n\n\tcommittee_sponsor: z.boolean().describe(\"Flag for committee sponsorship\"),\n\tcommittee_id: z.number().nullable().describe(\"Internal committee id\"),\n\tstate_federal: z.unknown(), // undocumented\n\tbio: z.unknown(), // undocumented\n});\n\nexport const SastSchema = z.object({\n\ttype: zNames(SastType).describe(\"Normalized sast type\"),\n\ttype_id: zNumbers(SastType).describe(\"Internal sast id\"),\n\ttype_raw: z.string().describe(\"Internal sast type name\"),\n\tsast_bill_number: z\n\t\t.string()\n\t\t.describe(\"Bill number of the sast, e.g. HB 1234\"),\n\tsast_bill_id: z.number().describe(\"Internal bill id of the sast\"),\n});\n\nexport const SubjectSchema = z.object({\n\tsubject_id: z.number().describe(\"Internal subject id\"),\n\tsubject_name: z.string().describe(\"Name of the subject\"),\n});\n\nexport const VoteSchema = z.object({\n\troll_call_id: z.number().describe(\"Internal roll call id\"),\n\tdate: z.iso.date().describe(\"Date of the vote\"),\n\tdescription: z.string().describe(\"Description of the vote\"),\n\tyea: z.number().describe(\"Number of votes for the bill\"),\n\tnay: z.number().describe(\"Number of votes against the bill\"),\n\tabstain: z.number().describe(\"Number of votes that abstained\"),\n\tabsent: z.number().describe(\"Number of votes that were absent\"),\n\ttotal: z.number().describe(\"Total number of votes\"),\n\tpassed: z.boolean().describe(\"Flag for whether the vote passed\"),\n\tchamber_id: z.number().describe(\"Internal chamber id\"),\n\tchamber_raw: z.string().describe(\"Internal chamber name, e.g. 'S' or 'H'\"),\n});\n\nexport const AmendmentSchema = z.object({\n\tamendment_id: z.number().describe(\"Internal amendment id\"),\n\tadopted: z.boolean().describe(\"Flag for whether the amendment was adopted\"),\n\tchamber_id: z.number().describe(\"Internal chamber id\"),\n\tchamber_raw: z.string().describe(\"Internal chamber name, e.g. 'S' or 'H'\"),\n\tdate: z.iso.date().nullable().describe(\"Date of the amendment\"),\n\ttitle: z.string().describe(\"Official amendment title\"),\n\tdescription: z.string().describe(\"Official amendment description\"),\n\tmime: zNames(Mime).describe(\"Normalized file type, e.g. 'PDF'\"),\n\tmime_id: zNumbers(Mime).describe(\"Internal file type id\"),\n\tmime_raw: z\n\t\t.string()\n\t\t.describe(\"Raw MIME type of the document, e.g. 'application/pdf'\"),\n\turl: z.url().describe(\"URL of the amendment on legiscan.com\"),\n\tstate_link: z.url().describe(\"URL of the amendment on state website\"),\n\tamendment_size: z\n\t\t.number()\n\t\t.describe(\n\t\t\t\"Size in bytes of the decoded BASE64 document (add 33% for base64)\",\n\t\t),\n\tamendment_hash: z\n\t\t.hash(\"md5\")\n\t\t.describe(\"MD5 hash of the decoded BASE64 document\"),\n\talt_amendment: z\n\t\t.number()\n\t\t.nullable()\n\t\t.describe(\"Internal alternate amendment id\"),\n\talt_mime: zNames(Mime)\n\t\t.nullable()\n\t\t.describe(\"Normalized file type of alternate document, e.g. 'PDF'\"),\n\talt_mime_id: zNumbers(Mime)\n\t\t.nullable()\n\t\t.describe(\"Internal file type id of alternate document\"),\n\talt_mime_raw: z\n\t\t.string()\n\t\t.nullable()\n\t\t.describe(\n\t\t\t\"Raw MIME type of the alternate document, e.g. 'application/pdf'\",\n\t\t),\n\talt_state_link: z\n\t\t.url()\n\t\t.nullable()\n\t\t.describe(\"URL of the alternate document on state website\"),\n\talt_amendment_size: z\n\t\t.number()\n\t\t.nullable()\n\t\t.describe(\n\t\t\t\"Size in bytes of the decoded alternate BASE64 document (add 33% for base64)\",\n\t\t),\n\talt_amendment_hash: z\n\t\t.hash(\"md5\")\n\t\t.nullable()\n\t\t.describe(\"MD5 hash of the decoded alternate BASE64 document\"),\n\n\t// TODO - included on exact request only\n\tbill_id: z\n\t\t.number()\n\t\t.describe(\"Internal bill id the amendment belongs to\")\n\t\t.nullish(),\n\tdoc: z.base64().describe(\"BASE64 encoded document\").nullish(),\n\talt_doc: z\n\t\t.base64()\n\t\t.nullable()\n\t\t.describe(\"BASE64 encoded alternate document\")\n\t\t.nullish(),\n});\n\nexport const SupplementSchema = z.object({\n\tsupplement_id: z.number().describe(\"Internal supplement id\"),\n\tdate: z.iso.date().nullable().describe(\"Date of the supplement\"),\n\ttype: zNames(SupplementType).describe(\"Normalized supplement type\"),\n\ttype_id: zNumbers(SupplementType).describe(\"Internal supplement type id\"),\n\ttype_raw: z.string().describe(\"Internal supplement type name\"),\n\tmime: zNames(Mime).describe(\"Normalized file type, e.g. 'PDF'\"),\n\tmime_id: zNumbers(Mime).describe(\"Internal file type id\"),\n\tmime_raw: z\n\t\t.string()\n\t\t.describe(\"Raw mime type of the document, e.g. 'application/pdf'\"),\n\turl: z.url().describe(\"URL of the supplement on legiscan.com\"),\n\tstate_link: z.url().describe(\"URL of the supplement on state website\"),\n\tsupplement_size: z\n\t\t.number()\n\t\t.describe(\n\t\t\t\"Size in bytes of the decoded BASE64 document (add 33% for base64)\",\n\t\t),\n\tsupplement_hash: z\n\t\t.hash(\"md5\")\n\t\t.describe(\"MD5 hash of the decoded BASE64 document\"),\n\talt_supplement: z\n\t\t.number()\n\t\t.nullable()\n\t\t.describe(\"Internal alternate supplement id\"),\n\talt_mime: zNames(Mime)\n\t\t.nullable()\n\t\t.describe(\"Normalized file type of alternate document, e.g. 'PDF'\"),\n\talt_mime_id: zNumbers(Mime)\n\t\t.nullable()\n\t\t.describe(\"Internal file type id of alternate document\"),\n\talt_mime_raw: z\n\t\t.string()\n\t\t.nullable()\n\t\t.describe(\n\t\t\t\"Raw MIME type of the alternate document, e.g. 'application/pdf'\",\n\t\t),\n\talt_state_link: z\n\t\t.url()\n\t\t.nullable()\n\t\t.describe(\"URL of the alternate document on state website\"),\n\talt_supplement_size: z\n\t\t.number()\n\t\t.nullable()\n\t\t.describe(\n\t\t\t\"Size in bytes of the decoded alternate BASE64 document (add 33% for base64)\",\n\t\t),\n\talt_supplement_hash: z\n\t\t.hash(\"md5\")\n\t\t.nullable()\n\t\t.describe(\"MD5 hash of the decoded alternate BASE64 document\"),\n\n\t// TODO - included on exact request only\n\tbill_id: z\n\t\t.number()\n\t\t.describe(\"Internal bill id the supplement belongs to\")\n\t\t.nullish(),\n\tdoc: z.base64().describe(\"BASE64 encoded document\").nullish(),\n\talt_doc: z\n\t\t.base64()\n\t\t.nullable()\n\t\t.describe(\"BASE64 encoded alternate document\")\n\t\t.nullish(),\n});\n\nexport const EventSchema = z.object({\n\ttype: zNames(EventType).describe(\"Normalized event type\"),\n\ttype_id: zNumbers(EventType).describe(\"Internal event type id\"),\n\ttype_raw: z.string().describe(\"Internal event type name\"),\n\tdate: z.iso.date().describe(\"Date of the event\"),\n\ttime: z.iso.time().nullable().describe(\"Time of the event (if available)\"),\n\tlocation: z\n\t\t.string()\n\t\t.nullable()\n\t\t.describe(\"Location of the event (if available)\"),\n\tdescription: z.string().describe(\"Description of the event\"),\n});\n\nexport const BillBaseSchema = z.object({\n\tbill_id: z.number().describe(\"Internal bill id\"),\n\tbill_number: z.string().describe(\"Bill number, e.g. HB 1234\"),\n\ttitle: z.string().describe(\"Official bill title\"),\n\tdescription: z.string().describe(\"Official bill description\"),\n\turl: z.url().describe(\"URL of bill on legiscan.com\"),\n\n\tstatus: zNames(Progress).describe(\"Latest bill progress, e.g. 'Introduced'\"),\n\tstatus_id: zNumbers(Progress).nullable().describe(\"Internal progress id\"),\n\tstatus_date: z.iso\n\t\t.date()\n\t\t.nullable()\n\t\t.describe(\"Date of last progress update (if available)\"),\n\tchange_hash: z.hash(\"md5\").describe(\"Hash of bill data, used for caching\"),\n});\n\nexport const MasterListSchema = z.array(\n\tBillBaseSchema.extend({\n\t\tlast_action: z\n\t\t\t.string()\n\t\t\t.nullable()\n\t\t\t.describe(\"Description of the bill's last action (if available)\"),\n\t\tlast_action_date: z.iso\n\t\t\t.date()\n\t\t\t.nullable()\n\t\t\t.describe(\"Date of the bill's last action (if available)\"),\n\t}),\n);\n\nexport const SearchSchema = z.array(\n\tBillBaseSchema.extend({\n\t\trelevance: z.number().describe(\"Relevance score of the search result\"),\n\t\tstate: zNames(State).describe(\"Normalized state\"),\n\t\tstate_id: zNumbers(State).describe(\"Internal state id\"),\n\t\tbill_id: z.number().describe(\"Internal bill id\"),\n\t\ttext_url: z.url().describe(\"URL of the bill text on legiscan.com\"),\n\t\tresearch_url: z\n\t\t\t.url()\n\t\t\t.describe(\"URL of the bill research page on legiscan.com\"),\n\t\tlast_action: z\n\t\t\t.string()\n\t\t\t.nullable()\n\t\t\t.describe(\"Description of the bill's last action (if available)\"),\n\t\tlast_action_date: z.iso\n\t\t\t.date()\n\t\t\t.nullable()\n\t\t\t.describe(\"Date of the bill's last action (if available)\"),\n\t}).omit({\n\t\tdescription: true,\n\t\tstatus: true,\n\t\tstatus_id: true,\n\t\tstatus_date: true,\n\t}),\n);\n\nexport const BillVoteSchema = VoteSchema.extend({\n\turl: z.url().describe(\"URL of the vote on legiscan.com\"),\n\tstate_link: z.url().describe(\"URL of the vote on state website\"),\n});\n\nexport const SponsorSchema = PersonSchema.extend({\n\tsponsor_type: zNames(SponsorType).describe(\"Normalized sponsor type\"),\n\tsponsor_type_id: zNumbers(SponsorType).describe(\"Internal sponsor type id\"),\n\tsponsor_order: z.number().describe(\"Order of sponsorship\"),\n});\n\nexport const BillSchema = BillBaseSchema.extend({\n\tsession_id: z.number().describe(\"Internal session id\"),\n\tsession: SessionSchema.describe(\"Session object\"),\n\tstate_link: z.url().describe(\"URL of bill on state website\"),\n\tcompleted: z.boolean().describe(\"Flag for whether bill is completed\"),\n\tprogress: z\n\t\t.array(BillProgressSchema)\n\t\t.describe(\"Major history of the bill (i.e. important items from history)\"),\n\tstate: zNames(State).describe(\"Normalized state\"),\n\tstate_id: zNumbers(State).describe(\"Internal state id\"),\n\tstate_raw: z.string().describe(\"Internal state name\"),\n\tbill_type: zNames(BillType).describe(\n\t\t\"Normalized bill type, e.g. 'JointResolution'\",\n\t),\n\tbill_type_id: zNumbers(BillType).describe(\"Internal bill type id\"),\n\tbill_type_raw: z.string().describe(\"Internal bill type name, e.g. 'JR'\"),\n\tbody_id: z.number().describe(\"Internal body id (original)\"),\n\tbody_raw: z.string().describe(\"Internal body name (original)\"),\n\tcurrent_body_id: z.number().nullable().describe(\"Internal body id (current)\"),\n\tcurrent_body_raw: z\n\t\t.string()\n\t\t.nullable()\n\t\t.describe(\"Internal body name (current)\"),\n\tpending_committee_id: z.number().describe(\"Internal committee id\"),\n\tcommittee: z.array(CommitteeSchema).describe(\"List of committees if pending\"),\n\treferrals: z\n\t\t.array(CommitteeReferralSchema)\n\t\t.describe(\"History of committee referrals\"),\n\thistory: z.array(BillHistorySchema).describe(\"Full history of the bill\"),\n\tsponsors: z.array(SponsorSchema).describe(\"Sponsors of the bill\"),\n\tsasts: z.array(SastSchema).describe(\"SASTs of the bill\"),\n\tsubjects: z.array(SubjectSchema).describe(\"Subjects of the bill\"),\n\ttexts: z.array(BillTextSchema).describe(\"Documents from the bill\"),\n\tvotes: z.array(BillVoteSchema).describe(\"Votes for the bill\"),\n\tamendments: z.array(AmendmentSchema).describe(\"Amendments to the bill\"),\n\tsupplements: z.array(SupplementSchema).describe(\"Supplements to the bill\"),\n\tcalendar: z.array(EventSchema).describe(\"Events related to the bill\"),\n});\n\nexport const RollCallVoteSchema = z.object({\n\tpeople_id: z.number().describe(\"Internal person id\"),\n\tvote: zNames(VoteType).describe(\"Vote of the person\"),\n\tvote_id: zNumbers(VoteType).describe(\"Internal vote id\"),\n\tvote_raw: z.string().describe(\"Internal vote name\"),\n});\n\nexport const RollCallSchema = VoteSchema.extend({\n\tbill_id: z.number().describe(\"Internal bill id the vote belongs to\"),\n\tvotes: z\n\t\t.array(RollCallVoteSchema)\n\t\t.describe(\"Individual votes for the roll call\"),\n});\n\nexport const SessionPeopleSchema = z.array(PersonSchema.extend({}));\n\nexport const SponsoredListSchema = z.array(\n\tz.object({\n\t\tbill_id: z.number().describe(\"Internal bill id\"),\n\t\tbill_number: z.string().describe(\"Bill number, e.g. HB 1234\"),\n\t\tsession: SessionSchema,\n\t}),\n);\n","// API docs: https://legiscan.com/misc/LegiScan_API_User_Manual.pdf\n\nimport {\n\tasName,\n\tasNumber,\n\tBillType,\n\tEventType,\n\tMime,\n\ttype Needle,\n\tParty,\n\tProgress,\n\tRole,\n\tSastType,\n\tSponsorType,\n\tState,\n\tSupplementType,\n\tTextType,\n\tVoteType,\n} from \"./enums.ts\";\nimport type {\n\tAmendment,\n\tBill,\n\tBillText,\n\tMasterList,\n\tPerson,\n\tRollCall,\n\tSearch,\n\tSessionList,\n\tSessionPeople,\n\tSponsoredList,\n\tSupplement,\n} from \"./types.g.ts\";\nimport {\n\tAmendmentSchema,\n\tBillSchema,\n\tBillTextSchema,\n\tMasterListSchema,\n\tPersonSchema,\n\tRollCallSchema,\n\tSearchSchema,\n\tSessionListSchema,\n\tSessionPeopleSchema,\n\tSponsoredListSchema,\n\tSupplementSchema,\n} from \"./types.ts\";\n\n/**\n * Converts a PHP object with numerical keys into entries for consumption by other JS methods\n * Discards any string keys it finds along the way\n * @param object numerically-keyed object to convert to an array\n */\n\nfunction* numericalEntries(object: Record<string, any>) {\n\tfor (const k in object) {\n\t\tif (k.match(/^\\d+$/)) {\n\t\t\tyield [Number(k), object[k]];\n\t\t}\n\t}\n}\n\n/**\n * Converts a PHP object into a JS array using {@link numericalEntries}\n * @param object PHP-style object to convert\n */\n\nexport function numericalToArray(object: Record<string, any>) {\n\treturn Array.from(numericalEntries(object), (entry) => entry[1]);\n}\n\n/**\n * Class to instantiate a client for the Legiscan API\n */\nexport class LegiscanClient {\n\tpublic key: string | undefined;\n\n\t/**\n\t * @param key the key for the API, defaults to your $LEGISCAN_API_KEY env variable\n\t */\n\tconstructor(key?: string | undefined) {\n\t\tthis.key = key ?? process?.env?.LEGISCAN_API_KEY;\n\t}\n\n\t/**\n\t * Make an API request, adding the key automatically\n\t * @param op The API endpoint to hit (e.g., getSearchRaw)\n\t * @param params Query parameters to add to the request URL\n\t */\n\tasync request(op: string, params: Record<string, unknown> = {}) {\n\t\tconst url = new URL(\"https://api.legiscan.com/\");\n\t\turl.search = new URLSearchParams({\n\t\t\top: op,\n\t\t\tkey: this.key!,\n\t\t\t...params,\n\t\t}).toString();\n\n\t\tconst response = await (await fetch(url.toString())).json();\n\t\tif (response.status === \"ERROR\") {\n\t\t\tthrow new Error(\n\t\t\t\t`Legiscan API rejected request: ${response.alert?.message ?? \"no reason given\"}`,\n\t\t\t);\n\t\t}\n\t\treturn response;\n\t}\n\n\t/*\n Other API methods to stub out:\n - getSearchRaw(query, { state?, year?, id? })\n - getDatasetList({ state?, year? })\n - getDataset(id, key)\n - getMonitorList(record?)\n - getMonitorListRaw(record?)\n - setMonitor(list, action, stance?)\n */\n\n\t/**\n\t * Get a list of sessions for a state\n\t * @cli {getSessionList} sessionlist\n\t * @param {State} [state] The US state, or all states if omitted\n\t */\n\tasync getSessionList({ state }: { state?: Needle }): Promise<SessionList> {\n\t\tconst { sessions } = await this.request(\"getSessionList\", {\n\t\t\t...(state ? { state: asName(State, state) } : {}),\n\t\t});\n\t\treturn SessionListSchema.parse(\n\t\t\tsessions.map(\n\t\t\t\t(s: any) =>\n\t\t\t\t\t({\n\t\t\t\t\t\tsession_id: s.session_id,\n\t\t\t\t\t\tstate: asName(State, s.state_id)!,\n\t\t\t\t\t\tstate_id: s.state_id,\n\t\t\t\t\t\tyear_start: s.year_start,\n\t\t\t\t\t\tyear_end: s.year_end,\n\t\t\t\t\t\tspecial: Boolean(s.special),\n\t\t\t\t\t\tprefile: Boolean(s.prefile),\n\t\t\t\t\t\tprior: Boolean(s.prior),\n\t\t\t\t\t\tsine_die: Boolean(s.sine_die),\n\t\t\t\t\t\tsession_name: s.session_name,\n\t\t\t\t\t\tsession_title: s.session_title,\n\t\t\t\t\t\tsession_tag: s.session_tag,\n\n\t\t\t\t\t\tdataset_hash: s.dataset_hash,\n\t\t\t\t\t\tsession_hash: s.session_hash,\n\t\t\t\t\t}) satisfies SessionList[number],\n\t\t\t),\n\t\t);\n\t}\n\n\t/**\n\t * Get a list of all bills for a given session or state\n\t * @cli {getMasterList} masterlist\n\t * @param {State} [state] US State, will return the current session\n\t * @param {number} [session] the ID retrieved from getSessionList()\n\t */\n\tasync getMasterList({\n\t\tstate,\n\t\tsession,\n\t}: {\n\t\tstate?: Needle;\n\t\tsession?: number;\n\t}): Promise<MasterList> {\n\t\tconst { masterlist } = await this.request(\"getMasterList\", {\n\t\t\t...(state ? { state: asName(State, state) } : {}),\n\t\t\t...(session ? { id: session.toString() } : {}),\n\t\t});\n\t\treturn MasterListSchema.parse(\n\t\t\tnumericalToArray(masterlist).map(\n\t\t\t\t(b: any) =>\n\t\t\t\t\t({\n\t\t\t\t\t\tbill_id: b.bill_id,\n\t\t\t\t\t\tbill_number: b.number,\n\t\t\t\t\t\ttitle: b.title,\n\t\t\t\t\t\tdescription: b.description,\n\t\t\t\t\t\turl: b.url,\n\t\t\t\t\t\tstatus: asName(Progress, b.status)!,\n\t\t\t\t\t\tstatus_id: b.status,\n\t\t\t\t\t\tstatus_date: b.status_date,\n\t\t\t\t\t\tlast_action: b.last_action,\n\t\t\t\t\t\tlast_action_date:\n\t\t\t\t\t\t\tb.last_action_date !== \"0000-00-00\" ? b.last_action_date : null,\n\t\t\t\t\t\tchange_hash: b.change_hash,\n\t\t\t\t\t}) satisfies MasterList[number],\n\t\t\t),\n\t\t);\n\t}\n\n\t/**\n\t * Get the full text of a bill\n\t * @cli {getBillText} billtext\n\t * @param {number} id bill ID to request\n\t */\n\tasync getBillText({ id }: { id: number }): Promise<BillText> {\n\t\tconst { text } = await this.request(\"getBillText\", { id });\n\t\treturn BillTextSchema.parse({\n\t\t\tdoc_id: text.doc_id,\n\t\t\tbill_id: text.bill_id,\n\t\t\ttype: asName(TextType, text.type_id)!,\n\t\t\ttype_id: text.type_id,\n\t\t\ttype_raw: text.type,\n\t\t\tdate: text.date,\n\t\t\turl: text.url,\n\t\t\tstate_link: text.state_link,\n\n\t\t\tmime: asName(Mime, text.mime_id)!,\n\t\t\tmime_id: text.mime_id,\n\t\t\tmime_raw: text.mime,\n\t\t\ttext_size: text.text_size,\n\t\t\ttext_hash: text.text_hash,\n\t\t\tdoc: text.doc,\n\n\t\t\talt_doc_id: text.alt_bill_text || null,\n\t\t\talt_mime: text.alt_mime_id ? asName(Mime, text.alt_mime_id)! : null,\n\t\t\talt_mime_id: text.alt_mime_id || null,\n\t\t\talt_mime_raw: text.alt_mime || null,\n\t\t\talt_text_size: text.alt_text_size || null,\n\t\t\talt_text_hash: text.alt_text_hash || null,\n\t\t\talt_state_link: text.alt_state_link || null,\n\t\t\talt_doc: text.alt_doc || null,\n\t\t} satisfies BillText);\n\t}\n\n\t/**\n\t * Get the details for a bill (such as status or history)\n\t * @cli {getBill} bill\n\t * @param {number} id bill ID to request\n\t */\n\tasync getBill({ id }: { id: number }): Promise<Bill> {\n\t\tconst { bill } = await this.request(\"getBill\", { id });\n\t\tif (!Array.isArray(bill.committee)) bill.committee = [bill.committee];\n\t\treturn BillSchema.parse({\n\t\t\tbill_id: bill.bill_id,\n\t\t\tchange_hash: bill.change_hash,\n\t\t\tsession_id: bill.session_id,\n\t\t\tsession: {\n\t\t\t\tsession_id: bill.session.session_id,\n\t\t\t\tstate: asName(State, bill.session.state_id)!,\n\t\t\t\tstate_id: bill.session.state_id,\n\t\t\t\tyear_start: bill.session.year_start,\n\t\t\t\tyear_end: bill.session.year_end,\n\t\t\t\tprefile: Boolean(bill.session.prefile),\n\t\t\t\tsine_die: Boolean(bill.session.sine_die),\n\t\t\t\tprior: Boolean(bill.session.prior),\n\t\t\t\tspecial: Boolean(bill.session.special),\n\t\t\t\tsession_tag: bill.session.session_tag,\n\t\t\t\tsession_title: bill.session.session_title,\n\t\t\t\tsession_name: bill.session.session_name,\n\t\t\t},\n\t\t\turl: bill.url,\n\t\t\tstate_link: bill.state_link,\n\t\t\tcompleted: Boolean(bill.completed),\n\t\t\tstatus: asName(Progress, bill.status)!,\n\t\t\tstatus_id: bill.status,\n\t\t\tstatus_date: bill.status_date,\n\t\t\tprogress: bill.progress.map((p: any): Bill[\"progress\"][number] => ({\n\t\t\t\tdate: p.date,\n\t\t\t\tevent: asName(Progress, p.event)!,\n\t\t\t\tevent_id: p.event,\n\t\t\t})),\n\t\t\tstate: asName(State, bill.state_id)!,\n\t\t\tstate_id: bill.state_id,\n\t\t\tstate_raw: bill.state,\n\t\t\tbill_number: bill.bill_number,\n\t\t\tbill_type: asName(BillType, parseInt(bill.bill_type_id, 10))!,\n\t\t\tbill_type_id: parseInt(bill.bill_type_id, 10),\n\t\t\tbill_type_raw: bill.bill_type,\n\t\t\tbody_id: bill.body_id,\n\t\t\tbody_raw: bill.body,\n\t\t\tcurrent_body_id: bill.current_body_id || null,\n\t\t\tcurrent_body_raw: bill.current_body_raw || null,\n\t\t\ttitle: bill.title,\n\t\t\tdescription: bill.description,\n\t\t\tpending_committee_id: bill.pending_committee_id,\n\t\t\tcommittee: bill.committee.map((c: any): Bill[\"committee\"][number] => ({\n\t\t\t\tcommittee_id: c.committee_id,\n\t\t\t\tchamber_id: c.chamber_id,\n\t\t\t\tchamber_raw: c.chamber,\n\t\t\t\tname: c.name,\n\t\t\t})),\n\t\t\treferrals: bill.referrals.map((r: any): Bill[\"referrals\"][number] => ({\n\t\t\t\tdate: r.date,\n\t\t\t\tcommittee_id: r.committee_id,\n\t\t\t\tchamber_id: r.chamber_id,\n\t\t\t\tchamber_raw: r.chamber,\n\t\t\t\tname: r.name,\n\t\t\t})),\n\t\t\thistory: bill.history.map((h: any): Bill[\"history\"][number] => ({\n\t\t\t\tdate: h.date,\n\t\t\t\taction: h.action,\n\t\t\t\tchamber_id: h.chamber_id || null,\n\t\t\t\tchamber_raw: h.chamber || null,\n\t\t\t\timportance: Boolean(h.importance),\n\t\t\t})),\n\t\t\tsponsors: bill.sponsors.map((s: any): Bill[\"sponsors\"][number] => ({\n\t\t\t\tpeople_id: s.people_id,\n\t\t\t\tperson_hash: s.person_hash,\n\t\t\t\tparty: asName(Party, parseInt(s.party_id, 10))!,\n\t\t\t\tparty_id: parseInt(s.party_id, 10),\n\t\t\t\tparty_raw: s.party,\n\t\t\t\tstate: asName(State, s.state_id)!,\n\t\t\t\tstate_id: s.state_id,\n\t\t\t\trole: asName(Role, s.role_id)!,\n\t\t\t\trole_id: s.role_id,\n\t\t\t\trole_raw: s.role,\n\t\t\t\tname: s.name,\n\t\t\t\tfirst_name: s.first_name,\n\t\t\t\tmiddle_name: s.middle_name || null,\n\t\t\t\tlast_name: s.last_name,\n\t\t\t\tsuffix: s.suffix || null,\n\t\t\t\tnickname: s.nickname || null,\n\t\t\t\tdistrict: s.district,\n\t\t\t\tftm_eid: s.ftm_eid,\n\t\t\t\tvotesmart_id: s.votesmart_id || null,\n\t\t\t\topensecrets_id: s.opensecrets_id || null,\n\t\t\t\tknowwho_pid: s.knowwho_pid || null,\n\t\t\t\tballotpedia: s.ballotpedia || null,\n\t\t\t\tbioguide_id: s.bioguide_id || null,\n\t\t\t\tsponsor_type: asName(SponsorType, s.sponsor_type_id)!,\n\t\t\t\tsponsor_type_id: s.sponsor_type_id,\n\t\t\t\tsponsor_order: s.sponsor_order,\n\t\t\t\tcommittee_sponsor: Boolean(s.committee_sponsor),\n\t\t\t\tcommittee_id: s.committee_id || null,\n\t\t\t\tstate_federal: Boolean(s.state_federal),\n\t\t\t\tbio: s.bio,\n\t\t\t})),\n\t\t\tsasts: bill.sasts.map((s: any): Bill[\"sasts\"][number] => ({\n\t\t\t\tsast_bill_id: s.sast_bill_id,\n\t\t\t\tsast_bill_number: s.sast_bill_number,\n\t\t\t\ttype: asName(SastType, s.type_id)!,\n\t\t\t\ttype_id: s.type_id,\n\t\t\t\ttype_raw: s.type,\n\t\t\t})),\n\t\t\tsubjects: bill.subjects.map((s: any): Bill[\"subjects\"][number] => ({\n\t\t\t\tsubject_id: s.subject_id,\n\t\t\t\tsubject_name: s.subject_name,\n\t\t\t})),\n\t\t\ttexts: bill.texts.map((t: any): Bill[\"texts\"][number] => ({\n\t\t\t\tdoc_id: t.doc_id,\n\t\t\t\tbill_id: t.bill_id,\n\t\t\t\ttype: asName(TextType, t.type_id)!,\n\t\t\t\ttype_id: t.type_id,\n\t\t\t\ttype_raw: t.type,\n\t\t\t\tdate: t.date,\n\t\t\t\turl: t.url,\n\t\t\t\tstate_link: t.state_link,\n\t\t\t\tmime: asName(Mime, t.mime_id)!,\n\t\t\t\tmime_id: t.mime_id,\n\t\t\t\tmime_raw: t.mime,\n\t\t\t\ttext_size: t.text_size,\n\t\t\t\ttext_hash: t.text_hash,\n\t\t\t\talt_doc_id: t.alt_bill_text || null,\n\t\t\t\talt_mime: t.alt_mime_id ? asName(Mime, t.alt_mime_id)! : null,\n\t\t\t\talt_mime_id: t.alt_mime_id || null,\n\t\t\t\talt_mime_raw: t.alt_mime || null,\n\t\t\t\talt_state_link: t.alt_state_link || null,\n\t\t\t\talt_text_size: t.alt_text_size || null,\n\t\t\t\talt_text_hash: t.alt_text_hash || null,\n\t\t\t})),\n\t\t\tvotes: bill.votes.map((v: any): Bill[\"votes\"][number] => ({\n\t\t\t\troll_call_id: v.roll_call_id,\n\t\t\t\tdate: v.date,\n\t\t\t\tdescription: v.desc,\n\t\t\t\tyea: v.yea,\n\t\t\t\tnay: v.nay,\n\t\t\t\tabstain: v.nv,\n\t\t\t\tabsent: v.absent,\n\t\t\t\ttotal: v.total,\n\t\t\t\tpassed: Boolean(v.passed),\n\t\t\t\tchamber_id: v.chamber_id,\n\t\t\t\tchamber_raw: v.chamber,\n\t\t\t\turl: v.url,\n\t\t\t\tstate_link: v.state_link,\n\t\t\t})),\n\t\t\tamendments: bill.amendments.map((a: any): Bill[\"amendments\"][number] => ({\n\t\t\t\tamendment_id: a.amendment_id,\n\t\t\t\tadopted: Boolean(a.adopted),\n\t\t\t\tchamber_id: a.chamber_id,\n\t\t\t\tchamber_raw: a.chamber,\n\t\t\t\tdate: a.date !== \"0000-00-00\" ? a.date : null,\n\t\t\t\ttitle: a.title,\n\t\t\t\tdescription: a.description,\n\t\t\t\tmime: asName(Mime, a.mime_id)!,\n\t\t\t\tmime_id: a.mime_id,\n\t\t\t\tmime_raw: a.mime,\n\t\t\t\turl: a.url,\n\t\t\t\tstate_link: a.state_link,\n\t\t\t\tamendment_size: a.amendment_size,\n\t\t\t\tamendment_hash: a.amendment_hash,\n\t\t\t\talt_amendment: a.alt_amendment || null,\n\t\t\t\talt_mime: a.alt_mime_id ? asName(Mime, a.alt_mime_id)! : null,\n\t\t\t\talt_mime_id: a.alt_mime_id || null,\n\t\t\t\talt_mime_raw: a.alt_mime || null,\n\t\t\t\talt_state_link: a.alt_state_link || null,\n\t\t\t\talt_amendment_size: a.alt_amendment_size || null,\n\t\t\t\talt_amendment_hash: a.alt_amendment_hash || null,\n\t\t\t})),\n\t\t\tsupplements: bill.supplements.map(\n\t\t\t\t(s: any): Bill[\"supplements\"][number] => ({\n\t\t\t\t\tsupplement_id: s.supplement_id,\n\t\t\t\t\tdate: s.date,\n\t\t\t\t\ttype: asName(SupplementType, s.type_id)!,\n\t\t\t\t\ttype_id: s.type_id,\n\t\t\t\t\ttype_raw: s.type,\n\t\t\t\t\tmime: asName(Mime, s.mime_id)!,\n\t\t\t\t\tmime_id: s.mime_id,\n\t\t\t\t\tmime_raw: s.mime,\n\t\t\t\t\turl: s.url,\n\t\t\t\t\tstate_link: s.state_link,\n\t\t\t\t\tsupplement_size: s.supplement_size,\n\t\t\t\t\tsupplement_hash: s.supplement_hash,\n\t\t\t\t\talt_supplement: s.alt_supplement || null,\n\t\t\t\t\talt_mime: s.alt_mime_id ? asName(Mime, s.alt_mime_id)! : null,\n\t\t\t\t\talt_mime_id: s.alt_mime_id || null,\n\t\t\t\t\talt_mime_raw: s.alt_mime || null,\n\t\t\t\t\talt_state_link: s.alt_state_link || null,\n\t\t\t\t\talt_supplement_size: s.alt_supplement_size || null,\n\t\t\t\t\talt_supplement_hash: s.alt_supplement_hash || null,\n\t\t\t\t}),\n\t\t\t),\n\t\t\tcalendar: bill.calendar.map((c: any): Bill[\"calendar\"][number] => ({\n\t\t\t\ttype: asName(EventType, c.type_id)!,\n\t\t\t\ttype_id: c.type_id,\n\t\t\t\ttype_raw: c.type,\n\t\t\t\tdate: c.date,\n\t\t\t\ttime: c.time || null,\n\t\t\t\tlocation: c.location || null,\n\t\t\t\tdescription: c.description,\n\t\t\t})),\n\t\t});\n\t}\n\n\t/**\n\t * Get the text of an amendment\n\t * @cli {getAmendment} amendment\n\t * @param {number} id amendment ID number (probably from getBill)\n\t */\n\tasync getAmendment({ id }: { id: number }): Promise<Amendment> {\n\t\tconst { amendment } = await this.request(\"getAmendment\", { id });\n\t\treturn AmendmentSchema.parse({\n\t\t\tamendment_id: amendment.amendment_id,\n\t\t\tbill_id: amendment.bill_id,\n\t\t\tadopted: Boolean(amendment.adopted),\n\t\t\tchamber_id: amendment.chamber_id,\n\t\t\tchamber_raw: amendment.chamber,\n\t\t\tdate: amendment.date !== \"0000-00-00\" ? amendment.date : null,\n\t\t\ttitle: amendment.title,\n\t\t\tdescription: amendment.description,\n\t\t\tmime: asName(Mime, amendment.mime_id)!,\n\t\t\tmime_id: amendment.mime_id,\n\t\t\tmime_raw: amendment.mime,\n\t\t\turl: amendment.url,\n\t\t\tstate_link: amendment.state_link,\n\t\t\tamendment_size: amendment.amendment_size,\n\t\t\tamendment_hash: amendment.amendment_hash,\n\t\t\tdoc: amendment.doc,\n\t\t\talt_amendment: amendment.alt_amendment || null,\n\t\t\talt_mime: amendment.alt_mime_id ? asName(Mime, amendment.mime_id)! : null,\n\t\t\talt_mime_id: amendment.alt_mime_id || null,\n\t\t\talt_mime_raw: amendment.alt_mime || null,\n\t\t\talt_state_link: amendment.alt_state_link || null,\n\t\t\talt_amendment_size: amendment.alt_amendment_size || null,\n\t\t\talt_amendment_hash: amendment.alt_amendment_hash || null,\n\t\t\talt_doc: amendment.alt_doc || null,\n\t\t} satisfies Amendment);\n\t}\n\n\t/**\n\t * Get the text of a supplement (such as a fiscal note or analysis)\n\t * @cli {getSupplement} supplement\n\t * @param {number} id supplement ID number (probably from getBill)\n\t */\n\tasync getSupplement({ id }: { id: number }): Promise<Supplement> {\n\t\tconst { supplement } = await this.request(\"getSupplement\", { id });\n\t\treturn SupplementSchema.parse({\n\t\t\tsupplement_id: supplement.supplement_id,\n\t\t\tbill_id: supplement.bill_id,\n\t\t\tdate: supplement.date !== \"0000-00-00\" ? supplement.date : null,\n\t\t\ttype: asName(SupplementType, supplement.type_id)!,\n\t\t\ttype_id: supplement.type_id,\n\t\t\ttype_raw: supplement.type,\n\t\t\tmime: asName(Mime, supplement.mime_id)!,\n\t\t\tmime_id: supplement.mime_id,\n\t\t\tmime_raw: supplement.mime,\n\t\t\turl: supplement.url,\n\t\t\tstate_link: supplement.state_link,\n\t\t\tsupplement_size: supplement.supplement_size,\n\t\t\tsupplement_hash: supplement.supplement_hash,\n\t\t\tdoc: supplement.doc,\n\t\t\talt_supplement: supplement.alt_supplement || null,\n\t\t\talt_mime: supplement.alt_mime_id\n\t\t\t\t? asName(Mime, supplement.mime_id)!\n\t\t\t\t: null,\n\t\t\talt_mime_id: supplement.alt_mime_id || null,\n\t\t\talt_mime_raw: supplement.alt_mime || null,\n\t\t\talt_state_link: supplement.alt_state_link || null,\n\t\t\talt_supplement_size: supplement.alt_supplement_size || null,\n\t\t\talt_supplement_hash: supplement.alt_supplement_hash || null,\n\t\t\talt_doc: supplement.alt_doc || null,\n\t\t} satisfies Supplement);\n\t}\n\n\t/**\n\t * Get the details of a roll call vote\n\t * @cli {getRollCall} rollcall\n\t * @param {number} id vote ID number\n\t */\n\tasync getRollCall({ id }: { id: number }): Promise<RollCall> {\n\t\tconst { roll_call } = await this.request(\"getRollCall\", { id });\n\t\treturn RollCallSchema.parse({\n\t\t\troll_call_id: roll_call.roll_call_id,\n\t\t\tbill_id: roll_call.bill_id,\n\t\t\tdate: roll_call.date,\n\t\t\tdescription: roll_call.desc,\n\t\t\tyea: roll_call.yea,\n\t\t\tnay: roll_call.nay,\n\t\t\tabstain: roll_call.nv,\n\t\t\tabsent: roll_call.absent,\n\t\t\ttotal: roll_call.total,\n\t\t\tpassed: Boolean(roll_call.passed),\n\t\t\tchamber_id: roll_call.chamber_id,\n\t\t\tchamber_raw: roll_call.chamber,\n\t\t\tvotes: numericalToArray(roll_call.votes).map(\n\t\t\t\t(v: any): RollCall[\"votes\"][number] => ({\n\t\t\t\t\tpeople_id: v.people_id,\n\t\t\t\t\tvote: asName(VoteType, v.vote_id)!,\n\t\t\t\t\tvote_id: v.vote_id,\n\t\t\t\t\tvote_raw: v.vote_text,\n\t\t\t\t}),\n\t\t\t),\n\t\t} satisfies RollCall);\n\t}\n\n\t/**\n\t * Get details on a person by ID\n\t * @cli {getPerson} person\n\t * @param {number} id The Legiscan person ID\n\t */\n\tasync getPerson({ id }: { id: number }): Promise<Person> {\n\t\tconst { person } = await this.request(\"getPerson\", { id });\n\t\treturn PersonSchema.parse({\n\t\t\tpeople_id: person.people_id,\n\t\t\tperson_hash: person.person_hash,\n\t\t\tparty: asName(Party, parseInt(person.party_id, 10))!,\n\t\t\tparty_id: parseInt(person.party_id, 10),\n\t\t\tparty_raw: person.party,\n\t\t\tstate: asName(State, person.state_id)!,\n\t\t\tstate_id: person.state_id,\n\t\t\trole: asName(Role, person.role_id)!,\n\t\t\trole_id: person.role_id,\n\t\t\trole_raw: person.role,\n\t\t\tname: person.name,\n\t\t\tfirst_name: person.first_name,\n\t\t\tmiddle_name: person.middle_name || null,\n\t\t\tlast_name: person.last_name,\n\t\t\tsuffix: person.suffix || null,\n\t\t\tnickname: person.nickname || null,\n\t\t\tdistrict: person.district,\n\t\t\tftm_eid: person.ftm_eid,\n\t\t\tvotesmart_id: person.votesmart_id || null,\n\t\t\topensecrets_id: person.opensecrets_id || null,\n\t\t\tknowwho_pid: person.knowwho_pid || null,\n\t\t\tballotpedia: person.ballotpedia || null,\n\t\t\tbioguide_id: person.bioguide_id || null,\n\t\t\tcommittee_sponsor: Boolean(person.committee_sponsor),\n\t\t\tcommittee_id: person.committee_id || null,\n\t\t\tstate_federal: Boolean(person.state_federal),\n\t\t\tbio: person.bio,\n\t\t} satisfies Person);\n\t}\n\n\t/**\n\t * Get all active people in a given legislative session\n\t * @cli {getSessionPeople} sessionpeople\n\t * @param {number} id The Legiscan session ID\n\t */\n\tasync getSessionPeople({ id }: { id: number }): Promise<SessionPeople> {\n\t\tconst {\n\t\t\tsessionpeople: { people },\n\t\t} = await this.request(\"getSessionPeople\", { id });\n\t\treturn SessionPeopleSchema.parse(\n\t\t\t(people ?? []).map((person: any): SessionPeople[number] => ({\n\t\t\t\tpeople_id: person.people_id,\n\t\t\t\tperson_hash: person.person_hash,\n\t\t\t\tparty: asName(Party, parseInt(person.party_id, 10))!,\n\t\t\t\tparty_id: parseInt(person.party_id, 10),\n\t\t\t\tparty_raw: person.party,\n\t\t\t\tstate: asName(State, person.state_id)!,\n\t\t\t\tstate_id: person.state_id,\n\t\t\t\trole: asName(Role, person.role_id)!,\n\t\t\t\trole_id: person.role_id,\n\t\t\t\trole_raw: person.role,\n\t\t\t\tname: person.name,\n\t\t\t\tfirst_name: person.first_name,\n\t\t\t\tmiddle_name: person.middle_name || null,\n\t\t\t\tlast_name: person.last_name,\n\t\t\t\tsuffix: person.suffix || null,\n\t\t\t\tnickname: person.nickname || null,\n\t\t\t\tdistrict: person.district,\n\t\t\t\tftm_eid: person.ftm_eid,\n\t\t\t\tvotesmart_id: person.votesmart_id || null,\n\t\t\t\topensecrets_id: person.opensecrets_id || null,\n\t\t\t\tknowwho_pid: person.knowwho_pid || null,\n\t\t\t\tballotpedia: person.ballotpedia || null,\n\t\t\t\tbioguide_id: person.bioguide_id || null,\n\t\t\t\tcommittee_sponsor: Boolean(person.committee_sponsor),\n\t\t\t\tcommittee_id: person.committee_id || null,\n\t\t\t\tstate_federal: Boolean(person.state_federal),\n\t\t\t\tbio: person.bio,\n\t\t\t})),\n\t\t);\n\t}\n\n\t/**\n\t * Get a list of bills sponsored by a specific person\n\t * @cli {getSponsoredList} sponsoredlist\n\t * @param {number} id Legiscan person ID for the sponsor\n\t */\n\tasync getSponsoredList({ id }: { id: number }): Promise<SponsoredList> {\n\t\tconst {\n\t\t\tsponsoredbills: { sessions, bills },\n\t\t} = await this.request(\"getSponsoredList\", { id });\n\t\treturn SponsoredListSchema.parse(\n\t\t\tbills.map((b: any): SponsoredList[number] => ({\n\t\t\t\tbill_id: b.bill_id,\n\t\t\t\tbill_number: b.number,\n\t\t\t\tsession: sessions\n\t\t\t\t\t.map((s: any): SponsoredList[number][\"session\"] => ({\n\t\t\t\t\t\tsession_id: s.session_id,\n\t\t\t\t\t\tstate: asName(State, s.state_id)!,\n\t\t\t\t\t\tstate_id: s.state_id,\n\t\t\t\t\t\tyear_start: s.year_start,\n\t\t\t\t\t\tyear_end: s.year_end,\n\t\t\t\t\t\tprefile: Boolean(s.prefile),\n\t\t\t\t\t\tsine_die: Boolean(s.sine_die),\n\t\t\t\t\t\tprior: Boolean(s.prior),\n\t\t\t\t\t\tspecial: Boolean(s.special),\n\t\t\t\t\t\tsession_tag: s.session_tag,\n\t\t\t\t\t\tsession_title: s.session_title,\n\t\t\t\t\t\tsession_name: s.session_name,\n\t\t\t\t\t}))\n\t\t\t\t\t.find(\n\t\t\t\t\t\t(s: SponsoredList[number][\"session\"]) =>\n\t\t\t\t\t\t\ts.session_id === b.session_id,\n\t\t\t\t\t),\n\t\t\t})),\n\t\t);\n\t}\n\n\t/**\n\t * Get the results of a search as a complete array containing all response pages\n\t * @cli {getSearch} search\n\t * @param {string} query Full text query\n\t * @param {State} [state] US state for this search\n\t * @param {number} [year] Year where 1=all, 2=current, 3=recent, 4=prior, >1900=exact\n\t */\n\tasync getSearch({\n\t\tquery,\n\t\tstate,\n\t\tyear,\n\t}: {\n\t\tquery: string;\n\t\tstate?: Needle;\n\t\tyear?: number;\n\t}): Promise<Search> {\n\t\tconst items: Search = [];\n\t\tfor await (const result of this.getSearchAsync({ query, state, year })) {\n\t\t\titems.push(result);\n\t\t}\n\t\treturn items;\n\t}\n\n\t/**\n\t * Get the results of a search one at a time, as an async iterator\n\t * @param query\n\t * @param state US state for this search\n\t * @param year Year where 1=all, 2=current, 3=recent, 4=prior, >1900=exact\n\t */\n\tasync *getSearchAsync({\n\t\tquery,\n\t\tstate,\n\t\tyear,\n\t}: {\n\t\tquery: string;\n\t\tstate?: Needle;\n\t\tyear?: number;\n\t}): AsyncGenerator<Search[number]> {\n\t\tlet page = 1;\n\n\t\twhile (true) {\n\t\t\tconst { searchresult } = await this.request(\"getSearch\", {\n\t\t\t\tquery,\n\t\t\t\tpage,\n\t\t\t\t...(state ? { state: asName(State, state) } : {}),\n\t\t\t\t...(year ? { year: year.toString() } : {}),\n\t\t\t});\n\t\t\tconst items = SearchSchema.parse(\n\t\t\t\tnumericalToArray(searchresult).map(\n\t\t\t\t\t(b: any) =>\n\t\t\t\t\t\t({\n\t\t\t\t\t\t\trelevance: b.relevance,\n\t\t\t\t\t\t\tstate: b.state,\n\t\t\t\t\t\t\tstate_id: asNumber(State, b.state)!,\n\t\t\t\t\t\t\tbill_number: b.bill_number,\n\t\t\t\t\t\t\tbill_id: b.bill_id,\n\t\t\t\t\t\t\tchange_hash: b.change_hash,\n\t\t\t\t\t\t\turl: b.url,\n\t\t\t\t\t\t\ttext_url: b.text_url,\n\t\t\t\t\t\t\tresearch_url: b.research_url,\n\t\t\t\t\t\t\tlast_action: b.last_action,\n\t\t\t\t\t\t\tlast_action_date: b.last_action_date,\n\t\t\t\t\t\t\ttitle: b.title,\n\t\t\t\t\t\t}) satisfies Search[number],\n\t\t\t\t),\n\t\t\t);\n\t\t\tyield* items;\n\t\t\tpage++;\n\n\t\t\tif (searchresult.summary.page_total < page) return;\n\t\t}\n\t}\n}\n"],"mappings":";;;AAEA,MAAa,YAAY;CACxB,SAAS;CACT,kBAAkB;CAClB,eAAe;AAChB;AAEA,MAAa,QAAQ;CACpB,UAAU;CACV,YAAY;CACZ,aAAa;CACb,YAAY;CACZ,aAAa;CACb,aAAa;AACd;AAEA,MAAa,WAAW;CACvB,UAAU;CACV,YAAY;CACZ,WAAW;CACX,UAAU;CACV,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,UAAU;CACV,WAAW;CACX,OAAO;CACP,YAAY;CACZ,WAAW;CACX,OAAO;AACR;AAEA,MAAa,SAAS;CACrB,SAAS;CACT,cAAc;CACd,SAAS;CACT,UAAU;CACV,OAAO;CACP,aAAa;CACb,WAAW;CACX,YAAY;CACZ,YAAY;CACZ,eAAe;CACf,eAAe;CACf,YAAY;CACZ,eAAe;CACf,gBAAgB;CAChB,cAAc;CACd,cAAc;CACd,YAAY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