diff --git a/.env.example b/.env.example index d12846bda..a8186d383 100644 --- a/.env.example +++ b/.env.example @@ -30,8 +30,6 @@ POSTGRES_DB=panora_db POSTGRES_HOST=postgres POSTGRES_PASSWORD=my_password -# Endpoint on which realtime webhooks are sent to -WEBHOOK_INGRESS=http://localhost:3000 # Each Provider is of form PROVIDER_VERTICAL_SOFTWAREMODE_ATTRIBUTE # ================================================ diff --git a/apps/client-ts/src/components/Configuration/Connector/ConnectorDisplay.tsx b/apps/client-ts/src/components/Configuration/Connector/ConnectorDisplay.tsx index 4e54aa115..64714dab0 100644 --- a/apps/client-ts/src/components/Configuration/Connector/ConnectorDisplay.tsx +++ b/apps/client-ts/src/components/Configuration/Connector/ConnectorDisplay.tsx @@ -8,7 +8,7 @@ import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from " import { PasswordInput } from "@/components/ui/password-input" import { z } from "zod" import config from "@/lib/config" -import { AuthStrategy, providerToType, Provider, extractProvider, extractVertical, needsSubdomain } from "@panora/shared" +import { AuthStrategy, providerToType, Provider, extractProvider, extractVertical } from "@panora/shared" import { useEffect, useState } from "react" import useProjectStore from "@/state/projectStore" import { usePostHog } from 'posthog-js/react' @@ -26,27 +26,24 @@ interface ItemDisplayProps { } const formSchema = z.object({ - subdomain: z.string({ - required_error: "Please Enter a Subdomain", - }).optional(), client_id : z.string({ required_error: "Please Enter a Client ID", - }).optional(), + }), client_secret : z.string({ required_error: "Please Enter a Client Secret", - }).optional(), + }), scope : z.string({ required_error: "Please Enter a scope", - }).optional(), + }), api_key: z.string({ required_error: "Please Enter a API Key", - }).optional(), + }), username: z.string({ required_error: "Please Enter Username", - }).optional(), + }), secret: z.string({ required_error: "Please Enter Secret", - }).optional(), + }), }) export function ConnectorDisplay({ item }: ItemDisplayProps) { @@ -65,7 +62,6 @@ export function ConnectorDisplay({ item }: ItemDisplayProps) { const form = useForm>({ resolver: zodResolver(formSchema), defaultValues: { - subdomain: "", client_id: "", client_secret: "", scope: "", @@ -92,11 +88,10 @@ export function ConnectorDisplay({ item }: ItemDisplayProps) { }; function onSubmit(values: z.infer) { - const { client_id, client_secret, scope, api_key, secret, username, subdomain } = values; + const { client_id, client_secret, scope, api_key, secret, username } = values; const performUpdate = mappingConnectionStrategies && mappingConnectionStrategies.length > 0; switch (item?.authStrategy) { case AuthStrategy.oauth2: - const needs_subdomain = needsSubdomain(item.name.toLowerCase(), item.vertical!.toLowerCase()); if (client_id === "" || client_secret === "" || scope === "") { if (client_id === "") { form.setError("client_id", { "message": "Please Enter Client ID" }); @@ -109,18 +104,6 @@ export function ConnectorDisplay({ item }: ItemDisplayProps) { } break; } - if(needs_subdomain && subdomain == ""){ - form.setError("subdomain", { "message": "Please Enter Subdomain" }); - } - let ATTRIBUTES = []; - let VALUES = []; - if(needs_subdomain){ - ATTRIBUTES = ["subdomain", "client_id", "client_secret", "scope"], - VALUES = [subdomain!, client_id!, client_secret!, scope!] - }else{ - ATTRIBUTES = ["client_id", "client_secret", "scope"], - VALUES = [client_id!, client_secret!, scope!] - } if (performUpdate) { const dataToUpdate = mappingConnectionStrategies[0]; toast.promise( @@ -128,8 +111,8 @@ export function ConnectorDisplay({ item }: ItemDisplayProps) { id_cs: dataToUpdate.id_connection_strategy, updateToggle: false, status: dataToUpdate.status, - attributes: ATTRIBUTES, - values: VALUES + attributes: ["client_id", "client_secret", "scope"], + values: [client_id, client_secret, scope] }), { loading: 'Loading...', @@ -157,8 +140,8 @@ export function ConnectorDisplay({ item }: ItemDisplayProps) { toast.promise( createCsPromise({ type: providerToType(item?.name, item?.vertical!, AuthStrategy.oauth2), - attributes: ATTRIBUTES, - values: VALUES + attributes: ["client_id", "client_secret", "scope"], + values: [client_id, client_secret, scope] }), { loading: 'Loading...', @@ -200,7 +183,7 @@ export function ConnectorDisplay({ item }: ItemDisplayProps) { updateToggle: false, status: dataToUpdate.status, attributes: ["api_key"], - values: [api_key!] + values: [api_key] }), { loading: 'Loading...', @@ -229,7 +212,7 @@ export function ConnectorDisplay({ item }: ItemDisplayProps) { createCsPromise({ type: providerToType(item?.name, item?.vertical!, AuthStrategy.api_key), attributes: ["api_key"], - values: [api_key!] + values: [api_key] }), { loading: 'Loading...', @@ -276,7 +259,7 @@ export function ConnectorDisplay({ item }: ItemDisplayProps) { updateToggle: false, status: dataToUpdate.status, attributes: ["username", "secret"], - values: [username!, secret!] + values: [username, secret] }), { loading: 'Loading...', @@ -306,7 +289,7 @@ export function ConnectorDisplay({ item }: ItemDisplayProps) { createCsPromise({ type: providerToType(item?.name, item?.vertical!, AuthStrategy.basic), attributes: ["username", "secret"], - values: [username!, secret!] + values: [username, secret] }), { loading: 'Loading...', @@ -341,19 +324,14 @@ export function ConnectorDisplay({ item }: ItemDisplayProps) { if (mappingConnectionStrategies && mappingConnectionStrategies.length > 0) { fetchCredentials({ type: mappingConnectionStrategies[0].type, - attributes: item?.authStrategy === AuthStrategy.oauth2 ? needsSubdomain(item.name.toLowerCase(), item.vertical!.toLowerCase()) ? ["subdomain", "client_id", "client_secret", "scope"] : ["client_id", "client_secret", "scope"] + attributes: item?.authStrategy === AuthStrategy.oauth2 ? ["client_id", "client_secret", "scope"] : item?.authStrategy === AuthStrategy.api_key ? ["api_key"] : ["username", "secret"] }, { onSuccess(data) { if (item?.authStrategy === AuthStrategy.oauth2) { - let i = 0; - if(needsSubdomain(item.name.toLowerCase(), item.vertical!.toLowerCase())){ - form.setValue("subdomain", data[i]); - i = 1; - } - form.setValue("client_id", data[i]); - form.setValue("client_secret", data[i + 1]); - form.setValue("scope", data[i + 2]); + form.setValue("client_id", data[0]); + form.setValue("client_secret", data[1]); + form.setValue("scope", data[2]); } if (item?.authStrategy === AuthStrategy.api_key) { form.setValue("api_key", data[0]); @@ -437,25 +415,6 @@ export function ConnectorDisplay({ item }: ItemDisplayProps) {
{ item.authStrategy == AuthStrategy.oauth2 && <> - - { needsSubdomain(item.name.toLowerCase(), item.vertical!.toLowerCase()) && -
- ( - - Subdomain - - - - - - )} - /> -
- } -
diff --git a/apps/client-ts/src/hooks/get/useConnections.tsx b/apps/client-ts/src/hooks/get/useConnections.tsx index b82dd6b55..27b4948bc 100644 --- a/apps/client-ts/src/hooks/get/useConnections.tsx +++ b/apps/client-ts/src/hooks/get/useConnections.tsx @@ -5,7 +5,6 @@ import Cookies from 'js-cookie'; const useConnections = () => { - console.log(Cookies.get('access_token')) return useQuery({ queryKey: ['connections'], queryFn: async (): Promise => { diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 17aea9853..586a0981c 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -39,7 +39,6 @@ services: REDIS_PORT: ${REDIS_PORT} #REDIS_TLS: 1 # set this variable to 1 when Redis is AWS hosted REDIS_DB: ${REDIS_DB} - WEBHOOK_INGRESS: ${WEBHOOK_INGRESS} ENCRYPT_CRYPTO_SECRET_KEY: ${ENCRYPT_CRYPTO_SECRET_KEY} HUBSPOT_CRM_CLOUD_CLIENT_ID: ${HUBSPOT_CRM_CLOUD_CLIENT_ID} HUBSPOT_CRM_CLOUD_CLIENT_SECRET: ${HUBSPOT_CRM_CLOUD_CLIENT_SECRET} @@ -189,23 +188,22 @@ services: volumes: - .:/app - ngrok: - image: ngrok/ngrok:latest - restart: always - command: - - "start" - - "--all" - - "--config" - - "/etc/ngrok.yml" - volumes: - - ./ngrok.yml:/etc/ngrok.yml - ports: - - 4040:4040 - depends_on: - api: - condition: service_healthy - network_mode: "host" - + #ngrok: + #image: ngrok/ngrok:latest + #restart: always + #command: + # - "start" + # - "--all" + # - "--config" + # - "/etc/ngrok.yml" + # volumes: + # - ./ngrok.yml:/etc/ngrok.yml + # ports: + # - 4040:4040 + #depends_on: + # api: + # condition: service_healthy + # network_mode: "host" docs: build: diff --git a/docker-compose.source.yml b/docker-compose.source.yml index 52efe86a7..13cdbe89f 100644 --- a/docker-compose.source.yml +++ b/docker-compose.source.yml @@ -39,7 +39,6 @@ services: REDIS_PASS: ${REDIS_PASS} BACKEND_PORT: ${BACKEND_PORT} REDIS_DB: ${REDIS_DB} - WEBHOOK_INGRESS: ${WEBHOOK_INGRESS} ENCRYPT_CRYPTO_SECRET_KEY: ${ENCRYPT_CRYPTO_SECRET_KEY} HUBSPOT_CRM_CLOUD_CLIENT_ID: ${HUBSPOT_CRM_CLOUD_CLIENT_ID} HUBSPOT_CRM_CLOUD_CLIENT_SECRET: ${HUBSPOT_CRM_CLOUD_CLIENT_SECRET} diff --git a/docker-compose.yml b/docker-compose.yml index ed87a9316..135130f27 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -33,7 +33,6 @@ services: REDIS_PASS: ${REDIS_PASS} REDIS_PORT: ${REDIS_PORT} REDIS_DB: ${REDIS_DB} - WEBHOOK_INGRESS: ${WEBHOOK_INGRESS} ENCRYPT_CRYPTO_SECRET_KEY: ${ENCRYPT_CRYPTO_SECRET_KEY} HUBSPOT_CRM_CLOUD_CLIENT_ID: ${HUBSPOT_CRM_CLOUD_CLIENT_ID} HUBSPOT_CRM_CLOUD_CLIENT_SECRET: ${HUBSPOT_CRM_CLOUD_CLIENT_SECRET} diff --git a/ngrok.yml b/ngrok.yml index f60f3d752..c53b55532 100644 --- a/ngrok.yml +++ b/ngrok.yml @@ -1,5 +1,5 @@ version: 2 -authtoken: 2hkEp1JOOyYzutRyUa5f74UWll5_7oDCZH2Rd5bryqKj9geTV +authtoken: YOUR_NGROK_KEY_HERE log_level: debug log: stdout @@ -7,4 +7,4 @@ tunnels: api-tunnel: proto: http addr: 3000 - domain: prepared-wildcat-infinitely.ngrok-free.app \ No newline at end of file + domain: your_ngrok_domain_here \ No newline at end of file diff --git a/packages/api/prisma/schema.prisma b/packages/api/prisma/schema.prisma index ef9a9158f..7e528d24a 100644 --- a/packages/api/prisma/schema.prisma +++ b/packages/api/prisma/schema.prisma @@ -50,159 +50,6 @@ model webhooks_reponses { webhook_delivery_attempts webhook_delivery_attempts[] } -model crm_deals_stages { - id_crm_deals_stage String @id(map: "pk_crm_deal_stages") @db.Uuid - stage_name String? - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) - id_linked_user String? @db.Uuid - remote_id String? - remote_platform String? - crm_deals crm_deals[] -} - -model crm_users { - id_crm_user String @id(map: "pk_crm_users") @db.Uuid - name String? - email String? - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) - id_linked_user String? @db.Uuid - remote_id String? - remote_platform String? - crm_companies crm_companies[] - crm_contacts crm_contacts[] - crm_deals crm_deals[] - crm_engagements crm_engagements[] - crm_tasks crm_tasks[] -} - -model cs_attributes { - id_cs_attribute String @id(map: "pk_ct_attributes") @db.Uuid - attribute_slug String - data_type String - id_cs_entity String @db.Uuid -} - -model cs_entities { - id_cs_entity String @id(map: "pk_ct_entities") @db.Uuid - id_connection_strategy String @db.Uuid -} - -model cs_values { - id_cs_value String @id(map: "pk_ct_values") @db.Uuid - value String - id_cs_attribute String @db.Uuid -} - -/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments -model entity { - id_entity String @id(map: "pk_entity") @db.Uuid - ressource_owner_id String @db.Uuid - attribute attribute[] - value value[] -} - -/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments -model remote_data { - id_remote_data String @id(map: "pk_remote_data") @db.Uuid - ressource_owner_id String? @unique(map: "force_unique_ressourceownerid") @db.Uuid - format String? - data String? - created_at DateTime? @db.Timestamp(6) -} - -/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments -model tcg_accounts { - id_tcg_account String @id(map: "pk_tcg_account") @db.Uuid - remote_id String? - name String? - domains String[] - remote_platform String? - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) - id_linked_user String? @db.Uuid - tcg_contacts tcg_contacts[] -} - -model tcg_collections { - id_tcg_collection String @id(map: "pk_tcg_collections") @db.Uuid - name String? - description String? - remote_id String? - remote_platform String? - collection_type String? - parent_collection String? @db.Uuid - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) - id_linked_user String @db.Uuid -} - -model tcg_teams { - id_tcg_team String @id(map: "pk_tcg_teams") @db.Uuid - remote_id String? - remote_platform String? - name String? - description String? - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) - id_linked_user String? @db.Uuid -} - -/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments -model tcg_users { - id_tcg_user String @id(map: "pk_tcg_users") @db.Uuid - name String? - email_address String? - remote_id String? - remote_platform String? - teams String[] - created_at DateTime? @db.Timestamp(6) - modified_at DateTime? @db.Timestamp(6) - id_linked_user String? @db.Uuid - tcg_comments tcg_comments[] -} - -/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments -model managed_webhooks { - id_managed_webhook String @id(map: "pk_managed_webhooks") @db.Uuid - active Boolean - id_connection String @db.Uuid - endpoint String @db.Uuid - api_version String? - active_events String[] - remote_signing_secret String? - modified_at DateTime @db.Timestamp(6) - created_at DateTime @db.Timestamp(6) -} - -model fs_drives { - id_fs_drive String @id(map: "pk_fs_drives") @db.Uuid - remote_created_at DateTime? @db.Timestamp(6) - drive_url String? - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) - remote_id String? -} - -/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments -model fs_permissions { - id_fs_permission String @id(map: "pk_fs_permissions") @db.Uuid - remote_id String? - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) - user String @db.Uuid - group String @db.Uuid - type String[] - roles String[] -} - -model fs_shared_links { - id_fs_shared_link String @id(map: "pk_fs_shared_links") @db.Uuid - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) -} - model api_keys { id_api_key String @id(map: "id_") @db.Uuid api_key_hash String @unique(map: "unique_api_keys") @@ -266,22 +113,6 @@ model connections { @@index([id_linked_user], map: "fk_connections_to_linkedusersid") } -model connector_sets { - id_connector_set String @id(map: "pk_project_connector") @db.Uuid - crm_hubspot Boolean - crm_zoho Boolean - crm_attio Boolean - crm_pipedrive Boolean - crm_zendesk Boolean - crm_close Boolean - tcg_zendesk Boolean - tcg_jira Boolean - tcg_gorgias Boolean - tcg_gitlab Boolean - tcg_front Boolean - projects projects[] -} - /// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments model crm_addresses { id_crm_address String @id(map: "pk_crm_addresses") @db.Uuid @@ -372,6 +203,17 @@ model crm_deals { @@index([id_crm_company], map: "fk_crm_deal_crmcompanyid") } +model crm_deals_stages { + id_crm_deals_stage String @id(map: "pk_crm_deal_stages") @db.Uuid + stage_name String? + created_at DateTime @db.Timestamp(6) + modified_at DateTime @db.Timestamp(6) + id_linked_user String? @db.Uuid + remote_id String? + remote_platform String? + crm_deals crm_deals[] +} + /// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments model crm_email_addresses { id_crm_email String @id(map: "pk_crm_contact_email_addresses") @db.Uuid @@ -486,6 +328,48 @@ model crm_tasks { @@index([id_crm_deal], map: "fk_crmtask_dealid") } +model crm_users { + id_crm_user String @id(map: "pk_crm_users") @db.Uuid + name String? + email String? + created_at DateTime @db.Timestamp(6) + modified_at DateTime @db.Timestamp(6) + id_linked_user String? @db.Uuid + remote_id String? + remote_platform String? + crm_companies crm_companies[] + crm_contacts crm_contacts[] + crm_deals crm_deals[] + crm_engagements crm_engagements[] + crm_tasks crm_tasks[] +} + +model cs_attributes { + id_cs_attribute String @id(map: "pk_ct_attributes") @db.Uuid + attribute_slug String + data_type String + id_cs_entity String @db.Uuid +} + +model cs_entities { + id_cs_entity String @id(map: "pk_ct_entities") @db.Uuid + id_connection_strategy String @db.Uuid +} + +model cs_values { + id_cs_value String @id(map: "pk_ct_values") @db.Uuid + value String + id_cs_attribute String @db.Uuid +} + +/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments +model entity { + id_entity String @id(map: "pk_entity") @db.Uuid + ressource_owner_id String @db.Uuid + attribute attribute[] + value value[] +} + /// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments model events { id_event String @id(map: "pk_jobs") @db.Uuid @@ -504,39 +388,6 @@ model events { @@index([id_linked_user], map: "fk_linkeduserid_projectid") } -model fs_files { - id_fs_file String @id(map: "pk_fs_files") @db.Uuid - name String? - type String? - path String? - mime_type String? - size BigInt? - remote_id String? - id_fs_folder String? @db.Uuid - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) - id_fs_permission String @db.Uuid - - @@index([id_fs_folder], map: "fk_fs_file_folderid") - @@index([id_fs_permission], map: "fk_fs_file_permissionid") -} - -model fs_folders { - id_fs_folder String @id(map: "pk_fs_folders") @db.Uuid - folder_url String? - size BigInt? - description String? - parent_folder String? @db.Uuid - remote_id String? - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) - id_fs_drive String? @db.Uuid - id_fs_permission String @db.Uuid - - @@index([id_fs_drive], map: "fk_fs_folder_driveid") - @@index([id_fs_permission], map: "fk_fs_folder_permissionid") -} - model invite_links { id_invite_link String @id(map: "pk_invite_links") @db.Uuid status String @@ -591,6 +442,28 @@ model projects { @@index([id_connector_set], map: "fk_connectors_sets") } +/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments +model remote_data { + id_remote_data String @id(map: "pk_remote_data") @db.Uuid + ressource_owner_id String? @unique(map: "force_unique_ressourceownerid") @db.Uuid + format String? + data String? + created_at DateTime? @db.Timestamp(6) +} + +/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments +model tcg_accounts { + id_tcg_account String @id(map: "pk_tcg_account") @db.Uuid + remote_id String? + name String? + domains String[] + remote_platform String? + created_at DateTime @db.Timestamp(6) + modified_at DateTime @db.Timestamp(6) + id_linked_user String? @db.Uuid + tcg_contacts tcg_contacts[] +} + /// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments model tcg_attachments { id_tcg_attachment String @id(map: "pk_tcg_attachments") @db.Uuid @@ -611,6 +484,19 @@ model tcg_attachments { @@index([id_tcg_ticket], map: "fk_tcg_attachment_tcg_ticketid") } +model tcg_collections { + id_tcg_collection String @id(map: "pk_tcg_collections") @db.Uuid + name String? + description String? + remote_id String? + remote_platform String? + collection_type String? + parent_collection String? @db.Uuid + created_at DateTime @db.Timestamp(6) + modified_at DateTime @db.Timestamp(6) + id_linked_user String @db.Uuid +} + /// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments model tcg_comments { id_tcg_comment String @id(map: "pk_tcg_comments") @db.Uuid @@ -669,6 +555,17 @@ model tcg_tags { @@index([id_tcg_ticket], map: "fk_tcg_tag_tcg_ticketid") } +model tcg_teams { + id_tcg_team String @id(map: "pk_tcg_teams") @db.Uuid + remote_id String? + remote_platform String? + name String? + description String? + created_at DateTime @db.Timestamp(6) + modified_at DateTime @db.Timestamp(6) + id_linked_user String? @db.Uuid +} + /// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments model tcg_tickets { id_tcg_ticket String @id(map: "pk_tcg_tickets") @db.Uuid @@ -697,6 +594,20 @@ model tcg_tickets { @@index([id_tcg_user], map: "fk_tcg_ticket_tcg_user") } +/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments +model tcg_users { + id_tcg_user String @id(map: "pk_tcg_users") @db.Uuid + name String? + email_address String? + remote_id String? + remote_platform String? + teams String[] + created_at DateTime? @db.Timestamp(6) + modified_at DateTime? @db.Timestamp(6) + id_linked_user String? @db.Uuid + tcg_comments tcg_comments[] +} + /// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments model value { id_value String @id(map: "pk_value") @db.Uuid @@ -731,3 +642,92 @@ model webhook_delivery_attempts { @@index([id_event], map: "fk_webhook_delivery_attempt_eventid") @@index([id_webhooks_reponse], map: "fk_webhook_delivery_attempt_webhook_responseid") } + +model connector_sets { + id_connector_set String @id(map: "pk_project_connector") @db.Uuid + crm_hubspot Boolean + crm_zoho Boolean + crm_attio Boolean + crm_pipedrive Boolean + crm_zendesk Boolean + crm_close Boolean + tcg_zendesk Boolean + tcg_jira Boolean + tcg_gorgias Boolean + tcg_gitlab Boolean + tcg_front Boolean + projects projects[] +} + +/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments +model managed_webhooks { + id_managed_webhook String @id(map: "pk_managed_webhooks") @db.Uuid + active Boolean + id_connection String @db.Uuid + endpoint String @db.Uuid + api_version String? + active_events String[] + remote_signing_secret String? + modified_at DateTime @db.Timestamp(6) + created_at DateTime @db.Timestamp(6) +} + +model fs_drives { + id_fs_drive String @id(map: "pk_fs_drives") @db.Uuid + remote_created_at DateTime? @db.Timestamp(6) + drive_url String? + created_at DateTime @db.Timestamp(6) + modified_at DateTime @db.Timestamp(6) + remote_id String? +} + +model fs_files { + id_fs_file String @id(map: "pk_fs_files") @db.Uuid + name String? + type String? + path String? + mime_type String? + size BigInt? + remote_id String? + id_fs_folder String? @db.Uuid + created_at DateTime @db.Timestamp(6) + modified_at DateTime @db.Timestamp(6) + id_fs_permission String @db.Uuid + + @@index([id_fs_folder], map: "fk_fs_file_folderid") + @@index([id_fs_permission], map: "fk_fs_file_permissionid") +} + +model fs_folders { + id_fs_folder String @id(map: "pk_fs_folders") @db.Uuid + folder_url String? + size BigInt? + description String? + parent_folder String? @db.Uuid + remote_id String? + created_at DateTime @db.Timestamp(6) + modified_at DateTime @db.Timestamp(6) + id_fs_drive String? @db.Uuid + id_fs_permission String @db.Uuid + + @@index([id_fs_drive], map: "fk_fs_folder_driveid") + @@index([id_fs_permission], map: "fk_fs_folder_permissionid") +} + +/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments +model fs_permissions { + id_fs_permission String @id(map: "pk_fs_permissions") @db.Uuid + remote_id String? + created_at DateTime @db.Timestamp(6) + modified_at DateTime @db.Timestamp(6) + user String @db.Uuid + group String @db.Uuid + type String[] + roles String[] +} + +model fs_shared_links { + id_fs_shared_link String @id(map: "pk_fs_shared_links") @db.Uuid + created_at DateTime @db.Timestamp(6) + modified_at DateTime @db.Timestamp(6) +} diff --git a/packages/api/scripts/connectorUpdate.js b/packages/api/scripts/connectorUpdate.js index 3cee6a1c0..f2582b431 100755 --- a/packages/api/scripts/connectorUpdate.js +++ b/packages/api/scripts/connectorUpdate.js @@ -157,9 +157,12 @@ function updateMappingsFile( ) { let fileContent = fs.readFileSync(mappingsFile, 'utf8'); + // Identify where the existing content before the first import starts, to preserve any comments or metadata at the start of the file const firstImportIndex = fileContent.indexOf('import '); const beforeFirstImport = firstImportIndex > -1 ? fileContent.substring(0, firstImportIndex) : ''; + + // Prepare sections of the file content for updates const afterFirstImport = firstImportIndex > -1 ? fileContent.substring(firstImportIndex) @@ -174,80 +177,67 @@ function updateMappingsFile( let newImports = ''; let newInstances = ''; let newMappings = ''; - newServiceDirs.forEach((newServiceName) => { - if ( - !(vertical === 'ticketing' && newServiceName.toLowerCase() === 'zendesk') - ) { + newServiceDirs + .filter( + (newServiceName) => + !( + vertical === 'ticketing' && newServiceName.toLowerCase() === 'zendesk' + ), + ) + .forEach((newServiceName) => { const serviceNameCapitalized = newServiceName.charAt(0).toUpperCase() + newServiceName.slice(1); const objectCapitalized = objectType.charAt(0).toUpperCase() + objectType.slice(1); + const mapperClassName = `${serviceNameCapitalized}${objectCapitalized}Mapper`; const mapperInstanceName = `${newServiceName.toLowerCase()}${objectCapitalized}Mapper`; + // Prepare the import statement and instance declaration const importStatement = `import { ${mapperClassName} } from '../services/${newServiceName}/mappers';\n`; const instanceDeclaration = `const ${mapperInstanceName} = new ${mapperClassName}();\n`; const mappingEntry = ` ${newServiceName.toLowerCase()}: {\n unify: ${mapperInstanceName}.unify.bind(${mapperInstanceName}),\n desunify: ${mapperInstanceName}.desunify.bind(${mapperInstanceName}),\n },\n`; + // Check and append new import if it's not already present if (!fileContent.includes(importStatement)) { newImports += importStatement; } + + // Append instance declaration if not already present before the mapping object if (!beforeMappingObject.includes(instanceDeclaration)) { newInstances += instanceDeclaration; } + + // Prepare and append new mapping entry if not already present in the mapping object if (!mappingObjectContent.includes(` ${newServiceName}: {`)) { newMappings += mappingEntry; } - } - }); + }); + // Combine updates with the original sections of the file content const updatedContentBeforeMapping = - beforeFirstImport + newImports + beforeMappingObject.trim(); + beforeFirstImport + + newImports + + beforeMappingObject.trim() + + '\n\n' + + newInstances; + + // Update the mapping object content with new mappings + const insertionPoint = mappingObjectContent.lastIndexOf('};'); const updatedMappingObjectContent = [ - mappingObjectContent.slice(0, mappingObjectContent.lastIndexOf('};')), + mappingObjectContent.slice(0, insertionPoint), newMappings, - mappingObjectContent.slice(mappingObjectContent.lastIndexOf('};')), + mappingObjectContent.slice(insertionPoint), ].join(''); + // Reassemble the complete updated file content const updatedFileContent = - updatedContentBeforeMapping + - '\n' + - newInstances + - updatedMappingObjectContent; + updatedContentBeforeMapping + updatedMappingObjectContent; + + // Write the updated content back to the file fs.writeFileSync(mappingsFile, updatedFileContent); } -function activateProviders(metadataFilePath, vertical, providerNames) { - let fileContent = fs.readFileSync(metadataFilePath, 'utf8'); - - providerNames.forEach((providerName) => { - // Define the pattern to find the service entry including the "active: false" line within the specified vertical - const pattern = new RegExp( - `'${vertical}': {([\\s\\S]*?)('${providerName}': {([\\s\\S]*?)}),?\\s*active: false`, - 'm', - ); - const match = fileContent.match(pattern); - - if (match && match[0]) { - // Replace "active: false" with "active: true" - const updatedServiceBlock = match[0].replace( - 'active: false', - 'active: true', - ); - - // Replace the original service block with the updated one in the file content - fileContent = fileContent.replace(pattern, updatedServiceBlock); - console.log( - `Service '${providerName}' in '${vertical}' activated successfully.`, - ); - } else { - console.error(`Service '${providerName}' not found in '${vertical}'.`); - } - }); - - // Write the updated content back to the file after all changes - fs.writeFileSync(metadataFilePath, fileContent); -} // Function to extract the array from a file function extractArrayFromFile(filePath, arrayName) { const fileContents = readFileContents(filePath); @@ -310,32 +300,24 @@ function updateEnumFile(enumFilePath, newServiceDirs, vertical) { const match = fileContent.match(enumRegex); if (match && match[1]) { - // Clean up and prepare the existing enum entries let enumEntries = match[1] .trim() .split(/\n/) - .map((entry) => entry.trim()) - .filter((entry) => entry.endsWith(',')) // Ensure all entries end with a comma - .map((entry) => entry.replace(/,$/, '')); // Remove commas for a clean slate - + .map((e) => e.trim()) + .filter((e) => e); const existingEntries = enumEntries.map((entry) => entry.split('=')[0].trim(), ); // Prepare new entries to be added newServiceDirs.forEach((serviceName) => { - const enumEntryName = serviceName.toUpperCase(); + const enumEntryName = serviceName.toUpperCase(); // Assuming the enum entry name is the uppercase service name if (!existingEntries.includes(enumEntryName)) { // Format the new enum entry, assuming you want the name and value to be the same - enumEntries.push(`${enumEntryName} = '${serviceName}'`); + enumEntries.push(`${enumEntryName} = '${serviceName}',`); } }); - // Add commas back to all entries except the last one - enumEntries = enumEntries.map((entry, index, array) => - index === array.length - 1 ? entry : `${entry},`, - ); - // Rebuild the enum content const updatedEnumContent = `export enum ${enumName} {\n ${enumEntries.join( '\n ', @@ -346,21 +328,19 @@ function updateEnumFile(enumFilePath, newServiceDirs, vertical) { // Write the updated content back to the file fs.writeFileSync(enumFilePath, fileContent); + //console.log(`Updated ${enumName} in ${enumFilePath}`); } else { console.error(`Could not find enum ${enumName} in file.`); } } +// New function to update init.sql function updateInitSQLFile(initSQLFile, newServiceDirs, vertical) { - // Read the content of the SQL file let fileContent = fs.readFileSync(initSQLFile, 'utf8'); - - // Find the insert point just before the PRIMARY KEY constraint const insertPoint = fileContent.indexOf( 'CONSTRAINT PK_project_connector PRIMARY KEY', ); - // Handle the case where the constraint is not found if (insertPoint === -1) { console.error( `Could not find the PRIMARY KEY constraint in ${initSQLFile}`, @@ -368,70 +348,65 @@ function updateInitSQLFile(initSQLFile, newServiceDirs, vertical) { return; } - // Prepare new column lines to be inserted - let newLines = newServiceDirs - .map((serviceName) => { - const columnName = `${vertical.toLowerCase()}_${serviceName.toLowerCase()}`; - return ` ${columnName} boolean NOT NULL,\n`; - }) - .join(''); - - // Insert the new column definitions just before the PRIMARY KEY constraint - fileContent = - fileContent.slice(0, insertPoint) + - newLines + - fileContent.slice(insertPoint); - - // Write the modified content back to the file + let newLines = ''; + newServiceDirs.forEach((serviceName) => { + const columnName = `${vertical.toLowerCase()}_${serviceName.toLowerCase()}`; + newLines += ` ${columnName} boolean NOT NULL,\n`; + }); + + fileContent = [ + fileContent.slice(0, insertPoint), + newLines, + fileContent.slice(insertPoint), + ].join(''); + fs.writeFileSync(initSQLFile, fileContent); } +// New function to update seed.sql function updateSeedSQLFile(seedSQLFile, newServiceDirs, vertical) { let fileContent = fs.readFileSync(seedSQLFile, 'utf8'); - // Regex to find the INSERT statement for connector_sets - const regex = /INSERT INTO connector_sets \(([^)]+)\) VALUES/g; - let match; - let lastMatch; - while ((match = regex.exec(fileContent)) !== null) { - lastMatch = match; // Store the last match + const tableInsertPoint = fileContent.indexOf('INSERT INTO connector_sets'); + if (tableInsertPoint === -1) { + console.error( + `Could not find the INSERT INTO connector_sets statement in ${seedSQLFile}`, + ); + return; } - if (!lastMatch) { - console.error('Could not find the INSERT INTO connector_sets statement.'); + const columnInsertPoint = fileContent.indexOf('(', tableInsertPoint); + const valuesInsertPoint = fileContent.indexOf('VALUES', columnInsertPoint); + const rowsInsertPoint = fileContent.indexOf('(', valuesInsertPoint); + + if ( + columnInsertPoint === -1 || + valuesInsertPoint === -1 || + rowsInsertPoint === -1 + ) { + console.error( + `Could not find the column or values insert points in ${seedSQLFile}`, + ); return; } - // Extracting columns and preparing to insert new ones - let columns = lastMatch[1].split(',').map((col) => col.trim()); - let newColumns = newServiceDirs.map( - (serviceName) => `${vertical.toLowerCase()}_${serviceName.toLowerCase()}`, - ); + let newColumns = ''; + let newValues = ''; + newServiceDirs.forEach((serviceName) => { + const columnName = `${vertical.toLowerCase()}_${serviceName.toLowerCase()}`; + newColumns += `${columnName}, `; + newValues += 'TRUE, '; + }); - // Filter out existing new columns to avoid duplication - newColumns = newColumns.filter((nc) => !columns.includes(nc)); - if (newColumns.length > 0) { - // Insert new columns before the closing parenthesis in the columns list - columns = [...columns, ...newColumns]; - let newColumnsSection = columns.join(', '); - - // Replace the old columns section with the new one - fileContent = fileContent.replace(lastMatch[1], newColumnsSection); - - // Update each VALUES section - fileContent = fileContent.replace(/VALUES(.*?);/gs, (match) => { - return match - .replace(/\),\s*\(/g, '),\n (') // Fix line formatting - .replace(/\([^\)]+\)/g, (values) => { - let newValues = newColumns.map(() => 'TRUE').join(', '); - return values.slice(0, -1) + ', ' + newValues + ')'; - }); - }); - } + const updatedFileContent = [ + fileContent.slice(0, columnInsertPoint + 1), + newColumns, + fileContent.slice(columnInsertPoint + 1, rowsInsertPoint + 1), + newValues, + fileContent.slice(rowsInsertPoint + 1), + ].join(''); - // Write the modified content back to the file - fs.writeFileSync(seedSQLFile, fileContent); - console.log('Seed SQL file has been updated successfully.'); + fs.writeFileSync(seedSQLFile, updatedFileContent); } // Main script logic @@ -511,16 +486,10 @@ function updateObjectTypes(baseDir, objectType, vertical) { // Update SQL files const initSQLFile = path.join(__dirname, './init.sql'); - updateInitSQLFile(initSQLFile, newProviders, slugFromCategory(vertical)); + updateInitSQLFile(initSQLFile, newServiceDirs, slugFromCategory(vertical)); const seedSQLFile = path.join(__dirname, './seed.sql'); - updateSeedSQLFile(seedSQLFile, newProviders, slugFromCategory(vertical)); - - const metadata_file = path.join( - __dirname, - '../../shared/src/connectors/metadata.ts', - ); - //activateProviders(metadata_file, vertical, newProviders); + updateSeedSQLFile(seedSQLFile, newServiceDirs, slugFromCategory(vertical)); } // Example usage for ticketing/team diff --git a/packages/api/scripts/init.sql b/packages/api/scripts/init.sql index aeb4df49f..6eb0d80c0 100644 --- a/packages/api/scripts/init.sql +++ b/packages/api/scripts/init.sql @@ -423,7 +423,9 @@ CREATE TABLE connector_sets tcg_gorgias boolean NOT NULL, tcg_gitlab boolean NOT NULL, tcg_front boolean NOT NULL, -CONSTRAINT PK_project_connector PRIMARY KEY ( id_connector_set ) + crm_zendesk boolean NOT NULL, + crm_close boolean NOT NULL, + CONSTRAINT PK_project_connector PRIMARY KEY ( id_connector_set ) ); @@ -432,6 +434,7 @@ CONSTRAINT PK_project_connector PRIMARY KEY ( id_connector_set ) + -- ************************************** connection_strategies CREATE TABLE connection_strategies @@ -580,7 +583,6 @@ CREATE TABLE fs_folders CREATE INDEX FK_fs_folder_driveID ON fs_folders ( id_fs_drive -); CREATE INDEX FK_fs_folder_permissionID ON fs_folders ( diff --git a/packages/api/scripts/seed.sql b/packages/api/scripts/seed.sql index afb0d02d3..620985342 100644 --- a/packages/api/scripts/seed.sql +++ b/packages/api/scripts/seed.sql @@ -1,7 +1,7 @@ INSERT INTO users (id_user, identification_strategy, email, password_hash, first_name, last_name) VALUES ('0ce39030-2901-4c56-8db0-5e326182ec6b', 'b2c','local@panora.dev', '$2b$10$Y7Q8TWGyGuc5ecdIASbBsuXMo3q/Rs3/cnY.mLZP4tUgfGUOCUBlG', 'local', 'Panora'); -INSERT INTO connector_sets (id_connector_set, crm_attio, crm_close, crm_hubspot, crm_pipedrive, crm_zendesk, crm_zoho, tcg_zendesk, tcg_gorgias, tcg_front, tcg_jira, tcg_gitlab) VALUES +INSERT INTO connector_sets (id_connector_set, crm_hubspot, crm_zoho, crm_pipedrive, crm_attio, crm_zendesk, crm_close, tcg_zendesk, tcg_gorgias, tcg_front, tcg_jira, tcg_gitlab) VALUES ('1709da40-17f7-4d3a-93a0-96dc5da6ddd7', TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE), ('852dfff8-ab63-4530-ae49-e4b2924407f8', TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE), ('aed0f856-f802-4a79-8640-66d441581a99', TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE); diff --git a/packages/api/src/@core/connections-strategies/connections-strategies.service.ts b/packages/api/src/@core/connections-strategies/connections-strategies.service.ts index c0f29f63f..94a905c59 100644 --- a/packages/api/src/@core/connections-strategies/connections-strategies.service.ts +++ b/packages/api/src/@core/connections-strategies/connections-strategies.service.ts @@ -99,7 +99,7 @@ export class ConnectionsStrategiesService { for (let i = 0; i < attributes.length; i++) { const attribute_slug = attributes[i]; const value = values[i]; - //create all attributes (for oauth => client_id, client_secret, subdomain ??) + //create all attributes (for oauth => client_id, client_secret) const attribute_ = await this.prisma.cs_attributes.create({ data: { id_cs_attribute: uuidv4(), diff --git a/packages/api/src/@core/environment/environment.service.ts b/packages/api/src/@core/environment/environment.service.ts index d28cbf1cf..690e75a89 100644 --- a/packages/api/src/@core/environment/environment.service.ts +++ b/packages/api/src/@core/environment/environment.service.ts @@ -20,9 +20,6 @@ export class EnvironmentService { getEnvMode(): string { return this.configService.get('ENV'); } - getWebhookIngress(): string { - return this.configService.get('WEBHOOK_INGRESS'); - } getSentryDsn(): string { return this.configService.get('SENTRY_DSN'); } diff --git a/packages/api/src/ticketing/@webhook/zendesk/handler.ts b/packages/api/src/ticketing/@webhook/zendesk/handler.ts index 31c5b05e6..bb8589090 100644 --- a/packages/api/src/ticketing/@webhook/zendesk/handler.ts +++ b/packages/api/src/ticketing/@webhook/zendesk/handler.ts @@ -63,31 +63,21 @@ export class ZendeskHandlerService { if (!conn) throw ReferenceError('Connection undefined'); const unified_events = mw.active_events; - const events_ = Array.from( - new Set( - unified_events - .flatMap((event) => mapToRemoteEvent(event)) - .filter((item) => item !== null && item !== undefined), - ), - ); // Converts the Set back into an array + const events_ = unified_events + .flatMap((event) => mapToRemoteEvent(event)) + .filter((item) => item !== null && item !== undefined); + const body_data = { webhook: { name: webhook_name, status: 'active', - endpoint: `${this.env.getWebhookIngress()}/mw/${mw.endpoint}`, + endpoint: `${this.env.getPanoraBaseUrl()}/mw/${mw.endpoint}`, http_method: 'POST', request_format: 'json', subscriptions: events_, }, }; - this.logger.log( - `Logging data with token: ${this.cryptoService.decrypt( - conn.access_token, - )} to endpoint :${conn.account_url}/webhooks` + - JSON.stringify(body_data), - ); - this.logger.log('Creating basic webhook... '); const resp = await axios.post( @@ -160,7 +150,7 @@ export class ZendeskHandlerService { webhook: { name: webhook_name, status: 'active', - endpoint: `${this.env.getWebhookIngress()}/mw/${mw.endpoint}`, + endpoint: `${this.env.getPanoraBaseUrl()}/mw/${mw.endpoint}`, http_method: 'POST', request_format: 'json', subscriptions: ['conditional_ticket_events'], @@ -220,6 +210,10 @@ export class ZendeskHandlerService { field: 'priority', operator: 'changed', }, + { + field: 'status', + value: 'changed', + }, { field: 'update_type', value: 'Create', @@ -316,7 +310,7 @@ export class ZendeskHandlerService { action: 'UPDATE', data: { remote_id: payload.ticketId as string }, }, - ); + ); } else { //non-ticket payload const payload_ = payload as NonTicketPayload; @@ -399,6 +393,7 @@ export class ZendeskHandlerService { return [values[0], values[1]]; } + async verifyWebhookAuthenticity( signature: string, timestamp: string, diff --git a/packages/api/swagger/swagger-spec.json b/packages/api/swagger/swagger-spec.json index a266f957d..cbc4cc7e3 100644 --- a/packages/api/swagger/swagger-spec.json +++ b/packages/api/swagger/swagger-spec.json @@ -599,10 +599,10 @@ ] } }, - "/ticketing/tickets": { + "/crm/companies": { "get": { - "operationId": "getTickets", - "summary": "List a batch of Tickets", + "operationId": "getCompanies", + "summary": "List a batch of Companies", "parameters": [ { "name": "x-connection-token", @@ -655,7 +655,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedTicketOutput" + "$ref": "#/components/schemas/UnifiedCompanyOutput" } } } @@ -666,7 +666,7 @@ } }, "tags": [ - "ticketing/tickets" + "crm/companies" ], "security": [ { @@ -675,9 +675,9 @@ ] }, "post": { - "operationId": "addTicket", - "summary": "Create a Ticket", - "description": "Create a ticket in any supported Ticketing software", + "operationId": "addCompany", + "summary": "Create a Company", + "description": "Create a company in any supported Crm software", "parameters": [ { "name": "x-connection-token", @@ -692,7 +692,7 @@ "name": "remote_data", "required": false, "in": "query", - "description": "Set to true to include data from the original Ticketing software.", + "description": "Set to true to include data from the original Crm software.", "schema": { "type": "boolean" } @@ -703,7 +703,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnifiedTicketInput" + "$ref": "#/components/schemas/UnifiedCompanyInput" } } } @@ -721,7 +721,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedTicketOutput" + "$ref": "#/components/schemas/UnifiedCompanyOutput" } } } @@ -735,14 +735,14 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnifiedTicketOutput" + "$ref": "#/components/schemas/UnifiedCompanyOutput" } } } } }, "tags": [ - "ticketing/tickets" + "crm/companies" ], "security": [ { @@ -751,8 +751,8 @@ ] }, "patch": { - "operationId": "updateTicket", - "summary": "Update a Ticket", + "operationId": "updateCompany", + "summary": "Update a Company", "parameters": [ { "name": "id", @@ -769,14 +769,25 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnifiedTicketOutput" + "allOf": [ + { + "$ref": "#/components/schemas/ApiResponse" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/UnifiedCompanyOutput" + } + } + } + ] } } } } }, "tags": [ - "ticketing/tickets" + "crm/companies" ], "security": [ { @@ -785,17 +796,17 @@ ] } }, - "/ticketing/tickets/{id}": { + "/crm/companies/{id}": { "get": { - "operationId": "getTicket", - "summary": "Retrieve a Ticket", - "description": "Retrieve a ticket from any connected Ticketing software", + "operationId": "getCompany", + "summary": "Retrieve a Company", + "description": "Retrieve a company from any connected Crm software", "parameters": [ { "name": "id", "required": true, "in": "path", - "description": "id of the `ticket` you want to retrive.", + "description": "id of the company you want to retrieve.", "schema": { "type": "string" } @@ -804,7 +815,7 @@ "name": "remote_data", "required": false, "in": "query", - "description": "Set to true to include data from the original Ticketing software.", + "description": "Set to true to include data from the original Crm software.", "schema": { "type": "boolean" } @@ -823,7 +834,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedTicketOutput" + "$ref": "#/components/schemas/UnifiedCompanyOutput" } } } @@ -834,7 +845,7 @@ } }, "tags": [ - "ticketing/tickets" + "crm/companies" ], "security": [ { @@ -843,10 +854,10 @@ ] } }, - "/ticketing/tickets/batch": { + "/crm/companies/batch": { "post": { - "operationId": "addTickets", - "summary": "Add a batch of Tickets", + "operationId": "addCompanies", + "summary": "Add a batch of Companies", "parameters": [ { "name": "x-connection-token", @@ -861,7 +872,7 @@ "name": "remote_data", "required": false, "in": "query", - "description": "Set to true to include data from the original Ticketing software.", + "description": "Set to true to include data from the original Crm software.", "schema": { "type": "boolean" } @@ -874,7 +885,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/UnifiedTicketInput" + "$ref": "#/components/schemas/UnifiedCompanyInput" } } } @@ -893,7 +904,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedTicketOutput" + "$ref": "#/components/schemas/UnifiedCompanyOutput" } } } @@ -909,7 +920,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/UnifiedTicketOutput" + "$ref": "#/components/schemas/UnifiedCompanyOutput" } } } @@ -917,7 +928,7 @@ } }, "tags": [ - "ticketing/tickets" + "crm/companies" ], "security": [ { @@ -926,10 +937,10 @@ ] } }, - "/ticketing/users": { + "/crm/contacts": { "get": { - "operationId": "getUsers", - "summary": "List a batch of Users", + "operationId": "getContacts", + "summary": "List a batch of CRM Contacts", "parameters": [ { "name": "x-connection-token", @@ -982,7 +993,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedUserOutput" + "$ref": "#/components/schemas/UnifiedContactOutput" } } } @@ -993,26 +1004,24 @@ } }, "tags": [ - "ticketing/users" + "crm/contacts" ], "security": [ { "JWT": [] } ] - } - }, - "/ticketing/users/{id}": { - "get": { - "operationId": "getUser", - "summary": "Retrieve a User", - "description": "Retrieve a user from any connected Ticketing software", + }, + "post": { + "operationId": "addContact", + "summary": "Create CRM Contact", + "description": "Create a contact in any supported CRM", "parameters": [ { - "name": "id", + "name": "x-connection-token", "required": true, - "in": "path", - "description": "id of the user you want to retrieve.", + "in": "header", + "description": "The connection token", "schema": { "type": "string" } @@ -1021,12 +1030,22 @@ "name": "remote_data", "required": false, "in": "query", - "description": "Set to true to include data from the original Ticketing software.", + "description": "Set to true to include data from the original CRM software.", "schema": { "type": "boolean" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnifiedContactInput" + } + } + } + }, "responses": { "200": { "description": "", @@ -1040,7 +1059,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedUserOutput" + "$ref": "#/components/schemas/UnifiedContactOutput" } } } @@ -1048,10 +1067,54 @@ } } } + }, + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnifiedContactOutput" + } + } + } } }, "tags": [ - "ticketing/users" + "crm/contacts" + ], + "security": [ + { + "JWT": [] + } + ] + }, + "patch": { + "operationId": "updateContact", + "summary": "Update a CRM Contact", + "parameters": [ + { + "name": "id", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnifiedContactOutput" + } + } + } + } + }, + "tags": [ + "crm/contacts" ], "security": [ { @@ -1060,16 +1123,17 @@ ] } }, - "/ticketing/accounts": { + "/crm/contacts/{id}": { "get": { - "operationId": "getAccounts", - "summary": "List a batch of Accounts", + "operationId": "getContact", + "summary": "Retrieve a CRM Contact", + "description": "Retrieve a contact from any connected CRM", "parameters": [ { - "name": "x-connection-token", + "name": "id", "required": true, - "in": "header", - "description": "The connection token", + "in": "path", + "description": "id of the `contact` you want to retrive.", "schema": { "type": "string" } @@ -1078,29 +1142,10 @@ "name": "remote_data", "required": false, "in": "query", - "description": "Set to true to include data from the original software.", + "description": "Set to true to include data from the original CRM software.", "schema": { "type": "boolean" } - }, - { - "name": "pageSize", - "required": false, - "in": "query", - "description": "Set to get the number of records.", - "schema": { - "default": 50, - "type": "number" - } - }, - { - "name": "cursor", - "required": false, - "in": "query", - "description": "Set to get the number of records after this cursor.", - "schema": { - "type": "string" - } } ], "responses": { @@ -1116,7 +1161,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedAccountOutput" + "$ref": "#/components/schemas/UnifiedContactOutput" } } } @@ -1127,7 +1172,7 @@ } }, "tags": [ - "ticketing/accounts" + "crm/contacts" ], "security": [ { @@ -1136,17 +1181,16 @@ ] } }, - "/ticketing/accounts/{id}": { - "get": { - "operationId": "getAccount", - "summary": "Retrieve an Account", - "description": "Retrieve an account from any connected Ticketing software", + "/crm/contacts/batch": { + "post": { + "operationId": "addContacts", + "summary": "Add a batch of CRM Contacts", "parameters": [ { - "name": "id", + "name": "x-connection-token", "required": true, - "in": "path", - "description": "id of the account you want to retrieve.", + "in": "header", + "description": "The connection token", "schema": { "type": "string" } @@ -1155,12 +1199,25 @@ "name": "remote_data", "required": false, "in": "query", - "description": "Set to true to include data from the original Ticketing software.", + "description": "Set to true to include data from the original CRM software.", "schema": { "type": "boolean" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UnifiedContactInput" + } + } + } + } + }, "responses": { "200": { "description": "", @@ -1174,7 +1231,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedAccountOutput" + "$ref": "#/components/schemas/UnifiedContactOutput" } } } @@ -1182,10 +1239,23 @@ } } } + }, + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UnifiedContactOutput" + } + } + } + } } }, "tags": [ - "ticketing/accounts" + "crm/contacts" ], "security": [ { @@ -1194,10 +1264,10 @@ ] } }, - "/ticketing/contacts": { + "/crm/deals": { "get": { - "operationId": "getContacts", - "summary": "List a batch of Contacts", + "operationId": "getDeals", + "summary": "List a batch of Deals", "parameters": [ { "name": "x-connection-token", @@ -1250,141 +1320,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedContactOutput" - } - } - } - ] - } - } - } - } - }, - "tags": [ - "ticketing/contacts" - ], - "security": [ - { - "JWT": [] - } - ] - } - }, - "/ticketing/contacts/{id}": { - "get": { - "operationId": "getContact", - "summary": "Retrieve a Contact", - "description": "Retrieve a contact from any connected Ticketing software", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "description": "id of the contact you want to retrieve.", - "schema": { - "type": "string" - } - }, - { - "name": "remote_data", - "required": false, - "in": "query", - "description": "Set to true to include data from the original Ticketing software.", - "schema": { - "type": "boolean" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiResponse" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/UnifiedContactOutput" - } - } - } - ] - } - } - } - } - }, - "tags": [ - "ticketing/contacts" - ], - "security": [ - { - "JWT": [] - } - ] - } - }, - "/crm/companies": { - "get": { - "operationId": "getCompanies", - "summary": "List a batch of Companies", - "parameters": [ - { - "name": "x-connection-token", - "required": true, - "in": "header", - "description": "The connection token", - "schema": { - "type": "string" - } - }, - { - "name": "remote_data", - "required": false, - "in": "query", - "description": "Set to true to include data from the original software.", - "schema": { - "type": "boolean" - } - }, - { - "name": "pageSize", - "required": false, - "in": "query", - "description": "Set to get the number of records.", - "schema": { - "default": 50, - "type": "number" - } - }, - { - "name": "cursor", - "required": false, - "in": "query", - "description": "Set to get the number of records after this cursor.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiResponse" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/UnifiedCompanyOutput" + "$ref": "#/components/schemas/UnifiedDealOutput" } } } @@ -1395,7 +1331,7 @@ } }, "tags": [ - "crm/companies" + "crm/deals" ], "security": [ { @@ -1404,9 +1340,9 @@ ] }, "post": { - "operationId": "addCompany", - "summary": "Create a Company", - "description": "Create a company in any supported Crm software", + "operationId": "addDeal", + "summary": "Create a Deal", + "description": "Create a deal in any supported Crm software", "parameters": [ { "name": "x-connection-token", @@ -1432,7 +1368,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnifiedCompanyInput" + "$ref": "#/components/schemas/UnifiedDealInput" } } } @@ -1450,7 +1386,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedCompanyOutput" + "$ref": "#/components/schemas/UnifiedDealOutput" } } } @@ -1464,32 +1400,45 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnifiedCompanyOutput" + "$ref": "#/components/schemas/UnifiedDealOutput" } } } } }, "tags": [ - "crm/companies" + "crm/deals" ], "security": [ { "JWT": [] } ] - }, - "patch": { - "operationId": "updateCompany", - "summary": "Update a Company", + } + }, + "/crm/deals/{id}": { + "get": { + "operationId": "getDeal", + "summary": "Retrieve a Deal", + "description": "Retrieve a deal from any connected Crm software", "parameters": [ { "name": "id", "required": true, - "in": "query", + "in": "path", + "description": "id of the deal you want to retrieve.", "schema": { "type": "string" } + }, + { + "name": "remote_data", + "required": false, + "in": "query", + "description": "Set to true to include data from the original Crm software.", + "schema": { + "type": "boolean" + } } ], "responses": { @@ -1505,7 +1454,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedCompanyOutput" + "$ref": "#/components/schemas/UnifiedDealOutput" } } } @@ -1516,38 +1465,25 @@ } }, "tags": [ - "crm/companies" + "crm/deals" ], "security": [ { "JWT": [] } ] - } - }, - "/crm/companies/{id}": { - "get": { - "operationId": "getCompany", - "summary": "Retrieve a Company", - "description": "Retrieve a company from any connected Crm software", + }, + "patch": { + "operationId": "updateDeal", + "summary": "Update a Deal", "parameters": [ { "name": "id", "required": true, "in": "path", - "description": "id of the company you want to retrieve.", "schema": { "type": "string" } - }, - { - "name": "remote_data", - "required": false, - "in": "query", - "description": "Set to true to include data from the original Crm software.", - "schema": { - "type": "boolean" - } } ], "responses": { @@ -1563,7 +1499,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedCompanyOutput" + "$ref": "#/components/schemas/UnifiedDealOutput" } } } @@ -1574,7 +1510,7 @@ } }, "tags": [ - "crm/companies" + "crm/deals" ], "security": [ { @@ -1583,10 +1519,10 @@ ] } }, - "/crm/companies/batch": { + "/crm/deals/batch": { "post": { - "operationId": "addCompanies", - "summary": "Add a batch of Companies", + "operationId": "addDeals", + "summary": "Add a batch of Deals", "parameters": [ { "name": "x-connection-token", @@ -1614,7 +1550,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/UnifiedCompanyInput" + "$ref": "#/components/schemas/UnifiedDealInput" } } } @@ -1633,7 +1569,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedCompanyOutput" + "$ref": "#/components/schemas/UnifiedDealOutput" } } } @@ -1649,7 +1585,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/UnifiedCompanyOutput" + "$ref": "#/components/schemas/UnifiedDealOutput" } } } @@ -1657,7 +1593,7 @@ } }, "tags": [ - "crm/companies" + "crm/deals" ], "security": [ { @@ -1666,10 +1602,10 @@ ] } }, - "/crm/contacts": { + "/crm/engagements": { "get": { - "operationId": "getContacts", - "summary": "List a batch of CRM Contacts", + "operationId": "getEngagements", + "summary": "List a batch of Engagements", "parameters": [ { "name": "x-connection-token", @@ -1722,7 +1658,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedContactOutput" + "$ref": "#/components/schemas/UnifiedEngagementOutput" } } } @@ -1733,7 +1669,7 @@ } }, "tags": [ - "crm/contacts" + "crm/engagements" ], "security": [ { @@ -1742,9 +1678,9 @@ ] }, "post": { - "operationId": "addContact", - "summary": "Create CRM Contact", - "description": "Create a contact in any supported CRM", + "operationId": "addEngagement", + "summary": "Create a Engagement", + "description": "Create a engagement in any supported Crm software", "parameters": [ { "name": "x-connection-token", @@ -1759,7 +1695,7 @@ "name": "remote_data", "required": false, "in": "query", - "description": "Set to true to include data from the original CRM software.", + "description": "Set to true to include data from the original Crm software.", "schema": { "type": "boolean" } @@ -1770,7 +1706,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnifiedContactInput" + "$ref": "#/components/schemas/UnifiedEngagementInput" } } } @@ -1788,7 +1724,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedContactOutput" + "$ref": "#/components/schemas/UnifiedEngagementOutput" } } } @@ -1802,14 +1738,14 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnifiedContactOutput" + "$ref": "#/components/schemas/UnifiedEngagementOutput" } } } } }, "tags": [ - "crm/contacts" + "crm/engagements" ], "security": [ { @@ -1818,8 +1754,8 @@ ] }, "patch": { - "operationId": "updateContact", - "summary": "Update a CRM Contact", + "operationId": "updateEngagement", + "summary": "Update a Engagement", "parameters": [ { "name": "id", @@ -1836,14 +1772,25 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnifiedContactOutput" - } - } - } - } - }, - "tags": [ - "crm/contacts" + "allOf": [ + { + "$ref": "#/components/schemas/ApiResponse" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/UnifiedEngagementOutput" + } + } + } + ] + } + } + } + } + }, + "tags": [ + "crm/engagements" ], "security": [ { @@ -1852,17 +1799,17 @@ ] } }, - "/crm/contacts/{id}": { + "/crm/engagements/{id}": { "get": { - "operationId": "getContact", - "summary": "Retrieve a CRM Contact", - "description": "Retrieve a contact from any connected CRM", + "operationId": "getEngagement", + "summary": "Retrieve a Engagement", + "description": "Retrieve a engagement from any connected Crm software", "parameters": [ { "name": "id", "required": true, "in": "path", - "description": "id of the `contact` you want to retrive.", + "description": "id of the engagement you want to retrieve.", "schema": { "type": "string" } @@ -1871,7 +1818,7 @@ "name": "remote_data", "required": false, "in": "query", - "description": "Set to true to include data from the original CRM software.", + "description": "Set to true to include data from the original Crm software.", "schema": { "type": "boolean" } @@ -1890,7 +1837,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedContactOutput" + "$ref": "#/components/schemas/UnifiedEngagementOutput" } } } @@ -1901,7 +1848,7 @@ } }, "tags": [ - "crm/contacts" + "crm/engagements" ], "security": [ { @@ -1910,10 +1857,10 @@ ] } }, - "/crm/contacts/batch": { + "/crm/engagements/batch": { "post": { - "operationId": "addContacts", - "summary": "Add a batch of CRM Contacts", + "operationId": "addEngagements", + "summary": "Add a batch of Engagements", "parameters": [ { "name": "x-connection-token", @@ -1928,7 +1875,7 @@ "name": "remote_data", "required": false, "in": "query", - "description": "Set to true to include data from the original CRM software.", + "description": "Set to true to include data from the original Crm software.", "schema": { "type": "boolean" } @@ -1941,7 +1888,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/UnifiedContactInput" + "$ref": "#/components/schemas/UnifiedEngagementInput" } } } @@ -1960,7 +1907,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedContactOutput" + "$ref": "#/components/schemas/UnifiedEngagementOutput" } } } @@ -1976,7 +1923,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/UnifiedContactOutput" + "$ref": "#/components/schemas/UnifiedEngagementOutput" } } } @@ -1984,7 +1931,7 @@ } }, "tags": [ - "crm/contacts" + "crm/engagements" ], "security": [ { @@ -1993,10 +1940,10 @@ ] } }, - "/crm/deals": { + "/crm/notes": { "get": { - "operationId": "getDeals", - "summary": "List a batch of Deals", + "operationId": "getNotes", + "summary": "List a batch of Notes", "parameters": [ { "name": "x-connection-token", @@ -2049,7 +1996,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedDealOutput" + "$ref": "#/components/schemas/UnifiedNoteOutput" } } } @@ -2060,7 +2007,7 @@ } }, "tags": [ - "crm/deals" + "crm/notes" ], "security": [ { @@ -2069,9 +2016,9 @@ ] }, "post": { - "operationId": "addDeal", - "summary": "Create a Deal", - "description": "Create a deal in any supported Crm software", + "operationId": "addNote", + "summary": "Create a Note", + "description": "Create a note in any supported Crm software", "parameters": [ { "name": "x-connection-token", @@ -2097,7 +2044,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnifiedDealInput" + "$ref": "#/components/schemas/UnifiedNoteInput" } } } @@ -2115,7 +2062,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedDealOutput" + "$ref": "#/components/schemas/UnifiedNoteOutput" } } } @@ -2129,14 +2076,14 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnifiedDealOutput" + "$ref": "#/components/schemas/UnifiedNoteOutput" } } } } }, "tags": [ - "crm/deals" + "crm/notes" ], "security": [ { @@ -2145,17 +2092,17 @@ ] } }, - "/crm/deals/{id}": { + "/crm/notes/{id}": { "get": { - "operationId": "getDeal", - "summary": "Retrieve a Deal", - "description": "Retrieve a deal from any connected Crm software", + "operationId": "getNote", + "summary": "Retrieve a Note", + "description": "Retrieve a note from any connected Crm software", "parameters": [ { "name": "id", "required": true, "in": "path", - "description": "id of the deal you want to retrieve.", + "description": "id of the note you want to retrieve.", "schema": { "type": "string" } @@ -2183,52 +2130,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedDealOutput" - } - } - } - ] - } - } - } - } - }, - "tags": [ - "crm/deals" - ], - "security": [ - { - "JWT": [] - } - ] - }, - "patch": { - "operationId": "updateDeal", - "summary": "Update a Deal", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiResponse" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/UnifiedDealOutput" + "$ref": "#/components/schemas/UnifiedNoteOutput" } } } @@ -2239,7 +2141,7 @@ } }, "tags": [ - "crm/deals" + "crm/notes" ], "security": [ { @@ -2248,10 +2150,10 @@ ] } }, - "/crm/deals/batch": { + "/crm/notes/batch": { "post": { - "operationId": "addDeals", - "summary": "Add a batch of Deals", + "operationId": "addNotes", + "summary": "Add a batch of Notes", "parameters": [ { "name": "x-connection-token", @@ -2279,7 +2181,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/UnifiedDealInput" + "$ref": "#/components/schemas/UnifiedNoteInput" } } } @@ -2298,7 +2200,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedDealOutput" + "$ref": "#/components/schemas/UnifiedNoteOutput" } } } @@ -2314,7 +2216,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/UnifiedDealOutput" + "$ref": "#/components/schemas/UnifiedNoteOutput" } } } @@ -2322,7 +2224,7 @@ } }, "tags": [ - "crm/deals" + "crm/notes" ], "security": [ { @@ -2331,10 +2233,10 @@ ] } }, - "/crm/engagements": { + "/crm/stages": { "get": { - "operationId": "getEngagements", - "summary": "List a batch of Engagements", + "operationId": "getStages", + "summary": "List a batch of Stages", "parameters": [ { "name": "x-connection-token", @@ -2387,7 +2289,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedEngagementOutput" + "$ref": "#/components/schemas/UnifiedStageOutput" } } } @@ -2398,24 +2300,26 @@ } }, "tags": [ - "crm/engagements" + "crm/stages" ], "security": [ { "JWT": [] } ] - }, - "post": { - "operationId": "addEngagement", - "summary": "Create a Engagement", - "description": "Create a engagement in any supported Crm software", + } + }, + "/crm/stages/{id}": { + "get": { + "operationId": "getStage", + "summary": "Retrieve a Stage", + "description": "Retrieve a stage from any connected Crm software", "parameters": [ { - "name": "x-connection-token", + "name": "id", "required": true, - "in": "header", - "description": "The connection token", + "in": "path", + "description": "id of the stage you want to retrieve.", "schema": { "type": "string" } @@ -2430,16 +2334,6 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnifiedEngagementInput" - } - } - } - }, "responses": { "200": { "description": "", @@ -2453,7 +2347,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedEngagementOutput" + "$ref": "#/components/schemas/UnifiedStageOutput" } } } @@ -2461,35 +2355,56 @@ } } } - }, - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnifiedEngagementOutput" - } - } - } } }, "tags": [ - "crm/engagements" + "crm/stages" ], "security": [ { "JWT": [] } ] - }, - "patch": { - "operationId": "updateEngagement", - "summary": "Update a Engagement", + } + }, + "/crm/tasks": { + "get": { + "operationId": "getTasks", + "summary": "List a batch of Tasks", "parameters": [ { - "name": "id", + "name": "x-connection-token", "required": true, + "in": "header", + "description": "The connection token", + "schema": { + "type": "string" + } + }, + { + "name": "remote_data", + "required": false, + "in": "query", + "description": "Set to true to include data from the original software.", + "schema": { + "type": "boolean" + } + }, + { + "name": "pageSize", + "required": false, + "in": "query", + "description": "Set to get the number of records.", + "schema": { + "default": 50, + "type": "number" + } + }, + { + "name": "cursor", + "required": false, "in": "query", + "description": "Set to get the number of records after this cursor.", "schema": { "type": "string" } @@ -2508,7 +2423,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedEngagementOutput" + "$ref": "#/components/schemas/UnifiedTaskOutput" } } } @@ -2519,77 +2434,18 @@ } }, "tags": [ - "crm/engagements" + "crm/tasks" ], "security": [ { "JWT": [] } ] - } - }, - "/crm/engagements/{id}": { - "get": { - "operationId": "getEngagement", - "summary": "Retrieve a Engagement", - "description": "Retrieve a engagement from any connected Crm software", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "description": "id of the engagement you want to retrieve.", - "schema": { - "type": "string" - } - }, - { - "name": "remote_data", - "required": false, - "in": "query", - "description": "Set to true to include data from the original Crm software.", - "schema": { - "type": "boolean" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiResponse" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/UnifiedEngagementOutput" - } - } - } - ] - } - } - } - } - }, - "tags": [ - "crm/engagements" - ], - "security": [ - { - "JWT": [] - } - ] - } - }, - "/crm/engagements/batch": { + }, "post": { - "operationId": "addEngagements", - "summary": "Add a batch of Engagements", + "operationId": "addTask", + "summary": "Create a Task", + "description": "Create a task in any supported Crm software", "parameters": [ { "name": "x-connection-token", @@ -2615,10 +2471,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UnifiedEngagementInput" - } + "$ref": "#/components/schemas/UnifiedTaskInput" } } } @@ -2636,7 +2489,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedEngagementOutput" + "$ref": "#/components/schemas/UnifiedTaskOutput" } } } @@ -2650,93 +2503,14 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UnifiedEngagementOutput" - } - } - } - } - } - }, - "tags": [ - "crm/engagements" - ], - "security": [ - { - "JWT": [] - } - ] - } - }, - "/crm/notes": { - "get": { - "operationId": "getNotes", - "summary": "List a batch of Notes", - "parameters": [ - { - "name": "x-connection-token", - "required": true, - "in": "header", - "description": "The connection token", - "schema": { - "type": "string" - } - }, - { - "name": "remote_data", - "required": false, - "in": "query", - "description": "Set to true to include data from the original software.", - "schema": { - "type": "boolean" - } - }, - { - "name": "pageSize", - "required": false, - "in": "query", - "description": "Set to get the number of records.", - "schema": { - "default": 50, - "type": "number" - } - }, - { - "name": "cursor", - "required": false, - "in": "query", - "description": "Set to get the number of records after this cursor.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiResponse" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/UnifiedNoteOutput" - } - } - } - ] + "$ref": "#/components/schemas/UnifiedTaskOutput" } } } } }, "tags": [ - "crm/notes" + "crm/tasks" ], "security": [ { @@ -2744,40 +2518,19 @@ } ] }, - "post": { - "operationId": "addNote", - "summary": "Create a Note", - "description": "Create a note in any supported Crm software", + "patch": { + "operationId": "updateTask", + "summary": "Update a Task", "parameters": [ { - "name": "x-connection-token", + "name": "id", "required": true, - "in": "header", - "description": "The connection token", - "schema": { - "type": "string" - } - }, - { - "name": "remote_data", - "required": false, "in": "query", - "description": "Set to true to include data from the original Crm software.", "schema": { - "type": "boolean" + "type": "string" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnifiedNoteInput" - } - } - } - }, "responses": { "200": { "description": "", @@ -2791,7 +2544,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedNoteOutput" + "$ref": "#/components/schemas/UnifiedTaskOutput" } } } @@ -2799,20 +2552,10 @@ } } } - }, - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnifiedNoteOutput" - } - } - } } }, "tags": [ - "crm/notes" + "crm/tasks" ], "security": [ { @@ -2821,17 +2564,17 @@ ] } }, - "/crm/notes/{id}": { + "/crm/tasks/{id}": { "get": { - "operationId": "getNote", - "summary": "Retrieve a Note", - "description": "Retrieve a note from any connected Crm software", + "operationId": "getTask", + "summary": "Retrieve a Task", + "description": "Retrieve a task from any connected Crm software", "parameters": [ { "name": "id", "required": true, "in": "path", - "description": "id of the note you want to retrieve.", + "description": "id of the task you want to retrieve.", "schema": { "type": "string" } @@ -2859,7 +2602,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedNoteOutput" + "$ref": "#/components/schemas/UnifiedTaskOutput" } } } @@ -2870,7 +2613,7 @@ } }, "tags": [ - "crm/notes" + "crm/tasks" ], "security": [ { @@ -2879,10 +2622,10 @@ ] } }, - "/crm/notes/batch": { + "/crm/tasks/batch": { "post": { - "operationId": "addNotes", - "summary": "Add a batch of Notes", + "operationId": "addTasks", + "summary": "Add a batch of Tasks", "parameters": [ { "name": "x-connection-token", @@ -2910,7 +2653,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/UnifiedNoteInput" + "$ref": "#/components/schemas/UnifiedTaskInput" } } } @@ -2929,7 +2672,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedNoteOutput" + "$ref": "#/components/schemas/UnifiedTaskOutput" } } } @@ -2945,7 +2688,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/UnifiedNoteOutput" + "$ref": "#/components/schemas/UnifiedTaskOutput" } } } @@ -2953,7 +2696,7 @@ } }, "tags": [ - "crm/notes" + "crm/tasks" ], "security": [ { @@ -2962,10 +2705,10 @@ ] } }, - "/crm/stages": { + "/crm/users": { "get": { - "operationId": "getStages", - "summary": "List a batch of Stages", + "operationId": "getUsers", + "summary": "List a batch of Users", "parameters": [ { "name": "x-connection-token", @@ -3018,7 +2761,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedStageOutput" + "$ref": "#/components/schemas/UnifiedUserOutput" } } } @@ -3029,7 +2772,7 @@ } }, "tags": [ - "crm/stages" + "crm/users" ], "security": [ { @@ -3038,17 +2781,17 @@ ] } }, - "/crm/stages/{id}": { + "/crm/users/{id}": { "get": { - "operationId": "getStage", - "summary": "Retrieve a Stage", - "description": "Retrieve a stage from any connected Crm software", + "operationId": "getUser", + "summary": "Retrieve a User", + "description": "Retrieve a user from any connected Crm software", "parameters": [ { "name": "id", "required": true, "in": "path", - "description": "id of the stage you want to retrieve.", + "description": "id of the user you want to retrieve.", "schema": { "type": "string" } @@ -3076,7 +2819,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedStageOutput" + "$ref": "#/components/schemas/UnifiedUserOutput" } } } @@ -3087,7 +2830,7 @@ } }, "tags": [ - "crm/stages" + "crm/users" ], "security": [ { @@ -3096,10 +2839,10 @@ ] } }, - "/crm/tasks": { + "/ticketing/accounts": { "get": { - "operationId": "getTasks", - "summary": "List a batch of Tasks", + "operationId": "getAccounts", + "summary": "List a batch of Accounts", "parameters": [ { "name": "x-connection-token", @@ -3152,7 +2895,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedTaskOutput" + "$ref": "#/components/schemas/UnifiedAccountOutput" } } } @@ -3163,24 +2906,26 @@ } }, "tags": [ - "crm/tasks" + "ticketing/accounts" ], "security": [ { "JWT": [] } ] - }, - "post": { - "operationId": "addTask", - "summary": "Create a Task", - "description": "Create a task in any supported Crm software", + } + }, + "/ticketing/accounts/{id}": { + "get": { + "operationId": "getAccount", + "summary": "Retrieve an Account", + "description": "Retrieve an account from any connected Ticketing software", "parameters": [ { - "name": "x-connection-token", + "name": "id", "required": true, - "in": "header", - "description": "The connection token", + "in": "path", + "description": "id of the account you want to retrieve.", "schema": { "type": "string" } @@ -3189,22 +2934,12 @@ "name": "remote_data", "required": false, "in": "query", - "description": "Set to true to include data from the original Crm software.", + "description": "Set to true to include data from the original Ticketing software.", "schema": { "type": "boolean" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnifiedTaskInput" - } - } - } - }, "responses": { "200": { "description": "", @@ -3218,7 +2953,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedTaskOutput" + "$ref": "#/components/schemas/UnifiedAccountOutput" } } } @@ -3226,35 +2961,56 @@ } } } - }, - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnifiedTaskOutput" - } - } - } } }, "tags": [ - "crm/tasks" + "ticketing/accounts" ], "security": [ { "JWT": [] } ] - }, - "patch": { - "operationId": "updateTask", - "summary": "Update a Task", + } + }, + "/ticketing/collections": { + "get": { + "operationId": "getCollections", + "summary": "List a batch of Collections", "parameters": [ { - "name": "id", + "name": "x-connection-token", "required": true, + "in": "header", + "description": "The connection token", + "schema": { + "type": "string" + } + }, + { + "name": "remote_data", + "required": false, + "in": "query", + "description": "Set to true to include data from the original software.", + "schema": { + "type": "boolean" + } + }, + { + "name": "pageSize", + "required": false, + "in": "query", + "description": "Set to get the number of records.", + "schema": { + "default": 50, + "type": "number" + } + }, + { + "name": "cursor", + "required": false, "in": "query", + "description": "Set to get the number of records after this cursor.", "schema": { "type": "string" } @@ -3273,7 +3029,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedTaskOutput" + "$ref": "#/components/schemas/UnifiedCollectionOutput" } } } @@ -3284,7 +3040,7 @@ } }, "tags": [ - "crm/tasks" + "ticketing/collections" ], "security": [ { @@ -3293,17 +3049,17 @@ ] } }, - "/crm/tasks/{id}": { + "/ticketing/collections/{id}": { "get": { - "operationId": "getTask", - "summary": "Retrieve a Task", - "description": "Retrieve a task from any connected Crm software", + "operationId": "getCollection", + "summary": "Retrieve a Collection", + "description": "Retrieve a collection from any connected Ticketing software", "parameters": [ { "name": "id", "required": true, "in": "path", - "description": "id of the task you want to retrieve.", + "description": "id of the collection you want to retrieve.", "schema": { "type": "string" } @@ -3312,7 +3068,7 @@ "name": "remote_data", "required": false, "in": "query", - "description": "Set to true to include data from the original Crm software.", + "description": "Set to true to include data from the original Ticketing software.", "schema": { "type": "boolean" } @@ -3331,7 +3087,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedTaskOutput" + "$ref": "#/components/schemas/UnifiedCollectionOutput" } } } @@ -3342,7 +3098,7 @@ } }, "tags": [ - "crm/tasks" + "ticketing/collections" ], "security": [ { @@ -3351,10 +3107,10 @@ ] } }, - "/crm/tasks/batch": { - "post": { - "operationId": "addTasks", - "summary": "Add a batch of Tasks", + "/ticketing/comments": { + "get": { + "operationId": "getComments", + "summary": "List a batch of Comments", "parameters": [ { "name": "x-connection-token", @@ -3369,25 +3125,31 @@ "name": "remote_data", "required": false, "in": "query", - "description": "Set to true to include data from the original Crm software.", + "description": "Set to true to include data from the original software.", "schema": { "type": "boolean" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UnifiedTaskInput" - } - } + }, + { + "name": "pageSize", + "required": false, + "in": "query", + "description": "Set to get the number of records.", + "schema": { + "default": 50, + "type": "number" + } + }, + { + "name": "cursor", + "required": false, + "in": "query", + "description": "Set to get the number of records after this cursor.", + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { "description": "", @@ -3401,7 +3163,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedTaskOutput" + "$ref": "#/components/schemas/UnifiedCommentOutput" } } } @@ -3409,35 +3171,21 @@ } } } - }, - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UnifiedTaskOutput" - } - } - } - } } }, "tags": [ - "crm/tasks" + "ticketing/comments" ], "security": [ { "JWT": [] } ] - } - }, - "/crm/users": { - "get": { - "operationId": "getUsers", - "summary": "List a batch of Users", + }, + "post": { + "operationId": "addComment", + "summary": "Create a Comment", + "description": "Create a comment in any supported Ticketing software", "parameters": [ { "name": "x-connection-token", @@ -3452,31 +3200,22 @@ "name": "remote_data", "required": false, "in": "query", - "description": "Set to true to include data from the original software.", + "description": "Set to true to include data from the original Ticketing software.", "schema": { "type": "boolean" } - }, - { - "name": "pageSize", - "required": false, - "in": "query", - "description": "Set to get the number of records.", - "schema": { - "default": 50, - "type": "number" - } - }, - { - "name": "cursor", - "required": false, - "in": "query", - "description": "Set to get the number of records after this cursor.", - "schema": { - "type": "string" - } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnifiedCommentInput" + } + } + } + }, "responses": { "200": { "description": "", @@ -3490,7 +3229,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedUserOutput" + "$ref": "#/components/schemas/UnifiedCommentOutput" } } } @@ -3498,10 +3237,20 @@ } } } + }, + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnifiedCommentOutput" + } + } + } } }, "tags": [ - "crm/users" + "ticketing/comments" ], "security": [ { @@ -3510,17 +3259,17 @@ ] } }, - "/crm/users/{id}": { + "/ticketing/comments/{id}": { "get": { - "operationId": "getUser", - "summary": "Retrieve a User", - "description": "Retrieve a user from any connected Crm software", + "operationId": "getComment", + "summary": "Retrieve a Comment", + "description": "Retrieve a comment from any connected Ticketing software", "parameters": [ { "name": "id", "required": true, "in": "path", - "description": "id of the user you want to retrieve.", + "description": "id of the `comment` you want to retrive.", "schema": { "type": "string" } @@ -3529,7 +3278,7 @@ "name": "remote_data", "required": false, "in": "query", - "description": "Set to true to include data from the original Crm software.", + "description": "Set to true to include data from the original Ticketing software.", "schema": { "type": "boolean" } @@ -3548,7 +3297,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedUserOutput" + "$ref": "#/components/schemas/UnifiedCommentOutput" } } } @@ -3559,7 +3308,7 @@ } }, "tags": [ - "crm/users" + "ticketing/comments" ], "security": [ { @@ -3568,10 +3317,10 @@ ] } }, - "/ticketing/collections": { - "get": { - "operationId": "getCollections", - "summary": "List a batch of Collections", + "/ticketing/comments/batch": { + "post": { + "operationId": "addComments", + "summary": "Add a batch of Comments", "parameters": [ { "name": "x-connection-token", @@ -3586,31 +3335,25 @@ "name": "remote_data", "required": false, "in": "query", - "description": "Set to true to include data from the original software.", + "description": "Set to true to include data from the original Ticketing software.", "schema": { "type": "boolean" } - }, - { - "name": "pageSize", - "required": false, - "in": "query", - "description": "Set to get the number of records.", - "schema": { - "default": 50, - "type": "number" - } - }, - { - "name": "cursor", - "required": false, - "in": "query", - "description": "Set to get the number of records after this cursor.", - "schema": { - "type": "string" - } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UnifiedCommentInput" + } + } + } + } + }, "responses": { "200": { "description": "", @@ -3624,7 +3367,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedCollectionOutput" + "$ref": "#/components/schemas/UnifiedCommentOutput" } } } @@ -3632,68 +3375,23 @@ } } } - } - }, - "tags": [ - "ticketing/collections" - ], - "security": [ - { - "JWT": [] - } - ] - } - }, - "/ticketing/collections/{id}": { - "get": { - "operationId": "getCollection", - "summary": "Retrieve a Collection", - "description": "Retrieve a collection from any connected Ticketing software", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "description": "id of the collection you want to retrieve.", - "schema": { - "type": "string" - } }, - { - "name": "remote_data", - "required": false, - "in": "query", - "description": "Set to true to include data from the original Ticketing software.", - "schema": { - "type": "boolean" - } - } - ], - "responses": { - "200": { + "201": { "description": "", "content": { "application/json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiResponse" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/UnifiedCollectionOutput" - } - } - } - ] + "type": "array", + "items": { + "$ref": "#/components/schemas/UnifiedCommentOutput" + } } } } } }, "tags": [ - "ticketing/collections" + "ticketing/comments" ], "security": [ { @@ -3702,10 +3400,10 @@ ] } }, - "/ticketing/comments": { + "/ticketing/contacts": { "get": { - "operationId": "getComments", - "summary": "List a batch of Comments", + "operationId": "getContacts", + "summary": "List a batch of Contacts", "parameters": [ { "name": "x-connection-token", @@ -3758,7 +3456,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedCommentOutput" + "$ref": "#/components/schemas/UnifiedContactOutput" } } } @@ -3769,24 +3467,26 @@ } }, "tags": [ - "ticketing/comments" + "ticketing/contacts" ], "security": [ { "JWT": [] } ] - }, - "post": { - "operationId": "addComment", - "summary": "Create a Comment", - "description": "Create a comment in any supported Ticketing software", + } + }, + "/ticketing/contacts/{id}": { + "get": { + "operationId": "getContact", + "summary": "Retrieve a Contact", + "description": "Retrieve a contact from any connected Ticketing software", "parameters": [ { - "name": "x-connection-token", + "name": "id", "required": true, - "in": "header", - "description": "The connection token", + "in": "path", + "description": "id of the contact you want to retrieve.", "schema": { "type": "string" } @@ -3801,16 +3501,6 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnifiedCommentInput" - } - } - } - }, "responses": { "200": { "description": "", @@ -3824,7 +3514,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedCommentOutput" + "$ref": "#/components/schemas/UnifiedContactOutput" } } } @@ -3832,20 +3522,10 @@ } } } - }, - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnifiedCommentOutput" - } - } - } } }, "tags": [ - "ticketing/comments" + "ticketing/contacts" ], "security": [ { @@ -3854,17 +3534,16 @@ ] } }, - "/ticketing/comments/{id}": { + "/ticketing/tags": { "get": { - "operationId": "getComment", - "summary": "Retrieve a Comment", - "description": "Retrieve a comment from any connected Ticketing software", + "operationId": "getTags", + "summary": "List a batch of Tags", "parameters": [ { - "name": "id", + "name": "x-connection-token", "required": true, - "in": "path", - "description": "id of the `comment` you want to retrive.", + "in": "header", + "description": "The connection token", "schema": { "type": "string" } @@ -3873,10 +3552,29 @@ "name": "remote_data", "required": false, "in": "query", - "description": "Set to true to include data from the original Ticketing software.", + "description": "Set to true to include data from the original software.", "schema": { "type": "boolean" } + }, + { + "name": "pageSize", + "required": false, + "in": "query", + "description": "Set to get the number of records.", + "schema": { + "default": 50, + "type": "number" + } + }, + { + "name": "cursor", + "required": false, + "in": "query", + "description": "Set to get the number of records after this cursor.", + "schema": { + "type": "string" + } } ], "responses": { @@ -3892,7 +3590,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedCommentOutput" + "$ref": "#/components/schemas/UnifiedTagOutput" } } } @@ -3903,7 +3601,7 @@ } }, "tags": [ - "ticketing/comments" + "ticketing/tags" ], "security": [ { @@ -3912,16 +3610,17 @@ ] } }, - "/ticketing/comments/batch": { - "post": { - "operationId": "addComments", - "summary": "Add a batch of Comments", + "/ticketing/tags/{id}": { + "get": { + "operationId": "getTag", + "summary": "Retrieve a Tag", + "description": "Retrieve a tag from any connected Ticketing software", "parameters": [ { - "name": "x-connection-token", + "name": "id", "required": true, - "in": "header", - "description": "The connection token", + "in": "path", + "description": "id of the tag you want to retrieve.", "schema": { "type": "string" } @@ -3936,19 +3635,6 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UnifiedCommentInput" - } - } - } - } - }, "responses": { "200": { "description": "", @@ -3962,7 +3648,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedCommentOutput" + "$ref": "#/components/schemas/UnifiedTagOutput" } } } @@ -3970,23 +3656,10 @@ } } } - }, - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UnifiedCommentOutput" - } - } - } - } } }, "tags": [ - "ticketing/comments" + "ticketing/tags" ], "security": [ { @@ -3995,10 +3668,10 @@ ] } }, - "/ticketing/tags": { + "/ticketing/teams": { "get": { - "operationId": "getTags", - "summary": "List a batch of Tags", + "operationId": "getTeams", + "summary": "List a batch of Teams", "parameters": [ { "name": "x-connection-token", @@ -4051,7 +3724,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedTagOutput" + "$ref": "#/components/schemas/UnifiedTeamOutput" } } } @@ -4062,7 +3735,7 @@ } }, "tags": [ - "ticketing/tags" + "ticketing/teams" ], "security": [ { @@ -4071,17 +3744,17 @@ ] } }, - "/ticketing/tags/{id}": { + "/ticketing/teams/{id}": { "get": { - "operationId": "getTag", - "summary": "Retrieve a Tag", - "description": "Retrieve a tag from any connected Ticketing software", + "operationId": "getTeam", + "summary": "Retrieve a Team", + "description": "Retrieve a team from any connected Ticketing software", "parameters": [ { "name": "id", "required": true, "in": "path", - "description": "id of the tag you want to retrieve.", + "description": "id of the team you want to retrieve.", "schema": { "type": "string" } @@ -4109,7 +3782,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedTagOutput" + "$ref": "#/components/schemas/UnifiedTeamOutput" } } } @@ -4120,7 +3793,7 @@ } }, "tags": [ - "ticketing/tags" + "ticketing/teams" ], "security": [ { @@ -4129,10 +3802,10 @@ ] } }, - "/ticketing/teams": { + "/ticketing/tickets": { "get": { - "operationId": "getTeams", - "summary": "List a batch of Teams", + "operationId": "getTickets", + "summary": "List a batch of Tickets", "parameters": [ { "name": "x-connection-token", @@ -4185,7 +3858,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedTeamOutput" + "$ref": "#/components/schemas/UnifiedTicketOutput" } } } @@ -4196,26 +3869,24 @@ } }, "tags": [ - "ticketing/teams" + "ticketing/tickets" ], "security": [ { "JWT": [] } ] - } - }, - "/ticketing/teams/{id}": { - "get": { - "operationId": "getTeam", - "summary": "Retrieve a Team", - "description": "Retrieve a team from any connected Ticketing software", - "parameters": [ - { - "name": "id", + }, + "post": { + "operationId": "addTicket", + "summary": "Create a Ticket", + "description": "Create a ticket in any supported Ticketing software", + "parameters": [ + { + "name": "x-connection-token", "required": true, - "in": "path", - "description": "id of the team you want to retrieve.", + "in": "header", + "description": "The connection token", "schema": { "type": "string" } @@ -4230,6 +3901,16 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnifiedTicketInput" + } + } + } + }, "responses": { "200": { "description": "", @@ -4243,7 +3924,7 @@ { "properties": { "data": { - "$ref": "#/components/schemas/UnifiedTeamOutput" + "$ref": "#/components/schemas/UnifiedTicketOutput" } } } @@ -4251,85 +3932,30 @@ } } } + }, + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnifiedTicketOutput" + } + } + } } }, "tags": [ - "ticketing/teams" + "ticketing/tickets" ], "security": [ { "JWT": [] } ] - } - }, - "/linked-users": { - "post": { - "operationId": "addLinkedUser", - "summary": "Add Linked User", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateLinkedUserDto" - } - } - } - }, - "responses": { - "201": { - "description": "" - } - }, - "tags": [ - "linked-users" - ] }, - "get": { - "operationId": "fetchLinkedUsers", - "summary": "Retrieve Linked Users", - "parameters": [], - "responses": { - "200": { - "description": "" - } - }, - "tags": [ - "linked-users" - ] - } - }, - "/linked-users/batch": { - "post": { - "operationId": "addBatchLinkedUsers", - "summary": "Add Batch Linked Users", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateBatchLinkedUserDto" - } - } - } - }, - "responses": { - "201": { - "description": "" - } - }, - "tags": [ - "linked-users" - ] - } - }, - "/linked-users/single": { - "get": { - "operationId": "getLinkedUser", - "summary": "Retrieve a Linked User", + "patch": { + "operationId": "updateTicket", + "summary": "Update a Ticket", "parameters": [ { "name": "id", @@ -4342,172 +3968,312 @@ ], "responses": { "200": { - "description": "" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnifiedTicketOutput" + } + } + } } }, "tags": [ - "linked-users" + "ticketing/tickets" + ], + "security": [ + { + "JWT": [] + } ] } }, - "/linked-users/fromRemoteId": { + "/ticketing/tickets/{id}": { "get": { - "operationId": "linkedUserFromRemoteId", - "summary": "Retrieve a Linked User From A Remote Id", + "operationId": "getTicket", + "summary": "Retrieve a Ticket", + "description": "Retrieve a ticket from any connected Ticketing software", "parameters": [ { - "name": "remoteId", + "name": "id", "required": true, - "in": "query", + "in": "path", + "description": "id of the `ticket` you want to retrive.", "schema": { "type": "string" } + }, + { + "name": "remote_data", + "required": false, + "in": "query", + "description": "Set to true to include data from the original Ticketing software.", + "schema": { + "type": "boolean" + } } ], "responses": { "200": { - "description": "" + "description": "", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiResponse" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/UnifiedTicketOutput" + } + } + } + ] + } + } + } } }, "tags": [ - "linked-users" - ] - } - }, - "/organisations": { - "get": { - "operationId": "getOrganisations", - "summary": "Retrieve Organisations", - "parameters": [], - "responses": { - "200": { - "description": "" + "ticketing/tickets" + ], + "security": [ + { + "JWT": [] } - }, - "tags": [ - "organisations" ] } }, - "/organisations/create": { + "/ticketing/tickets/batch": { "post": { - "operationId": "createOrganisation", - "summary": "Create an Organisation", - "parameters": [], + "operationId": "addTickets", + "summary": "Add a batch of Tickets", + "parameters": [ + { + "name": "x-connection-token", + "required": true, + "in": "header", + "description": "The connection token", + "schema": { + "type": "string" + } + }, + { + "name": "remote_data", + "required": false, + "in": "query", + "description": "Set to true to include data from the original Ticketing software.", + "schema": { + "type": "boolean" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateOrganizationDto" + "type": "array", + "items": { + "$ref": "#/components/schemas/UnifiedTicketInput" + } } } } }, "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiResponse" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/UnifiedTicketOutput" + } + } + } + ] + } + } + } + }, "201": { - "description": "" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UnifiedTicketOutput" + } + } + } + } } }, "tags": [ - "organisations" - ] - } - }, - "/projects": { - "get": { - "operationId": "getProjects", - "summary": "Retrieve projects", - "parameters": [], - "responses": { - "200": { - "description": "" - } - }, - "tags": [ - "projects" - ] - }, - "post": { - "operationId": "createProject", - "summary": "Create a project", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateProjectDto" - } - } - } - }, - "responses": { - "201": { - "description": "" + "ticketing/tickets" + ], + "security": [ + { + "JWT": [] } - }, - "tags": [ - "projects" ] } }, - "/field-mappings/entities": { + "/ticketing/users": { "get": { - "operationId": "getFieldMappingsEntities", - "summary": "Retrieve field mapping entities", - "parameters": [], - "responses": { - "200": { - "description": "" + "operationId": "getUsers", + "summary": "List a batch of Users", + "parameters": [ + { + "name": "x-connection-token", + "required": true, + "in": "header", + "description": "The connection token", + "schema": { + "type": "string" + } + }, + { + "name": "remote_data", + "required": false, + "in": "query", + "description": "Set to true to include data from the original software.", + "schema": { + "type": "boolean" + } + }, + { + "name": "pageSize", + "required": false, + "in": "query", + "description": "Set to get the number of records.", + "schema": { + "default": 50, + "type": "number" + } + }, + { + "name": "cursor", + "required": false, + "in": "query", + "description": "Set to get the number of records after this cursor.", + "schema": { + "type": "string" + } } - }, - "tags": [ - "field-mappings" - ] - } - }, - "/field-mappings/attribute": { - "get": { - "operationId": "getFieldMappings", - "summary": "Retrieve field mappings", - "parameters": [], + ], "responses": { "200": { - "description": "" + "description": "", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiResponse" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/UnifiedUserOutput" + } + } + } + ] + } + } + } } }, "tags": [ - "field-mappings" + "ticketing/users" + ], + "security": [ + { + "JWT": [] + } ] } }, - "/field-mappings/value": { + "/ticketing/users/{id}": { "get": { - "operationId": "getFieldMappingValues", - "summary": "Retrieve field mappings values", - "parameters": [], + "operationId": "getUser", + "summary": "Retrieve a User", + "description": "Retrieve a user from any connected Ticketing software", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "id of the user you want to retrieve.", + "schema": { + "type": "string" + } + }, + { + "name": "remote_data", + "required": false, + "in": "query", + "description": "Set to true to include data from the original Ticketing software.", + "schema": { + "type": "boolean" + } + } + ], "responses": { "200": { - "description": "" + "description": "", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiResponse" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/UnifiedUserOutput" + } + } + } + ] + } + } + } } }, "tags": [ - "field-mappings" + "ticketing/users" + ], + "security": [ + { + "JWT": [] + } ] } }, - "/field-mappings/define": { + "/linked-users": { "post": { - "operationId": "defineTargetField", - "summary": "Define target Field", + "operationId": "addLinkedUser", + "summary": "Add Linked User", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DefineTargetFieldDto" + "$ref": "#/components/schemas/CreateLinkedUserDto" } } } @@ -4518,46 +4284,34 @@ } }, "tags": [ - "field-mappings" + "linked-users" ] - } - }, - "/field-mappings": { - "post": { - "operationId": "createCustomField", - "summary": "Create Custom Field", + }, + "get": { + "operationId": "fetchLinkedUsers", + "summary": "Retrieve Linked Users", "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomFieldCreateDto" - } - } - } - }, "responses": { - "201": { + "200": { "description": "" } }, "tags": [ - "field-mappings" + "linked-users" ] } }, - "/field-mappings/map": { + "/linked-users/batch": { "post": { - "operationId": "mapField", - "summary": "Map Custom Field", + "operationId": "addBatchLinkedUsers", + "summary": "Add Batch Linked Users", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MapFieldToProviderDto" + "$ref": "#/components/schemas/CreateBatchLinkedUserDto" } } } @@ -4568,33 +4322,17 @@ } }, "tags": [ - "field-mappings" + "linked-users" ] } }, - "/field-mappings/properties": { + "/linked-users/single": { "get": { - "operationId": "getCustomProviderProperties", - "summary": "Retrieve Custom Properties", + "operationId": "getLinkedUser", + "summary": "Retrieve a Linked User", "parameters": [ { - "name": "linkedUserId", - "required": true, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "providerId", - "required": true, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "vertical", + "name": "id", "required": true, "in": "query", "schema": { @@ -4608,33 +4346,21 @@ } }, "tags": [ - "field-mappings" + "linked-users" ] } }, - "/events": { + "/linked-users/fromRemoteId": { "get": { - "operationId": "getEvents", - "summary": "Retrieve Events", + "operationId": "linkedUserFromRemoteId", + "summary": "Retrieve a Linked User From A Remote Id", "parameters": [ { - "name": "page", - "required": false, - "in": "query", - "schema": { - "minimum": 1, - "default": 1, - "type": "number" - } - }, - { - "name": "pageSize", - "required": false, + "name": "remoteId", + "required": true, "in": "query", "schema": { - "minimum": 1, - "default": 10, - "type": "number" + "type": "string" } } ], @@ -4644,43 +4370,36 @@ } }, "tags": [ - "events" + "linked-users" ] } }, - "/events/count": { + "/organisations": { "get": { - "operationId": "getEventsCount", - "summary": "Retrieve Events Count", + "operationId": "getOrganisations", + "summary": "Retrieve Organisations", "parameters": [], "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "number" - } - } - } + "description": "" } }, "tags": [ - "events" + "organisations" ] } }, - "/magic-links": { + "/organisations/create": { "post": { - "operationId": "createMagicLink", - "summary": "Create a Magic Link", + "operationId": "createOrganisation", + "summary": "Create an Organisation", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateMagicLinkDto" + "$ref": "#/components/schemas/CreateOrganizationDto" } } } @@ -4691,175 +4410,104 @@ } }, "tags": [ - "magic-links" - ] - }, - "get": { - "operationId": "getMagicLinks", - "summary": "Retrieve Magic Links", - "parameters": [], - "responses": { - "200": { - "description": "" - } - }, - "tags": [ - "magic-links" + "organisations" ] } }, - "/magic-links/single": { + "/projects": { "get": { - "operationId": "getMagicLink", - "summary": "Retrieve a Magic Link", - "parameters": [ - { - "name": "id", - "required": true, - "in": "query", - "schema": { - "type": "string" - } - } - ], + "operationId": "getProjects", + "summary": "Retrieve projects", + "parameters": [], "responses": { "200": { "description": "" } }, "tags": [ - "magic-links" + "projects" ] - } - }, - "/passthrough": { + }, "post": { - "operationId": "passthroughRequest", - "summary": "Make a passthrough request", - "parameters": [ - { - "name": "integrationId", - "required": true, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "linkedUserId", - "required": true, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "vertical", - "required": true, - "in": "query", - "schema": { - "type": "string" - } - } - ], + "operationId": "createProject", + "summary": "Create a project", + "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PassThroughRequestDto" + "$ref": "#/components/schemas/CreateProjectDto" } } } }, "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PassThroughResponse" - } - } - } - }, "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PassThroughResponse" - } - } - } + "description": "" } }, "tags": [ - "passthrough" + "projects" ] } }, - "/connections-strategies/create": { - "post": { - "operationId": "createConnectionStrategy", - "summary": "Create Connection Strategy", + "/field-mappings/entities": { + "get": { + "operationId": "getFieldMappingsEntities", + "summary": "Retrieve field mapping entities", "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateConnectionStrategyDto" - } - } - } - }, "responses": { - "201": { + "200": { "description": "" } }, "tags": [ - "connections-strategies" + "field-mappings" ] } }, - "/connections-strategies/toggle": { - "post": { - "operationId": "toggleConnectionStrategy", - "summary": "Activate/Deactivate Connection Strategy", + "/field-mappings/attribute": { + "get": { + "operationId": "getFieldMappings", + "summary": "Retrieve field mappings", "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ToggleStrategyDto" - } - } + "responses": { + "200": { + "description": "" } }, + "tags": [ + "field-mappings" + ] + } + }, + "/field-mappings/value": { + "get": { + "operationId": "getFieldMappingValues", + "summary": "Retrieve field mappings values", + "parameters": [], "responses": { - "201": { + "200": { "description": "" } }, "tags": [ - "connections-strategies" + "field-mappings" ] } }, - "/connections-strategies/delete": { + "/field-mappings/define": { "post": { - "operationId": "deleteConnectionStrategy", - "summary": "Delete Connection Strategy", + "operationId": "defineTargetField", + "summary": "Define target Field", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteCSDto" + "$ref": "#/components/schemas/DefineTargetFieldDto" } } } @@ -4870,21 +4518,21 @@ } }, "tags": [ - "connections-strategies" + "field-mappings" ] } }, - "/connections-strategies/update": { + "/field-mappings": { "post": { - "operationId": "updateConnectionStrategy", - "summary": "Update Connection Strategy", + "operationId": "createCustomField", + "summary": "Create Custom Field", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateCSDto" + "$ref": "#/components/schemas/CustomFieldCreateDto" } } } @@ -4895,21 +4543,21 @@ } }, "tags": [ - "connections-strategies" + "field-mappings" ] } }, - "/connections-strategies/credentials": { + "/field-mappings/map": { "post": { - "operationId": "getConnectionStrategyCredentials", - "summary": "Get Connection Strategy Credential", + "operationId": "mapField", + "summary": "Map Custom Field", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ConnectionStrategyCredentials" + "$ref": "#/components/schemas/MapFieldToProviderDto" } } } @@ -4920,17 +4568,17 @@ } }, "tags": [ - "connections-strategies" + "field-mappings" ] } }, - "/connections-strategies/getCredentials": { + "/field-mappings/properties": { "get": { - "operationId": "getCredentials", - "summary": "Fetch credentials info needed for connections", + "operationId": "getCustomProviderProperties", + "summary": "Retrieve Custom Properties", "parameters": [ { - "name": "projectId", + "name": "linkedUserId", "required": true, "in": "query", "schema": { @@ -4938,7 +4586,15 @@ } }, { - "name": "type", + "name": "providerId", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "vertical", "required": true, "in": "query", "schema": { @@ -4952,36 +4608,33 @@ } }, "tags": [ - "connections-strategies" + "field-mappings" ] } }, - "/connections-strategies/getConnectionStrategiesForProject": { + "/events": { "get": { - "operationId": "getConnectionStrategiesForProject", - "summary": "Fetch All Connection Strategies for Project", - "parameters": [], - "responses": { - "200": { - "description": "" - } - }, - "tags": [ - "connections-strategies" - ] - } - }, - "/syncs/status/{vertical}": { - "get": { - "operationId": "getSyncStatus", - "summary": "Retrieve sync status of a certain vertical", + "operationId": "getEvents", + "summary": "Retrieve Events", "parameters": [ { - "name": "vertical", - "required": true, - "in": "path", + "name": "page", + "required": false, + "in": "query", "schema": { - "type": "string" + "minimum": 1, + "default": 1, + "type": "number" + } + }, + { + "name": "pageSize", + "required": false, + "in": "query", + "schema": { + "minimum": 1, + "default": 10, + "type": "number" } } ], @@ -4991,45 +4644,43 @@ } }, "tags": [ - "syncs" + "events" ] } }, - "/syncs/resyncs/{vertical}": { + "/events/count": { "get": { - "operationId": "resync", - "summary": "Resync common objects across a vertical", - "parameters": [ - { - "name": "vertical", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], + "operationId": "getEventsCount", + "summary": "Retrieve Events Count", + "parameters": [], "responses": { "200": { - "description": "" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "number" + } + } + } } }, "tags": [ - "syncs" + "events" ] } }, - "/project-connectors": { + "/magic-links": { "post": { - "operationId": "updateConnectorsToProject", - "summary": "Update Connectors for a project", + "operationId": "createMagicLink", + "summary": "Create a Magic Link", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectConnectorsDto" + "$ref": "#/components/schemas/CreateMagicLinkDto" } } } @@ -5040,78 +4691,32 @@ } }, "tags": [ - "project-connectors" + "magic-links" ] }, "get": { - "operationId": "getConnectorsFromProject", - "summary": "Retrieve connectors by Project Id", - "parameters": [ - { - "name": "projectId", - "required": true, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "getConnectorsFromProject", - "required": true, - "in": "query", - "schema": { - "type": "string" - } - } - ], + "operationId": "getMagicLinks", + "summary": "Retrieve Magic Links", + "parameters": [], "responses": { "200": { "description": "" } }, "tags": [ - "project-connectors" + "magic-links" ] } }, - "/ticketing/attachments": { + "/magic-links/single": { "get": { - "operationId": "getAttachments", - "summary": "List a batch of Attachments", + "operationId": "getMagicLink", + "summary": "Retrieve a Magic Link", "parameters": [ { - "name": "x-connection-token", + "name": "id", "required": true, - "in": "header", - "description": "The connection token", - "schema": { - "type": "string" - } - }, - { - "name": "remote_data", - "required": false, - "in": "query", - "description": "Set to true to include data from the original software.", - "schema": { - "type": "boolean" - } - }, - { - "name": "pageSize", - "required": false, - "in": "query", - "description": "Set to get the number of records.", - "schema": { - "default": 50, - "type": "number" - } - }, - { - "name": "cursor", - "required": false, "in": "query", - "description": "Set to get the number of records after this cursor.", "schema": { "type": "string" } @@ -5119,57 +4724,41 @@ ], "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiResponse" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/UnifiedAttachmentOutput" - } - } - } - ] - } - } - } + "description": "" } }, "tags": [ - "ticketing/attachments" - ], - "security": [ - { - "JWT": [] - } + "magic-links" ] - }, + } + }, + "/passthrough": { "post": { - "operationId": "addAttachment", - "summary": "Create a Attachment", - "description": "Create a attachment in any supported Ticketing software", + "operationId": "passthroughRequest", + "summary": "Make a passthrough request", "parameters": [ { - "name": "x-connection-token", + "name": "integrationId", "required": true, - "in": "header", - "description": "The connection token", + "in": "query", "schema": { "type": "string" } }, { - "name": "remote_data", - "required": false, + "name": "linkedUserId", + "required": true, "in": "query", - "description": "Set to true to include data from the original Ticketing software.", "schema": { - "type": "boolean" + "type": "string" + } + }, + { + "name": "vertical", + "required": true, + "in": "query", + "schema": { + "type": "string" } } ], @@ -5178,7 +4767,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnifiedAttachmentInput" + "$ref": "#/components/schemas/PassThroughRequestDto" } } } @@ -5189,18 +4778,7 @@ "content": { "application/json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiResponse" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/UnifiedAttachmentOutput" - } - } - } - ] + "$ref": "#/components/schemas/PassThroughResponse" } } } @@ -5210,204 +4788,626 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnifiedAttachmentOutput" + "$ref": "#/components/schemas/PassThroughResponse" } } } } }, "tags": [ - "ticketing/attachments" - ], - "security": [ - { - "JWT": [] - } + "passthrough" ] } }, - "/ticketing/attachments/{id}": { - "get": { - "operationId": "getAttachment", - "summary": "Retrieve a Attachment", - "description": "Retrieve a attachment from any connected Ticketing software", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "description": "id of the attachment you want to retrive.", - "schema": { - "type": "string" - } - }, - { - "name": "remote_data", - "required": false, - "in": "query", - "description": "Set to true to include data from the original Ticketing software.", - "schema": { - "type": "boolean" + "/connections-strategies/create": { + "post": { + "operationId": "createConnectionStrategy", + "summary": "Create Connection Strategy", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateConnectionStrategyDto" + } } } - ], + }, "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiResponse" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/UnifiedAttachmentOutput" - } - } - } - ] - } + "201": { + "description": "" + } + }, + "tags": [ + "connections-strategies" + ] + } + }, + "/connections-strategies/toggle": { + "post": { + "operationId": "toggleConnectionStrategy", + "summary": "Activate/Deactivate Connection Strategy", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ToggleStrategyDto" } } } }, + "responses": { + "201": { + "description": "" + } + }, "tags": [ - "ticketing/attachments" - ], - "security": [ - { - "JWT": [] + "connections-strategies" + ] + } + }, + "/connections-strategies/delete": { + "post": { + "operationId": "deleteConnectionStrategy", + "summary": "Delete Connection Strategy", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteCSDto" + } + } + } + }, + "responses": { + "201": { + "description": "" } + }, + "tags": [ + "connections-strategies" ] } }, - "/ticketing/attachments/{id}/download": { + "/connections-strategies/update": { + "post": { + "operationId": "updateConnectionStrategy", + "summary": "Update Connection Strategy", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCSDto" + } + } + } + }, + "responses": { + "201": { + "description": "" + } + }, + "tags": [ + "connections-strategies" + ] + } + }, + "/connections-strategies/credentials": { + "post": { + "operationId": "getConnectionStrategyCredentials", + "summary": "Get Connection Strategy Credential", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConnectionStrategyCredentials" + } + } + } + }, + "responses": { + "201": { + "description": "" + } + }, + "tags": [ + "connections-strategies" + ] + } + }, + "/connections-strategies/getCredentials": { "get": { - "operationId": "downloadAttachment", - "summary": "Download a Attachment", - "description": "Download a attachment from any connected Ticketing software", + "operationId": "getCredentials", + "summary": "Fetch credentials info needed for connections", "parameters": [ { - "name": "id", + "name": "projectId", "required": true, - "in": "path", - "description": "id of the attachment you want to retrive.", + "in": "query", "schema": { "type": "string" } }, { - "name": "remote_data", - "required": false, + "name": "type", + "required": true, "in": "query", - "description": "Set to true to include data from the original Ticketing software.", "schema": { - "type": "boolean" + "type": "string" } } ], "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiResponse" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/UnifiedAttachmentOutput" - } - } - } - ] - } - } - } + "description": "" } }, "tags": [ - "ticketing/attachments" - ], - "security": [ - { - "JWT": [] + "connections-strategies" + ] + } + }, + "/connections-strategies/getConnectionStrategiesForProject": { + "get": { + "operationId": "getConnectionStrategiesForProject", + "summary": "Fetch All Connection Strategies for Project", + "parameters": [], + "responses": { + "200": { + "description": "" } + }, + "tags": [ + "connections-strategies" ] } }, - "/ticketing/attachments/batch": { - "post": { - "operationId": "addAttachments", - "summary": "Add a batch of Attachments", + "/syncs/status/{vertical}": { + "get": { + "operationId": "getSyncStatus", + "summary": "Retrieve sync status of a certain vertical", "parameters": [ { - "name": "x-connection-token", + "name": "vertical", "required": true, - "in": "header", - "description": "The connection token", + "in": "path", "schema": { "type": "string" } - }, + } + ], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "syncs" + ] + } + }, + "/syncs/resyncs/{vertical}": { + "get": { + "operationId": "resync", + "summary": "Resync common objects across a vertical", + "parameters": [ { - "name": "remote_data", - "required": false, - "in": "query", - "description": "Set to true to include data from the original Ticketing software.", + "name": "vertical", + "required": true, + "in": "path", "schema": { - "type": "boolean" + "type": "string" } } ], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "syncs" + ] + } + }, + "/project-connectors": { + "post": { + "operationId": "updateConnectorsToProject", + "summary": "Update Connectors for a project", + "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UnifiedAttachmentInput" - } + "$ref": "#/components/schemas/ProjectConnectorsDto" } } } }, "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiResponse" - }, - { - "properties": { - "data": { - "$ref": "#/components/schemas/UnifiedAttachmentOutput" - } - } - } - ] - } - } - } - }, "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { + "description": "" + } + }, + "tags": [ + "project-connectors" + ] + }, + "get": { + "operationId": "getConnectorsFromProject", + "summary": "Retrieve connectors by Project Id", + "parameters": [ + { + "name": "projectId", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "getConnectorsFromProject", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "project-connectors" + ] + } + }, + "/ticketing/attachments": { + "get": { + "operationId": "getAttachments", + "summary": "List a batch of Attachments", + "parameters": [ + { + "name": "x-connection-token", + "required": true, + "in": "header", + "description": "The connection token", + "schema": { + "type": "string" + } + }, + { + "name": "remote_data", + "required": false, + "in": "query", + "description": "Set to true to include data from the original software.", + "schema": { + "type": "boolean" + } + }, + { + "name": "pageSize", + "required": false, + "in": "query", + "description": "Set to get the number of records.", + "schema": { + "default": 50, + "type": "number" + } + }, + { + "name": "cursor", + "required": false, + "in": "query", + "description": "Set to get the number of records after this cursor.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiResponse" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/UnifiedAttachmentOutput" + } + } + } + ] + } + } + } + } + }, + "tags": [ + "ticketing/attachments" + ], + "security": [ + { + "JWT": [] + } + ] + }, + "post": { + "operationId": "addAttachment", + "summary": "Create a Attachment", + "description": "Create a attachment in any supported Ticketing software", + "parameters": [ + { + "name": "x-connection-token", + "required": true, + "in": "header", + "description": "The connection token", + "schema": { + "type": "string" + } + }, + { + "name": "remote_data", + "required": false, + "in": "query", + "description": "Set to true to include data from the original Ticketing software.", + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnifiedAttachmentInput" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiResponse" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/UnifiedAttachmentOutput" + } + } + } + ] + } + } + } + }, + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnifiedAttachmentOutput" + } + } + } + } + }, + "tags": [ + "ticketing/attachments" + ], + "security": [ + { + "JWT": [] + } + ] + } + }, + "/ticketing/attachments/{id}": { + "get": { + "operationId": "getAttachment", + "summary": "Retrieve a Attachment", + "description": "Retrieve a attachment from any connected Ticketing software", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "id of the attachment you want to retrive.", + "schema": { + "type": "string" + } + }, + { + "name": "remote_data", + "required": false, + "in": "query", + "description": "Set to true to include data from the original Ticketing software.", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiResponse" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/UnifiedAttachmentOutput" + } + } + } + ] + } + } + } + } + }, + "tags": [ + "ticketing/attachments" + ], + "security": [ + { + "JWT": [] + } + ] + } + }, + "/ticketing/attachments/{id}/download": { + "get": { + "operationId": "downloadAttachment", + "summary": "Download a Attachment", + "description": "Download a attachment from any connected Ticketing software", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "id of the attachment you want to retrive.", + "schema": { + "type": "string" + } + }, + { + "name": "remote_data", + "required": false, + "in": "query", + "description": "Set to true to include data from the original Ticketing software.", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiResponse" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/UnifiedAttachmentOutput" + } + } + } + ] + } + } + } + } + }, + "tags": [ + "ticketing/attachments" + ], + "security": [ + { + "JWT": [] + } + ] + } + }, + "/ticketing/attachments/batch": { + "post": { + "operationId": "addAttachments", + "summary": "Add a batch of Attachments", + "parameters": [ + { + "name": "x-connection-token", + "required": true, + "in": "header", + "description": "The connection token", + "schema": { + "type": "string" + } + }, + { + "name": "remote_data", + "required": false, + "in": "query", + "description": "Set to true to include data from the original Ticketing software.", + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UnifiedAttachmentInput" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ApiResponse" + }, + { + "properties": { + "data": { + "$ref": "#/components/schemas/UnifiedAttachmentOutput" + } + } + } + ] + } + } + } + }, + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { "$ref": "#/components/schemas/UnifiedAttachmentOutput" } } @@ -5458,540 +5458,188 @@ "strategy": { "type": "string" }, - "password_hash": { - "type": "string" - }, - "id_organisation": { - "type": "string" - } - }, - "required": [ - "first_name", - "last_name", - "email", - "strategy" - ] - }, - "LoginDto": { - "type": "object", - "properties": { - "id_user": { - "type": "string" - }, - "email": { - "type": "string" - }, - "password_hash": { - "type": "string" - } - }, - "required": [ - "email", - "password_hash" - ] - }, - "VerifyUserDto": { - "type": "object", - "properties": { - "id_user": { - "type": "string" - }, - "email": { - "type": "string" - }, - "first_name": { - "type": "string" - }, - "last_name": { - "type": "string" - } - }, - "required": [ - "id_user", - "email", - "first_name", - "last_name" - ] - }, - "ApiKeyDto": { - "type": "object", - "properties": { - "projectId": { - "type": "string" - }, - "userId": { - "type": "string" - }, - "keyName": { - "type": "string" - } - }, - "required": [ - "projectId", - "userId", - "keyName" - ] - }, - "RefreshDto": { - "type": "object", - "properties": { - "projectId": { - "type": "string" - } - }, - "required": [ - "projectId" - ] - }, - "WebhookDto": { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" - }, - "id_project": { - "type": "string" - }, - "scope": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "url", - "id_project", - "scope" - ] - }, - "SignatureVerificationDto": { - "type": "object", - "properties": { - "signature": { - "type": "string" - }, - "secret": { - "type": "string" - } - }, - "required": [ - "signature", - "secret" - ] - }, - "ManagedWebhooksDto": { - "type": "object", - "properties": { - "id_connection": { - "type": "string" - }, - "scopes": { - "type": "array", - "items": { - "type": "string" - } - }, - "api_version": { + "password_hash": { "type": "string" }, - "remote_signature_secret": { + "id_organisation": { "type": "string" } }, "required": [ - "id_connection", - "scopes" + "first_name", + "last_name", + "email", + "strategy" ] }, - "RemoteThirdPartyCreationDto": { + "LoginDto": { "type": "object", "properties": { - "id_connection": { + "id_user": { "type": "string" }, - "mw_ids": { - "type": "array", - "items": { - "type": "string" - } + "email": { + "type": "string" + }, + "password_hash": { + "type": "string" } }, "required": [ - "id_connection", - "mw_ids" + "email", + "password_hash" ] }, - "ApiResponse": { + "VerifyUserDto": { "type": "object", "properties": { - "message": { + "id_user": { "type": "string" }, - "error": { + "email": { "type": "string" }, - "statusCode": { - "type": "number" + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" } }, "required": [ - "statusCode" + "id_user", + "email", + "first_name", + "last_name" ] }, - "UnifiedCommentInput": { + "ApiKeyDto": { "type": "object", "properties": { - "body": { - "type": "string", - "description": "The body of the comment" - }, - "html_body": { - "type": "string", - "description": "The html body of the comment" - }, - "is_private": { - "type": "boolean", - "description": "The public status of the comment" - }, - "creator_type": { - "type": "string", - "description": "The creator type of the comment. Authorized values are either USER or CONTACT" - }, - "ticket_id": { - "type": "string", - "description": "The uuid of the ticket the comment is tied to" - }, - "contact_id": { - "type": "string", - "description": "The uuid of the contact which the comment belongs to (if no user_id specified)" + "projectId": { + "type": "string" }, - "user_id": { - "type": "string", - "description": "The uuid of the user which the comment belongs to (if no contact_id specified)" + "userId": { + "type": "string" }, - "attachments": { - "description": "The attachements uuids tied to the comment", - "type": "array", - "items": { - "type": "string" - } + "keyName": { + "type": "string" } }, "required": [ - "body" + "projectId", + "userId", + "keyName" ] }, - "UnifiedTicketOutput": { + "RefreshDto": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "The name of the ticket" - }, - "status": { - "type": "string", - "description": "The status of the ticket. Authorized values are OPEN or CLOSED." - }, - "description": { - "type": "string", - "description": "The description of the ticket" - }, - "due_date": { - "format": "date-time", - "type": "string", - "description": "The date the ticket is due" - }, - "type": { - "type": "string", - "description": "The type of the ticket. Authorized values are PROBLEM, QUESTION, or TASK" - }, - "parent_ticket": { - "type": "string", - "description": "The uuid of the parent ticket" - }, - "project_id": { - "type": "string", - "description": "The uuid of the collection (project) the ticket belongs to" - }, - "tags": { - "description": "The tags names of the ticket", - "type": "array", - "items": { - "type": "string" - } - }, - "completed_at": { - "format": "date-time", - "type": "string", - "description": "The date the ticket has been completed" - }, - "priority": { - "type": "string", - "description": "The priority of the ticket. Authorized values are HIGH, MEDIUM or LOW." - }, - "assigned_to": { - "description": "The users uuids the ticket is assigned to", - "type": "array", - "items": { - "type": "string" - } - }, - "comment": { - "description": "The comment of the ticket", - "allOf": [ - { - "$ref": "#/components/schemas/UnifiedCommentInput" - } - ] - }, - "account_id": { - "type": "string", - "description": "The uuid of the account which the ticket belongs to" - }, - "contact_id": { - "type": "string", - "description": "The uuid of the contact which the ticket belongs to" - }, - "field_mappings": { - "type": "object", - "properties": {} - }, - "id": { - "type": "string", - "description": "The uuid of the ticket" - }, - "remote_id": { - "type": "string", - "description": "The id of the ticket in the context of the 3rd Party" - }, - "remote_data": { - "type": "object", - "properties": {} + "projectId": { + "type": "string" } }, "required": [ - "name", - "description", - "field_mappings", - "remote_data" + "projectId" ] }, - "UnifiedTicketInput": { + "WebhookDto": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "The name of the ticket" - }, - "status": { - "type": "string", - "description": "The status of the ticket. Authorized values are OPEN or CLOSED." + "url": { + "type": "string" }, "description": { - "type": "string", - "description": "The description of the ticket" - }, - "due_date": { - "format": "date-time", - "type": "string", - "description": "The date the ticket is due" - }, - "type": { - "type": "string", - "description": "The type of the ticket. Authorized values are PROBLEM, QUESTION, or TASK" - }, - "parent_ticket": { - "type": "string", - "description": "The uuid of the parent ticket" - }, - "project_id": { - "type": "string", - "description": "The uuid of the collection (project) the ticket belongs to" - }, - "tags": { - "description": "The tags names of the ticket", - "type": "array", - "items": { - "type": "string" - } - }, - "completed_at": { - "format": "date-time", - "type": "string", - "description": "The date the ticket has been completed" - }, - "priority": { - "type": "string", - "description": "The priority of the ticket. Authorized values are HIGH, MEDIUM or LOW." - }, - "assigned_to": { - "description": "The users uuids the ticket is assigned to", - "type": "array", - "items": { - "type": "string" - } - }, - "comment": { - "description": "The comment of the ticket", - "allOf": [ - { - "$ref": "#/components/schemas/UnifiedCommentInput" - } - ] - }, - "account_id": { - "type": "string", - "description": "The uuid of the account which the ticket belongs to" + "type": "string" }, - "contact_id": { - "type": "string", - "description": "The uuid of the contact which the ticket belongs to" + "id_project": { + "type": "string" }, - "field_mappings": { - "type": "object", - "properties": {} + "scope": { + "type": "array", + "items": { + "type": "string" + } } }, "required": [ - "name", - "description", - "field_mappings" + "url", + "id_project", + "scope" ] }, - "UnifiedUserOutput": { + "SignatureVerificationDto": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "The name of the user" - }, - "email": { - "type": "string", - "description": "The email of the user" - }, - "field_mappings": { - "type": "object", - "properties": {} - }, - "id": { - "type": "string", - "description": "The uuid of the user" - }, - "remote_id": { - "type": "string", - "description": "The id of the user in the context of the Crm 3rd Party" + "signature": { + "type": "string" }, - "remote_data": { - "type": "object", - "properties": {} + "secret": { + "type": "string" } }, "required": [ - "name", - "email", - "field_mappings", - "remote_data" + "signature", + "secret" ] }, - "UnifiedAccountOutput": { + "ManagedWebhooksDto": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "The name of the account" + "id_connection": { + "type": "string" }, - "domains": { - "description": "The domains of the account", + "scopes": { "type": "array", "items": { "type": "string" } }, - "field_mappings": { - "type": "object", - "properties": {} - }, - "id": { - "type": "string", - "description": "The uuid of the account" - }, - "remote_id": { - "type": "string", - "description": "The id of the account in the context of the 3rd Party" + "api_version": { + "type": "string" }, - "remote_data": { - "type": "object", - "properties": {} + "remote_signature_secret": { + "type": "string" } }, "required": [ - "name", - "field_mappings", - "remote_data" + "id_connection", + "scopes" ] }, - "UnifiedContactOutput": { + "RemoteThirdPartyCreationDto": { "type": "object", "properties": { - "first_name": { - "type": "string", - "description": "The first name of the contact" - }, - "last_name": { - "type": "string", - "description": "The last name of the contact" - }, - "email_addresses": { - "description": "The email addresses of the contact", - "type": "array", - "items": { - "$ref": "#/components/schemas/Email" - } - }, - "phone_numbers": { - "description": "The phone numbers of the contact", - "type": "array", - "items": { - "$ref": "#/components/schemas/Phone" - } + "id_connection": { + "type": "string" }, - "addresses": { - "description": "The addresses of the contact", + "mw_ids": { "type": "array", "items": { - "$ref": "#/components/schemas/Address" + "type": "string" } + } + }, + "required": [ + "id_connection", + "mw_ids" + ] + }, + "ApiResponse": { + "type": "object", + "properties": { + "message": { + "type": "string" }, - "user_id": { - "type": "string", - "description": "The uuid of the user who owns the contact" - }, - "field_mappings": { - "type": "object", - "properties": {} - }, - "id": { - "type": "string", - "description": "The uuid of the contact" - }, - "remote_id": { - "type": "string", - "description": "The id of the contact in the context of the Crm 3rd Party" + "error": { + "type": "string" }, - "remote_data": { - "type": "object", - "properties": {} + "statusCode": { + "type": "number" } }, "required": [ - "first_name", - "last_name", - "field_mappings", - "remote_data" + "statusCode" ] }, "Email": { @@ -6196,6 +5844,49 @@ "field_mappings" ] }, + "UnifiedContactOutput": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the contact" + }, + "email_address": { + "type": "string", + "description": "The email address of the contact" + }, + "phone_number": { + "type": "string", + "description": "The phone number of the contact" + }, + "details": { + "type": "string", + "description": "The details of the contact" + }, + "field_mappings": { + "type": "object", + "properties": {} + }, + "id": { + "type": "string", + "description": "The uuid of the contact" + }, + "remote_id": { + "type": "string", + "description": "The id of the contact in the context of the 3rd Party" + }, + "remote_data": { + "type": "object", + "properties": {} + } + }, + "required": [ + "name", + "email_address", + "field_mappings", + "remote_data" + ] + }, "UnifiedContactInput": { "type": "object", "properties": { @@ -6644,35 +6335,118 @@ "due_date": { "format": "date-time", "type": "string", - "description": "The due date of the task" + "description": "The due date of the task" + }, + "finished_date": { + "format": "date-time", + "type": "string", + "description": "The finished date of the task" + }, + "user_id": { + "type": "string", + "description": "The uuid of the user tied to the task" + }, + "company_id": { + "type": "string", + "description": "The uuid fo the company tied to the task" + }, + "deal_id": { + "type": "string", + "description": "The uuid of the deal tied to the task" + }, + "field_mappings": { + "type": "object", + "properties": {} + } + }, + "required": [ + "subject", + "content", + "status", + "field_mappings" + ] + }, + "UnifiedUserOutput": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the user" + }, + "email_address": { + "type": "string", + "description": "The email address of the user" + }, + "teams": { + "description": "The teams whose the user is part of", + "type": "array", + "items": { + "type": "string" + } + }, + "account_id": { + "type": "string", + "description": "The account or organization the user is part of" + }, + "field_mappings": { + "type": "object", + "properties": {} + }, + "id": { + "type": "string", + "description": "The uuid of the user" + }, + "remote_id": { + "type": "string", + "description": "The id of the user in the context of the 3rd Party" + }, + "remote_data": { + "type": "object", + "properties": {} + } + }, + "required": [ + "name", + "email_address", + "field_mappings", + "remote_data" + ] + }, + "UnifiedAccountOutput": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the account" }, - "finished_date": { - "format": "date-time", - "type": "string", - "description": "The finished date of the task" + "domains": { + "description": "The domains of the account", + "type": "array", + "items": { + "type": "string" + } }, - "user_id": { - "type": "string", - "description": "The uuid of the user tied to the task" + "field_mappings": { + "type": "object", + "properties": {} }, - "company_id": { + "id": { "type": "string", - "description": "The uuid fo the company tied to the task" + "description": "The uuid of the account" }, - "deal_id": { + "remote_id": { "type": "string", - "description": "The uuid of the deal tied to the task" + "description": "The id of the account in the context of the 3rd Party" }, - "field_mappings": { + "remote_data": { "type": "object", "properties": {} } }, "required": [ - "subject", - "content", - "status", - "field_mappings" + "name", + "field_mappings", + "remote_data" ] }, "UnifiedCollectionOutput": { @@ -6804,6 +6578,49 @@ "remote_data" ] }, + "UnifiedCommentInput": { + "type": "object", + "properties": { + "body": { + "type": "string", + "description": "The body of the comment" + }, + "html_body": { + "type": "string", + "description": "The html body of the comment" + }, + "is_private": { + "type": "boolean", + "description": "The public status of the comment" + }, + "creator_type": { + "type": "string", + "description": "The creator type of the comment. Authorized values are either USER or CONTACT" + }, + "ticket_id": { + "type": "string", + "description": "The uuid of the ticket the comment is tied to" + }, + "contact_id": { + "type": "string", + "description": "The uuid of the contact which the comment belongs to (if no user_id specified)" + }, + "user_id": { + "type": "string", + "description": "The uuid of the user which the comment belongs to (if no contact_id specified)" + }, + "attachments": { + "description": "The attachements uuids tied to the comment", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "body" + ] + }, "UnifiedTagOutput": { "type": "object", "properties": { @@ -6868,6 +6685,183 @@ "remote_data" ] }, + "UnifiedTicketOutput": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the ticket" + }, + "status": { + "type": "string", + "description": "The status of the ticket. Authorized values are OPEN or CLOSED." + }, + "description": { + "type": "string", + "description": "The description of the ticket" + }, + "due_date": { + "format": "date-time", + "type": "string", + "description": "The date the ticket is due" + }, + "type": { + "type": "string", + "description": "The type of the ticket. Authorized values are PROBLEM, QUESTION, or TASK" + }, + "parent_ticket": { + "type": "string", + "description": "The uuid of the parent ticket" + }, + "project_id": { + "type": "string", + "description": "The uuid of the collection (project) the ticket belongs to" + }, + "tags": { + "description": "The tags names of the ticket", + "type": "array", + "items": { + "type": "string" + } + }, + "completed_at": { + "format": "date-time", + "type": "string", + "description": "The date the ticket has been completed" + }, + "priority": { + "type": "string", + "description": "The priority of the ticket. Authorized values are HIGH, MEDIUM or LOW." + }, + "assigned_to": { + "description": "The users uuids the ticket is assigned to", + "type": "array", + "items": { + "type": "string" + } + }, + "comment": { + "description": "The comment of the ticket", + "allOf": [ + { + "$ref": "#/components/schemas/UnifiedCommentInput" + } + ] + }, + "account_id": { + "type": "string", + "description": "The uuid of the account which the ticket belongs to" + }, + "contact_id": { + "type": "string", + "description": "The uuid of the contact which the ticket belongs to" + }, + "field_mappings": { + "type": "object", + "properties": {} + }, + "id": { + "type": "string", + "description": "The uuid of the ticket" + }, + "remote_id": { + "type": "string", + "description": "The id of the ticket in the context of the 3rd Party" + }, + "remote_data": { + "type": "object", + "properties": {} + } + }, + "required": [ + "name", + "description", + "field_mappings", + "remote_data" + ] + }, + "UnifiedTicketInput": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the ticket" + }, + "status": { + "type": "string", + "description": "The status of the ticket. Authorized values are OPEN or CLOSED." + }, + "description": { + "type": "string", + "description": "The description of the ticket" + }, + "due_date": { + "format": "date-time", + "type": "string", + "description": "The date the ticket is due" + }, + "type": { + "type": "string", + "description": "The type of the ticket. Authorized values are PROBLEM, QUESTION, or TASK" + }, + "parent_ticket": { + "type": "string", + "description": "The uuid of the parent ticket" + }, + "project_id": { + "type": "string", + "description": "The uuid of the collection (project) the ticket belongs to" + }, + "tags": { + "description": "The tags names of the ticket", + "type": "array", + "items": { + "type": "string" + } + }, + "completed_at": { + "format": "date-time", + "type": "string", + "description": "The date the ticket has been completed" + }, + "priority": { + "type": "string", + "description": "The priority of the ticket. Authorized values are HIGH, MEDIUM or LOW." + }, + "assigned_to": { + "description": "The users uuids the ticket is assigned to", + "type": "array", + "items": { + "type": "string" + } + }, + "comment": { + "description": "The comment of the ticket", + "allOf": [ + { + "$ref": "#/components/schemas/UnifiedCommentInput" + } + ] + }, + "account_id": { + "type": "string", + "description": "The uuid of the account which the ticket belongs to" + }, + "contact_id": { + "type": "string", + "description": "The uuid of the contact which the ticket belongs to" + }, + "field_mappings": { + "type": "object", + "properties": {} + } + }, + "required": [ + "name", + "description", + "field_mappings" + ] + }, "CreateLinkedUserDto": { "type": "object", "properties": { diff --git a/packages/shared/src/connectors/enum.ts b/packages/shared/src/connectors/enum.ts index 60a861084..7c3a770e9 100644 --- a/packages/shared/src/connectors/enum.ts +++ b/packages/shared/src/connectors/enum.ts @@ -7,7 +7,7 @@ export enum CrmConnectors { CLOSE = 'close' } -export enum TicketingConnectors { +export enum TicketingConnectors { ZENDESK = 'zendesk', FRONT = 'front', GITHUB = 'github',