@epilot/sdk 2.20.9 → 2.20.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/dist/apis/access-token.cjs +6 -6
  2. package/dist/apis/access-token.js +1 -1
  3. package/dist/apis/address-suggestions.cjs +6 -6
  4. package/dist/apis/address-suggestions.js +1 -1
  5. package/dist/apis/address.cjs +6 -6
  6. package/dist/apis/address.js +1 -1
  7. package/dist/apis/ai-agents.cjs +6 -6
  8. package/dist/apis/ai-agents.js +1 -1
  9. package/dist/apis/app.cjs +6 -6
  10. package/dist/apis/app.js +1 -1
  11. package/dist/apis/audit-logs.cjs +6 -6
  12. package/dist/apis/audit-logs.js +1 -1
  13. package/dist/apis/automation.cjs +6 -6
  14. package/dist/apis/automation.js +1 -1
  15. package/dist/apis/billing.cjs +6 -6
  16. package/dist/apis/billing.js +1 -1
  17. package/dist/apis/blueprint-manifest.cjs +6 -6
  18. package/dist/apis/blueprint-manifest.js +1 -1
  19. package/dist/apis/calendar.cjs +6 -6
  20. package/dist/apis/calendar.js +1 -1
  21. package/dist/apis/configuration-hub.cjs +6 -6
  22. package/dist/apis/configuration-hub.js +1 -1
  23. package/dist/apis/consent.cjs +6 -6
  24. package/dist/apis/consent.js +1 -1
  25. package/dist/apis/customer-portal.cjs +6 -6
  26. package/dist/apis/customer-portal.js +1 -1
  27. package/dist/apis/dashboard.cjs +6 -6
  28. package/dist/apis/dashboard.js +1 -1
  29. package/dist/apis/data-governance.cjs +6 -6
  30. package/dist/apis/data-governance.js +1 -1
  31. package/dist/apis/deduplication.cjs +6 -6
  32. package/dist/apis/deduplication.js +1 -1
  33. package/dist/apis/design.cjs +6 -6
  34. package/dist/apis/design.js +1 -1
  35. package/dist/apis/document.cjs +6 -6
  36. package/dist/apis/document.js +1 -1
  37. package/dist/apis/email-settings.cjs +6 -6
  38. package/dist/apis/email-settings.js +1 -1
  39. package/dist/apis/email-template.cjs +6 -6
  40. package/dist/apis/email-template.js +1 -1
  41. package/dist/apis/entity-mapping.cjs +6 -6
  42. package/dist/apis/entity-mapping.js +1 -1
  43. package/dist/apis/entity.cjs +24 -6
  44. package/dist/apis/entity.d.cts +15 -1
  45. package/dist/apis/entity.d.ts +15 -1
  46. package/dist/apis/entity.js +19 -1
  47. package/dist/apis/environments.cjs +6 -6
  48. package/dist/apis/environments.js +1 -1
  49. package/dist/apis/event-catalog.cjs +8 -8
  50. package/dist/apis/event-catalog.d.cts +2 -2
  51. package/dist/apis/event-catalog.d.ts +2 -2
  52. package/dist/apis/event-catalog.js +2 -2
  53. package/dist/apis/file.cjs +8 -8
  54. package/dist/apis/file.d.cts +2 -2
  55. package/dist/apis/file.d.ts +2 -2
  56. package/dist/apis/file.js +2 -2
  57. package/dist/apis/iban.cjs +6 -6
  58. package/dist/apis/iban.js +1 -1
  59. package/dist/apis/integration-toolkit.cjs +6 -6
  60. package/dist/apis/integration-toolkit.js +1 -1
  61. package/dist/apis/journey.cjs +8 -8
  62. package/dist/apis/journey.d.cts +2 -2
  63. package/dist/apis/journey.d.ts +2 -2
  64. package/dist/apis/journey.js +2 -2
  65. package/dist/apis/kanban.cjs +6 -6
  66. package/dist/apis/kanban.js +1 -1
  67. package/dist/apis/message.cjs +6 -6
  68. package/dist/apis/message.js +1 -1
  69. package/dist/apis/metering.cjs +6 -6
  70. package/dist/apis/metering.js +1 -1
  71. package/dist/apis/notes.cjs +6 -6
  72. package/dist/apis/notes.js +1 -1
  73. package/dist/apis/notification.cjs +6 -6
  74. package/dist/apis/notification.js +1 -1
  75. package/dist/apis/organization.cjs +6 -6
  76. package/dist/apis/organization.js +1 -1
  77. package/dist/apis/partner-directory.cjs +6 -6
  78. package/dist/apis/partner-directory.js +1 -1
  79. package/dist/apis/permissions.cjs +6 -6
  80. package/dist/apis/permissions.js +1 -1
  81. package/dist/apis/pricing-tier.cjs +6 -6
  82. package/dist/apis/pricing-tier.js +1 -1
  83. package/dist/apis/pricing.cjs +6 -27
  84. package/dist/apis/pricing.d.cts +1 -13
  85. package/dist/apis/pricing.d.ts +1 -13
  86. package/dist/apis/pricing.js +1 -22
  87. package/dist/apis/purpose.cjs +6 -6
  88. package/dist/apis/purpose.js +1 -1
  89. package/dist/apis/query.cjs +6 -6
  90. package/dist/apis/query.js +1 -1
  91. package/dist/apis/sandbox.cjs +6 -6
  92. package/dist/apis/sandbox.js +1 -1
  93. package/dist/apis/sharing.cjs +6 -6
  94. package/dist/apis/sharing.js +1 -1
  95. package/dist/apis/snapshot.cjs +6 -6
  96. package/dist/apis/snapshot.js +1 -1
  97. package/dist/apis/submission.cjs +6 -6
  98. package/dist/apis/submission.js +1 -1
  99. package/dist/apis/target.cjs +6 -6
  100. package/dist/apis/target.js +1 -1
  101. package/dist/apis/targeting.cjs +6 -6
  102. package/dist/apis/targeting.js +1 -1
  103. package/dist/apis/template-variables.cjs +6 -6
  104. package/dist/apis/template-variables.js +1 -1
  105. package/dist/apis/user.cjs +6 -6
  106. package/dist/apis/user.js +1 -1
  107. package/dist/apis/validation-rules.cjs +6 -6
  108. package/dist/apis/validation-rules.js +1 -1
  109. package/dist/apis/webhooks.cjs +6 -6
  110. package/dist/apis/webhooks.js +1 -1
  111. package/dist/apis/workflow-definition.cjs +6 -6
  112. package/dist/apis/workflow-definition.js +1 -1
  113. package/dist/apis/workflow.cjs +6 -6
  114. package/dist/apis/workflow.js +1 -1
  115. package/dist/chunk-2Q6CNXJ2.cjs +14 -0
  116. package/dist/{chunk-5S2PEECD.cjs → chunk-424JLS5G.cjs} +1 -1
  117. package/dist/chunk-FGQBS7TA.js +14 -0
  118. package/dist/chunk-HL4MZXEK.js +14 -0
  119. package/dist/chunk-LTCN52JS.js +14 -0
  120. package/dist/{chunk-VCD3C4UW.cjs → chunk-QZH7QNNP.cjs} +6 -6
  121. package/dist/{chunk-JBFTKLP2.js → chunk-SMERBU2T.js} +6 -6
  122. package/dist/chunk-W6R2J6KQ.cjs +14 -0
  123. package/dist/event-catalog-S4OYTDIB.js +7 -0
  124. package/dist/event-catalog-Z6BO4L2G.cjs +7 -0
  125. package/dist/{event-catalog-runtime-AME244T7.cjs → event-catalog-runtime-XWSYNUGQ.cjs} +2 -2
  126. package/dist/{event-catalog-runtime-Q3MKEDG4.js → event-catalog-runtime-Z6OMHQBD.js} +1 -1
  127. package/dist/{event-catalog.d-Bd2wmtlZ.d.ts → event-catalog.d-CCE1qmBN.d.cts} +105 -22
  128. package/dist/{event-catalog.d-Bd2wmtlZ.d.cts → event-catalog.d-CCE1qmBN.d.ts} +105 -22
  129. package/dist/file-LFOTXMRJ.cjs +7 -0
  130. package/dist/file-ND2JH5EM.js +7 -0
  131. package/dist/file-runtime-JL2IZ2CE.cjs +5 -0
  132. package/dist/{file-runtime-423SISQ2.js → file-runtime-RS4DX5LB.js} +1 -1
  133. package/dist/{file.d-CBsXF4W8.d.ts → file.d-DELNV63w.d.cts} +340 -9
  134. package/dist/{file.d-CBsXF4W8.d.cts → file.d-DELNV63w.d.ts} +340 -9
  135. package/dist/index.cjs +14 -14
  136. package/dist/index.d.cts +3 -3
  137. package/dist/index.d.ts +3 -3
  138. package/dist/index.js +4 -4
  139. package/dist/journey-FNWHSZW3.js +7 -0
  140. package/dist/journey-FUJDOH5O.cjs +7 -0
  141. package/dist/{journey-runtime-PAJVCFMZ.cjs → journey-runtime-EFWGEDUE.cjs} +2 -2
  142. package/dist/{journey-runtime-33QDS2WK.js → journey-runtime-VCADGDRV.js} +1 -1
  143. package/dist/{journey.d-bxl2l7qg.d.cts → journey.d-6Bs1uNLT.d.cts} +1062 -14
  144. package/dist/{journey.d-bxl2l7qg.d.ts → journey.d-6Bs1uNLT.d.ts} +1062 -14
  145. package/docs/event-catalog.md +155 -5
  146. package/docs/file.md +272 -0
  147. package/docs/journey.md +676 -0
  148. package/package.json +1 -1
  149. package/definitions/access-token-runtime.json +0 -1
  150. package/definitions/access-token.json +0 -835
  151. package/definitions/address-runtime.json +0 -1
  152. package/definitions/address-suggestions-runtime.json +0 -1
  153. package/definitions/address-suggestions.json +0 -582
  154. package/definitions/address.json +0 -578
  155. package/definitions/ai-agents-runtime.json +0 -1
  156. package/definitions/ai-agents.json +0 -2863
  157. package/definitions/app-runtime.json +0 -1
  158. package/definitions/app.json +0 -5993
  159. package/definitions/audit-logs-runtime.json +0 -1
  160. package/definitions/audit-logs.json +0 -305
  161. package/definitions/automation-runtime.json +0 -1
  162. package/definitions/automation.json +0 -5889
  163. package/definitions/billing-runtime.json +0 -1
  164. package/definitions/billing.json +0 -2394
  165. package/definitions/blueprint-manifest-runtime.json +0 -1
  166. package/definitions/blueprint-manifest.json +0 -7817
  167. package/definitions/calendar-runtime.json +0 -1
  168. package/definitions/calendar.json +0 -2904
  169. package/definitions/configuration-hub-runtime.json +0 -1
  170. package/definitions/configuration-hub.json +0 -2250
  171. package/definitions/consent-runtime.json +0 -1
  172. package/definitions/consent.json +0 -344
  173. package/definitions/customer-portal-runtime.json +0 -1
  174. package/definitions/customer-portal.json +0 -19945
  175. package/definitions/dashboard-runtime.json +0 -1
  176. package/definitions/dashboard.json +0 -1355
  177. package/definitions/data-governance-runtime.json +0 -1
  178. package/definitions/data-governance.json +0 -1126
  179. package/definitions/deduplication-runtime.json +0 -1
  180. package/definitions/deduplication.json +0 -782
  181. package/definitions/design-runtime.json +0 -1
  182. package/definitions/design.json +0 -1827
  183. package/definitions/document-runtime.json +0 -1
  184. package/definitions/document.json +0 -758
  185. package/definitions/email-settings-runtime.json +0 -1
  186. package/definitions/email-settings.json +0 -3736
  187. package/definitions/email-template-runtime.json +0 -1
  188. package/definitions/email-template.json +0 -1441
  189. package/definitions/entity-mapping-runtime.json +0 -1
  190. package/definitions/entity-mapping.json +0 -1829
  191. package/definitions/entity-runtime.json +0 -1
  192. package/definitions/entity.json +0 -11546
  193. package/definitions/environments-runtime.json +0 -1
  194. package/definitions/environments.json +0 -703
  195. package/definitions/event-catalog-runtime.json +0 -1
  196. package/definitions/event-catalog.json +0 -1943
  197. package/definitions/file-runtime.json +0 -1
  198. package/definitions/file.json +0 -3905
  199. package/definitions/iban-runtime.json +0 -1
  200. package/definitions/iban.json +0 -132
  201. package/definitions/integration-toolkit-runtime.json +0 -1
  202. package/definitions/integration-toolkit.json +0 -12966
  203. package/definitions/journey-runtime.json +0 -1
  204. package/definitions/journey.json +0 -3040
  205. package/definitions/kanban-runtime.json +0 -1
  206. package/definitions/kanban.json +0 -1506
  207. package/definitions/message-runtime.json +0 -1
  208. package/definitions/message.json +0 -3667
  209. package/definitions/metering-runtime.json +0 -1
  210. package/definitions/metering.json +0 -3132
  211. package/definitions/notes-runtime.json +0 -1
  212. package/definitions/notes.json +0 -1698
  213. package/definitions/notification-runtime.json +0 -1
  214. package/definitions/notification.json +0 -1439
  215. package/definitions/organization-runtime.json +0 -1
  216. package/definitions/organization.json +0 -1192
  217. package/definitions/partner-directory-runtime.json +0 -1
  218. package/definitions/partner-directory.json +0 -2284
  219. package/definitions/permissions-runtime.json +0 -1
  220. package/definitions/permissions.json +0 -1598
  221. package/definitions/pricing-runtime.json +0 -1
  222. package/definitions/pricing-tier-runtime.json +0 -1
  223. package/definitions/pricing-tier.json +0 -105
  224. package/definitions/pricing.json +0 -14301
  225. package/definitions/purpose-runtime.json +0 -1
  226. package/definitions/purpose.json +0 -524
  227. package/definitions/query-runtime.json +0 -1
  228. package/definitions/query.json +0 -3178
  229. package/definitions/sandbox-runtime.json +0 -1
  230. package/definitions/sandbox.json +0 -453
  231. package/definitions/sharing-runtime.json +0 -1
  232. package/definitions/sharing.json +0 -956
  233. package/definitions/snapshot-runtime.json +0 -1
  234. package/definitions/snapshot.json +0 -1103
  235. package/definitions/submission-runtime.json +0 -1
  236. package/definitions/submission.json +0 -313
  237. package/definitions/targeting-runtime.json +0 -1
  238. package/definitions/targeting.json +0 -2285
  239. package/definitions/template-variables-runtime.json +0 -1
  240. package/definitions/template-variables.json +0 -1416
  241. package/definitions/user-runtime.json +0 -1
  242. package/definitions/user.json +0 -3051
  243. package/definitions/validation-rules-runtime.json +0 -1
  244. package/definitions/validation-rules.json +0 -2642
  245. package/definitions/webhooks-runtime.json +0 -1
  246. package/definitions/webhooks.json +0 -1875
  247. package/definitions/workflow-definition-runtime.json +0 -1
  248. package/definitions/workflow-definition.json +0 -3592
  249. package/definitions/workflow-runtime.json +0 -1
  250. package/definitions/workflow.json +0 -4669
  251. package/dist/chunk-CIKDOXDL.cjs +0 -14
  252. package/dist/chunk-EEKJGTAS.js +0 -14
  253. package/dist/chunk-IBMGFLXF.js +0 -14
  254. package/dist/chunk-MPZICOVZ.cjs +0 -14
  255. package/dist/chunk-XJUB5BYM.js +0 -14
  256. package/dist/event-catalog-4FVQZ65M.cjs +0 -7
  257. package/dist/event-catalog-PEOHXUJO.js +0 -7
  258. package/dist/file-M5HNKOPG.cjs +0 -7
  259. package/dist/file-ZUNCUDBY.js +0 -7
  260. package/dist/file-runtime-IHVDQNIX.cjs +0 -5
  261. package/dist/journey-2HHH7MLM.js +0 -7
  262. package/dist/journey-4CXKZMKV.cjs +0 -7
@@ -1,1598 +0,0 @@
1
- {
2
- "openapi": "3.0.3",
3
- "info": {
4
- "title": "Permissions API",
5
- "version": "1.2.1",
6
- "description": "Flexible Role-based Access Control for epilot"
7
- },
8
- "tags": [
9
- {
10
- "name": "Roles",
11
- "description": "Manage roles and grants"
12
- },
13
- {
14
- "name": "Assignments",
15
- "description": "Assign roles to users"
16
- }
17
- ],
18
- "security": [
19
- {
20
- "EpilotAuth": []
21
- },
22
- {
23
- "EpilotOrg": []
24
- }
25
- ],
26
- "paths": {
27
- "/v1/permissions/me": {
28
- "get": {
29
- "operationId": "listCurrentRoles",
30
- "summary": "listCurrentRoles",
31
- "description": "Returns roles and grants assigned to current user",
32
- "tags": [
33
- "Roles"
34
- ],
35
- "responses": {
36
- "200": {
37
- "description": "ok",
38
- "content": {
39
- "application/json": {
40
- "schema": {
41
- "type": "object",
42
- "properties": {
43
- "roles": {
44
- "type": "array",
45
- "items": {
46
- "$ref": "#/components/schemas/Role"
47
- }
48
- }
49
- }
50
- }
51
- }
52
- }
53
- }
54
- }
55
- }
56
- },
57
- "/v1/permissions/roles": {
58
- "get": {
59
- "operationId": "listAllRoles",
60
- "summary": "listAllRoles",
61
- "description": "Returns list of all roles in organization",
62
- "tags": [
63
- "Roles"
64
- ],
65
- "responses": {
66
- "200": {
67
- "description": "ok",
68
- "content": {
69
- "application/json": {
70
- "schema": {
71
- "type": "object",
72
- "properties": {
73
- "roles": {
74
- "type": "array",
75
- "items": {
76
- "$ref": "#/components/schemas/Role"
77
- }
78
- }
79
- }
80
- }
81
- }
82
- }
83
- }
84
- }
85
- },
86
- "post": {
87
- "operationId": "createRole",
88
- "summary": "createRole",
89
- "description": "Create role",
90
- "tags": [
91
- "Roles"
92
- ],
93
- "requestBody": {
94
- "content": {
95
- "application/json": {
96
- "schema": {
97
- "$ref": "#/components/schemas/CreateRolePayload"
98
- }
99
- }
100
- }
101
- },
102
- "responses": {
103
- "200": {
104
- "description": "ok",
105
- "content": {
106
- "application/json": {
107
- "schema": {
108
- "$ref": "#/components/schemas/Role"
109
- }
110
- }
111
- }
112
- },
113
- "400": {
114
- "description": "Invalid role configuration",
115
- "content": {
116
- "application/json": {
117
- "schema": {
118
- "$ref": "#/components/schemas/Error"
119
- },
120
- "examples": {
121
- "parent_role_invalid_type": {
122
- "summary": "Parent role must be org_role or share_role",
123
- "value": {
124
- "message": "Parent role must be org_role or share_role, got user_role"
125
- }
126
- },
127
- "parent_role_different_org": {
128
- "summary": "Parent org_role must be in the same organization",
129
- "value": {
130
- "message": "Parent org_role must be in the same organization"
131
- }
132
- },
133
- "parent_role_max_hierarchy": {
134
- "summary": "Parent role cannot itself have a parent",
135
- "value": {
136
- "message": "Parent role cannot itself have a parent (max 2 levels of hierarchy)"
137
- }
138
- },
139
- "circular_dependency_self": {
140
- "summary": "Role cannot be its own parent",
141
- "value": {
142
- "message": "Role cannot be its own parent"
143
- }
144
- },
145
- "circular_dependency_detected": {
146
- "summary": "Circular dependency detected",
147
- "value": {
148
- "message": "Circular dependency detected: role 123:child would create a cycle"
149
- }
150
- }
151
- }
152
- }
153
- }
154
- },
155
- "404": {
156
- "description": "Parent role does not exist",
157
- "content": {
158
- "application/json": {
159
- "schema": {
160
- "$ref": "#/components/schemas/Error"
161
- },
162
- "examples": {
163
- "parent_role_not_found": {
164
- "summary": "Parent role does not exist",
165
- "value": {
166
- "message": "Parent role 123:nonexistent does not exist"
167
- }
168
- }
169
- }
170
- }
171
- }
172
- }
173
- }
174
- }
175
- },
176
- "/v1/permissions/roles:search": {
177
- "post": {
178
- "operationId": "searchRoles",
179
- "summary": "searchRoles",
180
- "description": "Search Roles",
181
- "tags": [
182
- "Roles"
183
- ],
184
- "requestBody": {
185
- "content": {
186
- "application/json": {
187
- "schema": {
188
- "$ref": "#/components/schemas/RoleSearchInput"
189
- }
190
- }
191
- }
192
- },
193
- "responses": {
194
- "200": {
195
- "description": "ok",
196
- "content": {
197
- "application/json": {
198
- "schema": {
199
- "type": "object",
200
- "properties": {
201
- "hits": {
202
- "type": "number"
203
- },
204
- "results": {
205
- "type": "array",
206
- "items": {
207
- "$ref": "#/components/schemas/Role"
208
- }
209
- }
210
- }
211
- }
212
- }
213
- }
214
- }
215
- }
216
- }
217
- },
218
- "/v1/permissions/roles/{roleId}": {
219
- "get": {
220
- "operationId": "getRole",
221
- "summary": "getRole",
222
- "description": "Get role by id",
223
- "tags": [
224
- "Roles"
225
- ],
226
- "parameters": [
227
- {
228
- "name": "roleId",
229
- "in": "path",
230
- "required": true,
231
- "schema": {
232
- "$ref": "#/components/schemas/RoleId"
233
- }
234
- }
235
- ],
236
- "responses": {
237
- "200": {
238
- "description": "ok",
239
- "content": {
240
- "application/json": {
241
- "schema": {
242
- "$ref": "#/components/schemas/Role"
243
- }
244
- }
245
- }
246
- }
247
- }
248
- },
249
- "put": {
250
- "operationId": "putRole",
251
- "summary": "putRole",
252
- "description": "Create or update role",
253
- "tags": [
254
- "Roles"
255
- ],
256
- "parameters": [
257
- {
258
- "name": "roleId",
259
- "in": "path",
260
- "required": true,
261
- "schema": {
262
- "$ref": "#/components/schemas/RoleId"
263
- }
264
- }
265
- ],
266
- "requestBody": {
267
- "content": {
268
- "application/json": {
269
- "schema": {
270
- "$ref": "#/components/schemas/RolePayload"
271
- },
272
- "x-examples": {
273
- "User role: manager": {
274
- "description": "Example manager role",
275
- "value": {
276
- "id": "123:manager",
277
- "name": "Manager",
278
- "slug": "manager",
279
- "type": "user_role",
280
- "organization_id": "123",
281
- "grants": [
282
- {
283
- "action": "entity:view",
284
- "resource": "*"
285
- },
286
- {
287
- "action": "entity:update",
288
- "resource": "*"
289
- },
290
- {
291
- "action": "user:view"
292
- },
293
- {
294
- "action": "user:invite"
295
- },
296
- {
297
- "action": "role:view"
298
- },
299
- {
300
- "action": "role:create"
301
- },
302
- {
303
- "action": "role:assign"
304
- },
305
- {
306
- "action": "entity:view",
307
- "resource": "file:*",
308
- "conditions": [
309
- {
310
- "attribute": "_tags",
311
- "operation": "equals",
312
- "values": [
313
- "offer",
314
- "contract"
315
- ]
316
- }
317
- ]
318
- },
319
- {
320
- "action": "message:view",
321
- "dependencies": [
322
- {
323
- "action": "entity:view",
324
- "resource": "message*"
325
- },
326
- {
327
- "action": "entity:view",
328
- "resource": "thread*"
329
- }
330
- ]
331
- },
332
- {
333
- "action": "message:send",
334
- "dependencies": [
335
- {
336
- "action": "entity:*",
337
- "resource": "message*"
338
- },
339
- {
340
- "action": "entity:*",
341
- "resource": "thread*"
342
- }
343
- ]
344
- },
345
- {
346
- "action": "workflow:*"
347
- }
348
- ]
349
- }
350
- },
351
- "User role: employee": {
352
- "description": "Example employee role",
353
- "value": {
354
- "id": "123:employee",
355
- "name": "Employee",
356
- "slug": "employee",
357
- "type": "user_role",
358
- "organization_id": "123",
359
- "grants": [
360
- {
361
- "action": "entity:view",
362
- "resource": "*"
363
- },
364
- {
365
- "action": "entity:update",
366
- "resource": "*"
367
- },
368
- {
369
- "action": "user:view"
370
- },
371
- {
372
- "action": "message:view",
373
- "dependencies": [
374
- {
375
- "action": "entity:view",
376
- "resource": "message*"
377
- },
378
- {
379
- "action": "entity:view",
380
- "resource": "thread*"
381
- }
382
- ]
383
- },
384
- {
385
- "action": "message:send",
386
- "dependencies": [
387
- {
388
- "action": "entity:*",
389
- "resource": "message*"
390
- },
391
- {
392
- "action": "entity:*",
393
- "resource": "thread*"
394
- }
395
- ]
396
- },
397
- {
398
- "action": "workflow:execution:*"
399
- }
400
- ]
401
- }
402
- },
403
- "User role: administrator": {
404
- "description": "Example administrator role",
405
- "value": {
406
- "id": "123:administrator",
407
- "name": "Administrator",
408
- "slug": "administrator",
409
- "type": "user_role",
410
- "organization_id": "123",
411
- "grants": [
412
- {
413
- "action": "*",
414
- "resource": "*"
415
- }
416
- ]
417
- }
418
- },
419
- "Organization root role": {
420
- "description": "Example organization root role. Must be satisifed for all org queries.",
421
- "value": {
422
- "id": "123:root",
423
- "name": "Organization root role",
424
- "slug": "root",
425
- "type": "org_role",
426
- "organization_id": "123",
427
- "grants": [
428
- {
429
- "action": "*",
430
- "resource": "*"
431
- },
432
- {
433
- "action": "webhook:*",
434
- "effect": "deny"
435
- }
436
- ]
437
- }
438
- },
439
- "Share role": {
440
- "description": "Example share role. This can be assigned to users in other organizations",
441
- "value": {
442
- "id": "123:example_share_role",
443
- "name": "Example opportunity share role",
444
- "slug": "example_share_role",
445
- "type": "share_role",
446
- "organization_id": "123",
447
- "grants": [
448
- {
449
- "action": "entity:view",
450
- "resource": "opportunity:123456"
451
- },
452
- {
453
- "action": "entity:edit",
454
- "resource": "opportunity:123456"
455
- },
456
- {
457
- "action": "workflow:execution:*"
458
- },
459
- {
460
- "action": "message:*"
461
- },
462
- {
463
- "action": "entity:*",
464
- "resource": "message*"
465
- },
466
- {
467
- "action": "entity:*",
468
- "resource": "thread*"
469
- }
470
- ]
471
- }
472
- },
473
- "Partner role": {
474
- "description": "Example partner role. This can be given to a partner organization, who can then assign it to their users",
475
- "value": {
476
- "id": "123:example_partner_role",
477
- "name": "Example opportunity share role",
478
- "slug": "example_partner_role",
479
- "type": "partner_role",
480
- "organization_id": "123",
481
- "partner_org_id": "456",
482
- "grants": [
483
- {
484
- "action": "entity:view",
485
- "resource": "opportunity*"
486
- },
487
- {
488
- "action": "entity:edit",
489
- "resource": "opportunity*"
490
- },
491
- {
492
- "action": "workflow:execution:*"
493
- },
494
- {
495
- "action": "message:*"
496
- },
497
- {
498
- "action": "entity:*",
499
- "resource": "message*"
500
- },
501
- {
502
- "action": "entity:*",
503
- "resource": "thread*"
504
- }
505
- ]
506
- }
507
- },
508
- "Portal role": {
509
- "description": "Example portal role. Implicitly used by end users of portals",
510
- "value": {
511
- "id": "123:default_end_customer_portal_role",
512
- "name": "Default End Customer Portal Role",
513
- "slug": "default_end_customer_portal_role",
514
- "type": "portal_role",
515
- "organization_id": "123",
516
- "grants": [
517
- {
518
- "action": "entity:attribute:view",
519
- "resource": "contact:*/*"
520
- },
521
- {
522
- "action": "entity:edit",
523
- "resource": "opportunity*"
524
- }
525
- ]
526
- }
527
- },
528
- "User role with parent": {
529
- "description": "Example user role that inherits from a parent role",
530
- "value": {
531
- "id": "123:limited_manager",
532
- "name": "Limited Manager",
533
- "slug": "limited_manager",
534
- "type": "user_role",
535
- "organization_id": "123",
536
- "parent_role": "123:manager",
537
- "grants": [
538
- {
539
- "action": "entity:view",
540
- "resource": "contact:*"
541
- },
542
- {
543
- "action": "entity:edit",
544
- "resource": "contact:*"
545
- }
546
- ]
547
- }
548
- }
549
- }
550
- }
551
- }
552
- },
553
- "responses": {
554
- "200": {
555
- "description": "ok",
556
- "content": {
557
- "application/json": {
558
- "schema": {
559
- "$ref": "#/components/schemas/Role"
560
- }
561
- }
562
- }
563
- },
564
- "400": {
565
- "description": "Bad Request - Invalid role configuration",
566
- "content": {
567
- "application/json": {
568
- "schema": {
569
- "$ref": "#/components/schemas/Error"
570
- },
571
- "examples": {
572
- "parent_role_invalid_type": {
573
- "summary": "Parent role must be org_role or share_role",
574
- "value": {
575
- "message": "Parent role must be org_role or share_role, got user_role"
576
- }
577
- },
578
- "parent_role_different_org": {
579
- "summary": "Parent org_role must be in the same organization",
580
- "value": {
581
- "message": "Parent org_role must be in the same organization"
582
- }
583
- },
584
- "parent_role_max_hierarchy": {
585
- "summary": "Parent role cannot itself have a parent",
586
- "value": {
587
- "message": "Parent role cannot itself have a parent (max 2 levels of hierarchy)"
588
- }
589
- },
590
- "circular_dependency_self": {
591
- "summary": "Role cannot be its own parent",
592
- "value": {
593
- "message": "Role cannot be its own parent"
594
- }
595
- },
596
- "circular_dependency_detected": {
597
- "summary": "Circular dependency detected",
598
- "value": {
599
- "message": "Circular dependency detected: role 123:child would create a cycle"
600
- }
601
- }
602
- }
603
- }
604
- }
605
- },
606
- "404": {
607
- "description": "Not Found - Parent role does not exist",
608
- "content": {
609
- "application/json": {
610
- "schema": {
611
- "$ref": "#/components/schemas/Error"
612
- },
613
- "examples": {
614
- "parent_role_not_found": {
615
- "summary": "Parent role does not exist",
616
- "value": {
617
- "message": "Parent role 123:nonexistent does not exist"
618
- }
619
- }
620
- }
621
- }
622
- }
623
- }
624
- }
625
- },
626
- "delete": {
627
- "operationId": "deleteRole",
628
- "summary": "deleteRole",
629
- "description": "Delete role by id",
630
- "tags": [
631
- "Roles"
632
- ],
633
- "parameters": [
634
- {
635
- "name": "roleId",
636
- "in": "path",
637
- "required": true,
638
- "schema": {
639
- "$ref": "#/components/schemas/RoleId"
640
- }
641
- }
642
- ],
643
- "responses": {
644
- "200": {
645
- "description": "ok",
646
- "content": {
647
- "application/json": {
648
- "schema": {
649
- "$ref": "#/components/schemas/Role"
650
- }
651
- }
652
- }
653
- }
654
- }
655
- }
656
- },
657
- "/v1/permissions/refresh": {
658
- "get": {
659
- "operationId": "refreshPermissions",
660
- "summary": "refreshPermissions",
661
- "description": "Makes sure the user has a role in the organization",
662
- "tags": [
663
- "Roles"
664
- ],
665
- "responses": {
666
- "200": {
667
- "description": "Refreshed succesfully"
668
- }
669
- }
670
- }
671
- },
672
- "/v1/permissions/assignments/{userId}": {
673
- "get": {
674
- "operationId": "getAssignedRolesForUser",
675
- "summary": "getAssignedRolesForUser",
676
- "description": "Get list of assigned roles by user id",
677
- "tags": [
678
- "Assignments"
679
- ],
680
- "parameters": [
681
- {
682
- "name": "userId",
683
- "in": "path",
684
- "required": true,
685
- "schema": {
686
- "$ref": "#/components/schemas/UserId"
687
- }
688
- }
689
- ],
690
- "responses": {
691
- "200": {
692
- "description": "ok",
693
- "content": {
694
- "application/json": {
695
- "schema": {
696
- "$ref": "#/components/schemas/Assignments"
697
- }
698
- }
699
- }
700
- }
701
- }
702
- },
703
- "put": {
704
- "operationId": "assignRoles",
705
- "summary": "assignRoles",
706
- "description": "Assign / unassign roles to users.",
707
- "tags": [
708
- "Assignments"
709
- ],
710
- "parameters": [
711
- {
712
- "name": "userId",
713
- "in": "path",
714
- "required": true,
715
- "schema": {
716
- "$ref": "#/components/schemas/UserId"
717
- }
718
- }
719
- ],
720
- "requestBody": {
721
- "content": {
722
- "application/json": {
723
- "schema": {
724
- "$ref": "#/components/schemas/Assignments"
725
- }
726
- }
727
- }
728
- },
729
- "responses": {
730
- "200": {
731
- "description": "ok",
732
- "content": {
733
- "application/json": {
734
- "schema": {
735
- "$ref": "#/components/schemas/Assignments"
736
- }
737
- }
738
- }
739
- }
740
- }
741
- }
742
- },
743
- "/v1/permissions/assignments/{userId}/{roleId}": {
744
- "post": {
745
- "operationId": "addAssignment",
746
- "summary": "addAssignment",
747
- "description": "Assign a user to a role.\n\nUse the `x-epilot-org-id` header to assign share roles to users in other orgs\n",
748
- "tags": [
749
- "Assignments"
750
- ],
751
- "parameters": [
752
- {
753
- "name": "userId",
754
- "in": "path",
755
- "required": true,
756
- "schema": {
757
- "$ref": "#/components/schemas/UserId"
758
- }
759
- },
760
- {
761
- "name": "roleId",
762
- "in": "path",
763
- "required": true,
764
- "schema": {
765
- "$ref": "#/components/schemas/RoleId"
766
- }
767
- }
768
- ],
769
- "responses": {
770
- "201": {
771
- "description": "ok",
772
- "content": {
773
- "application/json": {
774
- "schema": {
775
- "$ref": "#/components/schemas/Assignment"
776
- }
777
- }
778
- }
779
- }
780
- }
781
- },
782
- "delete": {
783
- "operationId": "removeAssignment",
784
- "summary": "removeAssignment",
785
- "description": "Remove role assignment from user",
786
- "tags": [
787
- "Assignments"
788
- ],
789
- "parameters": [
790
- {
791
- "name": "userId",
792
- "in": "path",
793
- "required": true,
794
- "schema": {
795
- "$ref": "#/components/schemas/UserId"
796
- }
797
- },
798
- {
799
- "name": "roleId",
800
- "in": "path",
801
- "required": true,
802
- "schema": {
803
- "$ref": "#/components/schemas/RoleId"
804
- }
805
- }
806
- ],
807
- "responses": {
808
- "200": {
809
- "description": "ok",
810
- "content": {
811
- "application/json": {
812
- "schema": {
813
- "$ref": "#/components/schemas/Assignment"
814
- }
815
- }
816
- }
817
- }
818
- }
819
- }
820
- },
821
- "/v1/permissions/assignments": {
822
- "get": {
823
- "operationId": "listAllAssignments",
824
- "summary": "listAllAssignments",
825
- "description": "Returns list of all assignments in organization",
826
- "tags": [
827
- "Assignments"
828
- ],
829
- "responses": {
830
- "200": {
831
- "description": "ok",
832
- "content": {
833
- "application/json": {
834
- "schema": {
835
- "type": "object",
836
- "properties": {
837
- "assignments": {
838
- "type": "array",
839
- "items": {
840
- "$ref": "#/components/schemas/Assignment"
841
- }
842
- }
843
- }
844
- }
845
- }
846
- }
847
- }
848
- }
849
- }
850
- }
851
- },
852
- "components": {
853
- "securitySchemes": {
854
- "EpilotAuth": {
855
- "type": "http",
856
- "scheme": "bearer",
857
- "description": "Authorization header with epilot OAuth2 bearer token",
858
- "bearerFormat": "JWT"
859
- },
860
- "EpilotOrg": {
861
- "description": "Overrides the target organization to allow shared tenantaccess",
862
- "name": "x-epilot-org-id",
863
- "in": "header",
864
- "type": "apiKey"
865
- }
866
- },
867
- "schemas": {
868
- "Grant": {
869
- "type": "object",
870
- "properties": {
871
- "action": {
872
- "type": "string",
873
- "example": "entity-read"
874
- },
875
- "resource": {
876
- "type": "string",
877
- "example": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947"
878
- },
879
- "effect": {
880
- "type": "string",
881
- "default": "allow",
882
- "enum": [
883
- "allow",
884
- "deny"
885
- ]
886
- },
887
- "conditions": {
888
- "type": "array",
889
- "items": {
890
- "$ref": "#/components/schemas/GrantCondition"
891
- }
892
- }
893
- },
894
- "required": [
895
- "action"
896
- ]
897
- },
898
- "GrantWithDependencies": {
899
- "allOf": [
900
- {
901
- "$ref": "#/components/schemas/Grant"
902
- },
903
- {
904
- "type": "object",
905
- "properties": {
906
- "dependencies": {
907
- "description": "Provided additional dependencies, exploded when storing the role",
908
- "type": "array",
909
- "items": {
910
- "$ref": "#/components/schemas/Grant"
911
- }
912
- }
913
- }
914
- }
915
- ]
916
- },
917
- "GrantCondition": {
918
- "allOf": [
919
- {
920
- "description": "An additional condition that must be met for the grant",
921
- "type": "object",
922
- "required": [
923
- "operation"
924
- ]
925
- },
926
- {
927
- "anyOf": [
928
- {
929
- "$ref": "#/components/schemas/EqualsCondition"
930
- },
931
- {
932
- "$ref": "#/components/schemas/NotEqualsCondition"
933
- },
934
- {
935
- "$ref": "#/components/schemas/EqualsCurrentUserCondition"
936
- },
937
- {
938
- "$ref": "#/components/schemas/NotEqualsCurrentUserCondition"
939
- }
940
- ]
941
- }
942
- ]
943
- },
944
- "EqualsCurrentUserCondition": {
945
- "description": "Check if any relation_user attribute on the entity contains the current user. When attribute is provided, only that specific attribute path is checked. When attributes is provided, it takes precedence over attribute and the condition passes when the current user appears in ANY of the listed attribute paths.",
946
- "type": "object",
947
- "properties": {
948
- "attribute": {
949
- "type": "string",
950
- "description": "Optional JSON path to a specific user attribute. When omitted, all relation_user attributes on the entity are scanned.",
951
- "example": "assignee.*.user_id"
952
- },
953
- "attributes": {
954
- "type": "array",
955
- "description": "Optional list of JSON paths to user attributes. Takes precedence over attribute.",
956
- "minItems": 1,
957
- "items": {
958
- "type": "string"
959
- },
960
- "example": [
961
- "assignee.*.user_id",
962
- "owner.*.user_id"
963
- ]
964
- },
965
- "operation": {
966
- "type": "string",
967
- "enum": [
968
- "equals_current_user"
969
- ]
970
- }
971
- },
972
- "required": [
973
- "operation"
974
- ]
975
- },
976
- "NotEqualsCurrentUserCondition": {
977
- "description": "Check if the current user is absent from the relation_user attributes on the entity. When attribute is provided, only that specific attribute path is checked. When attributes is provided, it takes precedence over attribute and the condition passes only when the current user appears in NONE of the listed attribute paths.",
978
- "type": "object",
979
- "properties": {
980
- "attribute": {
981
- "type": "string",
982
- "description": "Optional JSON path to a specific user attribute. When omitted, all relation_user attributes on the entity are scanned.",
983
- "example": "assignee.*.user_id"
984
- },
985
- "attributes": {
986
- "type": "array",
987
- "description": "Optional list of JSON paths to user attributes. Takes precedence over attribute.",
988
- "minItems": 1,
989
- "items": {
990
- "type": "string"
991
- },
992
- "example": [
993
- "assignee.*.user_id",
994
- "owner.*.user_id"
995
- ]
996
- },
997
- "operation": {
998
- "type": "string",
999
- "enum": [
1000
- "not_equals_current_user"
1001
- ]
1002
- }
1003
- },
1004
- "required": [
1005
- "operation"
1006
- ]
1007
- },
1008
- "EqualsCondition": {
1009
- "description": "Check if attribute equals to any of the values",
1010
- "type": "object",
1011
- "properties": {
1012
- "attribute": {
1013
- "type": "string",
1014
- "example": "workflows.primary.task_name"
1015
- },
1016
- "operation": {
1017
- "type": "string",
1018
- "enum": [
1019
- "equals"
1020
- ]
1021
- },
1022
- "values": {
1023
- "type": "array",
1024
- "minItems": 1,
1025
- "items": {
1026
- "example": "Qualification"
1027
- }
1028
- }
1029
- },
1030
- "required": [
1031
- "attribute",
1032
- "operation",
1033
- "values"
1034
- ]
1035
- },
1036
- "NotEqualsCondition": {
1037
- "description": "Passes when the attribute does not equal any of the values. Records where the attribute is missing or empty pass the condition.",
1038
- "type": "object",
1039
- "properties": {
1040
- "attribute": {
1041
- "type": "string",
1042
- "example": "workflows.primary.task_name"
1043
- },
1044
- "operation": {
1045
- "type": "string",
1046
- "enum": [
1047
- "not_equals"
1048
- ]
1049
- },
1050
- "values": {
1051
- "type": "array",
1052
- "minItems": 1,
1053
- "items": {
1054
- "example": "Qualification"
1055
- }
1056
- }
1057
- },
1058
- "required": [
1059
- "attribute",
1060
- "operation",
1061
- "values"
1062
- ]
1063
- },
1064
- "RoleId": {
1065
- "type": "string",
1066
- "example": "123:owner",
1067
- "description": "Format: <organization_id>:<slug>"
1068
- },
1069
- "BaseRole": {
1070
- "type": "object",
1071
- "properties": {
1072
- "id": {
1073
- "$ref": "#/components/schemas/RoleId"
1074
- },
1075
- "name": {
1076
- "type": "string",
1077
- "example": "Owner",
1078
- "description": "Human-friendly name for the role"
1079
- },
1080
- "slug": {
1081
- "type": "string",
1082
- "example": "owner",
1083
- "description": "URL-friendly name for the role"
1084
- },
1085
- "type": {
1086
- "type": "string",
1087
- "description": "Type of the role"
1088
- },
1089
- "expires_at": {
1090
- "type": "string",
1091
- "format": "date-time",
1092
- "example": "2028-07-21T17:32:28Z",
1093
- "description": "date and time then the role will expire"
1094
- },
1095
- "organization_id": {
1096
- "$ref": "#/components/schemas/OrganizationId"
1097
- },
1098
- "grants": {
1099
- "type": "array",
1100
- "items": {
1101
- "$ref": "#/components/schemas/Grant"
1102
- },
1103
- "description": "List of grants (permissions) applied to the role"
1104
- }
1105
- },
1106
- "required": [
1107
- "id",
1108
- "name",
1109
- "slug",
1110
- "type",
1111
- "organization_id",
1112
- "grants"
1113
- ]
1114
- },
1115
- "BaseRoleForCreate": {
1116
- "type": "object",
1117
- "properties": {
1118
- "id": {
1119
- "$ref": "#/components/schemas/RoleId"
1120
- },
1121
- "name": {
1122
- "type": "string",
1123
- "example": "Owner",
1124
- "description": "Human-friendly name for the role"
1125
- },
1126
- "slug": {
1127
- "type": "string",
1128
- "example": "owner",
1129
- "description": "URL-friendly name for the role"
1130
- },
1131
- "type": {
1132
- "type": "string",
1133
- "description": "Type of the role"
1134
- },
1135
- "expires_at": {
1136
- "type": "string",
1137
- "format": "date-time",
1138
- "example": "2028-07-21T17:32:28Z",
1139
- "description": "date and time then the role will expire"
1140
- },
1141
- "organization_id": {
1142
- "$ref": "#/components/schemas/OrganizationId"
1143
- },
1144
- "grants": {
1145
- "type": "array",
1146
- "items": {
1147
- "$ref": "#/components/schemas/Grant"
1148
- },
1149
- "description": "List of grants (permissions) applied to the role"
1150
- }
1151
- },
1152
- "required": [
1153
- "name",
1154
- "slug",
1155
- "type",
1156
- "grants"
1157
- ]
1158
- },
1159
- "UserRole": {
1160
- "allOf": [
1161
- {
1162
- "$ref": "#/components/schemas/BaseRole"
1163
- },
1164
- {
1165
- "description": "A standard user role. Must be explicitly assigned to users.",
1166
- "properties": {
1167
- "type": {
1168
- "enum": [
1169
- "user_role"
1170
- ]
1171
- },
1172
- "parent_role": {
1173
- "allOf": [
1174
- {
1175
- "$ref": "#/components/schemas/RoleId"
1176
- },
1177
- {
1178
- "description": "Optional parent role that this role inherits from. Must be an `org_role` or `share_role`."
1179
- }
1180
- ]
1181
- },
1182
- "vendor_created": {
1183
- "type": "boolean",
1184
- "description": "Indicates whether this role was created by a vendor organization on behalf of the partner organization."
1185
- }
1186
- }
1187
- }
1188
- ]
1189
- },
1190
- "OrgRole": {
1191
- "allOf": [
1192
- {
1193
- "$ref": "#/components/schemas/BaseRole"
1194
- },
1195
- {
1196
- "description": "A role automatically applied to all users in an organization.",
1197
- "properties": {
1198
- "type": {
1199
- "enum": [
1200
- "org_role"
1201
- ]
1202
- },
1203
- "pricing_tier": {
1204
- "type": "string",
1205
- "description": "The pricing tier of the organization this root role is based on",
1206
- "example": "Professional"
1207
- }
1208
- }
1209
- }
1210
- ]
1211
- },
1212
- "ShareRole": {
1213
- "allOf": [
1214
- {
1215
- "$ref": "#/components/schemas/BaseRole"
1216
- },
1217
- {
1218
- "description": "A role that can be assigned to users in other organizations for sharing purposes.",
1219
- "properties": {
1220
- "type": {
1221
- "enum": [
1222
- "share_role"
1223
- ]
1224
- }
1225
- }
1226
- }
1227
- ]
1228
- },
1229
- "PartnerRole": {
1230
- "allOf": [
1231
- {
1232
- "$ref": "#/components/schemas/BaseRole"
1233
- },
1234
- {
1235
- "description": "A role that appears in another organization's role list that can be assigned but not modified by the partner organization.",
1236
- "properties": {
1237
- "type": {
1238
- "enum": [
1239
- "partner_role"
1240
- ]
1241
- },
1242
- "partner_org_id": {
1243
- "allOf": [
1244
- {
1245
- "description": "Partner organization who can assign this role to their users."
1246
- },
1247
- {
1248
- "$ref": "#/components/schemas/OrganizationId"
1249
- }
1250
- ]
1251
- },
1252
- "vendor_enforced_user_limit": {
1253
- "type": "integer",
1254
- "readOnly": true,
1255
- "description": "Maximum number of users that can be assigned this role (vendor-enforced limit, can only be set via internal auth)"
1256
- },
1257
- "vendor_created": {
1258
- "type": "boolean",
1259
- "description": "Indicates whether this role was created by a vendor organization on behalf of the partner organization."
1260
- }
1261
- }
1262
- }
1263
- ]
1264
- },
1265
- "PortalRole": {
1266
- "allOf": [
1267
- {
1268
- "$ref": "#/components/schemas/BaseRole"
1269
- },
1270
- {
1271
- "description": "A role that is applied to end customers and installers using the Portals",
1272
- "properties": {
1273
- "type": {
1274
- "enum": [
1275
- "portal_role"
1276
- ]
1277
- }
1278
- }
1279
- }
1280
- ]
1281
- },
1282
- "Role": {
1283
- "oneOf": [
1284
- {
1285
- "$ref": "#/components/schemas/UserRole"
1286
- },
1287
- {
1288
- "$ref": "#/components/schemas/OrgRole"
1289
- },
1290
- {
1291
- "$ref": "#/components/schemas/ShareRole"
1292
- },
1293
- {
1294
- "$ref": "#/components/schemas/PartnerRole"
1295
- },
1296
- {
1297
- "$ref": "#/components/schemas/PortalRole"
1298
- }
1299
- ]
1300
- },
1301
- "RolePayload": {
1302
- "allOf": [
1303
- {
1304
- "properties": {
1305
- "grants": {
1306
- "type": "array",
1307
- "items": {
1308
- "$ref": "#/components/schemas/GrantWithDependencies"
1309
- }
1310
- }
1311
- }
1312
- },
1313
- {
1314
- "oneOf": [
1315
- {
1316
- "$ref": "#/components/schemas/UserRole"
1317
- },
1318
- {
1319
- "$ref": "#/components/schemas/OrgRole"
1320
- },
1321
- {
1322
- "$ref": "#/components/schemas/ShareRole"
1323
- },
1324
- {
1325
- "$ref": "#/components/schemas/PartnerRole"
1326
- },
1327
- {
1328
- "$ref": "#/components/schemas/PortalRole"
1329
- }
1330
- ]
1331
- }
1332
- ]
1333
- },
1334
- "Assignment": {
1335
- "type": "object",
1336
- "description": "A role attached to an user",
1337
- "properties": {
1338
- "user_id": {
1339
- "$ref": "#/components/schemas/UserId"
1340
- },
1341
- "roles": {
1342
- "type": "array",
1343
- "items": {
1344
- "$ref": "#/components/schemas/RoleId"
1345
- }
1346
- }
1347
- }
1348
- },
1349
- "InternalAssignment": {
1350
- "type": "object",
1351
- "description": "A role attached to an user",
1352
- "properties": {
1353
- "userId": {
1354
- "$ref": "#/components/schemas/UserId"
1355
- },
1356
- "roles": {
1357
- "type": "array",
1358
- "items": {
1359
- "$ref": "#/components/schemas/RoleId"
1360
- }
1361
- }
1362
- }
1363
- },
1364
- "OrgAssignments": {
1365
- "type": "object",
1366
- "description": "All roles attached to an users of an organization",
1367
- "properties": {
1368
- "organizationId": {
1369
- "$ref": "#/components/schemas/OrganizationId"
1370
- },
1371
- "assignments": {
1372
- "type": "array",
1373
- "items": {
1374
- "$ref": "#/components/schemas/InternalAssignment"
1375
- }
1376
- }
1377
- }
1378
- },
1379
- "OrgRoles": {
1380
- "type": "object",
1381
- "description": "All roles attached to an users of an organization",
1382
- "properties": {
1383
- "organizationId": {
1384
- "$ref": "#/components/schemas/OrganizationId"
1385
- },
1386
- "roles": {
1387
- "type": "array",
1388
- "items": {
1389
- "$ref": "#/components/schemas/Role"
1390
- }
1391
- }
1392
- }
1393
- },
1394
- "Assignments": {
1395
- "type": "array",
1396
- "description": "List of role ids attached to an user",
1397
- "items": {
1398
- "$ref": "#/components/schemas/RoleId"
1399
- }
1400
- },
1401
- "UserId": {
1402
- "type": "string",
1403
- "example": "1",
1404
- "description": "Id of a user"
1405
- },
1406
- "OrganizationId": {
1407
- "type": "string",
1408
- "example": "123",
1409
- "description": "Id of an organization"
1410
- },
1411
- "Slug": {
1412
- "type": "string",
1413
- "example": "owner",
1414
- "description": "Slug of a role; for a role with id = 123:manager -> 123 is org_id & manager is slug"
1415
- },
1416
- "RoleSearchInput": {
1417
- "type": "object",
1418
- "properties": {
1419
- "role_ids": {
1420
- "type": "array",
1421
- "description": "List of role ids to filter by",
1422
- "example": [
1423
- "123:manager",
1424
- "456:owner"
1425
- ],
1426
- "items": {
1427
- "$ref": "#/components/schemas/RoleId"
1428
- }
1429
- },
1430
- "org_ids": {
1431
- "type": "array",
1432
- "description": "List of organization ids to filter by",
1433
- "example": [
1434
- "123",
1435
- "456"
1436
- ],
1437
- "items": {
1438
- "$ref": "#/components/schemas/OrganizationId"
1439
- }
1440
- },
1441
- "slugs": {
1442
- "type": "array",
1443
- "description": "List of role slugs to filter by",
1444
- "example": [
1445
- "manager",
1446
- "owner"
1447
- ],
1448
- "items": {
1449
- "$ref": "#/components/schemas/Slug"
1450
- }
1451
- },
1452
- "query": {
1453
- "type": "string",
1454
- "description": "Input to search across fields",
1455
- "example": "Administrator"
1456
- },
1457
- "limit": {
1458
- "type": "number",
1459
- "description": "The Number of roles to return",
1460
- "example": 1,
1461
- "minimum": 1,
1462
- "default": 50
1463
- },
1464
- "offset": {
1465
- "type": "number",
1466
- "description": "The number of roles to skip before starting to collect the result set",
1467
- "example": 1,
1468
- "minimum": 1,
1469
- "default": 0
1470
- }
1471
- }
1472
- },
1473
- "CreateRolePayload": {
1474
- "allOf": [
1475
- {
1476
- "properties": {
1477
- "grants": {
1478
- "type": "array",
1479
- "items": {
1480
- "$ref": "#/components/schemas/GrantWithDependencies"
1481
- }
1482
- }
1483
- }
1484
- },
1485
- {
1486
- "$ref": "#/components/schemas/BaseRoleForCreate"
1487
- },
1488
- {
1489
- "oneOf": [
1490
- {
1491
- "description": "A standard user role. Must be explicitly assigned to users.",
1492
- "properties": {
1493
- "type": {
1494
- "enum": [
1495
- "user_role"
1496
- ]
1497
- },
1498
- "parent_role": {
1499
- "allOf": [
1500
- {
1501
- "$ref": "#/components/schemas/RoleId"
1502
- },
1503
- {
1504
- "description": "Optional parent role that this role inherits from. Must be an `org_role` or a sharing role of type `share_role` or `partner_role`."
1505
- }
1506
- ]
1507
- },
1508
- "vendor_created": {
1509
- "type": "boolean",
1510
- "description": "Indicates whether this role was created by a vendor organization on behalf of the partner organization."
1511
- }
1512
- }
1513
- },
1514
- {
1515
- "description": "A role automatically applied to all users in an organization.",
1516
- "properties": {
1517
- "type": {
1518
- "enum": [
1519
- "org_role"
1520
- ]
1521
- },
1522
- "pricing_tier": {
1523
- "type": "string",
1524
- "description": "The pricing tier of the organization this root role is based on",
1525
- "example": "Professional"
1526
- }
1527
- }
1528
- },
1529
- {
1530
- "description": "A role that can be assigned to users in other organizations for sharing purposes.",
1531
- "properties": {
1532
- "type": {
1533
- "enum": [
1534
- "share_role"
1535
- ]
1536
- }
1537
- }
1538
- },
1539
- {
1540
- "description": "A role that appears in another organization's role list that can be assigned but not modified by the partner organization.",
1541
- "properties": {
1542
- "type": {
1543
- "enum": [
1544
- "partner_role"
1545
- ]
1546
- },
1547
- "partner_org_id": {
1548
- "allOf": [
1549
- {
1550
- "description": "Partner organization who can assign this role to their users."
1551
- },
1552
- {
1553
- "$ref": "#/components/schemas/OrganizationId"
1554
- }
1555
- ]
1556
- },
1557
- "vendor_created": {
1558
- "type": "boolean",
1559
- "description": "Indicates whether this role was created by a vendor organization on behalf of the partner organization."
1560
- }
1561
- }
1562
- },
1563
- {
1564
- "description": "A role that is applied to end customers and installers using the Portals",
1565
- "properties": {
1566
- "type": {
1567
- "enum": [
1568
- "portal_role"
1569
- ]
1570
- }
1571
- }
1572
- }
1573
- ]
1574
- }
1575
- ]
1576
- },
1577
- "Error": {
1578
- "type": "object",
1579
- "description": "Error response",
1580
- "properties": {
1581
- "message": {
1582
- "type": "string",
1583
- "description": "Error message",
1584
- "example": "Parent role 123:nonexistent does not exist"
1585
- }
1586
- },
1587
- "required": [
1588
- "message"
1589
- ]
1590
- }
1591
- }
1592
- },
1593
- "servers": [
1594
- {
1595
- "url": "https://permissions.sls.epilot.io"
1596
- }
1597
- ]
1598
- }