NZ Legislation Tool API - v1.2.0
    Preparing search index...

    Function searchWorks

    • Search for legislation works

      Parameters

      • params: {
            from?: string;
            limit?: number;
            offset?: number;
            query?: string;
            status?: string;
            to?: string;
            type?: string;
        }

      Returns Promise<
          {
              limit: number;
              links: { next?: string; prev?: string }
              | undefined;
              offset: number;
              results: {
                  date: string;
                  id: string;
                  shortTitle: string | undefined;
                  status:
                      | "in-force"
                      | "not-yet-in-force"
                      | "repealed"
                      | "partially-repealed"
                      | "withdrawn";
                  title: string;
                  type: "act"
                  | "bill"
                  | "regulation"
                  | "instrument";
                  url: string;
                  versionCount: number;
              }[];
              total: number;
          },
      >