Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
b76a0be
feat: added base create organization action
BrRenat Mar 1, 2019
3a1b791
fix: added organization create test
BrRenat Mar 4, 2019
e87a335
fix: added tests for create organization, edited method
BrRenat Mar 6, 2019
fc2bd00
feat: added organization updateMetadata method
BrRenat Mar 6, 2019
1adb1b4
feat: added remove organization methodf
BrRenat Mar 6, 2019
f20c961
fix: added organization info to members
BrRenat Mar 6, 2019
18a066e
feat: added method to switch organization state
BrRenat Mar 6, 2019
9f06b91
feat: added invite to organization method
BrRenat Mar 6, 2019
bef4729
fix: edited create organization
BrRenat Mar 7, 2019
0c40b8f
fix: edited create organization
BrRenat Mar 7, 2019
dd3aceb
fix: fix lint error
BrRenat Mar 7, 2019
4cc2f80
fix: fix discussions, edited resolveOrganization script
BrRenat Mar 10, 2019
48ff686
feat: added invite, members organization api
BrRenat Mar 11, 2019
cd78a91
fix: edited update organization metadata
BrRenat Mar 11, 2019
83d59f5
fix: fix resolve organization metadata
BrRenat Mar 12, 2019
568d716
fix: fix lint errors
BrRenat Mar 12, 2019
ce2a09f
feat: added getMetadata action
BrRenat Mar 12, 2019
52efbc6
fix: return oauth in test config
BrRenat Mar 12, 2019
92ae59e
fix: added organization api docs
BrRenat Mar 12, 2019
f00e516
fix: edited lua script, metadata test
BrRenat Mar 12, 2019
1e1e66e
fix: fix lua script
BrRenat Mar 12, 2019
103e06e
fix: fix updateMetadata test
BrRenat Mar 12, 2019
bf3f182
fix: edited invite member to organization
BrRenat Mar 19, 2019
a0e96b4
fix: edited add organization members
BrRenat Mar 20, 2019
6e07ce8
fix: fix organization members test
BrRenat Mar 20, 2019
7e6b9d6
fix: edited send invite action
BrRenat Mar 20, 2019
80ffac9
fix: fix get organization test
BrRenat Mar 20, 2019
96c353b
fix: fix lint test
BrRenat Mar 20, 2019
9df8646
fix: return oauth config
BrRenat Mar 20, 2019
218563a
fix: add allowed method to organization actions
BrRenat Mar 21, 2019
ccd3e9b
fix: fix auth in organization tests
BrRenat Mar 22, 2019
074d226
fix: restart semaphoreci
BrRenat Mar 22, 2019
5e7883c
feat: added request organizations list
BrRenat Mar 26, 2019
40a9e0c
fix: fix organizations lua script
BrRenat Mar 26, 2019
649bcdd
fix: remove organization id from ORGANIZATIONS_INDEX
BrRenat Mar 26, 2019
0996eb3
fix: edited allowed handler for organizations
BrRenat Mar 26, 2019
08e0d2d
fix: added lock on create organization, resolved discussions
BrRenat Mar 26, 2019
9f3971b
fix: returned bluebird promise
BrRenat Mar 26, 2019
e27d17b
fix: actions response format, switch name to id on requests
BrRenat Mar 27, 2019
70becb8
fix: edited create organization action
BrRenat Mar 28, 2019
17000d3
fix: skip facebook test
BrRenat Mar 28, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions schemas/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,73 @@
"minLength": 32,
"maxLength": 64,
"pattern": "^([A-Z2-7]{2}){16,32}$"
},
"metadata": {
"type": "object",
"minProperties": 1,
"properties": {
"$set": {
"type": "object",
"minProperties": 1,
"additionalProperties": {
"oneOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "array"
},
{
"type": "object"
},
{
"type": "boolean"
},
{
"type": "number"
}
]
}
},
"$remove": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 1
},
"$incr": {
"type": "object",
"minProperties": 1,
"additionalProperties": {
"type": "integer"
}
}
}
},
"organizationMember": {
"type": "object",
"required": [
"firstName",
"lastName",
"email"
],
"properties": {
"email": {
"type": "string"
},
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"permissions": {
"type": "array"
}
}
}
}
}
25 changes: 25 additions & 0 deletions schemas/organization.create.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"active": {
"type": "boolean"
},
"metadata": {
"type": "object",
"minProperties": 1
},
"members": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "common.json#/definitions/organizationMember"
}
}
}
}
11 changes: 11 additions & 0 deletions schemas/organization.delete.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"type": "object",
"required": [
"organizationId"
],
"properties": {
"organizationId": {
"type": "string"
}
}
}
11 changes: 11 additions & 0 deletions schemas/organization.get.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"type": "object",
"required": [
"organizationId"
],
"properties": {
"organizationId": {
"type": "string"
}
}
}
11 changes: 11 additions & 0 deletions schemas/organization.getMetadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"type": "object",
"required": [
"organizationId"
],
"properties": {
"organizationId": {
"type": "string"
}
}
}
20 changes: 20 additions & 0 deletions schemas/organization.invites.accept.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"type": "object",
"required": [
"organizationId",
"username",
"inviteToken"
],
"properties": {
Comment thread
BrRenat marked this conversation as resolved.
"organizationId": {
"type": "string"
},
"username": {
"type": "string"
},
"inviteToken": {
"type": "string",
"minLength": 1
}
}
}
15 changes: 15 additions & 0 deletions schemas/organization.invites.send.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"type": "object",
"required": [
"organizationId",
"member"
],
"properties": {
"organizationId": {
"type": "string"
},
"member": {
"$ref": "common.json#/definitions/organizationMember"
}
}
}
27 changes: 27 additions & 0 deletions schemas/organization.list.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"type": "object",
"properties": {
"offset": {
"type": "integer",
"minimum": 0
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100
},
"order": {
"type": "string",
"enum": [
"ASC",
"DESC"
]
},
"criteria": {
"type": "string"
},
"filter": {
"$ref": "common.json#/definitions/filter"
}
}
}
15 changes: 15 additions & 0 deletions schemas/organization.members.add.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"type": "object",
"required": [
"organizationId",
"member"
],
"properties": {
"organizationId": {
"type": "string"
},
"member": {
"$ref": "common.json#/definitions/organizationMember"
}
}
}
11 changes: 11 additions & 0 deletions schemas/organization.members.list.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"type": "object",
"required": [
"organizationId"
],
"properties": {
"organizationId": {
"type": "string"
}
}
}
38 changes: 38 additions & 0 deletions schemas/organization.members.permission.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"type": "object",
"required": [
"organizationId",
"username",
"permission"
],
"properties": {
"organizationId": {
"type": "string"
},
"username": {
"type": "string"
},
"permission": {
"type": "object",
"minProperties": 1,
"properties": {
"$set": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 1
},
"$remove": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 1
}
}
}
}
}
15 changes: 15 additions & 0 deletions schemas/organization.members.remove.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"type": "object",
"required": [
"organizationId",
"username"
],
"properties": {
"organizationId": {
"type": "string"
},
"username": {
"type": "string"
}
}
}
15 changes: 15 additions & 0 deletions schemas/organization.state.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"type": "object",
"required": [
"organizationId",
"active"
],
"properties": {
"organizationId": {
"type": "string"
},
"active": {
"type": "boolean"
}
}
}
15 changes: 15 additions & 0 deletions schemas/organization.updateMetadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"type": "object",
"required": [
"organizationId",
"metadata"
],
"properties": {
"organizationId": {
"type": "string"
},
"metadata": {
"$ref": "common.json#/definitions/metadata"
}
}
}
49 changes: 2 additions & 47 deletions schemas/updateMetadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"minLength": 1
},
"metadata": {
"$ref": "#/definitions/metadata"
"$ref": "common.json#/definitions/metadata"
}
}
},
Expand All @@ -34,7 +34,7 @@
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/metadata"
"$ref": "common.json#/definitions/metadata"
}
}
}
Expand Down Expand Up @@ -79,51 +79,6 @@
"type": "string",
"minLength": 3,
"maxLength": 50
},
"metadata": {
"type": "object",
"minProperties": 1,
"properties": {
"$set": {
"type": "object",
"minProperties": 1,
"additionalProperties": {
"oneOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "array"
},
{
"type": "object"
},
{
"type": "boolean"
},
{
"type": "number"
}
]
}
},
"$remove": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 1
},
"$incr": {
"type": "object",
"minProperties": 1,
"additionalProperties": {
"type": "integer"
}
}
}
}
}
}
Loading