feat!: Port AuditLogs to oagen#1627
Conversation
Greptile SummaryThis PR ports the
Confidence Score: 5/5The change is a clean oagen-generated port; all existing behaviour (idempotency key, URL encoding, date deserialization) is preserved, and the new methods are straightforward API wrappers. The core logic is correct: idempotency keys are still auto-generated for createEvent, URL parameters are now properly encodeURIComponent-wrapped, and date fields are properly deserialized. The only gap is that the auto-generated test file drops the detailed idempotency-key assertions that previously guarded createEvent; the behaviour is still implemented correctly but has lost test coverage. src/audit-logs/audit-logs.spec.ts — idempotency-key test coverage for createEvent was not regenerated. Important Files Changed
|
…zer test Regenerate AuditLogs with the fixed node emitter and fold in the review findings from #1627: - createEvent regains idempotency: a `requestOptions: PostOptions = {}` param and an auto-generated `workos-node-${uuid}` Idempotency-Key, so a 5xx retry no longer silently duplicates an audit event (the options-object emitter path previously dropped it entirely). - createExport JSDoc no longer documents `options.actors` — the curated AuditLogExportOptions doesn't expose that deprecated field. - Drop the dead `SerializedAuditLogExportOptions` interface (its only consumer, the old serializeAuditLogExportOptions, was removed in the port). - serializers.spec.ts now reconstructs the camelCase domain model from the wire fixture instead of feeding the serializer a snake_case object (which threw `model.occurredAt.toISOString()` on undefined). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Description
This PR generates the AuditLogs category in the Node SDK from the OpenAPI spec.
Almost every existing method changed its input signature, its output, or both. Callers cannot expect the same input/output format.
As well:
AuditLogExport.createdAt/updatedAtchange:string → DateAuditLogSchema.createdAtalso changedstring → DateThe following new methods were added:
getOrganizationAuditLogsRetention(options)updateOrganizationAuditLogsRetention(options)listActions(options?)Because of these changes, this is a major breaking change to the SDK.