Skip to content

Commit

Permalink
Update naming for query params
Browse files Browse the repository at this point in the history
  • Loading branch information
desfero committed Sep 15, 2023
1 parent 1b4ada1 commit c92cccb
Show file tree
Hide file tree
Showing 41 changed files with 532 additions and 538 deletions.
4 changes: 2 additions & 2 deletions packages/client/src/LensClient.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ describe(`Given storage and two ${LensClient.name} instances sharing the same st
const wallet = Wallet.createRandom();
const walletAddress = await wallet.getAddress();
const { id, text } = await client1.authentication.generateChallenge({
address: walletAddress,
profileId: '1',
for: '1',
signedBy: walletAddress,
});
const signature = await wallet.signMessage(text);

Expand Down
5 changes: 1 addition & 4 deletions packages/client/src/authentication/adapters/Credentials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ const TOKEN_EXP_THRESHOLD = DateUtils.secondsToMs(30);
const CLOCK_SKEWED_THRESHOLD = DateUtils.secondsToMs(10);

export class Credentials {
constructor(
readonly accessToken: string | undefined,
readonly refreshToken: string,
) {}
constructor(readonly accessToken: string | undefined, readonly refreshToken: string) {}

checkClock() {
const decodedToken = jwtDecode<JwtPayload>(this.refreshToken);
Expand Down
10 changes: 5 additions & 5 deletions packages/client/src/authentication/graphql/auth.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as Types from '../../graphql/types.generated';

import { GraphQLClient } from 'graphql-request';
import { GraphQLClientRequestHeaders } from 'graphql-request/build/cjs/types';
import * as Dom from 'graphql-request/dist/types.dom';
import { print } from 'graphql';
import gql from 'graphql-tag';
export type AuthChallengeFragment = { id: string; text: string };
Expand Down Expand Up @@ -82,7 +82,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper =
return {
AuthChallenge(
variables: AuthChallengeQueryVariables,
requestHeaders?: GraphQLClientRequestHeaders,
requestHeaders?: Dom.RequestInit['headers'],
): Promise<{
data: AuthChallengeQuery;
extensions?: any;
Expand All @@ -101,7 +101,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper =
},
AuthVerify(
variables: AuthVerifyQueryVariables,
requestHeaders?: GraphQLClientRequestHeaders,
requestHeaders?: Dom.RequestInit['headers'],
): Promise<{ data: AuthVerifyQuery; extensions?: any; headers: Dom.Headers; status: number }> {
return withWrapper(
(wrappedRequestHeaders) =>
Expand All @@ -115,7 +115,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper =
},
AuthAuthenticate(
variables: AuthAuthenticateMutationVariables,
requestHeaders?: GraphQLClientRequestHeaders,
requestHeaders?: Dom.RequestInit['headers'],
): Promise<{
data: AuthAuthenticateMutation;
extensions?: any;
Expand All @@ -134,7 +134,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper =
},
AuthRefresh(
variables: AuthRefreshMutationVariables,
requestHeaders?: GraphQLClientRequestHeaders,
requestHeaders?: Dom.RequestInit['headers'],
): Promise<{
data: AuthRefreshMutation;
extensions?: any;
Expand Down
5 changes: 1 addition & 4 deletions packages/client/src/consts/environments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
* @internal
*/
export class Environment {
constructor(
public readonly name: string,
private url: string,
) {}
constructor(public readonly name: string, private url: string) {}

get gqlEndpoint() {
return this.url;
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/graphql/fragments.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as Types from './types.generated';

import { GraphQLClient } from 'graphql-request';
import { GraphQLClientRequestHeaders } from 'graphql-request/build/cjs/types';
import * as Dom from 'graphql-request/dist/types.dom';
import { print } from 'graphql';
import gql from 'graphql-tag';
export type OptimisticStatusResultFragment = { value: boolean; isFinalisedOnchain: boolean };
Expand Down
Loading

0 comments on commit c92cccb

Please sign in to comment.