From 00a0b57e3320f24648a30938854732ea9df38118 Mon Sep 17 00:00:00 2001 From: nael Date: Mon, 5 Aug 2024 23:22:34 +0200 Subject: [PATCH] :ambulance: Fix docs gaps --- .../src/hooks/create/useCreateProject.tsx | 2 +- .../src/hooks/create/useDefineField.tsx | 2 +- apps/webapp/src/hooks/create/useMapField.tsx | 2 +- apps/webapp/src/hooks/get/useConnections.tsx | 2 +- apps/webapp/src/hooks/get/useEvents.tsx | 2 +- .../webapp/src/hooks/get/useFieldMappings.tsx | 2 +- apps/webapp/src/hooks/get/useProjects.tsx | 2 +- docker-compose.dev.yml | 16 +- docs/api-reference/authentication.mdx | 34 +- docs/ats/quickstart.mdx | 120 +++ docs/backend-sdk/python.mdx | 40 +- docs/backend-sdk/typescript.mdx | 21 +- docs/core-concepts/auth.mdx | 104 +- docs/core-concepts/custom-fields.mdx | 6 +- docs/crm/quickstart.mdx | 94 +- docs/file-storage/quickstart.mdx | 75 ++ docs/mint.json | 15 +- docs/quick-start.mdx | 41 +- docs/recipes/catch-connection-token.mdx | 73 +- docs/recipes/import-existing-users.mdx | 8 +- docs/ticketing/quickstart.mdx | 49 +- docs/webhooks/overview.mdx | 86 +- .../panora-webhooks/dto/webhook.dto.ts | 6 +- .../panora-webhooks/webhook.controller.ts | 4 +- .../api/src/@core/auth/auth.controller.ts | 12 +- .../api/src/@core/connections/@utils/types.ts | 97 ++ .../connections/connections.controller.ts | 25 +- .../api/src/@core/events/dto/index.dto.ts | 84 ++ .../api/src/@core/events/events.controller.ts | 28 +- .../field-mapping/field-mapping.controller.ts | 63 +- .../linked-users/linked-users.controller.ts | 4 +- .../@core/projects/dto/create-project.dto.ts | 54 ++ .../src/@core/projects/projects.controller.ts | 44 +- .../api/src/@core/sync/sync.controller.ts | 27 +- .../accounting/address/address.controller.ts | 2 +- .../attachment/attachment.controller.ts | 2 +- .../balancesheet/balancesheet.controller.ts | 2 +- .../cashflowstatement.controller.ts | 2 +- .../companyinfo/companyinfo.controller.ts | 2 +- .../accounting/contact/contact.controller.ts | 2 +- .../creditnote/creditnote.controller.ts | 2 +- .../accounting/expense/expense.controller.ts | 2 +- .../incomestatement.controller.ts | 2 +- .../accounting/invoice/invoice.controller.ts | 2 +- .../src/accounting/item/item.controller.ts | 2 +- .../journalentry/journalentry.controller.ts | 2 +- .../accounting/payment/payment.controller.ts | 2 +- .../phonenumber/phonenumber.controller.ts | 2 +- .../purchaseorder/purchaseorder.controller.ts | 2 +- .../accounting/taxrate/taxrate.controller.ts | 2 +- .../trackingcategory.controller.ts | 2 +- .../transaction/transaction.controller.ts | 2 +- .../vendorcredit/vendorcredit.controller.ts | 2 +- .../src/ats/activity/activity.controller.ts | 1 - .../ats/application/application.controller.ts | 1 - .../ats/attachment/attachment.controller.ts | 2 +- .../src/ats/candidate/candidate.controller.ts | 2 +- .../ats/department/department.controller.ts | 2 +- .../api/src/ats/eeocs/eeocs.controller.ts | 2 +- .../src/ats/interview/interview.controller.ts | 2 +- packages/api/src/ats/job/job.controller.ts | 2 +- .../jobinterviewstage.controller.ts | 2 +- .../api/src/ats/offer/offer.controller.ts | 2 +- .../api/src/ats/office/office.controller.ts | 2 +- .../rejectreason/rejectreason.controller.ts | 2 +- .../src/ats/scorecard/scorecard.controller.ts | 2 +- packages/api/src/ats/user/user.controller.ts | 1 - .../api/src/crm/company/company.controller.ts | 2 +- .../api/src/crm/contact/contact.controller.ts | 2 +- packages/api/src/crm/deal/deal.controller.ts | 2 +- .../crm/engagement/engagement.controller.ts | 2 +- packages/api/src/crm/note/note.controller.ts | 2 +- .../api/src/crm/stage/stage.controller.ts | 2 +- packages/api/src/crm/task/task.controller.ts | 2 +- packages/api/src/crm/user/user.controller.ts | 2 +- .../src/filestorage/drive/drive.controller.ts | 2 +- .../src/filestorage/file/file.controller.ts | 2 +- .../filestorage/folder/folder.controller.ts | 2 +- .../src/filestorage/group/group.controller.ts | 2 +- .../src/filestorage/user/user.controller.ts | 2 +- .../src/hris/bankinfo/bankinfo.controller.ts | 2 +- .../src/hris/benefit/benefit.controller.ts | 2 +- .../src/hris/company/company.controller.ts | 2 +- .../hris/dependent/dependent.controller.ts | 2 +- .../src/hris/employee/employee.controller.ts | 2 +- .../employeepayrollrun.controller.ts | 2 +- .../employerbenefit.controller.ts | 2 +- .../hris/employment/employment.controller.ts | 2 +- .../api/src/hris/group/group.controller.ts | 2 +- .../src/hris/location/location.controller.ts | 2 +- .../src/hris/paygroup/paygroup.controller.ts | 2 +- .../hris/payrollrun/payrollrun.controller.ts | 2 +- .../src/hris/timeoff/timeoff.controller.ts | 2 +- .../timeoffbalance.controller.ts | 2 +- .../action/action.controller.ts | 2 +- .../automation/automation.controller.ts | 2 +- .../campaign/campaign.controller.ts | 2 +- .../contact/contact.controller.ts | 2 +- .../email/email.controller.ts | 2 +- .../event/event.controller.ts | 2 +- .../list/list.controller.ts | 2 +- .../message/message.controller.ts | 2 +- .../template/template.controller.ts | 2 +- .../user/user.controller.ts | 2 +- .../ticketing/account/account.controller.ts | 2 +- .../attachment/attachment.controller.ts | 2 +- .../collection/collection.controller.ts | 2 +- .../ticketing/comment/comment.controller.ts | 2 +- .../ticketing/contact/contact.controller.ts | 2 +- .../api/src/ticketing/tag/tag.controller.ts | 2 +- .../api/src/ticketing/team/team.controller.ts | 2 +- .../src/ticketing/ticket/ticket.controller.ts | 2 +- .../api/src/ticketing/user/user.controller.ts | 2 +- packages/api/swagger/swagger-spec.yaml | 890 +++++++++++++----- packages/shared/src/webhookScopes.ts | 94 ++ 115 files changed, 1716 insertions(+), 667 deletions(-) create mode 100644 docs/ats/quickstart.mdx create mode 100644 docs/file-storage/quickstart.mdx create mode 100644 packages/api/src/@core/events/dto/index.dto.ts diff --git a/apps/webapp/src/hooks/create/useCreateProject.tsx b/apps/webapp/src/hooks/create/useCreateProject.tsx index c0050a0da..91e3fd6ef 100644 --- a/apps/webapp/src/hooks/create/useCreateProject.tsx +++ b/apps/webapp/src/hooks/create/useCreateProject.tsx @@ -9,7 +9,7 @@ interface IProDto { const useCreateProject = () => { const add = async (data: IProDto) => { - const response = await fetch(`${config.API_URL}/projects`, { + const response = await fetch(`${config.API_URL}/projects/internal`, { method: 'POST', body: JSON.stringify(data), headers: { diff --git a/apps/webapp/src/hooks/create/useDefineField.tsx b/apps/webapp/src/hooks/create/useDefineField.tsx index c67460453..4fcfbe00c 100644 --- a/apps/webapp/src/hooks/create/useDefineField.tsx +++ b/apps/webapp/src/hooks/create/useDefineField.tsx @@ -11,7 +11,7 @@ interface IDefineTargetFieldDto{ const useDefineField = () => { const define = async (data: IDefineTargetFieldDto) => { - const response = await fetch(`${config.API_URL}/field_mappings/define`, { + const response = await fetch(`${config.API_URL}/field_mappings/internal/define`, { method: 'POST', body: JSON.stringify(data), headers: { diff --git a/apps/webapp/src/hooks/create/useMapField.tsx b/apps/webapp/src/hooks/create/useMapField.tsx index 8debd103c..e872591fd 100644 --- a/apps/webapp/src/hooks/create/useMapField.tsx +++ b/apps/webapp/src/hooks/create/useMapField.tsx @@ -11,7 +11,7 @@ interface IMapTargetFieldDto { const useMapField = () => { const map = async (data: IMapTargetFieldDto) => { - const response = await fetch(`${config.API_URL}/field_mappings/map`, { + const response = await fetch(`${config.API_URL}/field_mappings/internal/map`, { method: 'POST', body: JSON.stringify(data), headers: { diff --git a/apps/webapp/src/hooks/get/useConnections.tsx b/apps/webapp/src/hooks/get/useConnections.tsx index 27b4948bc..f7fe65f8f 100644 --- a/apps/webapp/src/hooks/get/useConnections.tsx +++ b/apps/webapp/src/hooks/get/useConnections.tsx @@ -8,7 +8,7 @@ const useConnections = () => { return useQuery({ queryKey: ['connections'], queryFn: async (): Promise => { - const response = await fetch(`${config.API_URL}/connections`,{ + const response = await fetch(`${config.API_URL}/connections/internal`,{ method: 'GET', headers: { 'Content-Type': 'application/json', diff --git a/apps/webapp/src/hooks/get/useEvents.tsx b/apps/webapp/src/hooks/get/useEvents.tsx index 5c6313d94..90a5bb13e 100644 --- a/apps/webapp/src/hooks/get/useEvents.tsx +++ b/apps/webapp/src/hooks/get/useEvents.tsx @@ -10,7 +10,7 @@ const fetchEvents = async (params: PaginationParams): Promise => { limit: params.limit.toString(), }); - const response = await fetch(`${config.API_URL}/events?${searchParams.toString()}`, + const response = await fetch(`${config.API_URL}/events/internal?${searchParams.toString()}`, { method: 'GET', headers: { diff --git a/apps/webapp/src/hooks/get/useFieldMappings.tsx b/apps/webapp/src/hooks/get/useFieldMappings.tsx index 7fa662fb8..59089254d 100644 --- a/apps/webapp/src/hooks/get/useFieldMappings.tsx +++ b/apps/webapp/src/hooks/get/useFieldMappings.tsx @@ -7,7 +7,7 @@ const useFieldMappings = () => { return useQuery({ queryKey: ['mappings'], queryFn: async (): Promise => { - const response = await fetch(`${config.API_URL}/field_mappings/attributes`, + const response = await fetch(`${config.API_URL}/field_mappings/internal/attributes`, { method: 'GET', headers: { diff --git a/apps/webapp/src/hooks/get/useProjects.tsx b/apps/webapp/src/hooks/get/useProjects.tsx index 7db671f01..df35abd78 100644 --- a/apps/webapp/src/hooks/get/useProjects.tsx +++ b/apps/webapp/src/hooks/get/useProjects.tsx @@ -8,7 +8,7 @@ const useProjects = () => { return useQuery({ queryKey: ['projects'], queryFn: async (): Promise => { - const response = await fetch(`${config.API_URL}/projects`, + const response = await fetch(`${config.API_URL}/projects/internal`, { method: 'GET', headers: { diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index ad4bb34a5..b98d1d2af 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -281,14 +281,14 @@ services: # condition: service_healthy # network_mode: "host" - # docs: - # build: - # dockerfile: ./Dockerfile.dev - # context: ./docs/ - # ports: - # - 911:3000 - # volumes: - # - ./docs/:/app + docs: + build: + dockerfile: ./Dockerfile.dev + context: ./docs/ + ports: + - 911:3000 + volumes: + - ./docs/:/app volumes: local_pgdata: diff --git a/docs/api-reference/authentication.mdx b/docs/api-reference/authentication.mdx index 3c8fe7a25..d15d68823 100644 --- a/docs/api-reference/authentication.mdx +++ b/docs/api-reference/authentication.mdx @@ -16,9 +16,11 @@ You also have to catch a [connection token](/core-concepts/auth) which contains In this example, we will create a contact in a CRM. Visit other sections of the [documentation](/ticketing/overview) to find category-specific examples. ```javascript TypeScript - import { PanoraSDK } from '@panora/sdk-typescript'; + import { Panora } from "@panora/sdk"; - const sdk = new PanoraSDK({ accessToken: "MY_API_KEY" }); + const panora = new Panora({ + apiKey: process.env.API_KEY, + }); const input = { first_name: 'tom', @@ -37,21 +39,23 @@ You also have to catch a [connection token](/core-concepts/auth) which contains ], }; - const result = await sdk.crmContact.addContact(input, 'MY_USER_CONNECTION_TOKEN', { - remoteData: true, + const result = await panora.crm.contacts.create({ + xConnectionToken: "YOUR_USER_CONNECTION_TOKEN", + unifiedCrmContactInput: input, }); console.log(result); ``` - ```python Python - from panorasdk import PanoraSDK - - sdk = PanoraSDK() + ```python Python + import os + from panora_sdk import Panora - sdk.set_access_token("MY_API_KEY") + panora = Panora( + api_key=os.getenv("API_KEY", ""), + ) - request_body = { + body = { 'first_name': 'tom', 'last_name': 'jedusor', 'email_addresses': [ @@ -68,19 +72,15 @@ You also have to catch a [connection token](/core-concepts/auth) which contains ] } - results = sdk.crm_contact.add_contact( - request_input = request_body, - connection_token = 'MY_USER_CONNECTION_TOKEN', - remote_data = True - ) + res = panora.crm.contacts.create(x_connection_token="YOUR_USER_CONNECTION_TOKEN", unified_crm_contact_input=body) - print(results) + print(res) ``` ```shell curl curl --request POST \ --url https://api.panora.dev/crm/contacts \ - --header 'Authorization: Bearer ' \ + --header 'x-api-key: ' \ --header 'Content-Type: application/json' \ --header 'x-connection-token: ' \ --data '{ diff --git a/docs/ats/quickstart.mdx b/docs/ats/quickstart.mdx new file mode 100644 index 000000000..26fadf0b1 --- /dev/null +++ b/docs/ats/quickstart.mdx @@ -0,0 +1,120 @@ +--- +title: "Quick Start" +description: "Read and write data to multiple ATS platforms using a single API" +icon: "star" +--- + +## Create a candidate in an ATS using Panora + + + We assume for this tutorial that you have a valid Panora API Key, and a + `connection_token`. Find help [here](/core-concepts/auth). + + + + + You can find the Typescript SDK [here](https://www.npmjs.com/package/@panora/sdk-typescript) + + + + ```javascript TypeScript SDK + import { Panora } from '@panora/sdk'; + const panora = new Panora({ apiKey: process.env.API_KEY }); + ``` + + ```python Python SDK + import os + from panora_sdk import Panora + panora = Panora( + api_key=os.getenv("API_KEY", ""), + ) + ``` + + + + + In this example, we will create a contact in a CRM. Visit other sections of the documentation to find category-specific examples + + + ```shell curl + curl --request POST \ + --url https://api.panora.dev/ats/applications \ + --header 'x-api-key: ' \ + --header 'Content-Type: application/json' \ + --header 'x-connection-token: ' \ + --data '{ + "appliedAt": "2024-10-01T12:00:00Z", + "rejectedAt": "2024-10-01T12:00:00Z", + "offers": [ + "801f9ede-c698-4e66-a7fc-48d19eebaa4f", + "12345678-1234-1234-1234-123456789012" + ], + "source": "Source Name", + "creditedTo": "801f9ede-c698-4e66-a7fc-48d19eebaa4f", + "currentStage": "801f9ede-c698-4e66-a7fc-48d19eebaa4f", + "rejectReason": "Candidate not experienced enough", + "candidateId": "801f9ede-c698-4e66-a7fc-48d19eebaa4f", + "jobId": "801f9ede-c698-4e66-a7fc-48d19eebaa4f" + }' + ``` + + ```javascript TypeScript + import { Panora } from "@panora/sdk"; + + const panora = new Panora({ + apiKey: process.env.API_KEY, + }); + + const result = await panora.ats.applications.create({ + xConnectionToken: "YOUR_USER_CONNECTION_TOKEN", + remoteData: false, + unifiedAtsApplicationInput: { + appliedAt: new Date("2024-10-01T12:00:00Z"), + rejectedAt: new Date("2024-10-01T12:00:00Z"), + offers: [ + "801f9ede-c698-4e66-a7fc-48d19eebaa4f", + "12345678-1234-1234-1234-123456789012", + ], + source: "Source Name", + creditedTo: "801f9ede-c698-4e66-a7fc-48d19eebaa4f", + currentStage: "801f9ede-c698-4e66-a7fc-48d19eebaa4f", + rejectReason: "Candidate not experienced enough", + candidateId: "801f9ede-c698-4e66-a7fc-48d19eebaa4f", + jobId: "801f9ede-c698-4e66-a7fc-48d19eebaa4f", + }, + }); + + console.log(result); + ``` + + ```python Python + import os + from panora_sdk import Panora + + panora = Panora( + api_key=os.getenv("API_KEY", ""), + ) + + body = { + "appliedAt": "2024-10-01T12:00:00Z", + "rejectedAt": "2024-10-01T12:00:00Z", + "offers": [ + "801f9ede-c698-4e66-a7fc-48d19eebaa4f", + "12345678-1234-1234-1234-123456789012", + ], + "source": "Source Name", + "creditedTo": "801f9ede-c698-4e66-a7fc-48d19eebaa4f", + "currentStage": "801f9ede-c698-4e66-a7fc-48d19eebaa4f", + "rejectReason": "Candidate not experienced enough", + "candidateId": "801f9ede-c698-4e66-a7fc-48d19eebaa4f", + "jobId": "801f9ede-c698-4e66-a7fc-48d19eebaa4f", + } + + res = panora.ats.applications.create(x_connection_token="YOUR_USER_CONNECTION_TOKEN", unified_ats_application_input={}) + + print(res) + ``` + + + + diff --git a/docs/backend-sdk/python.mdx b/docs/backend-sdk/python.mdx index 80a9c5797..39d331937 100644 --- a/docs/backend-sdk/python.mdx +++ b/docs/backend-sdk/python.mdx @@ -6,43 +6,37 @@ description: "Introduction to our Python SDK" ## Installing & instantiating the Python SDK ```bash -pip install panorasdk +pip install panora-sdk +``` +or +```bash +poetry add panora-sdk ``` - Instantiate the SDK: Go to your dashboard to get your [API Key](https://dashboard.panora.dev/api-keys) ```python -sdk = PanoraSDK('YOUR_API_KEY') -``` - -Or through the `set_access_token` method: - -```python -sdk = PanoraSDK() -sdk.set_access_token('YOUR_API_KEY') -``` - -You can also set it for each service individually: +import os +from panora_sdk import Panora -```python -sdk = PanoraSDK() -sdk.main.set_access_token('YOUR_API_KEY') +panora = Panora( + api_key=os.getenv("API_KEY", ""), +) ``` ### List all connections to your app ```python -from panorasdk import PanoraSDK - -sdk = PanoraSDK() - -sdk.set_access_token("YOUR_API_KEY") +import os +from panora_sdk import Panora -results = sdk.connections.get_connections() +panora = Panora( + api_key=os.getenv("API_KEY", ""), +) +res = panora.connections.list() -print(results) +print(res) ``` This will list all the connections available, across all users. You should get an object similar to this one below. Read more about the `connection` object here in the [API reference](/connections/overview) or the [glossary](/glossary/connection-object). diff --git a/docs/backend-sdk/typescript.mdx b/docs/backend-sdk/typescript.mdx index 4cb38b0b8..5513bb14f 100644 --- a/docs/backend-sdk/typescript.mdx +++ b/docs/backend-sdk/typescript.mdx @@ -6,11 +6,11 @@ description: "Introduction to our Typescript SDK" ## Installing & instantiating the Typescript SDK You can find the Typescript SDK on NPM - [here](https://www.npmjs.com/package/@panora/sdk-typescript) + [here](https://www.npmjs.com/package/@panora/sdk) ```bash -npm i @panora/typescript-sdk +npm i @panora/sdk ``` Instantiate the SDK: @@ -18,20 +18,25 @@ Instantiate the SDK: Go to your dashboard to get your [API Key](https://dashboard.panora.dev/api-keys) ```javascript -import { PanoraSDK } from "@panora/typescript-sdk"; +import { Panora } from "@panora/sdk"; + +const panora = new Panora({ + apiKey: process.env.API_KEY, +}); -const sdk = new PanoraSDK("YOUR_API_KEY"); ``` -### List all connections to your app +### List all connections to your app ```javascript -import { PanoraSDK } from "@panora/typescript-sdk"; +import { Panora } from "@panora/typescript-sdk"; -const sdk = new PanoraSDK("YOUR_API_KEY"); +const panora = new Panora({ + apiKey: process.env.API_KEY, +}); (async () => { - const result = await sdk.connections.getConnections(); + const result = await panora.connections.list(); console.log(result); })(); ``` diff --git a/docs/core-concepts/auth.mdx b/docs/core-concepts/auth.mdx index 359529fc9..a9974b6d3 100644 --- a/docs/core-concepts/auth.mdx +++ b/docs/core-concepts/auth.mdx @@ -79,71 +79,71 @@ We also recommend practising by looking at the specific verticals you want to in In this example, we will create a contact in a CRM. Visit other sections of the [documentation](/ticketing/overview) to find category-specific examples. ```javascript TypeScript - import { PanoraSDK } from '@panora/sdk-typescript'; + import { Panora } from "@panora/sdk"; + + const panora = new Panora({ + apiKey: process.env.API_KEY, + }); + + const input = { + first_name: 'tom', + last_name: 'jedusor', + email_addresses: [ + { + 'email_address': 'tom@jedusor.com', + 'email_address_type': 'PERSONAL' + } + ], + phone_numbers: [ + { + 'phone_number': '+33650438278', + 'phone_type': 'MOBILE' + } + ], + }; + + const result = await panora.crm.contacts.create({ + xConnectionToken: "YOUR_USER_CONNECTION_TOKEN", + unifiedCrmContactInput: input, + }); + + console.log(result); + ``` + + ```python Python + import os + from panora_sdk import Panora - const sdk = new PanoraSDK({ accessToken: "MY_API_KEY" }); + panora = Panora( + api_key=os.getenv("API_KEY", ""), + ) - const input = { - first_name: 'tom', - last_name: 'jedusor', - email_addresses: [ + body = { + 'first_name': 'tom', + 'last_name': 'jedusor', + 'email_addresses': [ { - 'email_address': 'tom@jedusor.com', - 'email_address_type': 'PERSONAL' + 'email_address': 'tom@jedusor.com', + 'email_address_type': 'PERSONAL' } - ], - phone_numbers: [ + ], + 'phone_numbers': [ { - 'phone_number': '+33650438278', - 'phone_type': 'MOBILE' + 'phone_number': '+33650438278', + 'phone_type': 'MOBILE' } - ], - }; - - const result = await sdk.crmContact.addContact(input, 'MY_USER_CONNECTION_TOKEN', { - remoteData: true, - }); + ] + } - console.log(result); - ``` + res = panora.crm.contacts.create(x_connection_token="YOUR_USER_CONNECTION_TOKEN", unified_crm_contact_input=body) - ```python Python - from panorasdk import PanoraSDK - - sdk = PanoraSDK() - - sdk.set_access_token("MY_API_KEY") - - request_body = { - 'first_name': 'tom', - 'last_name': 'jedusor', - 'email_addresses': [ - { - 'email_address': 'tom@jedusor.com', - 'email_address_type': 'PERSONAL' - } - ], - 'phone_numbers': [ - { - 'phone_number': '+33650438278', - 'phone_type': 'MOBILE' - } - ] - } - - results = sdk.crm_contact.add_contact( - request_input = request_body, - connection_token = 'MY_USER_CONNECTION_TOKEN', - remote_data = True - ) - - print(results) + print(res) ``` ```shell Curl curl --request POST \ --url https://api.panora.dev/crm/contacts \ - --header 'Authorization: Bearer ' \ + --header 'x-api-key: ' \ --header 'Content-Type: application/json' \ --header 'x-connection-token: ' \ --data '{ diff --git a/docs/core-concepts/custom-fields.mdx b/docs/core-concepts/custom-fields.mdx index 01f478cde..cbd520862 100644 --- a/docs/core-concepts/custom-fields.mdx +++ b/docs/core-concepts/custom-fields.mdx @@ -57,7 +57,7 @@ The following example creates a custom field mapping in two steps (**define and ```shell Create custom field curl --request POST \ --url https://api.panora.dev/field_mappings \ - --header 'Authorization: Bearer ' \ + --header 'x-api-key: ' \ --header 'Content-Type: application/json' \ --data '{ "object_type_owner": "crm.contact", @@ -77,7 +77,7 @@ The following example creates a custom field mapping in two steps (**define and ```shell Define custom field curl --request POST \ --url https://api.panora.dev/field_mappings/definitions \ - --header 'Authorization: Bearer ' \ + --header 'x-api-key: ' \ --header 'Content-Type: application/json' \ --data '{ "object_type_owner": "crm.contact", @@ -90,7 +90,7 @@ The following example creates a custom field mapping in two steps (**define and ```shell Map custom field curl --request POST \ --url https://api.panora.dev/field_mappings/mappings \ - --header 'Authorization: Bearer ' \ + --header 'x-api-key: ' \ --header 'Content-Type: application/json' \ --data '{ "attributeId": "id_defined_field", # retrieve that from response of the /define request diff --git a/docs/crm/quickstart.mdx b/docs/crm/quickstart.mdx index c60ff75d7..492f988d3 100644 --- a/docs/crm/quickstart.mdx +++ b/docs/crm/quickstart.mdx @@ -18,28 +18,28 @@ icon: "star" ```javascript TypeScript SDK - import { PanoraSDK } from '@panora/sdk-typescript'; - const sdk = new PanoraSDK({ accessToken: "MY_API_KEY" }); + import { Panora } from '@panora/sdk'; + const panora = new Panora({ apiKey: process.env.API_KEY }); ``` ```python Python SDK - sdk = PanoraSDK('YOUR_BEARER_TOKEN') - ``` - - ```java Java SDK - PanoraSDK sdk = new PanoraSDK("YOUR_BEARER_TOKEN"); + import os + from panora_sdk import Panora + panora = Panora( + api_key=os.getenv("API_KEY", ""), + ) ``` - + In this example, we will create a contact in a CRM. Visit other sections of the documentation to find category-specific examples ```shell curl curl --request POST \ --url https://api.panora.dev/crm/contacts \ - --header 'Authorization: Bearer dfsdf' \ + --header 'x-api-key: ' \ --header 'Content-Type: application/json' \ --header 'x-connection-token: ' \ --data '{ @@ -64,45 +64,65 @@ icon: "star" ``` ```javascript TypeScript - import { PanoraSDK } from '@panora/sdk-typescript'; - const sdk = new PanoraSDK({ accessToken: "MY_API_KEY" }); + import { Panora } from "@panora/sdk"; + + const panora = new Panora({ + apiKey: process.env.API_KEY, + }); - (async () => { const input = { - email_addresses: [], - field_mappings: {}, - first_name: 'first_name', - last_name: 'last_name', - phone_numbers: [], + first_name: 'tom', + last_name: 'jedusor', + email_addresses: [ + { + 'email_address': 'tom@jedusor.com', + 'email_address_type': 'PERSONAL' + } + ], + phone_numbers: [ + { + 'phone_number': '+33650438278', + 'phone_type': 'MOBILE' + } + ], }; - const result = await sdk.crmContact.addContact(input, 'connection_token', { - remoteData: true, + + const result = await panora.crm.contacts.create({ + xConnectionToken: "YOUR_USER_CONNECTION_TOKEN", + unifiedCrmContactInput: input, }); + console.log(result); - })(); ``` ```python Python - from os import getenv - from pprint import pprint - from panorasdk import PanoraSDK - sdk = PanoraSDK() - sdk.set_access_token(getenv("YOUR_API_KEY")) - request_body = { - 'email_addresses': [], - 'field_mappings': {}, - 'first_name': 'first_name', - 'last_name': 'last_name', - 'phone_numbers': [] - } - results = sdk.crm_contact.add_contact( - request_input = request_body, - connection_token = 'USER_CONNECTION_TOKEN', - remote_data = True + import os + from panora_sdk import Panora + + panora = Panora( + api_key=os.getenv("API_KEY", ""), ) - pprint(vars(results)) + body = { + 'first_name': 'tom', + 'last_name': 'jedusor', + 'email_addresses': [ + { + 'email_address': 'tom@jedusor.com', + 'email_address_type': 'PERSONAL' + } + ], + 'phone_numbers': [ + { + 'phone_number': '+33650438278', + 'phone_type': 'MOBILE' + } + ] + } + + res = panora.crm.contacts.create(x_connection_token="YOUR_USER_CONNECTION_TOKEN", unified_crm_contact_input=body) + print(res) ``` diff --git a/docs/file-storage/quickstart.mdx b/docs/file-storage/quickstart.mdx new file mode 100644 index 000000000..7744a0931 --- /dev/null +++ b/docs/file-storage/quickstart.mdx @@ -0,0 +1,75 @@ +--- +title: "Quick Start" +description: "Read data from multiple File Storage platforms using a single API" +icon: "star" +--- + +## List files in a file storage provider using Panora + + + We assume for this tutorial that you have a valid Panora API Key, and a + `connection_token`. Find help [here](/core-concepts/auth). + + + + + You can find the Typescript SDK [here](https://www.npmjs.com/package/@panora/sdk-typescript) + + + + ```javascript TypeScript SDK + import { Panora } from '@panora/sdk'; + const panora = new Panora({ apiKey: process.env.API_KEY }); + ``` + + ```python Python SDK + import os + from panora_sdk import Panora + panora = Panora( + api_key=os.getenv("API_KEY", ""), + ) + ``` + + + + + In this example, we will list files in a File Storage. Visit other sections of the documentation to find category-specific examples + + + ```shell curl + curl --request GET \ + --url https://api.panora.dev/filestorage/files \ + --header 'x-api-key: ' \ + --header 'x-connection-token: ' + ``` + + ```javascript TypeScript + import { Panora } from "@panora/sdk"; + + const panora = new Panora({ + apiKey: process.env.API_KEY, + }); + + const result = await panora.filestorage.files.list({ + xConnectionToken: "YOUR_USER_CONNECTION_TOKEN", + }); + + console.log(result); + ``` + + ```python Python + import os + from panora_sdk import Panora + + panora = Panora( + api_key=os.getenv("API_KEY", ""), + ) + + res = panora.filestorage.files.list(x_connection_token="YOUR_USER_CONNECTION_TOKEN") + + print(res) + ``` + + + + diff --git a/docs/mint.json b/docs/mint.json index 2dd37277b..cf93848f7 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -138,6 +138,7 @@ { "group": "", "pages": [ + "file-storage/quickstart", "file-storage/overview" ] }, @@ -351,6 +352,7 @@ { "group": "", "pages": [ + "ats/quickstart", "ats/overview" ] }, @@ -759,17 +761,6 @@ "api-reference/projects/create-a-project" ] }, - { - "group": "Field Mappings", - "pages": [ - "api-reference/field_mappings/retrieve-field-mapping-entities", - "api-reference/field_mappings/retrieve-field-mappings", - "api-reference/field_mappings/retrieve-field-mappings-values", - "api-reference/field_mappings/mapping/define-target-field", - "api-reference/field_mappings/map-custom-field", - "api-reference/field_mappings/retrieve-custom-properties" - ] - }, { "group": "Events", "pages": [ @@ -857,7 +848,7 @@ "group":"Selfhost", "icon":"house-laptop", "pages":[ - "open-source/self_hosting/self-host-guide", + "open-source/self_hosting/guide", "open-source/self_hosting/envVariables", "open-source/self_hosting/ngrok" ] diff --git a/docs/quick-start.mdx b/docs/quick-start.mdx index 13ee24dfe..ef6cd12e2 100644 --- a/docs/quick-start.mdx +++ b/docs/quick-start.mdx @@ -126,14 +126,16 @@ Once the user successfully completes the granting auth flow, the connection will You can find the Typescript SDK on NPM - [here](https://www.npmjs.com/package/@panora/sdk-typescript) + [here](https://www.npmjs.com/package/@panora/sdk) In this example, we will create a contact in a CRM. Visit other sections of the [documentation](/api-reference/introduction) to find category-specific examples. ```javascript TypeScript - import { PanoraSDK } from '@panora/sdk-typescript'; + import { Panora } from "@panora/sdk"; - const sdk = new PanoraSDK({ accessToken: "MY_API_KEY" }); + const panora = new Panora({ + apiKey: process.env.API_KEY, + }); const input = { first_name: 'tom', @@ -152,21 +154,23 @@ Once the user successfully completes the granting auth flow, the connection will ], }; - const result = await sdk.crmContact.addContact(input, 'MY_USER_CONNECTION_TOKEN', { - remoteData: true, + const result = await panora.crm.contacts.create({ + xConnectionToken: "YOUR_USER_CONNECTION_TOKEN", + unifiedCrmContactInput: input, }); console.log(result); ``` ```python Python - from panorasdk import PanoraSDK - - sdk = PanoraSDK() + import os + from panora_sdk import Panora - sdk.set_access_token("MY_API_KEY") + panora = Panora( + api_key=os.getenv("API_KEY", ""), + ) - request_body = { + body = { 'first_name': 'tom', 'last_name': 'jedusor', 'email_addresses': [ @@ -183,20 +187,16 @@ Once the user successfully completes the granting auth flow, the connection will ] } - results = sdk.crm_contact.add_contact( - request_input = request_body, - connection_token = 'MY_USER_CONNECTION_TOKEN', - remote_data = True - ) + res = panora.crm.contacts.create(x_connection_token="YOUR_USER_CONNECTION_TOKEN", unified_crm_contact_input=body) - print(results) + print(res) ``` ```shell curl curl --request POST \ --url https://api.panora.dev/crm/contacts \ - --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ + --header 'x-api-key: ' \ --header 'x-connection-token: ' \ --data '{ "first_name": "tom", @@ -219,9 +219,10 @@ Once the user successfully completes the granting auth flow, the connection will Let’s break down what’s happening here: -- We import the `Panora SDK`, which provides a convenient way to interact with the Panora Unified API. -- We create an instance of the `Panora SDK` client, passing in our API key. -- We call the `sdk.crmContact.addContact` method to add a contact inside a 3rd party. We specify the input we want to use (see [here](/crm/contacts/overview) for reference). +- We import the `Panora` sdk, which provides a convenient way to interact with the Panora Unified API. +- We create an instance of the `Panora` client, passing in our API key. +- We call the `panora.crm.contacts.create` method to add a contact inside a 3rd party. We specify the input we want to use (see [here](/crm/contacts/overview) for reference). +- We pass the connection token catched during step 1 ([More info here](/core-concepts/auth#catch-connection-tokens)) - Finally, we print the response. ## Next Steps diff --git a/docs/recipes/catch-connection-token.mdx b/docs/recipes/catch-connection-token.mdx index dc8f37c83..05d238833 100644 --- a/docs/recipes/catch-connection-token.mdx +++ b/docs/recipes/catch-connection-token.mdx @@ -108,49 +108,46 @@ It is a field of the [Connection Object](/glossary/connection-object) that Panor ```shell Curl curl --request POST \ --url https://api.panora.dev/webhook \ - --header 'Authorization: Bearer ' \ + --header 'x-api-key: ' \ --header 'Content-Type: application/json' \ --data '{ - "url": "https://example.com/my/webhook/endpoint", + "url": "https://acme.com/webhook_receiver", "description": "Receive Connection Creation Events", "scope": [ "connection.created" ] }' ``` - + ```ts Typescript - import { PanoraSDK } from '@panora/sdk-typescript'; + import { Panora } from '@panora/sdk'; - const sdk = new PanoraSDK({ accessToken: MY_API_KEY}); + const panora = new Panora({ apiKey: process.env.API_KEY}); - const input = { - description: 'Receive Connection Creation Events', - scope: ['connection.created'], - url: 'https://example.com/my/webhook/endpoint', - }; - const result = await sdk.webhook.createWebhookMetadata(input); + const result = await panora.webhooks.create({ + url: "https://acme.com/webhook_receiver", + description: "Webhook to receive connection events", + scope: [ + "connection.created", + ], + }); console.log(result); ``` ```python Python - from panorasdk import PanoraSDK - - sdk = PanoraSDK() - - sdk.set_access_token("MY_API_KEY") + import os + from panora_sdk import Panora - request_body = { - description: 'Receive Connection Creation Events', - scope: ['connection.created'], - url: 'https://example.com/my/webhook/endpoint', - } - - results = sdk.webhook.create_webhook_metadata( - request_input = request_body, + panora = Panora( + api_key=os.getenv("API_KEY", ""), ) - print(results) + res = panora.webhooks.create(request={ + "url": "https://acme.com/webhook_receiver", + "scope": [ + "connection.created", + ], + }) ``` @@ -165,11 +162,11 @@ It is a field of the [Connection Object](/glossary/connection-object) that Panor ```javascript Node import express, { Request, Response } from 'express'; - import { PanoraSDK } from '@panora/sdk-typescript'; + import { Panora } from '@panora/sdk'; // Set your api key // See your keys here: https://dashboard.panora.dev/api-keys - const panora = new PanoraSDK({ accessToken: "MY_API_KEY" }); + const panora = new Panora({ apiKey: process.env.API_KEY }); // Find your endpoint's secret in your webhook settings in the Config Page const endpointSecret = 'whsec_...'; @@ -187,7 +184,11 @@ It is a field of the [Connection Object](/glossary/connection-object) that Panor try { // Verifies that the event comes from Panora and not from malicious sender - event = await panora.webhook.verifyEvent(request.body, sig, endpointSecret); + event = await panora.webhooks.verifyEvent({ + payload: request.body, + signature: sig, + secret: endpointSecret, + }); } catch (err) { response.status(400).send(`Webhook Error: ${err.message}`); @@ -213,13 +214,15 @@ It is a field of the [Connection Object](/glossary/connection-object) that Panor ```python Python - from panorasdk import PanoraSDK + import os + from panora_sdk import Panora from django.http import HttpResponse # Set your secret key. # See your keys here: https://dashboard.panora.dev/api-keys - panora = PanoraSDK('YOUR_API_KEY') - + panora = Panora( + api_key=os.getenv("API_KEY", ""), + ) # Find your endpoint's secret in your webhook settings in the Config Page endpoint_secret = 'whsec_...' @@ -233,9 +236,11 @@ It is a field of the [Connection Object](/glossary/connection-object) that Panor try: # Verifies that the event comes from Panora and not from malicious sender - event = panora.webhook.verify_event( - payload, sig_header, endpoint_secret - ) + event = panora.webhooks.verify_event(request={ + "payload": payload, + "signature": sig_header, + "secret": endpoint_secret, + }) except ValueError as e: # Invalid payload print('Error parsing payload: {}'.format(str(e))) diff --git a/docs/recipes/import-existing-users.mdx b/docs/recipes/import-existing-users.mdx index 36f815d64..92a7f28ee 100644 --- a/docs/recipes/import-existing-users.mdx +++ b/docs/recipes/import-existing-users.mdx @@ -40,7 +40,7 @@ These endpoint return [Linked Account object(s)](/glossary/linked-account-object ```shell Import a single existing user curl --request POST \ --url https://api.panora.dev/linked-users \ - --header 'Authorization: Bearer ' \ + --header 'x-api-key: ' \ --header 'Content-Type: application/json' \ --data '{ "linked_user_origin_id": "acme_user_1", # your remote id (id representing your existing user inside your system) @@ -51,7 +51,7 @@ These endpoint return [Linked Account object(s)](/glossary/linked-account-object ```shell Import a batch of existing users curl --request POST \ --url https://api.panora.dev/linked-users/batch \ - --header 'Authorization: Bearer ' \ + --header 'x-api-key: ' \ --header 'Content-Type: application/json' \ --data '{ "linked_user_origin_ids": ["acme_user_1", "acme_user_2", "acme_user_3"], # array of remote ids (ids representing your existing users inside your system) @@ -76,11 +76,11 @@ At any point in your code, if you have successfully added your linked users (see ```shell linkedUserFromRemoteId curl --request GET \ --url https://api.panora.dev/linked-users/fromRemoteId?remoteId=acme_id_1 \ - --header 'Authorization: Bearer ' \ + --header 'x-api-key: ' \ ``` ```shell fetchLinkedUsers curl --request GET \ --url https://api.panora.dev/linked-users \ - --header 'Authorization: Bearer ' \ + --header 'x-api-key: ' \ ``` diff --git a/docs/ticketing/quickstart.mdx b/docs/ticketing/quickstart.mdx index b5f69af28..5f17c8454 100644 --- a/docs/ticketing/quickstart.mdx +++ b/docs/ticketing/quickstart.mdx @@ -18,16 +18,16 @@ icon: "star" ```javascript TypeScript SDK - import { PanoraSDK } from '@panora/sdk-typescript'; - const sdk = new PanoraSDK({ accessToken: "MY_API_KEY" }); + import { Panora } from '@panora/sdk'; + const panora = new Panora({ apiKey: process.env.API_KEY }); ``` ```python Python SDK - sdk = PanoraSDK('YOUR_BEARER_TOKEN') - ``` - - ```java Java SDK - PanoraSDK sdk = new PanoraSDK("YOUR_BEARER_TOKEN"); + import os + from panora_sdk import Panora + panora = Panora( + api_key=os.getenv("API_KEY", ""), + ) ``` @@ -39,7 +39,7 @@ icon: "star" ```shell curl curl --request POST \ --url https://api.panora.dev/ticketing/tickets \ - --header 'Authorization: Bearer dfsdf' \ + --header 'x-api-key: ' \ --header 'Content-Type: application/json' \ --header 'x-connection-token: ' \ --data '{ @@ -52,8 +52,8 @@ icon: "star" ``` ```javascript TypeScript - import { PanoraSDK } from '@panora/sdk-typescript'; - const sdk = new PanoraSDK({ accessToken: "MY_API_KEY" }); + import { Panora } from '@panora/sdk'; + const panora = new Panora({ apiKey: process.env.API_KEY }); (async () => { const input = { @@ -63,34 +63,33 @@ icon: "star" status: 'open', assignee: 'support_agent', }; - const result = await sdk.ticketingTicket.createTicket(input, 'connection_token', { - remoteData: true, + const result = await panora.ticketing.tickets.create({ + xConnectionToken: "YOUR_USER_CONNECTION_TOKEN", + unifiedTicketingTicketInput: input, }); - console.log(result); + console.log(result); })(); ``` ```python Python - from os import getenv - from pprint import pprint - from panorasdk import PanoraSDK - sdk = PanoraSDK() - sdk.set_access_token(getenv("YOUR_API_KEY")) - request_body = { + import os + from panora_sdk import Panora + + panora = Panora( + api_key=os.getenv("API_KEY", ""), + ) + + body = { 'subject': 'Issue with login', 'description': 'User is unable to login with correct credentials', 'priority': 'high', 'status': 'open', 'assignee': 'support_agent' } - results = sdk.ticketing_ticket.create_ticket( - request_input = request_body, - connection_token = 'USER_CONNECTION_TOKEN', - remote_data = True - ) - pprint(vars(results)) + res = panora.ticketing.tickets.create(x_connection_token="YOUR_USER_CONNECTION_TOKEN", unified_ticketing_ticket_input=body) + print(res) ``` diff --git a/docs/webhooks/overview.mdx b/docs/webhooks/overview.mdx index f12bd8729..0d3e88530 100644 --- a/docs/webhooks/overview.mdx +++ b/docs/webhooks/overview.mdx @@ -116,10 +116,10 @@ To enable webhook events, you need to register webhook endpoints. After you regi ```shell Curl curl --request POST \ --url https://api.panora.dev/webhook \ - --header 'Authorization: Bearer ' \ + --header 'x-api-key: ' \ --header 'Content-Type: application/json' \ --data '{ - "url": "https://example.com/my/webhook/endpoint", + "url": "https://acme.com/webhook_receiver", "description": "Receive Connection Creation Events", "scope": [ "connection.created" @@ -127,38 +127,35 @@ To enable webhook events, you need to register webhook endpoints. After you regi }' ``` - ```ts Typescript - import { PanoraSDK } from '@panora/sdk-typescript'; + ```ts Typescript + import { Panora } from '@panora/sdk'; - const sdk = new PanoraSDK({ accessToken: MY_API_KEY}); + const panora = new Panora({ apiKey: process.env.API_KEY}); - const input = { - description: 'Receive Connection Creation Events', - scope: ['connection.created'], - url: 'https://example.com/my/webhook/endpoint', - }; - const result = await sdk.webhook.createWebhookMetadata(input); + const result = await panora.webhooks.create({ + url: "https://acme.com/webhook_receiver", + description: "Webhook to receive connection events", + scope: [ + "connection.created", + ], + }); console.log(result); ``` ```python Python - from panorasdk import PanoraSDK - - sdk = PanoraSDK() - - sdk.set_access_token("MY_API_KEY") - - request_body = { - description: 'Receive Connection Creation Events', - scope: ['connection.created'], - url: 'https://example.com/my/webhook/endpoint', - } + import os + from panora_sdk import Panora - results = sdk.webhook.create_webhook_metadata( - request_input = request_body, + panora = Panora( + api_key=os.getenv("API_KEY", ""), ) - print(results) + res = panora.webhooks.create(request={ + "url": "https://acme.com/webhook_receiver", + "scope": [ + "connection.created", + ], + }) ``` @@ -173,11 +170,11 @@ To enable webhook events, you need to register webhook endpoints. After you regi ```javascript Node import express, { Request, Response } from 'express'; - import { PanoraSDK } from '@panora/sdk-typescript'; + import { Panora } from '@panora/sdk'; // Set your api key // See your keys here: https://dashboard.panora.dev/api-keys - const panora = new PanoraSDK({ accessToken: "MY_API_KEY" }); + const panora = new Panora({ apiKey: process.env.API_KEY }); // Find your endpoint's secret in your webhook settings in the Config Page const endpointSecret = 'whsec_...'; @@ -195,7 +192,11 @@ To enable webhook events, you need to register webhook endpoints. After you regi try { // Verifies that the event comes from Panora and not from malicious sender - event = await panora.webhook.verifyEvent(request.body, sig, endpointSecret); + event = await panora.webhooks.verifyEvent({ + payload: request.body, + signature: sig, + secret: endpointSecret, + }); } catch (err) { response.status(400).send(`Webhook Error: ${err.message}`); @@ -227,13 +228,15 @@ To enable webhook events, you need to register webhook endpoints. After you regi ```python Python - from panorasdk import PanoraSDK + import os + from panora_sdk import Panora from django.http import HttpResponse # Set your secret key. # See your keys here: https://dashboard.panora.dev/api-keys - panora = PanoraSDK('YOUR_API_KEY') - + panora = Panora( + api_key=os.getenv("API_KEY", ""), + ) # Find your endpoint's secret in your webhook settings in the Config Page endpoint_secret = 'whsec_...' @@ -247,24 +250,21 @@ To enable webhook events, you need to register webhook endpoints. After you regi try: # Verifies that the event comes from Panora and not from malicious sender - event = panora.webhook.verify_event( - payload, sig_header, endpoint_secret - ) + event = panora.webhooks.verify_event(request={ + "payload": payload, + "signature": sig_header, + "secret": endpoint_secret, + }) except ValueError as e: # Invalid payload print('Error parsing payload: {}'.format(str(e))) return HttpResponse(status=400) # Handle the event - if event.type == 'crm.contact.created': - contact_data = event.data - # Then define and call a method to handle the successful contact creation. - # handle_contact_creation_succeeded(contact_data) - elif event.type == 'crm.company.created': - company_data = event.data - # Then define and call a method to handle the successful company creation. - # handle_company_creation_succeeded(company_data) - # ... handle other event types + if event.type == 'connection.created': + connection_object = event.data + # Then define and call a method to handle the successful connection creation. + # handle_connection_creation_succeeded(connection_object) else: print('Unhandled event type {}'.format(event.type)) diff --git a/packages/api/src/@core/@core-services/webhooks/panora-webhooks/dto/webhook.dto.ts b/packages/api/src/@core/@core-services/webhooks/panora-webhooks/dto/webhook.dto.ts index 3c54e0084..e1f515416 100644 --- a/packages/api/src/@core/@core-services/webhooks/panora-webhooks/dto/webhook.dto.ts +++ b/packages/api/src/@core/@core-services/webhooks/panora-webhooks/dto/webhook.dto.ts @@ -79,7 +79,11 @@ export class WebhookResponse { }) url: string; - @ApiProperty({ type: String, description: 'The secret of the webhook.' }) + @ApiProperty({ + type: String, + example: '801f9ede-c698-4e66-a7fc-48d19eebaa4f', + description: 'The secret of the webhook.', + }) secret: string; @ApiProperty({ diff --git a/packages/api/src/@core/@core-services/webhooks/panora-webhooks/webhook.controller.ts b/packages/api/src/@core/@core-services/webhooks/panora-webhooks/webhook.controller.ts index 3f44e5146..38b311ade 100644 --- a/packages/api/src/@core/@core-services/webhooks/panora-webhooks/webhook.controller.ts +++ b/packages/api/src/@core/@core-services/webhooks/panora-webhooks/webhook.controller.ts @@ -141,7 +141,7 @@ export class WebhookController { @ApiOperation({ operationId: 'createWebhookPublic', - summary: 'Add webhook metadata', + summary: 'Create webhook', }) @ApiBody({ type: WebhookDto }) @ApiPostCustomResponse(WebhookResponse) @@ -154,7 +154,7 @@ export class WebhookController { @ApiOperation({ operationId: 'createWebhookInternal', - summary: 'Add webhook metadata', + summary: 'Create webhook', }) @ApiBody({ type: WebhookDto }) @ApiExcludeEndpoint() diff --git a/packages/api/src/@core/auth/auth.controller.ts b/packages/api/src/@core/auth/auth.controller.ts index 25425b0d4..701984297 100644 --- a/packages/api/src/@core/auth/auth.controller.ts +++ b/packages/api/src/@core/auth/auth.controller.ts @@ -14,7 +14,7 @@ import { JwtAuthGuard } from './guards/jwt-auth.guard'; import { LoggerService } from '@@core/@core-services/logger/logger.service'; import { ApiBody, - ApiExcludeController, + ApiExcludeEndpoint, ApiOperation, ApiParam, ApiResponse, @@ -27,7 +27,6 @@ import { ResetPasswordDto } from './dto/reset-password.dto'; import { RequestPasswordResetDto } from './dto/request-password-reset.dto'; @ApiTags('auth') -@ApiExcludeController() @Controller('auth') export class AuthController { constructor( @@ -41,6 +40,7 @@ export class AuthController { @ApiBody({ type: CreateUserDto }) @ApiResponse({ status: 201 }) @Post('register') + @ApiExcludeEndpoint() async registerUser(@Body() user: CreateUserDto) { return this.authService.register(user); } @@ -49,6 +49,7 @@ export class AuthController { operationId: 'requestPasswordReset', summary: 'Request Password Reset', }) + @ApiExcludeEndpoint() @ApiBody({ type: RequestPasswordResetDto }) @Post('password_reset_request') async requestPasswordReset( @@ -68,6 +69,7 @@ export class AuthController { // todo: admin only @ApiOperation({ operationId: 'getPanoraCoreUsers', summary: 'Get users' }) @ApiResponse({ status: 200 }) + @ApiExcludeEndpoint() @Get('users') async users() { return this.authService.getUsers(); @@ -75,6 +77,7 @@ export class AuthController { @ApiOperation({ operationId: 'resetPassword', summary: 'Reset Password' }) @ApiBody({ type: ResetPasswordDto }) + @ApiExcludeEndpoint() @ApiResponse({ status: 200, description: 'Password reset successfully' }) @Post('reset_password') async resetPassword(@Body() resetPasswordDto: ResetPasswordDto) { @@ -83,6 +86,7 @@ export class AuthController { @ApiResponse({ status: 201 }) @UseGuards(JwtAuthGuard) + @ApiExcludeEndpoint() @Get('profile') async getProfile(@Request() req) { return this.authService.verifyUser(req.user); @@ -91,6 +95,7 @@ export class AuthController { @ApiOperation({ operationId: 'getApiKeys', summary: 'Retrieve API Keys' }) @ApiResponse({ status: 200 }) @UseGuards(JwtAuthGuard) + @ApiExcludeEndpoint() @Get('api_keys') async getApiKeys(@Request() req: any) { const { id_project } = req.user; @@ -107,6 +112,7 @@ export class AuthController { description: 'Id of the api key to delete.', }) @Delete('api_keys/:id') + @ApiExcludeEndpoint() @UseGuards(JwtAuthGuard) async deleteApiKey(@Param('id') apiKeyId: string) { return await this.authService.deleteApiKey(apiKeyId); @@ -116,6 +122,7 @@ export class AuthController { @ApiBody({ type: ApiKeyDto }) @ApiResponse({ status: 201 }) @UseGuards(JwtAuthGuard) + @ApiExcludeEndpoint() @Post('api_keys') async generateApiKey(@Body() data: ApiKeyDto): Promise<{ api_key: string }> { return this.authService.generateApiKeyForUser( @@ -132,6 +139,7 @@ export class AuthController { @ApiBody({ type: RefreshDto }) @ApiResponse({ status: 201 }) @UseGuards(JwtAuthGuard) + @ApiExcludeEndpoint() @Post('refresh_token') refreshAccessToken(@Request() req: any, @Body() body: RefreshDto) { const { projectId } = body; diff --git a/packages/api/src/@core/connections/@utils/types.ts b/packages/api/src/@core/connections/@utils/types.ts index 7ca97a05b..874e5c62f 100644 --- a/packages/api/src/@core/connections/@utils/types.ts +++ b/packages/api/src/@core/connections/@utils/types.ts @@ -1,3 +1,6 @@ +import { ApiProperty } from '@nestjs/swagger'; +import { string } from 'yargs'; + type CommonCallbackParams = { projectId: string; linkedUserId: string; @@ -39,3 +42,97 @@ export interface IConnectionCategory { account_url?: string, ): Promise; } + +export class Connection { + @ApiProperty({ + type: String, + example: '123e4567-e89b-12d3-a456-426614174000', + description: 'Unique identifier for the connection', + }) + id_connection: string; + + @ApiProperty({ + type: String, + example: 'active', + description: 'Status of the connection', + }) + status: string; + + @ApiProperty({ + type: String, + example: 'hubspot', + description: 'Slug for the provider', + }) + provider_slug: string; + + @ApiProperty({ + type: String, + example: 'crm', + description: 'Vertical category of the connection', + }) + vertical: string; + + @ApiProperty({ + type: String, + example: 'https://example.com/account', + description: 'URL of the account', + }) + account_url?: string; + + @ApiProperty({ + type: String, + example: 'oauth2', + enum: ['oauth2', 'apikey', 'basic'], + description: 'Strategy type', + }) + token_type: string; + + @ApiProperty({ + type: String, + example: 'access_token_example', + description: 'Access token for the connection', + }) + access_token?: string; + + @ApiProperty({ + type: String, + example: 'refresh_token_example', + description: 'Refresh token for the connection', + }) + refresh_token?: string; + + @ApiProperty({ + type: Date, + example: '2024-10-01T12:00:00Z', + description: 'Expiration timestamp of the access token', + }) + expiration_timestamp?: Date; + + @ApiProperty({ + type: Date, + example: '2024-10-01T12:00:00Z', + description: 'Timestamp when the connection was created', + }) + created_at: Date; + + @ApiProperty({ + type: String, + example: '123e4567-e89b-12d3-a456-426614174000', + description: 'UUID Token for the connection', + }) + connection_token?: string; + + @ApiProperty({ + type: String, + example: '123e4567-e89b-12d3-a456-426614174001', + description: 'Project ID associated with the connection', + }) + id_project: string; + + @ApiProperty({ + type: String, + example: '123e4567-e89b-12d3-a456-426614174002', + description: 'Linked user ID associated with the connection', + }) + id_linked_user: string; +} diff --git a/packages/api/src/@core/connections/connections.controller.ts b/packages/api/src/@core/connections/connections.controller.ts index 7c70c024a..70c4c9c01 100644 --- a/packages/api/src/@core/connections/connections.controller.ts +++ b/packages/api/src/@core/connections/connections.controller.ts @@ -1,8 +1,10 @@ import { LoggerService } from '@@core/@core-services/logger/logger.service'; import { PrismaService } from '@@core/@core-services/prisma/prisma.service'; import { CategoryConnectionRegistry } from '@@core/@core-services/registries/connections-categories.registry'; +import { ApiKeyAuthGuard } from '@@core/auth/guards/api-key.guard'; import { JwtAuthGuard } from '@@core/auth/guards/jwt-auth.guard'; import { CoreSyncService } from '@@core/sync/sync.service'; +import { ApiGetArrayCustomResponse } from '@@core/utils/dtos/openapi.respone.dto'; import { ConnectionsError } from '@@core/utils/errors'; import { Body, @@ -18,6 +20,7 @@ import { import { ApiBody, ApiExcludeController, + ApiExcludeEndpoint, ApiOperation, ApiQuery, ApiResponse, @@ -25,6 +28,7 @@ import { } from '@nestjs/swagger'; import { CONNECTORS_METADATA } from '@panora/shared'; import { Response } from 'express'; +import { Connection } from './@utils/types'; export type StateDataType = { projectId: string; @@ -40,7 +44,6 @@ export class BodyDataType { } @ApiTags('connections') -@ApiExcludeController() @Controller('connections') export class ConnectionsController { constructor( @@ -59,6 +62,7 @@ export class ConnectionsController { @ApiQuery({ name: 'state', required: true, type: String }) @ApiQuery({ name: 'code', required: true, type: String }) @ApiResponse({ status: 200 }) + @ApiExcludeEndpoint() @Get('oauth/callback') async handleOAuthCallback(@Res() res: Response, @Query() query: any) { try { @@ -134,6 +138,7 @@ export class ConnectionsController { operationId: 'handleApiKeyCallback', summary: 'Capture api key or basic auth callback', }) + @ApiExcludeEndpoint() @ApiQuery({ name: 'state', required: true, type: String }) @ApiBody({ type: BodyDataType }) @UseGuards(JwtAuthGuard) @@ -185,10 +190,11 @@ export class ConnectionsController { operationId: 'getConnections', summary: 'List Connections', }) + @ApiExcludeEndpoint() @ApiResponse({ status: 200 }) @UseGuards(JwtAuthGuard) - @Get() - async list(@Request() req: any) { + @Get('internal') + async list_internal(@Request() req: any) { try { const { id_project } = req.user; return await this.prisma.connections.findMany({ @@ -201,12 +207,19 @@ export class ConnectionsController { } } - @Get('list') - async list2(@Query('projectid') req: string) { + @ApiOperation({ + operationId: 'getConnections', + summary: 'List Connections', + }) + @ApiGetArrayCustomResponse(Connection) + @UseGuards(ApiKeyAuthGuard) + @Get() + async list(@Request() req: any) { try { + const { id_project } = req.user; return await this.prisma.connections.findMany({ where: { - id_project: req, + id_project: id_project, }, }); } catch (error) { diff --git a/packages/api/src/@core/events/dto/index.dto.ts b/packages/api/src/@core/events/dto/index.dto.ts new file mode 100644 index 000000000..34ba03f2d --- /dev/null +++ b/packages/api/src/@core/events/dto/index.dto.ts @@ -0,0 +1,84 @@ +import { ApiProperty } from '@nestjs/swagger'; +import { WebhookScopes } from '@panora/shared'; + +export class EventResponse { + @ApiProperty({ + type: String, + example: '123e4567-e89b-12d3-a456-426614174000', + description: 'Unique identifier for the event', + }) + id_event: string; + + @ApiProperty({ + type: String, + example: '123e4567-e89b-12d3-a456-426614174001', + description: 'Connection ID associated with the event', + }) + id_connection: string; + + @ApiProperty({ + type: String, + example: '123e4567-e89b-12d3-a456-426614174002', + description: 'Project ID associated with the event', + }) + id_project: string; + + @ApiProperty({ + type: String, + example: 'connection.created', + enum: WebhookScopes, + description: 'Scope of the event', + }) + type: string; + + @ApiProperty({ + type: String, + example: 'success', + enum: ['success', 'fail'], + description: 'Status of the event', + }) + status: string; + + @ApiProperty({ + type: String, + example: '0', + description: 'Direction of the event', + }) + direction: string; + + @ApiProperty({ + type: String, + example: 'POST', + enum: ['GET', 'POST', 'PUT', 'DELETE'], + description: 'HTTP method used for the event', + }) + method: string; + + @ApiProperty({ + type: String, + example: '/crm/companies', + description: 'URL associated with the event', + }) + url: string; + + @ApiProperty({ + type: String, + example: 'hubspot', + description: 'Provider associated with the event', + }) + provider: string; + + @ApiProperty({ + type: Date, + example: '2024-10-01T12:00:00Z', + description: 'Timestamp of the event', + }) + timestamp: Date; + + @ApiProperty({ + type: String, + example: '123e4567-e89b-12d3-a456-426614174003', + description: 'Linked user ID associated with the event', + }) + id_linked_user: string; +} diff --git a/packages/api/src/@core/events/events.controller.ts b/packages/api/src/@core/events/events.controller.ts index 2955cfe03..58a0af971 100644 --- a/packages/api/src/@core/events/events.controller.ts +++ b/packages/api/src/@core/events/events.controller.ts @@ -11,15 +11,18 @@ import { EventsService } from './events.service'; import { LoggerService } from '@@core/@core-services/logger/logger.service'; import { ApiExcludeController, + ApiExcludeEndpoint, ApiOperation, ApiResponse, ApiTags, } from '@nestjs/swagger'; import { PaginationDto } from '@@core/utils/dtos/webapp.event.pagination.dto'; import { JwtAuthGuard } from '@@core/auth/guards/jwt-auth.guard'; +import { ApiKeyAuthGuard } from '@@core/auth/guards/api-key.guard'; +import { ApiGetArrayCustomResponse } from '@@core/utils/dtos/openapi.respone.dto'; +import { EventResponse } from './dto/index.dto'; @ApiTags('events') -@ApiExcludeController() @Controller('events') export class EventsController { constructor( @@ -43,7 +46,29 @@ export class EventsController { }, }), ) + @ApiExcludeEndpoint() @UseGuards(JwtAuthGuard) + @Get('internal') + async getInternalEvents(@Query() dto: PaginationDto, @Request() req: any) { + const { id_project } = req.user; + return await this.eventsService.findEvents(dto, id_project); + } + + @ApiOperation({ + operationId: 'getPanoraCoreEvents', + summary: 'List Events', + }) + @ApiGetArrayCustomResponse(EventResponse) + @UsePipes( + new ValidationPipe({ + whitelist: true, + transform: true, + transformOptions: { + enableImplicitConversion: true, + }, + }), + ) + @UseGuards(ApiKeyAuthGuard) @Get() async getEvents(@Query() dto: PaginationDto, @Request() req: any) { const { id_project } = req.user; @@ -55,6 +80,7 @@ export class EventsController { summary: 'Retrieve Events Count', }) @Get('count') + @ApiExcludeEndpoint() @UseGuards(JwtAuthGuard) async getEventsCount(@Request() req: any) { const { id_project } = req.user; diff --git a/packages/api/src/@core/field-mapping/field-mapping.controller.ts b/packages/api/src/@core/field-mapping/field-mapping.controller.ts index 8ffd3c345..d34d3fe88 100644 --- a/packages/api/src/@core/field-mapping/field-mapping.controller.ts +++ b/packages/api/src/@core/field-mapping/field-mapping.controller.ts @@ -24,6 +24,7 @@ import { } from '@nestjs/swagger'; import { JwtAuthGuard } from '@@core/auth/guards/jwt-auth.guard'; import { ApiPostCustomResponse } from '@@core/utils/dtos/openapi.respone.dto'; +import { ApiKeyAuthGuard } from '@@core/auth/guards/api-key.guard'; @ApiTags('fieldMappings') @Controller('field_mappings') @@ -42,7 +43,7 @@ export class FieldMappingController { @ApiResponse({ status: 200 }) @UseGuards(JwtAuthGuard) @ApiExcludeEndpoint() - @Get('entities') + @Get('internal/entities') getEntities() { return this.fieldMappingService.getEntities(); } @@ -53,7 +54,7 @@ export class FieldMappingController { }) @ApiResponse({ status: 200 }) @ApiExcludeEndpoint() - @Get('attributes') + @Get('internal/attributes') @UseGuards(JwtAuthGuard) getAttributes(@Request() req: any) { const { id_project } = req.user; @@ -66,7 +67,7 @@ export class FieldMappingController { }) @ApiResponse({ status: 200 }) @ApiExcludeEndpoint() - @Get('values') + @Get('internal/values') @UseGuards(JwtAuthGuard) getValues() { return this.fieldMappingService.getValues(); @@ -77,10 +78,29 @@ export class FieldMappingController { summary: 'Define target Field', }) @ApiBody({ type: DefineTargetFieldDto }) + @ApiExcludeEndpoint() @ApiPostCustomResponse(CustomFieldResponse) - //define target field on our unified model - @Post('define') + @Post('internal/define') @UseGuards(JwtAuthGuard) + defineInternalTargetField( + @Request() req: any, + @Body() defineTargetFieldDto: DefineTargetFieldDto, + ) { + const { id_project } = req.user; + return this.fieldMappingService.defineTargetField( + defineTargetFieldDto, + 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, @@ -96,10 +116,27 @@ export class FieldMappingController { operationId: 'defineCustomField', summary: 'Create Custom Field', }) + @ApiExcludeEndpoint() @ApiBody({ type: CustomFieldCreateDto }) @ApiPostCustomResponse(CustomFieldResponse) - @Post() + @Post('internal') @UseGuards(JwtAuthGuard) + createInternalCustomField( + @Request() req: any, + @Body() data: CustomFieldCreateDto, + ) { + const { id_project } = req.user; + return this.fieldMappingService.createCustomField(data, id_project); + } + + @ApiOperation({ + operationId: 'defineCustomField', + summary: 'Create Custom Field', + }) + @ApiBody({ type: CustomFieldCreateDto }) + @ApiPostCustomResponse(CustomFieldResponse) + @Post() + @UseGuards(ApiKeyAuthGuard) createCustomField(@Request() req: any, @Body() data: CustomFieldCreateDto) { const { id_project } = req.user; return this.fieldMappingService.createCustomField(data, id_project); @@ -109,6 +146,18 @@ export class FieldMappingController { @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) + @UseGuards(ApiKeyAuthGuard) @Post('map') mapFieldToProvider(@Body() mapFieldToProviderDto: MapFieldToProviderDto) { return this.fieldMappingService.mapFieldToProvider(mapFieldToProviderDto); @@ -121,7 +170,7 @@ export class FieldMappingController { @ApiResponse({ status: 200 }) @ApiExcludeEndpoint() @UseGuards(JwtAuthGuard) - @Get('properties') + @Get('internal/properties') getCustomProperties( @Query('linkedUserId') linkedUserId: string, @Query('providerId') providerId: string, diff --git a/packages/api/src/@core/linked-users/linked-users.controller.ts b/packages/api/src/@core/linked-users/linked-users.controller.ts index deb12d3ca..221630615 100644 --- a/packages/api/src/@core/linked-users/linked-users.controller.ts +++ b/packages/api/src/@core/linked-users/linked-users.controller.ts @@ -85,7 +85,7 @@ export class LinkedUsersController { @ApiGetArrayCustomResponse(LinkedUserResponse) @UseGuards(ApiKeyAuthGuard) @Get() - fetchLinkedUsers(@Request() req: any) { + listLinkedUsers(@Request() req: any) { const { id_project } = req.user; return this.linkedUsersService.getLinkedUsers(id_project); } @@ -100,7 +100,7 @@ export class LinkedUsersController { example: '801f9ede-c698-4e66-a7fc-48d19eebaa4f', type: String, }) - @ApiResponse({ status: 200 }) + @ApiGetCustomResponse(LinkedUserResponse) @UseGuards(ApiKeyAuthGuard) @Get(':id') getLinkedUser(@Param('id') id: string) { diff --git a/packages/api/src/@core/projects/dto/create-project.dto.ts b/packages/api/src/@core/projects/dto/create-project.dto.ts index e1329e40b..24d8dee26 100644 --- a/packages/api/src/@core/projects/dto/create-project.dto.ts +++ b/packages/api/src/@core/projects/dto/create-project.dto.ts @@ -2,20 +2,74 @@ import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; export class CreateProjectDto { @ApiProperty({ + type: String, example: 'Project Name', description: 'The name of the project', }) name: string; @ApiPropertyOptional({ + type: String, example: '801f9ede-c698-4e66-a7fc-48d19eebaa4f', description: 'The organization ID', }) id_organization?: string; @ApiProperty({ + type: String, example: '801f9ede-c698-4e66-a7fc-48d19eebaa4f', description: 'The user ID', }) id_user: string; } + +export class ProjectResponse { + @ApiProperty({ + type: String, + example: '123e4567-e89b-12d3-a456-426614174000', + description: 'Unique identifier for the project', + }) + id_project: string; + + @ApiProperty({ + type: String, + example: 'My Project', + description: 'Name of the project', + }) + name: string; + + @ApiProperty({ + type: String, + example: 'automatic', + description: 'Synchronization mode of the project', + }) + sync_mode: string; + + @ApiProperty({ + type: Number, + example: 3600, + description: 'Frequency of pulling data in seconds', + }) + pull_frequency?: bigint; + + @ApiProperty({ + type: String, + example: 'https://example.com/redirect', + description: 'Redirect URL for the project', + }) + redirect_url?: string; + + @ApiProperty({ + type: String, + example: '123e4567-e89b-12d3-a456-426614174001', + description: 'User ID associated with the project', + }) + id_user: string; + + @ApiProperty({ + type: String, + example: '123e4567-e89b-12d3-a456-426614174002', + description: 'Connector set ID associated with the project', + }) + id_connector_set: string; +} diff --git a/packages/api/src/@core/projects/projects.controller.ts b/packages/api/src/@core/projects/projects.controller.ts index dcd249e3e..3a2c84293 100644 --- a/packages/api/src/@core/projects/projects.controller.ts +++ b/packages/api/src/@core/projects/projects.controller.ts @@ -10,17 +10,21 @@ import { import { ApiBody, ApiExcludeController, + ApiExcludeEndpoint, ApiOperation, ApiResponse, ApiTags, } from '@nestjs/swagger'; import { LoggerService } from '../@core-services/logger/logger.service'; -import { CreateProjectDto } from './dto/create-project.dto'; +import { CreateProjectDto, ProjectResponse } from './dto/create-project.dto'; import { ProjectsService } from './projects.service'; import { ApiKeyAuthGuard } from '@@core/auth/guards/api-key.guard'; +import { + ApiGetArrayCustomResponse, + ApiPostCustomResponse, +} from '@@core/utils/dtos/openapi.respone.dto'; @ApiTags('projects') -@ApiExcludeController() @Controller('projects') export class ProjectsController { constructor( @@ -30,33 +34,41 @@ export class ProjectsController { this.logger.setContext(ProjectsController.name); } - @ApiOperation({ - operationId: 'getCurrentProject', - summary: 'Retrieve the current project of the authenticated user', - }) - @ApiResponse({ status: 200 }) + @ApiOperation({ operationId: 'getProjects', summary: 'Retrieve projects' }) + @ApiGetArrayCustomResponse(ProjectResponse) @UseGuards(ApiKeyAuthGuard) - @Get('current') - getCurrentProject(@Request() req: any) { - const projectId = req.user.id_project; - return projectId; + @Get() + getProjects(@Request() req: any) { + const user_id = req.user.id_user; + return this.projectsService.getProjectsByUser(user_id); } @ApiOperation({ operationId: 'getProjects', summary: 'Retrieve projects' }) - @ApiResponse({ status: 200 }) + @ApiGetArrayCustomResponse(ProjectResponse) @UseGuards(JwtAuthGuard) - @Get() - getProjects(@Request() req: any) { + @Get('internal') + @ApiExcludeEndpoint() + getProjectsInternal(@Request() req: any) { const user_id = req.user.id_user; return this.projectsService.getProjectsByUser(user_id); } @ApiOperation({ operationId: 'createProject', summary: 'Create a project' }) @ApiBody({ type: CreateProjectDto }) - @ApiResponse({ status: 201 }) - @UseGuards(JwtAuthGuard) + @ApiPostCustomResponse(ProjectResponse) + @UseGuards(ApiKeyAuthGuard) @Post() createProject(@Body() projectCreateDto: CreateProjectDto) { return this.projectsService.createProject(projectCreateDto); } + + @ApiOperation({ operationId: 'createProject', summary: 'Create a project' }) + @ApiBody({ type: CreateProjectDto }) + @ApiPostCustomResponse(ProjectResponse) + @UseGuards(JwtAuthGuard) + @ApiExcludeEndpoint() + @Post('internal') + createInternalProject(@Body() projectCreateDto: CreateProjectDto) { + return this.projectsService.createProject(projectCreateDto); + } } diff --git a/packages/api/src/@core/sync/sync.controller.ts b/packages/api/src/@core/sync/sync.controller.ts index 2e830417c..53f3cb11c 100644 --- a/packages/api/src/@core/sync/sync.controller.ts +++ b/packages/api/src/@core/sync/sync.controller.ts @@ -12,16 +12,35 @@ import { CoreSyncService } from './sync.service'; import { ApiPostCustomResponse } from '@@core/utils/dtos/openapi.respone.dto'; export class ResyncStatusDto { - @ApiProperty({ type: Date, nullable: true }) + @ApiProperty({ type: Date, example: '', nullable: true }) timestamp: Date; - @ApiProperty({ type: String, nullable: true }) + @ApiProperty({ + type: String, + example: 'ticketing', + enum: [ + 'ticketing', + 'ats', + 'accounting', + 'hris', + 'crm', + 'filestorage', + 'ecommerce', + 'marketingautomation', + ], + nullable: true, + }) vertical: string; - @ApiProperty({ type: String, nullable: true }) + @ApiProperty({ type: String, example: 'gitlab', nullable: true }) provider: string; - @ApiProperty({ type: String, nullable: true }) + @ApiProperty({ + type: String, + example: 'success', + enum: ['success', 'fail'], + nullable: true, + }) status: string; } @ApiTags('sync') diff --git a/packages/api/src/accounting/address/address.controller.ts b/packages/api/src/accounting/address/address.controller.ts index 6cd793589..1487edf1b 100644 --- a/packages/api/src/accounting/address/address.controller.ts +++ b/packages/api/src/accounting/address/address.controller.ts @@ -33,7 +33,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('accounting/addresses') @Controller('accounting/addresses') export class AddressController { diff --git a/packages/api/src/accounting/attachment/attachment.controller.ts b/packages/api/src/accounting/attachment/attachment.controller.ts index fd672c466..d2dcbf4aa 100644 --- a/packages/api/src/accounting/attachment/attachment.controller.ts +++ b/packages/api/src/accounting/attachment/attachment.controller.ts @@ -34,7 +34,7 @@ import { ApiPostCustomResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('accounting/attachments') @Controller('accounting/attachments') export class AttachmentController { diff --git a/packages/api/src/accounting/balancesheet/balancesheet.controller.ts b/packages/api/src/accounting/balancesheet/balancesheet.controller.ts index e74e05a8b..c3057ade0 100644 --- a/packages/api/src/accounting/balancesheet/balancesheet.controller.ts +++ b/packages/api/src/accounting/balancesheet/balancesheet.controller.ts @@ -30,7 +30,7 @@ import { ApiKeyAuthGuard } from '@@core/auth/guards/api-key.guard'; import { FetchObjectsQueryDto } from '@@core/utils/dtos/fetch-objects-query.dto'; import { ApiGetCustomResponse, ApiPaginatedResponse } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('accounting/balancesheets') @Controller('accounting/balancesheets') export class BalanceSheetController { diff --git a/packages/api/src/accounting/cashflowstatement/cashflowstatement.controller.ts b/packages/api/src/accounting/cashflowstatement/cashflowstatement.controller.ts index ac79d74c1..f48ed9fff 100644 --- a/packages/api/src/accounting/cashflowstatement/cashflowstatement.controller.ts +++ b/packages/api/src/accounting/cashflowstatement/cashflowstatement.controller.ts @@ -30,7 +30,7 @@ import { ApiKeyAuthGuard } from '@@core/auth/guards/api-key.guard'; import { FetchObjectsQueryDto } from '@@core/utils/dtos/fetch-objects-query.dto'; import { ApiGetCustomResponse, ApiPaginatedResponse } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('accounting/cashflowstatements') @Controller('accounting/cashflowstatements') export class CashflowStatementController { diff --git a/packages/api/src/accounting/companyinfo/companyinfo.controller.ts b/packages/api/src/accounting/companyinfo/companyinfo.controller.ts index 132055f6d..5891fbe0b 100644 --- a/packages/api/src/accounting/companyinfo/companyinfo.controller.ts +++ b/packages/api/src/accounting/companyinfo/companyinfo.controller.ts @@ -30,7 +30,7 @@ import { ApiKeyAuthGuard } from '@@core/auth/guards/api-key.guard'; import { FetchObjectsQueryDto } from '@@core/utils/dtos/fetch-objects-query.dto'; import { ApiGetCustomResponse, ApiPaginatedResponse } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('accounting/companyinfos') @Controller('accounting/companyinfos') export class CompanyInfoController { diff --git a/packages/api/src/accounting/contact/contact.controller.ts b/packages/api/src/accounting/contact/contact.controller.ts index e99546aba..8bd0717b4 100644 --- a/packages/api/src/accounting/contact/contact.controller.ts +++ b/packages/api/src/accounting/contact/contact.controller.ts @@ -34,7 +34,7 @@ import { ApiPostCustomResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('accounting/contacts') @Controller('accounting/contacts') export class ContactController { diff --git a/packages/api/src/accounting/creditnote/creditnote.controller.ts b/packages/api/src/accounting/creditnote/creditnote.controller.ts index 6bd383821..8a1024951 100644 --- a/packages/api/src/accounting/creditnote/creditnote.controller.ts +++ b/packages/api/src/accounting/creditnote/creditnote.controller.ts @@ -33,7 +33,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('accounting/creditnotes') @Controller('accounting/creditnotes') export class CreditNoteController { diff --git a/packages/api/src/accounting/expense/expense.controller.ts b/packages/api/src/accounting/expense/expense.controller.ts index aec5983db..63f42050d 100644 --- a/packages/api/src/accounting/expense/expense.controller.ts +++ b/packages/api/src/accounting/expense/expense.controller.ts @@ -34,7 +34,7 @@ import { ApiPostCustomResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('accounting/expenses') @Controller('accounting/expenses') export class ExpenseController { diff --git a/packages/api/src/accounting/incomestatement/incomestatement.controller.ts b/packages/api/src/accounting/incomestatement/incomestatement.controller.ts index 4460fa03c..47dd2cb98 100644 --- a/packages/api/src/accounting/incomestatement/incomestatement.controller.ts +++ b/packages/api/src/accounting/incomestatement/incomestatement.controller.ts @@ -30,7 +30,7 @@ import { ApiKeyAuthGuard } from '@@core/auth/guards/api-key.guard'; import { FetchObjectsQueryDto } from '@@core/utils/dtos/fetch-objects-query.dto'; import { ApiGetCustomResponse, ApiPaginatedResponse } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('accounting/incomestatements') @Controller('accounting/incomestatements') export class IncomeStatementController { diff --git a/packages/api/src/accounting/invoice/invoice.controller.ts b/packages/api/src/accounting/invoice/invoice.controller.ts index c783bf510..31b010e18 100644 --- a/packages/api/src/accounting/invoice/invoice.controller.ts +++ b/packages/api/src/accounting/invoice/invoice.controller.ts @@ -34,7 +34,7 @@ import { ApiPostCustomResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('accounting/invoices') @Controller('accounting/invoices') export class InvoiceController { diff --git a/packages/api/src/accounting/item/item.controller.ts b/packages/api/src/accounting/item/item.controller.ts index 624fac15b..08adfdf03 100644 --- a/packages/api/src/accounting/item/item.controller.ts +++ b/packages/api/src/accounting/item/item.controller.ts @@ -30,7 +30,7 @@ import { ApiKeyAuthGuard } from '@@core/auth/guards/api-key.guard'; import { FetchObjectsQueryDto } from '@@core/utils/dtos/fetch-objects-query.dto'; import { ApiGetCustomResponse, ApiPaginatedResponse } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('accounting/items') @Controller('accounting/items') export class ItemController { diff --git a/packages/api/src/accounting/journalentry/journalentry.controller.ts b/packages/api/src/accounting/journalentry/journalentry.controller.ts index 63dc88702..f046e2fa4 100644 --- a/packages/api/src/accounting/journalentry/journalentry.controller.ts +++ b/packages/api/src/accounting/journalentry/journalentry.controller.ts @@ -34,7 +34,7 @@ import { ApiPostCustomResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('accounting/journalentries') @Controller('accounting/journalentries') export class JournalEntryController { diff --git a/packages/api/src/accounting/payment/payment.controller.ts b/packages/api/src/accounting/payment/payment.controller.ts index 6c02e6d67..3b797a109 100644 --- a/packages/api/src/accounting/payment/payment.controller.ts +++ b/packages/api/src/accounting/payment/payment.controller.ts @@ -34,7 +34,7 @@ import { ApiPostCustomResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('accounting/payments') @Controller('accounting/payments') export class PaymentController { diff --git a/packages/api/src/accounting/phonenumber/phonenumber.controller.ts b/packages/api/src/accounting/phonenumber/phonenumber.controller.ts index 30367904d..1a8dfcf35 100644 --- a/packages/api/src/accounting/phonenumber/phonenumber.controller.ts +++ b/packages/api/src/accounting/phonenumber/phonenumber.controller.ts @@ -30,7 +30,7 @@ import { ApiKeyAuthGuard } from '@@core/auth/guards/api-key.guard'; import { FetchObjectsQueryDto } from '@@core/utils/dtos/fetch-objects-query.dto'; import { ApiGetCustomResponse, ApiPaginatedResponse } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('accounting/phonenumbers') @Controller('accounting/phonenumbers') export class PhoneNumberController { diff --git a/packages/api/src/accounting/purchaseorder/purchaseorder.controller.ts b/packages/api/src/accounting/purchaseorder/purchaseorder.controller.ts index 6b7e24c7c..5d6fd002d 100644 --- a/packages/api/src/accounting/purchaseorder/purchaseorder.controller.ts +++ b/packages/api/src/accounting/purchaseorder/purchaseorder.controller.ts @@ -34,7 +34,7 @@ import { ApiPostCustomResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('accounting/purchaseorders') @Controller('accounting/purchaseorders') export class PurchaseOrderController { diff --git a/packages/api/src/accounting/taxrate/taxrate.controller.ts b/packages/api/src/accounting/taxrate/taxrate.controller.ts index 4285c72c6..0ea37f219 100644 --- a/packages/api/src/accounting/taxrate/taxrate.controller.ts +++ b/packages/api/src/accounting/taxrate/taxrate.controller.ts @@ -30,7 +30,7 @@ import { ApiKeyAuthGuard } from '@@core/auth/guards/api-key.guard'; import { FetchObjectsQueryDto } from '@@core/utils/dtos/fetch-objects-query.dto'; import { ApiGetCustomResponse, ApiPaginatedResponse } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('accounting/taxrates') @Controller('accounting/taxrates') export class TaxRateController { diff --git a/packages/api/src/accounting/trackingcategory/trackingcategory.controller.ts b/packages/api/src/accounting/trackingcategory/trackingcategory.controller.ts index bdbd3f445..3f15cc0a3 100644 --- a/packages/api/src/accounting/trackingcategory/trackingcategory.controller.ts +++ b/packages/api/src/accounting/trackingcategory/trackingcategory.controller.ts @@ -30,7 +30,7 @@ import { ApiKeyAuthGuard } from '@@core/auth/guards/api-key.guard'; import { FetchObjectsQueryDto } from '@@core/utils/dtos/fetch-objects-query.dto'; import { ApiGetCustomResponse, ApiPaginatedResponse } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('accounting/trackingcategories') @Controller('accounting/trackingcategories') export class TrackingCategoryController { diff --git a/packages/api/src/accounting/transaction/transaction.controller.ts b/packages/api/src/accounting/transaction/transaction.controller.ts index cf09f14f1..e40f1bfbb 100644 --- a/packages/api/src/accounting/transaction/transaction.controller.ts +++ b/packages/api/src/accounting/transaction/transaction.controller.ts @@ -30,7 +30,7 @@ import { ApiKeyAuthGuard } from '@@core/auth/guards/api-key.guard'; import { FetchObjectsQueryDto } from '@@core/utils/dtos/fetch-objects-query.dto'; import { ApiGetCustomResponse, ApiPaginatedResponse } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('accounting/transactions') @Controller('accounting/transactions') export class TransactionController { diff --git a/packages/api/src/accounting/vendorcredit/vendorcredit.controller.ts b/packages/api/src/accounting/vendorcredit/vendorcredit.controller.ts index 838133da2..2a62149d6 100644 --- a/packages/api/src/accounting/vendorcredit/vendorcredit.controller.ts +++ b/packages/api/src/accounting/vendorcredit/vendorcredit.controller.ts @@ -30,7 +30,7 @@ import { ApiKeyAuthGuard } from '@@core/auth/guards/api-key.guard'; import { FetchObjectsQueryDto } from '@@core/utils/dtos/fetch-objects-query.dto'; import { ApiGetCustomResponse, ApiPaginatedResponse } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('accounting/vendorcredits') @Controller('accounting/vendorcredits') export class VendorCreditController { diff --git a/packages/api/src/ats/activity/activity.controller.ts b/packages/api/src/ats/activity/activity.controller.ts index ab5cdc157..0e9e9848d 100644 --- a/packages/api/src/ats/activity/activity.controller.ts +++ b/packages/api/src/ats/activity/activity.controller.ts @@ -33,7 +33,6 @@ import { ApiPostCustomResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() @ApiTags('ats/activities') @Controller('ats/activities') export class ActivityController { diff --git a/packages/api/src/ats/application/application.controller.ts b/packages/api/src/ats/application/application.controller.ts index 345526ca0..69f6d0082 100644 --- a/packages/api/src/ats/application/application.controller.ts +++ b/packages/api/src/ats/application/application.controller.ts @@ -34,7 +34,6 @@ import { ApiPostCustomResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() @ApiTags('ats/applications') @Controller('ats/applications') export class ApplicationController { diff --git a/packages/api/src/ats/attachment/attachment.controller.ts b/packages/api/src/ats/attachment/attachment.controller.ts index fcbddba40..c5c64f975 100644 --- a/packages/api/src/ats/attachment/attachment.controller.ts +++ b/packages/api/src/ats/attachment/attachment.controller.ts @@ -34,7 +34,7 @@ import { ApiPostCustomResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('ats/attachments') @Controller('ats/attachments') export class AttachmentController { diff --git a/packages/api/src/ats/candidate/candidate.controller.ts b/packages/api/src/ats/candidate/candidate.controller.ts index 5db46b49c..44204f418 100644 --- a/packages/api/src/ats/candidate/candidate.controller.ts +++ b/packages/api/src/ats/candidate/candidate.controller.ts @@ -34,7 +34,7 @@ import { ApiPostCustomResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('ats/candidates') @Controller('ats/candidates') export class CandidateController { diff --git a/packages/api/src/ats/department/department.controller.ts b/packages/api/src/ats/department/department.controller.ts index cacf312a8..fe76a8ba4 100644 --- a/packages/api/src/ats/department/department.controller.ts +++ b/packages/api/src/ats/department/department.controller.ts @@ -33,7 +33,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('ats/departments') @Controller('ats/departments') export class DepartmentController { diff --git a/packages/api/src/ats/eeocs/eeocs.controller.ts b/packages/api/src/ats/eeocs/eeocs.controller.ts index dac339fb5..1f869caac 100644 --- a/packages/api/src/ats/eeocs/eeocs.controller.ts +++ b/packages/api/src/ats/eeocs/eeocs.controller.ts @@ -33,7 +33,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('ats/eeocs') @Controller('ats/eeocs') export class EeocsController { diff --git a/packages/api/src/ats/interview/interview.controller.ts b/packages/api/src/ats/interview/interview.controller.ts index af4e893f5..b2bfde07a 100644 --- a/packages/api/src/ats/interview/interview.controller.ts +++ b/packages/api/src/ats/interview/interview.controller.ts @@ -34,7 +34,7 @@ import { ApiPostCustomResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('ats/interviews') @Controller('ats/interviews') export class InterviewController { diff --git a/packages/api/src/ats/job/job.controller.ts b/packages/api/src/ats/job/job.controller.ts index 0d75e8e2b..325399c1c 100644 --- a/packages/api/src/ats/job/job.controller.ts +++ b/packages/api/src/ats/job/job.controller.ts @@ -30,7 +30,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('ats/jobs') @Controller('ats/jobs') export class JobController { diff --git a/packages/api/src/ats/jobinterviewstage/jobinterviewstage.controller.ts b/packages/api/src/ats/jobinterviewstage/jobinterviewstage.controller.ts index 2aaba70b6..0bab118f7 100644 --- a/packages/api/src/ats/jobinterviewstage/jobinterviewstage.controller.ts +++ b/packages/api/src/ats/jobinterviewstage/jobinterviewstage.controller.ts @@ -33,7 +33,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('ats/jobinterviewstages') @Controller('ats/jobinterviewstages') export class JobInterviewStageController { diff --git a/packages/api/src/ats/offer/offer.controller.ts b/packages/api/src/ats/offer/offer.controller.ts index 47b6b1b16..08c9ba079 100644 --- a/packages/api/src/ats/offer/offer.controller.ts +++ b/packages/api/src/ats/offer/offer.controller.ts @@ -33,7 +33,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('ats/offers') @Controller('ats/offers') export class OfferController { diff --git a/packages/api/src/ats/office/office.controller.ts b/packages/api/src/ats/office/office.controller.ts index a16c5b58b..b2bf50e25 100644 --- a/packages/api/src/ats/office/office.controller.ts +++ b/packages/api/src/ats/office/office.controller.ts @@ -33,7 +33,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('ats/offices') @Controller('ats/offices') export class OfficeController { diff --git a/packages/api/src/ats/rejectreason/rejectreason.controller.ts b/packages/api/src/ats/rejectreason/rejectreason.controller.ts index a2e8c6e2e..c989c303e 100644 --- a/packages/api/src/ats/rejectreason/rejectreason.controller.ts +++ b/packages/api/src/ats/rejectreason/rejectreason.controller.ts @@ -33,7 +33,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('ats/rejectreasons') @Controller('ats/rejectreasons') export class RejectReasonController { diff --git a/packages/api/src/ats/scorecard/scorecard.controller.ts b/packages/api/src/ats/scorecard/scorecard.controller.ts index 7f3d34f45..95ff06fff 100644 --- a/packages/api/src/ats/scorecard/scorecard.controller.ts +++ b/packages/api/src/ats/scorecard/scorecard.controller.ts @@ -33,7 +33,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('ats/scorecards') @Controller('ats/scorecards') export class ScoreCardController { diff --git a/packages/api/src/ats/user/user.controller.ts b/packages/api/src/ats/user/user.controller.ts index 27d27500c..241d53dcf 100644 --- a/packages/api/src/ats/user/user.controller.ts +++ b/packages/api/src/ats/user/user.controller.ts @@ -33,7 +33,6 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() @ApiTags('ats/users') @Controller('ats/users') export class UserController { diff --git a/packages/api/src/crm/company/company.controller.ts b/packages/api/src/crm/company/company.controller.ts index 46fcc8cb3..550153048 100644 --- a/packages/api/src/crm/company/company.controller.ts +++ b/packages/api/src/crm/company/company.controller.ts @@ -35,7 +35,7 @@ import { ApiPostCustomResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('crm/companies') @Controller('crm/companies') export class CompanyController { diff --git a/packages/api/src/crm/contact/contact.controller.ts b/packages/api/src/crm/contact/contact.controller.ts index 5e0f2037c..705860ddd 100644 --- a/packages/api/src/crm/contact/contact.controller.ts +++ b/packages/api/src/crm/contact/contact.controller.ts @@ -37,7 +37,7 @@ import { PaginatedDto, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('crm/contacts') @Controller('crm/contacts') @ApiExtraModels(PaginatedDto, UnifiedCrmContactOutput) diff --git a/packages/api/src/crm/deal/deal.controller.ts b/packages/api/src/crm/deal/deal.controller.ts index 64d259e94..8691e662f 100644 --- a/packages/api/src/crm/deal/deal.controller.ts +++ b/packages/api/src/crm/deal/deal.controller.ts @@ -36,7 +36,7 @@ import { ApiPostCustomResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('crm/deals') @Controller('crm/deals') export class DealController { diff --git a/packages/api/src/crm/engagement/engagement.controller.ts b/packages/api/src/crm/engagement/engagement.controller.ts index 8a36695e8..e6f20c8e0 100644 --- a/packages/api/src/crm/engagement/engagement.controller.ts +++ b/packages/api/src/crm/engagement/engagement.controller.ts @@ -36,7 +36,7 @@ import { ApiPostCustomResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('crm/engagements') @Controller('crm/engagements') export class EngagementController { diff --git a/packages/api/src/crm/note/note.controller.ts b/packages/api/src/crm/note/note.controller.ts index 03676dadb..0d0a57b55 100644 --- a/packages/api/src/crm/note/note.controller.ts +++ b/packages/api/src/crm/note/note.controller.ts @@ -35,7 +35,7 @@ import { ApiPostCustomResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('crm/notes') @Controller('crm/notes') export class NoteController { diff --git a/packages/api/src/crm/stage/stage.controller.ts b/packages/api/src/crm/stage/stage.controller.ts index 793fa5b85..edbddf0ec 100644 --- a/packages/api/src/crm/stage/stage.controller.ts +++ b/packages/api/src/crm/stage/stage.controller.ts @@ -28,7 +28,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('crm/stages') @Controller('crm/stages') export class StageController { diff --git a/packages/api/src/crm/task/task.controller.ts b/packages/api/src/crm/task/task.controller.ts index bf05f3bab..81f4ad4e9 100644 --- a/packages/api/src/crm/task/task.controller.ts +++ b/packages/api/src/crm/task/task.controller.ts @@ -36,7 +36,7 @@ import { ApiPostCustomResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('crm/tasks') @Controller('crm/tasks') export class TaskController { diff --git a/packages/api/src/crm/user/user.controller.ts b/packages/api/src/crm/user/user.controller.ts index 07daaa0f5..ae2d562f8 100644 --- a/packages/api/src/crm/user/user.controller.ts +++ b/packages/api/src/crm/user/user.controller.ts @@ -28,7 +28,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('crm/users') @Controller('crm/users') export class UserController { diff --git a/packages/api/src/filestorage/drive/drive.controller.ts b/packages/api/src/filestorage/drive/drive.controller.ts index 0919d583e..6613cebc3 100644 --- a/packages/api/src/filestorage/drive/drive.controller.ts +++ b/packages/api/src/filestorage/drive/drive.controller.ts @@ -27,7 +27,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('filestorage/drives') @Controller('filestorage/drives') export class DriveController { diff --git a/packages/api/src/filestorage/file/file.controller.ts b/packages/api/src/filestorage/file/file.controller.ts index a4aed6701..c947cace3 100644 --- a/packages/api/src/filestorage/file/file.controller.ts +++ b/packages/api/src/filestorage/file/file.controller.ts @@ -35,7 +35,7 @@ import { ApiPostCustomResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('filestorage/files') @Controller('filestorage/files') export class FileController { diff --git a/packages/api/src/filestorage/folder/folder.controller.ts b/packages/api/src/filestorage/folder/folder.controller.ts index dce55f65a..6a8f5a515 100644 --- a/packages/api/src/filestorage/folder/folder.controller.ts +++ b/packages/api/src/filestorage/folder/folder.controller.ts @@ -36,7 +36,7 @@ import { } from '@@core/utils/dtos/openapi.respone.dto'; import { example } from 'yargs'; -//@ApiKeyAuth() + @ApiTags('filestorage/folders') @Controller('filestorage/folders') export class FolderController { diff --git a/packages/api/src/filestorage/group/group.controller.ts b/packages/api/src/filestorage/group/group.controller.ts index 176cc924c..c902653e0 100644 --- a/packages/api/src/filestorage/group/group.controller.ts +++ b/packages/api/src/filestorage/group/group.controller.ts @@ -35,7 +35,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('filestorage/groups') @Controller('filestorage/groups') export class GroupController { diff --git a/packages/api/src/filestorage/user/user.controller.ts b/packages/api/src/filestorage/user/user.controller.ts index b48f0cdaa..f7dd5ddae 100644 --- a/packages/api/src/filestorage/user/user.controller.ts +++ b/packages/api/src/filestorage/user/user.controller.ts @@ -27,7 +27,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('filestorage/users') @Controller('filestorage/users') export class UserController { diff --git a/packages/api/src/hris/bankinfo/bankinfo.controller.ts b/packages/api/src/hris/bankinfo/bankinfo.controller.ts index c755d1bbd..ca8264617 100644 --- a/packages/api/src/hris/bankinfo/bankinfo.controller.ts +++ b/packages/api/src/hris/bankinfo/bankinfo.controller.ts @@ -32,7 +32,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('hris/bankinfos') @Controller('hris/bankinfos') export class BankinfoController { diff --git a/packages/api/src/hris/benefit/benefit.controller.ts b/packages/api/src/hris/benefit/benefit.controller.ts index 0ece6ebcf..e676ea6d6 100644 --- a/packages/api/src/hris/benefit/benefit.controller.ts +++ b/packages/api/src/hris/benefit/benefit.controller.ts @@ -33,7 +33,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('hris/benefits') @Controller('hris/benefits') export class BenefitController { diff --git a/packages/api/src/hris/company/company.controller.ts b/packages/api/src/hris/company/company.controller.ts index 5210e493e..d1a00759d 100644 --- a/packages/api/src/hris/company/company.controller.ts +++ b/packages/api/src/hris/company/company.controller.ts @@ -31,7 +31,7 @@ import { } from '@@core/utils/dtos/openapi.respone.dto'; import { query } from 'express'; -//@ApiKeyAuth() + @ApiTags('hris/companies') @Controller('hris/companies') export class CompanyController { diff --git a/packages/api/src/hris/dependent/dependent.controller.ts b/packages/api/src/hris/dependent/dependent.controller.ts index ac1881598..7bd3e756b 100644 --- a/packages/api/src/hris/dependent/dependent.controller.ts +++ b/packages/api/src/hris/dependent/dependent.controller.ts @@ -33,7 +33,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('hris/dependents') @Controller('hris/dependents') export class DependentController { diff --git a/packages/api/src/hris/employee/employee.controller.ts b/packages/api/src/hris/employee/employee.controller.ts index f62472715..68640c008 100644 --- a/packages/api/src/hris/employee/employee.controller.ts +++ b/packages/api/src/hris/employee/employee.controller.ts @@ -34,7 +34,7 @@ import { ApiPostCustomResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('hris/employees') @Controller('hris/employees') export class EmployeeController { diff --git a/packages/api/src/hris/employeepayrollrun/employeepayrollrun.controller.ts b/packages/api/src/hris/employeepayrollrun/employeepayrollrun.controller.ts index f055def8f..7b0016a85 100644 --- a/packages/api/src/hris/employeepayrollrun/employeepayrollrun.controller.ts +++ b/packages/api/src/hris/employeepayrollrun/employeepayrollrun.controller.ts @@ -33,7 +33,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('hris/employeepayrollruns') @Controller('hris/employeepayrollruns') export class EmployeePayrollRunController { diff --git a/packages/api/src/hris/employerbenefit/employerbenefit.controller.ts b/packages/api/src/hris/employerbenefit/employerbenefit.controller.ts index 000ecf81c..c678b280d 100644 --- a/packages/api/src/hris/employerbenefit/employerbenefit.controller.ts +++ b/packages/api/src/hris/employerbenefit/employerbenefit.controller.ts @@ -33,7 +33,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('hris/employerbenefits') @Controller('hris/employerbenefits') export class EmployerBenefitController { diff --git a/packages/api/src/hris/employment/employment.controller.ts b/packages/api/src/hris/employment/employment.controller.ts index 0df114c41..694d20fc3 100644 --- a/packages/api/src/hris/employment/employment.controller.ts +++ b/packages/api/src/hris/employment/employment.controller.ts @@ -33,7 +33,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('hris/employments') @Controller('hris/employments') export class EmploymentController { diff --git a/packages/api/src/hris/group/group.controller.ts b/packages/api/src/hris/group/group.controller.ts index 19c8f9cdc..ef3438943 100644 --- a/packages/api/src/hris/group/group.controller.ts +++ b/packages/api/src/hris/group/group.controller.ts @@ -33,7 +33,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('hris/groups') @Controller('hris/groups') export class GroupController { diff --git a/packages/api/src/hris/location/location.controller.ts b/packages/api/src/hris/location/location.controller.ts index 1e18709d3..39c102ae1 100644 --- a/packages/api/src/hris/location/location.controller.ts +++ b/packages/api/src/hris/location/location.controller.ts @@ -33,7 +33,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('hris/locations') @Controller('hris/locations') export class LocationController { diff --git a/packages/api/src/hris/paygroup/paygroup.controller.ts b/packages/api/src/hris/paygroup/paygroup.controller.ts index c488cc656..6ac625150 100644 --- a/packages/api/src/hris/paygroup/paygroup.controller.ts +++ b/packages/api/src/hris/paygroup/paygroup.controller.ts @@ -33,7 +33,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('hris/paygroups') @Controller('hris/paygroups') export class PayGroupController { diff --git a/packages/api/src/hris/payrollrun/payrollrun.controller.ts b/packages/api/src/hris/payrollrun/payrollrun.controller.ts index bd90d751e..fddf254a4 100644 --- a/packages/api/src/hris/payrollrun/payrollrun.controller.ts +++ b/packages/api/src/hris/payrollrun/payrollrun.controller.ts @@ -33,7 +33,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('hris/payrollruns') @Controller('hris/payrollruns') export class PayrollRunController { diff --git a/packages/api/src/hris/timeoff/timeoff.controller.ts b/packages/api/src/hris/timeoff/timeoff.controller.ts index 1ce1a50a7..eab61443f 100644 --- a/packages/api/src/hris/timeoff/timeoff.controller.ts +++ b/packages/api/src/hris/timeoff/timeoff.controller.ts @@ -34,7 +34,7 @@ import { ApiPostCustomResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('hris/timeoffs') @Controller('hris/timeoffs') export class TimeoffController { diff --git a/packages/api/src/hris/timeoffbalance/timeoffbalance.controller.ts b/packages/api/src/hris/timeoffbalance/timeoffbalance.controller.ts index 59bb511e6..10282ae21 100644 --- a/packages/api/src/hris/timeoffbalance/timeoffbalance.controller.ts +++ b/packages/api/src/hris/timeoffbalance/timeoffbalance.controller.ts @@ -33,7 +33,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('hris/timeoffbalances') @Controller('hris/timeoffbalances') export class TimeoffBalanceController { diff --git a/packages/api/src/marketingautomation/action/action.controller.ts b/packages/api/src/marketingautomation/action/action.controller.ts index adeb84ab3..b0a2e16f7 100644 --- a/packages/api/src/marketingautomation/action/action.controller.ts +++ b/packages/api/src/marketingautomation/action/action.controller.ts @@ -34,7 +34,7 @@ import { ApiPostCustomResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('marketingautomation/actions') @Controller('marketingautomation/actions') export class ActionController { diff --git a/packages/api/src/marketingautomation/automation/automation.controller.ts b/packages/api/src/marketingautomation/automation/automation.controller.ts index 21b61d15e..34c643516 100644 --- a/packages/api/src/marketingautomation/automation/automation.controller.ts +++ b/packages/api/src/marketingautomation/automation/automation.controller.ts @@ -34,7 +34,7 @@ import { ApiPostCustomResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('marketingautomation/automations') @Controller('marketingautomation/automations') export class AutomationController { diff --git a/packages/api/src/marketingautomation/campaign/campaign.controller.ts b/packages/api/src/marketingautomation/campaign/campaign.controller.ts index a4680d3c8..f87b5df30 100644 --- a/packages/api/src/marketingautomation/campaign/campaign.controller.ts +++ b/packages/api/src/marketingautomation/campaign/campaign.controller.ts @@ -34,7 +34,7 @@ import { ApiPostCustomResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('marketingautomation/campaigns') @Controller('marketingautomation/campaigns') export class CampaignController { diff --git a/packages/api/src/marketingautomation/contact/contact.controller.ts b/packages/api/src/marketingautomation/contact/contact.controller.ts index c8fecf294..5850c166b 100644 --- a/packages/api/src/marketingautomation/contact/contact.controller.ts +++ b/packages/api/src/marketingautomation/contact/contact.controller.ts @@ -34,7 +34,7 @@ import { ApiPostCustomResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('marketingautomation/contacts') @Controller('marketingautomation/contacts') export class ContactController { diff --git a/packages/api/src/marketingautomation/email/email.controller.ts b/packages/api/src/marketingautomation/email/email.controller.ts index 38c5b2860..6c515ead0 100644 --- a/packages/api/src/marketingautomation/email/email.controller.ts +++ b/packages/api/src/marketingautomation/email/email.controller.ts @@ -33,7 +33,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('marketingautomation/emails') @Controller('marketingautomation/emails') export class EmailController { diff --git a/packages/api/src/marketingautomation/event/event.controller.ts b/packages/api/src/marketingautomation/event/event.controller.ts index ce57a65ee..861a39087 100644 --- a/packages/api/src/marketingautomation/event/event.controller.ts +++ b/packages/api/src/marketingautomation/event/event.controller.ts @@ -33,7 +33,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('marketingautomation/events') @Controller('marketingautomation/events') export class EventController { diff --git a/packages/api/src/marketingautomation/list/list.controller.ts b/packages/api/src/marketingautomation/list/list.controller.ts index c48091ffe..243ef32dc 100644 --- a/packages/api/src/marketingautomation/list/list.controller.ts +++ b/packages/api/src/marketingautomation/list/list.controller.ts @@ -34,7 +34,7 @@ import { ApiPostCustomResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('marketingautomation/lists') @Controller('marketingautomation/lists') export class ListController { diff --git a/packages/api/src/marketingautomation/message/message.controller.ts b/packages/api/src/marketingautomation/message/message.controller.ts index c2844bd17..c3a26e4f8 100644 --- a/packages/api/src/marketingautomation/message/message.controller.ts +++ b/packages/api/src/marketingautomation/message/message.controller.ts @@ -33,7 +33,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('marketingautomation/messages') @Controller('marketingautomation/messages') export class MessageController { diff --git a/packages/api/src/marketingautomation/template/template.controller.ts b/packages/api/src/marketingautomation/template/template.controller.ts index e54d6f083..3ba6ee205 100644 --- a/packages/api/src/marketingautomation/template/template.controller.ts +++ b/packages/api/src/marketingautomation/template/template.controller.ts @@ -34,7 +34,7 @@ import { ApiPostCustomResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('marketingautomation/templates') @Controller('marketingautomation/templates') export class TemplateController { diff --git a/packages/api/src/marketingautomation/user/user.controller.ts b/packages/api/src/marketingautomation/user/user.controller.ts index 7827f40e5..9ebb600be 100644 --- a/packages/api/src/marketingautomation/user/user.controller.ts +++ b/packages/api/src/marketingautomation/user/user.controller.ts @@ -33,7 +33,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('marketingautomation/users') @Controller('marketingautomation/users') export class UserController { diff --git a/packages/api/src/ticketing/account/account.controller.ts b/packages/api/src/ticketing/account/account.controller.ts index bc0e6a285..e742db840 100644 --- a/packages/api/src/ticketing/account/account.controller.ts +++ b/packages/api/src/ticketing/account/account.controller.ts @@ -28,7 +28,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('ticketing/accounts') @Controller('ticketing/accounts') export class AccountController { diff --git a/packages/api/src/ticketing/attachment/attachment.controller.ts b/packages/api/src/ticketing/attachment/attachment.controller.ts index 5287d8bfd..c518a6ebd 100644 --- a/packages/api/src/ticketing/attachment/attachment.controller.ts +++ b/packages/api/src/ticketing/attachment/attachment.controller.ts @@ -35,7 +35,7 @@ import { ApiPostCustomResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('ticketing/attachments') @Controller('ticketing/attachments') export class AttachmentController { diff --git a/packages/api/src/ticketing/collection/collection.controller.ts b/packages/api/src/ticketing/collection/collection.controller.ts index d5e684095..3efb49c34 100644 --- a/packages/api/src/ticketing/collection/collection.controller.ts +++ b/packages/api/src/ticketing/collection/collection.controller.ts @@ -35,7 +35,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('ticketing/collections') @Controller('ticketing/collections') export class CollectionController { diff --git a/packages/api/src/ticketing/comment/comment.controller.ts b/packages/api/src/ticketing/comment/comment.controller.ts index 9768e4170..2cd67b144 100644 --- a/packages/api/src/ticketing/comment/comment.controller.ts +++ b/packages/api/src/ticketing/comment/comment.controller.ts @@ -36,7 +36,7 @@ import { ApiPostCustomResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('ticketing/comments') @Controller('ticketing/comments') export class CommentController { diff --git a/packages/api/src/ticketing/contact/contact.controller.ts b/packages/api/src/ticketing/contact/contact.controller.ts index a4b17f1fd..aa4336ad0 100644 --- a/packages/api/src/ticketing/contact/contact.controller.ts +++ b/packages/api/src/ticketing/contact/contact.controller.ts @@ -28,7 +28,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('ticketing/contacts') @Controller('ticketing/contacts') export class ContactController { diff --git a/packages/api/src/ticketing/tag/tag.controller.ts b/packages/api/src/ticketing/tag/tag.controller.ts index 109826a94..9ed5b9fc3 100644 --- a/packages/api/src/ticketing/tag/tag.controller.ts +++ b/packages/api/src/ticketing/tag/tag.controller.ts @@ -28,7 +28,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('ticketing/tags') @Controller('ticketing/tags') export class TagController { diff --git a/packages/api/src/ticketing/team/team.controller.ts b/packages/api/src/ticketing/team/team.controller.ts index e488d9870..8fcc9a141 100644 --- a/packages/api/src/ticketing/team/team.controller.ts +++ b/packages/api/src/ticketing/team/team.controller.ts @@ -28,7 +28,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('ticketing/teams') @Controller('ticketing/teams') export class TeamController { diff --git a/packages/api/src/ticketing/ticket/ticket.controller.ts b/packages/api/src/ticketing/ticket/ticket.controller.ts index 8eb211fdf..d9404e9b9 100644 --- a/packages/api/src/ticketing/ticket/ticket.controller.ts +++ b/packages/api/src/ticketing/ticket/ticket.controller.ts @@ -37,7 +37,7 @@ import { } from '@@core/utils/dtos/openapi.respone.dto'; import { UnifiedCrmContactOutput } from '@crm/contact/types/model.unified'; -//@ApiKeyAuth() + @ApiTags('ticketing/tickets') @Controller('ticketing/tickets') export class TicketController { diff --git a/packages/api/src/ticketing/user/user.controller.ts b/packages/api/src/ticketing/user/user.controller.ts index d7940c99a..3beb5714e 100644 --- a/packages/api/src/ticketing/user/user.controller.ts +++ b/packages/api/src/ticketing/user/user.controller.ts @@ -28,7 +28,7 @@ import { ApiPaginatedResponse, } from '@@core/utils/dtos/openapi.respone.dto'; -//@ApiKeyAuth() + @ApiTags('ticketing/users') @Controller('ticketing/users') export class UserController { diff --git a/packages/api/swagger/swagger-spec.yaml b/packages/api/swagger/swagger-spec.yaml index a76efa74c..604c7ad72 100644 --- a/packages/api/swagger/swagger-spec.yaml +++ b/packages/api/swagger/swagger-spec.yaml @@ -25,6 +25,39 @@ paths: schema: type: number example: 200 + /auth/login: + post: + operationId: signIn + summary: Log In + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/LoginDto' + responses: + '201': + description: '' + tags: + - auth + x-speakeasy-group: auth.login + /connections: + get: + operationId: getConnections + summary: List Connections + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Connection' + tags: + - connections /webhooks: get: operationId: listWebhooks @@ -44,7 +77,7 @@ paths: x-speakeasy-group: webhooks post: operationId: createWebhookPublic - summary: Add webhook metadata + summary: Create webhook parameters: [] requestBody: required: true @@ -1784,6 +1817,10 @@ paths: responses: '200': description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/LinkedUserResponse' tags: *ref_18 x-speakeasy-group: linked_users.{id} /linked_users/fromRemoteId: @@ -1806,6 +1843,40 @@ paths: $ref: '#/components/schemas/LinkedUserResponse' tags: *ref_18 x-speakeasy-group: linked_users.fromremoteid + /projects: + get: + operationId: getProjects + summary: Retrieve projects + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectResponse' + tags: &ref_19 + - projects + post: + operationId: createProject + summary: Create a project + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateProjectDto' + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectResponse' + tags: *ref_19 /field_mappings/define: post: operationId: definitions @@ -1824,7 +1895,7 @@ paths: application/json: schema: $ref: '#/components/schemas/CustomFieldResponse' - tags: &ref_19 + tags: &ref_20 - fieldMappings x-speakeasy-group: field_mappings.define /field_mappings: @@ -1845,7 +1916,7 @@ paths: application/json: schema: $ref: '#/components/schemas/CustomFieldResponse' - tags: *ref_19 + tags: *ref_20 /field_mappings/map: post: operationId: map @@ -1864,8 +1935,34 @@ paths: application/json: schema: $ref: '#/components/schemas/CustomFieldResponse' - tags: *ref_19 + tags: *ref_20 x-speakeasy-group: field_mappings.map + /events: + get: + operationId: getPanoraCoreEvents + summary: List Events + parameters: + - name: page + required: false + in: query + schema: + type: number + - name: limit + required: false + in: query + schema: + type: number + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EventResponse' + tags: + - events /passthrough: post: operationId: request @@ -1943,7 +2040,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedHrisBankinfoOutput' - tags: &ref_20 + tags: &ref_21 - hris/bankinfos x-speakeasy-group: hris.bankinfos /hris/bankinfos/{id}: @@ -1979,7 +2076,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedHrisBankinfoOutput' - tags: *ref_20 + tags: *ref_21 x-speakeasy-group: hris.bankinfos /hris/benefits: get: @@ -2023,7 +2120,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedHrisBenefitOutput' - tags: &ref_21 + tags: &ref_22 - hris/benefits x-speakeasy-group: hris.benefits /hris/benefits/{id}: @@ -2059,7 +2156,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedHrisBenefitOutput' - tags: *ref_21 + tags: *ref_22 x-speakeasy-group: hris.benefits /hris/companies: get: @@ -2103,7 +2200,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedHrisCompanyOutput' - tags: &ref_22 + tags: &ref_23 - hris/companies x-speakeasy-group: hris.companies /hris/companies/{id}: @@ -2139,7 +2236,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedHrisCompanyOutput' - tags: *ref_22 + tags: *ref_23 x-speakeasy-group: hris.companies /hris/dependents: get: @@ -2183,7 +2280,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedHrisDependentOutput' - tags: &ref_23 + tags: &ref_24 - hris/dependents x-speakeasy-group: hris.dependents /hris/dependents/{id}: @@ -2219,7 +2316,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedHrisDependentOutput' - tags: *ref_23 + tags: *ref_24 x-speakeasy-group: hris.dependents /hris/employeepayrollruns: get: @@ -2264,7 +2361,7 @@ paths: items: $ref: >- #/components/schemas/UnifiedHrisEmployeepayrollrunOutput - tags: &ref_24 + tags: &ref_25 - hris/employeepayrollruns x-speakeasy-group: hris.employeepayrollruns /hris/employeepayrollruns/{id}: @@ -2300,7 +2397,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedHrisEmployeepayrollrunOutput' - tags: *ref_24 + tags: *ref_25 x-speakeasy-group: hris.employeepayrollruns /hris/employees: get: @@ -2344,7 +2441,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedHrisEmployeeOutput' - tags: &ref_25 + tags: &ref_26 - hris/employees x-speakeasy-group: hris.employees post: @@ -2377,7 +2474,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedHrisEmployeeOutput' - tags: *ref_25 + tags: *ref_26 x-speakeasy-group: hris.employees /hris/employees/{id}: get: @@ -2412,7 +2509,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedHrisEmployeeOutput' - tags: *ref_25 + tags: *ref_26 x-speakeasy-group: hris.employees /hris/employerbenefits: get: @@ -2457,7 +2554,7 @@ paths: items: $ref: >- #/components/schemas/UnifiedHrisEmployerbenefitOutput - tags: &ref_26 + tags: &ref_27 - hris/employerbenefits x-speakeasy-group: hris.employerbenefits /hris/employerbenefits/{id}: @@ -2493,7 +2590,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedHrisEmployerbenefitOutput' - tags: *ref_26 + tags: *ref_27 x-speakeasy-group: hris.employerbenefits /hris/employments: get: @@ -2537,7 +2634,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedHrisEmploymentOutput' - tags: &ref_27 + tags: &ref_28 - hris/employments x-speakeasy-group: hris.employments /hris/employments/{id}: @@ -2573,7 +2670,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedHrisEmploymentOutput' - tags: *ref_27 + tags: *ref_28 x-speakeasy-group: hris.employments /hris/groups: get: @@ -2617,7 +2714,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedHrisGroupOutput' - tags: &ref_28 + tags: &ref_29 - hris/groups x-speakeasy-group: hris.groups /hris/groups/{id}: @@ -2653,7 +2750,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedHrisGroupOutput' - tags: *ref_28 + tags: *ref_29 x-speakeasy-group: hris.groups /hris/locations: get: @@ -2697,7 +2794,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedHrisLocationOutput' - tags: &ref_29 + tags: &ref_30 - hris/locations x-speakeasy-group: hris.locations /hris/locations/{id}: @@ -2733,7 +2830,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedHrisLocationOutput' - tags: *ref_29 + tags: *ref_30 x-speakeasy-group: hris.locations /hris/paygroups: get: @@ -2777,7 +2874,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedHrisPaygroupOutput' - tags: &ref_30 + tags: &ref_31 - hris/paygroups x-speakeasy-group: hris.paygroups /hris/paygroups/{id}: @@ -2813,7 +2910,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedHrisPaygroupOutput' - tags: *ref_30 + tags: *ref_31 x-speakeasy-group: hris.paygroups /hris/payrollruns: get: @@ -2857,7 +2954,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedHrisPayrollrunOutput' - tags: &ref_31 + tags: &ref_32 - hris/payrollruns x-speakeasy-group: hris.payrollruns /hris/payrollruns/{id}: @@ -2893,7 +2990,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedHrisPayrollrunOutput' - tags: *ref_31 + tags: *ref_32 x-speakeasy-group: hris.payrollruns /hris/timeoffs: get: @@ -2937,7 +3034,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedHrisTimeoffOutput' - tags: &ref_32 + tags: &ref_33 - hris/timeoffs x-speakeasy-group: hris.timeoffs post: @@ -2970,7 +3067,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedHrisTimeoffOutput' - tags: *ref_32 + tags: *ref_33 x-speakeasy-group: hris.timeoffs /hris/timeoffs/{id}: get: @@ -3005,7 +3102,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedHrisTimeoffOutput' - tags: *ref_32 + tags: *ref_33 x-speakeasy-group: hris.timeoffs /hris/timeoffbalances: get: @@ -3049,7 +3146,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedHrisTimeoffbalanceOutput' - tags: &ref_33 + tags: &ref_34 - hris/timeoffbalances x-speakeasy-group: hris.timeoffbalances /hris/timeoffbalances/{id}: @@ -3085,7 +3182,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedHrisTimeoffbalanceOutput' - tags: *ref_33 + tags: *ref_34 x-speakeasy-group: hris.timeoffbalances /marketingautomation/actions: get: @@ -3130,7 +3227,7 @@ paths: items: $ref: >- #/components/schemas/UnifiedMarketingautomationActionOutput - tags: &ref_34 + tags: &ref_35 - marketingautomation/actions x-speakeasy-group: marketingautomation.actions post: @@ -3166,7 +3263,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedMarketingautomationActionOutput' - tags: *ref_34 + tags: *ref_35 x-speakeasy-group: marketingautomation.actions /marketingautomation/actions/{id}: get: @@ -3203,7 +3300,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedMarketingautomationActionOutput' - tags: *ref_34 + tags: *ref_35 x-speakeasy-group: marketingautomation.actions /marketingautomation/automations: get: @@ -3248,7 +3345,7 @@ paths: items: $ref: >- #/components/schemas/UnifiedMarketingautomationAutomationOutput - tags: &ref_35 + tags: &ref_36 - marketingautomation/automations x-speakeasy-group: marketingautomation.automations post: @@ -3285,7 +3382,7 @@ paths: schema: $ref: >- #/components/schemas/UnifiedMarketingautomationAutomationOutput - tags: *ref_35 + tags: *ref_36 x-speakeasy-group: marketingautomation.automations /marketingautomation/automations/{id}: get: @@ -3323,7 +3420,7 @@ paths: schema: $ref: >- #/components/schemas/UnifiedMarketingautomationAutomationOutput - tags: *ref_35 + tags: *ref_36 x-speakeasy-group: marketingautomation.automations /marketingautomation/campaigns: get: @@ -3368,7 +3465,7 @@ paths: items: $ref: >- #/components/schemas/UnifiedMarketingautomationCampaignOutput - tags: &ref_36 + tags: &ref_37 - marketingautomation/campaigns x-speakeasy-group: marketingautomation.campaigns post: @@ -3404,7 +3501,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedMarketingautomationCampaignOutput' - tags: *ref_36 + tags: *ref_37 x-speakeasy-group: marketingautomation.campaigns /marketingautomation/campaigns/{id}: get: @@ -3441,7 +3538,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedMarketingautomationCampaignOutput' - tags: *ref_36 + tags: *ref_37 x-speakeasy-group: marketingautomation.campaigns /marketingautomation/contacts: get: @@ -3486,7 +3583,7 @@ paths: items: $ref: >- #/components/schemas/UnifiedMarketingautomationContactOutput - tags: &ref_37 + tags: &ref_38 - marketingautomation/contacts x-speakeasy-group: marketingautomation.contacts post: @@ -3522,7 +3619,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedMarketingautomationContactOutput' - tags: *ref_37 + tags: *ref_38 x-speakeasy-group: marketingautomation.contacts /marketingautomation/contacts/{id}: get: @@ -3559,7 +3656,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedMarketingautomationContactOutput' - tags: *ref_37 + tags: *ref_38 x-speakeasy-group: marketingautomation.contacts /marketingautomation/emails: get: @@ -3604,7 +3701,7 @@ paths: items: $ref: >- #/components/schemas/UnifiedMarketingautomationEmailOutput - tags: &ref_38 + tags: &ref_39 - marketingautomation/emails x-speakeasy-group: marketingautomation.emails /marketingautomation/emails/{id}: @@ -3642,7 +3739,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedMarketingautomationEmailOutput' - tags: *ref_38 + tags: *ref_39 x-speakeasy-group: marketingautomation.emails /marketingautomation/events: get: @@ -3687,7 +3784,7 @@ paths: items: $ref: >- #/components/schemas/UnifiedMarketingautomationEventOutput - tags: &ref_39 + tags: &ref_40 - marketingautomation/events x-speakeasy-group: marketingautomation.events /marketingautomation/events/{id}: @@ -3725,7 +3822,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedMarketingautomationEventOutput' - tags: *ref_39 + tags: *ref_40 x-speakeasy-group: marketingautomation.events /marketingautomation/lists: get: @@ -3770,7 +3867,7 @@ paths: items: $ref: >- #/components/schemas/UnifiedMarketingautomationListOutput - tags: &ref_40 + tags: &ref_41 - marketingautomation/lists x-speakeasy-group: marketingautomation.lists post: @@ -3805,7 +3902,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedMarketingautomationListOutput' - tags: *ref_40 + tags: *ref_41 x-speakeasy-group: marketingautomation.lists /marketingautomation/lists/{id}: get: @@ -3842,7 +3939,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedMarketingautomationListOutput' - tags: *ref_40 + tags: *ref_41 x-speakeasy-group: marketingautomation.lists /marketingautomation/messages: get: @@ -3887,7 +3984,7 @@ paths: items: $ref: >- #/components/schemas/UnifiedMarketingautomationMessageOutput - tags: &ref_41 + tags: &ref_42 - marketingautomation/messages x-speakeasy-group: marketingautomation.messages /marketingautomation/messages/{id}: @@ -3925,7 +4022,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedMarketingautomationMessageOutput' - tags: *ref_41 + tags: *ref_42 x-speakeasy-group: marketingautomation.messages /marketingautomation/templates: get: @@ -3970,7 +4067,7 @@ paths: items: $ref: >- #/components/schemas/UnifiedMarketingautomationTemplateOutput - tags: &ref_42 + tags: &ref_43 - marketingautomation/templates x-speakeasy-group: marketingautomation.templates post: @@ -4005,7 +4102,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedMarketingautomationTemplateOutput' - tags: *ref_42 + tags: *ref_43 x-speakeasy-group: marketingautomation.templates /marketingautomation/templates/{id}: get: @@ -4042,7 +4139,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedMarketingautomationTemplateOutput' - tags: *ref_42 + tags: *ref_43 x-speakeasy-group: marketingautomation.templates /marketingautomation/users: get: @@ -4087,7 +4184,7 @@ paths: items: $ref: >- #/components/schemas/UnifiedMarketingautomationUserOutput - tags: &ref_43 + tags: &ref_44 - marketingautomation/users x-speakeasy-group: marketingautomation.users /marketingautomation/users/{id}: @@ -4125,7 +4222,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedMarketingautomationUserOutput' - tags: *ref_43 + tags: *ref_44 x-speakeasy-group: marketingautomation.users /ats/activities: get: @@ -4169,7 +4266,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedAtsActivityOutput' - tags: &ref_44 + tags: &ref_45 - ats/activities x-speakeasy-group: ats.activities post: @@ -4203,7 +4300,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAtsActivityOutput' - tags: *ref_44 + tags: *ref_45 x-speakeasy-group: ats.activities /ats/activities/{id}: get: @@ -4238,7 +4335,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAtsActivityOutput' - tags: *ref_44 + tags: *ref_45 x-speakeasy-group: ats.activities /ats/applications: get: @@ -4282,7 +4379,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedAtsApplicationOutput' - tags: &ref_45 + tags: &ref_46 - ats/applications x-speakeasy-group: ats.applications post: @@ -4316,7 +4413,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAtsApplicationOutput' - tags: *ref_45 + tags: *ref_46 x-speakeasy-group: ats.applications /ats/applications/{id}: get: @@ -4351,7 +4448,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAtsApplicationOutput' - tags: *ref_45 + tags: *ref_46 x-speakeasy-group: ats.applications /ats/attachments: get: @@ -4395,7 +4492,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedAtsAttachmentOutput' - tags: &ref_46 + tags: &ref_47 - ats/attachments x-speakeasy-group: ats.attachments post: @@ -4429,7 +4526,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAtsAttachmentOutput' - tags: *ref_46 + tags: *ref_47 x-speakeasy-group: ats.attachments /ats/attachments/{id}: get: @@ -4464,7 +4561,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAtsAttachmentOutput' - tags: *ref_46 + tags: *ref_47 x-speakeasy-group: ats.attachments /ats/candidates: get: @@ -4508,7 +4605,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedAtsCandidateOutput' - tags: &ref_47 + tags: &ref_48 - ats/candidates x-speakeasy-group: ats.candidates post: @@ -4542,7 +4639,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAtsCandidateOutput' - tags: *ref_47 + tags: *ref_48 x-speakeasy-group: ats.candidates /ats/candidates/{id}: get: @@ -4577,7 +4674,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAtsCandidateOutput' - tags: *ref_47 + tags: *ref_48 x-speakeasy-group: ats.candidates /ats/departments: get: @@ -4621,7 +4718,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedAtsDepartmentOutput' - tags: &ref_48 + tags: &ref_49 - ats/departments x-speakeasy-group: ats.departments /ats/departments/{id}: @@ -4657,7 +4754,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAtsDepartmentOutput' - tags: *ref_48 + tags: *ref_49 x-speakeasy-group: ats.departments /ats/interviews: get: @@ -4701,7 +4798,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedAtsInterviewOutput' - tags: &ref_49 + tags: &ref_50 - ats/interviews x-speakeasy-group: ats.interviews post: @@ -4735,7 +4832,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAtsInterviewOutput' - tags: *ref_49 + tags: *ref_50 x-speakeasy-group: ats.interviews /ats/interviews/{id}: get: @@ -4770,7 +4867,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAtsInterviewOutput' - tags: *ref_49 + tags: *ref_50 x-speakeasy-group: ats.interviews /ats/jobinterviewstages: get: @@ -4815,7 +4912,7 @@ paths: items: $ref: >- #/components/schemas/UnifiedAtsJobinterviewstageOutput - tags: &ref_50 + tags: &ref_51 - ats/jobinterviewstages x-speakeasy-group: ats.jobinterviewstages /ats/jobinterviewstages/{id}: @@ -4851,7 +4948,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAtsJobinterviewstageOutput' - tags: *ref_50 + tags: *ref_51 x-speakeasy-group: ats.jobinterviewstages /ats/jobs: get: @@ -4895,7 +4992,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedAtsJobOutput' - tags: &ref_51 + tags: &ref_52 - ats/jobs x-speakeasy-group: ats.jobs /ats/jobs/{id}: @@ -4931,7 +5028,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAtsJobOutput' - tags: *ref_51 + tags: *ref_52 x-speakeasy-group: ats.jobs /ats/offers: get: @@ -4975,7 +5072,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedAtsOfferOutput' - tags: &ref_52 + tags: &ref_53 - ats/offers x-speakeasy-group: ats.offers /ats/offers/{id}: @@ -5011,7 +5108,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAtsOfferOutput' - tags: *ref_52 + tags: *ref_53 x-speakeasy-group: ats.offers /ats/offices: get: @@ -5055,7 +5152,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedAtsOfficeOutput' - tags: &ref_53 + tags: &ref_54 - ats/offices x-speakeasy-group: ats.offices /ats/offices/{id}: @@ -5091,7 +5188,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAtsOfficeOutput' - tags: *ref_53 + tags: *ref_54 x-speakeasy-group: ats.offices /ats/rejectreasons: get: @@ -5135,7 +5232,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedAtsRejectreasonOutput' - tags: &ref_54 + tags: &ref_55 - ats/rejectreasons x-speakeasy-group: ats.rejectreasons /ats/rejectreasons/{id}: @@ -5171,7 +5268,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAtsRejectreasonOutput' - tags: *ref_54 + tags: *ref_55 x-speakeasy-group: ats.rejectreasons /ats/scorecards: get: @@ -5215,7 +5312,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedAtsScorecardOutput' - tags: &ref_55 + tags: &ref_56 - ats/scorecards x-speakeasy-group: ats.scorecards /ats/scorecards/{id}: @@ -5251,7 +5348,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAtsScorecardOutput' - tags: *ref_55 + tags: *ref_56 x-speakeasy-group: ats.scorecards /ats/tags: get: @@ -5295,7 +5392,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedAtsTagOutput' - tags: &ref_56 + tags: &ref_57 - ats/tags x-speakeasy-group: ats.tags /ats/tags/{id}: @@ -5331,7 +5428,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAtsTagOutput' - tags: *ref_56 + tags: *ref_57 x-speakeasy-group: ats.tags /ats/users: get: @@ -5375,7 +5472,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedAtsUserOutput' - tags: &ref_57 + tags: &ref_58 - ats/users x-speakeasy-group: ats.users /ats/users/{id}: @@ -5411,7 +5508,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAtsUserOutput' - tags: *ref_57 + tags: *ref_58 x-speakeasy-group: ats.users /ats/eeocs: get: @@ -5455,7 +5552,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedAtsEeocsOutput' - tags: &ref_58 + tags: &ref_59 - ats/eeocs x-speakeasy-group: ats.eeocs /ats/eeocs/{id}: @@ -5489,7 +5586,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAtsEeocsOutput' - tags: *ref_58 + tags: *ref_59 x-speakeasy-group: ats.eeocs /accounting/accounts: get: @@ -5533,7 +5630,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedAccountingAccountOutput' - tags: &ref_59 + tags: &ref_60 - accounting/accounts x-speakeasy-group: accounting.accounts post: @@ -5567,7 +5664,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAccountingAccountOutput' - tags: *ref_59 + tags: *ref_60 x-speakeasy-group: accounting.accounts /accounting/accounts/{id}: get: @@ -5602,7 +5699,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAccountingAccountOutput' - tags: *ref_59 + tags: *ref_60 x-speakeasy-group: accounting.accounts /accounting/addresses: get: @@ -5646,7 +5743,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedAccountingAddressOutput' - tags: &ref_60 + tags: &ref_61 - accounting/addresses x-speakeasy-group: accounting.addresses /accounting/addresses/{id}: @@ -5682,7 +5779,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAccountingAddressOutput' - tags: *ref_60 + tags: *ref_61 x-speakeasy-group: accounting.addresses /accounting/attachments: get: @@ -5727,7 +5824,7 @@ paths: items: $ref: >- #/components/schemas/UnifiedAccountingAttachmentOutput - tags: &ref_61 + tags: &ref_62 - accounting/attachments x-speakeasy-group: accounting.attachments post: @@ -5761,7 +5858,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAccountingAttachmentOutput' - tags: *ref_61 + tags: *ref_62 x-speakeasy-group: accounting.attachments /accounting/attachments/{id}: get: @@ -5796,7 +5893,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAccountingAttachmentOutput' - tags: *ref_61 + tags: *ref_62 x-speakeasy-group: accounting.attachments /accounting/balancesheets: get: @@ -5841,7 +5938,7 @@ paths: items: $ref: >- #/components/schemas/UnifiedAccountingBalancesheetOutput - tags: &ref_62 + tags: &ref_63 - accounting/balancesheets x-speakeasy-group: accounting.balancesheets /accounting/balancesheets/{id}: @@ -5877,7 +5974,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAccountingBalancesheetOutput' - tags: *ref_62 + tags: *ref_63 x-speakeasy-group: accounting.balancesheets /accounting/cashflowstatements: get: @@ -5922,7 +6019,7 @@ paths: items: $ref: >- #/components/schemas/UnifiedAccountingCashflowstatementOutput - tags: &ref_63 + tags: &ref_64 - accounting/cashflowstatements x-speakeasy-group: accounting.cashflowstatements /accounting/cashflowstatements/{id}: @@ -5958,7 +6055,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAccountingCashflowstatementOutput' - tags: *ref_63 + tags: *ref_64 x-speakeasy-group: accounting.cashflowstatements /accounting/companyinfos: get: @@ -6003,7 +6100,7 @@ paths: items: $ref: >- #/components/schemas/UnifiedAccountingCompanyinfoOutput - tags: &ref_64 + tags: &ref_65 - accounting/companyinfos x-speakeasy-group: accounting.companyinfos /accounting/companyinfos/{id}: @@ -6039,7 +6136,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAccountingCompanyinfoOutput' - tags: *ref_64 + tags: *ref_65 x-speakeasy-group: accounting.companyinfos /accounting/contacts: get: @@ -6083,7 +6180,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedAccountingContactOutput' - tags: &ref_65 + tags: &ref_66 - accounting/contacts x-speakeasy-group: accounting.contacts post: @@ -6117,7 +6214,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAccountingContactOutput' - tags: *ref_65 + tags: *ref_66 x-speakeasy-group: accounting.contacts /accounting/contacts/{id}: get: @@ -6152,7 +6249,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAccountingContactOutput' - tags: *ref_65 + tags: *ref_66 x-speakeasy-group: accounting.contacts /accounting/creditnotes: get: @@ -6197,7 +6294,7 @@ paths: items: $ref: >- #/components/schemas/UnifiedAccountingCreditnoteOutput - tags: &ref_66 + tags: &ref_67 - accounting/creditnotes x-speakeasy-group: accounting.creditnotes /accounting/creditnotes/{id}: @@ -6233,7 +6330,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAccountingCreditnoteOutput' - tags: *ref_66 + tags: *ref_67 x-speakeasy-group: accounting.creditnotes /accounting/expenses: get: @@ -6277,7 +6374,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedAccountingExpenseOutput' - tags: &ref_67 + tags: &ref_68 - accounting/expenses x-speakeasy-group: accounting.expenses post: @@ -6311,7 +6408,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAccountingExpenseOutput' - tags: *ref_67 + tags: *ref_68 x-speakeasy-group: accounting.expenses /accounting/expenses/{id}: get: @@ -6346,7 +6443,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAccountingExpenseOutput' - tags: *ref_67 + tags: *ref_68 x-speakeasy-group: accounting.expenses /accounting/incomestatements: get: @@ -6391,7 +6488,7 @@ paths: items: $ref: >- #/components/schemas/UnifiedAccountingIncomestatementOutput - tags: &ref_68 + tags: &ref_69 - accounting/incomestatements x-speakeasy-group: accounting.incomestatements /accounting/incomestatements/{id}: @@ -6427,7 +6524,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAccountingIncomestatementOutput' - tags: *ref_68 + tags: *ref_69 x-speakeasy-group: accounting.incomestatements /accounting/invoices: get: @@ -6471,7 +6568,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedAccountingInvoiceOutput' - tags: &ref_69 + tags: &ref_70 - accounting/invoices x-speakeasy-group: accounting.invoices post: @@ -6505,7 +6602,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAccountingInvoiceOutput' - tags: *ref_69 + tags: *ref_70 x-speakeasy-group: accounting.invoices /accounting/invoices/{id}: get: @@ -6540,7 +6637,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAccountingInvoiceOutput' - tags: *ref_69 + tags: *ref_70 x-speakeasy-group: accounting.invoices /accounting/items: get: @@ -6584,7 +6681,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedAccountingItemOutput' - tags: &ref_70 + tags: &ref_71 - accounting/items x-speakeasy-group: accounting.items /accounting/items/{id}: @@ -6620,7 +6717,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAccountingItemOutput' - tags: *ref_70 + tags: *ref_71 x-speakeasy-group: accounting.items /accounting/journalentries: get: @@ -6665,7 +6762,7 @@ paths: items: $ref: >- #/components/schemas/UnifiedAccountingJournalentryOutput - tags: &ref_71 + tags: &ref_72 - accounting/journalentries x-speakeasy-group: accounting.journalentries post: @@ -6699,7 +6796,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAccountingJournalentryOutput' - tags: *ref_71 + tags: *ref_72 x-speakeasy-group: accounting.journalentries /accounting/journalentries/{id}: get: @@ -6734,7 +6831,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAccountingJournalentryOutput' - tags: *ref_71 + tags: *ref_72 x-speakeasy-group: accounting.journalentries /accounting/payments: get: @@ -6778,7 +6875,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedAccountingPaymentOutput' - tags: &ref_72 + tags: &ref_73 - accounting/payments x-speakeasy-group: accounting.payments post: @@ -6812,7 +6909,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAccountingPaymentOutput' - tags: *ref_72 + tags: *ref_73 x-speakeasy-group: accounting.payments /accounting/payments/{id}: get: @@ -6847,7 +6944,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAccountingPaymentOutput' - tags: *ref_72 + tags: *ref_73 x-speakeasy-group: accounting.payments /accounting/phonenumbers: get: @@ -6892,7 +6989,7 @@ paths: items: $ref: >- #/components/schemas/UnifiedAccountingPhonenumberOutput - tags: &ref_73 + tags: &ref_74 - accounting/phonenumbers x-speakeasy-group: accounting.phonenumbers /accounting/phonenumbers/{id}: @@ -6928,7 +7025,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAccountingPhonenumberOutput' - tags: *ref_73 + tags: *ref_74 x-speakeasy-group: accounting.phonenumbers /accounting/purchaseorders: get: @@ -6973,7 +7070,7 @@ paths: items: $ref: >- #/components/schemas/UnifiedAccountingPurchaseorderOutput - tags: &ref_74 + tags: &ref_75 - accounting/purchaseorders x-speakeasy-group: accounting.purchaseorders post: @@ -7007,7 +7104,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAccountingPurchaseorderOutput' - tags: *ref_74 + tags: *ref_75 x-speakeasy-group: accounting.purchaseorders /accounting/purchaseorders/{id}: get: @@ -7042,7 +7139,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAccountingPurchaseorderOutput' - tags: *ref_74 + tags: *ref_75 x-speakeasy-group: accounting.purchaseorders /accounting/taxrates: get: @@ -7086,7 +7183,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedAccountingTaxrateOutput' - tags: &ref_75 + tags: &ref_76 - accounting/taxrates x-speakeasy-group: accounting.taxrates /accounting/taxrates/{id}: @@ -7122,7 +7219,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAccountingTaxrateOutput' - tags: *ref_75 + tags: *ref_76 x-speakeasy-group: accounting.taxrates /accounting/trackingcategories: get: @@ -7167,7 +7264,7 @@ paths: items: $ref: >- #/components/schemas/UnifiedAccountingTrackingcategoryOutput - tags: &ref_76 + tags: &ref_77 - accounting/trackingcategories x-speakeasy-group: accounting.trackingcategories /accounting/trackingcategories/{id}: @@ -7203,7 +7300,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAccountingTrackingcategoryOutput' - tags: *ref_76 + tags: *ref_77 x-speakeasy-group: accounting.trackingcategories /accounting/transactions: get: @@ -7248,7 +7345,7 @@ paths: items: $ref: >- #/components/schemas/UnifiedAccountingTransactionOutput - tags: &ref_77 + tags: &ref_78 - accounting/transactions x-speakeasy-group: accounting.transactions /accounting/transactions/{id}: @@ -7284,7 +7381,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAccountingTransactionOutput' - tags: *ref_77 + tags: *ref_78 x-speakeasy-group: accounting.transactions /accounting/vendorcredits: get: @@ -7329,7 +7426,7 @@ paths: items: $ref: >- #/components/schemas/UnifiedAccountingVendorcreditOutput - tags: &ref_78 + tags: &ref_79 - accounting/vendorcredits x-speakeasy-group: accounting.vendorcredits /accounting/vendorcredits/{id}: @@ -7365,7 +7462,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedAccountingVendorcreditOutput' - tags: *ref_78 + tags: *ref_79 x-speakeasy-group: accounting.vendorcredits /filestorage/drives: get: @@ -7409,7 +7506,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedFilestorageDriveOutput' - tags: &ref_79 + tags: &ref_80 - filestorage/drives x-speakeasy-group: filestorage.drives /filestorage/drives/{id}: @@ -7445,7 +7542,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedFilestorageDriveOutput' - tags: *ref_79 + tags: *ref_80 x-speakeasy-group: filestorage.drives /filestorage/files: get: @@ -7489,7 +7586,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedFilestorageFileOutput' - tags: &ref_80 + tags: &ref_81 - filestorage/files x-speakeasy-group: filestorage.files post: @@ -7521,7 +7618,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedFilestorageFileOutput' - tags: *ref_80 + tags: *ref_81 x-speakeasy-group: filestorage.files /filestorage/files/{id}: get: @@ -7556,7 +7653,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedFilestorageFileOutput' - tags: *ref_80 + tags: *ref_81 x-speakeasy-group: filestorage.files /filestorage/folders: get: @@ -7600,7 +7697,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedFilestorageFolderOutput' - tags: &ref_81 + tags: &ref_82 - filestorage/folders x-speakeasy-group: filestorage.folders post: @@ -7632,7 +7729,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedFilestorageFolderOutput' - tags: *ref_81 + tags: *ref_82 x-speakeasy-group: filestorage.folders /filestorage/folders/{id}: get: @@ -7667,7 +7764,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedFilestorageFolderOutput' - tags: *ref_81 + tags: *ref_82 x-speakeasy-group: filestorage.folders /filestorage/groups: get: @@ -7711,7 +7808,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedFilestorageGroupOutput' - tags: &ref_82 + tags: &ref_83 - filestorage/groups x-speakeasy-group: filestorage.groups /filestorage/groups/{id}: @@ -7747,7 +7844,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedFilestorageGroupOutput' - tags: *ref_82 + tags: *ref_83 x-speakeasy-group: filestorage.groups /filestorage/users: get: @@ -7791,7 +7888,7 @@ paths: type: array items: $ref: '#/components/schemas/UnifiedFilestorageUserOutput' - tags: &ref_83 + tags: &ref_84 - filestorage/users x-speakeasy-group: filestorage.users /filestorage/users/{id}: @@ -7827,7 +7924,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedFilestorageUserOutput' - tags: *ref_83 + tags: *ref_84 x-speakeasy-group: filestorage.users /ticketing/attachments: get: @@ -7872,7 +7969,7 @@ paths: items: $ref: >- #/components/schemas/UnifiedTicketingAttachmentOutput - tags: &ref_84 + tags: &ref_85 - ticketing/attachments x-speakeasy-group: ticketing.attachments post: @@ -7905,7 +8002,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedTicketingAttachmentOutput' - tags: *ref_84 + tags: *ref_85 x-speakeasy-group: ticketing.attachments /ticketing/attachments/{id}: get: @@ -7940,7 +8037,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UnifiedTicketingAttachmentOutput' - tags: *ref_84 + tags: *ref_85 x-speakeasy-group: ticketing.attachments info: title: Panora API @@ -7962,6 +8059,94 @@ components: in: header name: x-api-key schemas: + LoginDto: + type: object + properties: + id_user: + type: string + email: + type: string + password_hash: + type: string + required: + - id_user + - email + - password_hash + Connection: + type: object + properties: + id_connection: + type: string + example: 123e4567-e89b-12d3-a456-426614174000 + description: Unique identifier for the connection + status: + type: string + example: active + description: Status of the connection + provider_slug: + type: string + example: hubspot + description: Slug for the provider + vertical: + type: string + example: crm + description: Vertical category of the connection + account_url: + type: string + example: https://example.com/account + description: URL of the account + token_type: + type: string + example: oauth2 + enum: + - oauth2 + - apikey + - basic + description: Strategy type + access_token: + type: string + example: access_token_example + description: Access token for the connection + refresh_token: + type: string + example: refresh_token_example + description: Refresh token for the connection + expiration_timestamp: + format: date-time + type: string + example: '2024-10-01T12:00:00Z' + description: Expiration timestamp of the access token + created_at: + format: date-time + type: string + example: '2024-10-01T12:00:00Z' + description: Timestamp when the connection was created + connection_token: + type: string + example: 123e4567-e89b-12d3-a456-426614174000 + description: UUID Token for the connection + id_project: + type: string + example: 123e4567-e89b-12d3-a456-426614174001 + description: Project ID associated with the connection + id_linked_user: + type: string + example: 123e4567-e89b-12d3-a456-426614174002 + description: Linked user ID associated with the connection + required: + - id_connection + - status + - provider_slug + - vertical + - account_url + - token_type + - access_token + - refresh_token + - expiration_timestamp + - created_at + - connection_token + - id_project + - id_linked_user WebhookResponse: type: object properties: @@ -7982,6 +8167,7 @@ components: description: The endpoint url of the webhook. secret: type: string + example: 801f9ede-c698-4e66-a7fc-48d19eebaa4f description: The secret of the webhook. active: type: boolean @@ -8107,7 +8293,7 @@ components: type: string nullable: true example: USER - enum: &ref_111 + enum: &ref_112 - USER - CONTACT description: >- @@ -8134,7 +8320,7 @@ components: specified) attachments: nullable: true - example: &ref_112 + example: &ref_113 - 801f9ede-c698-4e66-a7fc-48d19eebaa4f description: The attachements UUIDs tied to the comment type: array @@ -8153,7 +8339,7 @@ components: status: type: string example: OPEN - enum: &ref_85 + enum: &ref_86 - OPEN - CLOSED nullable: true @@ -8172,7 +8358,7 @@ components: type: type: string example: BUG - enum: &ref_86 + enum: &ref_87 - BUG - SUBTASK - TASK @@ -8188,12 +8374,12 @@ components: description: The UUID of the parent ticket collections: type: string - example: &ref_87 + example: &ref_88 - 801f9ede-c698-4e66-a7fc-48d19eebaa4f nullable: true description: The collection UUIDs the ticket belongs to tags: - example: &ref_88 + example: &ref_89 - my_tag - urgent_tag nullable: true @@ -8210,7 +8396,7 @@ components: priority: type: string example: HIGH - enum: &ref_89 + enum: &ref_90 - HIGH - MEDIUM - LOW @@ -8219,7 +8405,7 @@ components: The priority of the ticket. Authorized values are HIGH, MEDIUM or LOW. assigned_to: - example: &ref_90 + example: &ref_91 - 801f9ede-c698-4e66-a7fc-48d19eebaa4f nullable: true description: The users UUIDs the ticket is assigned to @@ -8227,7 +8413,7 @@ components: items: type: string comment: - example: &ref_91 + example: &ref_92 content: Assigned the issue ! nullable: true description: The comment of the ticket @@ -8244,7 +8430,7 @@ components: nullable: true description: The UUID of the contact which the ticket belongs to attachments: - example: &ref_92 + example: &ref_93 - 801f9ede-c698-4e66-a7fc-48d19eebaa4f description: The attachements UUIDs tied to the ticket nullable: true @@ -8253,7 +8439,7 @@ components: type: string field_mappings: type: object - example: &ref_93 + example: &ref_94 fav_dish: broccoli fav_color: red nullable: true @@ -8306,7 +8492,7 @@ components: status: type: string example: OPEN - enum: *ref_85 + enum: *ref_86 nullable: true description: The status of the ticket. Authorized values are OPEN or CLOSED. description: @@ -8323,7 +8509,7 @@ components: type: type: string example: BUG - enum: *ref_86 + enum: *ref_87 nullable: true description: >- The type of the ticket. Authorized values are PROBLEM, QUESTION, or @@ -8335,11 +8521,11 @@ components: description: The UUID of the parent ticket collections: type: string - example: *ref_87 + example: *ref_88 nullable: true description: The collection UUIDs the ticket belongs to tags: - example: *ref_88 + example: *ref_89 nullable: true description: The tags names of the ticket type: array @@ -8354,20 +8540,20 @@ components: priority: type: string example: HIGH - enum: *ref_89 + enum: *ref_90 nullable: true description: >- The priority of the ticket. Authorized values are HIGH, MEDIUM or LOW. assigned_to: - example: *ref_90 + example: *ref_91 nullable: true description: The users UUIDs the ticket is assigned to type: array items: type: string comment: - example: *ref_91 + example: *ref_92 nullable: true description: The comment of the ticket allOf: @@ -8383,7 +8569,7 @@ components: nullable: true description: The UUID of the contact which the ticket belongs to attachments: - example: *ref_92 + example: *ref_93 description: The attachements UUIDs tied to the ticket nullable: true type: array @@ -8391,7 +8577,7 @@ components: type: string field_mappings: type: object - example: *ref_93 + example: *ref_94 nullable: true description: >- The custom field mappings of the ticket between the remote 3rd party @@ -8601,15 +8787,31 @@ components: timestamp: format: date-time type: string + example: '' nullable: true vertical: type: string + example: ticketing + enum: + - ticketing + - ats + - accounting + - hris + - crm + - filestorage + - ecommerce + - marketingautomation nullable: true provider: type: string + example: gitlab nullable: true status: type: string + example: success + enum: + - success + - fail nullable: true required: - timestamp @@ -8723,7 +8925,7 @@ components: industry: type: string example: ACCOUNTING - enum: &ref_94 + enum: &ref_95 - ACCOUNTING - AIRLINES_AVIATION - ALTERNATIVE_DISPUTE_RESOLUTION @@ -8887,7 +9089,7 @@ components: nullable: true email_addresses: description: The email addresses of the company - example: &ref_95 + example: &ref_96 - email_address: acme@gmail.com email_address_type: WORK nullable: true @@ -8896,7 +9098,7 @@ components: $ref: '#/components/schemas/Email' addresses: description: The addresses of the company - example: &ref_96 + example: &ref_97 - street_1: 5th Avenue city: New York state: NY @@ -8908,7 +9110,7 @@ components: $ref: '#/components/schemas/Address' phone_numbers: description: The phone numbers of the company - example: &ref_97 + example: &ref_98 - phone_number: '+33660606067' phone_type: WORK nullable: true @@ -8917,7 +9119,7 @@ components: $ref: '#/components/schemas/Phone' field_mappings: type: object - example: &ref_98 + example: &ref_99 fav_dish: broccoli fav_color: red description: >- @@ -8966,7 +9168,7 @@ components: industry: type: string example: ACCOUNTING - enum: *ref_94 + enum: *ref_95 description: >- The industry of the company. Authorized values can be found in the Industry enum. @@ -8983,28 +9185,28 @@ components: nullable: true email_addresses: description: The email addresses of the company - example: *ref_95 + example: *ref_96 nullable: true type: array items: $ref: '#/components/schemas/Email' addresses: description: The addresses of the company - example: *ref_96 + example: *ref_97 nullable: true type: array items: $ref: '#/components/schemas/Address' phone_numbers: description: The phone numbers of the company - example: *ref_97 + example: *ref_98 nullable: true type: array items: $ref: '#/components/schemas/Phone' field_mappings: type: object - example: *ref_98 + example: *ref_99 description: >- The custom field mappings of the company between the remote 3rd party & Panora @@ -9028,7 +9230,7 @@ components: email_addresses: nullable: true description: The email addresses of the contact - example: &ref_99 + example: &ref_100 - email: john.doe@example.com type: WORK type: array @@ -9037,7 +9239,7 @@ components: phone_numbers: nullable: true description: The phone numbers of the contact - example: &ref_100 + example: &ref_101 - phone: '1234567890' type: WORK type: array @@ -9046,7 +9248,7 @@ components: addresses: nullable: true description: The addresses of the contact - example: &ref_101 + example: &ref_102 - street: 123 Main St city: Anytown state: CA @@ -9063,7 +9265,7 @@ components: example: 801f9ede-c698-4e66-a7fc-48d19eebaa4f field_mappings: type: object - example: &ref_102 + example: &ref_103 fav_dish: broccoli fav_color: red nullable: true @@ -9120,21 +9322,21 @@ components: email_addresses: nullable: true description: The email addresses of the contact - example: *ref_99 + example: *ref_100 type: array items: $ref: '#/components/schemas/Email' phone_numbers: nullable: true description: The phone numbers of the contact - example: *ref_100 + example: *ref_101 type: array items: $ref: '#/components/schemas/Phone' addresses: nullable: true description: The addresses of the contact - example: *ref_101 + example: *ref_102 type: array items: $ref: '#/components/schemas/Address' @@ -9145,7 +9347,7 @@ components: example: 801f9ede-c698-4e66-a7fc-48d19eebaa4f field_mappings: type: object - example: *ref_102 + example: *ref_103 nullable: true description: >- The custom field mappings of the contact between the remote 3rd @@ -9190,7 +9392,7 @@ components: field_mappings: type: object nullable: true - example: &ref_103 + example: &ref_104 fav_dish: broccoli fav_color: red description: >- @@ -9267,7 +9469,7 @@ components: field_mappings: type: object nullable: true - example: *ref_103 + example: *ref_104 description: >- The custom field mappings of the company between the remote 3rd party & Panora @@ -9288,7 +9490,7 @@ components: type: string nullable: true example: INBOUND - enum: &ref_104 + enum: &ref_105 - INBOUND - OUTBOUND description: >- @@ -9315,7 +9517,7 @@ components: type: string nullable: true example: MEETING - enum: &ref_105 + enum: &ref_106 - EMAIL - CALL - MEETING @@ -9334,7 +9536,7 @@ components: description: The UUID of the company tied to the engagement contacts: nullable: true - example: &ref_106 + example: &ref_107 - 801f9ede-c698-4e66-a7fc-48d19eebaa4f description: The UUIDs of contacts tied to the engagement object type: array @@ -9343,7 +9545,7 @@ components: field_mappings: type: object nullable: true - example: &ref_107 + example: &ref_108 fav_dish: broccoli fav_color: red description: >- @@ -9396,7 +9598,7 @@ components: type: string nullable: true example: INBOUND - enum: *ref_104 + enum: *ref_105 description: >- The direction of the engagement. Authorized values are INBOUND or OUTBOUND @@ -9421,7 +9623,7 @@ components: type: string nullable: true example: MEETING - enum: *ref_105 + enum: *ref_106 description: >- The type of the engagement. Authorized values are EMAIL, CALL or MEETING @@ -9437,7 +9639,7 @@ components: description: The UUID of the company tied to the engagement contacts: nullable: true - example: *ref_106 + example: *ref_107 description: The UUIDs of contacts tied to the engagement object type: array items: @@ -9445,7 +9647,7 @@ components: field_mappings: type: object nullable: true - example: *ref_107 + example: *ref_108 description: >- The custom field mappings of the engagement between the remote 3rd party & Panora @@ -9482,7 +9684,7 @@ components: description: The UUID of the deal tied to the note field_mappings: type: object - example: &ref_108 + example: &ref_109 fav_dish: broccoli fav_color: red nullable: true @@ -9552,7 +9754,7 @@ components: description: The UUID of the deal tied to the note field_mappings: type: object - example: *ref_108 + example: *ref_109 nullable: true description: >- The custom field mappings of the note between the remote 3rd party & @@ -9624,7 +9826,7 @@ components: status: type: string example: PENDING - enum: &ref_109 + enum: &ref_110 - PENDING - COMPLETED description: The status of the task. Authorized values are PENDING, COMPLETED. @@ -9656,7 +9858,7 @@ components: nullable: true field_mappings: type: object - example: &ref_110 + example: &ref_111 fav_dish: broccoli fav_color: red description: >- @@ -9715,7 +9917,7 @@ components: status: type: string example: PENDING - enum: *ref_109 + enum: *ref_110 description: The status of the task. Authorized values are PENDING, COMPLETED. nullable: true due_date: @@ -9745,7 +9947,7 @@ components: nullable: true field_mappings: type: object - example: *ref_110 + example: *ref_111 description: >- The custom field mappings of the task between the remote 3rd party & Panora @@ -9888,7 +10090,7 @@ components: type: string nullable: true example: USER - enum: *ref_111 + enum: *ref_112 description: >- The creator type of the comment. Authorized values are either USER or CONTACT @@ -9913,7 +10115,7 @@ components: specified) attachments: nullable: true - example: *ref_112 + example: *ref_113 description: The attachements UUIDs tied to the comment type: array items: @@ -10113,6 +10315,63 @@ components: required: - linked_user_origin_ids - alias + ProjectResponse: + type: object + properties: + id_project: + type: string + example: 123e4567-e89b-12d3-a456-426614174000 + description: Unique identifier for the project + name: + type: string + example: My Project + description: Name of the project + sync_mode: + type: string + example: automatic + description: Synchronization mode of the project + pull_frequency: + type: number + example: 3600 + description: Frequency of pulling data in seconds + redirect_url: + type: string + example: https://example.com/redirect + description: Redirect URL for the project + id_user: + type: string + example: 123e4567-e89b-12d3-a456-426614174001 + description: User ID associated with the project + id_connector_set: + type: string + example: 123e4567-e89b-12d3-a456-426614174002 + description: Connector set ID associated with the project + required: + - id_project + - name + - sync_mode + - pull_frequency + - redirect_url + - id_user + - id_connector_set + CreateProjectDto: + type: object + properties: + name: + type: string + example: Project Name + description: The name of the project + id_organization: + type: string + example: 801f9ede-c698-4e66-a7fc-48d19eebaa4f + description: The organization ID + id_user: + type: string + example: 801f9ede-c698-4e66-a7fc-48d19eebaa4f + description: The user ID + required: + - name + - id_user CustomFieldResponse: type: object properties: @@ -10332,6 +10591,129 @@ components: - source_custom_field_id - source_provider - linked_user_id + EventResponse: + type: object + properties: + id_event: + type: string + example: 123e4567-e89b-12d3-a456-426614174000 + description: Unique identifier for the event + id_connection: + type: string + example: 123e4567-e89b-12d3-a456-426614174001 + description: Connection ID associated with the event + id_project: + type: string + example: 123e4567-e89b-12d3-a456-426614174002 + description: Project ID associated with the event + type: + type: string + example: connection.created + enum: + - crm.contact.created + - crm.contact.pulled + - crm.company.created + - crm.company.pulled + - crm.deal.created + - crm.deal.pulled + - crm.engagement.created + - crm.engagement.pulled + - crm.note.created + - crm.note.pulled + - crm.stage.pulled + - crm.task.pulled + - crm.task.created + - crm.user.pulled + - ticketing.ticket.created + - ticketing.ticket.pulled + - ticketing.comment.created + - ticketing.comment.pulled + - ticketing.attachment.created + - ticketing.attachment.pulled + - ticketing.collection.pulled + - ticketing.account.pulled + - ticketing.contact.pulled + - ticketing.tag.pulled + - ticketing.team.pulled + - ticketing.user.pulled + - ats.activity.created + - ats.activity.pulled + - ats.application.created + - ats.application.pulled + - ats.attachment.created + - ats.attachment.pulled + - ats.candidate.created + - ats.candidate.pulled + - ats.department.pulled + - ats.eecos.pulled + - ats.interview.created + - ats.interview.pulled + - ats.job.pulled + - ats.jobinterviewstage.pulled + - ats.offer.created + - ats.office.pulled + - ats.rejectreason.pulled + - ats.scorecard.pulled + - ats.tag.pulled + - ats.user.pulled + - filestorage.file.pulled + - filestorage.folder.pulled + - filestorage.group.pulled + - filestorage.user.pulled + - filestorage.drive.pulled + - filestorage.permission.pulled + - filestorage.sharedlink.pulled + - connection.created + description: Scope of the event + status: + type: string + example: success + enum: + - success + - fail + description: Status of the event + direction: + type: string + example: '0' + description: Direction of the event + method: + type: string + example: POST + enum: + - GET + - POST + - PUT + - DELETE + description: HTTP method used for the event + url: + type: string + example: /crm/companies + description: URL associated with the event + provider: + type: string + example: hubspot + description: Provider associated with the event + timestamp: + format: date-time + type: string + example: '2024-10-01T12:00:00Z' + description: Timestamp of the event + id_linked_user: + type: string + example: 123e4567-e89b-12d3-a456-426614174003 + description: Linked user ID associated with the event + required: + - id_event + - id_connection + - id_project + - type + - status + - direction + - method + - url + - provider + - timestamp + - id_linked_user PassThroughResponse: type: object properties: @@ -10481,7 +10863,7 @@ components: properties: activity_type: type: string - enum: &ref_113 + enum: &ref_114 - NOTE - EMAIL - OTHER @@ -10500,7 +10882,7 @@ components: description: The body of the activity visibility: type: string - enum: &ref_114 + enum: &ref_115 - ADMIN_ONLY - PUBLIC - PRIVATE @@ -10520,7 +10902,7 @@ components: description: The remote creation date of the activity field_mappings: type: object - example: &ref_115 + example: &ref_116 fav_dish: broccoli fav_color: red additionalProperties: true @@ -10563,7 +10945,7 @@ components: properties: activity_type: type: string - enum: *ref_113 + enum: *ref_114 example: NOTE nullable: true description: The type of activity @@ -10579,7 +10961,7 @@ components: description: The body of the activity visibility: type: string - enum: *ref_114 + enum: *ref_115 example: PUBLIC nullable: true description: The visibility of the activity @@ -10596,7 +10978,7 @@ components: description: The remote creation date of the activity field_mappings: type: object - example: *ref_115 + example: *ref_116 additionalProperties: true nullable: true description: >- @@ -10620,7 +11002,7 @@ components: offers: nullable: true description: The offers UUIDs for the application - example: &ref_116 + example: &ref_117 - 801f9ede-c698-4e66-a7fc-48d19eebaa4f - 12345678-1234-1234-1234-123456789012 type: array @@ -10657,7 +11039,7 @@ components: example: 801f9ede-c698-4e66-a7fc-48d19eebaa4f field_mappings: type: object - example: &ref_117 + example: &ref_118 fav_dish: broccoli fav_color: red additionalProperties: true @@ -10723,7 +11105,7 @@ components: offers: nullable: true description: The offers UUIDs for the application - example: *ref_116 + example: *ref_117 type: array items: type: string @@ -10758,7 +11140,7 @@ components: example: 801f9ede-c698-4e66-a7fc-48d19eebaa4f field_mappings: type: object - example: *ref_117 + example: *ref_118 additionalProperties: true nullable: true description: >- @@ -10780,7 +11162,7 @@ components: attachment_type: type: string example: RESUME - enum: &ref_118 + enum: &ref_119 - RESUME - COVER_LETTER - OFFER_LETTER @@ -10806,7 +11188,7 @@ components: description: The UUID of the candidate field_mappings: type: object - example: &ref_119 + example: &ref_120 fav_dish: broccoli fav_color: red additionalProperties: true @@ -10860,7 +11242,7 @@ components: attachment_type: type: string example: RESUME - enum: *ref_118 + enum: *ref_119 nullable: true description: The type of the file remote_created_at: @@ -10882,7 +11264,7 @@ components: description: The UUID of the candidate field_mappings: type: object - example: *ref_119 + example: *ref_120 additionalProperties: true nullable: true description: >- @@ -10959,7 +11341,7 @@ components: nullable: true description: The last interaction date with the candidate attachments: - example: &ref_120 + example: &ref_121 - 801f9ede-c698-4e66-a7fc-48d19eebaa4f nullable: true description: The attachments UUIDs of the candidate @@ -10967,7 +11349,7 @@ components: items: type: string applications: - example: &ref_121 + example: &ref_122 - 801f9ede-c698-4e66-a7fc-48d19eebaa4f nullable: true description: The applications UUIDs of the candidate @@ -10975,7 +11357,7 @@ components: items: type: string tags: - example: &ref_122 + example: &ref_123 - tag_1 - tag_2 nullable: true @@ -10984,7 +11366,7 @@ components: items: type: string urls: - example: &ref_123 + example: &ref_124 - url: mywebsite.com url_type: WEBSITE nullable: true @@ -10995,7 +11377,7 @@ components: items: $ref: '#/components/schemas/Url' phone_numbers: - example: &ref_124 + example: &ref_125 - phone_number: '+33660688899' phone_type: WORK nullable: true @@ -11004,7 +11386,7 @@ components: items: $ref: '#/components/schemas/Phone' email_addresses: - example: &ref_125 + example: &ref_126 - email_address: joedoe@gmail.com email_address_type: WORK nullable: true @@ -11014,7 +11396,7 @@ components: $ref: '#/components/schemas/Email' field_mappings: type: object - example: &ref_126 + example: &ref_127 fav_dish: broccoli fav_color: red additionalProperties: true @@ -11109,28 +11491,28 @@ components: nullable: true description: The last interaction date with the candidate attachments: - example: *ref_120 + example: *ref_121 nullable: true description: The attachments UUIDs of the candidate type: array items: type: string applications: - example: *ref_121 + example: *ref_122 nullable: true description: The applications UUIDs of the candidate type: array items: type: string tags: - example: *ref_122 + example: *ref_123 nullable: true description: The tags of the candidate type: array items: type: string urls: - example: *ref_123 + example: *ref_124 nullable: true description: >- The urls of the candidate, possible values for Url type are WEBSITE, @@ -11139,14 +11521,14 @@ components: items: $ref: '#/components/schemas/Url' phone_numbers: - example: *ref_124 + example: *ref_125 nullable: true description: The phone numbers of the candidate type: array items: $ref: '#/components/schemas/Phone' email_addresses: - example: *ref_125 + example: *ref_126 nullable: true description: The email addresses of the candidate type: array @@ -11154,7 +11536,7 @@ components: $ref: '#/components/schemas/Email' field_mappings: type: object - example: *ref_126 + example: *ref_127 additionalProperties: true nullable: true description: >- @@ -11214,7 +11596,7 @@ components: properties: status: type: string - enum: &ref_127 + enum: &ref_128 - SCHEDULED - AWAITING_FEEDBACK - COMPLETED @@ -11237,7 +11619,7 @@ components: nullable: true description: The UUID of the organizer interviewers: - example: &ref_128 + example: &ref_129 - 801f9ede-c698-4e66-a7fc-48d19eebaa4f nullable: true description: The UUIDs of the interviewers @@ -11275,7 +11657,7 @@ components: description: The remote modification date of the interview field_mappings: type: object - example: &ref_129 + example: &ref_130 fav_dish: broccoli fav_color: red additionalProperties: true @@ -11318,7 +11700,7 @@ components: properties: status: type: string - enum: *ref_127 + enum: *ref_128 example: SCHEDULED nullable: true description: The status of the interview @@ -11338,7 +11720,7 @@ components: nullable: true description: The UUID of the organizer interviewers: - example: *ref_128 + example: *ref_129 nullable: true description: The UUIDs of the interviewers type: array @@ -11375,7 +11757,7 @@ components: description: The remote modification date of the interview field_mappings: type: object - example: *ref_129 + example: *ref_130 additionalProperties: true nullable: true description: >- @@ -12259,7 +12641,7 @@ components: nullable: true field_mappings: type: object - example: &ref_130 + example: &ref_131 fav_dish: broccoli fav_color: red description: >- @@ -12345,7 +12727,7 @@ components: nullable: true field_mappings: type: object - example: *ref_130 + example: *ref_131 description: >- The custom field mappings of the object between the remote 3rd party & Panora @@ -12403,7 +12785,7 @@ components: description: The UUID of the permission tied to the folder field_mappings: type: object - example: &ref_131 + example: &ref_132 fav_dish: broccoli fav_color: red additionalProperties: true @@ -12494,7 +12876,7 @@ components: description: The UUID of the permission tied to the folder field_mappings: type: object - example: *ref_131 + example: *ref_132 additionalProperties: true nullable: true description: >- @@ -12668,7 +13050,7 @@ components: field_mappings: type: object nullable: true - example: &ref_132 + example: &ref_133 fav_dish: broccoli fav_color: red description: >- @@ -12740,7 +13122,7 @@ components: field_mappings: type: object nullable: true - example: *ref_132 + example: *ref_133 description: >- The custom field mappings of the attachment between the remote 3rd party & Panora diff --git a/packages/shared/src/webhookScopes.ts b/packages/shared/src/webhookScopes.ts index 0d34c3133..0376620e2 100644 --- a/packages/shared/src/webhookScopes.ts +++ b/packages/shared/src/webhookScopes.ts @@ -27,5 +27,99 @@ export const scopes = [ 'ticketing.team.pulled', 'ticketing.user.pulled', + 'ats.activity.created', + 'ats.activity.pulled', + 'ats.application.created', + 'ats.application.pulled', + 'ats.attachment.created', + 'ats.attachment.pulled', + 'ats.candidate.created', + 'ats.candidate.pulled', + 'ats.department.pulled', + 'ats.eecos.pulled', + 'ats.interview.created', + 'ats.interview.pulled', + 'ats.job.pulled', + 'ats.jobinterviewstage.pulled', + 'ats.offer.created', + 'ats.office.pulled', + 'ats.rejectreason.pulled', + 'ats.scorecard.pulled', + 'ats.tag.pulled', + 'ats.user.pulled', + + 'filestorage.file.created', + 'filestorage.file.pulled', + 'filestorage.folder.created', + 'filestorage.folder.pulled', + 'filestorage.group.pulled', + 'filestorage.user.pulled', + 'filestorage.drive.pulled', + 'filestorage.permission.pulled', + 'filestorage.sharedlink.pulled', + 'connection.created' ]; + +export enum WebhookScopes { + 'crm.contact.created' = 'crm.contact.created', + 'crm.contact.pulled' = 'crm.contact.pulled', + 'crm.company.created' = 'crm.company.created', + 'crm.company.pulled' = 'crm.company.pulled', + 'crm.deal.created' = 'crm.deal.created', + 'crm.deal.pulled' = 'crm.deal.pulled', + 'crm.engagement.created' = 'crm.engagement.created', + 'crm.engagement.pulled' = 'crm.engagement.pulled', + 'crm.note.created' = 'crm.note.created', + 'crm.note.pulled' = 'crm.note.pulled', + 'crm.stage.pulled' = 'crm.stage.pulled', + 'crm.task.pulled' = 'crm.task.pulled', + 'crm.task.created' = 'crm.task.created', + 'crm.user.pulled' = 'crm.user.pulled', + + 'ticketing.ticket.created' = 'ticketing.ticket.created', + 'ticketing.ticket.pulled' = 'ticketing.ticket.pulled', + 'ticketing.comment.created' = 'ticketing.comment.created', + 'ticketing.comment.pulled' = 'ticketing.comment.pulled', + 'ticketing.attachment.created' = 'ticketing.attachment.created', + 'ticketing.attachment.pulled' = 'ticketing.attachment.pulled', + 'ticketing.collection.pulled' = 'ticketing.collection.pulled', + 'ticketing.account.pulled' = 'ticketing.account.pulled', + 'ticketing.contact.pulled' = 'ticketing.contact.pulled', + 'ticketing.tag.pulled' = 'ticketing.tag.pulled', + 'ticketing.team.pulled' = 'ticketing.team.pulled', + 'ticketing.user.pulled' = 'ticketing.user.pulled', + + 'ats.activity.created' = 'ats.activity.created', + 'ats.activity.pulled' = 'ats.activity.pulled', + 'ats.application.created' = 'ats.application.created', + 'ats.application.pulled' = 'ats.application.pulled', + 'ats.attachment.created' = 'ats.attachment.created', + 'ats.attachment.pulled' = 'ats.attachment.pulled', + 'ats.candidate.created' = 'ats.candidate.created', + 'ats.candidate.pulled' = 'ats.candidate.pulled', + 'ats.department.pulled' = 'ats.department.pulled', + 'ats.eecos.pulled' = 'ats.eecos.pulled', + 'ats.interview.created' = 'ats.interview.created', + 'ats.interview.pulled' = 'ats.interview.pulled', + 'ats.job.pulled' = 'ats.job.pulled', + 'ats.jobinterviewstage.pulled' = 'ats.jobinterviewstage.pulled', + 'ats.offer.created' = 'ats.offer.created', + 'ats.office.pulled' = 'ats.office.pulled', + 'ats.rejectreason.pulled' = 'ats.rejectreason.pulled', + 'ats.scorecard.pulled' = 'ats.scorecard.pulled', + 'ats.tag.pulled' = 'ats.tag.pulled', + 'ats.user.pulled' = 'ats.user.pulled', + + 'filestorage.file.created'= 'filestorage.file.created', + 'filestorage.file.pulled' = 'filestorage.file.pulled', + 'filestorage.folder.created' = 'filestorage.folder.created', + 'filestorage.folder.pulled' = 'filestorage.folder.pulled', + 'filestorage.group.pulled' = 'filestorage.group.pulled', + 'filestorage.user.pulled' = 'filestorage.user.pulled', + 'filestorage.drive.pulled' = 'filestorage.drive.pulled', + 'filestorage.permission.pulled' = 'filestorage.permission.pulled', + 'filestorage.sharedlink.pulled' = 'filestorage.sharedlink.pulled', + + 'connection.created' = 'connection.created' +} \ No newline at end of file