Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.law4devs.eu/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Compliance deadlines are specific dates by which organisations must have completed certain obligations under a regulation. They are extracted from articles and classified by type (e.g. "transposition", "application", "notification").

Methods

deadlines()

Returns a page of compliance deadlines, optionally filtered to a single framework.
const page = await client.compliance.deadlines({ frameworkSlug: 'nis2' });

console.log(`NIS2 has ${page.meta.total} compliance deadlines`);

for (const deadline of page.data) {
  const date = deadline.deadlineDate ?? 'no fixed date';
  console.log(`[${deadline.deadlineType}] ${date}: ${deadline.description}`);
}
Parameters
ParameterTypeDefaultDescription
frameworkSlugstringFilter to a specific framework
pagenumber1Page number
perPagenumber20Items per page (1–100)
Returns Promise<Page<ComplianceDeadline>>

iterDeadlines()

Iterate over all compliance deadlines without managing pagination.
for await (const deadline of client.compliance.iterDeadlines({ frameworkSlug: 'nis2' })) {
  const date = deadline.deadlineDate ?? 'ongoing';
  const ref = deadline.paragraphRef ? ` §${deadline.paragraphRef}` : '';
  console.log(`Art. ${deadline.articleNumber}${ref}${deadline.deadlineType}: ${date}`);
  console.log(`  ${deadline.description}`);
}
The method is iterDeadlines(), not iter(). This is intentional — the compliance resource covers deadlines across multiple frameworks rather than scoping to a single one.
Parameters — same options as deadlines() (except page, which is managed internally). Returns AsyncGenerator<ComplianceDeadline>

Model

ComplianceDeadline

FieldTypeDescription
idnumberInternal numeric ID
frameworkSlugstringParent framework slug
articleNumbernumberSource article number
paragraphRefstring | nullSource paragraph reference
deadlineDatestring | nullISO 8601 deadline date, or null if ongoing
deadlineTypestringCategory, e.g. "transposition", "application", "notification"
descriptionstringHuman-readable description of the obligation

Example: build a deadline calendar

interface CalendarEntry {
  date: string;
  framework: string;
  type: string;
  description: string;
}

const calendar: CalendarEntry[] = [];

// Collect deadlines for two frameworks in parallel
const [nis2Page, craPage] = await Promise.all([
  client.compliance.deadlines({ frameworkSlug: 'nis2', perPage: 100 }),
  client.compliance.deadlines({ frameworkSlug: 'cra', perPage: 100 }),
]);

for (const deadline of [...nis2Page.data, ...craPage.data]) {
  if (deadline.deadlineDate) {
    calendar.push({
      date: deadline.deadlineDate,
      framework: deadline.frameworkSlug.toUpperCase(),
      type: deadline.deadlineType,
      description: deadline.description,
    });
  }
}

calendar.sort((a, b) => a.date.localeCompare(b.date));

for (const entry of calendar) {
  console.log(`${entry.date} [${entry.framework}] ${entry.type}: ${entry.description}`);
}
To get deadlines across all frameworks at once, call iterDeadlines() without a frameworkSlug filter.