Skip to content
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

SDK updates #115

Closed
wants to merge 11 commits into from
Closed

SDK updates #115

wants to merge 11 commits into from

Conversation

passage-beachball-bot
Copy link
Collaborator

No description provided.

github-actions and others added 2 commits March 18, 2024 18:10
@@ -80,6 +80,22 @@ describe('Passage API Requests', () => {
const user = await passage.user.get(userID);
expect(user).toHaveProperty('id', userID);
});
test('getUserByIdentifier', async () => {
const randomEmail = `${Math.random().toString(36).substr(2, 20)}@gmail.com`;
Copy link
Contributor

Choose a reason for hiding this comment

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

sonar cloud is failing bc of math.random in this test. I think this is acceptable but open to suggestions for changing it.

Copy link
Contributor

@vanessa-passage vanessa-passage Mar 20, 2024

Choose a reason for hiding this comment

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

Acceptable here. I marked it as safe. You can re-run

Copy link
Contributor

Choose a reason for hiding this comment

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

I think using faker.internet.email() from faker-js would be preferable

Copy link
Contributor

@vanessa-passage vanessa-passage left a comment

Choose a reason for hiding this comment

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

@tdeshong
Copy link
Contributor

Can you also add this to the README.

https://github.com/passageidentity/passage-node/blob/main/README.md?plain=1#L103

made this addition

@@ -80,6 +80,22 @@ describe('Passage API Requests', () => {
const user = await passage.user.get(userID);
expect(user).toHaveProperty('id', userID);
});
test('getUserByIdentifier', async () => {
const randomEmail = `${Math.random().toString(36).substr(2, 20)}@gmail.com`;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think using faker.internet.email() from faker-js would be preferable

src/classes/User.ts Outdated Show resolved Hide resolved
@@ -294,7 +294,8 @@ export interface AppInfo {
*/
export const AppInfoTypeEnum = {
Complete: 'complete',
Flex: 'flex'
Flex: 'flex',
FlexV2: 'flex_v2'
Copy link
Contributor

Choose a reason for hiding this comment

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

this might have to be regenerated since we only support complete and flex now and have dropped flex_v2

Copy link
Contributor

Choose a reason for hiding this comment

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

Is that support live on prod? Also how would I go about regenerating this?

Copy link
Contributor

Choose a reason for hiding this comment

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

You can download the most recent SDK spec from the Github action and run it with the generate.sh file.

It would be a good idea for us to create a Github action just to regenerate SDKs.

src/classes/User.ts Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Added getUserByIdentifier, Flex v2 and nonce errors,",
Copy link
Contributor

Choose a reason for hiding this comment

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

A more natural language description might fit our style better since these changelogs will most likely be read by other devs.

Suggested change
"comment": "Added getUserByIdentifier, Flex v2 and nonce errors,",
"comment": "Added new method to get user by identifier, getUserByIdentifier",

also not quite sure how to do it, but a separate changelog for the Nonce model and its accompanying error types would be good. maybe @vanessa-passage knows?

Copy link
Contributor

Choose a reason for hiding this comment

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

Good call @ctran88. You can run the scripts again to generate another file.

Copy link

Quality Gate Passed Quality Gate passed

Issues
27 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
1.9% Duplication on New Code

See analysis details on SonarCloud

@ctran88 ctran88 deleted the sdk-updates-1710785405 branch November 21, 2024 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants