Skip to content

TSM-10: convert Group E services to TypeScript - #567

Open
Justin Hammond (Justintime50) wants to merge 61 commits into
ts-migrate/09-services-group-dfrom
ts-migrate/10-services-group-e
Open

TSM-10: convert Group E services to TypeScript#567
Justin Hammond (Justintime50) wants to merge 61 commits into
ts-migrate/09-services-group-dfrom
ts-migrate/10-services-group-e

Conversation

@Justintime50

@Justintime50 Justin Hammond (Justintime50) commented Aug 7, 2026

Copy link
Copy Markdown
Member

Summary

  • Convert Group E services to TypeScript: ApiKey, CustomerPortal, Embeddable, EndShipper, FedExRegistration, Luma, ReferralCustomer, and User.
  • Preserve existing runtime behavior and public service interfaces.

Validation

  • npm run typescript
  • npm run build
  • Targeted Group E service tests

@Justintime50
Justin Hammond (Justintime50) force-pushed the ts-migrate/10-services-group-e branch 2 times, most recently from 4a8ec7d to 28d3ae6 Compare August 12, 2026 17:21
@Justintime50
Justin Hammond (Justintime50) force-pushed the ts-migrate/10-services-group-e branch 2 times, most recently from a52c884 to d1308b6 Compare August 12, 2026 17:27
@Justintime50
Justin Hammond (Justintime50) marked this pull request as ready for review August 12, 2026 20:27
@Justintime50
Justin Hammond (Justintime50) requested a review from a team as a code owner August 12, 2026 20:27

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.

Few comments, nothing blocking

Comment on lines +39 to +41
user.children?.forEach((child) => {
if (child.id == id) {
return child.keys;
return child.keys ?? [];

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.

Issue:
This is unrelated to your changes here, but I don't think this would actually work the way it looks like is intended here. This return child.keys ?? []; only returns in the forEach arrow fn, not for the outside scope. If you wanted to return those child keys from the retrieveApiKeysForUser outside fn, you would need to either do like a user.children?.find and return that, or change this to like a for (child in user.children ?? []) { loop.

Comment on lines +25 to +26
/* eslint-disable no-unused-vars */
type ReferralScopedClient = {

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.

question:
Is this temporary, or is there a reason we are keeping this arround?

Comment on lines +61 to +62
const body = response.body as Record<string, unknown>;
return body.public_key as string;

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.

thought:
If we are asserting the type anyway, we could shorten this to

const body = response.body as { public_key: string };
return body.public_key;

referralApiKey: string,
stripeCreditCardToken: string,
priority: string,
): Promise<Record<string, unknown>> {

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.

nit:
Unspecific return type here.

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.

3 participants