Feat: add external_id support to create/update operations for Organization#89
Feat: add external_id support to create/update operations for Organization#89basbz wants to merge 1 commit intoworkos:mainfrom
Conversation
Add `external_id` parameter support to create and update operations: - `WorkOS.Organizations.create_organization/1,2` — accepts `:external_id` in opts - `WorkOS.Organizations.update_organization/2,3` — accepts `:external_id` in opts This is a follow-up to workos#83 which added `external_id` to the structs and added lookup-by-external-id endpoints. With this PR, the SDK fully supports the `external_id` field across all CRUD operations for Organizations.dd
|
Haven't gotten around to making CI required yet, but could you rewrite the commit message to prepend We're switching over to use release-please for automating releases, and conventional commits is a requirement. Thank you! |
Greptile OverviewGreptile SummaryThis PR extends Tests add coverage for creating and updating organizations with Confidence Score: 3/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant App as SDK Consumer
participant Orgs as WorkOS.Organizations
participant Client as WorkOS.Client
participant Http as TeslaClient/HTTP
participant API as WorkOS API
App->>Orgs: create_organization(opts incl external_id)
Orgs->>Client: post("/organizations", body)
Client->>Http: request(method=POST, url, body)
Http->>API: POST /organizations {name, domain_data, allow_profiles_outside_organization, external_id}
API-->>Http: 200 organization JSON (external_id included)
Http-->>Client: %{status, body}
Client-->>Orgs: {:ok, Organization.cast(body)}
Orgs-->>App: {:ok, %Organization{external_id: ...}}
App->>Orgs: update_organization(org_id, opts incl external_id)
Orgs->>Client: put("/organizations/{id}", body)
Client->>Http: request(method=PUT, url, body)
Http->>API: PUT /organizations/{id} {..., external_id}
API-->>Http: 200 organization JSON (external_id included)
Http-->>Client: %{status, body}
Client-->>Orgs: {:ok, Organization.cast(body)}
Orgs-->>App: {:ok, %Organization{external_id: ...}}
|
Additional Comments (1)
|
|
@gjtorikian, sorry didn't notice this before. |
Add
external_idparameter support to create and update operations:WorkOS.Organizations.create_organization/1,2— accepts:external_idin optsWorkOS.Organizations.update_organization/2,3— accepts:external_idin optsThis is a follow-up to #83 which added
external_idto the structs and added lookup-by-external-id endpoints. With this PR, the SDK fully supports theexternal_idfield across all CRUD operations for Organizations.dd