diff --git a/backend/src/mongodb/thread.go b/backend/src/mongodb/thread.go index 7193c19e..da7bce3a 100644 --- a/backend/src/mongodb/thread.go +++ b/backend/src/mongodb/thread.go @@ -29,8 +29,8 @@ type CreateThreadData struct { } type UpdateThreadData struct { - Meeting primitive.ObjectID `json:"meeting"` - Kind models.ThreadKind `json:"kind"` + Meeting *primitive.ObjectID `json:"meeting"` + Kind models.ThreadKind `json:"kind"` } func (utd *UpdateThreadData) ParseBody(body io.Reader) error { @@ -39,9 +39,10 @@ func (utd *UpdateThreadData) ParseBody(body io.Reader) error { return err } - if len(utd.Meeting) == 0 { - return errors.New("invalid meeting") - } + // Putting meeting optional for now + // if len(utd.Meeting) == 0 { + // return errors.New("invalid meeting") + // } if len(utd.Kind) == 0 { return errors.New("invalid kind") @@ -171,15 +172,23 @@ func (t *ThreadsType) UpdateThread(threadID primitive.ObjectID, data UpdateThrea return nil, errors.New("Thread kind not valid") } - if _, err := Meetings.GetMeeting(data.Meeting); err != nil { - return nil, err - } - - var updateQuery = bson.M{ - "$set": bson.M{ - "meeting": data.Meeting, - "kind": data.Kind, - }, + var updateQuery primitive.M + if data.Meeting != nil { + if _, err := Meetings.GetMeeting(*data.Meeting); err != nil { + return nil, err + } + updateQuery = bson.M{ + "$set": bson.M{ + "meeting": data.Meeting, + "kind": data.Kind, + }, + } + } else { + updateQuery = bson.M{ + "$set": bson.M{ + "kind": data.Kind, + }, + } } var optionsQuery = options.FindOneAndUpdate() diff --git a/backend/src/router/thread.go b/backend/src/router/thread.go index b1dfbe4f..15d289da 100644 --- a/backend/src/router/thread.go +++ b/backend/src/router/thread.go @@ -229,7 +229,7 @@ func deleteThread(w http.ResponseWriter, r *http.Request) { http.Error(w, "Thread not found", http.StatusNotFound) return } - + for _, commentID := range t.Comments { _, err = mongodb.Posts.DeletePost(commentID) if err != nil { diff --git a/backend/static/swagger.json b/backend/static/swagger.json index 4d58e4ba..3a0106f7 100644 --- a/backend/static/swagger.json +++ b/backend/static/swagger.json @@ -1 +1 @@ -{"schemes":["http"],"swagger":"2.0","info":{"description":"SINFO's internal management application\n","title":"Swagger Deck2","termsOfService":"http://swagger.io/terms/","contact":{"email":"devteam@sinfo.org"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"},"version":"1.0.0"},"host":"localhost:8080","basePath":"/","paths":{"/auth/callback":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["auth"],"summary":"Authentication callback endpoint","operationId":"authCallback","responses":{"317":{"description":"Redirects to deck2 website with authentication code"},"401":{"description":"Unauthorized (reason in the body of the response)"}}}},"/auth/login":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["auth"],"summary":"Authenticates member","operationId":"authLogin","parameters":[{"type":"string","description":"URl to be redirected after the successful login\n\n\u003cb\u003eExample:\u003c/b\u003e \n \u003ccode\u003eGET /auth/login?redirect=example.com/some/path\u003c/code\u003e \n On a successful login, you'll be redirected to \u003ccode\u003eexample.com/some/path/{generated_authentication_token}\u003c/code\u003e","name":"redirect","in":"query"}],"responses":{"317":{"description":"Redirects to authentication server"}}}},"/auth/verify/{token}":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["auth"],"summary":"Authentication verification endpoint","operationId":"verifyToken","parameters":[{"type":"string","description":"JWT token sent to be verified","name":"token","in":"path","required":true}],"responses":{"200":{"description":"Token is valid"},"401":{"description":"Token in invalid, therefore unauthorized"}}}},"/billings":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["billings"],"summary":"Get all billings. If role is lower than coordinator, only visible billings will be returned","operationId":"getBillings","parameters":[{"type":"string","format":"date-time","description":"Billings emited after date","name":"after","in":"query"},{"type":"string","format":"date-time","description":"Billings emited before date","name":"before","in":"query"},{"type":"string","description":"Billings with value greater than this value","name":"valueGreaterThan","in":"query"},{"type":"string","description":"Billings with value lower than this value","name":"valueLessThan","in":"query"},{"type":"string","description":"Billings from this event","name":"event","in":"query"},{"type":"string","description":"Billings from this company","name":"company","in":"query"}],"responses":{"200":{"description":"Billings filtered by the query","schema":{"type":"array","items":{"$ref":"#/definitions/billing"}}},"401":{"description":"Unauthorized"},"417":{"description":"Unable to get billings"}}},"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["billings"],"summary":"Creates a new billing","operationId":"createBilling","parameters":[{"description":"Information needed to create the new company.","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["status","event","value","invoiceNumber","emission","notes"],"properties":{"emission":{"type":"string","format":"date-time"},"event":{"type":"integer"},"invoiceNumber":{"type":"string"},"notes":{"type":"string"},"status":{"type":"object","required":["proForma","paid","receipt","invoice"],"properties":{"invoice":{"type":"boolean"},"paid":{"type":"boolean"},"proForma":{"type":"boolean"},"receipt":{"type":"boolean"}}},"value":{"type":"integer"}}}}],"responses":{"200":{"description":"Created billing","schema":{"$ref":"#/definitions/billing"}},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Couldn't find created billing"}}}},"/billings/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["billings"],"summary":"Gets a billing","operationId":"getBilling","parameters":[{"type":"string","description":"ID of billing","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Specified Billing","schema":{"$ref":"#/definitions/billing"}},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Billing not found"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["billings"],"summary":"Updates a billing","operationId":"updateBilling","parameters":[{"type":"string","description":"ID of billing","name":"id","in":"path","required":true},{"description":"Information needed to create the new company.","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["status","event","value","invoiceNumber","emission","notes"],"properties":{"emission":{"type":"string","format":"date-time"},"event":{"type":"integer"},"invoiceNumber":{"type":"string"},"notes":{"type":"string"},"status":{"type":"object","required":["proForma","paid","receipt","invoice"],"properties":{"invoice":{"type":"boolean"},"paid":{"type":"boolean"},"proForma":{"type":"boolean"},"receipt":{"type":"boolean"}}},"value":{"type":"integer"}}}}],"responses":{"200":{"description":"Updated billing","schema":{"$ref":"#/definitions/billing"}},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Couldn't find specified billing"}}}},"/companies":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies"],"summary":"Get all companies","operationId":"getCompanies","parameters":[{"type":"string","description":"Name of the company","name":"name","in":"query"},{"type":"integer","description":"Has a participation entry for this event","name":"event","in":"query"},{"type":"string","description":"Was contacted by this member","name":"member","in":"query"},{"type":"boolean","description":"Participated as a partner","name":"partner","in":"query"}],"responses":{"200":{"description":"Companies filtered by the query","schema":{"type":"array","items":{"$ref":"#/definitions/company"}}},"401":{"description":"Unauthorized"},"417":{"description":"Unable to get companies"}}},"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies"],"summary":"Create a new company","operationId":"createCompany","parameters":[{"description":"Information needed to create the new company.","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["name","description","site"],"properties":{"description":{"type":"string"},"name":{"type":"string"},"site":{"type":"string"}}}}],"responses":{"200":{"description":"Created company.","schema":{"$ref":"#/definitions/company"}},"400":{"description":"Invalid input or couldn't create the new company"},"401":{"description":"Unauthorized"}}}},"/companies/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies"],"summary":"Get company by ID","operationId":"getCompany","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Company with the specific ID","schema":{"$ref":"#/definitions/company"}},"401":{"description":"Unauthorized"},"404":{"description":"Company not found"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies"],"summary":"Update company by ID","operationId":"updateCompany","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true},{"description":"Information needed to update the company.","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["name","description","site"],"properties":{"billingInfo":{"type":"object","properties":{"address":{"type":"string"},"name":{"type":"string"},"tin":{"type":"string"}}},"description":{"type":"string"},"name":{"type":"string"},"site":{"type":"string"}}}}],"responses":{"200":{"description":"Updated company","schema":{"$ref":"#/definitions/company"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"404":{"description":"Company not found"},"417":{"description":"Unable to update company"}}},"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies"],"summary":"Delete company by ID (must have admin credentials)","operationId":"deleteCompany","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Updated company","schema":{"$ref":"#/definitions/company"}},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Unable to delete company"}}}},"/companies/{id}/employer":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies","companyReps","contacts"],"summary":"Creates a new companyRep and adds it to a company","operationId":"addEmployer","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true},{"description":"Information needed to create the new companyRep.","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["name"],"properties":{"contact":{"type":"object","required":["phones","socials","mails"],"properties":{"mails":{"type":"array","items":{"type":"object","required":["mail","valid","personal"],"properties":{"personal":{"type":"boolean"},"phone":{"type":"string"},"valid":{"type":"boolean"}}}},"phones":{"type":"array","items":{"type":"object","required":["phone","valid"],"properties":{"phone":{"type":"string"},"valid":{"type":"boolean"}}}},"socials":{"type":"object","required":["facebook","skype","github","twitter","linkedin"],"properties":{"facebook":{"type":"string"},"github":{"type":"string"},"linkedin":{"type":"string"},"skype":{"type":"string"},"twitter":{"type":"string"}}}}},"name":{"type":"string"}}}}],"responses":{"200":{"description":"Updated company","schema":{"$ref":"#/definitions/company"}},"401":{"description":"Unauthorized"},"404":{"description":"Couldn't find company or created company rep or created contact"}}}},"/companies/{id}/employer/{rep}":{"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies","companyReps"],"summary":"Deletes a companyRep and removes it from company ","operationId":"removeEmployer","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true},{"type":"string","description":"ID of the companyRep","name":"rep","in":"path","required":true}],"responses":{"200":{"description":"Updated company","schema":{"$ref":"#/definitions/company"}},"401":{"description":"Unauthorized"},"404":{"description":"Couldn't find company or company rep"}}}},"/companies/{id}/image/internal":{"post":{"security":[{"Bearer":[]}],"consumes":["multipart/form-data"],"produces":["application/json"],"tags":["companies"],"summary":"Update company's internal image by ID","operationId":"updateCompanyInternalImage","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true},{"type":"file","description":"Logo of company","name":"image","in":"formData"}],"responses":{"200":{"description":"Company with the updated data","schema":{"$ref":"#/definitions/company"}},"400":{"description":"Invalid image data"},"401":{"description":"Unauthorized"},"404":{"description":"Company not found"},"417":{"description":"Unable to perform operation"}}}},"/companies/{id}/image/public":{"post":{"security":[{"Bearer":[]}],"consumes":["multipart/form-data"],"produces":["application/json"],"tags":["companies"],"summary":"Update company's public image by ID (must have coordination credentials)","operationId":"updateCompanyPublicImage","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true},{"type":"file","description":"Logo of company","name":"image","in":"formData"}],"responses":{"200":{"description":"Company with the updated data","schema":{"$ref":"#/definitions/company"}},"400":{"description":"Invalid image data"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Company not found"},"417":{"description":"Unable to perform operation"}}}},"/companies/{id}/participation":{"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies"],"summary":"Updates participation data on the current event to a company","operationId":"updateCompanyParticipation","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true},{"description":"New participation information","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["member","partner","confirmed","notes"],"properties":{"confirmed":{"type":"string","format":"date-time"},"member":{"type":"string"},"notes":{"type":"string"},"partner":{"type":"boolean"}}}}],"responses":{"200":{"description":"Updated company","schema":{"$ref":"#/definitions/company"}},"400":{"description":"Unable to add participation for the current event to this company"},"401":{"description":"Unauthorized"},"404":{"description":"Company not found"}}},"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies"],"summary":"Adds participation on the current event to a company","operationId":"addCompanyParticipation","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true},{"description":"New participation information","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["partner"],"properties":{"partner":{"type":"boolean"}}}}],"responses":{"200":{"description":"Updated company","schema":{"$ref":"#/definitions/company"}},"401":{"description":"Unauthorized"},"404":{"description":"Company not found"}}}},"/companies/{id}/participation/package":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies","packages"],"summary":"Adds a package on the current event to a company (must have at least coordination credentails)","operationId":"addCompanyPackage","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true},{"description":"New participation information","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["name","items","price","vat"],"properties":{"items":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string"},"public":{"type":"boolean"},"quantity":{"type":"integer"}}}},"name":{"type":"string"},"price":{"type":"integer"},"vat":{"type":"integer"}}}}],"responses":{"200":{"description":"Updated company","schema":{"$ref":"#/definitions/company"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Company not found"},"417":{"description":"Couldn't add package to company"}}}},"/companies/{id}/participation/status/next":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies"],"summary":"Gets all the valid steps to be taken on a company's participation status on the current event","operationId":"getvalidCompanyParticipationStatusSteps","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Valid steps","schema":{"type":"object","properties":{"steps":{"type":"array","items":{"type":"object","properties":{"next":{"type":"string","enum":["SUGGESTED","SELECTED","ON_HOLD","CONTACTED","IN_CONVERSATIONS","ACCEPTED","REJECTED","GIVEN_UP","ANNOUNCED"]},"step":{"type":"integer"}}}}}}},"400":{"description":"Company without participation on the current event"},"401":{"description":"Unauthorized"},"404":{"description":"Company not found"}}}},"/companies/{id}/participation/status/{status}":{"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies"],"summary":"Updated a company's participation status on the current event (admin credentials)","operationId":"updateCompanyParticipationStatus","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true},{"enum":["SUGGESTED","SELECTED","ON_HOLD","CONTACTED","IN_CONVERSATIONS","ACCEPTED","REJECTED","GIVEN_UP","ANNOUNCED"],"type":"string","description":"New status","name":"status","in":"path","required":true}],"responses":{"200":{"description":"Updated company","schema":{"$ref":"#/definitions/company"}},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Company not found"},"417":{"description":"Unable to update company's participation status"}}}},"/companies/{id}/participation/status/{step}":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies"],"summary":"Step a company's participation status on the current event","operationId":"stepCompanyParticipationStatus","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true},{"type":"integer","description":"Step to the next status","name":"step","in":"path","required":true}],"responses":{"200":{"description":"Updated company","schema":{"$ref":"#/definitions/company"}},"401":{"description":"Unauthorized"},"404":{"description":"Company not found"},"417":{"description":"Unable to update company's participation status"}}}},"/companies/{id}/participation/thread/{threadID}":{"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies","threads"],"summary":"Deletes thread from a company participation","operationId":"deleteCompanyThread","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true},{"type":"string","description":"ID of the thread","name":"threadID","in":"path","required":true}],"responses":{"200":{"description":"Updated company","schema":{"$ref":"#/definitions/company"}},"400":{"description":"Invalid payload, or invalid credentials"},"401":{"description":"Unauthorized"},"404":{"description":"Meeting not found"}}}},"/companies/{id}/subscribe":{"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies"],"summary":"Subscribe to company by ID","operationId":"subscribeToCompany","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Updated company","schema":{"$ref":"#/definitions/company"}},"401":{"description":"Unauthorized"},"404":{"description":"Company not found"},"417":{"description":"Unable to subscribe to company"}}}},"/companies/{id}/thread":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies","threads"],"summary":"Adds thread on the current event to a company","operationId":"addCompanyThread","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true},{"description":"New thread information","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["text","kind"],"properties":{"kind":{"type":"string","enum":["TEMPLATE","TO","FROM","MEETING","PHONE_CALL"]},"meeting":{"type":"object","properties":{"begin":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"participants":{"type":"object","properties":{"companyReps":{"type":"array","items":{"type":"string"}},"members":{"type":"array","items":{"type":"string"}}}},"place":{"type":"string"}}},"text":{"type":"string"}}}}],"responses":{"200":{"description":"Updated company","schema":{"$ref":"#/definitions/company"}},"400":{"description":"Invalid payload, or invalid credentials"},"401":{"description":"Unauthorized"},"404":{"description":"Company not found"},"417":{"description":"Unable to create post, create thread or add created thread to company participation"}}}},"/companies/{id}/unsubscribe":{"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies"],"summary":"Unsubscribe to company by ID","operationId":"unsubscribeToCompany","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Updated company","schema":{"$ref":"#/definitions/company"}},"401":{"description":"Unauthorized"},"404":{"description":"Company not found"},"417":{"description":"Unable to unsubscribe from company"}}}},"/companyReps":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companyReps"],"summary":"Get all companyReps, based on query","operationId":"getCompanyReps","parameters":[{"type":"string","description":"Name of the companyRep","name":"name","in":"query"}],"responses":{"200":{"description":"CompanyReps filtered by the query","schema":{"type":"array","items":{"$ref":"#/definitions/companyRep"}}},"401":{"description":"Unauthorized"},"417":{"description":"Unable to get companyReps"}}}},"/companyReps/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companyReps"],"summary":"Gets a companyRep","operationId":"getCompanyRep","parameters":[{"type":"string","description":"ID of the companyRep","name":"id","in":"path","required":true}],"responses":{"200":{"description":"CompanyRep with specified ID","schema":{"$ref":"#/definitions/companyRep"}},"401":{"description":"Unauthorized"},"404":{"description":"CompanyRep not found"},"417":{"description":"Unable to get companyRep"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companyReps"],"summary":"Updates a companyRep","operationId":"updateCompanyRep","parameters":[{"type":"string","description":"ID of the companyrep","name":"id","in":"path","required":true},{"description":"Information needed to create the new companyRep.","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["name"],"properties":{"contact":{"type":"object","required":["phones","socials","mails"],"properties":{"mails":{"type":"array","items":{"type":"object","required":["mail","valid","personal"],"properties":{"personal":{"type":"boolean"},"phone":{"type":"string"},"valid":{"type":"boolean"}}}},"phones":{"type":"array","items":{"type":"object","required":["phone","valid"],"properties":{"phone":{"type":"string"},"valid":{"type":"boolean"}}}},"socials":{"type":"object","required":["facebook","skype","github","twitter","linkedin"],"properties":{"facebook":{"type":"string"},"github":{"type":"string"},"linkedin":{"type":"string"},"skype":{"type":"string"},"twitter":{"type":"string"}}}}},"name":{"type":"string"}}}}],"responses":{"200":{"description":"Updated companyRep ","schema":{"$ref":"#/definitions/companyRep"}},"401":{"description":"Unauthorized"},"404":{"description":"CompanyRep not found"},"417":{"description":"Unable to get companies"}}}},"/contacts":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["contacts"],"summary":"Get all contacts","operationId":"getContacts","parameters":[{"type":"string","description":"Partial and case insensitive match for phone","name":"phone","in":"query"},{"type":"string","description":"Partial and case insensitive match for mail","name":"mail","in":"query"}],"responses":{"200":{"description":"Contacts filtered by the query","schema":{"type":"array","items":{"$ref":"#/definitions/contact"}}},"401":{"description":"Unauthorized"},"417":{"description":"Unable to get contacts"}}}},"/contacts/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["contacts"],"summary":"Get contact by ID","operationId":"getContact","parameters":[{"type":"string","description":"ID of the contact","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Contact with the specific ID","schema":{"$ref":"#/definitions/contact"}},"401":{"description":"Unauthorized"},"404":{"description":"contact not found"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["contacts"],"summary":"Updates a contact","operationId":"updateContact","parameters":[{"type":"string","description":"ID of the member","name":"id","in":"path","required":true},{"description":"New contact data","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["phones","socials","mails"],"properties":{"mails":{"type":"array","items":{"type":"object","required":["mail","valid","personal"],"properties":{"personal":{"type":"boolean"},"phone":{"type":"string"},"valid":{"type":"boolean"}}}},"phones":{"type":"array","items":{"type":"object","required":["phone","valid"],"properties":{"phone":{"type":"string"},"valid":{"type":"boolean"}}}},"socials":{"type":"object","required":["facebook","skype","github","twitter","linkedin"],"properties":{"facebook":{"type":"string"},"github":{"type":"string"},"linkedin":{"type":"string"},"skype":{"type":"string"},"twitter":{"type":"string"}}}}}}],"responses":{"200":{"description":"Updated contact.","schema":{"$ref":"#/definitions/contact"}},"400":{"description":"Invalid input or couldn't updated the contact."},"401":{"description":"Unauthorized"}}}},"/events":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["events"],"summary":"Get all events","operationId":"getEvents","parameters":[{"type":"string","description":"Name of the event","name":"name","in":"query"},{"type":"string","format":"date-time","description":"Event happened before this date","name":"before","in":"query"},{"type":"string","format":"date-time","description":"Event happened after this date","name":"after","in":"query"},{"type":"string","format":"date-time","description":"Event happened during this date","name":"during","in":"query"}],"responses":{"200":{"description":"Events filtered by the query","schema":{"type":"array","items":{"$ref":"#/definitions/event"}}},"400":{"description":"Invalid date format on query"},"401":{"description":"Unauthorized"},"417":{"description":"Unable to get events"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["events"],"summary":"Update the current event (must have coordinator credentials)","operationId":"updateEvent","parameters":[{"description":"New event data","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["name"],"properties":{"begin":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"name":{"type":"string"}}}}],"responses":{"200":{"description":"Updated event","schema":{"$ref":"#/definitions/event"}},"400":{"description":"Invalid payload, or couldn't update event"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"417":{"description":"Unable to update event"}}},"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["events"],"summary":"Create a new event (must have admin credentials)","operationId":"createEvent","parameters":[{"description":"Information needed to create the new event.","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}}}],"responses":{"200":{"description":"Created event. The new ID will be an increment to the current event","schema":{"$ref":"#/definitions/event"}},"400":{"description":"Invalid input or couldn't create the new event"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"}}}},"/events/items":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["events","items"],"summary":"Adds an item to the current event (must have coordinator credentials)","operationId":"addEventItem","parameters":[{"description":"Item to store on the current event","name":"item","in":"body","required":true,"schema":{"type":"object","required":["id"],"properties":{"item":{"type":"string"}}}}],"responses":{"200":{"description":"Updated event","schema":{"$ref":"#/definitions/event"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Event not found, or item not found"},"417":{"description":"Unable to add item"}}}},"/events/items/{id}":{"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["events","items"],"summary":"Removes item from the current event's packages (must have coordinator credentials)","operationId":"removeEventItem","parameters":[{"type":"string","description":"ID of the item","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Event with the removed item","schema":{"$ref":"#/definitions/event"}},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Event not found"},"417":{"description":"Unable to remove item from event"}}}},"/events/meetings":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["events","meetings"],"summary":"Creates and adds a new meeting to the current event (must have coordinator credentials)","operationId":"addEventMeeting","parameters":[{"description":"Meeting to store on the current event","name":"meeting","in":"body","required":true,"schema":{"type":"object","required":["title","kind","begin","end","place"],"properties":{"begin":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["EVENT","TEAM","COMPANY"]},"place":{"type":"string"},"title":{"type":"string"}}}}],"responses":{"200":{"description":"Updated event","schema":{"$ref":"#/definitions/event"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Event not found"},"417":{"description":"Unable to create or add meeting"}}}},"/events/meetings/{id}":{"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["events","meetings"],"summary":"Removes and deletes a meeting from the current event (must have coordinator credentials)","operationId":"removeMeetingFromEvent","parameters":[{"type":"string","description":"ID of the meeting","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Updated event","schema":{"$ref":"#/definitions/event"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Event not found or meeting not found"},"417":{"description":"Unable to remove or delete meeting"}}}},"/events/packages":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["events","packages"],"summary":"Add template to packages of the current event and make it available (must have coordinator credentials)","operationId":"addEventPackage","parameters":[{"description":"Package (template) to store on the current event","name":"template","in":"body","required":true,"schema":{"type":"object","required":["template","public_name"],"properties":{"public_name":{"type":"string"},"template":{"type":"string"}}}}],"responses":{"200":{"description":"Event with the updated packages","schema":{"$ref":"#/definitions/event"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Event not found, or package not found"},"417":{"description":"Unable to save package on event"}}}},"/events/packages/{id}":{"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["events","packages"],"summary":"Modifies template to packages on the current event (must have coordinator credentials)","operationId":"updateEventPackage","parameters":[{"type":"string","description":"ID of the package","name":"id","in":"path","required":true},{"description":"Updated template data","name":"template","in":"body","schema":{"type":"object","required":["template","public_name"],"properties":{"available":{"type":"boolean"},"public_name":{"type":"string"}}}}],"responses":{"200":{"description":"Event with the updated packages","schema":{"$ref":"#/definitions/event"}},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Event not found or template not found"},"417":{"description":"Unable to update template on event"}}},"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["events","packages"],"summary":"Removes template to packages from the current event (must have coordinator credentials)","operationId":"removeEventPackage","parameters":[{"type":"string","description":"ID of the package","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Event with the updated packages","schema":{"$ref":"#/definitions/event"}},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Event not found"},"417":{"description":"Unable to remove package from event"}}}},"/events/sessions":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["events","sessions"],"summary":"Creates and adds a new session to the current event (must have coordinator credentials)","operationId":"addEventSession","parameters":[{"description":"Session to store on the current event\n - kind: TALK, PRESENTATION or WORKSHOP\n - if kind=TALK, then speaker must be specified\n - if kind=PRESENTATION or kind=WORKSHOP, then company must be specified\n - dinamizers is optional\n - space is optional","name":"session","in":"body","required":true,"schema":{"type":"object","required":["begin","end","title","description","kind"],"properties":{"begin":{"type":"string","format":"date-time"},"company":{"type":"string"},"description":{"type":"string"},"dinamizers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"position":{"type":"string"}}}},"end":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["TALK","PRESENTATION","WORKSHOP"]},"place":{"type":"string"},"speaker":{"type":"string"},"title":{"type":"string"}}}}],"responses":{"200":{"description":"Updated event","schema":{"$ref":"#/definitions/event"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Event not found"},"417":{"description":"Unable to create or add session"}}}},"/events/teams/{id}":{"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["events","teams"],"summary":"Removes (but does not delete) a team from the current event (must have admin credentials)","operationId":"removeTeamFromEvent","parameters":[{"type":"string","description":"ID of the team","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Updated event","schema":{"$ref":"#/definitions/event"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Event not found or team not found"},"417":{"description":"Unable to remove team"}}}},"/events/themes":{"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["events"],"summary":"Update the current event's themes (must have coordinator credentials)","operationId":"updateEventThemes","parameters":[{"description":"Themes for the event. Must have the same number of elements as there are days in the duration of the event, or be empty","name":"themes","in":"body","required":true,"schema":{"type":"object","required":["themes"],"properties":{"themes":{"type":"array","items":{"type":"string"}}}}}],"responses":{"200":{"description":"Event with the updated themes","schema":{"$ref":"#/definitions/event"}},"400":{"description":"Invalid payload (be it format, or number of elements in the array)"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Event not found"},"417":{"description":"Unable to update event's themes"}}}},"/events/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["events"],"summary":"Get event by ID","operationId":"getEvent","parameters":[{"type":"integer","description":"ID of the event","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Event with the specific ID","schema":{"$ref":"#/definitions/event"}},"401":{"description":"Unauthorized"},"404":{"description":"Event not found"}}},"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["events"],"summary":"Deletes an event (must have admin credentials)","operationId":"deleteEvent","parameters":[{"type":"integer","description":"ID of the event","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Deleted event","schema":{"$ref":"#/definitions/event"}},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Event not found"}}}},"/flightInfo/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["flightInfo"],"summary":"Get flight info by ID","operationId":"getFlightInfo","parameters":[{"type":"string","description":"ID of the flight info","name":"id","in":"path","required":true}],"responses":{"200":{"description":"FlightInfo with the specific ID","schema":{"$ref":"#/definitions/flightInfo"}},"401":{"description":"Unauthorized"},"404":{"description":"FlightInfo not found"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["flightInfo"],"summary":"Update flight info by ID","operationId":"updateFlightInfo","parameters":[{"type":"string","description":"ID of the flight info","name":"id","in":"path","required":true},{"description":"Information needed to create a flight info.\n - Inbound/outbound: airports\n - Link: URL to the flight company's flight\n - Cost: in cents (€)","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["inbound","outbound","from","to","bought","cost","notes"],"properties":{"bought":{"type":"boolean"},"cost":{"description":"In cents (€)","type":"integer"},"from":{"description":"Airport","type":"string"},"inbound":{"type":"string","format":"date-time"},"link":{"description":"URL to the flight","type":"string"},"notes":{"type":"string"},"outbound":{"type":"string","format":"date-time"},"to":{"description":"Airport","type":"string"}}}}],"responses":{"200":{"description":"FlightInfo with the specific ID","schema":{"$ref":"#/definitions/flightInfo"}},"400":{"description":"Bad payload"},"401":{"description":"Unauthorized"},"404":{"description":"FlightInfo not found"},"417":{"description":"Unable to update FlightInfo"}}}},"/items":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["items"],"summary":"Get all items","operationId":"getItems","parameters":[{"type":"string","description":"Name of the item","name":"name","in":"query"},{"type":"string","description":"Type of the item","name":"type","in":"query"}],"responses":{"200":{"description":"Items filtered by the query","schema":{"type":"array","items":{"$ref":"#/definitions/item"}}},"401":{"description":"Unauthorized"},"417":{"description":"Unable to get items"}}},"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["items"],"summary":"Creates a new item (must have coordinator credentials)","operationId":"createItem","parameters":[{"description":"New item data","name":"item","in":"body","required":true,"schema":{"type":"object","required":["name","type","description","price","vat"],"properties":{"description":{"type":"string"},"name":{"type":"string"},"price":{"type":"integer"},"type":{"type":"string"},"vat":{"type":"integer"}}}}],"responses":{"200":{"description":"Created item","schema":{"$ref":"#/definitions/item"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"417":{"description":"Unable to create the item"}}}},"/items/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["items"],"summary":"Get item by ID","operationId":"getItem","parameters":[{"type":"string","description":"ID of the item","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Item with the specific ID","schema":{"$ref":"#/definitions/item"}},"401":{"description":"Unauthorized"},"404":{"description":"Item not found"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["items"],"summary":"Updates an item (must have coordinator credentials)","operationId":"updateItem","parameters":[{"description":"Information needed to update the item.","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["name","type","description","price","vat"],"properties":{"description":{"type":"string"},"name":{"type":"string"},"price":{"type":"integer"},"type":{"type":"string"},"vat":{"type":"integer"}}}},{"type":"string","description":"ID of the item","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Updated item.","schema":{"$ref":"#/definitions/item"}},"400":{"description":"Invalid input or couldn't updated the item."},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Item not found"}}}},"/items/{id}/image":{"post":{"security":[{"Bearer":[]}],"consumes":["multipart/form-data"],"produces":["application/json"],"tags":["items"],"summary":"Update item image by ID","operationId":"uploadItemImage","parameters":[{"type":"string","description":"ID of the item","name":"id","in":"path","required":true},{"type":"file","description":"Photo of item","name":"image","in":"formData"}],"responses":{"200":{"description":"Item with the updated data","schema":{"$ref":"#/definitions/item"}},"400":{"description":"Invalid image data"},"401":{"description":"Unauthorized"},"404":{"description":"Item not found"},"417":{"description":"Unable to perform operation"}}}},"/me":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["me"],"summary":"Get my information","operationId":"getMe","responses":{"200":{"description":"My information","schema":{"$ref":"#/definitions/member"}},"401":{"description":"Unauthorized"},"404":{"description":"Information not found"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["me"],"summary":"Updates my information","operationId":"updateMe","parameters":[{"description":"Information needed to update my information.","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["name","istid"],"properties":{"istid":{"type":"string"},"name":{"type":"string"}}}}],"responses":{"200":{"description":"Updated information","schema":{"$ref":"#/definitions/member"}},"400":{"description":"Invalid input or couldn't updated my information."},"401":{"description":"Unauthorized"}}}},"/me/image":{"post":{"security":[{"Bearer":[]}],"consumes":["multipart/form-data"],"produces":["application/json"],"tags":["me"],"summary":"Update member's image","operationId":"updateMyImage","parameters":[{"type":"file","description":"Photo of the member","name":"image","in":"formData"}],"responses":{"200":{"description":"Member with the updated data","schema":{"$ref":"#/definitions/member"}},"400":{"description":"Invalid image data"},"401":{"description":"Unauthorized"},"404":{"description":"Member not found"},"417":{"description":"Unable to perform operation"}}}},"/me/notification/{id}":{"delete":{"security":[{"Bearer":[]}],"consumes":["multipart/form-data"],"produces":["application/json"],"tags":["me","notifications"],"summary":"Delete my notification","operationId":"deleteMyNotifications","parameters":[{"type":"string","description":"ID of the notification","name":"id","in":"path","required":true}],"responses":{"200":{"description":"My deleted notification","schema":{"$ref":"#/definitions/notification"}},"401":{"description":"Unauthorized"},"404":{"description":"Member not found, or notification not found"},"417":{"description":"Unable to delete notification"}}}},"/me/notifications":{"get":{"security":[{"Bearer":[]}],"consumes":["multipart/form-data"],"produces":["application/json"],"tags":["me","notifications"],"summary":"Get member's notifications","operationId":"getMyNotifications","responses":{"200":{"description":"My notifications","schema":{"type":"array","items":{"$ref":"#/definitions/notification"}}},"401":{"description":"Unauthorized"},"404":{"description":"Member not found"},"417":{"description":"Unable to get notifications"}}}},"/meetings":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["meetings"],"summary":"Gets all meetings","operationId":"getMeetings","parameters":[{"type":"integer","format":"int64","description":"Meeting from this event","name":"event","in":"query"},{"type":"string","description":"Meeting from this team","name":"team","in":"query"},{"type":"string","description":"Meeting from this company","name":"company","in":"query"}],"responses":{"200":{"description":"Meetings filtered by query","schema":{"type":"array","items":{"$ref":"#/definitions/meeting"}}},"400":{"description":"Bad query"},"401":{"description":"Unauthorized"}}},"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["meetings"],"summary":"Creates a meeting (must have at least coordinator credentials)","operationId":"createMeeting","parameters":[{"description":"New meeting data","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["title","kind","begin","end","place"],"properties":{"begin":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["EVENT","TEAM","COMPANY"]},"place":{"type":"string"},"title":{"type":"string"}}}}],"responses":{"200":{"description":"Created meeting","schema":{"$ref":"#/definitions/meeting"}},"400":{"description":"Invalid payload, or couldn't create meeting"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"}}}},"/meetings/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["meetings"],"summary":"Gets a meeting by id","operationId":"getMeeting","parameters":[{"type":"string","description":"ID of the meeting","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Specified meeting","schema":{"$ref":"#/definitions/meeting"}},"401":{"description":"Unauthorized"},"404":{"description":"Meeting not found"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["meetings"],"summary":"Updates a meeting by id","operationId":"updateMeeting","parameters":[{"type":"string","description":"ID of the meeting","name":"id","in":"path","required":true},{"description":"New meeting data","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["title","kind","begin","end","local"],"properties":{"begin":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["EVENT","TEAM","COMPANY"]},"local":{"type":"string"},"title":{"type":"string"}}}}],"responses":{"200":{"description":"Updated meeting","schema":{"$ref":"#/definitions/meeting"}},"400":{"description":"Bad payload"},"401":{"description":"Unauthorized"},"404":{"description":"Meeting not found"},"417":{"description":"Could not update meeting"}}},"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["meetings"],"summary":"Deletes a meeting (must have at least coordinator credentials)","operationId":"deleteMeeting","parameters":[{"type":"string","description":"ID of the meeting","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Deleted meeting","schema":{"$ref":"#/definitions/meeting"}},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Meeting not found"}}}},"/meetings/{id}/minute":{"post":{"security":[{"Bearer":[]}],"consumes":["multipart/form-data"],"produces":["application/json"],"tags":["meetings"],"summary":"Upload meeting's minute by ID","operationId":"uploadMeetingMinute","parameters":[{"type":"string","description":"ID of the meeting","name":"id","in":"path","required":true},{"type":"file","description":"Minute","name":"minute","in":"formData"}],"responses":{"200":{"description":"meeting with the updated data","schema":{"$ref":"#/definitions/meeting"}},"400":{"description":"Invalid minute data"},"401":{"description":"Unauthorized"},"404":{"description":"Meeting not found"},"417":{"description":"Unable to perform operation"}}},"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["meetings"],"summary":"Delete meeting's minute by ID","operationId":"deleteMeetingMinute","parameters":[{"type":"string","description":"ID of the meeting","name":"id","in":"path","required":true}],"responses":{"200":{"description":"meeting with the updated data","schema":{"$ref":"#/definitions/meeting"}},"401":{"description":"Unauthorized"},"404":{"description":"Meeting not found"},"417":{"description":"Unable to perform operation"}}}},"/meetings/{id}/participants":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["meetings"],"summary":"Add a participant to a meeting","operationId":"addMeetingParticipant","parameters":[{"type":"string","description":"ID of the meeting","name":"id","in":"path","required":true},{"description":"New participant data","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["memberID","type"],"properties":{"memberID":{"type":"string"},"type":{"type":"string","enum":["MEMBER","COMPANYREP"]}}}}],"responses":{"200":{"description":"meeting with the updated data","schema":{"$ref":"#/definitions/meeting"}},"400":{"description":"Invalid minute data"},"401":{"description":"Unauthorized"},"404":{"description":"Meeting not found"},"417":{"description":"Unable to perform operation"}}},"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["meetings"],"summary":"Delete a participant from a meeting","operationId":"deleteMeetingParticipant","parameters":[{"type":"string","description":"ID of the meeting","name":"id","in":"path","required":true},{"description":"New participant data","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["memberID","type"],"properties":{"memberID":{"type":"string"},"type":{"type":"string","enum":["MEMBER","COMPANYREP"]}}}}],"responses":{"200":{"description":"meeting with the updated data","schema":{"$ref":"#/definitions/meeting"}},"401":{"description":"Unauthorized"},"404":{"description":"Meeting not found"},"417":{"description":"Unable to perform operation"}}}},"/meetings/{id}/thread":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["meetings","threads"],"summary":"Adds thread to a meeting","operationId":"addMeetingThread","parameters":[{"type":"string","description":"ID of the meeting","name":"id","in":"path","required":true},{"description":"New thread information","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["text","kind"],"properties":{"kind":{"type":"string","enum":["TEMPLATE","TO","FROM","MEETING","PHONE_CALL"]},"text":{"type":"string"}}}}],"responses":{"200":{"description":"Updated meeting","schema":{"$ref":"#/definitions/meeting"}},"400":{"description":"Invalid payload, or invalid credentials"},"401":{"description":"Unauthorized"},"404":{"description":"Meeting not found"},"417":{"description":"Unable to create post, create thread or add created thread to meeting"}}}},"/meetings/{id}/thread/{threadID}":{"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["meetings","threads"],"summary":"Deletes thread from a meeting","operationId":"deleteMeetingThread","parameters":[{"type":"string","description":"ID of the meeting","name":"id","in":"path","required":true},{"type":"string","description":"ID of the thread","name":"threadID","in":"path","required":true}],"responses":{"200":{"description":"Updated meeting","schema":{"$ref":"#/definitions/meeting"}},"400":{"description":"Invalid payload, or invalid credentials"},"401":{"description":"Unauthorized"},"404":{"description":"Meeting not found"}}}},"/members":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["members"],"summary":"Get all members","operationId":"getMembers","parameters":[{"type":"string","description":"Partial and case insensitive match for name","name":"name","in":"query"},{"type":"string","description":"Members from this event","name":"event","in":"query"}],"responses":{"200":{"description":"Members filtered by the query","schema":{"type":"array","items":{"$ref":"#/definitions/member"}}},"401":{"description":"Unauthorized"},"417":{"description":"Unable to get members"}}},"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["members"],"summary":"Create a new member (must have coordinator credentials)","operationId":"createMember","parameters":[{"description":"Information needed to create the new member.","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["name","istid"],"properties":{"istid":{"type":"string"},"name":{"type":"string"},"sinfoid":{"type":"string"}}}}],"responses":{"200":{"description":"Created member.","schema":{"$ref":"#/definitions/member"}},"400":{"description":"Invalid input or couldn't create the new member."},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"}}}},"/members/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["members"],"summary":"Get member by ID","operationId":"getMember","parameters":[{"type":"string","description":"ID of the member","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Member with the specific ID","schema":{"$ref":"#/definitions/member"}},"401":{"description":"Unauthorized"},"404":{"description":"Member not found"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["members"],"summary":"Updates a member (must have admin credentials)","operationId":"updateMember","parameters":[{"description":"Information needed to update the member.","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["name","istid"],"properties":{"istid":{"type":"string"},"name":{"type":"string"}}}},{"type":"string","description":"ID of the member","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Updated member.","schema":{"$ref":"#/definitions/member"}},"400":{"description":"Invalid input or couldn't updated the member."},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"}}},"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["members"],"summary":"Delete a member by ID","operationId":"deleteMember","parameters":[{"type":"string","description":"ID of the member","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Deleted Member with the specific ID","schema":{"$ref":"#/definitions/member"}},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Member not found"},"406":{"description":"Member associated with other objects, not possible to delete"}}}},"/members/{id}/participations":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["members"],"summary":"Get member's participations","operationId":"getMemberParticipations","parameters":[{"type":"string","description":"ID of the member","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Member with all participations","schema":{"type":"array","items":{"$ref":"#/definitions/memberParticipation"}}},"401":{"description":"Unauthorized"},"404":{"description":"Member not found"},"417":{"description":"Unable to get member's credentials"}}}},"/members/{id}/role":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["members"],"summary":"Get member's role","operationId":"getMemberRole","parameters":[{"type":"string","description":"ID of the member","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Member with the specific ID","schema":{"type":"object","properties":{"role":{"type":"string","enum":["MEMBER","TEAMLEADER","COORDINATOR","ADMIN"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Member not found"},"417":{"description":"Unable to get member's credentials"}}}},"/packages":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["packages"],"summary":"Get packages","operationId":"getPackages","parameters":[{"type":"string","description":"Name of the package","name":"name","in":"query"},{"type":"integer","description":"Price of the package","name":"price","in":"query"},{"type":"integer","description":"VAT of the package","name":"vat","in":"query"}],"responses":{"200":{"description":"Packages filtered by the query","schema":{"type":"array","items":{"$ref":"#/definitions/package"}}},"400":{"description":"Invalid price or vat on query"},"401":{"description":"Unauthorized"},"417":{"description":"Unable to get packages"}}},"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["packages"],"summary":"Creates a new package (must have coordinator credentials)","operationId":"createPackage","parameters":[{"description":"New package data","name":"package","in":"body","required":true,"schema":{"type":"object","required":["name","items","price","vat"],"properties":{"items":{"type":"object","properties":{"item":{"type":"string"},"public":{"type":"boolean"},"quantity":{"type":"integer"}}},"name":{"type":"string"},"price":{"type":"integer"},"vat":{"type":"integer"}}}}],"responses":{"200":{"description":"Created package","schema":{"$ref":"#/definitions/package"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"417":{"description":"Unable to create the package"}}}},"/packages/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["packages"],"summary":"Get package by ID","operationId":"getPackage","parameters":[{"type":"string","description":"ID of the package","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Package with the specific ID","schema":{"$ref":"#/definitions/package"}},"401":{"description":"Unauthorized"},"404":{"description":"Package not found"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["packages"],"summary":"Updates a specific package (must have coordinator credentials)","operationId":"updatePackage","parameters":[{"type":"string","description":"ID of the package","name":"id","in":"path","required":true},{"description":"New package data","name":"package","in":"body","required":true,"schema":{"type":"object","required":["name","price","vat"],"properties":{"name":{"type":"string"},"price":{"type":"integer"},"vat":{"type":"integer"}}}}],"responses":{"200":{"description":"Updated package","schema":{"$ref":"#/definitions/package"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Invalid package ID"},"417":{"description":"Unable to update the package"}}}},"/packages/{id}/items":{"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["packages","items"],"summary":"Updates a specific package's items (must have coordinator credentials)","operationId":"updatePackageItems","parameters":[{"type":"string","description":"ID of the package","name":"id","in":"path","required":true},{"description":"New package data","name":"package","in":"body","required":true,"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string"},"quantity":{"type":"integer"}}}}}}}],"responses":{"200":{"description":"Updated package","schema":{"$ref":"#/definitions/package"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Invalid package ID"},"417":{"description":"Unable to update the package"}}}},"/posts/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["posts"],"summary":"Get post by ID","operationId":"getPost","parameters":[{"type":"string","description":"ID of the post","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Post with the specific ID","schema":{"$ref":"#/definitions/post"}},"401":{"description":"Unauthorized"},"404":{"description":"Post not found"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["posts"],"summary":"Update post by ID","operationId":"updatePost","parameters":[{"type":"string","description":"ID of the post","name":"id","in":"path","required":true},{"description":"Data need for post update","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string"}}}}],"responses":{"200":{"description":"Post with the updated data","schema":{"$ref":"#/definitions/post"}},"400":{"description":"Bad payload"},"401":{"description":"Unauthorized"},"404":{"description":"Post not found"},"417":{"description":"Unable to update post"}}}},"/public/companies":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["companies","public"],"summary":"Public endpoint for getting all companies","operationId":"getCompaniesPublic","parameters":[{"type":"string","description":"Name of the company","name":"name","in":"query"},{"type":"integer","description":"ID of the event","name":"event","in":"query"},{"type":"boolean","description":"Companies participating as partner","name":"partner","in":"query"}],"responses":{"200":{"description":"Companies filtered by the query","schema":{"type":"array","items":{"$ref":"#/definitions/publicCompany"}}},"417":{"description":"Unable to get companies"}}}},"/public/companies/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies","public"],"summary":"Get public company by ID","operationId":"getCompanyPublic","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Public company with the specific ID","schema":{"$ref":"#/definitions/publicCompany"}},"401":{"description":"Unauthorized"},"404":{"description":"company not found"}}}},"/public/events":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["events","public"],"summary":"Public endpoint for getting all events","operationId":"getEventsPublic","parameters":[{"type":"boolean","description":"Get current event\nOn empty query (both current and pastEvents), returns all the events","name":"current","in":"query"},{"type":"boolean","description":"Get all the events except the current one\nOn empty query (both current and pastEvents), returns all the events","name":"pastEvents","in":"query"}],"responses":{"200":{"description":"Events filtered by the query","schema":{"type":"array","items":{"$ref":"#/definitions/publicEvent"}}},"400":{"description":"Unable to make query"},"417":{"description":"Unable to get events"}}}},"/public/events/latest":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["events","public"],"summary":"Public endpoint for getting latest event","operationId":"getLatestEvent","responses":{"200":{"description":"Latest event","schema":{"$ref":"#/definitions/event"}},"417":{"description":"Unable to get event"}}}},"/public/members":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["members","public"],"summary":"Get all members, based on query","operationId":"getMembersPublic","parameters":[{"type":"string","description":"Name of the member","name":"name","in":"query"},{"type":"integer","format":"int64","description":"Member from this event","name":"event","in":"query"}],"responses":{"200":{"description":"Members filtered by the query","schema":{"type":"array","items":{"$ref":"#/definitions/publicMember"}}},"417":{"description":"Unable to get members"}}}},"/public/sessions":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["sessions","public"],"summary":"Get all sessions, based on query","operationId":"getSessionsPublic","parameters":[{"type":"integer","format":"int64","description":"Session from this event","name":"event","in":"query"},{"enum":["TALK","PRESENTATION","WORKSHOP"],"type":"string","description":"Kind of session","name":"kind","in":"query"}],"responses":{"200":{"description":"Sessions filtered by the query","schema":{"type":"array","items":{"$ref":"#/definitions/publicSession"}}},"417":{"description":"Unable to get sessions"}}}},"/public/sessions/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["sessions","public"],"summary":"Get public session by ID","operationId":"getSessionPublic","parameters":[{"type":"string","description":"ID of the session","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Public session with the specific ID","schema":{"$ref":"#/definitions/publicSession"}},"401":{"description":"Unauthorized"},"404":{"description":"session not found"}}}},"/public/speakers":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["speakers","public"],"summary":"Public endpoint for getting all speakers","operationId":"getSpeakersPublic","parameters":[{"type":"string","description":"Name of the speaker","name":"name","in":"query"},{"type":"integer","description":"ID of the event","name":"event","in":"query"}],"responses":{"200":{"description":"Speakers filtered by the query","schema":{"type":"array","items":{"$ref":"#/definitions/publicSpeaker"}}},"417":{"description":"Unable to get speakers"}}}},"/public/speakers/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers","public"],"summary":"Get public speaker by ID","operationId":"getSpeakerPublic","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Public speaker with the specific ID","schema":{"$ref":"#/definitions/publicSpeaker"}},"401":{"description":"Unauthorized"},"404":{"description":"Speaker not found"}}}},"/sessions":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["sessions"],"summary":"Get sessions","operationId":"getSessions","parameters":[{"type":"integer","format":"int64","description":"Session from this event","name":"event","in":"query"},{"type":"string","format":"date-time","description":"Session began before this date","name":"before","in":"query"},{"type":"string","format":"date-time","description":"Session ended after this date","name":"after","in":"query"},{"type":"string","description":"Session happened on this location inside the venue","name":"place","in":"query"},{"enum":["TALK","PRESENTATION","WORKSHOP"],"type":"string","description":"Kind of session","name":"kind","in":"query"},{"type":"string","description":"Session given by this company","name":"company","in":"query"},{"type":"string","description":"Session given by this speaker","name":"speaker","in":"query"}],"responses":{"200":{"description":"Sessions filtered by query","schema":{"type":"array","items":{"$ref":"#/definitions/session"}}},"401":{"description":"Unauthorized"},"417":{"description":"Unable to make query"}}}},"/sessions/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["sessions"],"summary":"Get session by ID","operationId":"getSession","parameters":[{"type":"string","description":"ID of the session","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Session with the specific ID","schema":{"$ref":"#/definitions/session"}},"401":{"description":"Unauthorized"},"404":{"description":"Session not found"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["sessions"],"summary":"Updates session (must have coordinator credentials)","operationId":"updateSession","parameters":[{"type":"string","description":"ID of the session","name":"id","in":"path","required":true},{"description":"New session data\n - kind: TALK, PRESENTATION or WORKSHOP\n - if kind=TALK, then speaker must be specified\n - if kind=PRESENTATION or kind=WORKSHOP, then company must be specified\n - place is optional\n - videoURL is optional","name":"session","in":"body","required":true,"schema":{"type":"object","required":["begin","end","title","description","kind"],"properties":{"begin":{"type":"string","format":"date-time"},"company":{"type":"string"},"description":{"type":"string"},"end":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["TALK","PRESENTATION","WORKSHOP"]},"place":{"type":"string"},"speaker":{"type":"string"},"tickets":{"type":"object","properties":{"end":{"type":"string","format":"date-time"},"max":{"type":"integer"},"start":{"type":"string","format":"date-time"}}},"title":{"type":"string"},"videoURL":{"type":"string"}}}}],"responses":{"200":{"description":"Updated session","schema":{"$ref":"#/definitions/session"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Session not found"},"417":{"description":"Unable to update session"}}},"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["sessions"],"summary":"Delete a specific session","operationId":"deleteSession","parameters":[{"type":"string","description":"Id of the session to be deleted.","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Session deleted successfully","schema":{"type":"array","items":{"$ref":"#/definitions/session"}}},"401":{"description":"Unauthorized"},"404":{"description":"Session not found."}}}},"/speakers":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers"],"summary":"Get all speakers","operationId":"getSpeakers","parameters":[{"type":"string","description":"Name of the speaker","name":"name","in":"query"},{"type":"integer","description":"Has a participation entry for this event","name":"event","in":"query"},{"type":"string","description":"Was contacted by this member","name":"member","in":"query"}],"responses":{"200":{"description":"Speakers filtered by the query","schema":{"type":"array","items":{"$ref":"#/definitions/speaker"}}},"401":{"description":"Unauthorized"},"417":{"description":"Unable to get speakers"}}},"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers"],"summary":"Create a new speaker","operationId":"createSpeaker","parameters":[{"description":"Information needed to create the new speaker.","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["name","title","bio"],"properties":{"bio":{"type":"string"},"name":{"type":"string"},"title":{"type":"string"}}}}],"responses":{"200":{"description":"Created speaker","schema":{"$ref":"#/definitions/speaker"}},"400":{"description":"Invalid input or couldn't create the new speaker"},"401":{"description":"Unauthorized"}}}},"/speakers/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers"],"summary":"Get speaker by ID","operationId":"getSpeaker","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Speaker with the specific ID","schema":{"$ref":"#/definitions/speaker"}},"401":{"description":"Unauthorized"},"404":{"description":"Speaker not found"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers"],"summary":"Update speaker by ID","operationId":"updateSpeaker","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true},{"description":"Information needed to update the speaker.","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["name","bio","title","notes"],"properties":{"bio":{"type":"string"},"name":{"type":"string"},"notes":{"type":"string"},"title":{"type":"string"}}}}],"responses":{"200":{"description":"Updated speaker","schema":{"$ref":"#/definitions/speaker"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"404":{"description":"Speaker not found"},"417":{"description":"Unable to update speaker"}}},"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers"],"summary":"Delete a specific speaker","operationId":"deleteSpeaker","parameters":[{"type":"string","description":"Id of the speaker","name":"id","in":"path","required":true}],"responses":{"200":{"description":"The deleted speaker","schema":{"type":"array","items":{"$ref":"#/definitions/speaker"}}},"401":{"description":"Unauthorized"},"404":{"description":"Speaker not found"}}}},"/speakers/{id}/image/internal":{"post":{"security":[{"Bearer":[]}],"consumes":["multipart/form-data"],"produces":["application/json"],"tags":["speakers"],"summary":"Update speaker's internal image by ID","operationId":"updateSpeakerInternalImage","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true},{"type":"file","description":"Photo of speaker","name":"image","in":"formData"}],"responses":{"200":{"description":"Speaker with the updated data","schema":{"$ref":"#/definitions/speaker"}},"400":{"description":"Invalid image data"},"401":{"description":"Unauthorized"},"404":{"description":"Speaker not found"},"417":{"description":"Unable to perform operation"}}}},"/speakers/{id}/image/public/company":{"post":{"security":[{"Bearer":[]}],"consumes":["multipart/form-data"],"produces":["application/json"],"tags":["speakers"],"summary":"Update speaker's company public image by ID (must have at least coordinator credentials)","operationId":"updateSpeakerCompanyImage","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true},{"type":"file","description":"Logo of speaker's company","name":"image","in":"formData"}],"responses":{"200":{"description":"Speaker with the updated data","schema":{"$ref":"#/definitions/speaker"}},"400":{"description":"Invalid image data"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Speaker not found"},"417":{"description":"Unable to perform operation"}}}},"/speakers/{id}/image/public/speaker":{"post":{"security":[{"Bearer":[]}],"consumes":["multipart/form-data"],"produces":["application/json"],"tags":["speakers"],"summary":"Update speaker's public image by ID (must have at least coordinator credentials)","operationId":"updateSpeakerPublicImage","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true},{"type":"file","description":"Photo of speaker","name":"image","in":"formData"}],"responses":{"200":{"description":"Speaker with the updated data","schema":{"$ref":"#/definitions/speaker"}},"400":{"description":"Invalid image data"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Speaker not found"},"417":{"description":"Unable to perform operation"}}}},"/speakers/{id}/participation":{"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers"],"summary":"Update speaker's participation on the current event","operationId":"updateSpeakerParticipation","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true},{"description":"New participation information","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["member","feedback","room"],"properties":{"feedback":{"type":"string"},"member":{"type":"string"},"room":{"type":"object","properties":{"cost":{"type":"integer"},"notes":{"type":"string"},"type":{"type":"string"}}}}}}],"responses":{"200":{"description":"Updated speaker","schema":{"$ref":"#/definitions/speaker"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"404":{"description":"Speaker not found"},"417":{"description":"Unable to update speaker's participation data"}}},"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers"],"summary":"Adds participation on the current event to a speaker","operationId":"addSpeakerParticipation","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Updated speaker","schema":{"$ref":"#/definitions/speaker"}},"400":{"description":"Unable to add participation for the current event to this speaker"},"401":{"description":"Unauthorized"},"404":{"description":"Speaker not found"}}},"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers"],"summary":"Removes a speakers' participation from the current event. Admin only and must have no communications and not be associated with any session ","operationId":"removeSpeakerParticipation","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Updated speaker","schema":{"$ref":"#/definitions/speaker"}},"401":{"description":"Unauthorized"},"404":{"description":"Speaker not found"},"417":{"description":"Unable to remove speaker's participation: Has communications or is associated with a session"}}}},"/speakers/{id}/participation/flightInfo":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers","flightInfo"],"summary":"Adds flightInfo to a speaker's participation","operationId":"addSpeakerFlightInfo","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true},{"description":"Information needed to create a flight info.\n - Inbound/outbound: airports\n - Link: URL to the flight company's flight\n - Cost: in cents (€)","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["inbound","outbound","from","to","bought","cost","notes"],"properties":{"bought":{"type":"boolean"},"cost":{"description":"In cents (€)","type":"integer"},"from":{"description":"Airport","type":"string"},"inbound":{"type":"string","format":"date-time"},"link":{"description":"URL to the flight","type":"string"},"notes":{"type":"string"},"outbound":{"type":"string","format":"date-time"},"to":{"description":"Airport","type":"string"}}}}],"responses":{"200":{"description":"Updated speaker","schema":{"$ref":"#/definitions/speaker"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"404":{"description":"Speaker not found"},"417":{"description":"Unable to create flight info, or add it to the speaker's participation"}}}},"/speakers/{id}/participation/flightInfo/{flightInfoID}":{"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers","flightInfo"],"summary":"Removes flightInfo from a speaker's participation, and deletes it from the database (must have at least coordinator credentials)","operationId":"removeSpeakerFlightInfo","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true},{"type":"string","description":"ID of the flightInfo","name":"flightInfoID","in":"path","required":true}],"responses":{"200":{"description":"Updated speaker","schema":{"$ref":"#/definitions/speaker"}},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Speaker not found"},"417":{"description":"Unable to remove or delete flight info"}}}},"/speakers/{id}/participation/status/next":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers"],"summary":"Gets all the valid steps to be taken on a speaker's participation status on the current event","operationId":"getvalidSpeakerParticipationStatusSteps","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Valid steps","schema":{"type":"object","properties":{"steps":{"type":"array","items":{"type":"object","properties":{"next":{"type":"string","enum":["SUGGESTED","SELECTED","ON_HOLD","CONTACTED","IN_CONVERSATIONS","ACCEPTED","REJECTED","GIVEN_UP","ANNOUNCED"]},"step":{"type":"integer"}}}}}}},"400":{"description":"Speaker without participation on the current event"},"401":{"description":"Unauthorized"},"404":{"description":"Speaker not found"}}}},"/speakers/{id}/participation/status/{status}":{"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers"],"summary":"Update a speaker's participation status on the current event (admin credentials)","operationId":"updateSpeakerParticipationStatus","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true},{"enum":["SUGGESTED","SELECTED","ON_HOLD","CONTACTED","IN_CONVERSATIONS","ACCEPTED","REJECTED","GIVEN_UP","ANNOUNCED"],"type":"string","description":"New status","name":"status","in":"path","required":true}],"responses":{"200":{"description":"Updated speaker","schema":{"$ref":"#/definitions/speaker"}},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Speaker not found"},"417":{"description":"Unable to update speaker's participation status"}}}},"/speakers/{id}/participation/status/{step}":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers"],"summary":"Step a speaker's participation status on the current event","operationId":"stepSpeakerParticipationStatus","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true},{"type":"integer","description":"Step to the next status","name":"step","in":"path","required":true}],"responses":{"200":{"description":"Updated speaker","schema":{"$ref":"#/definitions/speaker"}},"401":{"description":"Unauthorized"},"404":{"description":"Speaker not found"},"417":{"description":"Unable to update speaker's participation status"}}}},"/speakers/{id}/participation/thread/{threadID}":{"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers","threads"],"summary":"Deletes thread from a speaker participation","operationId":"deleteSpeakerThread","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true},{"type":"string","description":"ID of the thread","name":"threadID","in":"path","required":true}],"responses":{"200":{"description":"Updated speaker","schema":{"$ref":"#/definitions/speaker"}},"400":{"description":"Invalid payload, or invalid credentials"},"401":{"description":"Unauthorized"},"404":{"description":"Meeting not found"}}}},"/speakers/{id}/subscribe":{"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers"],"summary":"Subscribe to speaker by ID","operationId":"subscribeToSpeaker","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Updated speaker","schema":{"$ref":"#/definitions/speaker"}},"401":{"description":"Unauthorized"},"404":{"description":"Speaker not found"},"417":{"description":"Unable to subscribe to speaker"}}}},"/speakers/{id}/thread":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers","threads"],"summary":"Adds thread on the current event to a speaker","operationId":"addSpeakerThread","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true},{"description":"New thread information","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["text","kind"],"properties":{"kind":{"type":"string","enum":["TEMPLATE","TO","FROM","MEETING","PHONE_CALL"]},"meeting":{"type":"object","properties":{"begin":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"participants":{"type":"object","properties":{"companyReps":{"type":"array","items":{"type":"string"}},"members":{"type":"array","items":{"type":"string"}}}},"place":{"type":"string"}}},"text":{"type":"string"}}}}],"responses":{"200":{"description":"Updated speaker","schema":{"$ref":"#/definitions/speaker"}},"400":{"description":"Invalid payload, or invalid credentials"},"401":{"description":"Unauthorized"},"404":{"description":"Speaker not found"},"417":{"description":"Unable to create post, create thread or add created thread to speaker participation"}}}},"/speakers/{id}/unsubscribe":{"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers"],"summary":"Unsubscribe to speaker by ID","operationId":"unsubscribeToSpeaker","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Updated speaker","schema":{"$ref":"#/definitions/speaker"}},"401":{"description":"Unauthorized"},"404":{"description":"Speaker not found"},"417":{"description":"Unable to unsubscribe from speaker"}}}},"/teams":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["teams"],"summary":"Get all teams","operationId":"getTeams","parameters":[{"type":"string","description":"Name of the team","name":"name","in":"query"},{"type":"string","description":"Contains this member","name":"member","in":"query"},{"type":"string","description":"Contains all the members whose name match the given on this query","name":"memberName","in":"query"},{"type":"integer","format":"int64","description":"Team from this event","name":"event","in":"query"}],"responses":{"200":{"description":"Teams filtered by the query","schema":{"type":"array","items":{"$ref":"#/definitions/team"}}},"401":{"description":"Unauthorized"},"417":{"description":"Unable to get teams"}}},"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["teams"],"summary":"Create a new team (must have coordinator credentials). Created teams are added to the current event","operationId":"createTeam","parameters":[{"description":"Information needed to create the new team.","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}}}],"responses":{"200":{"description":"Created team.","schema":{"$ref":"#/definitions/team"}},"400":{"description":"Invalid input or couldn't create the new team."},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"}}}},"/teams/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["teams"],"summary":"Get team by ID","operationId":"getTeam","parameters":[{"type":"string","description":"ID of the team","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Team with the specific ID","schema":{"$ref":"#/definitions/team"}},"401":{"description":"Unauthorized"},"404":{"description":"Team not found"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["teams"],"summary":"Updates a teams's name (must have coordinator credentials)","operationId":"updateTeam","parameters":[{"description":"New team data","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}}},{"type":"string","description":"ID of the team","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Updated team","schema":{"$ref":"#/definitions/team"}},"400":{"description":"Invalid payload, or couldn't update team"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"417":{"description":"Couldn't find team"}}},"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["teams"],"summary":"Deletes a team (must have admin credentials)","operationId":"deleteTeam","parameters":[{"type":"string","description":"ID of the team","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Deleted team","schema":{"$ref":"#/definitions/team"}},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Team not found"}}}},"/teams/{id}/meetings":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["teams","meetings"],"summary":"Creates a meeting and adds it to a team","operationId":"addTeamMeeting","parameters":[{"description":"New meeting data","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["title","kind","begin","end","local"],"properties":{"begin":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["EVENT","TEAM","COMPANY"]},"local":{"type":"string"},"title":{"type":"string"}}}},{"type":"string","description":"ID of the team","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Updated team","schema":{"$ref":"#/definitions/team"}},"400":{"description":"Invalid payload, or couldn't create meeting"},"401":{"description":"Unauthorized"},"417":{"description":"Couldn't find team"}}}},"/teams/{id}/meetings/{meetingID}":{"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["teams","meetings"],"summary":"Removes a meeting from a team (must have at least Team Leader credentials)","operationId":"deleteTeamMeeting","parameters":[{"type":"string","description":"ID of the team","name":"id","in":"path","required":true},{"type":"string","description":"ID of the meeting","name":"meetingID","in":"path","required":true}],"responses":{"200":{"description":"Removed meeting","schema":{"$ref":"#/definitions/meeting"}},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Couldn't find team or meeting, or meeting not on team"},"417":{"description":"Couldn't find team"}}}},"/teams/{id}/members":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["teams","members"],"summary":"Add a new member to the team (must have coordinator credentials)","operationId":"addTeamMember","parameters":[{"type":"string","description":"ID of the team","name":"id","in":"path","required":true},{"description":"New member data","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["member","role"],"properties":{"member":{"type":"string"},"role":{"type":"string","enum":["MEMBER","TEAMLEADER","COORDINATOR","ADMIN"]}}}}],"responses":{"200":{"description":"Team with the added member","schema":{"$ref":"#/definitions/team"}},"400":{"description":"Bad name or role on payload"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Team or member not found"}}}},"/teams/{id}/members/{memberID}":{"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["teams","members"],"summary":"Updates a member's role on the team (must have coordinator credentials)","operationId":"updateTeamMemberRole","parameters":[{"type":"string","description":"ID of the team","name":"id","in":"path","required":true},{"type":"string","description":"ID of the member","name":"memberID","in":"path","required":true},{"description":"New member data","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["member","role"],"properties":{"role":{"type":"string"}}}}],"responses":{"200":{"description":"Team with the updated member","schema":{"$ref":"#/definitions/team"}},"400":{"description":"Bad name or role on payload"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Team or member not found"}}},"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["teams","members"],"summary":"Removes a member from the team (must have coordinator credentials)","operationId":"deleteTeamMember","parameters":[{"type":"string","description":"ID of the team","name":"id","in":"path","required":true},{"type":"string","description":"ID of the member","name":"memberID","in":"path","required":true}],"responses":{"200":{"description":"Team without the removed member","schema":{"$ref":"#/definitions/team"}},"400":{"description":"Bad name or role on payload"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Team or member not found"}}}},"/threads/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["threads"],"summary":"Get thread by ID","operationId":"getThread","parameters":[{"type":"string","description":"ID of the thread","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Thread with the specific ID","schema":{"$ref":"#/definitions/thread"}},"401":{"description":"Unauthorized"},"404":{"description":"Thread not found"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["threads"],"summary":"Updates a thread. Only valid if you own the thread (or admin)","operationId":"updateThread","parameters":[{"type":"string","description":"ID of the thread","name":"id","in":"path","required":true},{"description":"Update data","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["kind","meeting"],"properties":{"kind":{"type":"string"},"meeting":{"type":"string"}}}}],"responses":{"200":{"description":"Updated thread","schema":{"$ref":"#/definitions/thread"}},"401":{"description":"Unauthorized"},"403":{"description":"Authtenticated, but access level is not enough"},"404":{"description":"Thread not found"}}},"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["threads"],"summary":"Deletes a thread and its comments. Only valid if you own the thread (or admin)","operationId":"deleteThread","parameters":[{"type":"string","description":"ID of the thread","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Deleted thread","schema":{"$ref":"#/definitions/thread"}},"401":{"description":"Unauthorized"},"403":{"description":"Authtenticated, but access level is not enough"},"404":{"description":"Thread not found"}}}},"/threads/{id}/comments":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["threads","posts"],"summary":"Add comment to thread","operationId":"addCommentToThread","parameters":[{"type":"string","description":"ID of the thread","name":"id","in":"path","required":true},{"description":"Comment data","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string"}}}}],"responses":{"200":{"description":"Updated Thread","schema":{"$ref":"#/definitions/thread"}},"401":{"description":"Unauthorized"},"417":{"description":"Thread not found, or unable to create and/or add post to thread"}}}},"/threads/{threadID}/comments/{postID}":{"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["threads","posts"],"summary":"Remove comment from thread","operationId":"removeCommentFromThread","parameters":[{"type":"string","description":"ID of the thread","name":"threadID","in":"path","required":true},{"type":"string","description":"ID of the post","name":"postID","in":"path","required":true}],"responses":{"200":{"description":"Updated Thread","schema":{"$ref":"#/definitions/thread"}},"401":{"description":"Unauthorized"},"404":{"description":"Thread or post not found"},"417":{"description":"Unable to remove post from thread"}}}}},"definitions":{"billing":{"type":"object","properties":{"company":{"type":"string"},"emission":{"type":"string","format":"date-time"},"event":{"type":"integer"},"id":{"type":"string"},"invoiceNumber":{"type":"integer"},"notes":{"type":"string"},"status":{"type":"object","properties":{"invoice":{"type":"boolean"},"paid":{"type":"boolean"},"proForma":{"type":"boolean"},"receipt":{"type":"boolean"}}},"value":{"type":"integer"},"visible":{"type":"boolean"}}},"company":{"type":"object","properties":{"billingInfo":{"type":"object","properties":{"address":{"type":"string"},"name":{"type":"string"},"tin":{"type":"string"}}},"description":{"type":"string"},"employers":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"imgs":{"type":"object","properties":{"internal":{"type":"string"},"public":{"type":"string"}}},"name":{"type":"string"},"participations":{"type":"array","items":{"type":"object","properties":{"billing":{"type":"string"},"communications":{"type":"array","items":{"type":"string"}},"confirmed":{"type":"string","format":"date-time"},"event":{"type":"integer","format":"int64"},"member":{"type":"string"},"notes":{"type":"string"},"package":{"type":"string"},"partner":{"type":"boolean"},"status":{"type":"string","enum":["SUGGESTED","SELECTED","ON_HOLD","CONTACTED","IN_CONVERSATIONS","ACCEPTED","REJECTED","GIVEN_UP","ANNOUNCED"]},"subscribers":{"type":"array","items":{"type":"string"}}}}},"site":{"type":"string"}}},"companyRep":{"type":"object","properties":{"contact":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"}}},"contact":{"type":"object","properties":{"id":{"type":"string"},"mails":{"type":"array","items":{"type":"object","properties":{"mail":{"type":"string"},"personal":{"type":"boolean"},"valid":{"type":"boolean"}}}},"phones":{"type":"array","items":{"type":"object","properties":{"phone":{"type":"string"},"valid":{"type":"boolean"}}}},"socials":{"type":"object","properties":{"facebook":{"type":"string"},"github":{"type":"string"},"linkedin":{"type":"string"},"skype":{"type":"string"},"twitter":{"type":"string"}}}}},"event":{"type":"object","properties":{"begin":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"id":{"type":"integer","format":"int64"},"items":{"type":"array","items":{"type":"string"}},"meetings":{"type":"array","items":{"type":"string"}},"name":{"type":"string"},"packages":{"type":"array","items":{"type":"object","properties":{"available":{"type":"boolean"},"public_name":{"type":"string"},"template":{"type":"string"}}}},"sessions":{"type":"array","items":{"type":"string"}},"teams":{"type":"array","items":{"type":"string"}},"themes":{"type":"array","items":{"type":"string"}}}},"flightInfo":{"type":"object","properties":{"bought":{"type":"boolean"},"cost":{"type":"integer"},"from":{"type":"string"},"id":{"type":"string"},"inbound":{"type":"string","format":"date-time"},"link":{"type":"string"},"notes":{"type":"string"},"outbound":{"type":"string","format":"date-time"},"to":{"type":"string"}}},"item":{"type":"object","properties":{"description":{"type":"string"},"id":{"type":"string"},"img":{"type":"string"},"name":{"type":"string"},"price":{"type":"integer"},"type":{"type":"string"},"vat":{"type":"integer"}}},"meeting":{"type":"object","properties":{"begin":{"type":"string","format":"date-time"},"communications":{"type":"array","items":{"type":"string"}},"end":{"type":"string","format":"date-time"},"id":{"type":"string"},"kind":{"type":"string","enum":["EVENT","TEAM","COMPANY"]},"minute":{"type":"string"},"participants":{"type":"object","properties":{"companyReps":{"type":"array","items":{"type":"string"}},"members":{"type":"array","items":{"type":"string"}}}},"place":{"type":"string"},"title":{"type":"string"}}},"member":{"type":"object","properties":{"contact":{"type":"string"},"id":{"type":"string"},"img":{"type":"string"},"istid":{"type":"string"},"name":{"type":"string"},"sinfoid":{"type":"string"}}},"memberParticipation":{"type":"object","properties":{"event":{"type":"integer"},"role":{"type":"string","enum":["MEMBER","TEAMLEADER","COORDINATOR","ADMIN"]},"team":{"type":"string"}}},"notification":{"type":"object","properties":{"company":{"type":"string"},"date":{"type":"string","format":"date-time"},"id":{"type":"string"},"kind":{"type":"string","enum":["CREATED","UPDATED","TAGGED","DELETED"]},"meeting":{"type":"string"},"member":{"type":"string"},"post":{"type":"string"},"session":{"type":"string"},"signature":{"type":"string"},"speaker":{"type":"string"}}},"package":{"type":"object","properties":{"id":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string"},"public":{"type":"boolean"},"quantity":{"type":"integer"}}}},"name":{"type":"string"},"price":{"type":"integer"},"vat":{"type":"integer"}}},"post":{"type":"object","properties":{"id":{"type":"string"},"member":{"type":"string"},"posted":{"type":"string","format":"date-time"},"text":{"type":"string"},"updated":{"type":"string","format":"date-time"}}},"publicCompany":{"type":"object","properties":{"id":{"type":"string"},"img":{"type":"string"},"name":{"type":"string"},"participations":{"type":"array","items":{"type":"object","properties":{"event":{"type":"integer"},"package":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string"},"quantity":{"type":"integer"}}}},"name":{"type":"string"}}},"partner":{"type":"boolean"}}}},"site":{"type":"string"}}},"publicEvent":{"type":"object","properties":{"begin":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"themes":{"type":"array","items":{"type":"string"}}}},"publicMember":{"type":"object","properties":{"img":{"type":"string"},"name":{"type":"string"},"socials":{"type":"object","properties":{"facebook":{"type":"string"},"github":{"type":"string"},"linkedin":{"type":"string"},"skype":{"type":"string"},"twitter":{"type":"string"}}}}},"publicSession":{"type":"object","properties":{"begin":{"type":"string","format":"date-time"},"company":{"$ref":"#/definitions/publicCompany"},"description":{"type":"string"},"end":{"type":"string","format":"date-time"},"id":{"type":"string"},"kind":{"type":"string","enum":["TALK","PRESENTATION","WORKSHOP"]},"place":{"type":"string"},"speaker":{"$ref":"#/definitions/publicSpeaker"},"tickets":{"type":"object","properties":{"end":{"type":"string","format":"date-time"},"max":{"type":"integer"},"start":{"type":"string","format":"date-time"}}},"title":{"type":"string"},"videoURL":{"type":"string"}}},"publicSpeaker":{"type":"object","properties":{"id":{"type":"string"},"imgs":{"type":"object","properties":{"company":{"type":"string"},"speaker":{"type":"string"}}},"name":{"type":"string"},"participations":{"type":"array","items":{"type":"object","properties":{"event":{"type":"integer"},"feedback":{"type":"string"}}}},"title":{"type":"string"}}},"session":{"type":"object","properties":{"begin":{"type":"string","format":"date-time"},"company":{"type":"string"},"description":{"type":"string"},"end":{"type":"string","format":"date-time"},"id":{"type":"string"},"kind":{"type":"string","enum":["TALK","PRESENTATION","WORKSHOP"]},"place":{"type":"string"},"speaker":{"type":"string"},"tickets":{"type":"object","properties":{"end":{"type":"string","format":"date-time"},"max":{"type":"integer"},"start":{"type":"string","format":"date-time"}}},"title":{"type":"string"},"videoURL":{"type":"string"}}},"speaker":{"type":"object","properties":{"bio":{"type":"string"},"contact":{"type":"string"},"id":{"type":"string"},"imgs":{"type":"object","properties":{"company":{"type":"string"},"internal":{"type":"string"},"speaker":{"type":"string"}}},"name":{"type":"string"},"notes":{"type":"string"},"participations":{"type":"array","items":{"type":"object","properties":{"communications":{"type":"array","items":{"type":"string"}},"event":{"type":"integer"},"feedback":{"type":"string"},"flights":{"type":"array","items":{"type":"string"}},"member":{"type":"string"},"room":{"type":"object","properties":{"cost":{"type":"integer"},"notes":{"type":"string"},"type":{"type":"string"}}},"status":{"type":"string","enum":["SUGGESTED","SELECTED","ON_HOLD","CONTACTED","IN_CONVERSATIONS","ACCEPTED","REJECTED","GIVEN_UP","ANNOUNCED"]},"subscribers":{"type":"array","items":{"type":"string"}}}}},"title":{"type":"string"}}},"team":{"type":"object","properties":{"id":{"type":"string"},"meetings":{"type":"array","items":{"type":"string"}},"members":{"type":"array","items":{"type":"object","properties":{"member":{"type":"string"},"role":{"type":"string","enum":["MEMBER","TEAMLEADER","COORDINATOR","ADMIN"]}}}},"name":{"type":"string"}}},"thread":{"type":"object","properties":{"comments":{"type":"array","items":{"type":"string"}},"entry":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string","enum":["TEMPLATE","TO","FROM","MEETING","PHONE_CALL"]},"meeting":{"type":"string"},"posted":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["APPROVED","REVIEWED","PENDING"]}}}},"securityDefinitions":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}},"tags":[{"description":"Public endpoints (don't need authentication)","name":"public"},{"description":"Authentication endpoints","name":"auth"},{"description":"Saved bills","name":"billings"},{"description":"Contacted companies","name":"companies"},{"description":"Person representing a certain company","name":"companyReps"},{"description":"All of our saved contacts","name":"contacts"},{"description":"Information relative to each event","name":"events"},{"description":"Saved flight information","name":"flightInfo"},{"description":"Items in packages sold by SINFO","name":"items"},{"description":"Saved meetings' information","name":"meetings"},{"description":"Member's personal endpoints","name":"me"},{"description":"Information related to each SINFO's member","name":"members"},{"description":"Notifications for our members to keep up with updated information","name":"notifications"},{"description":"Packages sold/traded by SINFO to companies","name":"packages"},{"description":"Messages shared by SINFO's members","name":"posts"},{"description":"Scheduled sessions for the event's week, such as keynotes, presentations, etc","name":"sessions"},{"description":"Speakers for the event's keynotes","name":"speakers"},{"description":"SINFO's teams","name":"teams"},{"description":"Additional communication taken inside the posts","name":"threads"}],"externalDocs":{"description":"Find out more about Swagger","url":"http://swagger.io"}} \ No newline at end of file +{"schemes":["http"],"swagger":"2.0","info":{"description":"SINFO's internal management application\n","title":"Swagger Deck2","termsOfService":"http://swagger.io/terms/","contact":{"email":"devteam@sinfo.org"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"},"version":"1.0.0"},"host":"localhost:8080","basePath":"/","paths":{"/auth/callback":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["auth"],"summary":"Authentication callback endpoint","operationId":"authCallback","responses":{"317":{"description":"Redirects to deck2 website with authentication code"},"401":{"description":"Unauthorized (reason in the body of the response)"}}}},"/auth/login":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["auth"],"summary":"Authenticates member","operationId":"authLogin","parameters":[{"type":"string","description":"URl to be redirected after the successful login\n\n\u003cb\u003eExample:\u003c/b\u003e \n \u003ccode\u003eGET /auth/login?redirect=example.com/some/path\u003c/code\u003e \n On a successful login, you'll be redirected to \u003ccode\u003eexample.com/some/path/{generated_authentication_token}\u003c/code\u003e","name":"redirect","in":"query"}],"responses":{"317":{"description":"Redirects to authentication server"}}}},"/auth/verify/{token}":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["auth"],"summary":"Authentication verification endpoint","operationId":"verifyToken","parameters":[{"type":"string","description":"JWT token sent to be verified","name":"token","in":"path","required":true}],"responses":{"200":{"description":"Token is valid"},"401":{"description":"Token in invalid, therefore unauthorized"}}}},"/billings":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["billings"],"summary":"Get all billings. If role is lower than coordinator, only visible billings will be returned","operationId":"getBillings","parameters":[{"type":"string","format":"date-time","description":"Billings emited after date","name":"after","in":"query"},{"type":"string","format":"date-time","description":"Billings emited before date","name":"before","in":"query"},{"type":"string","description":"Billings with value greater than this value","name":"valueGreaterThan","in":"query"},{"type":"string","description":"Billings with value lower than this value","name":"valueLessThan","in":"query"},{"type":"string","description":"Billings from this event","name":"event","in":"query"},{"type":"string","description":"Billings from this company","name":"company","in":"query"}],"responses":{"200":{"description":"Billings filtered by the query","schema":{"type":"array","items":{"$ref":"#/definitions/billing"}}},"401":{"description":"Unauthorized"},"417":{"description":"Unable to get billings"}}},"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["billings"],"summary":"Creates a new billing","operationId":"createBilling","parameters":[{"description":"Information needed to create the new company.","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["status","event","value","invoiceNumber","emission","notes"],"properties":{"emission":{"type":"string","format":"date-time"},"event":{"type":"integer"},"invoiceNumber":{"type":"string"},"notes":{"type":"string"},"status":{"type":"object","required":["proForma","paid","receipt","invoice"],"properties":{"invoice":{"type":"boolean"},"paid":{"type":"boolean"},"proForma":{"type":"boolean"},"receipt":{"type":"boolean"}}},"value":{"type":"integer"}}}}],"responses":{"200":{"description":"Created billing","schema":{"$ref":"#/definitions/billing"}},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Couldn't find created billing"}}}},"/billings/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["billings"],"summary":"Gets a billing","operationId":"getBilling","parameters":[{"type":"string","description":"ID of billing","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Specified Billing","schema":{"$ref":"#/definitions/billing"}},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Billing not found"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["billings"],"summary":"Updates a billing","operationId":"updateBilling","parameters":[{"type":"string","description":"ID of billing","name":"id","in":"path","required":true},{"description":"Information needed to create the new company.","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["status","event","value","invoiceNumber","emission","notes"],"properties":{"emission":{"type":"string","format":"date-time"},"event":{"type":"integer"},"invoiceNumber":{"type":"string"},"notes":{"type":"string"},"status":{"type":"object","required":["proForma","paid","receipt","invoice"],"properties":{"invoice":{"type":"boolean"},"paid":{"type":"boolean"},"proForma":{"type":"boolean"},"receipt":{"type":"boolean"}}},"value":{"type":"integer"}}}}],"responses":{"200":{"description":"Updated billing","schema":{"$ref":"#/definitions/billing"}},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Couldn't find specified billing"}}}},"/companies":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies"],"summary":"Get all companies","operationId":"getCompanies","parameters":[{"type":"string","description":"Name of the company","name":"name","in":"query"},{"type":"integer","description":"Has a participation entry for this event","name":"event","in":"query"},{"type":"string","description":"Was contacted by this member","name":"member","in":"query"},{"type":"boolean","description":"Participated as a partner","name":"partner","in":"query"}],"responses":{"200":{"description":"Companies filtered by the query","schema":{"type":"array","items":{"$ref":"#/definitions/company"}}},"401":{"description":"Unauthorized"},"417":{"description":"Unable to get companies"}}},"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies"],"summary":"Create a new company","operationId":"createCompany","parameters":[{"description":"Information needed to create the new company.","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["name","description","site"],"properties":{"description":{"type":"string"},"name":{"type":"string"},"site":{"type":"string"}}}}],"responses":{"200":{"description":"Created company.","schema":{"$ref":"#/definitions/company"}},"400":{"description":"Invalid input or couldn't create the new company"},"401":{"description":"Unauthorized"}}}},"/companies/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies"],"summary":"Get company by ID","operationId":"getCompany","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Company with the specific ID","schema":{"$ref":"#/definitions/company"}},"401":{"description":"Unauthorized"},"404":{"description":"Company not found"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies"],"summary":"Update company by ID","operationId":"updateCompany","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true},{"description":"Information needed to update the company.","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["name","description","site"],"properties":{"billingInfo":{"type":"object","properties":{"address":{"type":"string"},"name":{"type":"string"},"tin":{"type":"string"}}},"description":{"type":"string"},"name":{"type":"string"},"site":{"type":"string"}}}}],"responses":{"200":{"description":"Updated company","schema":{"$ref":"#/definitions/company"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"404":{"description":"Company not found"},"417":{"description":"Unable to update company"}}},"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies"],"summary":"Delete company by ID (must have admin credentials)","operationId":"deleteCompany","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Updated company","schema":{"$ref":"#/definitions/company"}},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Unable to delete company"}}}},"/companies/{id}/employer":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies","companyReps","contacts"],"summary":"Creates a new companyRep and adds it to a company","operationId":"addEmployer","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true},{"description":"Information needed to create the new companyRep.","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["name"],"properties":{"contact":{"type":"object","required":["phones","socials","mails"],"properties":{"mails":{"type":"array","items":{"type":"object","required":["mail","valid","personal"],"properties":{"personal":{"type":"boolean"},"phone":{"type":"string"},"valid":{"type":"boolean"}}}},"phones":{"type":"array","items":{"type":"object","required":["phone","valid"],"properties":{"phone":{"type":"string"},"valid":{"type":"boolean"}}}},"socials":{"type":"object","required":["facebook","skype","github","twitter","linkedin"],"properties":{"facebook":{"type":"string"},"github":{"type":"string"},"linkedin":{"type":"string"},"skype":{"type":"string"},"twitter":{"type":"string"}}}}},"name":{"type":"string"}}}}],"responses":{"200":{"description":"Updated company","schema":{"$ref":"#/definitions/company"}},"401":{"description":"Unauthorized"},"404":{"description":"Couldn't find company or created company rep or created contact"}}}},"/companies/{id}/employer/{rep}":{"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies","companyReps"],"summary":"Deletes a companyRep and removes it from company ","operationId":"removeEmployer","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true},{"type":"string","description":"ID of the companyRep","name":"rep","in":"path","required":true}],"responses":{"200":{"description":"Updated company","schema":{"$ref":"#/definitions/company"}},"401":{"description":"Unauthorized"},"404":{"description":"Couldn't find company or company rep"}}}},"/companies/{id}/image/internal":{"post":{"security":[{"Bearer":[]}],"consumes":["multipart/form-data"],"produces":["application/json"],"tags":["companies"],"summary":"Update company's internal image by ID","operationId":"updateCompanyInternalImage","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true},{"type":"file","description":"Logo of company","name":"image","in":"formData"}],"responses":{"200":{"description":"Company with the updated data","schema":{"$ref":"#/definitions/company"}},"400":{"description":"Invalid image data"},"401":{"description":"Unauthorized"},"404":{"description":"Company not found"},"417":{"description":"Unable to perform operation"}}}},"/companies/{id}/image/public":{"post":{"security":[{"Bearer":[]}],"consumes":["multipart/form-data"],"produces":["application/json"],"tags":["companies"],"summary":"Update company's public image by ID (must have coordination credentials)","operationId":"updateCompanyPublicImage","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true},{"type":"file","description":"Logo of company","name":"image","in":"formData"}],"responses":{"200":{"description":"Company with the updated data","schema":{"$ref":"#/definitions/company"}},"400":{"description":"Invalid image data"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Company not found"},"417":{"description":"Unable to perform operation"}}}},"/companies/{id}/participation":{"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies"],"summary":"Updates participation data on the current event to a company","operationId":"updateCompanyParticipation","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true},{"description":"New participation information","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["member","partner","confirmed","notes"],"properties":{"confirmed":{"type":"string","format":"date-time"},"member":{"type":"string"},"notes":{"type":"string"},"partner":{"type":"boolean"}}}}],"responses":{"200":{"description":"Updated company","schema":{"$ref":"#/definitions/company"}},"400":{"description":"Unable to add participation for the current event to this company"},"401":{"description":"Unauthorized"},"404":{"description":"Company not found"}}},"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies"],"summary":"Adds participation on the current event to a company","operationId":"addCompanyParticipation","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true},{"description":"New participation information","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["partner"],"properties":{"partner":{"type":"boolean"}}}}],"responses":{"200":{"description":"Updated company","schema":{"$ref":"#/definitions/company"}},"401":{"description":"Unauthorized"},"404":{"description":"Company not found"}}}},"/companies/{id}/participation/package":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies","packages"],"summary":"Adds a package on the current event to a company (must have at least coordination credentails)","operationId":"addCompanyPackage","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true},{"description":"New participation information","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["name","items","price","vat"],"properties":{"items":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string"},"public":{"type":"boolean"},"quantity":{"type":"integer"}}}},"name":{"type":"string"},"price":{"type":"integer"},"vat":{"type":"integer"}}}}],"responses":{"200":{"description":"Updated company","schema":{"$ref":"#/definitions/company"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Company not found"},"417":{"description":"Couldn't add package to company"}}}},"/companies/{id}/participation/status/next":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies"],"summary":"Gets all the valid steps to be taken on a company's participation status on the current event","operationId":"getvalidCompanyParticipationStatusSteps","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Valid steps","schema":{"type":"object","properties":{"steps":{"type":"array","items":{"type":"object","properties":{"next":{"type":"string","enum":["SUGGESTED","SELECTED","ON_HOLD","CONTACTED","IN_CONVERSATIONS","ACCEPTED","REJECTED","GIVEN_UP","ANNOUNCED"]},"step":{"type":"integer"}}}}}}},"400":{"description":"Company without participation on the current event"},"401":{"description":"Unauthorized"},"404":{"description":"Company not found"}}}},"/companies/{id}/participation/status/{status}":{"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies"],"summary":"Updated a company's participation status on the current event (admin credentials)","operationId":"updateCompanyParticipationStatus","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true},{"enum":["SUGGESTED","SELECTED","ON_HOLD","CONTACTED","IN_CONVERSATIONS","ACCEPTED","REJECTED","GIVEN_UP","ANNOUNCED"],"type":"string","description":"New status","name":"status","in":"path","required":true}],"responses":{"200":{"description":"Updated company","schema":{"$ref":"#/definitions/company"}},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Company not found"},"417":{"description":"Unable to update company's participation status"}}}},"/companies/{id}/participation/status/{step}":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies"],"summary":"Step a company's participation status on the current event","operationId":"stepCompanyParticipationStatus","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true},{"type":"integer","description":"Step to the next status","name":"step","in":"path","required":true}],"responses":{"200":{"description":"Updated company","schema":{"$ref":"#/definitions/company"}},"401":{"description":"Unauthorized"},"404":{"description":"Company not found"},"417":{"description":"Unable to update company's participation status"}}}},"/companies/{id}/participation/thread/{threadID}":{"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies","threads"],"summary":"Deletes thread from a company participation","operationId":"deleteCompanyThread","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true},{"type":"string","description":"ID of the thread","name":"threadID","in":"path","required":true}],"responses":{"200":{"description":"Updated company","schema":{"$ref":"#/definitions/company"}},"400":{"description":"Invalid payload, or invalid credentials"},"401":{"description":"Unauthorized"},"404":{"description":"Meeting not found"}}}},"/companies/{id}/subscribe":{"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies"],"summary":"Subscribe to company by ID","operationId":"subscribeToCompany","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Updated company","schema":{"$ref":"#/definitions/company"}},"401":{"description":"Unauthorized"},"404":{"description":"Company not found"},"417":{"description":"Unable to subscribe to company"}}}},"/companies/{id}/thread":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies","threads"],"summary":"Adds thread on the current event to a company","operationId":"addCompanyThread","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true},{"description":"New thread information","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["text","kind"],"properties":{"kind":{"type":"string","enum":["TEMPLATE","TO","FROM","MEETING","PHONE_CALL"]},"meeting":{"type":"object","properties":{"begin":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"participants":{"type":"object","properties":{"companyReps":{"type":"array","items":{"type":"string"}},"members":{"type":"array","items":{"type":"string"}}}},"place":{"type":"string"}}},"text":{"type":"string"}}}}],"responses":{"200":{"description":"Updated company","schema":{"$ref":"#/definitions/company"}},"400":{"description":"Invalid payload, or invalid credentials"},"401":{"description":"Unauthorized"},"404":{"description":"Company not found"},"417":{"description":"Unable to create post, create thread or add created thread to company participation"}}}},"/companies/{id}/unsubscribe":{"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies"],"summary":"Unsubscribe to company by ID","operationId":"unsubscribeToCompany","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Updated company","schema":{"$ref":"#/definitions/company"}},"401":{"description":"Unauthorized"},"404":{"description":"Company not found"},"417":{"description":"Unable to unsubscribe from company"}}}},"/companyReps":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companyReps"],"summary":"Get all companyReps, based on query","operationId":"getCompanyReps","parameters":[{"type":"string","description":"Name of the companyRep","name":"name","in":"query"}],"responses":{"200":{"description":"CompanyReps filtered by the query","schema":{"type":"array","items":{"$ref":"#/definitions/companyRep"}}},"401":{"description":"Unauthorized"},"417":{"description":"Unable to get companyReps"}}}},"/companyReps/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companyReps"],"summary":"Gets a companyRep","operationId":"getCompanyRep","parameters":[{"type":"string","description":"ID of the companyRep","name":"id","in":"path","required":true}],"responses":{"200":{"description":"CompanyRep with specified ID","schema":{"$ref":"#/definitions/companyRep"}},"401":{"description":"Unauthorized"},"404":{"description":"CompanyRep not found"},"417":{"description":"Unable to get companyRep"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companyReps"],"summary":"Updates a companyRep","operationId":"updateCompanyRep","parameters":[{"type":"string","description":"ID of the companyrep","name":"id","in":"path","required":true},{"description":"Information needed to create the new companyRep.","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["name"],"properties":{"contact":{"type":"object","required":["phones","socials","mails"],"properties":{"mails":{"type":"array","items":{"type":"object","required":["mail","valid","personal"],"properties":{"personal":{"type":"boolean"},"phone":{"type":"string"},"valid":{"type":"boolean"}}}},"phones":{"type":"array","items":{"type":"object","required":["phone","valid"],"properties":{"phone":{"type":"string"},"valid":{"type":"boolean"}}}},"socials":{"type":"object","required":["facebook","skype","github","twitter","linkedin"],"properties":{"facebook":{"type":"string"},"github":{"type":"string"},"linkedin":{"type":"string"},"skype":{"type":"string"},"twitter":{"type":"string"}}}}},"name":{"type":"string"}}}}],"responses":{"200":{"description":"Updated companyRep ","schema":{"$ref":"#/definitions/companyRep"}},"401":{"description":"Unauthorized"},"404":{"description":"CompanyRep not found"},"417":{"description":"Unable to get companies"}}}},"/contacts":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["contacts"],"summary":"Get all contacts","operationId":"getContacts","parameters":[{"type":"string","description":"Partial and case insensitive match for phone","name":"phone","in":"query"},{"type":"string","description":"Partial and case insensitive match for mail","name":"mail","in":"query"}],"responses":{"200":{"description":"Contacts filtered by the query","schema":{"type":"array","items":{"$ref":"#/definitions/contact"}}},"401":{"description":"Unauthorized"},"417":{"description":"Unable to get contacts"}}}},"/contacts/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["contacts"],"summary":"Get contact by ID","operationId":"getContact","parameters":[{"type":"string","description":"ID of the contact","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Contact with the specific ID","schema":{"$ref":"#/definitions/contact"}},"401":{"description":"Unauthorized"},"404":{"description":"contact not found"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["contacts"],"summary":"Updates a contact","operationId":"updateContact","parameters":[{"type":"string","description":"ID of the member","name":"id","in":"path","required":true},{"description":"New contact data","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["phones","socials","mails"],"properties":{"mails":{"type":"array","items":{"type":"object","required":["mail","valid","personal"],"properties":{"personal":{"type":"boolean"},"phone":{"type":"string"},"valid":{"type":"boolean"}}}},"phones":{"type":"array","items":{"type":"object","required":["phone","valid"],"properties":{"phone":{"type":"string"},"valid":{"type":"boolean"}}}},"socials":{"type":"object","required":["facebook","skype","github","twitter","linkedin"],"properties":{"facebook":{"type":"string"},"github":{"type":"string"},"linkedin":{"type":"string"},"skype":{"type":"string"},"twitter":{"type":"string"}}}}}}],"responses":{"200":{"description":"Updated contact.","schema":{"$ref":"#/definitions/contact"}},"400":{"description":"Invalid input or couldn't updated the contact."},"401":{"description":"Unauthorized"}}}},"/events":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["events"],"summary":"Get all events","operationId":"getEvents","parameters":[{"type":"string","description":"Name of the event","name":"name","in":"query"},{"type":"string","format":"date-time","description":"Event happened before this date","name":"before","in":"query"},{"type":"string","format":"date-time","description":"Event happened after this date","name":"after","in":"query"},{"type":"string","format":"date-time","description":"Event happened during this date","name":"during","in":"query"}],"responses":{"200":{"description":"Events filtered by the query","schema":{"type":"array","items":{"$ref":"#/definitions/event"}}},"400":{"description":"Invalid date format on query"},"401":{"description":"Unauthorized"},"417":{"description":"Unable to get events"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["events"],"summary":"Update the current event (must have coordinator credentials)","operationId":"updateEvent","parameters":[{"description":"New event data","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["name"],"properties":{"begin":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"name":{"type":"string"}}}}],"responses":{"200":{"description":"Updated event","schema":{"$ref":"#/definitions/event"}},"400":{"description":"Invalid payload, or couldn't update event"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"417":{"description":"Unable to update event"}}},"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["events"],"summary":"Create a new event (must have admin credentials)","operationId":"createEvent","parameters":[{"description":"Information needed to create the new event.","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}}}],"responses":{"200":{"description":"Created event. The new ID will be an increment to the current event","schema":{"$ref":"#/definitions/event"}},"400":{"description":"Invalid input or couldn't create the new event"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"}}}},"/events/items":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["events","items"],"summary":"Adds an item to the current event (must have coordinator credentials)","operationId":"addEventItem","parameters":[{"description":"Item to store on the current event","name":"item","in":"body","required":true,"schema":{"type":"object","required":["id"],"properties":{"item":{"type":"string"}}}}],"responses":{"200":{"description":"Updated event","schema":{"$ref":"#/definitions/event"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Event not found, or item not found"},"417":{"description":"Unable to add item"}}}},"/events/items/{id}":{"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["events","items"],"summary":"Removes item from the current event's packages (must have coordinator credentials)","operationId":"removeEventItem","parameters":[{"type":"string","description":"ID of the item","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Event with the removed item","schema":{"$ref":"#/definitions/event"}},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Event not found"},"417":{"description":"Unable to remove item from event"}}}},"/events/meetings":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["events","meetings"],"summary":"Creates and adds a new meeting to the current event (must have coordinator credentials)","operationId":"addEventMeeting","parameters":[{"description":"Meeting to store on the current event","name":"meeting","in":"body","required":true,"schema":{"type":"object","required":["title","kind","begin","end","place"],"properties":{"begin":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["EVENT","TEAM","COMPANY"]},"place":{"type":"string"},"title":{"type":"string"}}}}],"responses":{"200":{"description":"Updated event","schema":{"$ref":"#/definitions/event"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Event not found"},"417":{"description":"Unable to create or add meeting"}}}},"/events/meetings/{id}":{"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["events","meetings"],"summary":"Removes and deletes a meeting from the current event (must have coordinator credentials)","operationId":"removeMeetingFromEvent","parameters":[{"type":"string","description":"ID of the meeting","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Updated event","schema":{"$ref":"#/definitions/event"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Event not found or meeting not found"},"417":{"description":"Unable to remove or delete meeting"}}}},"/events/packages":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["events","packages"],"summary":"Add template to packages of the current event and make it available (must have coordinator credentials)","operationId":"addEventPackage","parameters":[{"description":"Package (template) to store on the current event","name":"template","in":"body","required":true,"schema":{"type":"object","required":["template","public_name"],"properties":{"public_name":{"type":"string"},"template":{"type":"string"}}}}],"responses":{"200":{"description":"Event with the updated packages","schema":{"$ref":"#/definitions/event"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Event not found, or package not found"},"417":{"description":"Unable to save package on event"}}}},"/events/packages/{id}":{"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["events","packages"],"summary":"Modifies template to packages on the current event (must have coordinator credentials)","operationId":"updateEventPackage","parameters":[{"type":"string","description":"ID of the package","name":"id","in":"path","required":true},{"description":"Updated template data","name":"template","in":"body","schema":{"type":"object","required":["template","public_name"],"properties":{"available":{"type":"boolean"},"public_name":{"type":"string"}}}}],"responses":{"200":{"description":"Event with the updated packages","schema":{"$ref":"#/definitions/event"}},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Event not found or template not found"},"417":{"description":"Unable to update template on event"}}},"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["events","packages"],"summary":"Removes template to packages from the current event (must have coordinator credentials)","operationId":"removeEventPackage","parameters":[{"type":"string","description":"ID of the package","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Event with the updated packages","schema":{"$ref":"#/definitions/event"}},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Event not found"},"417":{"description":"Unable to remove package from event"}}}},"/events/sessions":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["events","sessions"],"summary":"Creates and adds a new session to the current event (must have coordinator credentials)","operationId":"addEventSession","parameters":[{"description":"Session to store on the current event\n - kind: TALK, PRESENTATION or WORKSHOP\n - if kind=TALK, then speaker must be specified\n - if kind=PRESENTATION or kind=WORKSHOP, then company must be specified\n - dinamizers is optional\n - space is optional","name":"session","in":"body","required":true,"schema":{"type":"object","required":["begin","end","title","description","kind"],"properties":{"begin":{"type":"string","format":"date-time"},"company":{"type":"string"},"description":{"type":"string"},"dinamizers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"position":{"type":"string"}}}},"end":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["TALK","PRESENTATION","WORKSHOP"]},"place":{"type":"string"},"speaker":{"type":"string"},"title":{"type":"string"}}}}],"responses":{"200":{"description":"Updated event","schema":{"$ref":"#/definitions/event"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Event not found"},"417":{"description":"Unable to create or add session"}}}},"/events/teams/{id}":{"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["events","teams"],"summary":"Removes (but does not delete) a team from the current event (must have admin credentials)","operationId":"removeTeamFromEvent","parameters":[{"type":"string","description":"ID of the team","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Updated event","schema":{"$ref":"#/definitions/event"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Event not found or team not found"},"417":{"description":"Unable to remove team"}}}},"/events/themes":{"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["events"],"summary":"Update the current event's themes (must have coordinator credentials)","operationId":"updateEventThemes","parameters":[{"description":"Themes for the event. Must have the same number of elements as there are days in the duration of the event, or be empty","name":"themes","in":"body","required":true,"schema":{"type":"object","required":["themes"],"properties":{"themes":{"type":"array","items":{"type":"string"}}}}}],"responses":{"200":{"description":"Event with the updated themes","schema":{"$ref":"#/definitions/event"}},"400":{"description":"Invalid payload (be it format, or number of elements in the array)"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Event not found"},"417":{"description":"Unable to update event's themes"}}}},"/events/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["events"],"summary":"Get event by ID","operationId":"getEvent","parameters":[{"type":"integer","description":"ID of the event","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Event with the specific ID","schema":{"$ref":"#/definitions/event"}},"401":{"description":"Unauthorized"},"404":{"description":"Event not found"}}},"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["events"],"summary":"Deletes an event (must have admin credentials)","operationId":"deleteEvent","parameters":[{"type":"integer","description":"ID of the event","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Deleted event","schema":{"$ref":"#/definitions/event"}},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Event not found"}}}},"/flightInfo/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["flightInfo"],"summary":"Get flight info by ID","operationId":"getFlightInfo","parameters":[{"type":"string","description":"ID of the flight info","name":"id","in":"path","required":true}],"responses":{"200":{"description":"FlightInfo with the specific ID","schema":{"$ref":"#/definitions/flightInfo"}},"401":{"description":"Unauthorized"},"404":{"description":"FlightInfo not found"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["flightInfo"],"summary":"Update flight info by ID","operationId":"updateFlightInfo","parameters":[{"type":"string","description":"ID of the flight info","name":"id","in":"path","required":true},{"description":"Information needed to create a flight info.\n - Inbound/outbound: airports\n - Link: URL to the flight company's flight\n - Cost: in cents (€)","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["inbound","outbound","from","to","bought","cost","notes"],"properties":{"bought":{"type":"boolean"},"cost":{"description":"In cents (€)","type":"integer"},"from":{"description":"Airport","type":"string"},"inbound":{"type":"string","format":"date-time"},"link":{"description":"URL to the flight","type":"string"},"notes":{"type":"string"},"outbound":{"type":"string","format":"date-time"},"to":{"description":"Airport","type":"string"}}}}],"responses":{"200":{"description":"FlightInfo with the specific ID","schema":{"$ref":"#/definitions/flightInfo"}},"400":{"description":"Bad payload"},"401":{"description":"Unauthorized"},"404":{"description":"FlightInfo not found"},"417":{"description":"Unable to update FlightInfo"}}}},"/items":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["items"],"summary":"Get all items","operationId":"getItems","parameters":[{"type":"string","description":"Name of the item","name":"name","in":"query"},{"type":"string","description":"Type of the item","name":"type","in":"query"}],"responses":{"200":{"description":"Items filtered by the query","schema":{"type":"array","items":{"$ref":"#/definitions/item"}}},"401":{"description":"Unauthorized"},"417":{"description":"Unable to get items"}}},"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["items"],"summary":"Creates a new item (must have coordinator credentials)","operationId":"createItem","parameters":[{"description":"New item data","name":"item","in":"body","required":true,"schema":{"type":"object","required":["name","type","description","price","vat"],"properties":{"description":{"type":"string"},"name":{"type":"string"},"price":{"type":"integer"},"type":{"type":"string"},"vat":{"type":"integer"}}}}],"responses":{"200":{"description":"Created item","schema":{"$ref":"#/definitions/item"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"417":{"description":"Unable to create the item"}}}},"/items/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["items"],"summary":"Get item by ID","operationId":"getItem","parameters":[{"type":"string","description":"ID of the item","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Item with the specific ID","schema":{"$ref":"#/definitions/item"}},"401":{"description":"Unauthorized"},"404":{"description":"Item not found"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["items"],"summary":"Updates an item (must have coordinator credentials)","operationId":"updateItem","parameters":[{"description":"Information needed to update the item.","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["name","type","description","price","vat"],"properties":{"description":{"type":"string"},"name":{"type":"string"},"price":{"type":"integer"},"type":{"type":"string"},"vat":{"type":"integer"}}}},{"type":"string","description":"ID of the item","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Updated item.","schema":{"$ref":"#/definitions/item"}},"400":{"description":"Invalid input or couldn't updated the item."},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Item not found"}}}},"/items/{id}/image":{"post":{"security":[{"Bearer":[]}],"consumes":["multipart/form-data"],"produces":["application/json"],"tags":["items"],"summary":"Update item image by ID","operationId":"uploadItemImage","parameters":[{"type":"string","description":"ID of the item","name":"id","in":"path","required":true},{"type":"file","description":"Photo of item","name":"image","in":"formData"}],"responses":{"200":{"description":"Item with the updated data","schema":{"$ref":"#/definitions/item"}},"400":{"description":"Invalid image data"},"401":{"description":"Unauthorized"},"404":{"description":"Item not found"},"417":{"description":"Unable to perform operation"}}}},"/me":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["me"],"summary":"Get my information","operationId":"getMe","responses":{"200":{"description":"My information","schema":{"$ref":"#/definitions/member"}},"401":{"description":"Unauthorized"},"404":{"description":"Information not found"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["me"],"summary":"Updates my information","operationId":"updateMe","parameters":[{"description":"Information needed to update my information.","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["name","istid"],"properties":{"istid":{"type":"string"},"name":{"type":"string"}}}}],"responses":{"200":{"description":"Updated information","schema":{"$ref":"#/definitions/member"}},"400":{"description":"Invalid input or couldn't updated my information."},"401":{"description":"Unauthorized"}}}},"/me/image":{"post":{"security":[{"Bearer":[]}],"consumes":["multipart/form-data"],"produces":["application/json"],"tags":["me"],"summary":"Update member's image","operationId":"updateMyImage","parameters":[{"type":"file","description":"Photo of the member","name":"image","in":"formData"}],"responses":{"200":{"description":"Member with the updated data","schema":{"$ref":"#/definitions/member"}},"400":{"description":"Invalid image data"},"401":{"description":"Unauthorized"},"404":{"description":"Member not found"},"417":{"description":"Unable to perform operation"}}}},"/me/notification/{id}":{"delete":{"security":[{"Bearer":[]}],"consumes":["multipart/form-data"],"produces":["application/json"],"tags":["me","notifications"],"summary":"Delete my notification","operationId":"deleteMyNotifications","parameters":[{"type":"string","description":"ID of the notification","name":"id","in":"path","required":true}],"responses":{"200":{"description":"My deleted notification","schema":{"$ref":"#/definitions/notification"}},"401":{"description":"Unauthorized"},"404":{"description":"Member not found, or notification not found"},"417":{"description":"Unable to delete notification"}}}},"/me/notifications":{"get":{"security":[{"Bearer":[]}],"consumes":["multipart/form-data"],"produces":["application/json"],"tags":["me","notifications"],"summary":"Get member's notifications","operationId":"getMyNotifications","responses":{"200":{"description":"My notifications","schema":{"type":"array","items":{"$ref":"#/definitions/notification"}}},"401":{"description":"Unauthorized"},"404":{"description":"Member not found"},"417":{"description":"Unable to get notifications"}}}},"/meetings":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["meetings"],"summary":"Gets all meetings","operationId":"getMeetings","parameters":[{"type":"integer","format":"int64","description":"Meeting from this event","name":"event","in":"query"},{"type":"string","description":"Meeting from this team","name":"team","in":"query"},{"type":"string","description":"Meeting from this company","name":"company","in":"query"}],"responses":{"200":{"description":"Meetings filtered by query","schema":{"type":"array","items":{"$ref":"#/definitions/meeting"}}},"400":{"description":"Bad query"},"401":{"description":"Unauthorized"}}},"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["meetings"],"summary":"Creates a meeting (must have at least coordinator credentials)","operationId":"createMeeting","parameters":[{"description":"New meeting data","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["title","kind","begin","end","place"],"properties":{"begin":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["EVENT","TEAM","COMPANY"]},"place":{"type":"string"},"title":{"type":"string"}}}}],"responses":{"200":{"description":"Created meeting","schema":{"$ref":"#/definitions/meeting"}},"400":{"description":"Invalid payload, or couldn't create meeting"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"}}}},"/meetings/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["meetings"],"summary":"Gets a meeting by id","operationId":"getMeeting","parameters":[{"type":"string","description":"ID of the meeting","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Specified meeting","schema":{"$ref":"#/definitions/meeting"}},"401":{"description":"Unauthorized"},"404":{"description":"Meeting not found"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["meetings"],"summary":"Updates a meeting by id","operationId":"updateMeeting","parameters":[{"type":"string","description":"ID of the meeting","name":"id","in":"path","required":true},{"description":"New meeting data","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["title","kind","begin","end","local"],"properties":{"begin":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["EVENT","TEAM","COMPANY"]},"local":{"type":"string"},"title":{"type":"string"}}}}],"responses":{"200":{"description":"Updated meeting","schema":{"$ref":"#/definitions/meeting"}},"400":{"description":"Bad payload"},"401":{"description":"Unauthorized"},"404":{"description":"Meeting not found"},"417":{"description":"Could not update meeting"}}},"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["meetings"],"summary":"Deletes a meeting (must have at least coordinator credentials)","operationId":"deleteMeeting","parameters":[{"type":"string","description":"ID of the meeting","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Deleted meeting","schema":{"$ref":"#/definitions/meeting"}},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Meeting not found"}}}},"/meetings/{id}/minute":{"post":{"security":[{"Bearer":[]}],"consumes":["multipart/form-data"],"produces":["application/json"],"tags":["meetings"],"summary":"Upload meeting's minute by ID","operationId":"uploadMeetingMinute","parameters":[{"type":"string","description":"ID of the meeting","name":"id","in":"path","required":true},{"type":"file","description":"Minute","name":"minute","in":"formData"}],"responses":{"200":{"description":"meeting with the updated data","schema":{"$ref":"#/definitions/meeting"}},"400":{"description":"Invalid minute data"},"401":{"description":"Unauthorized"},"404":{"description":"Meeting not found"},"417":{"description":"Unable to perform operation"}}},"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["meetings"],"summary":"Delete meeting's minute by ID","operationId":"deleteMeetingMinute","parameters":[{"type":"string","description":"ID of the meeting","name":"id","in":"path","required":true}],"responses":{"200":{"description":"meeting with the updated data","schema":{"$ref":"#/definitions/meeting"}},"401":{"description":"Unauthorized"},"404":{"description":"Meeting not found"},"417":{"description":"Unable to perform operation"}}}},"/meetings/{id}/participants":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["meetings"],"summary":"Add a participant to a meeting","operationId":"addMeetingParticipant","parameters":[{"type":"string","description":"ID of the meeting","name":"id","in":"path","required":true},{"description":"New participant data","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["memberID","type"],"properties":{"memberID":{"type":"string"},"type":{"type":"string","enum":["MEMBER","COMPANYREP"]}}}}],"responses":{"200":{"description":"meeting with the updated data","schema":{"$ref":"#/definitions/meeting"}},"400":{"description":"Invalid minute data"},"401":{"description":"Unauthorized"},"404":{"description":"Meeting not found"},"417":{"description":"Unable to perform operation"}}},"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["meetings"],"summary":"Delete a participant from a meeting","operationId":"deleteMeetingParticipant","parameters":[{"type":"string","description":"ID of the meeting","name":"id","in":"path","required":true},{"description":"New participant data","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["memberID","type"],"properties":{"memberID":{"type":"string"},"type":{"type":"string","enum":["MEMBER","COMPANYREP"]}}}}],"responses":{"200":{"description":"meeting with the updated data","schema":{"$ref":"#/definitions/meeting"}},"401":{"description":"Unauthorized"},"404":{"description":"Meeting not found"},"417":{"description":"Unable to perform operation"}}}},"/meetings/{id}/thread":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["meetings","threads"],"summary":"Adds thread to a meeting","operationId":"addMeetingThread","parameters":[{"type":"string","description":"ID of the meeting","name":"id","in":"path","required":true},{"description":"New thread information","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["text","kind"],"properties":{"kind":{"type":"string","enum":["TEMPLATE","TO","FROM","MEETING","PHONE_CALL"]},"text":{"type":"string"}}}}],"responses":{"200":{"description":"Updated meeting","schema":{"$ref":"#/definitions/meeting"}},"400":{"description":"Invalid payload, or invalid credentials"},"401":{"description":"Unauthorized"},"404":{"description":"Meeting not found"},"417":{"description":"Unable to create post, create thread or add created thread to meeting"}}}},"/meetings/{id}/thread/{threadID}":{"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["meetings","threads"],"summary":"Deletes thread from a meeting","operationId":"deleteMeetingThread","parameters":[{"type":"string","description":"ID of the meeting","name":"id","in":"path","required":true},{"type":"string","description":"ID of the thread","name":"threadID","in":"path","required":true}],"responses":{"200":{"description":"Updated meeting","schema":{"$ref":"#/definitions/meeting"}},"400":{"description":"Invalid payload, or invalid credentials"},"401":{"description":"Unauthorized"},"404":{"description":"Meeting not found"}}}},"/members":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["members"],"summary":"Get all members","operationId":"getMembers","parameters":[{"type":"string","description":"Partial and case insensitive match for name","name":"name","in":"query"},{"type":"string","description":"Members from this event","name":"event","in":"query"}],"responses":{"200":{"description":"Members filtered by the query","schema":{"type":"array","items":{"$ref":"#/definitions/member"}}},"401":{"description":"Unauthorized"},"417":{"description":"Unable to get members"}}},"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["members"],"summary":"Create a new member (must have coordinator credentials)","operationId":"createMember","parameters":[{"description":"Information needed to create the new member.","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["name","istid"],"properties":{"istid":{"type":"string"},"name":{"type":"string"},"sinfoid":{"type":"string"}}}}],"responses":{"200":{"description":"Created member.","schema":{"$ref":"#/definitions/member"}},"400":{"description":"Invalid input or couldn't create the new member."},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"}}}},"/members/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["members"],"summary":"Get member by ID","operationId":"getMember","parameters":[{"type":"string","description":"ID of the member","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Member with the specific ID","schema":{"$ref":"#/definitions/member"}},"401":{"description":"Unauthorized"},"404":{"description":"Member not found"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["members"],"summary":"Updates a member (must have admin credentials)","operationId":"updateMember","parameters":[{"description":"Information needed to update the member.","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["name","istid"],"properties":{"istid":{"type":"string"},"name":{"type":"string"}}}},{"type":"string","description":"ID of the member","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Updated member.","schema":{"$ref":"#/definitions/member"}},"400":{"description":"Invalid input or couldn't updated the member."},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"}}},"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["members"],"summary":"Delete a member by ID","operationId":"deleteMember","parameters":[{"type":"string","description":"ID of the member","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Deleted Member with the specific ID","schema":{"$ref":"#/definitions/member"}},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Member not found"},"406":{"description":"Member associated with other objects, not possible to delete"}}}},"/members/{id}/participations":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["members"],"summary":"Get member's participations","operationId":"getMemberParticipations","parameters":[{"type":"string","description":"ID of the member","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Member with all participations","schema":{"type":"array","items":{"$ref":"#/definitions/memberParticipation"}}},"401":{"description":"Unauthorized"},"404":{"description":"Member not found"},"417":{"description":"Unable to get member's credentials"}}}},"/members/{id}/role":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["members"],"summary":"Get member's role","operationId":"getMemberRole","parameters":[{"type":"string","description":"ID of the member","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Member with the specific ID","schema":{"type":"object","properties":{"role":{"type":"string","enum":["MEMBER","TEAMLEADER","COORDINATOR","ADMIN"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Member not found"},"417":{"description":"Unable to get member's credentials"}}}},"/packages":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["packages"],"summary":"Get packages","operationId":"getPackages","parameters":[{"type":"string","description":"Name of the package","name":"name","in":"query"},{"type":"integer","description":"Price of the package","name":"price","in":"query"},{"type":"integer","description":"VAT of the package","name":"vat","in":"query"}],"responses":{"200":{"description":"Packages filtered by the query","schema":{"type":"array","items":{"$ref":"#/definitions/package"}}},"400":{"description":"Invalid price or vat on query"},"401":{"description":"Unauthorized"},"417":{"description":"Unable to get packages"}}},"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["packages"],"summary":"Creates a new package (must have coordinator credentials)","operationId":"createPackage","parameters":[{"description":"New package data","name":"package","in":"body","required":true,"schema":{"type":"object","required":["name","items","price","vat"],"properties":{"items":{"type":"object","properties":{"item":{"type":"string"},"public":{"type":"boolean"},"quantity":{"type":"integer"}}},"name":{"type":"string"},"price":{"type":"integer"},"vat":{"type":"integer"}}}}],"responses":{"200":{"description":"Created package","schema":{"$ref":"#/definitions/package"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"417":{"description":"Unable to create the package"}}}},"/packages/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["packages"],"summary":"Get package by ID","operationId":"getPackage","parameters":[{"type":"string","description":"ID of the package","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Package with the specific ID","schema":{"$ref":"#/definitions/package"}},"401":{"description":"Unauthorized"},"404":{"description":"Package not found"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["packages"],"summary":"Updates a specific package (must have coordinator credentials)","operationId":"updatePackage","parameters":[{"type":"string","description":"ID of the package","name":"id","in":"path","required":true},{"description":"New package data","name":"package","in":"body","required":true,"schema":{"type":"object","required":["name","price","vat"],"properties":{"name":{"type":"string"},"price":{"type":"integer"},"vat":{"type":"integer"}}}}],"responses":{"200":{"description":"Updated package","schema":{"$ref":"#/definitions/package"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Invalid package ID"},"417":{"description":"Unable to update the package"}}}},"/packages/{id}/items":{"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["packages","items"],"summary":"Updates a specific package's items (must have coordinator credentials)","operationId":"updatePackageItems","parameters":[{"type":"string","description":"ID of the package","name":"id","in":"path","required":true},{"description":"New package data","name":"package","in":"body","required":true,"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string"},"quantity":{"type":"integer"}}}}}}}],"responses":{"200":{"description":"Updated package","schema":{"$ref":"#/definitions/package"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Invalid package ID"},"417":{"description":"Unable to update the package"}}}},"/posts/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["posts"],"summary":"Get post by ID","operationId":"getPost","parameters":[{"type":"string","description":"ID of the post","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Post with the specific ID","schema":{"$ref":"#/definitions/post"}},"401":{"description":"Unauthorized"},"404":{"description":"Post not found"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["posts"],"summary":"Update post by ID","operationId":"updatePost","parameters":[{"type":"string","description":"ID of the post","name":"id","in":"path","required":true},{"description":"Data need for post update","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string"}}}}],"responses":{"200":{"description":"Post with the updated data","schema":{"$ref":"#/definitions/post"}},"400":{"description":"Bad payload"},"401":{"description":"Unauthorized"},"404":{"description":"Post not found"},"417":{"description":"Unable to update post"}}}},"/public/companies":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["companies","public"],"summary":"Public endpoint for getting all companies","operationId":"getCompaniesPublic","parameters":[{"type":"string","description":"Name of the company","name":"name","in":"query"},{"type":"integer","description":"ID of the event","name":"event","in":"query"},{"type":"boolean","description":"Companies participating as partner","name":"partner","in":"query"}],"responses":{"200":{"description":"Companies filtered by the query","schema":{"type":"array","items":{"$ref":"#/definitions/publicCompany"}}},"417":{"description":"Unable to get companies"}}}},"/public/companies/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["companies","public"],"summary":"Get public company by ID","operationId":"getCompanyPublic","parameters":[{"type":"string","description":"ID of the company","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Public company with the specific ID","schema":{"$ref":"#/definitions/publicCompany"}},"401":{"description":"Unauthorized"},"404":{"description":"company not found"}}}},"/public/events":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["events","public"],"summary":"Public endpoint for getting all events","operationId":"getEventsPublic","parameters":[{"type":"boolean","description":"Get current event\nOn empty query (both current and pastEvents), returns all the events","name":"current","in":"query"},{"type":"boolean","description":"Get all the events except the current one\nOn empty query (both current and pastEvents), returns all the events","name":"pastEvents","in":"query"}],"responses":{"200":{"description":"Events filtered by the query","schema":{"type":"array","items":{"$ref":"#/definitions/publicEvent"}}},"400":{"description":"Unable to make query"},"417":{"description":"Unable to get events"}}}},"/public/events/latest":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["events","public"],"summary":"Public endpoint for getting latest event","operationId":"getLatestEvent","responses":{"200":{"description":"Latest event","schema":{"$ref":"#/definitions/event"}},"417":{"description":"Unable to get event"}}}},"/public/members":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["members","public"],"summary":"Get all members, based on query","operationId":"getMembersPublic","parameters":[{"type":"string","description":"Name of the member","name":"name","in":"query"},{"type":"integer","format":"int64","description":"Member from this event","name":"event","in":"query"}],"responses":{"200":{"description":"Members filtered by the query","schema":{"type":"array","items":{"$ref":"#/definitions/publicMember"}}},"417":{"description":"Unable to get members"}}}},"/public/sessions":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["sessions","public"],"summary":"Get all sessions, based on query","operationId":"getSessionsPublic","parameters":[{"type":"integer","format":"int64","description":"Session from this event","name":"event","in":"query"},{"enum":["TALK","PRESENTATION","WORKSHOP"],"type":"string","description":"Kind of session","name":"kind","in":"query"}],"responses":{"200":{"description":"Sessions filtered by the query","schema":{"type":"array","items":{"$ref":"#/definitions/publicSession"}}},"417":{"description":"Unable to get sessions"}}}},"/public/sessions/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["sessions","public"],"summary":"Get public session by ID","operationId":"getSessionPublic","parameters":[{"type":"string","description":"ID of the session","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Public session with the specific ID","schema":{"$ref":"#/definitions/publicSession"}},"401":{"description":"Unauthorized"},"404":{"description":"session not found"}}}},"/public/speakers":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["speakers","public"],"summary":"Public endpoint for getting all speakers","operationId":"getSpeakersPublic","parameters":[{"type":"string","description":"Name of the speaker","name":"name","in":"query"},{"type":"integer","description":"ID of the event","name":"event","in":"query"}],"responses":{"200":{"description":"Speakers filtered by the query","schema":{"type":"array","items":{"$ref":"#/definitions/publicSpeaker"}}},"417":{"description":"Unable to get speakers"}}}},"/public/speakers/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers","public"],"summary":"Get public speaker by ID","operationId":"getSpeakerPublic","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Public speaker with the specific ID","schema":{"$ref":"#/definitions/publicSpeaker"}},"401":{"description":"Unauthorized"},"404":{"description":"Speaker not found"}}}},"/sessions":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["sessions"],"summary":"Get sessions","operationId":"getSessions","parameters":[{"type":"integer","format":"int64","description":"Session from this event","name":"event","in":"query"},{"type":"string","format":"date-time","description":"Session began before this date","name":"before","in":"query"},{"type":"string","format":"date-time","description":"Session ended after this date","name":"after","in":"query"},{"type":"string","description":"Session happened on this location inside the venue","name":"place","in":"query"},{"enum":["TALK","PRESENTATION","WORKSHOP"],"type":"string","description":"Kind of session","name":"kind","in":"query"},{"type":"string","description":"Session given by this company","name":"company","in":"query"},{"type":"string","description":"Session given by this speaker","name":"speaker","in":"query"}],"responses":{"200":{"description":"Sessions filtered by query","schema":{"type":"array","items":{"$ref":"#/definitions/session"}}},"401":{"description":"Unauthorized"},"417":{"description":"Unable to make query"}}}},"/sessions/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["sessions"],"summary":"Get session by ID","operationId":"getSession","parameters":[{"type":"string","description":"ID of the session","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Session with the specific ID","schema":{"$ref":"#/definitions/session"}},"401":{"description":"Unauthorized"},"404":{"description":"Session not found"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["sessions"],"summary":"Updates session (must have coordinator credentials)","operationId":"updateSession","parameters":[{"type":"string","description":"ID of the session","name":"id","in":"path","required":true},{"description":"New session data\n - kind: TALK, PRESENTATION or WORKSHOP\n - if kind=TALK, then speaker must be specified\n - if kind=PRESENTATION or kind=WORKSHOP, then company must be specified\n - place is optional\n - videoURL is optional","name":"session","in":"body","required":true,"schema":{"type":"object","required":["begin","end","title","description","kind"],"properties":{"begin":{"type":"string","format":"date-time"},"company":{"type":"string"},"description":{"type":"string"},"end":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["TALK","PRESENTATION","WORKSHOP"]},"place":{"type":"string"},"speaker":{"type":"string"},"tickets":{"type":"object","properties":{"end":{"type":"string","format":"date-time"},"max":{"type":"integer"},"start":{"type":"string","format":"date-time"}}},"title":{"type":"string"},"videoURL":{"type":"string"}}}}],"responses":{"200":{"description":"Updated session","schema":{"$ref":"#/definitions/session"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Session not found"},"417":{"description":"Unable to update session"}}},"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["sessions"],"summary":"Delete a specific session","operationId":"deleteSession","parameters":[{"type":"string","description":"Id of the session to be deleted.","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Session deleted successfully","schema":{"type":"array","items":{"$ref":"#/definitions/session"}}},"401":{"description":"Unauthorized"},"404":{"description":"Session not found."}}}},"/speakers":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers"],"summary":"Get all speakers","operationId":"getSpeakers","parameters":[{"type":"string","description":"Name of the speaker","name":"name","in":"query"},{"type":"integer","description":"Has a participation entry for this event","name":"event","in":"query"},{"type":"string","description":"Was contacted by this member","name":"member","in":"query"}],"responses":{"200":{"description":"Speakers filtered by the query","schema":{"type":"array","items":{"$ref":"#/definitions/speaker"}}},"401":{"description":"Unauthorized"},"417":{"description":"Unable to get speakers"}}},"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers"],"summary":"Create a new speaker","operationId":"createSpeaker","parameters":[{"description":"Information needed to create the new speaker.","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["name","title","bio"],"properties":{"bio":{"type":"string"},"name":{"type":"string"},"title":{"type":"string"}}}}],"responses":{"200":{"description":"Created speaker","schema":{"$ref":"#/definitions/speaker"}},"400":{"description":"Invalid input or couldn't create the new speaker"},"401":{"description":"Unauthorized"}}}},"/speakers/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers"],"summary":"Get speaker by ID","operationId":"getSpeaker","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Speaker with the specific ID","schema":{"$ref":"#/definitions/speaker"}},"401":{"description":"Unauthorized"},"404":{"description":"Speaker not found"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers"],"summary":"Update speaker by ID","operationId":"updateSpeaker","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true},{"description":"Information needed to update the speaker.","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["name","bio","title","notes"],"properties":{"bio":{"type":"string"},"name":{"type":"string"},"notes":{"type":"string"},"title":{"type":"string"}}}}],"responses":{"200":{"description":"Updated speaker","schema":{"$ref":"#/definitions/speaker"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"404":{"description":"Speaker not found"},"417":{"description":"Unable to update speaker"}}},"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers"],"summary":"Delete a specific speaker","operationId":"deleteSpeaker","parameters":[{"type":"string","description":"Id of the speaker","name":"id","in":"path","required":true}],"responses":{"200":{"description":"The deleted speaker","schema":{"type":"array","items":{"$ref":"#/definitions/speaker"}}},"401":{"description":"Unauthorized"},"404":{"description":"Speaker not found"}}}},"/speakers/{id}/image/internal":{"post":{"security":[{"Bearer":[]}],"consumes":["multipart/form-data"],"produces":["application/json"],"tags":["speakers"],"summary":"Update speaker's internal image by ID","operationId":"updateSpeakerInternalImage","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true},{"type":"file","description":"Photo of speaker","name":"image","in":"formData"}],"responses":{"200":{"description":"Speaker with the updated data","schema":{"$ref":"#/definitions/speaker"}},"400":{"description":"Invalid image data"},"401":{"description":"Unauthorized"},"404":{"description":"Speaker not found"},"417":{"description":"Unable to perform operation"}}}},"/speakers/{id}/image/public/company":{"post":{"security":[{"Bearer":[]}],"consumes":["multipart/form-data"],"produces":["application/json"],"tags":["speakers"],"summary":"Update speaker's company public image by ID (must have at least coordinator credentials)","operationId":"updateSpeakerCompanyImage","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true},{"type":"file","description":"Logo of speaker's company","name":"image","in":"formData"}],"responses":{"200":{"description":"Speaker with the updated data","schema":{"$ref":"#/definitions/speaker"}},"400":{"description":"Invalid image data"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Speaker not found"},"417":{"description":"Unable to perform operation"}}}},"/speakers/{id}/image/public/speaker":{"post":{"security":[{"Bearer":[]}],"consumes":["multipart/form-data"],"produces":["application/json"],"tags":["speakers"],"summary":"Update speaker's public image by ID (must have at least coordinator credentials)","operationId":"updateSpeakerPublicImage","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true},{"type":"file","description":"Photo of speaker","name":"image","in":"formData"}],"responses":{"200":{"description":"Speaker with the updated data","schema":{"$ref":"#/definitions/speaker"}},"400":{"description":"Invalid image data"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Speaker not found"},"417":{"description":"Unable to perform operation"}}}},"/speakers/{id}/participation":{"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers"],"summary":"Update speaker's participation on the current event","operationId":"updateSpeakerParticipation","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true},{"description":"New participation information","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["member","feedback","room"],"properties":{"feedback":{"type":"string"},"member":{"type":"string"},"room":{"type":"object","properties":{"cost":{"type":"integer"},"notes":{"type":"string"},"type":{"type":"string"}}}}}}],"responses":{"200":{"description":"Updated speaker","schema":{"$ref":"#/definitions/speaker"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"404":{"description":"Speaker not found"},"417":{"description":"Unable to update speaker's participation data"}}},"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers"],"summary":"Adds participation on the current event to a speaker","operationId":"addSpeakerParticipation","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Updated speaker","schema":{"$ref":"#/definitions/speaker"}},"400":{"description":"Unable to add participation for the current event to this speaker"},"401":{"description":"Unauthorized"},"404":{"description":"Speaker not found"}}},"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers"],"summary":"Removes a speakers' participation from the current event. Admin only and must have no communications and not be associated with any session ","operationId":"removeSpeakerParticipation","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Updated speaker","schema":{"$ref":"#/definitions/speaker"}},"401":{"description":"Unauthorized"},"404":{"description":"Speaker not found"},"417":{"description":"Unable to remove speaker's participation: Has communications or is associated with a session"}}}},"/speakers/{id}/participation/flightInfo":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers","flightInfo"],"summary":"Adds flightInfo to a speaker's participation","operationId":"addSpeakerFlightInfo","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true},{"description":"Information needed to create a flight info.\n - Inbound/outbound: airports\n - Link: URL to the flight company's flight\n - Cost: in cents (€)","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["inbound","outbound","from","to","bought","cost","notes"],"properties":{"bought":{"type":"boolean"},"cost":{"description":"In cents (€)","type":"integer"},"from":{"description":"Airport","type":"string"},"inbound":{"type":"string","format":"date-time"},"link":{"description":"URL to the flight","type":"string"},"notes":{"type":"string"},"outbound":{"type":"string","format":"date-time"},"to":{"description":"Airport","type":"string"}}}}],"responses":{"200":{"description":"Updated speaker","schema":{"$ref":"#/definitions/speaker"}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"404":{"description":"Speaker not found"},"417":{"description":"Unable to create flight info, or add it to the speaker's participation"}}}},"/speakers/{id}/participation/flightInfo/{flightInfoID}":{"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers","flightInfo"],"summary":"Removes flightInfo from a speaker's participation, and deletes it from the database (must have at least coordinator credentials)","operationId":"removeSpeakerFlightInfo","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true},{"type":"string","description":"ID of the flightInfo","name":"flightInfoID","in":"path","required":true}],"responses":{"200":{"description":"Updated speaker","schema":{"$ref":"#/definitions/speaker"}},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Speaker not found"},"417":{"description":"Unable to remove or delete flight info"}}}},"/speakers/{id}/participation/status/next":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers"],"summary":"Gets all the valid steps to be taken on a speaker's participation status on the current event","operationId":"getvalidSpeakerParticipationStatusSteps","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Valid steps","schema":{"type":"object","properties":{"steps":{"type":"array","items":{"type":"object","properties":{"next":{"type":"string","enum":["SUGGESTED","SELECTED","ON_HOLD","CONTACTED","IN_CONVERSATIONS","ACCEPTED","REJECTED","GIVEN_UP","ANNOUNCED"]},"step":{"type":"integer"}}}}}}},"400":{"description":"Speaker without participation on the current event"},"401":{"description":"Unauthorized"},"404":{"description":"Speaker not found"}}}},"/speakers/{id}/participation/status/{status}":{"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers"],"summary":"Update a speaker's participation status on the current event (admin credentials)","operationId":"updateSpeakerParticipationStatus","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true},{"enum":["SUGGESTED","SELECTED","ON_HOLD","CONTACTED","IN_CONVERSATIONS","ACCEPTED","REJECTED","GIVEN_UP","ANNOUNCED"],"type":"string","description":"New status","name":"status","in":"path","required":true}],"responses":{"200":{"description":"Updated speaker","schema":{"$ref":"#/definitions/speaker"}},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Speaker not found"},"417":{"description":"Unable to update speaker's participation status"}}}},"/speakers/{id}/participation/status/{step}":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers"],"summary":"Step a speaker's participation status on the current event","operationId":"stepSpeakerParticipationStatus","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true},{"type":"integer","description":"Step to the next status","name":"step","in":"path","required":true}],"responses":{"200":{"description":"Updated speaker","schema":{"$ref":"#/definitions/speaker"}},"401":{"description":"Unauthorized"},"404":{"description":"Speaker not found"},"417":{"description":"Unable to update speaker's participation status"}}}},"/speakers/{id}/participation/thread/{threadID}":{"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers","threads"],"summary":"Deletes thread from a speaker participation","operationId":"deleteSpeakerThread","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true},{"type":"string","description":"ID of the thread","name":"threadID","in":"path","required":true}],"responses":{"200":{"description":"Updated speaker","schema":{"$ref":"#/definitions/speaker"}},"400":{"description":"Invalid payload, or invalid credentials"},"401":{"description":"Unauthorized"},"404":{"description":"Meeting not found"}}}},"/speakers/{id}/subscribe":{"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers"],"summary":"Subscribe to speaker by ID","operationId":"subscribeToSpeaker","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Updated speaker","schema":{"$ref":"#/definitions/speaker"}},"401":{"description":"Unauthorized"},"404":{"description":"Speaker not found"},"417":{"description":"Unable to subscribe to speaker"}}}},"/speakers/{id}/thread":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers","threads"],"summary":"Adds thread on the current event to a speaker","operationId":"addSpeakerThread","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true},{"description":"New thread information","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["text","kind"],"properties":{"kind":{"type":"string","enum":["TEMPLATE","TO","FROM","MEETING","PHONE_CALL"]},"meeting":{"type":"object","properties":{"begin":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"participants":{"type":"object","properties":{"companyReps":{"type":"array","items":{"type":"string"}},"members":{"type":"array","items":{"type":"string"}}}},"place":{"type":"string"}}},"text":{"type":"string"}}}}],"responses":{"200":{"description":"Updated speaker","schema":{"$ref":"#/definitions/speaker"}},"400":{"description":"Invalid payload, or invalid credentials"},"401":{"description":"Unauthorized"},"404":{"description":"Speaker not found"},"417":{"description":"Unable to create post, create thread or add created thread to speaker participation"}}}},"/speakers/{id}/unsubscribe":{"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["speakers"],"summary":"Unsubscribe to speaker by ID","operationId":"unsubscribeToSpeaker","parameters":[{"type":"string","description":"ID of the speaker","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Updated speaker","schema":{"$ref":"#/definitions/speaker"}},"401":{"description":"Unauthorized"},"404":{"description":"Speaker not found"},"417":{"description":"Unable to unsubscribe from speaker"}}}},"/teams":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["teams"],"summary":"Get all teams","operationId":"getTeams","parameters":[{"type":"string","description":"Name of the team","name":"name","in":"query"},{"type":"string","description":"Contains this member","name":"member","in":"query"},{"type":"string","description":"Contains all the members whose name match the given on this query","name":"memberName","in":"query"},{"type":"integer","format":"int64","description":"Team from this event","name":"event","in":"query"}],"responses":{"200":{"description":"Teams filtered by the query","schema":{"type":"array","items":{"$ref":"#/definitions/team"}}},"401":{"description":"Unauthorized"},"417":{"description":"Unable to get teams"}}},"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["teams"],"summary":"Create a new team (must have coordinator credentials). Created teams are added to the current event","operationId":"createTeam","parameters":[{"description":"Information needed to create the new team.","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}}}],"responses":{"200":{"description":"Created team.","schema":{"$ref":"#/definitions/team"}},"400":{"description":"Invalid input or couldn't create the new team."},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"}}}},"/teams/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["teams"],"summary":"Get team by ID","operationId":"getTeam","parameters":[{"type":"string","description":"ID of the team","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Team with the specific ID","schema":{"$ref":"#/definitions/team"}},"401":{"description":"Unauthorized"},"404":{"description":"Team not found"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["teams"],"summary":"Updates a teams's name (must have coordinator credentials)","operationId":"updateTeam","parameters":[{"description":"New team data","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}}},{"type":"string","description":"ID of the team","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Updated team","schema":{"$ref":"#/definitions/team"}},"400":{"description":"Invalid payload, or couldn't update team"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"417":{"description":"Couldn't find team"}}},"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["teams"],"summary":"Deletes a team (must have admin credentials)","operationId":"deleteTeam","parameters":[{"type":"string","description":"ID of the team","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Deleted team","schema":{"$ref":"#/definitions/team"}},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Team not found"}}}},"/teams/{id}/meetings":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["teams","meetings"],"summary":"Creates a meeting and adds it to a team","operationId":"addTeamMeeting","parameters":[{"description":"New meeting data","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["title","kind","begin","end","local"],"properties":{"begin":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["EVENT","TEAM","COMPANY"]},"local":{"type":"string"},"title":{"type":"string"}}}},{"type":"string","description":"ID of the team","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Updated team","schema":{"$ref":"#/definitions/team"}},"400":{"description":"Invalid payload, or couldn't create meeting"},"401":{"description":"Unauthorized"},"417":{"description":"Couldn't find team"}}}},"/teams/{id}/meetings/{meetingID}":{"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["teams","meetings"],"summary":"Removes a meeting from a team (must have at least Team Leader credentials)","operationId":"deleteTeamMeeting","parameters":[{"type":"string","description":"ID of the team","name":"id","in":"path","required":true},{"type":"string","description":"ID of the meeting","name":"meetingID","in":"path","required":true}],"responses":{"200":{"description":"Removed meeting","schema":{"$ref":"#/definitions/meeting"}},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Couldn't find team or meeting, or meeting not on team"},"417":{"description":"Couldn't find team"}}}},"/teams/{id}/members":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["teams","members"],"summary":"Add a new member to the team (must have coordinator credentials)","operationId":"addTeamMember","parameters":[{"type":"string","description":"ID of the team","name":"id","in":"path","required":true},{"description":"New member data","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["member","role"],"properties":{"member":{"type":"string"},"role":{"type":"string","enum":["MEMBER","TEAMLEADER","COORDINATOR","ADMIN"]}}}}],"responses":{"200":{"description":"Team with the added member","schema":{"$ref":"#/definitions/team"}},"400":{"description":"Bad name or role on payload"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Team or member not found"}}}},"/teams/{id}/members/{memberID}":{"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["teams","members"],"summary":"Updates a member's role on the team (must have coordinator credentials)","operationId":"updateTeamMemberRole","parameters":[{"type":"string","description":"ID of the team","name":"id","in":"path","required":true},{"type":"string","description":"ID of the member","name":"memberID","in":"path","required":true},{"description":"New member data","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["member","role"],"properties":{"role":{"type":"string"}}}}],"responses":{"200":{"description":"Team with the updated member","schema":{"$ref":"#/definitions/team"}},"400":{"description":"Bad name or role on payload"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Team or member not found"}}},"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["teams","members"],"summary":"Removes a member from the team (must have coordinator credentials)","operationId":"deleteTeamMember","parameters":[{"type":"string","description":"ID of the team","name":"id","in":"path","required":true},{"type":"string","description":"ID of the member","name":"memberID","in":"path","required":true}],"responses":{"200":{"description":"Team without the removed member","schema":{"$ref":"#/definitions/team"}},"400":{"description":"Bad name or role on payload"},"401":{"description":"Unauthorized"},"403":{"description":"Valid authorization, but not enough credentials"},"404":{"description":"Team or member not found"}}}},"/threads/{id}":{"get":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["threads"],"summary":"Get thread by ID","operationId":"getThread","parameters":[{"type":"string","description":"ID of the thread","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Thread with the specific ID","schema":{"$ref":"#/definitions/thread"}},"401":{"description":"Unauthorized"},"404":{"description":"Thread not found"}}},"put":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["threads"],"summary":"Updates a thread. Only valid if you own the thread (or admin)","operationId":"updateThread","parameters":[{"type":"string","description":"ID of the thread","name":"id","in":"path","required":true},{"description":"Update data","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["kind","meeting (optional)"],"properties":{"kind":{"type":"string"},"meeting":{"type":"string"}}}}],"responses":{"200":{"description":"Updated thread","schema":{"$ref":"#/definitions/thread"}},"401":{"description":"Unauthorized"},"403":{"description":"Authtenticated, but access level is not enough"},"404":{"description":"Thread not found"}}},"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["threads"],"summary":"Deletes a thread and its comments. Only valid if you own the thread (or admin)","operationId":"deleteThread","parameters":[{"type":"string","description":"ID of the thread","name":"id","in":"path","required":true}],"responses":{"200":{"description":"Deleted thread","schema":{"$ref":"#/definitions/thread"}},"401":{"description":"Unauthorized"},"403":{"description":"Authtenticated, but access level is not enough"},"404":{"description":"Thread not found"}}}},"/threads/{id}/comments":{"post":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["threads","posts"],"summary":"Add comment to thread","operationId":"addCommentToThread","parameters":[{"type":"string","description":"ID of the thread","name":"id","in":"path","required":true},{"description":"Comment data","name":"payload","in":"body","required":true,"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string"}}}}],"responses":{"200":{"description":"Updated Thread","schema":{"$ref":"#/definitions/thread"}},"401":{"description":"Unauthorized"},"417":{"description":"Thread not found, or unable to create and/or add post to thread"}}}},"/threads/{threadID}/comments/{postID}":{"delete":{"security":[{"Bearer":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":["threads","posts"],"summary":"Remove comment from thread","operationId":"removeCommentFromThread","parameters":[{"type":"string","description":"ID of the thread","name":"threadID","in":"path","required":true},{"type":"string","description":"ID of the post","name":"postID","in":"path","required":true}],"responses":{"200":{"description":"Updated Thread","schema":{"$ref":"#/definitions/thread"}},"401":{"description":"Unauthorized"},"404":{"description":"Thread or post not found"},"417":{"description":"Unable to remove post from thread"}}}}},"definitions":{"billing":{"type":"object","properties":{"company":{"type":"string"},"emission":{"type":"string","format":"date-time"},"event":{"type":"integer"},"id":{"type":"string"},"invoiceNumber":{"type":"integer"},"notes":{"type":"string"},"status":{"type":"object","properties":{"invoice":{"type":"boolean"},"paid":{"type":"boolean"},"proForma":{"type":"boolean"},"receipt":{"type":"boolean"}}},"value":{"type":"integer"},"visible":{"type":"boolean"}}},"company":{"type":"object","properties":{"billingInfo":{"type":"object","properties":{"address":{"type":"string"},"name":{"type":"string"},"tin":{"type":"string"}}},"description":{"type":"string"},"employers":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"imgs":{"type":"object","properties":{"internal":{"type":"string"},"public":{"type":"string"}}},"name":{"type":"string"},"participations":{"type":"array","items":{"type":"object","properties":{"billing":{"type":"string"},"communications":{"type":"array","items":{"type":"string"}},"confirmed":{"type":"string","format":"date-time"},"event":{"type":"integer","format":"int64"},"member":{"type":"string"},"notes":{"type":"string"},"package":{"type":"string"},"partner":{"type":"boolean"},"status":{"type":"string","enum":["SUGGESTED","SELECTED","ON_HOLD","CONTACTED","IN_CONVERSATIONS","ACCEPTED","REJECTED","GIVEN_UP","ANNOUNCED"]},"subscribers":{"type":"array","items":{"type":"string"}}}}},"site":{"type":"string"}}},"companyRep":{"type":"object","properties":{"contact":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"}}},"contact":{"type":"object","properties":{"id":{"type":"string"},"mails":{"type":"array","items":{"type":"object","properties":{"mail":{"type":"string"},"personal":{"type":"boolean"},"valid":{"type":"boolean"}}}},"phones":{"type":"array","items":{"type":"object","properties":{"phone":{"type":"string"},"valid":{"type":"boolean"}}}},"socials":{"type":"object","properties":{"facebook":{"type":"string"},"github":{"type":"string"},"linkedin":{"type":"string"},"skype":{"type":"string"},"twitter":{"type":"string"}}}}},"event":{"type":"object","properties":{"begin":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"id":{"type":"integer","format":"int64"},"items":{"type":"array","items":{"type":"string"}},"meetings":{"type":"array","items":{"type":"string"}},"name":{"type":"string"},"packages":{"type":"array","items":{"type":"object","properties":{"available":{"type":"boolean"},"public_name":{"type":"string"},"template":{"type":"string"}}}},"sessions":{"type":"array","items":{"type":"string"}},"teams":{"type":"array","items":{"type":"string"}},"themes":{"type":"array","items":{"type":"string"}}}},"flightInfo":{"type":"object","properties":{"bought":{"type":"boolean"},"cost":{"type":"integer"},"from":{"type":"string"},"id":{"type":"string"},"inbound":{"type":"string","format":"date-time"},"link":{"type":"string"},"notes":{"type":"string"},"outbound":{"type":"string","format":"date-time"},"to":{"type":"string"}}},"item":{"type":"object","properties":{"description":{"type":"string"},"id":{"type":"string"},"img":{"type":"string"},"name":{"type":"string"},"price":{"type":"integer"},"type":{"type":"string"},"vat":{"type":"integer"}}},"meeting":{"type":"object","properties":{"begin":{"type":"string","format":"date-time"},"communications":{"type":"array","items":{"type":"string"}},"end":{"type":"string","format":"date-time"},"id":{"type":"string"},"kind":{"type":"string","enum":["EVENT","TEAM","COMPANY"]},"minute":{"type":"string"},"participants":{"type":"object","properties":{"companyReps":{"type":"array","items":{"type":"string"}},"members":{"type":"array","items":{"type":"string"}}}},"place":{"type":"string"},"title":{"type":"string"}}},"member":{"type":"object","properties":{"contact":{"type":"string"},"id":{"type":"string"},"img":{"type":"string"},"istid":{"type":"string"},"name":{"type":"string"},"sinfoid":{"type":"string"}}},"memberParticipation":{"type":"object","properties":{"event":{"type":"integer"},"role":{"type":"string","enum":["MEMBER","TEAMLEADER","COORDINATOR","ADMIN"]},"team":{"type":"string"}}},"notification":{"type":"object","properties":{"company":{"type":"string"},"date":{"type":"string","format":"date-time"},"id":{"type":"string"},"kind":{"type":"string","enum":["CREATED","UPDATED","TAGGED","DELETED"]},"meeting":{"type":"string"},"member":{"type":"string"},"post":{"type":"string"},"session":{"type":"string"},"signature":{"type":"string"},"speaker":{"type":"string"}}},"package":{"type":"object","properties":{"id":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string"},"public":{"type":"boolean"},"quantity":{"type":"integer"}}}},"name":{"type":"string"},"price":{"type":"integer"},"vat":{"type":"integer"}}},"post":{"type":"object","properties":{"id":{"type":"string"},"member":{"type":"string"},"posted":{"type":"string","format":"date-time"},"text":{"type":"string"},"updated":{"type":"string","format":"date-time"}}},"publicCompany":{"type":"object","properties":{"id":{"type":"string"},"img":{"type":"string"},"name":{"type":"string"},"participations":{"type":"array","items":{"type":"object","properties":{"event":{"type":"integer"},"package":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string"},"quantity":{"type":"integer"}}}},"name":{"type":"string"}}},"partner":{"type":"boolean"}}}},"site":{"type":"string"}}},"publicEvent":{"type":"object","properties":{"begin":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"themes":{"type":"array","items":{"type":"string"}}}},"publicMember":{"type":"object","properties":{"img":{"type":"string"},"name":{"type":"string"},"socials":{"type":"object","properties":{"facebook":{"type":"string"},"github":{"type":"string"},"linkedin":{"type":"string"},"skype":{"type":"string"},"twitter":{"type":"string"}}}}},"publicSession":{"type":"object","properties":{"begin":{"type":"string","format":"date-time"},"company":{"$ref":"#/definitions/publicCompany"},"description":{"type":"string"},"end":{"type":"string","format":"date-time"},"id":{"type":"string"},"kind":{"type":"string","enum":["TALK","PRESENTATION","WORKSHOP"]},"place":{"type":"string"},"speaker":{"$ref":"#/definitions/publicSpeaker"},"tickets":{"type":"object","properties":{"end":{"type":"string","format":"date-time"},"max":{"type":"integer"},"start":{"type":"string","format":"date-time"}}},"title":{"type":"string"},"videoURL":{"type":"string"}}},"publicSpeaker":{"type":"object","properties":{"id":{"type":"string"},"imgs":{"type":"object","properties":{"company":{"type":"string"},"speaker":{"type":"string"}}},"name":{"type":"string"},"participations":{"type":"array","items":{"type":"object","properties":{"event":{"type":"integer"},"feedback":{"type":"string"}}}},"title":{"type":"string"}}},"session":{"type":"object","properties":{"begin":{"type":"string","format":"date-time"},"company":{"type":"string"},"description":{"type":"string"},"end":{"type":"string","format":"date-time"},"id":{"type":"string"},"kind":{"type":"string","enum":["TALK","PRESENTATION","WORKSHOP"]},"place":{"type":"string"},"speaker":{"type":"string"},"tickets":{"type":"object","properties":{"end":{"type":"string","format":"date-time"},"max":{"type":"integer"},"start":{"type":"string","format":"date-time"}}},"title":{"type":"string"},"videoURL":{"type":"string"}}},"speaker":{"type":"object","properties":{"bio":{"type":"string"},"contact":{"type":"string"},"id":{"type":"string"},"imgs":{"type":"object","properties":{"company":{"type":"string"},"internal":{"type":"string"},"speaker":{"type":"string"}}},"name":{"type":"string"},"notes":{"type":"string"},"participations":{"type":"array","items":{"type":"object","properties":{"communications":{"type":"array","items":{"type":"string"}},"event":{"type":"integer"},"feedback":{"type":"string"},"flights":{"type":"array","items":{"type":"string"}},"member":{"type":"string"},"room":{"type":"object","properties":{"cost":{"type":"integer"},"notes":{"type":"string"},"type":{"type":"string"}}},"status":{"type":"string","enum":["SUGGESTED","SELECTED","ON_HOLD","CONTACTED","IN_CONVERSATIONS","ACCEPTED","REJECTED","GIVEN_UP","ANNOUNCED"]},"subscribers":{"type":"array","items":{"type":"string"}}}}},"title":{"type":"string"}}},"team":{"type":"object","properties":{"id":{"type":"string"},"meetings":{"type":"array","items":{"type":"string"}},"members":{"type":"array","items":{"type":"object","properties":{"member":{"type":"string"},"role":{"type":"string","enum":["MEMBER","TEAMLEADER","COORDINATOR","ADMIN"]}}}},"name":{"type":"string"}}},"thread":{"type":"object","properties":{"comments":{"type":"array","items":{"type":"string"}},"entry":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string","enum":["TEMPLATE","TO","FROM","MEETING","PHONE_CALL"]},"meeting":{"type":"string"},"posted":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["APPROVED","REVIEWED","PENDING"]}}}},"securityDefinitions":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}},"tags":[{"description":"Public endpoints (don't need authentication)","name":"public"},{"description":"Authentication endpoints","name":"auth"},{"description":"Saved bills","name":"billings"},{"description":"Contacted companies","name":"companies"},{"description":"Person representing a certain company","name":"companyReps"},{"description":"All of our saved contacts","name":"contacts"},{"description":"Information relative to each event","name":"events"},{"description":"Saved flight information","name":"flightInfo"},{"description":"Items in packages sold by SINFO","name":"items"},{"description":"Saved meetings' information","name":"meetings"},{"description":"Member's personal endpoints","name":"me"},{"description":"Information related to each SINFO's member","name":"members"},{"description":"Notifications for our members to keep up with updated information","name":"notifications"},{"description":"Packages sold/traded by SINFO to companies","name":"packages"},{"description":"Messages shared by SINFO's members","name":"posts"},{"description":"Scheduled sessions for the event's week, such as keynotes, presentations, etc","name":"sessions"},{"description":"Speakers for the event's keynotes","name":"speakers"},{"description":"SINFO's teams","name":"teams"},{"description":"Additional communication taken inside the posts","name":"threads"}],"externalDocs":{"description":"Find out more about Swagger","url":"http://swagger.io"}} \ No newline at end of file diff --git a/backend/swagger/threads-id.json b/backend/swagger/threads-id.json index 35ec9d5c..6e6f4ccb 100644 --- a/backend/swagger/threads-id.json +++ b/backend/swagger/threads-id.json @@ -74,7 +74,7 @@ "type": "object", "required": [ "kind", - "meeting" + "meeting (optional)" ], "properties": { "kind": { diff --git a/frontend/lib/components/threads/editThreadForm.dart b/frontend/lib/components/threads/editThreadForm.dart new file mode 100644 index 00000000..ccf20c90 --- /dev/null +++ b/frontend/lib/components/threads/editThreadForm.dart @@ -0,0 +1,124 @@ +import 'package:flutter/material.dart'; +import 'package:frontend/models/post.dart'; +import 'package:frontend/models/thread.dart'; +import 'package:frontend/services/postService.dart'; +import 'package:frontend/services/threadService.dart'; + +class EditThreadForm extends StatefulWidget { + final Thread? thread; + final Post? post; + EditThreadForm({Key? key, this.thread, this.post}) : super(key: key); + + @override + _EditThreadFormState createState() => _EditThreadFormState(); +} + +class _EditThreadFormState extends State { + final _formKey = GlobalKey(); + late TextEditingController _textController; + String kind = 'TEMPLATE'; + + @override + void initState() { + super.initState(); + _textController = TextEditingController(text: widget.post!.text); + } + + void _submit(BuildContext context) async { + if (_formKey.currentState!.validate()) { + var text = _textController.text; + ScaffoldMessenger.of(context).showSnackBar( + const SnackBar(content: Text('Editing...')), + ); + + PostService _postService = PostService(); + ThreadService _threadService = ThreadService(); + + Post? p = await _postService.updatePost(widget.post!.id, text); + Thread? t = + await _threadService.updateThread(id: widget.thread!.id, kind: kind); + + if (p != null && t != null) { + ScaffoldMessenger.of(context).hideCurrentSnackBar(); + + ScaffoldMessenger.of(context).showSnackBar( + SnackBar( + content: Text('Done'), + duration: Duration(seconds: 2), + ), + ); + + Navigator.pop(context); + } else { + ScaffoldMessenger.of(context).hideCurrentSnackBar(); + + ScaffoldMessenger.of(context).showSnackBar( + const SnackBar(content: Text('An error occured.')), + ); + + Navigator.pop(context); + } + } + } + + @override + Widget build(BuildContext context) { + List kinds = ["TEMPLATE", "TO", "FROM", "PHONE_CALL", "MEETING"]; + return Form( + key: _formKey, + child: Column( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: TextFormField( + keyboardType: TextInputType.multiline, + textInputAction: TextInputAction.newline, + controller: _textController, + validator: (value) { + if (value == null || value.isEmpty) { + return 'Please add the content of communication'; + } + return null; + }, + decoration: const InputDecoration( + icon: const Icon(Icons.work), + labelText: "Content *", + ), + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: DropdownButtonFormField( + icon: Icon(Icons.tag), + items: kinds + .map( + (e) => DropdownMenuItem(value: e, child: Text(e))) + .toList(), + value: kinds[0], + selectedItemBuilder: (BuildContext context) { + return kinds.map((e) { + return Align( + alignment: AlignmentDirectional.centerStart, + child: Container(child: Text(e)), + ); + }).toList(); + }, + onChanged: (next) { + setState(() { + kind = next!; + }); + }, + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: ElevatedButton( + onPressed: () => _submit(context), + child: const Text('Submit'), + ), + ), + ], + ), + ); + } +} diff --git a/frontend/lib/components/threads/threadCard/threadCardHeader.dart b/frontend/lib/components/threads/threadCard/threadCardHeader.dart index 2f8a100e..efee9ed1 100644 --- a/frontend/lib/components/threads/threadCard/threadCardHeader.dart +++ b/frontend/lib/components/threads/threadCard/threadCardHeader.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:frontend/components/blurryDialog.dart'; +import 'package:frontend/components/threads/editThreadForm.dart'; import 'package:frontend/components/threads/threadCard/threadCard.dart'; import 'package:frontend/models/company.dart'; import 'package:frontend/models/meeting.dart'; @@ -7,9 +8,6 @@ import 'package:frontend/models/member.dart'; import 'package:frontend/models/post.dart'; import 'package:frontend/models/speaker.dart'; import 'package:frontend/models/thread.dart'; -import 'package:frontend/routes/company/CompanyTableNotifier.dart'; -import 'package:frontend/routes/meeting/MeetingsNotifier.dart'; -import 'package:frontend/routes/speaker/speakerNotifier.dart'; import 'package:frontend/services/companyService.dart'; import 'package:frontend/services/meetingService.dart'; import 'package:frontend/services/speakerService.dart'; @@ -108,6 +106,17 @@ class ThreadCardHeader extends StatelessWidget { ); } + void _editThreadModal(context) { + showModalBottomSheet( + context: context, + builder: (context) { + return Container( + child: EditThreadForm(thread: thread, post: p), + ); + }, + ); + } + @override Widget build(BuildContext context) { return FutureBuilder( @@ -178,7 +187,7 @@ class ThreadCardHeader extends StatelessWidget { padding: const EdgeInsets.all(8.0), child: IconButton( onPressed: () { - print("Edit thread"); + _editThreadModal(context); }, icon: Icon(Icons.edit)), ), diff --git a/frontend/lib/services/threadService.dart b/frontend/lib/services/threadService.dart index 8b15457b..acee0bde 100644 --- a/frontend/lib/services/threadService.dart +++ b/frontend/lib/services/threadService.dart @@ -52,7 +52,7 @@ class ThreadService extends Service { } } - Future updateThread(String id, String meetingId, String kind) async { //TODO are meetingId or kind nullable? + Future updateThread({required String id, String? meetingId, required String kind}) async { var body = { "meeting": meetingId, "kind": kind,