Skip to content

Commit

Permalink
Upgrade grpc lib to 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
binaryoverload committed Nov 24, 2024
1 parent 374d468 commit e6cbaf3
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 13 deletions.
33 changes: 27 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"dependencies": {
"@aws-sdk/client-s3": "^3.657.0",
"@aws-sdk/client-ses": "^3.515.0",
"@pretendonetwork/grpc": "^1.0.5",
"@pretendonetwork/grpc": "^2.0.1",
"bcrypt": "^5.0.0",
"buffer-crc32": "^0.2.13",
"colors": "^1.4.0",
Expand Down
2 changes: 1 addition & 1 deletion src/services/grpc/account/update-pnid-permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Status, ServerError } from 'nice-grpc';
import { UpdatePNIDPermissionsRequest } from '@pretendonetwork/grpc/account/update_pnid_permissions';
import { getPNIDByPID } from '@/database';
import { PNID_PERMISSION_FLAGS } from '@/types/common/permission-flags';
import type { Empty } from '@pretendonetwork/grpc/api/google/protobuf/empty';
import type { Empty } from '@pretendonetwork/grpc/google/protobuf/empty';

export async function updatePNIDPermissions(request: UpdatePNIDPermissionsRequest): Promise<Empty> {
const pnid = await getPNIDByPID(request.pid);
Expand Down
2 changes: 1 addition & 1 deletion src/services/grpc/api/forgot-password.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import validator from 'validator';
import { ForgotPasswordRequest } from '@pretendonetwork/grpc/api/forgot_password_rpc';
import { getPNIDByEmailAddress, getPNIDByUsername } from '@/database';
import { sendForgotPasswordEmail } from '@/util';
import type { Empty } from '@pretendonetwork/grpc/api/google/protobuf/empty';
import type { Empty } from '@pretendonetwork/grpc/google/protobuf/empty';
import type { HydratedPNIDDocument } from '@/types/mongoose/pnid';

export async function forgotPassword(request: ForgotPasswordRequest): Promise<Empty> {
Expand Down
2 changes: 1 addition & 1 deletion src/services/grpc/api/get-user-data.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CallContext } from 'nice-grpc';
import { GetUserDataResponse, DeepPartial } from '@pretendonetwork/grpc/api/get_user_data_rpc';
import { config } from '@/config-manager';
import type { Empty } from '@pretendonetwork/grpc/api/google/protobuf/empty';
import type { Empty } from '@pretendonetwork/grpc/google/protobuf/empty';
import type { AuthenticationCallContextExt } from '@/services/grpc/api/authentication-middleware';

export async function getUserData(_request: Empty, context: CallContext & AuthenticationCallContextExt): Promise<DeepPartial<GetUserDataResponse>> {
Expand Down
2 changes: 1 addition & 1 deletion src/services/grpc/api/reset-password.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Status, ServerError } from 'nice-grpc';
import { ResetPasswordRequest } from '@pretendonetwork/grpc/api/reset_password_rpc';
import { decryptToken, unpackToken, nintendoPasswordHash } from '@/util';
import { getPNIDByPID } from '@/database';
import type { Empty } from '@pretendonetwork/grpc/api/google/protobuf/empty';
import type { Empty } from '@pretendonetwork/grpc/google/protobuf/empty';
import type { Token } from '@/types/common/token';

// * This sucks
Expand Down
2 changes: 1 addition & 1 deletion src/services/grpc/api/set-discord-connection-data.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Status, ServerError, CallContext } from 'nice-grpc';
import { SetDiscordConnectionDataRequest } from '@pretendonetwork/grpc/api/set_discord_connection_data_rpc';
import type { Empty } from '@pretendonetwork/grpc/api/google/protobuf/empty';
import type { Empty } from '@pretendonetwork/grpc/google/protobuf/empty';
import type { AuthenticationCallContextExt } from '@/services/grpc/api/authentication-middleware';

export async function setDiscordConnectionData(request: SetDiscordConnectionDataRequest, context: CallContext & AuthenticationCallContextExt): Promise<Empty>{
Expand Down
2 changes: 1 addition & 1 deletion src/services/grpc/api/set-stripe-connection-data.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Status, ServerError, CallContext } from 'nice-grpc';
import { SetStripeConnectionDataRequest } from '@pretendonetwork/grpc/api/set_stripe_connection_data_rpc';
import { PNID } from '@/models/pnid';
import type { Empty } from '@pretendonetwork/grpc/api/google/protobuf/empty';
import type { Empty } from '@pretendonetwork/grpc/google/protobuf/empty';
import type { AuthenticationCallContextExt } from '@/services/grpc/api/authentication-middleware';

type StripeMongoUpdateScheme = {
Expand Down

0 comments on commit e6cbaf3

Please sign in to comment.