main
alex 2024-03-16 17:22:22 +01:00
parent 1e6b42579e
commit 5d3cfa7c4d
3 changed files with 198 additions and 1 deletions

BIN
main

Binary file not shown.

View File

@ -294,6 +294,150 @@
} }
} }
}, },
"/crm/link/{id}": {
"post": {
"produces": [
"application/json"
],
"tags": [
"crm"
],
"summary": "Use crm link",
"operationId": "crmUseLink",
"parameters": [
{
"description": "Link id",
"name": "id",
"in": "path"
}
],
"responses": {
"200": {
"description": "Crm link used"
},
"400": {
"description": "Invalid request query"
},
"401": {
"description": "No permissions"
},
"404": {
"description": "Crm link not found"
},
"500": {
"description": "Failed to use crm link"
}
}
}
},
"/crm/links/create": {
"post": {
"produces": [
"application/json"
],
"tags": [
"crm"
],
"summary": "Create crm link",
"operationId": "crmCreateCrmLink",
"parameters": [
{
"description": "Crm link",
"name": "crmLink",
"in": "body",
"schema": {
"$ref": "#/definitions/CrmLink"
}
}
],
"responses": {
"200": {
"description": "Crm link created"
},
"400": {
"description": "Invalid request query"
},
"401": {
"description": "No permissions"
},
"500": {
"description": "Failed to create crm link"
}
}
}
},
"/crm/links/{customerId}": {
"get": {
"produces": [
"application/json"
],
"tags": [
"crm"
],
"summary": "Get crm links",
"operationId": "crmGetCrmLinks",
"parameters": [
{
"description": "Customer id",
"name": "customerId",
"in": "path"
}
],
"responses": {
"200": {
"description": "Crm links",
"schema": {
"$ref": "#/definitions/CrmLink"
}
},
"400": {
"description": "Invalid request query"
},
"401": {
"description": "No permissions"
},
"500": {
"description": "Failed to get crm links"
}
}
}
},
"/crm/links/{id}": {
"delete": {
"produces": [
"application/json"
],
"tags": [
"crm"
],
"summary": "Delete crm link",
"operationId": "crmDeleteCrmLink",
"parameters": [
{
"description": "Link id",
"name": "id",
"in": "path"
}
],
"responses": {
"200": {
"description": "Crm link deleted"
},
"400": {
"description": "Invalid request query"
},
"401": {
"description": "No permissions"
},
"404": {
"description": "Crm link not found"
},
"500": {
"description": "Failed to delete crm link"
}
}
}
},
"/crm/pipeline/{type}/{dealPhase}": { "/crm/pipeline/{type}/{dealPhase}": {
"get": { "get": {
"produces": [ "produces": [
@ -1411,6 +1555,59 @@
}, },
"Customer": { "Customer": {
"$ref": "#/definitions/CrmCustomer" "$ref": "#/definitions/CrmCustomer"
},
"LinkHistory": {
"type": "array",
"items": {
"$ref": "#/definitions/CrmLinkHistory"
}
},
"Links": {
"type": "array",
"items": {
"$ref": "#/definitions/CrmLink"
}
}
},
"x-go-package": "jannex/admin-dashboard-backend/modules/structs"
},
"CrmLink": {
"type": "object",
"properties": {
"CreatedAt": {
"type": "string",
"format": "date-time"
},
"CreatedBy": {
"type": "string"
},
"CustomerId": {
"type": "string"
},
"Id": {
"type": "string"
},
"Name": {
"type": "string"
},
"Url": {
"type": "string"
}
},
"x-go-package": "jannex/admin-dashboard-backend/modules/structs"
},
"CrmLinkHistory": {
"type": "object",
"properties": {
"LinkId": {
"type": "string"
},
"UsedAt": {
"type": "string",
"format": "date-time"
},
"UserAgent": {
"type": "string"
} }
}, },
"x-go-package": "jannex/admin-dashboard-backend/modules/structs" "x-go-package": "jannex/admin-dashboard-backend/modules/structs"

View File

@ -566,7 +566,7 @@ func DeleteCrmCallProtocol(c *fiber.Ctx) error {
} }
func CreateCrmLink(c *fiber.Ctx) error { func CreateCrmLink(c *fiber.Ctx) error {
// swagger:operation POST /crm/links/create crm crmCreateCrmLink // swagger:operation POST /crm/links crm crmCreateCrmLink
// --- // ---
// summary: Create crm link // summary: Create crm link
// produces: // produces: