Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
166 changes: 166 additions & 0 deletions entity-service/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,50 @@ paths:
schema:
$ref: '#/components/schemas/ErrorResponse'

/accounts/{id}/contacts/search:
post:
summary: Search contacts for an account.
description: ServiceNow data source only; there is no Postgres equivalent.
operationId: searchAccountContacts
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
requestBody:
required: false
content:
application/json:
schema:
$ref: '#/components/schemas/SearchAccountContactsRequest'
responses:
"200":
description: Contacts matching the search query.
content:
application/json:
schema:
$ref: '#/components/schemas/SearchAccountContactsResponse'
"400":
description: Bad request.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
"404":
description: Account not found.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
"500":
description: Internal server error.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'

/projects/{id}:
get:
summary: Get a project by ID.
Expand Down Expand Up @@ -252,6 +296,50 @@ paths:
schema:
$ref: '#/components/schemas/ErrorResponse'

/projects/{id}/contacts/search:
post:
summary: Search contacts for a project.
description: ServiceNow data source only; there is no Postgres equivalent.
operationId: searchProjectContacts
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
requestBody:
required: false
content:
application/json:
schema:
$ref: '#/components/schemas/SearchProjectContactsRequest'
responses:
"200":
description: Contacts matching the search query.
content:
application/json:
schema:
$ref: '#/components/schemas/SearchProjectContactsResponse'
"400":
description: Bad request.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
"404":
description: Project not found.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
"500":
description: Internal server error.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'

/products/search:
post:
summary: Search products by name.
Expand Down Expand Up @@ -2615,6 +2703,42 @@ components:
hasMore:
type: boolean

SearchAccountContactsRequest:
type: object
properties:
filters:
type: object
properties:
searchQuery:
type: string
description: Searches across contact name and email (case-insensitive).
pagination:
$ref: '#/components/schemas/Pagination'

AccountContact:
type: object
properties:
name:
type: string
email:
type: string
isPrimary:
type: boolean

SearchAccountContactsResponse:
type: object
properties:
contacts:
type: array
items:
$ref: '#/components/schemas/AccountContact'
total:
type: integer
limit:
type: integer
offset:
type: integer

SearchProjectsRequest:
type: object
properties:
Expand Down Expand Up @@ -2774,6 +2898,48 @@ components:
hasMore:
type: boolean

SearchProjectContactsRequest:
type: object
properties:
filters:
type: object
properties:
searchQuery:
type: string
description: Searches across contact name and email (case-insensitive).
pagination:
$ref: '#/components/schemas/Pagination'

ProjectContact:
type: object
properties:
name:
type: string
email:
type: string
registrationState:
type: string
notificationsEnabled:
type: boolean
roles:
type: array
items:
type: string

SearchProjectContactsResponse:
type: object
properties:
contacts:
type: array
items:
$ref: '#/components/schemas/ProjectContact'
total:
type: integer
limit:
type: integer
offset:
type: integer

SearchProductsRequest:
type: object
properties:
Expand Down