Skip to content

Commit 457d593

Browse files
committed
fix(spec): the served export door answers CSV, JSON or XLSX, not the ExportFormat set
GET /api/v1/data/:object/export reads its own format (csv | json | xlsx, anything else falling back to csv); ExportFormat also declares jsonl and parquet. The retirement prose (module docblock, section note, D3 entry, changeset) no longer ties the served door to ExportFormat. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rjy9MeetSfq34PKn81CRiN
1 parent d08bc4e commit 457d593

5 files changed

Lines changed: 12 additions & 11 deletions

File tree

‎.changeset/17158-export-job-family-retired.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ A `major`-class change, recorded as `minor` under the launch-window convention.
1212

1313
| removed | from | what to write instead |
1414
| --- | --- | --- |
15-
| `ExportJobStatus`, `CreateExportJobRequestSchema` / `CreateExportJobResponseSchema`, `ExportJobProgressSchema` (with their types and `…Parsed` aliases) | `@objectstack/spec/api` | nothing — no route ever created or tracked an export job. To export records, call the served synchronous door `GET /api/v1/data/:object/export` (the SDK's `data.export`), which answers the file itself; its format vocabulary is `ExportFormat`, which stays. |
15+
| `ExportJobStatus`, `CreateExportJobRequestSchema` / `CreateExportJobResponseSchema`, `ExportJobProgressSchema` (with their types and `…Parsed` aliases) | `@objectstack/spec/api` | nothing — no route ever created or tracked an export job. To export records, call the served synchronous door `GET /api/v1/data/:object/export` (the SDK's `data.export`), which answers the file itself as CSV, JSON or XLSX. |
1616
| `GetExportJobDownloadRequestSchema` / `GetExportJobDownloadResponseSchema`, `ListExportJobsRequestSchema` / `ListExportJobsResponseSchema`, `ExportJobSummarySchema` (with their types and `…Parsed` aliases) | `@objectstack/spec/api` | nothing — no job ever existed to download or list. |
1717
| `ScheduledExportSchema`, `ScheduleExportRequestSchema` / `ScheduleExportResponseSchema` (with their types and `…Parsed` aliases) | `@objectstack/spec/api` | a `Job` (`system/job.zod.ts`) whose handler performs the export, with its cadence on `Job.schedule.expression` — the one cron slot the platform evaluates. |
1818
| `ExportApiContracts` | `@objectstack/spec/api` | nothing — every route it named was unserved. |

‎packages/spec/src/api/export-job-family-retirement.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ const RETIRED_DEFS = [
9090

9191
const SEMANTIC_ID = 'export-job-family-retired';
9292

93-
/** Same-module neighbours that stay — the served import-job family and the format vocabulary. */
93+
/** Same-module neighbours that stay — the served import-job family, and the template shape with its format enum. */
9494
const MUST_SURVIVE_API = [
9595
'ExportFormat', 'ExportImportTemplateSchema', 'ImportJobStatus', 'ImportJobProgressSchema',
9696
'ListImportJobsRequestSchema', 'ListImportJobsResponseSchema', 'ImportJobApiContracts',

‎packages/spec/src/api/export.zod.ts‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import { BaseResponseSchema } from './contract.zod';
1313
* Dynamics 365 Data Management.
1414
*
1515
* The export the platform serves is the synchronous streaming door
16-
* `GET /api/v1/data/:object/export`, which answers the file itself in one of
17-
* the `ExportFormat` formats. The asynchronous export-job API that used to be
16+
* `GET /api/v1/data/:object/export`, which answers the file itself as CSV,
17+
* JSON or XLSX. The asynchronous export-job API that used to be
1818
* declared here (export jobs, their progress / download / list shapes,
1919
* scheduled exports and `ExportApiContracts`) was never served by any route and
2020
* was removed in @objectstack/spec 17 (ADR-0049 enforce-or-remove); a recurring
@@ -59,9 +59,10 @@ export type ExportFormat = z.input<typeof ExportFormat>;
5959
* `export-job-family-retired` carries the prescription.
6060
*
6161
* The export that IS served is the synchronous streaming door
62-
* `GET /api/v1/data/:object/export` (`@objectstack/rest`), whose file format
63-
* vocabulary is `ExportFormat` above. A recurring export is a `Job` whose
64-
* handler you write (`Job.schedule.expression`, `system/job.zod.ts`).
62+
* `GET /api/v1/data/:object/export` (`@objectstack/rest`), which answers CSV,
63+
* JSON or XLSX (its own `format` read, not `ExportFormat` above). A recurring
64+
* export is a `Job` whose handler you write (`Job.schedule.expression`,
65+
* `system/job.zod.ts`).
6566
*/
6667

6768
// ==========================================

‎packages/spec/src/migrations/entries/semantic/18.export-job-family-retired.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ export const entry: SemanticMigration = {
2222
'nothing to re-declare for the job family — no route ever served it, so no caller holds '
2323
+ 'a job id, a progress body or a download link to carry over. The export the platform '
2424
+ 'DOES serve is the synchronous streaming door GET /api/v1/data/:object/export '
25-
+ '(@objectstack/rest, the SDK method data.export): it answers the file itself in the '
26-
+ 'requested format, and its format vocabulary is ExportFormat, which stays published. '
25+
+ '(@objectstack/rest, the SDK method data.export): it answers the file itself as CSV, '
26+
+ 'JSON or XLSX. ExportFormat stays published (ExportImportTemplate still references it). '
2727
+ 'A recurring export is a Job (system/job.zod.ts) whose handler you write, with its '
2828
+ 'cadence on Job.schedule.expression — the one cron slot the platform evaluates. A '
2929
+ 'scheduled flow declares its cadence on its start node (config.schedule), and its run '

‎packages/spec/src/migrations/registry.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8387,8 +8387,8 @@ const step18: MigrationStep = {
83878387
'nothing to re-declare for the job family — no route ever served it, so no caller holds '
83888388
+ 'a job id, a progress body or a download link to carry over. The export the platform '
83898389
+ 'DOES serve is the synchronous streaming door GET /api/v1/data/:object/export '
8390-
+ '(@objectstack/rest, the SDK method data.export): it answers the file itself in the '
8391-
+ 'requested format, and its format vocabulary is ExportFormat, which stays published. '
8390+
+ '(@objectstack/rest, the SDK method data.export): it answers the file itself as CSV, '
8391+
+ 'JSON or XLSX. ExportFormat stays published (ExportImportTemplate still references it). '
83928392
+ 'A recurring export is a Job (system/job.zod.ts) whose handler you write, with its '
83938393
+ 'cadence on Job.schedule.expression — the one cron slot the platform evaluates. A '
83948394
+ 'scheduled flow declares its cadence on its start node (config.schedule), and its run '

0 commit comments

Comments
 (0)