feat!: Port AuditLogs to oagen#1627
Open
gjtorikian wants to merge 4 commits into
Open
Conversation
Contributor
…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>
Regenerated audit-logs.spec.ts with the node emitter's new idempotency test emission. Adds assertions that createEvent forwards a caller-supplied Idempotency-Key header and auto-generates a `workos-node-` prefixed one when none is given — the coverage the oagen port dropped and that review flagged. The behavior was already correct; this guards it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.