// Package docs Code generated by swaggo/swag. DO NOT EDIT
package docs

import "github.com/swaggo/swag"

const docTemplate = `{
    "schemes": {{ marshal .Schemes }},
    "swagger": "2.0",
    "info": {
        "description": "{{escape .Description}}",
        "title": "{{.Title}}",
        "termsOfService": "http://swagger.io/terms/",
        "contact": {
            "name": "API Support",
            "url": "http://www.swagger.io/support",
            "email": "support@nexuscrm.com"
        },
        "license": {
            "name": "Apache 2.0",
            "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
        },
        "version": "{{.Version}}"
    },
    "host": "{{.Host}}",
    "basePath": "{{.BasePath}}",
    "paths": {
        "/admin/recalculate-rollups/{object}": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Trigger bulk recalculation of rollup fields for an object.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "admin"
                ],
                "summary": "Recalculate Rollups",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Object API Name",
                        "name": "object",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            }
        },
        "/admin/schema/validate": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Run health check on schema definitions.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "admin"
                ],
                "summary": "Validate Schema Registry",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            }
        },
        "/admin/tables": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Get list of all registered system tables.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "admin"
                ],
                "summary": "Get Table Registry",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            }
        },
        "/auth/login": {
            "post": {
                "description": "Authenticate user and return JWT token.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "auth"
                ],
                "summary": "User Login",
                "parameters": [
                    {
                        "description": "Login Credentials",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/api.LoginRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/api.LoginResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            }
        },
        "/cometd/{version}/connect": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Streaming"
                ],
                "summary": "CometD connect endpoint",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "object"
                            }
                        }
                    }
                }
            }
        },
        "/cometd/{version}/disconnect": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Streaming"
                ],
                "summary": "CometD disconnect endpoint",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "object"
                            }
                        }
                    }
                }
            }
        },
        "/cometd/{version}/handshake": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Streaming"
                ],
                "summary": "CometD handshake endpoint",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "object"
                            }
                        }
                    }
                }
            }
        },
        "/cometd/{version}/subscribe": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Streaming"
                ],
                "summary": "CometD subscribe endpoint",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "object"
                            }
                        }
                    }
                }
            }
        },
        "/data/query": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Execute a structured SOQL-like query against any object.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "data"
                ],
                "summary": "Query Data (SOQL)",
                "parameters": [
                    {
                        "description": "Query Request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/api.QueryRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/models.QueryResult"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            }
        },
        "/jobs/ingest": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Create a new bulk ingest job.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "bulk"
                ],
                "summary": "Create Bulk Job",
                "parameters": [
                    {
                        "description": "Job Definition",
                        "name": "job",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/models.BulkJob"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/models.BulkJob"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            }
        },
        "/jobs/ingest/{jobId}": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Get the status of a bulk job.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "bulk"
                ],
                "summary": "Get Job Status",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Job ID",
                        "name": "jobId",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/models.BulkJob"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            },
            "patch": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Close a bulk job to start processing.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "bulk"
                ],
                "summary": "Close Job",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Job ID",
                        "name": "jobId",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Job State (UploadComplete)",
                        "name": "state",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/models.BulkJob"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            }
        },
        "/jobs/ingest/{jobId}/batches": {
            "put": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Upload CSV data for a bulk job.",
                "consumes": [
                    "text/csv"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "bulk"
                ],
                "summary": "Upload Batch Data",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Job ID",
                        "name": "jobId",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "file",
                        "description": "CSV Content",
                        "name": "file",
                        "in": "formData",
                        "required": true
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            }
        },
        "/jobs/query": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Create a new bulk query job for async SOQL execution",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "bulk"
                ],
                "summary": "Create Bulk Query Job",
                "parameters": [
                    {
                        "description": "Query Job Definition",
                        "name": "job",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            }
        },
        "/jobs/query/{jobId}": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Get the status of a bulk query job",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "bulk"
                ],
                "summary": "Get Query Job Status",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Job ID",
                        "name": "jobId",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            }
        },
        "/jobs/query/{jobId}/results": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Get the results of a completed bulk query job",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "bulk"
                ],
                "summary": "Get Query Results",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Job ID",
                        "name": "jobId",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Max records to return",
                        "name": "maxRecords",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Pagination locator",
                        "name": "locator",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            }
        },
        "/metadata/fieldtypes": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "List all available field types.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "metadata"
                ],
                "summary": "Get Field Types",
                "responses": {
                    "200": {
                        "description": "Wrapped list of field types",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            }
        },
        "/metadata/objects": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Get metadata for all registered objects.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "metadata"
                ],
                "summary": "List Object Schemas",
                "responses": {
                    "200": {
                        "description": "Wrapped list of schemas",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Create a new custom object definition.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "metadata"
                ],
                "summary": "Create Object Schema",
                "parameters": [
                    {
                        "description": "Object Metadata",
                        "name": "schema",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/models.ObjectMetadata"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "$ref": "#/definitions/models.ObjectMetadata"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            }
        },
        "/metadata/objects/{apiName}": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Get metadata for a specific object by API Name.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "metadata"
                ],
                "summary": "Get Object Schema",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Object API Name",
                        "name": "apiName",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/models.ObjectMetadata"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Delete a custom object and all associated data.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "metadata"
                ],
                "summary": "Delete Object Schema",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Object API Name",
                        "name": "apiName",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            },
            "patch": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Update an existing object definition.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "metadata"
                ],
                "summary": "Update Object Schema",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Object API Name",
                        "name": "apiName",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Schema Updates",
                        "name": "updates",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/models.ObjectMetadata"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/models.ObjectMetadata"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            }
        },
        "/metadata/objects/{apiName}/fields": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Add a new field to an object.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "metadata"
                ],
                "summary": "Create Field",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Object API Name",
                        "name": "apiName",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Field Definition",
                        "name": "field",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/models.FieldMetadata"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "$ref": "#/definitions/models.FieldMetadata"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            }
        },
        "/metadata/objects/{apiName}/fields/batch": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Create multiple fields for an object in one transaction.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "metadata"
                ],
                "summary": "Batch Create Fields",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Object API Name",
                        "name": "apiName",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "List of Field Definitions",
                        "name": "fields",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.FieldMetadata"
                            }
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Wrapped list of created fields",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            }
        },
        "/metadata/objects/{apiName}/fields/{fieldApiName}": {
            "delete": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Delete a field and its data.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "metadata"
                ],
                "summary": "Delete Field",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Object API Name",
                        "name": "apiName",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Field API Name",
                        "name": "fieldApiName",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            },
            "patch": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Update an existing field definition.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "metadata"
                ],
                "summary": "Update Field",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Object API Name",
                        "name": "apiName",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Field API Name",
                        "name": "fieldApiName",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Field Updates",
                        "name": "updates",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/models.FieldMetadata"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/models.FieldMetadata"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            }
        },
        "/metadata/validation-rules": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "List validation rules for an object.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "metadata"
                ],
                "summary": "Get Validation Rules",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Object API Name",
                        "name": "objectApiName",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Wrapped list of rules",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Create a new validation rule for an object.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "metadata"
                ],
                "summary": "Create Validation Rule",
                "parameters": [
                    {
                        "description": "Validation Rule",
                        "name": "rule",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/models.ValidationRule"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "$ref": "#/definitions/models.ValidationRule"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            }
        },
        "/metadata/validation-rules/{id}": {
            "delete": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Delete a validation rule.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "metadata"
                ],
                "summary": "Delete Validation Rule",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Rule ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            },
            "patch": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Update an existing validation rule.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "metadata"
                ],
                "summary": "Update Validation Rule",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Rule ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Rule Updates",
                        "name": "updates",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/models.ValidationRule"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/models.ValidationRule"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            }
        },
        "/search": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Execute a SOSL search query using FIND syntax",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "sosl"
                ],
                "summary": "Execute SOSL Search",
                "parameters": [
                    {
                        "type": "string",
                        "description": "SOSL Query (e.g. FIND {term} IN ALL FIELDS RETURNING Account)",
                        "name": "q",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            }
        },
        "/ws": {
            "get": {
                "tags": [
                    "Streaming"
                ],
                "summary": "WebSocket connection endpoint",
                "responses": {
                    "101": {
                        "description": "Switching Protocols",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "api.LoginRequest": {
            "type": "object",
            "properties": {
                "email": {
                    "type": "string"
                },
                "password": {
                    "type": "string"
                }
            }
        },
        "api.LoginResponse": {
            "type": "object",
            "properties": {
                "expires_at": {
                    "type": "string"
                },
                "success": {
                    "type": "boolean"
                },
                "token": {
                    "type": "string"
                },
                "user": {
                    "$ref": "#/definitions/api.UserDTO"
                }
            }
        },
        "api.QueryCriterion": {
            "type": "object",
            "properties": {
                "field": {
                    "type": "string"
                },
                "op": {
                    "type": "string"
                },
                "val": {}
            }
        },
        "api.QueryRequest": {
            "type": "object",
            "properties": {
                "criteria": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/api.QueryCriterion"
                    }
                },
                "filter": {},
                "filter_expr": {
                    "type": "string"
                },
                "group_by": {
                    "type": "string"
                },
                "having": {
                    "type": "string"
                },
                "limit": {
                    "type": "integer"
                },
                "object_api_name": {
                    "type": "string"
                },
                "offset": {
                    "type": "integer"
                },
                "order_by": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/api.SortCriterion"
                    }
                },
                "scan_all": {
                    "type": "boolean"
                },
                "select_fields": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "sort_direction": {
                    "type": "string"
                },
                "sort_field": {
                    "type": "string"
                }
            }
        },
        "api.SortCriterion": {
            "type": "object",
            "properties": {
                "direction": {
                    "type": "string"
                },
                "field": {
                    "type": "string"
                }
            }
        },
        "api.UserDTO": {
            "type": "object",
            "properties": {
                "email": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "profile_id": {
                    "type": "string"
                },
                "role_id": {
                    "type": "string"
                }
            }
        },
        "models.BulkConcurrencyMode": {
            "type": "string",
            "enum": [
                "Parallel",
                "Serial"
            ],
            "x-enum-varnames": [
                "ConcurrencyParallel",
                "ConcurrencySerial"
            ]
        },
        "models.BulkJob": {
            "type": "object",
            "properties": {
                "apexProcessingTime": {
                    "type": "integer"
                },
                "apiActiveProcessingTime": {
                    "type": "integer"
                },
                "concurrencyMode": {
                    "$ref": "#/definitions/models.BulkConcurrencyMode"
                },
                "contentUrl": {
                    "description": "For query jobs, stores SOQL",
                    "type": "string"
                },
                "createdById": {
                    "type": "string"
                },
                "createdDate": {
                    "type": "string"
                },
                "errorMessage": {
                    "type": "string"
                },
                "externalIdFieldName": {
                    "description": "Extended Fields for Upsert and Stats",
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "jobType": {
                    "description": "Query job fields",
                    "type": "string"
                },
                "numberRecordsFailed": {
                    "type": "integer"
                },
                "numberRecordsProcessed": {
                    "type": "integer"
                },
                "object": {
                    "type": "string"
                },
                "operation": {
                    "$ref": "#/definitions/models.BulkOperation"
                },
                "state": {
                    "$ref": "#/definitions/models.BulkJobState"
                },
                "systemModstamp": {
                    "type": "string"
                },
                "totalProcessingTime": {
                    "description": "Stats",
                    "type": "integer"
                }
            }
        },
        "models.BulkJobState": {
            "type": "string",
            "enum": [
                "Open",
                "UploadComplete",
                "InProgress",
                "JobComplete",
                "Failed",
                "Aborted"
            ],
            "x-enum-varnames": [
                "JobStateOpen",
                "JobStateUploadComplete",
                "JobStateInProgress",
                "JobStateJobComplete",
                "JobStateFailed",
                "JobStateAborted"
            ]
        },
        "models.BulkOperation": {
            "type": "string",
            "enum": [
                "insert",
                "update",
                "upsert",
                "delete",
                "query"
            ],
            "x-enum-varnames": [
                "OperationInsert",
                "OperationUpdate",
                "OperationUpsert",
                "OperationDelete",
                "OperationQuery"
            ]
        },
        "models.DeleteRule": {
            "type": "string",
            "enum": [
                "Restrict",
                "Cascade",
                "SetNull"
            ],
            "x-enum-varnames": [
                "DeleteRuleRestrict",
                "DeleteRuleCascade",
                "DeleteRuleSetNull"
            ]
        },
        "models.FieldMetadata": {
            "type": "object",
            "properties": {
                "api_name": {
                    "type": "string"
                },
                "controlling_field": {
                    "type": "string"
                },
                "default_value": {
                    "type": "string"
                },
                "delete_rule": {
                    "$ref": "#/definitions/models.DeleteRule"
                },
                "formula": {
                    "type": "string"
                },
                "help_text": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "is_master_detail": {
                    "type": "boolean"
                },
                "is_name_field": {
                    "type": "boolean"
                },
                "is_polymorphic": {
                    "description": "True if len(ReferenceTo) \u003e 1",
                    "type": "boolean"
                },
                "is_system": {
                    "type": "boolean"
                },
                "is_unique": {
                    "type": "boolean"
                },
                "label": {
                    "type": "string"
                },
                "max_length": {
                    "type": "integer"
                },
                "max_value": {
                    "type": "number"
                },
                "min_length": {
                    "type": "integer"
                },
                "min_value": {
                    "type": "number"
                },
                "options": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "picklist_dependency": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "precision": {
                    "type": "integer"
                },
                "reference_to": {
                    "description": "Supports polymorphic (multiple objects)",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "regex": {
                    "type": "string"
                },
                "regex_message": {
                    "type": "string"
                },
                "relationship_name": {
                    "type": "string"
                },
                "required": {
                    "type": "boolean"
                },
                "return_type": {
                    "$ref": "#/definitions/models.FieldType"
                },
                "rollup_config": {
                    "$ref": "#/definitions/models.RollupConfig"
                },
                "scale": {
                    "type": "integer"
                },
                "track_history": {
                    "type": "boolean"
                },
                "type": {
                    "$ref": "#/definitions/models.FieldType"
                },
                "validator": {
                    "type": "string"
                },
                "validator_config": {
                    "description": "JSON config for the validator",
                    "type": "string"
                }
            }
        },
        "models.FieldType": {
            "type": "string",
            "enum": [
                "string",
                "double",
                "currency",
                "date",
                "datetime",
                "boolean",
                "picklist",
                "email",
                "phone",
                "textarea",
                "url",
                "percent",
                "reference",
                "masterdetail",
                "formula",
                "rollupsummary",
                "richtextarea",
                "autonumber",
                "multipicklist",
                "encryptedstring",
                "password",
                "json"
            ],
            "x-enum-comments": {
                "FieldTypeAutonumber": "Auto-increment",
                "FieldTypeBoolean": "Checkbox",
                "FieldTypeCurrency": "Money field",
                "FieldTypeDate": "Date only",
                "FieldTypeDatetime": "Date + time",
                "FieldTypeDouble": "Numeric field",
                "FieldTypeEmail": "Email address",
                "FieldTypeEncryptedString": "Encrypted text",
                "FieldTypeFormula": "Calculated field",
                "FieldTypeJson": "JSON data (custom extension)",
                "FieldTypeMasterDetail": "Parent-child relationship",
                "FieldTypeMultiPicklist": "Multi-select",
                "FieldTypePassword": "Password field",
                "FieldTypePercent": "Percentage",
                "FieldTypePhone": "Phone number",
                "FieldTypePicklist": "Dropdown",
                "FieldTypeReference": "Lookup relationship",
                "FieldTypeRichtextarea": "Rich text / HTML",
                "FieldTypeRollupSummary": "Aggregate field",
                "FieldTypeString": "Text field",
                "FieldTypeTextarea": "Multi-line text",
                "FieldTypeUrl": "Web URL"
            },
            "x-enum-descriptions": [
                "Text field",
                "Numeric field",
                "Money field",
                "Date only",
                "Date + time",
                "Checkbox",
                "Dropdown",
                "Email address",
                "Phone number",
                "Multi-line text",
                "Web URL",
                "Percentage",
                "Lookup relationship",
                "Parent-child relationship",
                "Calculated field",
                "Aggregate field",
                "Rich text / HTML",
                "Auto-increment",
                "Multi-select",
                "Encrypted text",
                "Password field",
                "JSON data (custom extension)"
            ],
            "x-enum-varnames": [
                "FieldTypeString",
                "FieldTypeDouble",
                "FieldTypeCurrency",
                "FieldTypeDate",
                "FieldTypeDatetime",
                "FieldTypeBoolean",
                "FieldTypePicklist",
                "FieldTypeEmail",
                "FieldTypePhone",
                "FieldTypeTextarea",
                "FieldTypeUrl",
                "FieldTypePercent",
                "FieldTypeReference",
                "FieldTypeMasterDetail",
                "FieldTypeFormula",
                "FieldTypeRollupSummary",
                "FieldTypeRichtextarea",
                "FieldTypeAutonumber",
                "FieldTypeMultiPicklist",
                "FieldTypeEncryptedString",
                "FieldTypePassword",
                "FieldTypeJson"
            ]
        },
        "models.ObjectMetadata": {
            "type": "object",
            "properties": {
                "api_name": {
                    "type": "string"
                },
                "app_id": {
                    "type": "string"
                },
                "default_list_view": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                },
                "enable_hierarchy_sharing": {
                    "type": "boolean"
                },
                "fields": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.FieldMetadata"
                    }
                },
                "icon": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "is_custom": {
                    "type": "boolean"
                },
                "is_system": {
                    "type": "boolean"
                },
                "kanban_group_by": {
                    "type": "string"
                },
                "kanban_summary_field": {
                    "type": "string"
                },
                "label": {
                    "type": "string"
                },
                "list_fields": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "path_field": {
                    "description": "Field to use for Path component (must be Picklist)",
                    "type": "string"
                },
                "plural_label": {
                    "type": "string"
                },
                "searchable": {
                    "type": "boolean"
                },
                "sharing_model": {
                    "$ref": "#/definitions/models.SharingModel"
                },
                "theme_color": {
                    "type": "string"
                }
            }
        },
        "models.QueryResult": {
            "type": "object",
            "properties": {
                "done": {
                    "type": "boolean"
                },
                "nextRecordsUrl": {
                    "type": "string"
                },
                "records": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.SObject"
                    }
                },
                "totalSize": {
                    "type": "integer"
                }
            }
        },
        "models.RollupConfig": {
            "type": "object",
            "properties": {
                "calc_type": {
                    "description": "COUNT, SUM, MIN, MAX, AVG",
                    "type": "string"
                },
                "filter": {
                    "type": "string"
                },
                "relationship_field": {
                    "description": "The lookup field on the child object",
                    "type": "string"
                },
                "summary_field": {
                    "type": "string"
                },
                "summary_object": {
                    "type": "string"
                }
            }
        },
        "models.SObject": {
            "type": "object",
            "additionalProperties": true
        },
        "models.SharingModel": {
            "type": "string",
            "enum": [
                "Private",
                "PublicRead",
                "PublicReadWrite"
            ],
            "x-enum-varnames": [
                "SharingModelPrivate",
                "SharingModelPublicRead",
                "SharingModelPublicReadWrite"
            ]
        },
        "models.ValidationRule": {
            "type": "object",
            "properties": {
                "active": {
                    "type": "boolean"
                },
                "condition": {
                    "type": "string"
                },
                "error_message": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "object_api_name": {
                    "type": "string"
                }
            }
        }
    },
    "securityDefinitions": {
        "BearerAuth": {
            "type": "apiKey",
            "name": "Authorization",
            "in": "header"
        }
    }
}`

// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
	Version:          "3.0.0",
	Host:             "localhost:3001",
	BasePath:         "/api",
	Schemes:          []string{},
	Title:            "NexusCRM API",
	Description:      "Enterprise CRM API with Salesforce Compatibility.",
	InfoInstanceName: "swagger",
	SwaggerTemplate:  docTemplate,
	LeftDelim:        "{{",
	RightDelim:       "}}",
}

func init() {
	swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}
