/** * `nz-charities-register`: the Charities Register that Charities Services * (Te Tari Taiwhenua, the Department of Internal Affairs) publishes through its * OData service, read by the evaluation source and by the `nz-charities-register` * corpus adapter through {@linkcode readNZCharities}. * * The fetch asks `vOrganisations` for every registered charity's street address: * two lines, a suburb, a city and a postcode. * The second line can repeat the city or the city and postcode, and otherwise * holds a rural delivery code (`RD 3`) or a second address. * * A record is kept only where the second line is empty or repeats the city, * and the first line is a street with a house number. * * The rows read only the address, never the charity's name, because a small * charity's name can be a person's. * * The register states no region. * NZ Post's postcodes run north to south by their first digit, so the record is stratified by that digit. * * ## License * * The open-data page (`https://www.charities.govt.nz/charities-in-new-zealand/the-charities-register/open-data`) * states « Use of this data is licensed under a Creative Commons Attribution 3.0 New Zealand * License. » CC BY 3.0 NZ grants the right to « create one or more Adaptations », provided * each identifies that changes were made (`data/licenses/nz-charities-cc-by-3.0-nz.md`). */ import type { PathBuilderLike } from "path-ts"; import { type EvaluationRecordReading, type EvaluationSource } from "#evaluation/source"; /** * The OData query: every registered charity's street address columns, as CSV, unpaged. */ export declare const NZ_CHARITIES_REGISTER_URL: string; /** * The file the fetch writes the query's CSV answer to and the reader reads. */ export declare const NZ_CHARITIES_REGISTER_FILENAME = "organisations.csv"; interface CharityRow { charity_registration_number?: string; street_address_line1?: string; street_address_line2?: string; street_address_suburb?: string; street_address_city?: string; street_address_postcode?: string; street_address_country?: string; } /** * One register row as an address record, or the reason it yields none. */ export declare function readNZCharity(row: CharityRow): EvaluationRecordReading; /** * New Zealand's evaluation source, the Charities Register. */ export declare const nzCharitiesRegisterSource: EvaluationSource; /** * Every row of the OData CSV answer at `path`, read by {@linkcode readNZCharity}. */ export declare function readNZCharities(path: PathBuilderLike): AsyncGenerator; export {}; //# sourceMappingURL=charities-register.d.ts.map