From efef738953802d605b7bed8fb9e8ebe2ee9def7a Mon Sep 17 00:00:00 2001 From: Siddharth Tiwari Date: Thu, 8 Feb 2024 03:15:24 +0530 Subject: [PATCH] chore: Addressing comments, update readme, update codegen --- apps/map/README.md | 7 + apps/map/codegen.yml | 2 +- apps/map/components/map/index.tsx | 2 +- apps/map/components/map/suggest-form.tsx | 2 +- apps/map/services/galoy/graphql/generated.ts | 145 ++++--------------- 5 files changed, 37 insertions(+), 121 deletions(-) diff --git a/apps/map/README.md b/apps/map/README.md index 7169fbef20b..0a55876c0e2 100644 --- a/apps/map/README.md +++ b/apps/map/README.md @@ -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. diff --git a/apps/map/codegen.yml b/apps/map/codegen.yml index d80849439d4..2a58c294fed 100644 --- a/apps/map/codegen.yml +++ b/apps/map/codegen.yml @@ -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}" diff --git a/apps/map/components/map/index.tsx b/apps/map/components/map/index.tsx index e9c27817028..3242f44b033 100644 --- a/apps/map/components/map/index.tsx +++ b/apps/map/components/map/index.tsx @@ -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)} /> ))} diff --git a/apps/map/components/map/suggest-form.tsx b/apps/map/components/map/suggest-form.tsx index 9639c540579..344cd9f683d 100644 --- a/apps/map/components/map/suggest-form.tsx +++ b/apps/map/components/map/suggest-form.tsx @@ -51,7 +51,7 @@ export function SuggestMapFormSheet({ latitude, longitude }: formProps) { ) : ( <> - Fill the Details of the Business you want to suggest, with there username. + Fill the Details of the Business you want to Add.
; }; -export type ApiKey = { - readonly __typename: 'ApiKey'; - readonly createdAt: Scalars['Timestamp']['output']; - readonly expired: Scalars['Boolean']['output']; - readonly expiresAt?: Maybe; - readonly id: Scalars['ID']['output']; - readonly lastUsedAt?: Maybe; - readonly name: Scalars['String']['output']; - readonly readOnly: Scalars['Boolean']['output']; - readonly revoked: Scalars['Boolean']['output']; -}; - -export type ApiKeyCreateInput = { - readonly expireInDays?: InputMaybe; - 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; @@ -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; @@ -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; @@ -993,16 +981,6 @@ export type MutationAccountUpdateDisplayCurrencyArgs = { }; -export type MutationApiKeyCreateArgs = { - input: ApiKeyCreateInput; -}; - - -export type MutationApiKeyRevokeArgs = { - input: ApiKeyRevokeInput; -}; - - export type MutationCallbackEndpointAddArgs = { input: CallbackEndpointAddInput; }; @@ -1168,16 +1146,6 @@ export type MutationUserContactUpdateAliasArgs = { }; -export type MutationUserDisableNotificationCategoryArgs = { - input: UserDisableNotificationCategoryInput; -}; - - -export type MutationUserDisableNotificationChannelArgs = { - input: UserDisableNotificationChannelInput; -}; - - export type MutationUserEmailRegistrationInitiateArgs = { input: UserEmailRegistrationInitiateInput; }; @@ -1188,16 +1156,6 @@ export type MutationUserEmailRegistrationValidateArgs = { }; -export type MutationUserEnableNotificationCategoryArgs = { - input: UserEnableNotificationCategoryInput; -}; - - -export type MutationUserEnableNotificationChannelArgs = { - input: UserEnableNotificationChannelInput; -}; - - export type MutationUserLoginArgs = { input: UserLoginInput; }; @@ -1807,7 +1765,6 @@ export type UsdWalletTransactionsByPaymentHashArgs = { export type User = { readonly __typename: 'User'; - readonly apiKeys: ReadonlyArray; /** * Get single contact details. * Can include the transactions associated with the contact. @@ -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; /** Whether TOTP is enabled for this user. */ @@ -1881,15 +1837,6 @@ export type UserContactUpdateAliasPayload = { readonly errors: ReadonlyArray; }; -export type UserDisableNotificationCategoryInput = { - readonly category: UserNotificationCategory; - readonly channel: UserNotificationChannel; -}; - -export type UserDisableNotificationChannelInput = { - readonly channel: UserNotificationChannel; -}; - export type UserEmailDeletePayload = { readonly __typename: 'UserEmailDeletePayload'; readonly errors: ReadonlyArray; @@ -1918,15 +1865,6 @@ export type UserEmailRegistrationValidatePayload = { readonly me?: Maybe; }; -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']; @@ -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; - readonly enabled: Scalars['Boolean']['output']; -}; - -export type UserNotificationSettings = { - readonly __typename: 'UserNotificationSettings'; - readonly push: UserNotificationChannelSettings; -}; - export type UserPhoneDeletePayload = { readonly __typename: 'UserPhoneDeletePayload'; readonly errors: ReadonlyArray; @@ -2024,11 +1938,6 @@ export type UserUpdateLanguagePayload = { readonly user?: Maybe; }; -export type UserUpdateNotificationSettingsPayload = { - readonly __typename: 'UserUpdateNotificationSettingsPayload'; - readonly notificationSettings: UserNotificationSettings; -}; - export type UserUpdateUsernameInput = { readonly username: Scalars['Username']['input']; };