{
  "components": {
    "parameters": {
      "OrganizationId": {
        "description": "Organization ID for multi-organization users. If not provided, uses the user's default organization.",
        "in": "header",
        "name": "X-Organization-Id",
        "required": false,
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "400": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "code": {
                  "examples": [
                    "400"
                  ],
                  "type": "string"
                },
                "error": {
                  "examples": [
                    "Invalid request parameters"
                  ],
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "Bad Request"
      },
      "401": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "code": {
                  "examples": [
                    "401"
                  ],
                  "type": "string"
                },
                "error": {
                  "examples": [
                    "Authentication required"
                  ],
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "Unauthorized"
      },
      "403": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "code": {
                  "examples": [
                    "403"
                  ],
                  "type": "string"
                },
                "error": {
                  "examples": [
                    "Access denied"
                  ],
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "Forbidden"
      },
      "404": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "code": {
                  "examples": [
                    "404"
                  ],
                  "type": "string"
                },
                "error": {
                  "examples": [
                    "Resource not found"
                  ],
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "Not Found"
      },
      "409": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "code": {
                  "examples": [
                    "409"
                  ],
                  "type": "string"
                },
                "error": {
                  "examples": [
                    "Resource already exists"
                  ],
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "Conflict"
      },
      "500": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "code": {
                  "examples": [
                    "500"
                  ],
                  "type": "string"
                },
                "error": {
                  "examples": [
                    "An unexpected error occurred"
                  ],
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "Internal Server Error"
      }
    },
    "schemas": {
      "acceptInvitationApiSchema": {
        "properties": {
          "token": {
            "type": "string"
          }
        },
        "required": [
          "token"
        ],
        "type": "object"
      },
      "AccountingBooksStateEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/accountingBooksStateSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "accountingBooksStateSchema": {
        "properties": {
          "closedThrough": {
            "type": [
              "string",
              "null"
            ]
          },
          "closedThroughLabel": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "closedThrough",
          "closedThroughLabel"
        ],
        "type": "object"
      },
      "AccountingPeriodOverviewEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/accountingPeriodOverviewSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "accountingPeriodOverviewSchema": {
        "properties": {
          "books": {
            "$ref": "#/components/schemas/accountingBooksStateSchema"
          },
          "canCloseBooks": {
            "type": "boolean"
          },
          "checks": {
            "items": {
              "properties": {
                "href": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "key": {
                  "enum": [
                    "unissued_drafts",
                    "pending_payments",
                    "refunds_due"
                  ],
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "key",
                "message",
                "href"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "documentCount": {
            "minimum": 0,
            "type": "integer"
          },
          "period": {
            "properties": {
              "end": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "start": {
                "type": "string"
              }
            },
            "required": [
              "start",
              "end",
              "label"
            ],
            "type": "object"
          },
          "periodEnded": {
            "type": "boolean"
          },
          "status": {
            "enum": [
              "open",
              "closed",
              "partly_closed"
            ],
            "type": "string"
          },
          "totals": {
            "items": {
              "properties": {
                "credited": {
                  "type": "number"
                },
                "currency": {
                  "type": "string"
                },
                "invoiced": {
                  "type": "number"
                },
                "owedAtEnd": {
                  "type": "number"
                },
                "received": {
                  "type": "number"
                }
              },
              "required": [
                "currency",
                "invoiced",
                "credited",
                "received",
                "owedAtEnd"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "period",
          "status",
          "books",
          "periodEnded",
          "checks",
          "totals",
          "documentCount",
          "canCloseBooks"
        ],
        "type": "object"
      },
      "addAttachmentSchema": {
        "properties": {
          "contentType": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "filename": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/attachmentMetadataSchema"
              }
            ]
          },
          "size": {
            "exclusiveMinimum": 0,
            "type": "integer"
          },
          "url": {
            "format": "uri",
            "maxLength": 2048,
            "type": "string"
          }
        },
        "required": [
          "filename",
          "contentType",
          "size",
          "url"
        ],
        "type": "object"
      },
      "addCommentSchema": {
        "properties": {
          "attachments": {
            "items": {
              "$ref": "#/components/schemas/commentAttachmentInputSchema"
            },
            "maxItems": 10,
            "type": "array"
          },
          "content": {
            "default": "",
            "maxLength": 10000,
            "type": "string"
          },
          "isInternal": {
            "type": "boolean"
          },
          "parentId": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "content"
        ],
        "type": "object"
      },
      "addInternalCommentApiSchema": {
        "properties": {
          "body": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "body"
        ],
        "type": "object"
      },
      "appliedIdempotencyKeySchema": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "operation": {
            "type": "string"
          },
          "resourceId": {
            "type": [
              "string",
              "null"
            ]
          },
          "resourceType": {
            "type": "string"
          },
          "status": {
            "enum": [
              "applied"
            ],
            "type": "string"
          },
          "statusCode": {
            "type": "integer"
          }
        },
        "required": [
          "key",
          "status",
          "operation",
          "resourceType",
          "resourceId",
          "statusCode",
          "createdAt"
        ],
        "type": "object"
      },
      "assignableMemberSchema": {
        "properties": {
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "image": {
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "$ref": "#/components/schemas/userKindSchema"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "email",
          "image",
          "kind"
        ],
        "type": "object"
      },
      "attachmentMetadataSchema": {
        "additionalProperties": {
          "anyOf": [
            {
              "maxLength": 2000,
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "propertyNames": {
          "maxLength": 100,
          "type": "string"
        },
        "type": "object"
      },
      "AttachmentResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/attachmentResponseSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "attachmentResponseSchema": {
        "properties": {
          "contentType": {
            "type": "string"
          },
          "filename": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "size": {
            "type": "number"
          },
          "uploadedAt": {
            "format": "date-time",
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "filename",
          "contentType",
          "size",
          "url",
          "uploadedAt"
        ],
        "type": "object"
      },
      "AttachmentsListEnvelope": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/attachmentResponseSchema"
            },
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "bulkUpdateTaskStatusApiSchema": {
        "properties": {
          "status": {
            "$ref": "#/components/schemas/taskStatusSchema"
          },
          "taskIds": {
            "items": {
              "type": "string"
            },
            "maxItems": 200,
            "minItems": 1,
            "type": "array"
          }
        },
        "required": [
          "taskIds",
          "status"
        ],
        "type": "object"
      },
      "calendarDateSchema": {
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
        "type": "string"
      },
      "ClientResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/clientResponseSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "clientResponseSchema": {
        "properties": {
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "emailDomains": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "taxCustomerType": {
            "type": "object"
          },
          "taxId": {
            "type": [
              "string",
              "null"
            ]
          },
          "taxLocationCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "organizationId",
          "name",
          "email",
          "phone",
          "address",
          "status",
          "emailDomains",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "closeBooksApiSchema": {
        "properties": {
          "through": {
            "$ref": "#/components/schemas/calendarDateSchema"
          }
        },
        "required": [
          "through"
        ],
        "type": "object"
      },
      "commentAttachmentInputSchema": {
        "properties": {
          "contentType": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "filename": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "size": {
            "exclusiveMinimum": 0,
            "type": "integer"
          },
          "url": {
            "format": "uri",
            "maxLength": 2048,
            "type": "string"
          }
        },
        "required": [
          "filename",
          "contentType",
          "size",
          "url"
        ],
        "type": "object"
      },
      "commentUserSchema": {
        "properties": {
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "image": {
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "email",
          "kind"
        ],
        "type": "object"
      },
      "ConvertProposalEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/convertProposalResponseSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "convertProposalResponseSchema": {
        "properties": {
          "projectId": {
            "type": "string"
          },
          "proposalId": {
            "type": "string"
          }
        },
        "required": [
          "projectId",
          "proposalId"
        ],
        "type": "object"
      },
      "createClientApiSchema": {
        "properties": {
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": "string"
          },
          "emailDomains": {
            "items": {
              "pattern": "^[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
              "type": "string"
            },
            "type": "array"
          },
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "default": "active",
            "enum": [
              "active",
              "in_negotiation",
              "onboarding",
              "archived"
            ],
            "type": "string"
          },
          "taxCustomerType": {
            "type": "object"
          },
          "taxId": {
            "maxLength": 80,
            "type": [
              "string",
              "null"
            ]
          },
          "taxLocationCode": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/taxLocationCodeSchema"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "name",
          "status",
          "emailDomains"
        ],
        "type": "object"
      },
      "createGeneratedInvoiceApiSchema": {
        "properties": {
          "clientId": {
            "minLength": 1,
            "type": "string"
          },
          "endDate": {
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string"
          },
          "projectIds": {
            "items": {
              "minLength": 1,
              "type": "string"
            },
            "minItems": 1,
            "type": "array"
          },
          "startDate": {
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string"
          }
        },
        "required": [
          "clientId",
          "startDate",
          "endDate",
          "projectIds"
        ],
        "type": "object"
      },
      "createInvoiceApiSchema": {
        "properties": {
          "clientId": {
            "type": "string"
          },
          "discount": {
            "minimum": 0,
            "type": "number"
          },
          "dueDate": {
            "format": "date-time",
            "type": "string"
          },
          "issueDate": {
            "format": "date-time",
            "type": "string"
          },
          "lineItems": {
            "items": {
              "$ref": "#/components/schemas/invoiceLineItemInputSchema"
            },
            "minItems": 1,
            "type": "array"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "paymentTerms": {
            "type": [
              "string",
              "null"
            ]
          },
          "projectId": {
            "type": [
              "string",
              "null"
            ]
          },
          "servicePeriodEnd": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/calendarDateSchema"
              },
              {
                "type": "null"
              }
            ]
          },
          "servicePeriodStart": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/calendarDateSchema"
              },
              {
                "type": "null"
              }
            ]
          },
          "taxEvidence": {
            "type": "object"
          },
          "timeEntryIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "clientId",
          "issueDate",
          "dueDate",
          "lineItems"
        ],
        "type": "object"
      },
      "createManualEntryRequestSchema": {
        "properties": {
          "description": {
            "type": "string"
          },
          "endTime": {
            "format": "date-time",
            "type": "string"
          },
          "startTime": {
            "format": "date-time",
            "type": "string"
          },
          "taskId": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "taskId",
          "startTime"
        ],
        "type": "object"
      },
      "createProjectApiSchema": {
        "properties": {
          "budget": {
            "minimum": 0,
            "type": "number"
          },
          "clientId": {
            "minLength": 1,
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "endDate": {
            "type": "string"
          },
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "startDate": {
            "type": "string"
          },
          "status": {
            "default": "active",
            "enum": [
              "active",
              "completed",
              "on_hold",
              "archived",
              "cancelled"
            ],
            "type": "string"
          },
          "taxSupplyCategory": {
            "type": "object"
          }
        },
        "required": [
          "name",
          "clientId",
          "status"
        ],
        "type": "object"
      },
      "createProposalApiSchema": {
        "properties": {
          "clientId": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": "string"
          },
          "title": {
            "minLength": 1,
            "type": "string"
          },
          "wizardInputs": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ProposalWizardInputsSchema"
              }
            ]
          }
        },
        "required": [
          "title"
        ],
        "type": "object"
      },
      "createProposalMilestoneApiSchema": {
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "dueDate": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "order": {
            "type": "integer"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "createProposalTaskApiSchema": {
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "dueDate": {
            "type": [
              "string",
              "null"
            ]
          },
          "estimatedHours": {
            "minimum": 0,
            "type": [
              "number",
              "null"
            ]
          },
          "order": {
            "type": "integer"
          },
          "title": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "title"
        ],
        "type": "object"
      },
      "createQuoteApiSchema": {
        "properties": {
          "attachments": {
            "items": {
              "$ref": "#/components/schemas/quoteAttachmentInputSchema"
            },
            "type": "array"
          },
          "clientId": {
            "type": "string"
          },
          "customerNotes": {
            "type": [
              "string",
              "null"
            ]
          },
          "discount": {
            "minimum": 0,
            "type": "number"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "issueDate": {
            "format": "date-time",
            "type": "string"
          },
          "lineItems": {
            "items": {
              "$ref": "#/components/schemas/quoteLineItemInputSchema"
            },
            "minItems": 1,
            "type": "array"
          },
          "projectId": {
            "type": [
              "string",
              "null"
            ]
          },
          "taxEvidence": {
            "type": "object"
          },
          "termsAndConditions": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "clientId",
          "issueDate",
          "expiresAt",
          "termsAndConditions",
          "lineItems"
        ],
        "type": "object"
      },
      "createSubtaskApiSchema": {
        "properties": {
          "assignedToId": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "dueDate": {
            "type": [
              "string",
              "null"
            ]
          },
          "isBillable": {
            "default": true,
            "type": "boolean"
          },
          "priority": {
            "enum": [
              "low",
              "medium",
              "high",
              "urgent"
            ],
            "type": "string"
          },
          "status": {
            "enum": [
              "todo",
              "in_progress",
              "blocked",
              "done",
              "cancelled"
            ],
            "type": "string"
          },
          "title": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "title",
          "status",
          "priority",
          "isBillable"
        ],
        "type": "object"
      },
      "createTaskApiSchema": {
        "properties": {
          "assignedToId": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "dueDate": {
            "type": [
              "string",
              "null"
            ]
          },
          "isBillable": {
            "default": true,
            "type": "boolean"
          },
          "priority": {
            "enum": [
              "low",
              "medium",
              "high",
              "urgent"
            ],
            "type": "string"
          },
          "projectId": {
            "type": "string"
          },
          "status": {
            "enum": [
              "todo",
              "in_progress",
              "blocked",
              "done",
              "cancelled"
            ],
            "type": "string"
          },
          "title": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "projectId",
          "title",
          "status",
          "priority",
          "isBillable"
        ],
        "type": "object"
      },
      "CreditNoteEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/creditNoteSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "creditNoteInputSchema": {
        "discriminator": {
          "propertyName": "scope"
        },
        "oneOf": [
          {
            "properties": {
              "reason": {
                "$ref": "#/components/schemas/reasonSchema"
              },
              "scope": {
                "type": "string"
              }
            },
            "required": [
              "scope",
              "reason"
            ],
            "type": "object"
          },
          {
            "properties": {
              "amount": {
                "exclusiveMinimum": 0,
                "type": "number"
              },
              "reason": {
                "$ref": "#/components/schemas/reasonSchema"
              },
              "scope": {
                "type": "string"
              }
            },
            "required": [
              "scope",
              "amount",
              "reason"
            ],
            "type": "object"
          }
        ],
        "type": "object"
      },
      "CreditNotePreviewEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/creditNotePreviewSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "creditNotePreviewSchema": {
        "properties": {
          "balanceAfter": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "refundDueAfter": {
            "type": "number"
          },
          "subtotal": {
            "type": "number"
          },
          "summary": {
            "type": "object"
          },
          "taxAmount": {
            "type": "number"
          },
          "total": {
            "type": "number"
          }
        },
        "required": [
          "currency",
          "subtotal",
          "taxAmount",
          "total",
          "balanceAfter",
          "refundDueAfter",
          "summary"
        ],
        "type": "object"
      },
      "creditNoteSchema": {
        "properties": {
          "client": {
            "properties": {
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "email"
            ],
            "type": "object"
          },
          "createdAt": {
            "type": "string"
          },
          "createdByName": {
            "type": [
              "string",
              "null"
            ]
          },
          "creditNoteNumber": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "discount": {
            "type": "number"
          },
          "id": {
            "type": "string"
          },
          "invoice": {
            "properties": {
              "id": {
                "type": "string"
              },
              "invoiceNumber": {
                "type": "string"
              },
              "issueDate": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "invoiceNumber",
              "issueDate"
            ],
            "type": "object"
          },
          "issueDate": {
            "type": "string"
          },
          "lastSentTo": {
            "type": [
              "string",
              "null"
            ]
          },
          "lineItems": {
            "items": {
              "$ref": "#/components/schemas/invoiceLineItemSchema"
            },
            "type": "array"
          },
          "reason": {
            "type": "string"
          },
          "subtotal": {
            "type": "number"
          },
          "tax": {
            "$ref": "#/components/schemas/documentTaxViewSchema"
          },
          "taxAmount": {
            "type": "number"
          },
          "total": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "creditNoteNumber",
          "issueDate",
          "reason",
          "lineItems",
          "subtotal",
          "discount",
          "taxAmount",
          "total",
          "currency",
          "lastSentTo",
          "createdAt",
          "createdByName",
          "invoice",
          "client",
          "tax"
        ],
        "type": "object"
      },
      "creditOptionsSchema": {
        "properties": {
          "amountPaid": {
            "type": "number"
          },
          "balanceDue": {
            "type": "number"
          },
          "blocker": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": "string"
          },
          "fullCreditAvailable": {
            "type": "boolean"
          },
          "invoiceId": {
            "type": "string"
          },
          "invoiceNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "maxAmount": {
            "type": "number"
          },
          "priceBasisLabel": {
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "type": "number"
          }
        },
        "required": [
          "invoiceId",
          "invoiceNumber",
          "currency",
          "total",
          "balanceDue",
          "amountPaid",
          "fullCreditAvailable",
          "maxAmount",
          "priceBasisLabel",
          "blocker"
        ],
        "type": "object"
      },
      "delegatingPersonSchema": {
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "type": [
          "object",
          "null"
        ]
      },
      "documentTaxPresentationSchema": {
        "properties": {
          "advancePaymentDate": {
            "type": [
              "string",
              "null"
            ]
          },
          "buyer": {
            "$ref": "#/components/schemas/partySchema"
          },
          "includedTaxNote": {
            "type": [
              "string",
              "null"
            ]
          },
          "priceBasisLabel": {
            "type": [
              "string",
              "null"
            ]
          },
          "seller": {
            "$ref": "#/components/schemas/partySchema"
          },
          "servicePeriod": {
            "properties": {
              "end": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "start": {
                "type": "string"
              }
            },
            "required": [
              "start",
              "end"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "summary": {
            "items": {
              "anyOf": [
                {
                  "properties": {
                    "amount": {
                      "type": "number"
                    },
                    "label": {
                      "type": "string"
                    },
                    "role": {
                      "enum": [
                        "subtotal",
                        "discount",
                        "taxable",
                        "tax",
                        "total"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "label",
                    "amount"
                  ],
                  "type": "object"
                },
                {
                  "properties": {
                    "label": {
                      "type": "string"
                    },
                    "role": {
                      "enum": [
                        "statement"
                      ],
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "label",
                    "value"
                  ],
                  "type": "object"
                }
              ]
            },
            "type": "array"
          },
          "taxInTaxCurrency": {
            "properties": {
              "amount": {
                "type": "number"
              },
              "currency": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "rateLabel": {
                "type": "string"
              }
            },
            "required": [
              "label",
              "amount",
              "currency",
              "rateLabel"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "title",
          "priceBasisLabel",
          "summary",
          "includedTaxNote",
          "taxInTaxCurrency",
          "seller",
          "buyer",
          "servicePeriod",
          "advancePaymentDate"
        ],
        "type": "object"
      },
      "documentTaxViewSchema": {
        "properties": {
          "actions": {
            "items": {
              "enum": [
                "settings",
                "client",
                "category",
                "manual"
              ],
              "type": "string"
            },
            "type": "array"
          },
          "client": {
            "properties": {
              "location": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "locationLabel": {
                "type": "string"
              },
              "type": {
                "type": "object"
              }
            },
            "required": [
              "location",
              "locationLabel",
              "type"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "explanation": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "headline": {
            "type": "string"
          },
          "jurisdiction": {
            "properties": {
              "code": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "name"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "locked": {
            "type": "boolean"
          },
          "manual": {
            "properties": {
              "reason": {
                "type": "string"
              },
              "treatment": {
                "$ref": "#/components/schemas/taxTreatmentSchema"
              }
            },
            "required": [
              "treatment",
              "reason"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "manualOptions": {
            "items": {
              "properties": {
                "label": {
                  "type": "string"
                },
                "value": {
                  "$ref": "#/components/schemas/taxTreatmentSchema"
                }
              },
              "required": [
                "value",
                "label"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "presentation": {
            "$ref": "#/components/schemas/documentTaxPresentationSchema"
          },
          "questions": {
            "items": {
              "$ref": "#/components/schemas/taxQuestionSchema"
            },
            "type": "array"
          },
          "readiness": {
            "properties": {
              "blockers": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "ready": {
                "type": "boolean"
              }
            },
            "required": [
              "ready",
              "blockers"
            ],
            "type": "object"
          },
          "requirements": {
            "items": {
              "$ref": "#/components/schemas/taxRequirementStateSchema"
            },
            "type": "array"
          },
          "rules": {
            "properties": {
              "effectiveFrom": {
                "type": "string"
              },
              "reference": {
                "type": "string"
              },
              "regimeName": {
                "type": "string"
              },
              "reviewedAt": {
                "type": "string"
              },
              "sources": {
                "items": {
                  "$ref": "#/components/schemas/sourceSchema"
                },
                "type": "array"
              },
              "version": {
                "type": "integer"
              }
            },
            "required": [
              "regimeName",
              "version",
              "effectiveFrom",
              "reviewedAt",
              "reference",
              "sources"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "state": {
            "enum": [
              "not_configured",
              "needs_review",
              "determined"
            ],
            "type": "string"
          },
          "supplyCategory": {
            "properties": {
              "label": {
                "type": "string"
              },
              "source": {
                "enum": [
                  "document",
                  "project",
                  "organization"
                ],
                "type": "string"
              },
              "value": {
                "$ref": "#/components/schemas/supplyCategorySchema"
              }
            },
            "required": [
              "value",
              "label",
              "source"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "supplyCategoryOptions": {
            "items": {
              "properties": {
                "description": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "value": {
                  "$ref": "#/components/schemas/supplyCategorySchema"
                }
              },
              "required": [
                "value",
                "label",
                "description"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "treatment": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/taxTreatmentSchema"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "state",
          "locked",
          "jurisdiction",
          "headline",
          "treatment",
          "explanation",
          "actions",
          "manual",
          "manualOptions",
          "supplyCategory",
          "supplyCategoryOptions",
          "client",
          "questions",
          "requirements",
          "readiness",
          "rules",
          "presentation"
        ],
        "type": "object"
      },
      "ExternalInvoicePaymentEnvelope": {
        "properties": {
          "data": {
            "properties": {
              "id": {
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": "object"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "IdempotencyKeyReadbackEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/idempotencyKeyReadbackSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "idempotencyKeyReadbackSchema": {
        "discriminator": {
          "propertyName": "status"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/appliedIdempotencyKeySchema"
          },
          {
            "$ref": "#/components/schemas/voidedIdempotencyKeySchema"
          }
        ],
        "type": "object"
      },
      "idempotencyKeySchema": {
        "pattern": "^[\\x21-\\x7E]{1,255}$",
        "type": "string"
      },
      "identifierSchema": {
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "label",
          "value"
        ],
        "type": "object"
      },
      "InstallationFinalizeEnvelope": {
        "properties": {
          "data": {
            "properties": {
              "installation": {
                "$ref": "#/components/schemas/installationResponseSchema"
              }
            },
            "required": [
              "installation"
            ],
            "type": "object"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "installationResponseSchema": {
        "properties": {
          "appId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "scopesGranted": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "appId",
          "organizationId",
          "status",
          "scopesGranted",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "InstallationUninstallEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/uninstalledInstallationResponseSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "IntakeAnswersSchema": {
        "additionalProperties": {
          "maxLength": 4000,
          "type": "string"
        },
        "propertyNames": {
          "$ref": "#/components/schemas/IntakeQuestionIdSchema"
        },
        "type": "object"
      },
      "IntakeFormDefinitionSchema": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "default": "",
            "maxLength": 2000,
            "type": "string"
          },
          "name": {
            "maxLength": 120,
            "minLength": 1,
            "type": "string"
          },
          "questions": {
            "items": {
              "$ref": "#/components/schemas/IntakeQuestionSchema"
            },
            "maxItems": 50,
            "minItems": 1,
            "type": "array"
          }
        },
        "required": [
          "name",
          "description",
          "questions"
        ],
        "type": "object"
      },
      "IntakeFormEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/IntakeFormViewSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "IntakeFormsEnvelope": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/IntakeFormViewSchema"
            },
            "type": "array"
          },
          "pagination": {
            "$ref": "#/components/schemas/paginationSchema"
          }
        },
        "required": [
          "data",
          "pagination"
        ],
        "type": "object"
      },
      "IntakeFormViewSchema": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "draft": {
            "$ref": "#/components/schemas/IntakeFormDefinitionSchema"
          },
          "id": {
            "type": "string"
          },
          "publicId": {
            "format": "uuid",
            "type": "string"
          },
          "publishedVersion": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IntakeVersionViewSchema"
              },
              {
                "type": "null"
              }
            ]
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "publicId",
          "draft",
          "publishedVersion",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "IntakePreparationSchema": {
        "additionalProperties": false,
        "properties": {
          "assumptions": {
            "items": {
              "maxLength": 2000,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 30,
            "type": "array"
          },
          "openQuestions": {
            "items": {
              "maxLength": 2000,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 30,
            "type": "array"
          },
          "summary": {
            "maxLength": 8000,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "summary",
          "assumptions",
          "openQuestions"
        ],
        "type": "object"
      },
      "IntakePublishSchema": {
        "additionalProperties": false,
        "properties": {
          "expectedUpdatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "expectedUpdatedAt"
        ],
        "type": "object"
      },
      "IntakeQuestionIdSchema": {
        "pattern": "^[a-zA-Z0-9_-]{1,64}$",
        "type": "string"
      },
      "IntakeQuestionSchema": {
        "additionalProperties": false,
        "properties": {
          "helpText": {
            "default": "",
            "maxLength": 500,
            "type": "string"
          },
          "id": {
            "$ref": "#/components/schemas/IntakeQuestionIdSchema"
          },
          "label": {
            "maxLength": 160,
            "minLength": 1,
            "type": "string"
          },
          "mapping": {
            "default": "context",
            "enum": [
              "context",
              "goals",
              "deliverables",
              "outOfScope",
              "startDate",
              "deadline",
              "budgetCeiling",
              "category"
            ],
            "type": "string"
          },
          "options": {
            "items": {
              "maxLength": 200,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 50,
            "type": "array"
          },
          "required": {
            "default": false,
            "type": "boolean"
          },
          "type": {
            "$ref": "#/components/schemas/IntakeQuestionTypeSchema"
          }
        },
        "required": [
          "id",
          "label",
          "type",
          "helpText",
          "required",
          "options",
          "mapping"
        ],
        "type": "object"
      },
      "IntakeQuestionTypeSchema": {
        "enum": [
          "text",
          "textarea",
          "select",
          "number",
          "date"
        ],
        "type": "string"
      },
      "IntakeReceiptEnvelope": {
        "properties": {
          "data": {
            "additionalProperties": false,
            "properties": {
              "message": {
                "type": "string"
              }
            },
            "required": [
              "message"
            ],
            "type": "object"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "IntakeSubmissionEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/IntakeSubmissionViewSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "IntakeSubmissionsEnvelope": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/IntakeSubmissionViewSchema"
            },
            "type": "array"
          },
          "pagination": {
            "$ref": "#/components/schemas/paginationSchema"
          }
        },
        "required": [
          "data",
          "pagination"
        ],
        "type": "object"
      },
      "IntakeSubmissionStatusSchema": {
        "enum": [
          "pending",
          "processing",
          "ready",
          "failed"
        ],
        "type": "string"
      },
      "IntakeSubmissionViewSchema": {
        "properties": {
          "answers": {
            "$ref": "#/components/schemas/IntakeAnswersSchema"
          },
          "attempts": {
            "type": "integer"
          },
          "contactEmail": {
            "type": "string"
          },
          "contactName": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "formId": {
            "type": "string"
          },
          "formName": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "preparation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IntakePreparationSchema"
              },
              {
                "type": "null"
              }
            ]
          },
          "processingError": {
            "type": [
              "string",
              "null"
            ]
          },
          "proposalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/IntakeSubmissionStatusSchema"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "version": {
            "$ref": "#/components/schemas/IntakeVersionViewSchema"
          }
        },
        "required": [
          "id",
          "formId",
          "formName",
          "version",
          "contactName",
          "contactEmail",
          "answers",
          "status",
          "proposalId",
          "preparation",
          "attempts",
          "processingError",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "IntakeSubmitSchema": {
        "additionalProperties": false,
        "properties": {
          "answers": {
            "$ref": "#/components/schemas/IntakeAnswersSchema"
          },
          "contactEmail": {
            "format": "email",
            "maxLength": 254,
            "type": "string"
          },
          "contactName": {
            "maxLength": 120,
            "minLength": 1,
            "type": "string"
          },
          "idempotencyKey": {
            "format": "uuid",
            "type": "string"
          },
          "versionId": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "versionId",
          "idempotencyKey",
          "contactName",
          "contactEmail",
          "answers"
        ],
        "type": "object"
      },
      "IntakeVersionViewSchema": {
        "properties": {
          "definition": {
            "$ref": "#/components/schemas/IntakeFormDefinitionSchema"
          },
          "id": {
            "type": "string"
          },
          "number": {
            "type": "integer"
          },
          "publishedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "number",
          "definition",
          "publishedAt"
        ],
        "type": "object"
      },
      "inviteTeamMemberApiSchema": {
        "properties": {
          "email": {
            "format": "email",
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "email",
          "role"
        ],
        "type": "object"
      },
      "InvoiceCreditNotesEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/invoiceCreditNotesSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "invoiceCreditNotesSchema": {
        "properties": {
          "creditNotes": {
            "items": {
              "$ref": "#/components/schemas/creditNoteSchema"
            },
            "type": "array"
          },
          "options": {
            "$ref": "#/components/schemas/creditOptionsSchema"
          }
        },
        "required": [
          "options",
          "creditNotes"
        ],
        "type": "object"
      },
      "invoiceGenerationMissingHourlyRateSummarySchema": {
        "properties": {
          "projectCount": {
            "minimum": 0,
            "type": "integer"
          },
          "timeEntryCount": {
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "projectCount",
          "timeEntryCount"
        ],
        "type": "object"
      },
      "invoiceGenerationProjectSchema": {
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "timeEntryCount": {
            "minimum": 0,
            "type": "integer"
          },
          "totalHours": {
            "minimum": 0,
            "type": "number"
          }
        },
        "required": [
          "id",
          "name",
          "timeEntryCount",
          "totalHours"
        ],
        "type": "object"
      },
      "InvoiceGenerationProjectsEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/invoiceGenerationProjectsResponseSchema"
          },
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/invoiceGenerationProjectsMetadataSchema"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "invoiceGenerationProjectsMetadataSchema": {
        "properties": {
          "blockedByMissingHourlyRate": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/invoiceGenerationMissingHourlyRateSummarySchema"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "blockedByMissingHourlyRate"
        ],
        "type": "object"
      },
      "invoiceGenerationProjectsResponseSchema": {
        "items": {
          "$ref": "#/components/schemas/invoiceGenerationProjectSchema"
        },
        "type": "array"
      },
      "invoiceLineItemInputSchema": {
        "properties": {
          "description": {
            "minLength": 1,
            "type": "string"
          },
          "quantity": {
            "exclusiveMinimum": 0,
            "type": "number"
          },
          "rate": {
            "exclusiveMinimum": 0,
            "type": "number"
          },
          "timeEntryIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "description",
          "quantity",
          "rate"
        ],
        "type": "object"
      },
      "invoiceLineItemSchema": {
        "properties": {
          "amount": {
            "type": "number"
          },
          "description": {
            "type": "string"
          },
          "quantity": {
            "type": "number"
          },
          "rate": {
            "type": "number"
          },
          "timeEntryIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "description",
          "quantity",
          "rate",
          "amount"
        ],
        "type": "object"
      },
      "InvoiceListEnvelope": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/invoiceResponseSchema"
            },
            "type": "array"
          },
          "pagination": {
            "$ref": "#/components/schemas/paginationSchema"
          }
        },
        "required": [
          "data",
          "pagination"
        ],
        "type": "object"
      },
      "invoicePaymentItemSchema": {
        "properties": {
          "amount": {
            "type": "number"
          },
          "createdAt": {
            "type": "string"
          },
          "feeAmount": {
            "type": "number"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "payment",
              "write_off",
              "refund"
            ],
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "method": {
            "enum": [
              "card",
              "us_bank_account",
              "sentoo",
              "bank_transfer",
              "check",
              "cash",
              "other"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "paidAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "paidOn": {
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "payerEmail": {
            "type": [
              "string",
              "null"
            ]
          },
          "provider": {
            "type": [
              "string",
              "null"
            ]
          },
          "recordedByName": {
            "type": [
              "string",
              "null"
            ]
          },
          "removable": {
            "type": "boolean"
          },
          "source": {
            "enum": [
              "manual",
              "online"
            ],
            "type": "string"
          },
          "status": {
            "enum": [
              "initiated",
              "pending",
              "succeeded",
              "failed",
              "canceled"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "source",
          "provider",
          "method",
          "label",
          "status",
          "amount",
          "feeAmount",
          "paidAt",
          "paidOn",
          "note",
          "payerEmail",
          "recordedByName",
          "createdAt",
          "removable"
        ],
        "type": "object"
      },
      "InvoicePaymentsEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/invoicePaymentsResponseSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "invoicePaymentSettingsApiSchema": {
        "properties": {
          "passProcessingFees": {
            "type": "boolean"
          }
        },
        "required": [
          "passProcessingFees"
        ],
        "type": "object"
      },
      "invoicePaymentsResponseSchema": {
        "properties": {
          "feePassThroughSupported": {
            "type": "boolean"
          },
          "payments": {
            "items": {
              "$ref": "#/components/schemas/invoicePaymentItemSchema"
            },
            "type": "array"
          },
          "summary": {
            "$ref": "#/components/schemas/invoicePaymentSummarySchema"
          }
        },
        "required": [
          "summary",
          "payments",
          "feePassThroughSupported"
        ],
        "type": "object"
      },
      "invoicePaymentSummarySchema": {
        "properties": {
          "amountCredited": {
            "type": "number"
          },
          "amountPaid": {
            "type": "number"
          },
          "amountPending": {
            "type": "number"
          },
          "amountRefunded": {
            "type": "number"
          },
          "amountWrittenOff": {
            "type": "number"
          },
          "balanceDue": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "refundDue": {
            "type": "number"
          },
          "total": {
            "type": "number"
          }
        },
        "required": [
          "currency",
          "total",
          "amountPaid",
          "amountRefunded",
          "amountWrittenOff",
          "amountCredited",
          "amountPending",
          "balanceDue",
          "refundDue"
        ],
        "type": "object"
      },
      "InvoiceReminderSettingsEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/invoiceReminderSettingsSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "invoiceReminderSettingsSchema": {
        "properties": {
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "enabled"
        ],
        "type": "object"
      },
      "InvoiceResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/invoiceResponseSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "invoiceResponseSchema": {
        "properties": {
          "amountCredited": {
            "type": "number"
          },
          "amountPaid": {
            "type": "number"
          },
          "amountRefunded": {
            "type": "number"
          },
          "amountWrittenOff": {
            "type": "number"
          },
          "archived": {
            "type": "boolean"
          },
          "archivedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "balanceDue": {
            "type": "number"
          },
          "client": {
            "properties": {
              "address": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name"
            ],
            "type": "object"
          },
          "clientId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "createdById": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": "string"
          },
          "discount": {
            "type": "number"
          },
          "dueDate": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "invoiceNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "issueDate": {
            "type": "string"
          },
          "lastSentTo": {
            "type": [
              "string",
              "null"
            ]
          },
          "lineItems": {
            "items": {
              "$ref": "#/components/schemas/invoiceLineItemSchema"
            },
            "type": "array"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "organizationId": {
            "type": "string"
          },
          "paidAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "passProcessingFees": {
            "type": "boolean"
          },
          "paymentTerms": {
            "type": [
              "string",
              "null"
            ]
          },
          "project": {
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "projectId": {
            "type": [
              "string",
              "null"
            ]
          },
          "servicePeriodEnd": {
            "type": [
              "string",
              "null"
            ]
          },
          "servicePeriodStart": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/invoiceStatusSchema"
          },
          "subtotal": {
            "type": "number"
          },
          "tax": {
            "$ref": "#/components/schemas/documentTaxViewSchema"
          },
          "taxAmount": {
            "type": "number"
          },
          "taxEvidence": {
            "$ref": "#/components/schemas/documentTaxEvidenceSchema"
          },
          "taxSnapshotLockedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "timeEntryIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "total": {
            "type": "number"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "organizationId",
          "clientId",
          "projectId",
          "invoiceNumber",
          "issueDate",
          "dueDate",
          "status",
          "subtotal",
          "taxAmount",
          "discount",
          "total",
          "currency",
          "taxEvidence",
          "tax",
          "servicePeriodStart",
          "servicePeriodEnd",
          "lineItems",
          "createdById",
          "createdAt",
          "updatedAt",
          "archived",
          "amountPaid",
          "amountRefunded",
          "amountWrittenOff",
          "amountCredited",
          "balanceDue",
          "passProcessingFees",
          "lastSentTo",
          "client",
          "project"
        ],
        "type": "object"
      },
      "InvoiceShareLinkEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/invoiceShareLinkResponseSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "invoiceShareLinkResponseSchema": {
        "properties": {
          "url": {
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "type": "object"
      },
      "invoiceStatusSchema": {
        "type": "string"
      },
      "JobQueuedEnvelope": {
        "properties": {
          "data": {
            "properties": {
              "jobId": {}
            },
            "type": "object"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "jurisdictionOptionSchema": {
        "properties": {
          "chamberOfCommerce": {
            "properties": {
              "label": {
                "type": "string"
              },
              "required": {
                "type": "boolean"
              }
            },
            "required": [
              "required",
              "label"
            ],
            "type": "object"
          },
          "code": {
            "$ref": "#/components/schemas/taxJurisdictionCodeSchema"
          },
          "exemptions": {
            "items": {
              "properties": {
                "label": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                }
              },
              "required": [
                "value",
                "label"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "identifierLabel": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "pricingSummary": {
            "type": "string"
          },
          "rateLabel": {
            "type": "string"
          },
          "regimeName": {
            "type": "string"
          },
          "rules": {
            "properties": {
              "effectiveFrom": {
                "type": "string"
              },
              "reference": {
                "type": "string"
              },
              "reviewDueAt": {
                "type": "string"
              },
              "reviewedAt": {
                "type": "string"
              },
              "smallBusinessRelief": {
                "properties": {
                  "currency": {
                    "type": "string"
                  },
                  "threshold": {
                    "type": "number"
                  }
                },
                "required": [
                  "threshold",
                  "currency"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "sources": {
                "items": {
                  "$ref": "#/components/schemas/sourceSchema"
                },
                "type": "array"
              },
              "summary": {
                "type": "string"
              },
              "version": {
                "type": "integer"
              }
            },
            "required": [
              "version",
              "effectiveFrom",
              "reviewedAt",
              "reviewDueAt",
              "summary",
              "reference",
              "sources",
              "smallBusinessRelief"
            ],
            "type": "object"
          },
          "statuses": {
            "items": {
              "properties": {
                "conditions": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "description": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "reference": {
                  "properties": {
                    "description": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "label",
                    "description"
                  ],
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "value": {
                  "$ref": "#/components/schemas/sellerTaxStatusSchema"
                }
              },
              "required": [
                "value",
                "label",
                "description",
                "conditions",
                "reference"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "taxLabel": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "name",
          "regimeName",
          "taxLabel",
          "rateLabel",
          "pricingSummary",
          "identifierLabel",
          "chamberOfCommerce",
          "statuses",
          "exemptions",
          "rules"
        ],
        "type": "object"
      },
      "mobileRefreshRequestSchema": {
        "properties": {
          "refreshToken": {
            "type": "string"
          }
        },
        "required": [
          "refreshToken"
        ],
        "type": "object"
      },
      "moveTaskApiSchema": {
        "properties": {
          "projectId": {
            "type": "string"
          }
        },
        "required": [
          "projectId"
        ],
        "type": "object"
      },
      "NotificationPreferencesEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/notificationPreferencesSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "notificationPreferencesSchema": {
        "type": "object"
      },
      "paginationSchema": {
        "properties": {
          "currentPage": {
            "type": "number"
          },
          "hasNextPage": {
            "type": "boolean"
          },
          "hasPreviousPage": {
            "type": "boolean"
          },
          "pageSize": {
            "type": "number"
          },
          "totalItems": {
            "type": "number"
          },
          "totalPages": {
            "type": "number"
          }
        },
        "required": [
          "currentPage",
          "pageSize",
          "totalItems",
          "totalPages",
          "hasNextPage",
          "hasPreviousPage"
        ],
        "type": "object"
      },
      "partySchema": {
        "properties": {
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "identifiers": {
            "items": {
              "$ref": "#/components/schemas/identifierSchema"
            },
            "type": "array"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "name",
          "address",
          "identifiers"
        ],
        "type": "object"
      },
      "PaymentAccountEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/paymentAccountSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "paymentAccountSchema": {
        "properties": {
          "accountId": {
            "type": "string"
          },
          "chargesEnabled": {
            "type": "boolean"
          },
          "connectedAt": {
            "format": "date-time",
            "type": "string"
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          },
          "detailsSubmitted": {
            "type": "boolean"
          },
          "payoutsEnabled": {
            "type": "boolean"
          },
          "provider": {
            "enum": [
              "stripe",
              "sentoo"
            ],
            "type": "string"
          },
          "status": {
            "enum": [
              "pending",
              "active",
              "restricted",
              "disconnected"
            ],
            "type": "string"
          }
        },
        "required": [
          "provider",
          "status",
          "accountId",
          "country",
          "chargesEnabled",
          "payoutsEnabled",
          "detailsSubmitted",
          "connectedAt"
        ],
        "type": "object"
      },
      "PaymentRedirectEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/paymentRedirectResponseSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "paymentRedirectResponseSchema": {
        "properties": {
          "url": {
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "type": "object"
      },
      "PaymentSettingsEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/paymentSettingsResponseSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "paymentSettingsResponseSchema": {
        "properties": {
          "onlinePaymentsAvailableOnPlan": {
            "type": "boolean"
          },
          "overdueRemindersEnabled": {
            "type": "boolean"
          },
          "sentoo": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/paymentAccountSchema"
              },
              {
                "type": "null"
              }
            ]
          },
          "sentooWebhookUrl": {
            "format": "uri",
            "type": "string"
          },
          "stripe": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/paymentAccountSchema"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "onlinePaymentsAvailableOnPlan",
          "stripe",
          "sentoo",
          "sentooWebhookUrl",
          "overdueRemindersEnabled"
        ],
        "type": "object"
      },
      "PaymentWebhookAckEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/paymentWebhookAckSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "paymentWebhookAckSchema": {
        "properties": {
          "received": {
            "type": "boolean"
          }
        },
        "required": [
          "received"
        ],
        "type": "object"
      },
      "ProjectHourlyRateOverrideEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/projectHourlyRateOverrideRowSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "projectHourlyRateOverrideRowSchema": {
        "properties": {
          "baseHourlyRate": {
            "type": [
              "number",
              "null"
            ]
          },
          "baseHourlyRateSource": {
            "enum": [
              "team_member",
              "job_role"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "effectiveHourlyRate": {
            "type": [
              "number",
              "null"
            ]
          },
          "email": {
            "format": "email",
            "type": [
              "string",
              "null"
            ]
          },
          "hasOverride": {
            "type": "boolean"
          },
          "jobRoleName": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "overrideHourlyRate": {
            "type": [
              "number",
              "null"
            ]
          },
          "userId": {
            "type": "string"
          }
        },
        "required": [
          "userId",
          "name",
          "email",
          "jobRoleName",
          "baseHourlyRate",
          "baseHourlyRateSource",
          "overrideHourlyRate",
          "effectiveHourlyRate",
          "hasOverride"
        ],
        "type": "object"
      },
      "ProjectHourlyRateOverridesEnvelope": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/projectHourlyRateOverrideRowSchema"
            },
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "ProjectResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/projectResponseSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "projectResponseSchema": {
        "properties": {
          "_count": {
            "properties": {
              "tasks": {
                "type": "number"
              }
            },
            "required": [
              "tasks"
            ],
            "type": "object"
          },
          "budget": {
            "type": [
              "number",
              "null"
            ]
          },
          "budgetThreshold": {
            "type": "number"
          },
          "client": {
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "type": "object"
          },
          "clientId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "createdById": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "endDate": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "sourceProposal": {
            "properties": {
              "id": {
                "type": "string"
              },
              "status": {
                "enum": [
                  "draft",
                  "shared",
                  "approved",
                  "rejected"
                ],
                "type": "string"
              },
              "title": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "title",
              "status"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "startDate": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "enum": [
              "active",
              "completed",
              "on_hold",
              "archived",
              "cancelled"
            ],
            "type": "string"
          },
          "taxSupplyCategory": {
            "type": "object"
          },
          "totalCost": {
            "type": "number"
          },
          "totalTimeSpent": {
            "type": "number"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "clientId",
          "organizationId",
          "status",
          "startDate",
          "endDate",
          "budget",
          "createdAt",
          "updatedAt",
          "createdById",
          "client"
        ],
        "type": "object"
      },
      "projectUserListItemSchema": {
        "properties": {
          "email": {
            "format": "email",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "email"
        ],
        "type": "object"
      },
      "ProjectUsersListEnvelope": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/projectUserListItemSchema"
            },
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "ProposalBudgetRangeEnvelope": {
        "properties": {
          "data": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/proposalBudgetRangeResponseSchema"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "proposalBudgetRangeResponseSchema": {
        "properties": {
          "id": {
            "type": "string"
          },
          "maxAmount": {
            "type": "number"
          },
          "minAmount": {
            "type": "number"
          },
          "proposalId": {
            "type": "string"
          },
          "rationale": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "proposalId",
          "minAmount",
          "maxAmount",
          "rationale"
        ],
        "type": "object"
      },
      "ProposalCommentResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/proposalCommentResponseSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "proposalCommentResponseSchema": {
        "properties": {
          "authorType": {
            "enum": [
              "internal",
              "external"
            ],
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "externalEmail": {
            "type": [
              "string",
              "null"
            ]
          },
          "externalName": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "orgUserId": {
            "type": [
              "string",
              "null"
            ]
          },
          "proposalId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "proposalId",
          "body",
          "authorType",
          "orgUserId",
          "externalName",
          "externalEmail",
          "createdAt"
        ],
        "type": "object"
      },
      "ProposalCommentsListEnvelope": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/proposalCommentResponseSchema"
            },
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "ProposalListEnvelope": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/proposalListItemSchema"
            },
            "type": "array"
          },
          "pagination": {
            "$ref": "#/components/schemas/paginationSchema"
          }
        },
        "required": [
          "data",
          "pagination"
        ],
        "type": "object"
      },
      "proposalListItemSchema": {
        "properties": {
          "client": {
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "clientId": {
            "type": [
              "string",
              "null"
            ]
          },
          "convertedProjectId": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "status": {
            "enum": [
              "draft",
              "shared",
              "approved",
              "rejected"
            ],
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "status",
          "currency",
          "clientId",
          "convertedProjectId",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "ProposalMilestoneListEnvelope": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/proposalMilestoneResponseSchema"
            },
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "ProposalMilestoneResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/proposalMilestoneResponseSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "proposalMilestoneResponseSchema": {
        "properties": {
          "createdAt": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "dueDate": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "order": {
            "type": "number"
          },
          "proposalId": {
            "type": "string"
          },
          "tasks": {
            "items": {
              "$ref": "#/components/schemas/proposalTaskResponseSchema"
            },
            "type": "array"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "proposalId",
          "name",
          "description",
          "order",
          "dueDate",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "ProposalResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/proposalResponseSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "proposalResponseSchema": {
        "properties": {
          "approvedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "approvedByEmail": {
            "type": [
              "string",
              "null"
            ]
          },
          "approvedByName": {
            "type": [
              "string",
              "null"
            ]
          },
          "budgetRange": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/proposalBudgetRangeResponseSchema"
              },
              {
                "type": "null"
              }
            ]
          },
          "client": {
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "clientId": {
            "type": [
              "string",
              "null"
            ]
          },
          "comments": {
            "items": {
              "$ref": "#/components/schemas/proposalCommentResponseSchema"
            },
            "type": "array"
          },
          "convertedProject": {
            "properties": {
              "clientId": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "clientId"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "convertedProjectId": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "createdById": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "generatedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "milestones": {
            "items": {
              "$ref": "#/components/schemas/proposalMilestoneResponseSchema"
            },
            "type": "array"
          },
          "organizationId": {
            "type": "string"
          },
          "passwordProtected": {
            "type": "boolean"
          },
          "rejectedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "rejectedByEmail": {
            "type": [
              "string",
              "null"
            ]
          },
          "rejectedByName": {
            "type": [
              "string",
              "null"
            ]
          },
          "sharedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "shareExpiresAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "shareToken": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "enum": [
              "draft",
              "shared",
              "approved",
              "rejected"
            ],
            "type": "string"
          },
          "tax": {
            "$ref": "#/components/schemas/documentTaxViewSchema"
          },
          "taxSnapshotLockedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "taxSnapshotVersion": {
            "type": [
              "integer",
              "null"
            ]
          },
          "teamSuggestions": {
            "items": {
              "$ref": "#/components/schemas/proposalTeamSuggestionResponseSchema"
            },
            "type": "array"
          },
          "title": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "wizardInputs": {}
        },
        "required": [
          "id",
          "organizationId",
          "clientId",
          "createdById",
          "convertedProjectId",
          "title",
          "status",
          "shareToken",
          "passwordProtected",
          "shareExpiresAt",
          "sharedAt",
          "approvedAt",
          "approvedByName",
          "approvedByEmail",
          "rejectedAt",
          "rejectedByName",
          "rejectedByEmail",
          "generatedAt",
          "currency",
          "tax",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "ProposalTaskListEnvelope": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/proposalTaskResponseSchema"
            },
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "ProposalTaskResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/proposalTaskResponseSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "proposalTaskResponseSchema": {
        "properties": {
          "createdAt": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "dueDate": {
            "type": [
              "string",
              "null"
            ]
          },
          "estimatedHours": {
            "type": [
              "number",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "milestoneId": {
            "type": "string"
          },
          "order": {
            "type": "number"
          },
          "title": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "milestoneId",
          "title",
          "description",
          "estimatedHours",
          "dueDate",
          "order",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "proposalTeamSuggestionResponseSchema": {
        "properties": {
          "id": {
            "type": "string"
          },
          "order": {
            "type": "number"
          },
          "orgUserId": {
            "type": [
              "string",
              "null"
            ]
          },
          "proposalId": {
            "type": "string"
          },
          "rationale": {
            "type": [
              "string",
              "null"
            ]
          },
          "suggestedRole": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "proposalId",
          "orgUserId",
          "suggestedRole",
          "rationale",
          "order"
        ],
        "type": "object"
      },
      "ProposalWizardInputsSchema": {
        "properties": {
          "basics": {
            "properties": {
              "category": {
                "type": "string"
              },
              "clientId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "title": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "budget": {
            "properties": {
              "budgetCeiling": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "currency": {
                "enum": [
                  "USD",
                  "EUR",
                  "XCG",
                  "AWG"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          "scope": {
            "properties": {
              "deliverables": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "goals": {
                "type": "string"
              },
              "outOfScope": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "type": "object"
          },
          "team": {
            "properties": {
              "requiredRoles": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "teamSize": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "type": "object"
          },
          "timeline": {
            "properties": {
              "deadline": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "flexible": {
                "type": "boolean"
              },
              "startDate": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "PublicIntakeFormEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PublicIntakeFormSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "PublicIntakeFormSchema": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "organizationName": {
            "type": "string"
          },
          "publicId": {
            "format": "uuid",
            "type": "string"
          },
          "questions": {
            "items": {
              "$ref": "#/components/schemas/PublicIntakeQuestionSchema"
            },
            "type": "array"
          },
          "versionId": {
            "type": "string"
          }
        },
        "required": [
          "publicId",
          "versionId",
          "organizationName",
          "name",
          "description",
          "questions"
        ],
        "type": "object"
      },
      "PublicIntakeQuestionSchema": {
        "additionalProperties": false,
        "properties": {
          "helpText": {
            "default": "",
            "maxLength": 500,
            "type": "string"
          },
          "id": {
            "$ref": "#/components/schemas/IntakeQuestionIdSchema"
          },
          "label": {
            "maxLength": 160,
            "minLength": 1,
            "type": "string"
          },
          "options": {
            "items": {
              "maxLength": 200,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 50,
            "type": "array"
          },
          "required": {
            "default": false,
            "type": "boolean"
          },
          "type": {
            "$ref": "#/components/schemas/IntakeQuestionTypeSchema"
          }
        },
        "required": [
          "id",
          "label",
          "type",
          "helpText",
          "required",
          "options"
        ],
        "type": "object"
      },
      "quoteAttachmentInputSchema": {
        "properties": {
          "contentType": {
            "minLength": 1,
            "type": "string"
          },
          "filename": {
            "minLength": 1,
            "type": "string"
          },
          "size": {
            "exclusiveMinimum": 0,
            "type": "integer"
          },
          "url": {
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "filename",
          "contentType",
          "size",
          "url"
        ],
        "type": "object"
      },
      "quoteAttachmentSchema": {
        "properties": {
          "contentType": {
            "type": "string"
          },
          "filename": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "size": {
            "type": "number"
          },
          "uploadedAt": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "filename",
          "contentType",
          "size",
          "url"
        ],
        "type": "object"
      },
      "QuoteConversionResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/quoteConversionResponseSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "quoteConversionResponseSchema": {
        "properties": {
          "invoiceId": {
            "type": "string"
          },
          "quote": {
            "$ref": "#/components/schemas/quoteResponseSchema"
          }
        },
        "required": [
          "quote",
          "invoiceId"
        ],
        "type": "object"
      },
      "quoteLineItemInputSchema": {
        "properties": {
          "description": {
            "minLength": 1,
            "type": "string"
          },
          "quantity": {
            "exclusiveMinimum": 0,
            "type": "number"
          },
          "rate": {
            "exclusiveMinimum": 0,
            "type": "number"
          }
        },
        "required": [
          "description",
          "quantity",
          "rate"
        ],
        "type": "object"
      },
      "quoteLineItemSchema": {
        "properties": {
          "amount": {
            "type": "number"
          },
          "description": {
            "type": "string"
          },
          "quantity": {
            "type": "number"
          },
          "rate": {
            "type": "number"
          }
        },
        "required": [
          "description",
          "quantity",
          "rate",
          "amount"
        ],
        "type": "object"
      },
      "QuoteListEnvelope": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/quoteResponseSchema"
            },
            "type": "array"
          },
          "pagination": {
            "$ref": "#/components/schemas/paginationSchema"
          }
        },
        "required": [
          "data",
          "pagination"
        ],
        "type": "object"
      },
      "QuoteResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/quoteResponseSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "quoteResponseSchema": {
        "properties": {
          "attachments": {
            "items": {
              "$ref": "#/components/schemas/quoteAttachmentSchema"
            },
            "type": "array"
          },
          "client": {
            "properties": {
              "address": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name"
            ],
            "type": "object"
          },
          "clientId": {
            "type": "string"
          },
          "convertedInvoice": {
            "properties": {
              "id": {
                "type": "string"
              },
              "invoiceNumber": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "invoiceNumber"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "convertedInvoiceId": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "createdById": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "customerNotes": {
            "type": [
              "string",
              "null"
            ]
          },
          "discount": {
            "type": "number"
          },
          "expiresAt": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "issueDate": {
            "type": "string"
          },
          "lineItems": {
            "items": {
              "$ref": "#/components/schemas/quoteLineItemSchema"
            },
            "type": "array"
          },
          "organizationId": {
            "type": "string"
          },
          "project": {
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "projectId": {
            "type": [
              "string",
              "null"
            ]
          },
          "quoteNumber": {
            "type": "string"
          },
          "sentAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/quoteStatusSchema"
          },
          "subtotal": {
            "type": "number"
          },
          "tax": {
            "$ref": "#/components/schemas/documentTaxViewSchema"
          },
          "taxAmount": {
            "type": "number"
          },
          "taxEvidence": {
            "$ref": "#/components/schemas/documentTaxEvidenceSchema"
          },
          "taxSnapshotLockedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "termsAndConditions": {
            "type": "string"
          },
          "total": {
            "type": "number"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "organizationId",
          "clientId",
          "projectId",
          "createdById",
          "quoteNumber",
          "issueDate",
          "expiresAt",
          "status",
          "subtotal",
          "taxAmount",
          "discount",
          "total",
          "currency",
          "taxEvidence",
          "tax",
          "termsAndConditions",
          "lineItems",
          "attachments",
          "createdAt",
          "updatedAt",
          "client",
          "project"
        ],
        "type": "object"
      },
      "QuoteShareLinkEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/quoteShareLinkResponseSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "quoteShareLinkResponseSchema": {
        "properties": {
          "url": {
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "type": "object"
      },
      "quoteStatusSchema": {
        "type": "string"
      },
      "reasonSchema": {
        "maxLength": 500,
        "minLength": 1,
        "type": "string"
      },
      "recordInvoicePaymentApiSchema": {
        "properties": {
          "amount": {
            "exclusiveMinimum": 0,
            "type": "number"
          },
          "method": {
            "type": "string"
          },
          "note": {
            "maxLength": 500,
            "type": [
              "string",
              "null"
            ]
          },
          "paidAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "amount",
          "paidAt",
          "method"
        ],
        "type": "object"
      },
      "recordInvoiceRefundApiSchema": {
        "properties": {
          "amount": {
            "exclusiveMinimum": 0,
            "type": "number"
          },
          "method": {
            "type": "string"
          },
          "note": {
            "maxLength": 500,
            "type": [
              "string",
              "null"
            ]
          },
          "paidAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "amount",
          "paidAt",
          "method"
        ],
        "type": "object"
      },
      "reopenBooksApiSchema": {
        "properties": {
          "from": {
            "$ref": "#/components/schemas/calendarDateSchema"
          }
        },
        "required": [
          "from"
        ],
        "type": "object"
      },
      "reparentTaskApiSchema": {
        "properties": {
          "parentTaskId": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "parentTaskId"
        ],
        "type": "object"
      },
      "resetPasswordRequestSchema": {
        "properties": {
          "password": {
            "minLength": 8,
            "type": "string"
          },
          "token": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "token",
          "password"
        ],
        "type": "object"
      },
      "retainerApiSchema": {
        "properties": {
          "cycleAnchorDay": {
            "default": 1,
            "maximum": 28,
            "minimum": 1,
            "type": "integer"
          },
          "endDate": {
            "format": "date-time",
            "type": "string"
          },
          "fixedFeeAmount": {
            "minimum": 0,
            "type": "number"
          },
          "includedHoursPerCycle": {
            "exclusiveMinimum": 0,
            "type": "number"
          },
          "overagePolicy": {
            "type": "string"
          },
          "overageRate": {
            "minimum": 0,
            "type": "number"
          },
          "startDate": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "includedHoursPerCycle",
          "fixedFeeAmount",
          "overagePolicy",
          "overageRate",
          "cycleAnchorDay",
          "startDate"
        ],
        "type": "object"
      },
      "RetainerResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/retainerResponseSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "retainerResponseSchema": {
        "properties": {
          "clientId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "cycle": {
            "type": "string"
          },
          "cycleAnchorDay": {
            "type": "integer"
          },
          "endDate": {
            "type": [
              "string",
              "null"
            ]
          },
          "fixedFeeAmount": {
            "type": "number"
          },
          "id": {
            "type": "string"
          },
          "includedHoursPerCycle": {
            "type": "number"
          },
          "organizationId": {
            "type": "string"
          },
          "overagePolicy": {
            "type": "string"
          },
          "overageRate": {
            "type": "number"
          },
          "projectId": {
            "type": "string"
          },
          "startDate": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "organizationId",
          "clientId",
          "projectId",
          "type",
          "status",
          "cycle",
          "cycleAnchorDay",
          "startDate",
          "endDate",
          "includedHoursPerCycle",
          "fixedFeeAmount",
          "overagePolicy",
          "overageRate",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "RetainerStatusResponseEnvelope": {
        "properties": {
          "data": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/retainerStatusResponseSchema"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "retainerStatusResponseSchema": {
        "properties": {
          "cycle": {
            "properties": {
              "consumedHours": {
                "type": "number"
              },
              "includedHours": {
                "type": "number"
              },
              "overageHours": {
                "type": "number"
              },
              "periodEnd": {
                "type": "string"
              },
              "periodStart": {
                "type": "string"
              }
            },
            "required": [
              "consumedHours",
              "includedHours",
              "overageHours",
              "periodStart",
              "periodEnd"
            ],
            "type": "object"
          },
          "retainer": {
            "properties": {
              "includedHoursPerCycle": {
                "type": "number"
              },
              "overageRate": {
                "type": "number"
              }
            },
            "required": [
              "includedHoursPerCycle",
              "overageRate"
            ],
            "type": "object"
          }
        },
        "required": [
          "retainer"
        ],
        "type": "object"
      },
      "reviseProposalApiSchema": {
        "properties": {
          "feedback": {
            "minLength": 1,
            "type": "string"
          }
        },
        "type": "object"
      },
      "RunningTimeEntryEnvelope": {
        "properties": {
          "data": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/timeEntryResponseSchema"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "saveSentooCredentialsSchema": {
        "properties": {
          "merchantId": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          },
          "secret": {
            "maxLength": 500,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "merchantId",
          "secret"
        ],
        "type": "object"
      },
      "sellerTaxStatusSchema": {
        "type": "string"
      },
      "sendCreditNoteEmailApiSchema": {
        "properties": {
          "message": {
            "maxLength": 1000,
            "type": [
              "string",
              "null"
            ]
          },
          "to": {
            "format": "email",
            "type": "string"
          }
        },
        "required": [
          "to"
        ],
        "type": "object"
      },
      "sendInvoiceEmailApiSchema": {
        "properties": {
          "message": {
            "maxLength": 1000,
            "type": [
              "string",
              "null"
            ]
          },
          "to": {
            "format": "email",
            "type": "string"
          }
        },
        "required": [
          "to"
        ],
        "type": "object"
      },
      "sendQuoteEmailApiSchema": {
        "properties": {
          "message": {
            "maxLength": 1000,
            "type": [
              "string",
              "null"
            ]
          },
          "to": {
            "format": "email",
            "type": "string"
          }
        },
        "required": [
          "to"
        ],
        "type": "object"
      },
      "sentooWebhookSchema": {
        "properties": {
          "transaction_id": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "transaction_id"
        ],
        "type": "object"
      },
      "setTaskDelegationStateSchema": {
        "properties": {
          "state": {
            "type": "string"
          }
        },
        "required": [
          "state"
        ],
        "type": "object"
      },
      "shareProposalApiSchema": {
        "properties": {
          "expiresInDays": {
            "minimum": 1,
            "type": "integer"
          },
          "password": {
            "minLength": 1,
            "type": "string"
          },
          "passwordProtected": {
            "default": false,
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "signUpRequestSchema": {
        "properties": {
          "email": {
            "format": "email",
            "type": "string"
          },
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "organizationName": {
            "minLength": 1,
            "type": "string"
          },
          "password": {
            "minLength": 8,
            "type": "string"
          }
        },
        "required": [
          "name",
          "email",
          "password",
          "organizationName"
        ],
        "type": "object"
      },
      "sourceSchema": {
        "properties": {
          "authority": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "locator": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "authority",
          "url"
        ],
        "type": "object"
      },
      "startTimerRequestSchema": {
        "properties": {
          "taskId": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "taskId"
        ],
        "type": "object"
      },
      "stopTimerRequestSchema": {
        "properties": {
          "description": {
            "type": "string"
          },
          "timeEntryId": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "timeEntryId"
        ],
        "type": "object"
      },
      "successOperationResponseSchema": {
        "properties": {
          "message": {
            "type": "string"
          },
          "success": {
            "enum": [
              true
            ],
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "message"
        ],
        "type": "object"
      },
      "supplyCategorySchema": {
        "type": "string"
      },
      "TaskAttachmentResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/taskAttachmentResponseSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "taskAttachmentResponseSchema": {
        "properties": {
          "contentType": {
            "type": "string"
          },
          "filename": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "permissions": {
            "properties": {
              "canDelete": {
                "type": "boolean"
              }
            },
            "required": [
              "canDelete"
            ],
            "type": "object"
          },
          "size": {
            "type": "number"
          },
          "uploadedAt": {
            "format": "date-time",
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "user": {
            "properties": {
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "email"
            ],
            "type": [
              "object",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "filename",
          "contentType",
          "size",
          "url",
          "uploadedAt",
          "user",
          "permissions"
        ],
        "type": "object"
      },
      "TaskAttachmentsListEnvelope": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/taskAttachmentResponseSchema"
            },
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "taskCommentLinkPreviewResponseSchema": {
        "properties": {
          "canonicalUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "commentId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "displayOrder": {
            "type": "integer"
          },
          "errorCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "errorMessage": {
            "type": [
              "string",
              "null"
            ]
          },
          "fetchedAt": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "imageUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "siteName": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "enum": [
              "pending",
              "available",
              "unsupported",
              "failed"
            ],
            "type": "string"
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "commentId",
          "url",
          "canonicalUrl",
          "status",
          "title",
          "description",
          "siteName",
          "imageUrl",
          "displayOrder",
          "fetchedAt",
          "errorCode",
          "errorMessage",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "taskCommentPermissionsSchema": {
        "properties": {
          "canDelete": {
            "type": "boolean"
          },
          "canDeleteAttachments": {
            "type": "boolean"
          },
          "canDismissLinkPreviews": {
            "type": "boolean"
          },
          "canEdit": {
            "type": "boolean"
          }
        },
        "required": [
          "canEdit",
          "canDelete",
          "canDeleteAttachments",
          "canDismissLinkPreviews"
        ],
        "type": "object"
      },
      "TaskCommentResponseEnvelope": {
        "properties": {
          "data": {
            "type": "object"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "taskCommentResponseSchema": {
        "properties": {
          "attachments": {
            "items": {
              "$ref": "#/components/schemas/attachmentResponseSchema"
            },
            "type": "array"
          },
          "content": {
            "type": "string"
          },
          "contentHtml": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "editedAt": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "isInternal": {
            "type": "boolean"
          },
          "linkPreviews": {
            "items": {
              "$ref": "#/components/schemas/taskCommentLinkPreviewResponseSchema"
            },
            "type": "array"
          },
          "parentId": {
            "type": [
              "string",
              "null"
            ]
          },
          "permissions": {
            "$ref": "#/components/schemas/taskCommentPermissionsSchema"
          },
          "replies": {
            "items": {
              "$ref": "#/components/schemas/taskCommentResponseSchema"
            },
            "type": "array"
          },
          "taskId": {
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/commentUserSchema"
          },
          "userId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "taskId",
          "userId",
          "content",
          "contentHtml",
          "isInternal",
          "parentId",
          "editedAt",
          "createdAt",
          "user",
          "linkPreviews",
          "permissions",
          "replies"
        ],
        "type": "object"
      },
      "TaskCommentsListEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/taskCommentsListResponseSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "taskCommentsListResponseSchema": {
        "items": {
          "$ref": "#/components/schemas/taskCommentResponseSchema"
        },
        "type": "array"
      },
      "TaskDelegationEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/taskDelegationSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "TaskDelegationListEnvelope": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/taskDelegationSchema"
            },
            "type": "array"
          },
          "pagination": {
            "$ref": "#/components/schemas/paginationSchema"
          }
        },
        "required": [
          "data",
          "pagination"
        ],
        "type": "object"
      },
      "taskDelegationSchema": {
        "properties": {
          "appId": {
            "type": "string"
          },
          "appName": {
            "type": "string"
          },
          "botUserId": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "delegatedBy": {
            "$ref": "#/components/schemas/delegatingPersonSchema"
          },
          "endedAt": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "endReason": {
            "enum": [
              "stopped_by_user",
              "ended_by_app",
              "not_accepted",
              "task_completed",
              "task_cancelled",
              "task_deleted",
              "task_made_subtask",
              "app_unavailable"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "installationId": {
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/taskDelegationStateSchema"
          },
          "taskId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "taskId",
          "installationId",
          "appId",
          "appName",
          "botUserId",
          "delegatedBy",
          "state",
          "createdAt",
          "endedAt",
          "endReason"
        ],
        "type": "object"
      },
      "taskDelegationStateSchema": {
        "enum": [
          "pending",
          "working",
          "needs_input",
          "ready_for_review"
        ],
        "type": "string"
      },
      "taskDelegationSummarySchema": {
        "properties": {
          "appId": {
            "type": "string"
          },
          "appLogoUri": {
            "type": [
              "string",
              "null"
            ]
          },
          "appName": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "delegatedBy": {
            "$ref": "#/components/schemas/delegatingPersonSchema"
          },
          "id": {
            "type": "string"
          },
          "installationId": {
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/taskDelegationStateSchema"
          }
        },
        "required": [
          "id",
          "installationId",
          "appId",
          "appName",
          "appLogoUri",
          "state",
          "delegatedBy",
          "createdAt"
        ],
        "type": "object"
      },
      "TaskListEnvelope": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/taskResponseSchema"
            },
            "type": "array"
          },
          "pagination": {
            "$ref": "#/components/schemas/paginationSchema"
          }
        },
        "required": [
          "data",
          "pagination"
        ],
        "type": "object"
      },
      "taskPrioritySchema": {
        "enum": [
          "low",
          "medium",
          "high",
          "urgent"
        ],
        "type": "string"
      },
      "TaskResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/taskResponseSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "taskResponseSchema": {
        "properties": {
          "assignedTo": {
            "properties": {
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string"
              },
              "image": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "kind": {
                "type": "string"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "email",
              "kind"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "assignedToId": {
            "type": [
              "string",
              "null"
            ]
          },
          "attachmentCount": {
            "default": 0,
            "type": "number"
          },
          "commentCount": {
            "default": 0,
            "type": "number"
          },
          "completedAt": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "completedSubtaskCount": {
            "default": 0,
            "minimum": 0,
            "type": "integer"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "delegation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/taskDelegationSummarySchema"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "descriptionPreview": {
            "type": [
              "string",
              "null"
            ]
          },
          "dueDate": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "incompleteSubtaskCount": {
            "default": 0,
            "minimum": 0,
            "type": "integer"
          },
          "isBillable": {
            "type": "boolean"
          },
          "kanbanOrder": {
            "type": [
              "integer",
              "null"
            ]
          },
          "lastActivityAt": {
            "format": "date-time",
            "type": "string"
          },
          "lastCommentAt": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "parentTaskId": {
            "type": [
              "string",
              "null"
            ]
          },
          "priority": {
            "$ref": "#/components/schemas/taskPrioritySchema"
          },
          "project": {
            "properties": {
              "client": {
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "type": "object"
              },
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "type": "object"
          },
          "projectId": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/taskStatusSchema"
          },
          "subtaskCount": {
            "default": 0,
            "minimum": 0,
            "type": "integer"
          },
          "subtaskOrder": {
            "type": [
              "integer",
              "null"
            ]
          },
          "title": {
            "type": "string"
          },
          "totalTimeSpent": {
            "type": "number"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "version": {
            "exclusiveMinimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "id",
          "projectId",
          "assignedToId",
          "title",
          "description",
          "descriptionPreview",
          "status",
          "priority",
          "dueDate",
          "completedAt",
          "createdAt",
          "updatedAt",
          "commentCount",
          "attachmentCount",
          "lastActivityAt",
          "version",
          "delegation",
          "isBillable",
          "subtaskCount",
          "completedSubtaskCount",
          "incompleteSubtaskCount"
        ],
        "type": "object"
      },
      "taskStatusSchema": {
        "enum": [
          "todo",
          "in_progress",
          "blocked",
          "done",
          "cancelled"
        ],
        "type": "string"
      },
      "TaskSubtasksEnvelope": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/taskResponseSchema"
            },
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "taxDocumentTotalsSchema": {
        "properties": {
          "discount": {
            "type": "number"
          },
          "subtotal": {
            "type": "number"
          },
          "taxAmount": {
            "type": "number"
          },
          "total": {
            "type": "number"
          }
        },
        "required": [
          "subtotal",
          "discount",
          "taxAmount",
          "total"
        ],
        "type": "object"
      },
      "taxJurisdictionCodeSchema": {
        "type": "string"
      },
      "TaxJurisdictionListEnvelope": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/jurisdictionOptionSchema"
            },
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "taxLocationCodeSchema": {
        "pattern": "^(?:AW|CW|SX|BQ-BO|BQ-SA|BQ-SE|(?!BQ$)[A-Z]{2})$",
        "type": "string"
      },
      "taxPreviewApiSchema": {
        "properties": {
          "clientId": {
            "minLength": 1,
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "maxLength": 3,
            "minLength": 3,
            "type": "string"
          },
          "discount": {
            "default": 0,
            "minimum": 0,
            "type": "number"
          },
          "documentKind": {
            "enum": [
              "invoice",
              "quote"
            ],
            "type": "string"
          },
          "issueDate": {
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string"
          },
          "lineItems": {
            "items": {
              "properties": {
                "quantity": {
                  "type": "number"
                },
                "rate": {
                  "type": "number"
                }
              },
              "required": [
                "quantity",
                "rate"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "projectId": {
            "minLength": 1,
            "type": [
              "string",
              "null"
            ]
          },
          "servicePeriodEnd": {
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": [
              "string",
              "null"
            ]
          },
          "servicePeriodStart": {
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": [
              "string",
              "null"
            ]
          },
          "taxEvidence": {
            "type": "object"
          }
        },
        "required": [
          "documentKind",
          "clientId",
          "issueDate",
          "lineItems",
          "discount"
        ],
        "type": "object"
      },
      "TaxPreviewEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/taxPreviewResponseSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "taxPreviewResponseSchema": {
        "properties": {
          "currency": {
            "type": "string"
          },
          "tax": {
            "$ref": "#/components/schemas/documentTaxViewSchema"
          },
          "totals": {
            "$ref": "#/components/schemas/taxDocumentTotalsSchema"
          }
        },
        "required": [
          "currency",
          "totals",
          "tax"
        ],
        "type": "object"
      },
      "taxQuestionSchema": {
        "properties": {
          "answer": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": "string"
          },
          "key": {
            "enum": [
              "place_of_use"
            ],
            "type": "string"
          },
          "options": {
            "items": {
              "properties": {
                "label": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                }
              },
              "required": [
                "value",
                "label"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "prompt": {
            "type": "string"
          },
          "ruleRefs": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "key",
          "prompt",
          "description",
          "options",
          "answer",
          "ruleRefs"
        ],
        "type": "object"
      },
      "taxRequirementStateSchema": {
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "field": {
            "type": "string"
          },
          "group": {
            "enum": [
              "seller",
              "buyer",
              "supply"
            ],
            "type": "string"
          },
          "input": {
            "enum": [
              "text",
              "multiline",
              "date",
              "period",
              "rate"
            ],
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "problem": {
            "type": [
              "string",
              "null"
            ]
          },
          "required": {
            "type": "boolean"
          },
          "ruleRefs": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "satisfied": {
            "type": "boolean"
          },
          "source": {
            "enum": [
              "organization",
              "client",
              "document"
            ],
            "type": "string"
          },
          "value": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "field",
          "group",
          "label",
          "description",
          "input",
          "source",
          "value",
          "required",
          "satisfied",
          "problem",
          "ruleRefs"
        ],
        "type": "object"
      },
      "taxTreatmentSchema": {
        "type": "string"
      },
      "TeamAssigneesEnvelope": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/assignableMemberSchema"
            },
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "TeamInvitationResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/teamInvitationResponseSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "teamInvitationResponseSchema": {
        "properties": {
          "createdAt": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "invitedBy": {
            "properties": {
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "email"
            ],
            "type": "object"
          },
          "organizationId": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "token": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "email",
          "role",
          "organizationId",
          "token",
          "expiresAt",
          "createdAt",
          "invitedBy"
        ],
        "type": "object"
      },
      "TeamMemberResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/teamMemberResponseSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "teamMemberResponseSchema": {
        "properties": {
          "createdAt": {
            "type": "string"
          },
          "hourlyRate": {
            "type": [
              "number",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "jobRole": {
            "properties": {
              "defaultRate": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string"
              },
              "isActive": {
                "type": "boolean"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "description"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "jobRoleId": {
            "type": [
              "string",
              "null"
            ]
          },
          "organizationId": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "user": {
            "properties": {
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string"
              },
              "image": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "kind": {
                "$ref": "#/components/schemas/userKindSchema"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "email",
              "kind"
            ],
            "type": "object"
          },
          "userId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "userId",
          "organizationId",
          "role",
          "hourlyRate",
          "jobRoleId",
          "createdAt",
          "updatedAt",
          "user",
          "jobRole"
        ],
        "type": "object"
      },
      "teamMemberSearchResultSchema": {
        "properties": {
          "email": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "image": {
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "$ref": "#/components/schemas/userKindSchema"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "email",
          "kind"
        ],
        "type": "object"
      },
      "TeamMembersSearchResponseEnvelope": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/teamMemberSearchResultSchema"
            },
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "TimeEntryListEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/timeEntryListResponseSchema"
          },
          "pagination": {
            "$ref": "#/components/schemas/paginationSchema"
          }
        },
        "required": [
          "data",
          "pagination"
        ],
        "type": "object"
      },
      "timeEntryListItemSchema": {
        "properties": {
          "createdAt": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "duration": {
            "type": [
              "number",
              "null"
            ]
          },
          "endTime": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "isBillable": {
            "type": "boolean"
          },
          "isOutsideBusinessHours": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "isRunning": {
            "type": "boolean"
          },
          "permissions": {
            "properties": {
              "canDelete": {
                "type": "boolean"
              },
              "canEdit": {
                "type": "boolean"
              }
            },
            "required": [
              "canEdit",
              "canDelete"
            ],
            "type": "object"
          },
          "startTime": {
            "type": "string"
          },
          "task": {
            "properties": {
              "id": {
                "type": "string"
              },
              "project": {
                "properties": {
                  "client": {
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "type": "object"
                  },
                  "clientId": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "organizationId": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "organizationId",
                  "clientId"
                ],
                "type": "object"
              },
              "projectId": {
                "type": "string"
              },
              "title": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "projectId"
            ],
            "type": "object"
          },
          "taskId": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "user": {
            "properties": {
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string"
              },
              "image": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "email",
              "image"
            ],
            "type": "object"
          },
          "userId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "taskId",
          "userId",
          "startTime",
          "isRunning",
          "isOutsideBusinessHours",
          "createdAt",
          "updatedAt",
          "permissions"
        ],
        "type": "object"
      },
      "timeEntryListResponseSchema": {
        "items": {
          "$ref": "#/components/schemas/timeEntryListItemSchema"
        },
        "type": "array"
      },
      "TimeEntryResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/timeEntryResponseSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "timeEntryResponseSchema": {
        "properties": {
          "createdAt": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "duration": {
            "type": [
              "number",
              "null"
            ]
          },
          "endTime": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "isBillable": {
            "type": "boolean"
          },
          "isOutsideBusinessHours": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "isRunning": {
            "type": "boolean"
          },
          "startTime": {
            "type": "string"
          },
          "task": {
            "properties": {
              "id": {
                "type": "string"
              },
              "project": {
                "properties": {
                  "client": {
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "type": "object"
                  },
                  "clientId": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "organizationId": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "organizationId",
                  "clientId"
                ],
                "type": "object"
              },
              "projectId": {
                "type": "string"
              },
              "title": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "projectId"
            ],
            "type": "object"
          },
          "taskId": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "user": {
            "properties": {
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string"
              },
              "image": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "email",
              "image"
            ],
            "type": "object"
          },
          "userId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "taskId",
          "userId",
          "startTime",
          "isRunning",
          "isOutsideBusinessHours",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "TokenResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/tokenResponseSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "tokenResponseSchema": {
        "properties": {
          "accessToken": {
            "type": "string"
          },
          "refreshToken": {
            "type": "string"
          }
        },
        "required": [
          "accessToken",
          "refreshToken"
        ],
        "type": "object"
      },
      "uninstalledInstallationResponseSchema": {
        "properties": {
          "installation": {
            "properties": {
              "id": {
                "type": "string"
              },
              "status": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "status"
            ],
            "type": "object"
          }
        },
        "required": [
          "installation"
        ],
        "type": "object"
      },
      "updateAvatarSchema": {
        "properties": {
          "imageUrl": {
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "imageUrl"
        ],
        "type": "object"
      },
      "updateBudgetRangeApiSchema": {
        "properties": {
          "maxAmount": {
            "minimum": 0,
            "type": "number"
          },
          "minAmount": {
            "minimum": 0,
            "type": "number"
          },
          "rationale": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "minAmount",
          "maxAmount"
        ],
        "type": "object"
      },
      "updateClientApiSchema": {
        "properties": {
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": "string"
          },
          "emailDomains": {
            "items": {
              "pattern": "^[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
              "type": "string"
            },
            "type": "array"
          },
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "enum": [
              "active",
              "in_negotiation",
              "onboarding",
              "archived"
            ],
            "type": "string"
          },
          "taxCustomerType": {
            "type": "object"
          },
          "taxId": {
            "maxLength": 80,
            "type": [
              "string",
              "null"
            ]
          },
          "taxLocationCode": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/taxLocationCodeSchema"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "updateCommentSchema": {
        "properties": {
          "content": {
            "maxLength": 10000,
            "type": "string"
          }
        },
        "required": [
          "content"
        ],
        "type": "object"
      },
      "updateInstallationWebhookConfigSchema": {
        "properties": {
          "webhookSecret": {
            "minLength": 32,
            "type": "string"
          },
          "webhookUrl": {
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "webhookUrl",
          "webhookSecret"
        ],
        "type": "object"
      },
      "updateInvoiceApiSchema": {
        "properties": {
          "clientId": {
            "type": "string"
          },
          "discount": {
            "minimum": 0,
            "type": "number"
          },
          "dueDate": {
            "format": "date-time",
            "type": "string"
          },
          "expectedFinancials": {
            "properties": {
              "currency": {
                "maxLength": 3,
                "minLength": 3,
                "type": "string"
              },
              "taxAmount": {
                "minimum": 0,
                "type": "number"
              },
              "taxInclusive": {
                "type": "boolean"
              },
              "total": {
                "minimum": 0,
                "type": "number"
              }
            },
            "required": [
              "currency",
              "total",
              "taxAmount"
            ],
            "type": "object"
          },
          "issueDate": {
            "format": "date-time",
            "type": "string"
          },
          "lineItems": {
            "items": {
              "$ref": "#/components/schemas/invoiceLineItemInputSchema"
            },
            "minItems": 1,
            "type": "array"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "paidAt": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "paymentTerms": {
            "type": [
              "string",
              "null"
            ]
          },
          "projectId": {
            "type": [
              "string",
              "null"
            ]
          },
          "servicePeriodEnd": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/calendarDateSchema"
              },
              {
                "type": "null"
              }
            ]
          },
          "servicePeriodStart": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/calendarDateSchema"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/invoiceStatusSchema"
              }
            ]
          },
          "taxEvidence": {
            "type": "object"
          }
        },
        "type": "object"
      },
      "updateNotificationPreferencesSchema": {
        "properties": {
          "emailFollowUps": {
            "type": "boolean"
          },
          "emailNewTasks": {
            "type": "boolean"
          },
          "emailProjectDueDateReminders": {
            "type": "boolean"
          },
          "emailTaskDueDateReminders": {
            "type": "boolean"
          },
          "emailTaskUpdates": {
            "type": "boolean"
          }
        },
        "required": [
          "emailNewTasks",
          "emailTaskUpdates",
          "emailFollowUps",
          "emailTaskDueDateReminders",
          "emailProjectDueDateReminders"
        ],
        "type": "object"
      },
      "updateProfileSchema": {
        "properties": {
          "email": {
            "format": "email",
            "type": "string"
          },
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "name",
          "email"
        ],
        "type": "object"
      },
      "updateProjectApiSchema": {
        "properties": {
          "budget": {
            "minimum": 0,
            "type": "number"
          },
          "budgetThreshold": {
            "maximum": 100,
            "minimum": 1,
            "type": "number"
          },
          "clientId": {
            "minLength": 1,
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "endDate": {
            "type": "string"
          },
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "startDate": {
            "type": "string"
          },
          "status": {
            "enum": [
              "active",
              "completed",
              "on_hold",
              "archived",
              "cancelled"
            ],
            "type": "string"
          },
          "taxSupplyCategory": {
            "type": "object"
          }
        },
        "required": [],
        "type": "object"
      },
      "updateProjectHourlyRateOverrideApiSchema": {
        "properties": {
          "hourlyRate": {
            "minimum": 0,
            "type": "number"
          }
        },
        "required": [
          "hourlyRate"
        ],
        "type": "object"
      },
      "updateProposalApiSchema": {
        "properties": {
          "clientId": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": "string"
          },
          "title": {
            "minLength": 1,
            "type": "string"
          },
          "wizardInputs": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ProposalWizardInputsSchema"
              }
            ]
          }
        },
        "type": "object"
      },
      "updateProposalMilestoneApiSchema": {
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "dueDate": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "order": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "updateProposalTaskApiSchema": {
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "dueDate": {
            "type": [
              "string",
              "null"
            ]
          },
          "estimatedHours": {
            "minimum": 0,
            "type": [
              "number",
              "null"
            ]
          },
          "order": {
            "type": "integer"
          },
          "title": {
            "minLength": 1,
            "type": "string"
          }
        },
        "type": "object"
      },
      "updateQuoteApiSchema": {
        "properties": {
          "attachments": {
            "items": {
              "$ref": "#/components/schemas/quoteAttachmentInputSchema"
            },
            "type": "array"
          },
          "clientId": {
            "type": "string"
          },
          "customerNotes": {
            "type": [
              "string",
              "null"
            ]
          },
          "discount": {
            "minimum": 0,
            "type": "number"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "issueDate": {
            "format": "date-time",
            "type": "string"
          },
          "lineItems": {
            "items": {
              "$ref": "#/components/schemas/quoteLineItemInputSchema"
            },
            "minItems": 1,
            "type": "array"
          },
          "projectId": {
            "type": [
              "string",
              "null"
            ]
          },
          "taxEvidence": {
            "type": "object"
          },
          "termsAndConditions": {
            "minLength": 1,
            "type": "string"
          }
        },
        "type": "object"
      },
      "updateSubtaskOrderApiSchema": {
        "properties": {
          "updates": {
            "items": {
              "properties": {
                "subtaskOrder": {
                  "minimum": 0,
                  "type": "integer"
                },
                "taskId": {
                  "type": "string"
                }
              },
              "required": [
                "taskId",
                "subtaskOrder"
              ],
              "type": "object"
            },
            "minItems": 1,
            "type": "array"
          }
        },
        "required": [
          "updates"
        ],
        "type": "object"
      },
      "updateTaskWithCompletionApiSchema": {
        "properties": {
          "assignedToId": {
            "type": [
              "string",
              "null"
            ]
          },
          "completeSubtasks": {
            "type": "boolean"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "dueDate": {
            "type": [
              "string",
              "null"
            ]
          },
          "isBillable": {
            "type": "boolean"
          },
          "priority": {
            "$ref": "#/components/schemas/taskPrioritySchema"
          },
          "status": {
            "$ref": "#/components/schemas/taskStatusSchema"
          },
          "title": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "updateTeamMemberApiSchema": {
        "properties": {
          "hourlyRate": {
            "minimum": 0,
            "type": [
              "number",
              "null"
            ]
          },
          "role": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "updateTeamMemberDetailsApiSchema": {
        "properties": {
          "hourlyRate": {
            "minimum": 0,
            "type": [
              "number",
              "null"
            ]
          },
          "jobRoleId": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "updateTeamMemberPatchApiSchema": {
        "allOf": [
          {
            "properties": {
              "role": {
                "type": "string"
              }
            },
            "type": "object"
          },
          {
            "properties": {
              "hourlyRate": {
                "minimum": 0,
                "type": [
                  "number",
                  "null"
                ]
              },
              "jobRoleId": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "type": "object"
          }
        ]
      },
      "updateTimeEntryRequestSchema": {
        "properties": {
          "description": {
            "type": "string"
          },
          "endTime": {
            "format": "date-time",
            "type": "string"
          },
          "startTime": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "upsertExternalInvoicePaymentApiSchema": {
        "properties": {
          "amount": {
            "exclusiveMinimum": 0,
            "type": "number"
          },
          "existingPaymentId": {
            "minLength": 1,
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "note": {
            "maxLength": 500,
            "type": [
              "string",
              "null"
            ]
          },
          "paidAt": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "format": "date",
                "type": "string"
              }
            ]
          }
        },
        "required": [
          "amount",
          "paidAt",
          "method"
        ],
        "type": "object"
      },
      "userKindSchema": {
        "type": "string"
      },
      "UserProfileResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/userProfileResponseSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "userProfileResponseSchema": {
        "properties": {
          "createdAt": {
            "type": "string"
          },
          "email": {
            "format": "email",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "image": {
            "format": "uri",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "UserResponseEnvelope": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/userResponseSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "userResponseSchema": {
        "properties": {
          "email": {
            "format": "email",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "email"
        ],
        "type": "object"
      },
      "voidedIdempotencyKeySchema": {
        "properties": {
          "key": {
            "type": "string"
          },
          "status": {
            "enum": [
              "voided"
            ],
            "type": "string"
          }
        },
        "required": [
          "key",
          "status"
        ],
        "type": "object"
      },
      "writeOffInvoiceApiSchema": {
        "properties": {
          "note": {
            "maxLength": 500,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "bearerFormat": "JWT",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "OpenAPI 3.0 specification generated from Next.js App Router.",
    "title": "Zentract API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/accounting/books": {
      "get": {
        "description": "Returns the date the organization's books are closed through, if any",
        "operationId": "get-accounting-books",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountingBooksStateEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get books state",
        "tags": [
          "Accounting"
        ]
      }
    },
    "/accounting/books/close": {
      "post": {
        "description": "Closes every period through the given date; nothing dated on or before it can be issued, paid, credited or removed until it is reopened",
        "operationId": "post-accounting-books-close",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/closeBooksApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountingBooksStateEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Close the books",
        "tags": [
          "Accounting"
        ]
      }
    },
    "/accounting/books/reopen": {
      "post": {
        "description": "Reopens every period from the given date onward; earlier periods stay closed",
        "operationId": "post-accounting-books-reopen",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/reopenBooksApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountingBooksStateEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Reopen the books",
        "tags": [
          "Accounting"
        ]
      }
    },
    "/accounting/period": {
      "get": {
        "description": "Returns a period's totals per currency, what still needs attention, and whether its books are closed",
        "operationId": "get-accounting-period",
        "parameters": [
          {
            "example": "example",
            "in": "query",
            "name": "start",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/calendarDateSchema"
            }
          },
          {
            "example": "example",
            "in": "query",
            "name": "end",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/calendarDateSchema"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountingPeriodOverviewEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get accounting period",
        "tags": [
          "Accounting"
        ]
      }
    },
    "/accounting/period/export": {
      "get": {
        "description": "Returns a zip with a one-page summary PDF, the period's sales journal, receipts, receivables and tax summary as CSV, and a README",
        "operationId": "get-accounting-period-export",
        "parameters": [
          {
            "example": "example",
            "in": "query",
            "name": "start",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/calendarDateSchema"
            }
          },
          {
            "example": "example",
            "in": "query",
            "name": "end",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/calendarDateSchema"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/zip": {
                "schema": {
                  "contentMediaType": "application/zip",
                  "type": "string"
                }
              }
            },
            "description": "The period pack as a zip file"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Download accounting pack",
        "tags": [
          "Accounting"
        ]
      }
    },
    "/apps/installations/current": {
      "delete": {
        "description": "For an app's bot token with `apps:write`: uninstalls the app from the token's organization exactly as a person's uninstall does. The bot leaves the organization, its open delegations end with `app_unavailable`, the app's authorizations and tokens there are revoked, and `app.installation.revoked` is sent to the configured webhook. Calling it for an installation that is already revoked answers the same success. Other tokens are refused.",
        "operationId": "delete-apps-installations-current",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstallationUninstallEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Uninstall the calling app",
        "tags": [
          "Apps"
        ]
      }
    },
    "/apps/installations/webhook-config": {
      "post": {
        "description": "Allows admins, managers, or the installation's own bot to configure its webhook using a third-party OAuth2 token. Zentract first sends one signed `app.webhook.verification` delivery to the URL and saves the configuration only when the endpoint answers 2xx within 10 seconds, without following redirects; the URL must be HTTPS on a public address. Otherwise it answers `422` with code `WEBHOOK_VERIFICATION_FAILED` and keeps the current configuration.",
        "operationId": "post-apps-installations-webhook-config",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateInstallationWebhookConfigSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstallationFinalizeEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Update app installation webhook configuration",
        "tags": [
          "Apps"
        ]
      }
    },
    "/auth/mobile/refresh": {
      "post": {
        "description": "Issues a new access and refresh token pair",
        "operationId": "post-auth-mobile-refresh",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/mobileRefreshRequestSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "summary": "Refresh token",
        "tags": [
          "Auth"
        ]
      }
    },
    "/auth/reset-password": {
      "post": {
        "description": "Resets a user's password using a token",
        "operationId": "post-auth-reset-password",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/resetPasswordRequestSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/successOperationResponseSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "summary": "Reset password",
        "tags": [
          "Auth"
        ]
      }
    },
    "/auth/signup": {
      "post": {
        "description": "Creates a new user and organization",
        "operationId": "post-auth-signup",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/signUpRequestSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "summary": "Sign up",
        "tags": [
          "Auth"
        ]
      }
    },
    "/clients": {
      "post": {
        "description": "Creates a new client",
        "operationId": "post-clients",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createClientApiSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Create client",
        "tags": [
          "Clients"
        ]
      }
    },
    "/clients/{id}": {
      "delete": {
        "description": "Deletes a client",
        "operationId": "delete-clients-{id}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/successOperationResponseSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Delete client",
        "tags": [
          "Clients"
        ]
      },
      "put": {
        "description": "Updates a client's details",
        "operationId": "put-clients-{id}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateClientApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Update client",
        "tags": [
          "Clients"
        ]
      }
    },
    "/clients/export": {
      "post": {
        "description": "Queues a background job to generate and upload a clients CSV.",
        "operationId": "post-clients-export",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobQueuedEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Export clients CSV",
        "tags": [
          "Clients"
        ]
      }
    },
    "/credit-notes/{id}/pdf": {
      "get": {
        "description": "Returns the credit note as a PDF file",
        "operationId": "get-credit-notes-{id}-pdf",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/pdf": {
                "schema": {
                  "contentMediaType": "application/pdf",
                  "type": "string"
                }
              }
            },
            "description": "The credit note PDF"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Download credit note PDF",
        "tags": [
          "Credit-notes"
        ]
      }
    },
    "/credit-notes/{id}/send": {
      "post": {
        "description": "Emails the credit note PDF to the client with the invoice's remaining balance",
        "operationId": "post-credit-notes-{id}-send",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/sendCreditNoteEmailApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/successOperationResponseSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Email credit note",
        "tags": [
          "Credit-notes"
        ]
      }
    },
    "/idempotency-keys/{key}": {
      "get": {
        "description": "Proves whether a write you sent with this `Idempotency-Key` happened, after its response was lost. Keys are your own: the OAuth client and user of the token (or the session's user) in the token's organization. A key a write applied under answers `status: \"applied\"` with the operation, resource, and status code the write answered with. A key no write applied under is voided and answers `status: \"voided\"`: from then on any request carrying it writes nothing and is refused with `409` and code `IDEMPOTENCY_KEY_VOIDED`, so a delayed copy of the lost request can never apply. A write still in flight under the key is waited for. A voided key never expires. An applied key is kept for seven days; reading it back after that voids it. Percent-encode the key in the path.",
        "operationId": "get-idempotency-keys-{key}",
        "parameters": [
          {
            "example": "example",
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/idempotencyKeySchema"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdempotencyKeyReadbackEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Read back an Idempotency-Key",
        "tags": [
          "Idempotency-keys"
        ]
      }
    },
    "/intake/forms": {
      "get": {
        "description": "Lists the current organization's editable and published intake forms.",
        "operationId": "get-intake-forms",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntakeFormsEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List intake forms",
        "tags": [
          "Intake"
        ]
      },
      "post": {
        "description": "Creates an unpublished organization intake form.",
        "operationId": "post-intake-forms",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntakeFormDefinitionSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntakeFormEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Create intake form",
        "tags": [
          "Intake"
        ]
      }
    },
    "/intake/forms/{id}": {
      "get": {
        "description": "Returns draft configuration and the immutable published version for this organization.",
        "operationId": "get-intake-forms-{id}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 100,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntakeFormEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get intake form",
        "tags": [
          "Intake"
        ]
      },
      "patch": {
        "description": "Saves editable configuration without changing the published version or previous submissions.",
        "operationId": "patch-intake-forms-{id}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 100,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntakeFormDefinitionSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntakeFormEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Update intake form",
        "tags": [
          "Intake"
        ]
      }
    },
    "/intake/forms/{id}/publish": {
      "delete": {
        "description": "Stops new public submissions while preserving accepted requests and their published versions.",
        "operationId": "delete-intake-forms-{id}-publish",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 100,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntakeFormEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Unpublish intake form",
        "tags": [
          "Intake"
        ]
      },
      "post": {
        "description": "Publishes an immutable version and authorizes private draft preparation under the publishing manager.",
        "operationId": "post-intake-forms-{id}-publish",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 100,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntakePublishSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntakeFormEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Publish intake form",
        "tags": [
          "Intake"
        ]
      }
    },
    "/intake/submissions": {
      "get": {
        "description": "Lists original requests and private preparation status within the current organization.",
        "operationId": "get-intake-submissions",
        "parameters": [
          {
            "example": "123",
            "in": "query",
            "name": "formId",
            "required": false,
            "schema": {
              "maxLength": 100,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntakeSubmissionsEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List intake submissions",
        "tags": [
          "Intake"
        ]
      }
    },
    "/intake/submissions/{id}": {
      "get": {
        "description": "Returns the immutable original answers and private AI preparation for staff review.",
        "operationId": "get-intake-submissions-{id}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 100,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntakeSubmissionEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get intake submission",
        "tags": [
          "Intake"
        ]
      }
    },
    "/intake/submissions/{id}/retry": {
      "post": {
        "description": "Reschedules eligible failed preparation without duplicating or overwriting a proposal.",
        "operationId": "post-intake-submissions-{id}-retry",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 100,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntakeSubmissionEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Retry intake draft preparation",
        "tags": [
          "Intake"
        ]
      }
    },
    "/invoices": {
      "get": {
        "description": "Returns paginated invoices",
        "operationId": "get-invoices",
        "parameters": [
          {
            "example": 1,
            "in": "query",
            "name": "page",
            "required": true,
            "schema": {
              "default": 1,
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991,
              "type": "integer"
            }
          },
          {
            "example": 1,
            "in": "query",
            "name": "limit",
            "required": true,
            "schema": {
              "default": 20,
              "exclusiveMinimum": 0,
              "maximum": 100,
              "type": "integer"
            }
          },
          {
            "example": "123",
            "in": "query",
            "name": "clientId",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "123",
            "in": "query",
            "name": "projectId",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "example",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/invoiceStatusSchema"
                }
              ]
            }
          },
          {
            "example": true,
            "in": "query",
            "name": "archived",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "example": "example",
            "in": "query",
            "name": "startDate",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "example": "example",
            "in": "query",
            "name": "endDate",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "example": "recent",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": [
                "recent"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceListEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List invoices",
        "tags": [
          "Invoices"
        ]
      },
      "post": {
        "description": "Creates a new invoice",
        "operationId": "post-invoices",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createInvoiceApiSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Create invoice",
        "tags": [
          "Invoices"
        ]
      }
    },
    "/invoices/{id}": {
      "get": {
        "description": "Returns a single invoice",
        "operationId": "get-invoices-{id}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get invoice",
        "tags": [
          "Invoices"
        ]
      },
      "put": {
        "description": "Updates an invoice and manages draft lifecycle changes. Optional expectedFinancials rejects incompatible calculated totals or currency before saving the edit.",
        "operationId": "put-invoices-{id}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateInvoiceApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Update invoice",
        "tags": [
          "Invoices"
        ]
      }
    },
    "/invoices/{id}/archive": {
      "post": {
        "description": "Archives an invoice without deleting it",
        "operationId": "post-invoices-{id}-archive",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/successOperationResponseSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Archive invoice",
        "tags": [
          "Invoices"
        ]
      }
    },
    "/invoices/{id}/credit-notes": {
      "get": {
        "description": "Returns the invoice's credit notes and what can still be credited",
        "operationId": "get-invoices-{id}-credit-notes",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceCreditNotesEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List invoice credit notes",
        "tags": [
          "Invoices"
        ]
      },
      "post": {
        "description": "Issues a numbered credit note against an issued invoice, for the whole invoice or part of what the client still owes",
        "operationId": "post-invoices-{id}-credit-notes",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/creditNoteInputSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditNoteEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Issue credit note",
        "tags": [
          "Invoices"
        ]
      }
    },
    "/invoices/{id}/credit-notes/preview": {
      "post": {
        "description": "Returns the tax, total and remaining balance a credit note would have, without issuing it",
        "operationId": "post-invoices-{id}-credit-notes-preview",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/creditNoteInputSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditNotePreviewEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Preview credit note",
        "tags": [
          "Invoices"
        ]
      }
    },
    "/invoices/{id}/external-payments/{reference}": {
      "delete": {
        "description": "OAuth apps void their own recorded payment references or remove a mapped ordinary manual payment with existingPaymentId; repeated removals succeed",
        "operationId": "delete-invoices-{id}-external-payments-{reference}",
        "parameters": [
          {
            "example": "123",
            "in": "query",
            "name": "existingPaymentId",
            "required": false,
            "schema": {
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "example": "example",
            "in": "path",
            "name": "reference",
            "required": true,
            "schema": {
              "maxLength": 200,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/successOperationResponseSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Void an externally recorded invoice payment",
        "tags": [
          "Invoices"
        ]
      },
      "put": {
        "description": "OAuth apps create or update their own payment references or reconcile a mapped ordinary manual payment. paidAt accepts an ISO instant or YYYY-MM-DD organization accounting day; retries return the same payment.",
        "operationId": "put-invoices-{id}-external-payments-{reference}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "example": "example",
            "in": "path",
            "name": "reference",
            "required": true,
            "schema": {
              "maxLength": 200,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/upsertExternalInvoicePaymentApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalInvoicePaymentEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Upsert an externally recorded invoice payment",
        "tags": [
          "Invoices"
        ]
      }
    },
    "/invoices/{id}/payment-settings": {
      "put": {
        "description": "Turns processing-fee pass-through on or off for an invoice (active US Stripe account and USD invoice required)",
        "operationId": "put-invoices-{id}-payment-settings",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/invoicePaymentSettingsApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoicePaymentsEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Update invoice payment settings",
        "tags": [
          "Invoices"
        ]
      }
    },
    "/invoices/{id}/payments": {
      "get": {
        "description": "Returns the invoice's payments and write-offs with amount paid, pending amount, and balance due",
        "operationId": "get-invoices-{id}-payments",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoicePaymentsEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List invoice payments",
        "tags": [
          "Invoices"
        ]
      },
      "post": {
        "description": "Records a payment received outside Zentract; partial amounts up to the balance due are allowed",
        "operationId": "post-invoices-{id}-payments",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/recordInvoicePaymentApiSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoicePaymentsEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Record invoice payment",
        "tags": [
          "Invoices"
        ]
      }
    },
    "/invoices/{id}/payments/{paymentId}": {
      "delete": {
        "description": "Removes a manually recorded payment or write-off; online payments can't be removed",
        "operationId": "delete-invoices-{id}-payments-{paymentId}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "123",
            "in": "path",
            "name": "paymentId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoicePaymentsEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Remove invoice payment",
        "tags": [
          "Invoices"
        ]
      }
    },
    "/invoices/{id}/refunds": {
      "post": {
        "description": "Records money already returned to the client after a credit note left them overpaid; Zentract doesn't send it",
        "operationId": "post-invoices-{id}-refunds",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/recordInvoiceRefundApiSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoicePaymentsEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Record invoice refund",
        "tags": [
          "Invoices"
        ]
      }
    },
    "/invoices/{id}/send": {
      "post": {
        "description": "Queues an invoice email and marks draft invoices as sent",
        "operationId": "post-invoices-{id}-send",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/sendInvoiceEmailApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/successOperationResponseSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Send invoice email",
        "tags": [
          "Invoices"
        ]
      }
    },
    "/invoices/{id}/share-link": {
      "post": {
        "description": "Returns the public web invoice link the client uses to view and pay, creating it on first use",
        "operationId": "post-invoices-{id}-share-link",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceShareLinkEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get invoice web link",
        "tags": [
          "Invoices"
        ]
      }
    },
    "/invoices/{id}/write-off": {
      "post": {
        "description": "Writes off the remaining balance; the invoice is closed as paid and the write-off is not counted as collected",
        "operationId": "post-invoices-{id}-write-off",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/writeOffInvoiceApiSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoicePaymentsEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Write off invoice balance",
        "tags": [
          "Invoices"
        ]
      }
    },
    "/invoices/generation": {
      "get": {
        "description": "",
        "operationId": "get-invoices-generation",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceGenerationProjectsEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Discover eligible projects for tracked-work invoice generation",
        "tags": [
          "Invoices"
        ]
      },
      "post": {
        "description": "",
        "operationId": "post-invoices-generation",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createGeneratedInvoiceApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobQueuedEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Create a draft invoice from tracked work",
        "tags": [
          "Invoices"
        ]
      }
    },
    "/payments/accounts": {
      "get": {
        "description": "Returns the organization's Stripe and Sentoo connections, plan eligibility, the Sentoo webhook URL, and overdue reminder setting",
        "operationId": "get-payments-accounts",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentSettingsEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get payment settings",
        "tags": [
          "Payments"
        ]
      }
    },
    "/payments/sentoo": {
      "delete": {
        "description": "Removes the organization's Sentoo credentials; recorded payments are kept",
        "operationId": "delete-payments-sentoo",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/successOperationResponseSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Disconnect Sentoo",
        "tags": [
          "Payments"
        ]
      },
      "put": {
        "description": "Connects the organization's Sentoo merchant account; the secret is stored encrypted and never returned",
        "operationId": "put-payments-sentoo",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/saveSentooCredentialsSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentAccountEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Save Sentoo credentials",
        "tags": [
          "Payments"
        ]
      }
    },
    "/payments/sentoo/webhook": {
      "post": {
        "description": "Agencies set this URL as the \"Payment status URL\" in their Sentoo merchant portal. Sentoo posts only a transaction ID; Zentract fetches the status from Sentoo with the merchant's credentials and never trusts the request body. Sentoo retries until it receives 200 with `success: true`, so pings that can't be used are acknowledged, while transient failures return 5xx to be retried.",
        "operationId": "post-payments-sentoo-webhook",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/sentooWebhookSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/successOperationResponseSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "summary": "Sentoo payment status webhook",
        "tags": [
          "Payments"
        ]
      }
    },
    "/payments/stripe": {
      "delete": {
        "description": "Stops online payments through the organization's Stripe account; recorded payments are kept",
        "operationId": "delete-payments-stripe",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/successOperationResponseSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Disconnect Stripe",
        "tags": [
          "Payments"
        ]
      }
    },
    "/payments/stripe/connect": {
      "post": {
        "description": "Creates or resumes the organization's own Stripe account and returns a Stripe-hosted onboarding link",
        "operationId": "post-payments-stripe-connect",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRedirectEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Connect Stripe",
        "tags": [
          "Payments"
        ]
      }
    },
    "/payments/stripe/onboarding": {
      "get": {
        "description": "Stripe's refresh URL for expired onboarding links; redirects to a new Stripe onboarding link, or back to Payments settings if one cannot be created",
        "operationId": "get-payments-stripe-onboarding",
        "parameters": [],
        "responses": {
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Resume Stripe onboarding",
        "tags": [
          "Payments"
        ]
      }
    },
    "/payments/stripe/webhook": {
      "post": {
        "description": "Receives events from agencies' connected Stripe accounts (account status and invoice checkout results); verified with the Connect webhook signing secret",
        "operationId": "post-payments-stripe-webhook",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentWebhookAckEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "summary": "Stripe Connect webhook",
        "tags": [
          "Payments"
        ]
      }
    },
    "/projects": {
      "post": {
        "description": "Creates a new project",
        "operationId": "post-projects",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createProjectApiSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Create project",
        "tags": [
          "Projects"
        ]
      }
    },
    "/projects/{id}": {
      "delete": {
        "description": "Deletes a project",
        "operationId": "delete-projects-{id}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/successOperationResponseSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Delete project",
        "tags": [
          "Projects"
        ]
      },
      "put": {
        "description": "Updates a project's details",
        "operationId": "put-projects-{id}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateProjectApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Update project",
        "tags": [
          "Projects"
        ]
      }
    },
    "/projects/{id}/hourly-rate-overrides": {
      "get": {
        "description": "Returns effective hourly rates for team members scoped to one project",
        "operationId": "get-projects-{id}-hourly-rate-overrides",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectHourlyRateOverridesEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List project hourly rate overrides",
        "tags": [
          "Projects"
        ]
      }
    },
    "/projects/{id}/hourly-rate-overrides/{userId}": {
      "delete": {
        "description": "Removes a project-scoped hourly rate override for one team member",
        "operationId": "delete-projects-{id}-hourly-rate-overrides-{userId}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "123",
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/successOperationResponseSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Delete project hourly rate override",
        "tags": [
          "Projects"
        ]
      },
      "put": {
        "description": "Creates or updates a project-scoped hourly rate override for one team member",
        "operationId": "put-projects-{id}-hourly-rate-overrides-{userId}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "123",
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateProjectHourlyRateOverrideApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectHourlyRateOverrideEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Update project hourly rate override",
        "tags": [
          "Projects"
        ]
      }
    },
    "/projects/{id}/retainer": {
      "get": {
        "description": "Returns current retainer status for a project",
        "operationId": "get-projects-{id}-retainer",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetainerStatusResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get retainer status",
        "tags": [
          "Projects"
        ]
      },
      "put": {
        "description": "Creates or updates a project retainer configuration",
        "operationId": "put-projects-{id}-retainer",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/retainerApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetainerResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Upsert retainer",
        "tags": [
          "Projects"
        ]
      }
    },
    "/projects/{id}/users": {
      "get": {
        "description": "Returns users assigned to a project",
        "operationId": "get-projects-{id}-users",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectUsersListEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Project users",
        "tags": [
          "Projects"
        ]
      }
    },
    "/proposals": {
      "get": {
        "description": "Returns paginated proposals for the current organization",
        "operationId": "get-proposals",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProposalListEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List proposals",
        "tags": [
          "Proposals"
        ]
      },
      "post": {
        "description": "Creates a new draft proposal",
        "operationId": "post-proposals",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createProposalApiSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProposalResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Create proposal",
        "tags": [
          "Proposals"
        ]
      }
    },
    "/proposals/{id}": {
      "delete": {
        "description": "Deletes a draft, unconverted proposal",
        "operationId": "delete-proposals-{id}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Delete proposal",
        "tags": [
          "Proposals"
        ]
      },
      "get": {
        "description": "Returns a single proposal with all relations",
        "operationId": "get-proposals-{id}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProposalResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get proposal",
        "tags": [
          "Proposals"
        ]
      },
      "patch": {
        "description": "Updates proposal fields or wizard inputs",
        "operationId": "patch-proposals-{id}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateProposalApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProposalResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Update proposal",
        "tags": [
          "Proposals"
        ]
      }
    },
    "/proposals/{id}/budget-range": {
      "put": {
        "description": "Creates or updates the budget range for a proposal",
        "operationId": "put-proposals-{id}-budget-range",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateBudgetRangeApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProposalBudgetRangeEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Upsert proposal budget range",
        "tags": [
          "Proposals"
        ]
      }
    },
    "/proposals/{id}/comments": {
      "get": {
        "description": "Returns all comments for a proposal",
        "operationId": "get-proposals-{id}-comments",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProposalCommentsListEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List proposal comments",
        "tags": [
          "Proposals"
        ]
      },
      "post": {
        "description": "Adds an internal comment from an org member to a proposal",
        "operationId": "post-proposals-{id}-comments",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/addInternalCommentApiSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProposalCommentResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Add internal comment",
        "tags": [
          "Proposals"
        ]
      }
    },
    "/proposals/{id}/convert": {
      "post": {
        "description": "Converts a finalized proposal into a live Project with Milestones and Tasks",
        "operationId": "post-proposals-{id}-convert",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConvertProposalEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Convert proposal to project",
        "tags": [
          "Proposals"
        ]
      }
    },
    "/proposals/{id}/generate": {
      "post": {
        "description": "Queues background AI generation for a proposal estimate.",
        "operationId": "post-proposals-{id}-generate",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobQueuedEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Generate proposal estimate",
        "tags": [
          "Proposals"
        ]
      }
    },
    "/proposals/{id}/milestones": {
      "get": {
        "description": "Returns all milestones for a proposal including tasks",
        "operationId": "get-proposals-{id}-milestones",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProposalMilestoneListEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List proposal milestones",
        "tags": [
          "Proposals"
        ]
      },
      "post": {
        "description": "Creates a new milestone on a proposal",
        "operationId": "post-proposals-{id}-milestones",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createProposalMilestoneApiSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProposalMilestoneResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Create proposal milestone",
        "tags": [
          "Proposals"
        ]
      }
    },
    "/proposals/{id}/milestones/{mid}": {
      "delete": {
        "description": "Deletes a milestone and its tasks from a proposal",
        "operationId": "delete-proposals-{id}-milestones-{mid}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "example",
            "in": "path",
            "name": "mid",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Delete proposal milestone",
        "tags": [
          "Proposals"
        ]
      },
      "patch": {
        "description": "Updates a milestone on a proposal",
        "operationId": "patch-proposals-{id}-milestones-{mid}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "example",
            "in": "path",
            "name": "mid",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateProposalMilestoneApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProposalMilestoneResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Update proposal milestone",
        "tags": [
          "Proposals"
        ]
      }
    },
    "/proposals/{id}/milestones/{mid}/tasks": {
      "get": {
        "description": "Returns all tasks for a proposal milestone",
        "operationId": "get-proposals-{id}-milestones-{mid}-tasks",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "example",
            "in": "path",
            "name": "mid",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProposalTaskListEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List proposal tasks",
        "tags": [
          "Proposals"
        ]
      },
      "post": {
        "description": "Creates a new task in a proposal milestone",
        "operationId": "post-proposals-{id}-milestones-{mid}-tasks",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "example",
            "in": "path",
            "name": "mid",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createProposalTaskApiSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProposalTaskResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Create proposal task",
        "tags": [
          "Proposals"
        ]
      }
    },
    "/proposals/{id}/milestones/{mid}/tasks/{tid}": {
      "delete": {
        "description": "Deletes a task from a proposal milestone",
        "operationId": "delete-proposals-{id}-milestones-{mid}-tasks-{tid}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "example",
            "in": "path",
            "name": "mid",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "example",
            "in": "path",
            "name": "tid",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Delete proposal task",
        "tags": [
          "Proposals"
        ]
      },
      "patch": {
        "description": "Updates a task in a proposal milestone",
        "operationId": "patch-proposals-{id}-milestones-{mid}-tasks-{tid}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "example",
            "in": "path",
            "name": "mid",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "example",
            "in": "path",
            "name": "tid",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateProposalTaskApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProposalTaskResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Update proposal task",
        "tags": [
          "Proposals"
        ]
      }
    },
    "/proposals/{id}/revise": {
      "post": {
        "description": "Queues background revision for a generated proposal with optional AI feedback, or resets an approved/rejected proposal back to draft",
        "operationId": "post-proposals-{id}-revise",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/reviseProposalApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobQueuedEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Revise proposal",
        "tags": [
          "Proposals"
        ]
      }
    },
    "/proposals/{id}/send": {
      "post": {
        "description": "Emails the linked client a shared proposal link. Creates a share link first when needed.",
        "operationId": "post-proposals-{id}-send",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/shareProposalApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProposalResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Email proposal to client",
        "tags": [
          "Proposals"
        ]
      }
    },
    "/proposals/{id}/share": {
      "delete": {
        "description": "Revokes the public share link and resets the proposal to draft",
        "operationId": "delete-proposals-{id}-share",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProposalResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Revoke proposal share",
        "tags": [
          "Proposals"
        ]
      },
      "post": {
        "description": "Creates or refreshes the public share state for a proposal",
        "operationId": "post-proposals-{id}-share",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/shareProposalApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProposalResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Share proposal",
        "tags": [
          "Proposals"
        ]
      }
    },
    "/public/intake/{token}": {
      "get": {
        "description": "Returns only the active public questions and organization display name, excluding private configuration.",
        "operationId": "get-public-intake-{token}",
        "parameters": [
          {
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicIntakeFormEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "summary": "Get public intake form",
        "tags": [
          "Public"
        ]
      }
    },
    "/public/intake/{token}/submissions": {
      "post": {
        "description": "Validates and durably receives a request for internal draft preparation. Returns only a receipt message.",
        "operationId": "post-public-intake-{token}-submissions",
        "parameters": [
          {
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntakeSubmitSchema"
              }
            }
          }
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntakeReceiptEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "summary": "Submit public intake request",
        "tags": [
          "Public"
        ]
      }
    },
    "/quotes": {
      "get": {
        "description": "Returns paginated quotes",
        "operationId": "get-quotes",
        "parameters": [
          {
            "example": 1,
            "in": "query",
            "name": "page",
            "required": true,
            "schema": {
              "default": 1,
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991,
              "type": "integer"
            }
          },
          {
            "example": 1,
            "in": "query",
            "name": "limit",
            "required": true,
            "schema": {
              "default": 20,
              "exclusiveMinimum": 0,
              "maximum": 100,
              "type": "integer"
            }
          },
          {
            "example": "123",
            "in": "query",
            "name": "clientId",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "123",
            "in": "query",
            "name": "projectId",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "example",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/quoteStatusSchema"
                }
              ]
            }
          },
          {
            "example": "recent",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": [
                "recent"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteListEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List quotes",
        "tags": [
          "Quotes"
        ]
      },
      "post": {
        "description": "Creates a new quote",
        "operationId": "post-quotes",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createQuoteApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Create quote",
        "tags": [
          "Quotes"
        ]
      }
    },
    "/quotes/{id}": {
      "get": {
        "description": "Returns a single quote",
        "operationId": "get-quotes-{id}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get quote",
        "tags": [
          "Quotes"
        ]
      },
      "put": {
        "description": "Updates draft quote content and lifecycle status",
        "operationId": "put-quotes-{id}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateQuoteApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Update quote",
        "tags": [
          "Quotes"
        ]
      }
    },
    "/quotes/{id}/convert": {
      "post": {
        "description": "Converts a quote into a draft invoice",
        "operationId": "post-quotes-{id}-convert",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteConversionResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Convert quote to invoice",
        "tags": [
          "Quotes"
        ]
      }
    },
    "/quotes/{id}/send": {
      "post": {
        "description": "Queues a quote email and marks draft quotes as sent",
        "operationId": "post-quotes-{id}-send",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/sendQuoteEmailApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/successOperationResponseSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Send quote email",
        "tags": [
          "Quotes"
        ]
      }
    },
    "/quotes/{id}/share-link": {
      "post": {
        "description": "Returns the public web quote link the client uses to view the quote, creating it on first use. Drafts have no link.",
        "operationId": "post-quotes-{id}-share-link",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteShareLinkEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get quote web link",
        "tags": [
          "Quotes"
        ]
      }
    },
    "/settings/invoice-reminders": {
      "put": {
        "description": "Turns automatic overdue invoice reminders on or off for the organization; clients are emailed 3, 7, and 14 days after the due date while a balance remains",
        "operationId": "put-settings-invoice-reminders",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/invoiceReminderSettingsSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceReminderSettingsEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Update overdue reminders",
        "tags": [
          "Settings"
        ]
      }
    },
    "/task-delegations": {
      "get": {
        "description": "For an app's bot token: the calling installation's delegations, newest first. `status=open` lists only those that have not ended; an app that missed a `task.delegated` event finds its work here. Other tokens are refused.",
        "operationId": "get-task-delegations",
        "parameters": [
          {
            "example": "open",
            "in": "query",
            "name": "status",
            "required": true,
            "schema": {
              "default": "all",
              "enum": [
                "open",
                "all"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDelegationListEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List the app's delegations",
        "tags": [
          "Task-delegations"
        ]
      }
    },
    "/task-delegations/{id}": {
      "get": {
        "description": "For an app's bot token: one of the calling installation's delegations. Another installation's delegation, or one whose task was deleted, is not found.",
        "operationId": "get-task-delegations-{id}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDelegationEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get a delegation",
        "tags": [
          "Task-delegations"
        ]
      }
    },
    "/task-delegations/{id}/end": {
      "post": {
        "description": "For the delegated app's bot token: ends the open delegation with reason `ended_by_app`, leaving the task's status and assignee as they are. Repeating it returns the ended delegation. Send `Idempotency-Key` (1 to 255 visible ASCII characters) to make a retry return the delegation as it is now with `Idempotent-Replayed: true` (`410` if it is gone); the same key with a different request is refused with `422` and code `IDEMPOTENCY_KEY_REUSED`, and a key voided through `GET /api/idempotency-keys/{key}` with `409` and code `IDEMPOTENCY_KEY_VOIDED`.",
        "operationId": "post-task-delegations-{id}-end",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDelegationEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "End a delegation",
        "tags": [
          "Task-delegations"
        ]
      }
    },
    "/task-delegations/{id}/state": {
      "put": {
        "description": "For the delegated app's bot token: sets the open delegation's state to `working`, `needs_input`, or `ready_for_review`. Report `working` as soon as you take the delegation: one still `pending` five minutes after it opened ends with reason `not_accepted`. Reporting the current state again changes nothing. An ended delegation is refused with `409` and code `DELEGATION_ENDED`, with `details.endReason`. Send `Idempotency-Key` (1 to 255 visible ASCII characters) to make a retry return the delegation as it is now with `Idempotent-Replayed: true` instead of reporting again (`410` if it is gone); the same key with a different request is refused with `422` and code `IDEMPOTENCY_KEY_REUSED`, and a key voided through `GET /api/idempotency-keys/{key}` with `409` and code `IDEMPOTENCY_KEY_VOIDED`.",
        "operationId": "put-task-delegations-{id}-state",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/setTaskDelegationStateSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDelegationEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Report a delegation's state",
        "tags": [
          "Task-delegations"
        ]
      }
    },
    "/tasks": {
      "get": {
        "description": "Returns paginated top-level tasks. `inactiveSince` keeps tasks whose last activity (by a person) is before that time; `sort=least-active` orders them from the oldest last activity.",
        "operationId": "get-tasks",
        "parameters": [
          {
            "example": "123",
            "in": "query",
            "name": "projectId",
            "required": false,
            "schema": {
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "example": "example",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "true",
            "in": "query",
            "name": "assignedToMe",
            "required": false,
            "schema": {
              "enum": [
                "true",
                "false"
              ],
              "type": "string"
            }
          },
          {
            "example": "example",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/taskStatusSchema"
                }
              ]
            }
          },
          {
            "example": "example",
            "in": "query",
            "name": "priority",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/taskPrioritySchema"
                }
              ]
            }
          },
          {
            "example": "recent",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": [
                "recent",
                "least-active"
              ],
              "type": "string"
            }
          },
          {
            "example": "example",
            "in": "query",
            "name": "inactiveSince",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskListEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List tasks",
        "tags": [
          "Tasks"
        ]
      },
      "post": {
        "description": "Creates a new task. Send `Idempotency-Key` (1 to 255 visible ASCII characters) to make a retry return the task it created, with its current state, status `201` and `Idempotent-Replayed: true` (or `410` if it was deleted since), instead of creating another; the same key with a different request is refused with `422` and code `IDEMPOTENCY_KEY_REUSED`, and a key voided through `GET /api/idempotency-keys/{key}` with `409` and code `IDEMPOTENCY_KEY_VOIDED`.",
        "operationId": "post-tasks",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createTaskApiSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Create task",
        "tags": [
          "Tasks"
        ]
      }
    },
    "/tasks/{id}": {
      "delete": {
        "description": "Deletes a task by ID. Send `If-Match` with the task's `ETag` to refuse the delete with `412` and code `TASK_VERSION_CONFLICT` (the response `details.task` is the current task) when the task changed since.",
        "operationId": "delete-tasks-{id}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/successOperationResponseSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Delete task",
        "tags": [
          "Tasks"
        ]
      },
      "get": {
        "description": "Returns a task by ID. The `ETag` header is the task's `version` (a strong tag covering title, description, status, priority, assignee, due date, project, parent, milestone and billable) for use in `If-Match`; responses are sent with `Cache-Control: no-store` and `If-None-Match` is not honoured.",
        "operationId": "get-tasks-{id}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get task",
        "tags": [
          "Tasks"
        ]
      },
      "patch": {
        "description": "Moves a task to a different project. Send `If-Match` with the task's `ETag` to refuse the move with `412` and code `TASK_VERSION_CONFLICT` (the response `details.task` is the current task) when the task changed since.",
        "operationId": "patch-tasks-{id}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/moveTaskApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Move task",
        "tags": [
          "Tasks"
        ]
      },
      "put": {
        "description": "Updates a task by ID. Send `If-Match` with the task's `ETag` to refuse the write with `412` and code `TASK_VERSION_CONFLICT` (the response `details.task` is the current task) when the task changed since; without it the write is unconditional. Send `Idempotency-Key` (1 to 255 visible ASCII characters) to make a retry return the original result with `Idempotent-Replayed: true` instead of writing again; the same key with a different request is refused with `422` and code `IDEMPOTENCY_KEY_REUSED`, and a key voided through `GET /api/idempotency-keys/{key}` with `409` and code `IDEMPOTENCY_KEY_VOIDED`.",
        "operationId": "put-tasks-{id}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateTaskWithCompletionApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Update task",
        "tags": [
          "Tasks"
        ]
      }
    },
    "/tasks/{id}/attachments": {
      "get": {
        "description": "Returns attachments for a task with what the requester may do with each",
        "operationId": "get-tasks-{id}-attachments",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskAttachmentsListEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List task attachments",
        "tags": [
          "Tasks"
        ]
      },
      "post": {
        "description": "Attaches a file uploaded through POST /api/attachments/upload to a task",
        "operationId": "post-tasks-{id}-attachments",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/addAttachmentSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskAttachmentResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Add task attachment",
        "tags": [
          "Tasks"
        ]
      }
    },
    "/tasks/{id}/attachments/{attachmentId}": {
      "delete": {
        "description": "Deletes an attachment from a task",
        "operationId": "delete-tasks-{id}-attachments-{attachmentId}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "123",
            "in": "path",
            "name": "attachmentId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/successOperationResponseSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Delete task attachment",
        "tags": [
          "Tasks"
        ]
      }
    },
    "/tasks/{id}/comments": {
      "get": {
        "description": "Returns task comments with replies and what the requester may do with each; OAuth attachment data requires attachments:read",
        "operationId": "get-tasks-{id}-comments",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskCommentsListEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List task comments",
        "tags": [
          "Tasks"
        ]
      },
      "post": {
        "description": "Adds a comment with text, attachments uploaded through POST /api/attachments/upload, or both. Send `Idempotency-Key` (1 to 255 visible ASCII characters) to make a retry after a lost response return the comment it created, with status `201` and `Idempotent-Replayed: true` (or `410` if it was deleted since), instead of posting it again; the same key with a different request is refused with `422` and code `IDEMPOTENCY_KEY_REUSED`, and a key voided through `GET /api/idempotency-keys/{key}` with `409` and code `IDEMPOTENCY_KEY_VOIDED`.",
        "operationId": "post-tasks-{id}-comments",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/addCommentSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskCommentResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Add task comment",
        "tags": [
          "Tasks"
        ]
      }
    },
    "/tasks/{id}/comments/{commentId}": {
      "delete": {
        "description": "Deletes a task comment",
        "operationId": "delete-tasks-{id}-comments-{commentId}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "123",
            "in": "path",
            "name": "commentId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/successOperationResponseSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Delete task comment",
        "tags": [
          "Tasks"
        ]
      },
      "patch": {
        "description": "Updates a task comment's content",
        "operationId": "patch-tasks-{id}-comments-{commentId}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "123",
            "in": "path",
            "name": "commentId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateCommentSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskCommentResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Update task comment",
        "tags": [
          "Tasks"
        ]
      }
    },
    "/tasks/{id}/comments/{commentId}/attachments": {
      "get": {
        "description": "Returns attachments for a comment",
        "operationId": "get-tasks-{id}-comments-{commentId}-attachments",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "123",
            "in": "path",
            "name": "commentId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttachmentsListEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List comment attachments",
        "tags": [
          "Tasks"
        ]
      },
      "post": {
        "description": "Attaches a file uploaded through POST /api/attachments/upload to the requester's own comment",
        "operationId": "post-tasks-{id}-comments-{commentId}-attachments",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "123",
            "in": "path",
            "name": "commentId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/commentAttachmentInputSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttachmentResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Add comment attachment",
        "tags": [
          "Tasks"
        ]
      }
    },
    "/tasks/{id}/comments/{commentId}/attachments/{attachmentId}": {
      "delete": {
        "description": "Deletes an attachment from the requester's own task comment",
        "operationId": "delete-tasks-{id}-comments-{commentId}-attachments-{attachmentId}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "123",
            "in": "path",
            "name": "commentId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "123",
            "in": "path",
            "name": "attachmentId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/successOperationResponseSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Delete comment attachment",
        "tags": [
          "Tasks"
        ]
      }
    },
    "/tasks/{id}/comments/{commentId}/link-previews/{previewId}": {
      "delete": {
        "description": "Hides a link preview on a task comment for everyone; the dismissal survives later edits of the comment. This first-party endpoint cannot create previews.",
        "operationId": "delete-tasks-{id}-comments-{commentId}-link-previews-{previewId}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "123",
            "in": "path",
            "name": "commentId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "123",
            "in": "path",
            "name": "previewId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/successOperationResponseSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Dismiss task comment link preview",
        "tags": [
          "Tasks"
        ]
      }
    },
    "/tasks/{id}/parent": {
      "patch": {
        "description": "Converts a task to a subtask or back to a top-level task. Send `If-Match` with the task's `ETag` to refuse the change with `412` and code `TASK_VERSION_CONFLICT` (the response `details.task` is the current task) when the task changed since.",
        "operationId": "patch-tasks-{id}-parent",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/reparentTaskApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Reparent task",
        "tags": [
          "Tasks"
        ]
      }
    },
    "/tasks/{id}/subtasks": {
      "get": {
        "description": "Returns the direct subtasks for a top-level task",
        "operationId": "get-tasks-{id}-subtasks",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskSubtasksEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List task subtasks",
        "tags": [
          "Tasks"
        ]
      },
      "post": {
        "description": "Creates a subtask under a top-level task",
        "operationId": "post-tasks-{id}-subtasks",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createSubtaskApiSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Create subtask",
        "tags": [
          "Tasks"
        ]
      }
    },
    "/tasks/{id}/subtasks/order": {
      "patch": {
        "description": "Updates ordering for direct subtasks under a top-level task",
        "operationId": "patch-tasks-{id}-subtasks-order",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateSubtaskOrderApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/successOperationResponseSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Update subtask order",
        "tags": [
          "Tasks"
        ]
      }
    },
    "/tasks/bulk-status": {
      "post": {
        "description": "Updates status for multiple tasks atomically",
        "operationId": "post-tasks-bulk-status",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/bulkUpdateTaskStatusApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/successOperationResponseSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Bulk update task status",
        "tags": [
          "Tasks"
        ]
      }
    },
    "/tax/jurisdictions": {
      "get": {
        "description": "Returns the Dutch Caribbean tax jurisdictions Zentract applies, with current rates, seller statuses, exemptions, sources and review dates.",
        "operationId": "get-tax-jurisdictions",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxJurisdictionListEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List tax jurisdictions",
        "tags": [
          "Tax"
        ]
      }
    },
    "/tax/preview": {
      "post": {
        "description": "Determines tax, totals and outstanding requirements for unsaved invoice or quote details. Nothing is stored.",
        "operationId": "post-tax-preview",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/taxPreviewApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxPreviewEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Preview document tax",
        "tags": [
          "Tax"
        ]
      }
    },
    "/teams": {
      "post": {
        "description": "Sends an invitation to join the organization",
        "operationId": "post-teams",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inviteTeamMemberApiSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamInvitationResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Invite team member",
        "tags": [
          "Teams"
        ]
      }
    },
    "/teams/{id}": {
      "delete": {
        "description": "Removes a member from the team",
        "operationId": "delete-teams-{id}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/successOperationResponseSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Remove team member",
        "tags": [
          "Teams"
        ]
      },
      "patch": {
        "description": "Updates job role and/or hourly rate",
        "operationId": "patch-teams-{id}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateTeamMemberDetailsApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamMemberResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Update team member details",
        "tags": [
          "Teams"
        ]
      },
      "put": {
        "description": "Updates a team member's role or rate",
        "operationId": "put-teams-{id}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateTeamMemberApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamMemberResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Update team member",
        "tags": [
          "Teams"
        ]
      }
    },
    "/teams/{id}/{memberId}": {
      "delete": {
        "description": "Removes a team member from the organization",
        "operationId": "delete-teams-{id}-{memberId}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "123",
            "in": "path",
            "name": "memberId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/successOperationResponseSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Delete team member",
        "tags": [
          "Teams"
        ]
      },
      "patch": {
        "description": "Partially updates team member role and/or details",
        "operationId": "patch-teams-{id}-{memberId}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "123",
            "in": "path",
            "name": "memberId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateTeamMemberPatchApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamMemberResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Update team member (partial)",
        "tags": [
          "Teams"
        ]
      }
    },
    "/teams/accept-invitation": {
      "post": {
        "description": "Accepts a team invitation by token.",
        "operationId": "post-teams-accept-invitation",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/acceptInvitationApiSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/successOperationResponseSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Accept team invitation",
        "tags": [
          "Teams"
        ]
      }
    },
    "/teams/assignees": {
      "get": {
        "description": "Returns everyone a task can be assigned to: the organization's working members. Apps are never assignees; tasks are delegated to them instead.",
        "operationId": "get-teams-assignees",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamAssigneesEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List task assignees",
        "tags": [
          "Teams"
        ]
      }
    },
    "/teams/invitations/{id}": {
      "delete": {
        "description": "Cancels a pending team invitation by ID.",
        "operationId": "delete-teams-invitations-{id}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/successOperationResponseSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Cancel team invitation",
        "tags": [
          "Teams"
        ]
      }
    },
    "/teams/search": {
      "get": {
        "description": "Returns team members matching the search query for mentions",
        "operationId": "get-teams-search",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamMembersSearchResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Search team members",
        "tags": [
          "Teams"
        ]
      }
    },
    "/time-entries": {
      "get": {
        "description": "Returns time entries for a task or paginated list, with what the requester may do with each",
        "operationId": "get-time-entries",
        "parameters": [
          {
            "example": "recent",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": [
                "recent"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntryListEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List time entries",
        "tags": [
          "Time-entries"
        ]
      },
      "post": {
        "description": "Creates a time entry for a task and user",
        "operationId": "post-time-entries",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createManualEntryRequestSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntryResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Create a manual time entry",
        "tags": [
          "Time-entries"
        ]
      }
    },
    "/time-entries/{id}": {
      "delete": {
        "description": "Deletes a time entry by ID",
        "operationId": "delete-time-entries-{id}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/successOperationResponseSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Delete time entry",
        "tags": [
          "Time-entries"
        ]
      },
      "get": {
        "description": "Returns a time entry by ID",
        "operationId": "get-time-entries-{id}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntryResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get time entry",
        "tags": [
          "Time-entries"
        ]
      },
      "put": {
        "description": "Updates fields of a time entry",
        "operationId": "put-time-entries-{id}",
        "parameters": [
          {
            "example": "123",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateTimeEntryRequestSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntryResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Update time entry",
        "tags": [
          "Time-entries"
        ]
      }
    },
    "/time-entries/running": {
      "get": {
        "description": "Returns the current running time entry (if any)",
        "operationId": "get-time-entries-running",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunningTimeEntryEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Running timer",
        "tags": [
          "Time-entries"
        ]
      }
    },
    "/time-entries/start": {
      "post": {
        "description": "Starts a running time entry for a task",
        "operationId": "post-time-entries-start",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/startTimerRequestSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntryResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Start timer",
        "tags": [
          "Time-entries"
        ]
      }
    },
    "/time-entries/stop": {
      "post": {
        "description": "Stops a running time entry",
        "operationId": "post-time-entries-stop",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/stopTimerRequestSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntryResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Stop timer",
        "tags": [
          "Time-entries"
        ]
      }
    },
    "/users/me": {
      "get": {
        "description": "Returns the authenticated user's profile",
        "operationId": "get-users-me",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserProfileResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get current user profile",
        "tags": [
          "Users"
        ]
      },
      "put": {
        "description": "Updates the authenticated user's profile. OAuth apps may update the name but cannot change the login email.",
        "operationId": "put-users-me",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateProfileSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserProfileResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Update current user profile",
        "tags": [
          "Users"
        ]
      }
    },
    "/users/me/avatar": {
      "put": {
        "description": "Updates the current user's profile image URL",
        "operationId": "put-users-me-avatar",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateAvatarSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserProfileResponseEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Update profile image",
        "tags": [
          "Users"
        ]
      }
    },
    "/users/me/notifications": {
      "get": {
        "description": "Returns current user's notification preferences",
        "operationId": "get-users-me-notifications",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationPreferencesEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get notification preferences",
        "tags": [
          "Users"
        ]
      },
      "put": {
        "description": "Updates current user's notification preferences",
        "operationId": "put-users-me-notifications",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateNotificationPreferencesSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationPreferencesEnvelope"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Update notification preferences",
        "tags": [
          "Users"
        ]
      }
    }
  },
  "servers": [
    {
      "description": "Local development server",
      "url": "http://localhost:3000/api"
    }
  ],
  "tags": [
    {
      "name": "Accounting"
    },
    {
      "name": "Apps"
    },
    {
      "name": "Auth"
    },
    {
      "name": "Clients"
    },
    {
      "name": "Credit-notes"
    },
    {
      "name": "Idempotency-keys"
    },
    {
      "name": "Intake"
    },
    {
      "name": "Invoices"
    },
    {
      "name": "Payments"
    },
    {
      "name": "Projects"
    },
    {
      "name": "Proposals"
    },
    {
      "name": "Public"
    },
    {
      "name": "Quotes"
    },
    {
      "name": "Settings"
    },
    {
      "name": "Task-delegations"
    },
    {
      "name": "Tasks"
    },
    {
      "name": "Tax"
    },
    {
      "name": "Teams"
    },
    {
      "name": "Time-entries"
    },
    {
      "name": "Users"
    }
  ]
}
