Open PaulAsjes opened 1 day ago
Adds a createSchema method. Example use:
createSchema
const schema = await workos.auditLogs.createSchema({ action: 'user.deleted', actor: { metadata: { actor_id: 'string', }, }, targets: [ { type: 'user', metadata: { user_id: 'string', }, }, ], metadata: { foo: 'number', baz: 'boolean', }, }); console.log('schema created:', schema);
The above logs:
schema created: { object: 'audit_log_schema', version: 1, targets: [ { type: 'user', metadata: [Object] } ], actor: { metadata: { actor_id: 'string' } }, metadata: { baz: 'boolean', foo: 'number' }, createdAt: '2024-10-14T15:09:44.537Z' }
Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.
[ ] Yes
If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.
Description
Adds a
createSchema
method. Example use:The above logs:
Documentation
Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.
If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.