-
Notifications
You must be signed in to change notification settings - Fork 44
Update Node SDK to include auditlogs.listSchemas #1457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@greptile review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
16 files reviewed, 1 comment
|
@greptile re-review plz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 files reviewed, no comments
|
@greptile re-review plz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6 files reviewed, no comments
|
@greptile re-review plz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4 files reviewed, no comments
|
@greptile re-review plz |
|
@claude can you review and ensure it complies with the listSchema api |
Greptile OverviewGreptile SummaryThis PR adds the Key Changes
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant AuditLogs
participant WorkOS
participant API as WorkOS API
participant Deserializer
Client->>AuditLogs: listSchemas(options)
Note over AuditLogs: Extract action from options<br/>Build endpoint URL
AuditLogs->>WorkOS: fetchAndDeserialize(endpoint, deserializeFn, paginationOptions)
WorkOS->>API: GET /audit_logs/actions/{action}/schemas?order=desc&limit=...
API-->>WorkOS: ListResponse<AuditLogSchemaResponse>
WorkOS->>Deserializer: deserializeList(data, deserializeAuditLogSchema)
loop For each schema in response
Deserializer->>Deserializer: deserializeAuditLogSchema(schema)
Note over Deserializer: Convert metadata from<br/>{properties: {key: {type: 'string'}}}<br/>to {key: 'string'}
Note over Deserializer: Handle optional actor field
end
Deserializer-->>WorkOS: List<AuditLogSchema>
WorkOS-->>AuditLogs: List<AuditLogSchema>
AuditLogs->>AuditLogs: new AutoPaginatable(list, fetchFn, options)
AuditLogs-->>Client: AutoPaginatable<AuditLogSchema>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 files reviewed, no comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 files reviewed, no comments
| } | ||
|
|
||
| export interface CreateAuditLogSchemaResponse { | ||
| export interface AuditLogSchemaResponse { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is exported publicly, this would be a breaking change. Perhaps we can alias CreateAuditLogSchemaResponse to AuditLogSchemaResponse and mark CreateAuditLogSchemaResponse as deprecated?
https://linear.app/workos/issue/ENT-5028/update-node-sdk-to-include-listschemas
Description
Adding in the following Audit Log endpoints: