Skip to content

Commit

Permalink
chore: Addressing comments, update readme, update codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
siddhart1o1 committed Feb 7, 2024
1 parent d4cf733 commit efef738
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 121 deletions.
7 changes: 7 additions & 0 deletions apps/map/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
# Map

### local dev setup
This app uses Google Maps, therefore it requires a Google Maps API token:
```
NEXT_PUBLIC_MAP_API_TOKEN
```

App run's on port `3005` by default.
2 changes: 1 addition & 1 deletion apps/map/codegen.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
overwrite: true
schema:
- "http://localhost:4455/graphql"
- "../../core/api/src/graphql/public/schema.graphql"
documents:
- "app/**/*.{ts,tsx}"
- "services/**/*.{ts,tsx}"
Expand Down
2 changes: 1 addition & 1 deletion apps/map/components/map/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export default function MapComponent({ mapData }: MapComponentProps) {
lat: marker.mapInfo.coordinates.latitude,
lng: marker.mapInfo.coordinates.longitude,
}}
title={marker.username as string}
title={marker.username}
onClick={() => handleMarkerClick(marker)}
/>
))}
Expand Down
2 changes: 1 addition & 1 deletion apps/map/components/map/suggest-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function SuggestMapFormSheet({ latitude, longitude }: formProps) {
) : (
<>
<SheetDescription>
Fill the Details of the Business you want to suggest, with there username.
Fill the Details of the Business you want to Add.
</SheetDescription>
<form action={formAction} className="grid g py-4">
<InputComponent
Expand Down
145 changes: 27 additions & 118 deletions apps/map/services/galoy/graphql/generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,39 +17,66 @@ export type Scalars = {
Boolean: { input: boolean; output: boolean; }
Int: { input: number; output: number; }
Float: { input: number; output: number; }
/** An Opaque Bearer token */
AuthToken: { input: string; output: string; }
/** (Positive) Cent amount (1/100 of a dollar) */
CentAmount: { input: number; output: number; }
/** An alias name that a user can set for a wallet (with which they have transactions) */
ContactAlias: { input: string; output: string; }
/** A CCA2 country code (ex US, FR, etc) */
CountryCode: { input: string; output: string; }
/** Display currency of an account */
DisplayCurrency: { input: string; output: string; }
/** Email address */
EmailAddress: { input: string; output: string; }
/** An id to be passed between registrationInitiate and registrationValidate for confirming email */
EmailRegistrationId: { input: string; output: string; }
EndpointId: { input: string; output: string; }
/** Url that will be fetched on events for the account */
EndpointUrl: { input: string; output: string; }
/** Feedback shared with our user */
Feedback: { input: string; output: string; }
/** Hex-encoded string of 32 bytes */
Hex32Bytes: { input: string; output: string; }
Language: { input: string; output: string; }
LnPaymentPreImage: { input: string; output: string; }
/** BOLT11 lightning invoice payment request with the amount included */
LnPaymentRequest: { input: string; output: string; }
LnPaymentSecret: { input: string; output: string; }
/** Text field in a lightning payment transaction */
Memo: { input: string; output: string; }
/** (Positive) amount of minutes */
Minutes: { input: string; output: string; }
NotificationCategory: { input: string; output: string; }
/** An address for an on-chain bitcoin destination */
OnChainAddress: { input: string; output: string; }
OnChainTxHash: { input: string; output: string; }
/** An authentication code valid for a single use */
OneTimeAuthCode: { input: string; output: string; }
PaymentHash: { input: string; output: string; }
/** Phone number which includes country code */
Phone: { input: string; output: string; }
/** Non-fractional signed whole numeric value between -(2^53) + 1 and 2^53 - 1 */
SafeInt: { input: number; output: number; }
/** (Positive) Satoshi amount */
SatAmount: { input: number; output: number; }
/** (Positive) amount of seconds */
Seconds: { input: number; output: number; }
/** An amount (of a currency) that can be negative (e.g. in a transaction) */
SignedAmount: { input: number; output: number; }
/** A string amount (of a currency) that can be negative (e.g. in a transaction) */
SignedDisplayMajorAmount: { input: string; output: string; }
/** Timestamp field, serialized as Unix time (the number of seconds since the Unix epoch) */
Timestamp: { input: number; output: number; }
/** A time-based one-time password */
TotpCode: { input: string; output: string; }
/** An id to be passed between set and verify for confirming totp */
TotpRegistrationId: { input: string; output: string; }
/** A secret to generate time-based one-time password */
TotpSecret: { input: string; output: string; }
/** Unique identifier of a user */
Username: { input: string; output: string; }
/** Unique identifier of a wallet */
WalletId: { input: string; output: string; }
};

Expand Down Expand Up @@ -181,39 +208,6 @@ export type AccountUpdateNotificationSettingsPayload = {
readonly errors: ReadonlyArray<Error>;
};

export type ApiKey = {
readonly __typename: 'ApiKey';
readonly createdAt: Scalars['Timestamp']['output'];
readonly expired: Scalars['Boolean']['output'];
readonly expiresAt?: Maybe<Scalars['Timestamp']['output']>;
readonly id: Scalars['ID']['output'];
readonly lastUsedAt?: Maybe<Scalars['Timestamp']['output']>;
readonly name: Scalars['String']['output'];
readonly readOnly: Scalars['Boolean']['output'];
readonly revoked: Scalars['Boolean']['output'];
};

export type ApiKeyCreateInput = {
readonly expireInDays?: InputMaybe<Scalars['Int']['input']>;
readonly name: Scalars['String']['input'];
readonly readOnly?: Scalars['Boolean']['input'];
};

export type ApiKeyCreatePayload = {
readonly __typename: 'ApiKeyCreatePayload';
readonly apiKey: ApiKey;
readonly apiKeySecret: Scalars['String']['output'];
};

export type ApiKeyRevokeInput = {
readonly id: Scalars['ID']['input'];
};

export type ApiKeyRevokePayload = {
readonly __typename: 'ApiKeyRevokePayload';
readonly apiKey: ApiKey;
};

export type AuthTokenPayload = {
readonly __typename: 'AuthTokenPayload';
readonly authToken?: Maybe<Scalars['AuthToken']['output']>;
Expand Down Expand Up @@ -838,8 +832,6 @@ export type Mutation = {
readonly accountEnableNotificationChannel: AccountUpdateNotificationSettingsPayload;
readonly accountUpdateDefaultWalletId: AccountUpdateDefaultWalletIdPayload;
readonly accountUpdateDisplayCurrency: AccountUpdateDisplayCurrencyPayload;
readonly apiKeyCreate: ApiKeyCreatePayload;
readonly apiKeyRevoke: ApiKeyRevokePayload;
readonly callbackEndpointAdd: CallbackEndpointAddPayload;
readonly callbackEndpointDelete: SuccessPayload;
readonly captchaCreateChallenge: CaptchaCreateChallengePayload;
Expand Down Expand Up @@ -941,13 +933,9 @@ export type Mutation = {
readonly quizCompleted: QuizCompletedPayload;
/** @deprecated will be moved to AccountContact */
readonly userContactUpdateAlias: UserContactUpdateAliasPayload;
readonly userDisableNotificationCategory: UserUpdateNotificationSettingsPayload;
readonly userDisableNotificationChannel: UserUpdateNotificationSettingsPayload;
readonly userEmailDelete: UserEmailDeletePayload;
readonly userEmailRegistrationInitiate: UserEmailRegistrationInitiatePayload;
readonly userEmailRegistrationValidate: UserEmailRegistrationValidatePayload;
readonly userEnableNotificationCategory: UserUpdateNotificationSettingsPayload;
readonly userEnableNotificationChannel: UserUpdateNotificationSettingsPayload;
readonly userLogin: AuthTokenPayload;
readonly userLoginUpgrade: UpgradePayload;
readonly userLogout: SuccessPayload;
Expand Down Expand Up @@ -993,16 +981,6 @@ export type MutationAccountUpdateDisplayCurrencyArgs = {
};


export type MutationApiKeyCreateArgs = {
input: ApiKeyCreateInput;
};


export type MutationApiKeyRevokeArgs = {
input: ApiKeyRevokeInput;
};


export type MutationCallbackEndpointAddArgs = {
input: CallbackEndpointAddInput;
};
Expand Down Expand Up @@ -1168,16 +1146,6 @@ export type MutationUserContactUpdateAliasArgs = {
};


export type MutationUserDisableNotificationCategoryArgs = {
input: UserDisableNotificationCategoryInput;
};


export type MutationUserDisableNotificationChannelArgs = {
input: UserDisableNotificationChannelInput;
};


export type MutationUserEmailRegistrationInitiateArgs = {
input: UserEmailRegistrationInitiateInput;
};
Expand All @@ -1188,16 +1156,6 @@ export type MutationUserEmailRegistrationValidateArgs = {
};


export type MutationUserEnableNotificationCategoryArgs = {
input: UserEnableNotificationCategoryInput;
};


export type MutationUserEnableNotificationChannelArgs = {
input: UserEnableNotificationChannelInput;
};


export type MutationUserLoginArgs = {
input: UserLoginInput;
};
Expand Down Expand Up @@ -1807,7 +1765,6 @@ export type UsdWalletTransactionsByPaymentHashArgs = {

export type User = {
readonly __typename: 'User';
readonly apiKeys: ReadonlyArray<ApiKey>;
/**
* Get single contact details.
* Can include the transactions associated with the contact.
Expand All @@ -1830,7 +1787,6 @@ export type User = {
* When value is 'default' the intent is to use preferred language from OS settings.
*/
readonly language: Scalars['Language']['output'];
readonly notificationSettings: UserNotificationSettings;
/** Phone number with international calling code. */
readonly phone?: Maybe<Scalars['Phone']['output']>;
/** Whether TOTP is enabled for this user. */
Expand Down Expand Up @@ -1881,15 +1837,6 @@ export type UserContactUpdateAliasPayload = {
readonly errors: ReadonlyArray<Error>;
};

export type UserDisableNotificationCategoryInput = {
readonly category: UserNotificationCategory;
readonly channel: UserNotificationChannel;
};

export type UserDisableNotificationChannelInput = {
readonly channel: UserNotificationChannel;
};

export type UserEmailDeletePayload = {
readonly __typename: 'UserEmailDeletePayload';
readonly errors: ReadonlyArray<Error>;
Expand Down Expand Up @@ -1918,15 +1865,6 @@ export type UserEmailRegistrationValidatePayload = {
readonly me?: Maybe<User>;
};

export type UserEnableNotificationCategoryInput = {
readonly category: UserNotificationCategory;
readonly channel: UserNotificationChannel;
};

export type UserEnableNotificationChannelInput = {
readonly channel: UserNotificationChannel;
};

export type UserLoginInput = {
readonly code: Scalars['OneTimeAuthCode']['input'];
readonly phone: Scalars['Phone']['input'];
Expand All @@ -1941,30 +1879,6 @@ export type UserLogoutInput = {
readonly deviceToken: Scalars['String']['input'];
};

export const UserNotificationCategory = {
AdminNotification: 'ADMIN_NOTIFICATION',
Balance: 'BALANCE',
Circles: 'CIRCLES',
Payments: 'PAYMENTS'
} as const;

export type UserNotificationCategory = typeof UserNotificationCategory[keyof typeof UserNotificationCategory];
export const UserNotificationChannel = {
Push: 'PUSH'
} as const;

export type UserNotificationChannel = typeof UserNotificationChannel[keyof typeof UserNotificationChannel];
export type UserNotificationChannelSettings = {
readonly __typename: 'UserNotificationChannelSettings';
readonly disabledCategories: ReadonlyArray<UserNotificationCategory>;
readonly enabled: Scalars['Boolean']['output'];
};

export type UserNotificationSettings = {
readonly __typename: 'UserNotificationSettings';
readonly push: UserNotificationChannelSettings;
};

export type UserPhoneDeletePayload = {
readonly __typename: 'UserPhoneDeletePayload';
readonly errors: ReadonlyArray<Error>;
Expand Down Expand Up @@ -2024,11 +1938,6 @@ export type UserUpdateLanguagePayload = {
readonly user?: Maybe<User>;
};

export type UserUpdateNotificationSettingsPayload = {
readonly __typename: 'UserUpdateNotificationSettingsPayload';
readonly notificationSettings: UserNotificationSettings;
};

export type UserUpdateUsernameInput = {
readonly username: Scalars['Username']['input'];
};
Expand Down

0 comments on commit efef738

Please sign in to comment.