Skip to content

Commit

Permalink
Merge pull request #615 from panoratech/feat/addd-speakeasy-pagination
Browse files Browse the repository at this point in the history
✨ Added pagination
  • Loading branch information
naelob authored Aug 6, 2024
2 parents fb17753 + c6d744f commit 5919381
Show file tree
Hide file tree
Showing 94 changed files with 2,939 additions and 321 deletions.
32 changes: 16 additions & 16 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -264,22 +264,22 @@ services:
# volumes:
# - pgadmin-data:/var/lib/pgadmin

# 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
16 changes: 0 additions & 16 deletions docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -739,14 +739,6 @@
"api-reference/webhooks/update"
]
},
{
"group": "Linked Users",
"pages": [
"api-reference/linked_users/create",
"api-reference/linked_users/list",
"api-reference/linked_users/retrieve"
]
},
{
"group": "Organisations",
"pages": [
Expand All @@ -767,14 +759,6 @@
"api-reference/events/retrieve-events"
]
},
{
"group": "Magic Links",
"pages": [
"api-reference/magic-link/create-a-magic-link",
"api-reference/magic-link/retrieve-magic-links",
"api-reference/magic-link/retrieve-a-magic-link"
]
},
{
"group": "Passthrough",
"pages": [
Expand Down
4 changes: 2 additions & 2 deletions docs/open-source/contributors/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ We made a docker file that builds Panora from sources, specifically to help you

<Steps>
<Step title="Copy env variables">
<Note>Check environment variables reference [here](/open-source/selfhost/envVariables) !</Note>
<Note>Check environment variables reference [here](/open-source/self_hosting/envVariables) !</Note>
```bash
cp .env.example .env
```
Expand All @@ -27,7 +27,7 @@ We made a docker file that builds Panora from sources, specifically to help you
</Step>
<Step title="(Optional) Enable Grok">
If you have to create an oAuth app for a provider and needs an **https** redirect uri you must enable Grok service and use your secure domain from them (it proxies requests to `localhost:3000`).
Check this [quick guide](/open-source/selfhost/ngrok) to set it up !
Check this [quick guide](/open-source/self_hosting/ngrok) to set it up !
</Step>
<Step title="Start the Dockerfile">
```bash
Expand Down
2 changes: 1 addition & 1 deletion docs/open-source/contributors/test.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ icon: "star"
Now you must test Panora unified endpoints with the new connector built.
<Steps>
<Step title="Create a connection using the magic link">
You need a set of credentials that you'll set in `.env` if you use oAuth (check [here](/open-source/selfhost/envVariables#providers-specific-credentials) how it works).
You need a set of credentials that you'll set in `.env` if you use oAuth (check [here](/open-source/self_hosting/envVariables#providers-specific-credentials) how it works).
Check [this guide](/core-concepts/magic-links) to create a connection through it.
To activate your new connector on the magic link, visit this [**file**](https://github.com/panoratech/Panora/blob/main/packages/shared/src/connectors/metadata.ts#L6) :
and change your connector status to `active: true`.
Expand Down
2 changes: 1 addition & 1 deletion docs/open-source/self_hosting/envVariables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ description: ""

## Ingress

<Note>Check [here](/selfhost/ngrok) to set up Ngrok ! </Note>
<Note>Check [here](/self_hosting/ngrok) to set up Ngrok ! </Note>

| Variable | Example | Purpose |
| -------- | ------------------------------------- | ------------------------------------- |
Expand Down
2 changes: 1 addition & 1 deletion docs/open-source/self_hosting/guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ git clone https://github.com/panoratech/Panora.git
</Step>

<Step title="Prepare the installation:">
<Note> Check [here](/open-source/selfhost/envVariables) to fill the right env variables ! </Note>
<Note> Check [here](/open-source/self_hosting/envVariables) to fill the right env variables ! </Note>
```bash
cd Panora && cp .env.example .env
```
Expand Down
2 changes: 1 addition & 1 deletion packages/api/scripts/commonObject.sh
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ private connectionUtils: ConnectionUtils
@UseGuards(ApiKeyAuthGuard) @Get()
async list(
@Headers('x-connection-token') connection_token: string,
@Query() query: FetchObjectsQueryDto,
@Query() query: QueryDto,
) {
try{
const { linkedUserId, remoteSource } =
Expand Down
54 changes: 27 additions & 27 deletions packages/api/src/@core/field-mapping/field-mapping.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,23 +93,16 @@ export class FieldMappingController {
);
}

@ApiOperation({
operationId: 'definitions',
summary: 'Define target Field',
})
@ApiBody({ type: DefineTargetFieldDto })
@ApiOperation({ operationId: 'map', summary: 'Map Custom Field' })
@ApiBody({ type: MapFieldToProviderDto })
@ApiPostCustomResponse(CustomFieldResponse)
@Post('define')
@UseGuards(ApiKeyAuthGuard)
defineTargetField(
@Request() req: any,
@Body() defineTargetFieldDto: DefineTargetFieldDto,
@UseGuards(JwtAuthGuard)
@ApiExcludeEndpoint()
@Post('internal/map')
mapInternalFieldToProvider(
@Body() mapFieldToProviderDto: MapFieldToProviderDto,
) {
const { id_project } = req.user;
return this.fieldMappingService.defineTargetField(
defineTargetFieldDto,
id_project,
);
return this.fieldMappingService.mapFieldToProvider(mapFieldToProviderDto);
}

@ApiOperation({
Expand All @@ -129,6 +122,25 @@ export class FieldMappingController {
return this.fieldMappingService.createCustomField(data, id_project);
}

@ApiOperation({
operationId: 'definitions',
summary: 'Define target Field',
})
@ApiBody({ type: DefineTargetFieldDto })
@ApiPostCustomResponse(CustomFieldResponse)
@Post('define')
@UseGuards(ApiKeyAuthGuard)
defineTargetField(
@Request() req: any,
@Body() defineTargetFieldDto: DefineTargetFieldDto,
) {
const { id_project } = req.user;
return this.fieldMappingService.defineTargetField(
defineTargetFieldDto,
id_project,
);
}

@ApiOperation({
operationId: 'defineCustomField',
summary: 'Create Custom Field',
Expand All @@ -142,18 +154,6 @@ export class FieldMappingController {
return this.fieldMappingService.createCustomField(data, id_project);
}

@ApiOperation({ operationId: 'map', summary: 'Map Custom Field' })
@ApiBody({ type: MapFieldToProviderDto })
@ApiPostCustomResponse(CustomFieldResponse)
@UseGuards(JwtAuthGuard)
@ApiExcludeEndpoint()
@Post('internal/map')
mapInternalFieldToProvider(
@Body() mapFieldToProviderDto: MapFieldToProviderDto,
) {
return this.fieldMappingService.mapFieldToProvider(mapFieldToProviderDto);
}

@ApiOperation({ operationId: 'map', summary: 'Map Custom Field' })
@ApiBody({ type: MapFieldToProviderDto })
@ApiPostCustomResponse(CustomFieldResponse)
Expand Down
Loading

0 comments on commit 5919381

Please sign in to comment.