Skip to content

Add AuditLogs module#18

Merged
jacobiajohnson merged 2 commits intomainfrom
feature/sdk-625-implement-basis-for-audit-log-module
Dec 21, 2022
Merged

Add AuditLogs module#18
jacobiajohnson merged 2 commits intomainfrom
feature/sdk-625-implement-basis-for-audit-log-module

Conversation

@jacobiajohnson
Copy link
Copy Markdown
Contributor

No description provided.

@linear
Copy link
Copy Markdown

linear Bot commented Dec 20, 2022

@jacobiajohnson
Copy link
Copy Markdown
Contributor Author

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

Base automatically changed from feature/sdk-622-update-portal-module-according-to to main December 21, 2022 15:14
@jacobiajohnson jacobiajohnson force-pushed the feature/sdk-625-implement-basis-for-audit-log-module branch from 0a50405 to f816f9e Compare December 21, 2022 16:12
Copy link
Copy Markdown
Contributor

@blairworkos blairworkos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I'm learning so much from this PR.

Should we add support for passing the idempotency key in the create method? I think we need to adjust the client logic to add this as a header when passed as a parameter.

Comment thread lib/workos/audit_logs/audit_logs.ex Outdated
that the event is associated with.
- range_start (string) ISO-8601 value for start of the export range.
- range_end (string) ISO-8601 value for end of the export range.
- actions (list) List of actions to filter against.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be noted as a "list of strings" specifically? I'm not sure how much this matters, because of dynamic typing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea I wasn't sure if there was a specific way to define the type in the list or if I could just put (list of strings)

Comment thread lib/workos/audit_logs/audit_logs.ex Outdated
is_map_key(params, :range_end) do
post(
"/audit_logs/exports",
%{
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would we want to use the process_params method here, like in create organizations?

def create_organization(params, opts)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense!

"""

def get_export(id, opts \\ [])
def get_export(id, opts) when is_binary(id) do
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL: I was so confused that is_binary was being used to check that the ID is a string, but then a found this: https://www.educative.io/answers/what-is-isbinary-in-elixir 🎉

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Github Copilot taught me this 🤣

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The robots have taken over! lol

@jacobiajohnson jacobiajohnson merged commit e245e12 into main Dec 21, 2022
@jacobiajohnson jacobiajohnson deleted the feature/sdk-625-implement-basis-for-audit-log-module branch December 21, 2022 20:39
@blairworkos blairworkos mentioned this pull request Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants