Skip to content

Commit

Permalink
Revert ":sparkles: New features"
Browse files Browse the repository at this point in the history
This reverts commit c8a89a0.
  • Loading branch information
naelob committed Jun 15, 2024
1 parent c8a89a0 commit 3d5083e
Show file tree
Hide file tree
Showing 16 changed files with 335 additions and 381 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ POSTGRES_DB=panora_db
POSTGRES_HOST=postgres
POSTGRES_PASSWORD=my_password

# Endpoint on which realtime webhooks are sent to
WEBHOOK_INGRESS=http://localhost:3000


# Each Provider is of form PROVIDER_VERTICAL_SOFTWAREMODE_ATTRIBUTE
# ================================================
# Integration Providers
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ redis_data
.DS_Store
.pnpm-store/
.npmrc
.vscode
.vscode
ngrok.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,22 @@ const formSchema = z.object({
}).optional(),
client_id : z.string({
required_error: "Please Enter a Client ID",
}).optional(),
}),
client_secret : z.string({
required_error: "Please Enter a Client Secret",
}).optional(),
}),
scope : z.string({
required_error: "Please Enter a scope",
}).optional(),
}),
api_key: z.string({
required_error: "Please Enter a API Key",
}).optional(),
}),
username: z.string({
required_error: "Please Enter Username",
}).optional(),
}),
secret: z.string({
required_error: "Please Enter Secret",
}).optional(),
}),
})

export function ConnectorDisplay({ item }: ItemDisplayProps) {
Expand Down Expand Up @@ -200,7 +200,7 @@ export function ConnectorDisplay({ item }: ItemDisplayProps) {
updateToggle: false,
status: dataToUpdate.status,
attributes: ["api_key"],
values: [api_key!]
values: [api_key]
}),
{
loading: 'Loading...',
Expand Down Expand Up @@ -229,7 +229,7 @@ export function ConnectorDisplay({ item }: ItemDisplayProps) {
createCsPromise({
type: providerToType(item?.name, item?.vertical!, AuthStrategy.api_key),
attributes: ["api_key"],
values: [api_key!]
values: [api_key]
}),
{
loading: 'Loading...',
Expand Down Expand Up @@ -276,7 +276,7 @@ export function ConnectorDisplay({ item }: ItemDisplayProps) {
updateToggle: false,
status: dataToUpdate.status,
attributes: ["username", "secret"],
values: [username!, secret!]
values: [username, secret]
}),
{
loading: 'Loading...',
Expand Down Expand Up @@ -306,7 +306,7 @@ export function ConnectorDisplay({ item }: ItemDisplayProps) {
createCsPromise({
type: providerToType(item?.name, item?.vertical!, AuthStrategy.basic),
attributes: ["username", "secret"],
values: [username!, secret!]
values: [username, secret]
}),
{
loading: 'Loading...',
Expand Down Expand Up @@ -342,7 +342,7 @@ export function ConnectorDisplay({ item }: ItemDisplayProps) {
fetchCredentials({
type: mappingConnectionStrategies[0].type,
attributes: item?.authStrategy === AuthStrategy.oauth2 ? needsSubdomain(item.name.toLowerCase(), item.vertical!.toLowerCase()) ? ["subdomain", "client_id", "client_secret", "scope"] : ["client_id", "client_secret", "scope"]
: item?.authStrategy === AuthStrategy.api_key ? ["api_key"] : ["username", "secret"]
: item?.authStrategy === AuthStrategy.api_key ? ["api_key"] : ["username", "secret"]
}, {
onSuccess(data) {
if (item?.authStrategy === AuthStrategy.oauth2) {
Expand Down Expand Up @@ -436,9 +436,9 @@ export function ConnectorDisplay({ item }: ItemDisplayProps) {
<Form {...form}>
<form onSubmit={form.handleSubmit(onSubmit)}>
{ item.authStrategy == AuthStrategy.oauth2 &&

<>

{ needsSubdomain(item.name.toLowerCase(), item.vertical!.toLowerCase()) &&
{ needsSubdomain(item.name.toLowerCase(), item.vertical!.toLowerCase()) &&
<div className="flex flex-col">
<FormField
name="subdomain"
Expand All @@ -455,7 +455,6 @@ export function ConnectorDisplay({ item }: ItemDisplayProps) {
/>
</div>
}

<div className="flex flex-col">
<FormField
name="client_id"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default function ConnectionTable() {
date: connection.created_at,
connectionToken: connection.connection_token!
}))
console.log("connections are" + JSON.stringify(ts))


return (
<>
Expand Down
1 change: 0 additions & 1 deletion apps/client-ts/src/hooks/get/useConnections.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import Cookies from 'js-cookie';


const useConnections = () => {
console.log(Cookies.get('access_token'))
return useQuery({
queryKey: ['connections'],
queryFn: async (): Promise<Connection[]> => {
Expand Down
35 changes: 17 additions & 18 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ services:
environment:
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:5432/${POSTGRES_DB}?ssl=false
DISTRIBUTION: ${DISTRIBUTION}
WEBHOOK_INGRESS: ${WEBHOOK_INGRESS}
JWT_SECRET: ${JWT_SECRET}
REDIS_HOST: ${REDIS_HOST}
REDIS_PASS: ${REDIS_PASS}
REDIS_USER: ${REDIS_USER}
REDIS_PORT: ${REDIS_PORT}
#REDIS_TLS: 1 # set this variable to 1 when Redis is AWS hosted
REDIS_DB: ${REDIS_DB}
WEBHOOK_INGRESS: ${WEBHOOK_INGRESS}
ENCRYPT_CRYPTO_SECRET_KEY: ${ENCRYPT_CRYPTO_SECRET_KEY}
HUBSPOT_CRM_CLOUD_CLIENT_ID: ${HUBSPOT_CRM_CLOUD_CLIENT_ID}
HUBSPOT_CRM_CLOUD_CLIENT_SECRET: ${HUBSPOT_CRM_CLOUD_CLIENT_SECRET}
Expand Down Expand Up @@ -189,23 +189,22 @@ services:
volumes:
- .:/app

ngrok:
image: ngrok/ngrok:latest
restart: always
command:
- "start"
- "--all"
- "--config"
- "/etc/ngrok.yml"
volumes:
- ./ngrok.yml:/etc/ngrok.yml
ports:
- 4040:4040
depends_on:
api:
condition: service_healthy
network_mode: "host"

#ngrok:
#image: ngrok/ngrok:latest
#restart: always
#command:
# - "start"
# - "--all"
# - "--config"
# - "/etc/ngrok.yml"
# volumes:
# - ./ngrok.yml:/etc/ngrok.yml
# ports:
# - 4040:4040
#depends_on:
# api:
# condition: service_healthy
# network_mode: "host"

docs:
build:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ services:
DOPPLER_TOKEN: ${DOPPLER_TOKEN_API}
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:5432/${POSTGRES_DB}?ssl=false
DISTRIBUTION: ${DISTRIBUTION}
WEBHOOK_INGRESS: ${WEBHOOK_INGRESS}
JWT_SECRET: ${JWT_SECRET}
REDIS_HOST: ${REDIS_HOST}
REDIS_USER: ${REDIS_USER}
REDIS_PASS: ${REDIS_PASS}
BACKEND_PORT: ${BACKEND_PORT}
REDIS_DB: ${REDIS_DB}
WEBHOOK_INGRESS: ${WEBHOOK_INGRESS}
ENCRYPT_CRYPTO_SECRET_KEY: ${ENCRYPT_CRYPTO_SECRET_KEY}
HUBSPOT_CRM_CLOUD_CLIENT_ID: ${HUBSPOT_CRM_CLOUD_CLIENT_ID}
HUBSPOT_CRM_CLOUD_CLIENT_SECRET: ${HUBSPOT_CRM_CLOUD_CLIENT_SECRET}
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ services:
environment:
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:5432/${POSTGRES_DB}?ssl=false
DISTRIBUTION: ${DISTRIBUTION}
WEBHOOK_INGRESS: ${WEBHOOK_INGRESS}
JWT_SECRET: ${JWT_SECRET}
REDIS_HOST: ${REDIS_HOST}
REDIS_USER: ${REDIS_USER}
REDIS_PASS: ${REDIS_PASS}
REDIS_PORT: ${REDIS_PORT}
REDIS_DB: ${REDIS_DB}
WEBHOOK_INGRESS: ${WEBHOOK_INGRESS}
ENCRYPT_CRYPTO_SECRET_KEY: ${ENCRYPT_CRYPTO_SECRET_KEY}
HUBSPOT_CRM_CLOUD_CLIENT_ID: ${HUBSPOT_CRM_CLOUD_CLIENT_ID}
HUBSPOT_CRM_CLOUD_CLIENT_SECRET: ${HUBSPOT_CRM_CLOUD_CLIENT_SECRET}
Expand Down
10 changes: 0 additions & 10 deletions ngrok.yml

This file was deleted.

Loading

0 comments on commit 3d5083e

Please sign in to comment.