Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions docs/api/add-entity-data.ParamsDetails.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"parameters": [
{
"name": "entity_id",
"in": "path",
"required": true,
"schema": { "type": "string", "example": "(Type an entity ID)" }
}
]
}
19 changes: 19 additions & 0 deletions docs/api/add-entity-data.RequestSchema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"title": "Body",
"body": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"monthly_revenue": { "type": "number", "example": 2345.34 },
"update_date": { "type": "string", "example": "2024-11-01T03:00:00.000Z" }
}
},
"examples": {
"Add Entity Data": { "value": { "monthly_revenue": 2345.34, "update_date": "2024-11-01T03:00:00.000Z" } }
}
}
}
}
}
19 changes: 19 additions & 0 deletions docs/api/add-entity-data.StatusCodes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"responses": {
"200": {
"description": "Add Entity Data",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"result": { "type": "string", "example": "1 Data Added" },
"status": { "type": "boolean", "example": true }
}
},
"examples": { "Add Entity Data": { "value": { "result": "1 Data Added", "status": true } } }
}
}
}
}
}
53 changes: 7 additions & 46 deletions docs/api/add-entity-data.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,59 +18,20 @@ import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
import Translate from "@docusaurus/Translate";

<Heading as={"h1"} className={"openapi__heading"} children={"Add Entity Data"}></Heading>

<MethodEndpoint method={"post"} path={"/entity/{entity_id}/data"} context={"endpoint"}></MethodEndpoint>

Add Entity Data

<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}></Heading>
<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"}>
<Translate id="theme.openapi.request.title">Request</Translate>
</Heading>

<ParamsDetails
parameters={[
{ name: "entity_id", in: "path", required: true, schema: { type: "string", example: "(Type an entity ID)" } },
]}
></ParamsDetails>
<ParamsDetails {...require("./add-entity-data.ParamsDetails.json")}></ParamsDetails>

<RequestSchema
title={"Body"}
body={{
content: {
"application/json": {
schema: {
type: "object",
properties: {
monthly_revenue: { type: "number", example: 2345.34 },
update_date: { type: "string", example: "2024-11-01T03:00:00.000Z" },
},
},
examples: {
"Add Entity Data": { value: { monthly_revenue: 2345.34, update_date: "2024-11-01T03:00:00.000Z" } },
},
},
},
}}
></RequestSchema>
<RequestSchema {...require("./add-entity-data.RequestSchema.json")}></RequestSchema>

<StatusCodes
id={undefined}
label={undefined}
responses={{
"200": {
description: "Add Entity Data",
content: {
"application/json": {
schema: {
type: "object",
properties: {
result: { type: "string", example: "1 Data Added" },
status: { type: "boolean", example: true },
},
},
examples: { "Add Entity Data": { value: { result: "1 Data Added", status: true } } },
},
},
},
}}
></StatusCodes>
<StatusCodes {...require("./add-entity-data.StatusCodes.json")}></StatusCodes>
11 changes: 11 additions & 0 deletions docs/api/configure-profile-service.ParamsDetails.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": { "type": "string", "example": "61fac4d9a5c9f40012a5ff92" },
"description": "The ID of the profile"
}
]
}
137 changes: 137 additions & 0 deletions docs/api/configure-profile-service.RequestSchema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
{
"title": "Body",
"body": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"email": {
"type": "object",
"description": "Email service configuration",
"properties": {
"provider": {
"type": "string",
"enum": ["sendgrid", "ses", "smtp"],
"description": "The email provider to use",
"example": "smtp"
},
"from": { "type": "string", "description": "Sender email address", "example": "noreply@example.com" },
"secrets": {
"type": "object",
"description": "Secret IDs for provider credentials",
"properties": {
"data": {
"type": "string",
"description": "Secret ID containing SMTP configuration (required for SMTP provider) or AWS SQS Secret (required for SES provider)",
"example": "68c9977a28079e0010aaf399"
},
"api_key": {
"type": "string",
"description": "Secret ID containing SendGrid API Key (required for SendGrid provider)",
"example": "68c9977a28079e0010aaf399"
}
}
}
}
},
"sms": {
"type": "object",
"description": "SMS service configuration",
"properties": {
"provider": {
"type": "string",
"enum": ["twilio", "sns"],
"description": "The SMS provider to use",
"example": "twilio"
},
"from": {
"type": "string",
"description": "Sender phone number in E.164 format (required for Twilio, optional for SNS)",
"example": "+15551234567"
},
"secrets": {
"type": "object",
"description": "Secret IDs for provider credentials",
"properties": {
"twilio_sid": {
"type": "string",
"description": "Secret ID containing Twilio Account SID (required for Twilio provider)",
"example": "674f1740f9ccd2000aaa4551"
},
"twilio_token": {
"type": "string",
"description": "Secret ID containing Twilio Auth Token (required for Twilio provider)",
"example": "674f1736f9ccd2000aaa4550"
},
"data": {
"type": "string",
"description": "Secret ID containing AWS SQS Secret (required for SNS provider)",
"example": "68c9977a28079e0010aaf399"
}
}
}
}
}
}
},
"examples": {
"Configure SMS and Email": {
"value": {
"email": {
"provider": "smtp",
"from": "noreply@example.com",
"secrets": { "data": "68c9977a28079e0010aaf399" }
},
"sms": {
"provider": "twilio",
"from": "+15551234567",
"secrets": { "twilio_sid": "674f1740f9ccd2000aaa4551", "twilio_token": "674f1736f9ccd2000aaa4550" }
}
}
},
"Configure SMS only": {
"value": {
"sms": {
"provider": "twilio",
"from": "+15551234567",
"secrets": { "twilio_sid": "674f1740f9ccd2000aaa4551", "twilio_token": "674f1736f9ccd2000aaa4550" }
}
}
},
"Configure Email with SendGrid": {
"value": {
"email": {
"provider": "sendgrid",
"from": "noreply@example.com",
"secrets": { "api_key": "68c9977a28079e0010aaf399" }
}
}
},
"Configure Email with SMTP": {
"value": {
"email": {
"provider": "smtp",
"from": "noreply@example.com",
"secrets": { "data": "68c9977a28079e0010aaf399" }
}
}
},
"Configure Email with SES": {
"value": {
"email": {
"provider": "ses",
"from": "noreply@example.com",
"secrets": { "data": "68c9977a28079e0010aaf399" }
}
}
},
"Configure SMS with SNS": {
"value": { "sms": { "provider": "sns", "secrets": { "data": "68c9977a28079e0010aaf399" } } }
}
}
}
}
}
}
63 changes: 63 additions & 0 deletions docs/api/configure-profile-service.StatusCodes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"responses": {
"200": {
"description": "Service provider configured successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"result": { "type": "string", "example": "Service provider configured successfully" },
"status": { "type": "boolean", "example": true }
}
}
}
}
},
"400": {
"description": "Bad request - Invalid configuration",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": { "type": "boolean", "example": false },
"message": { "type": "string", "example": "Invalid credentials format for the selected provider" }
}
}
}
}
},
"401": {
"description": "Unauthorized - Invalid or missing token",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": { "type": "boolean", "example": false },
"message": { "type": "string", "example": "Unauthorized" }
}
}
}
}
},
"403": {
"description": "Forbidden - Insufficient permissions",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": { "type": "boolean", "example": false },
"message": {
"type": "string",
"example": "You do not have permission to configure services for this profile"
}
}
}
}
}
}
}
}
Loading
Loading