Skip to content

Commit

Permalink
Make name optional when updating an Organization (#1099)
Browse files Browse the repository at this point in the history
## Description
- Make name optional when updating an Organization

## Documentation

Does this require changes to the WorkOS Docs? E.g. the [API
Reference](https://workos.com/docs/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.
  • Loading branch information
faroceann authored Aug 5, 2024
1 parent 444995b commit 75916d5
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "7.20.0",
"version": "7.21.0",
"name": "@workos-inc/node",
"author": "WorkOS",
"description": "A Node wrapper for the WorkOS API",
Expand Down Expand Up @@ -67,4 +67,4 @@
"default": "./lib/index.js"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { DomainData } from './domain-data.interface';

export interface UpdateOrganizationOptions {
organization: string;
name: string;
name?: string;
domainData?: DomainData[];

/**
Expand All @@ -16,7 +16,7 @@ export interface UpdateOrganizationOptions {
}

export interface SerializedUpdateOrganizationOptions {
name: string;
name?: string;
domain_data?: DomainData[];

/**
Expand Down
2 changes: 0 additions & 2 deletions src/organizations/organizations.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,10 @@ describe('Organizations', () => {
domainData: [
{ domain: 'example.com', state: DomainDataState.Verified },
],
name: 'Test Organization 2',
});

expect(fetchBody()).toEqual({
domain_data: [{ domain: 'example.com', state: 'verified' }],
name: 'Test Organization 2',
});
expect(subject.id).toEqual('org_01EHT88Z8J8795GZNQ4ZP1J81T');
expect(subject.name).toEqual('Test Organization 2');
Expand Down
4 changes: 2 additions & 2 deletions src/sso/__snapshots__/sso.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exports[`SSO SSO getProfileAndToken with all information provided sends a reques
"Accept": "application/json, text/plain, */*",
"Authorization": "Bearer sk_test_Sz3IQjepeSWaI4cMS4ms4sMuU",
"Content-Type": "application/x-www-form-urlencoded;charset=utf-8",
"User-Agent": "workos-node/7.20.0/fetch",
"User-Agent": "workos-node/7.21.0/fetch",
}
`;

Expand Down Expand Up @@ -58,7 +58,7 @@ exports[`SSO SSO getProfileAndToken without a groups attribute sends a request t
"Accept": "application/json, text/plain, */*",
"Authorization": "Bearer sk_test_Sz3IQjepeSWaI4cMS4ms4sMuU",
"Content-Type": "application/x-www-form-urlencoded;charset=utf-8",
"User-Agent": "workos-node/7.20.0/fetch",
"User-Agent": "workos-node/7.21.0/fetch",
}
`;

Expand Down
2 changes: 1 addition & 1 deletion src/workos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { SubtleCryptoProvider } from './common/crypto/subtle-crypto-provider';
import { FetchHttpClient } from './common/net/fetch-client';
import { IronSessionProvider } from './common/iron-session/iron-session-provider';

const VERSION = '7.20.0';
const VERSION = '7.21.0';

const DEFAULT_HOSTNAME = 'api.workos.com';

Expand Down

0 comments on commit 75916d5

Please sign in to comment.