-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsocket.yml
More file actions
145 lines (145 loc) · 3.28 KB
/
Copy pathsocket.yml
File metadata and controls
145 lines (145 loc) · 3.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: user-invitation
description: Basic invitation mechanizm for user/resources
classes:
invitations:
- name: email
type: string
filter_index: true
- name: key
type: string
filter_index: true
- name: resourceID
type: string
filter_index: true
- name: resourceType
type: string
filter_index: true
- name: status
type: string
filter_index: true
- name: details
type: object
- name: sentAt
type: datetime
endpoints:
invite:
private: true
description: Create invitation for a given e-mail
inputs:
required:
- email
- resourceID
- resourceType
properties:
email:
type: string
description: User e-mail
example: joe@mail.com
resourceID:
type: integer
description: ID of the resource related to invitation
example: 12345
resourceType:
type: string
description: Type of the resource
example: company
details:
type: object
description: Invitation details inform of the object
example: |
{
"company_id": "12345"
}
outputs:
success:
exit_code: 200
description: Success
example: null
fail:
key: '1232141254215512521'
exit_code: 400
description: Failed
example: {}
get:
private: true
description: Get invitation by invtiation key
inputs:
properties:
key:
type: string
description: Key of the invitation
example: 1232141254215512600
outputs:
success:
exit_code: 200
fail:
exit_code: 400
get-by-email:
private: true
description: Get invitation by email
inputs:
required:
- email
- resourceID
- resourceType
properties:
email:
type: string
format: email
resourceID:
type: string
resourceType:
type: string
outputs:
success:
exit_code: 200
fail:
exit_code: 400
update:
private: true
description: Update invitation
inputs:
properties:
key:
type: string
description: Invitation key
example: 1232141254215512600
status:
type: string
description: Status of the invitation
example: pending
outputs:
success:
exit_code: 200
fail:
exit_code: 400
list:
private: true
description: List invitation for given resource ID and type
inputs:
properties:
resourceID:
type: integer
description: ID of the resource related to invitation
example: 12345
resourceType:
type: string
description: Type of the resource
example: company
outputs:
fail:
exit_code: 400
success:
exit_code: 200
examples:
description: Success
example: |
[
{
"email": "joe@mail.com",
"key": "1232141254215512521",
"details": {
"company_id": "12345"
}
}
]