epilot 0.1.0 → 0.1.2

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 (108) hide show
  1. package/README.md +7 -345
  2. package/bin/epilot.js +5 -0
  3. package/package.json +7 -33
  4. package/definitions/access-token.json +0 -663
  5. package/definitions/address-suggestions.json +0 -582
  6. package/definitions/address.json +0 -578
  7. package/definitions/ai-agents.json +0 -1711
  8. package/definitions/app.json +0 -4443
  9. package/definitions/audit-logs.json +0 -305
  10. package/definitions/automation.json +0 -4815
  11. package/definitions/billing.json +0 -837
  12. package/definitions/blueprint-manifest.json +0 -3376
  13. package/definitions/consent.json +0 -344
  14. package/definitions/customer-portal.json +0 -15000
  15. package/definitions/dashboard.json +0 -484
  16. package/definitions/data-management.json +0 -962
  17. package/definitions/deduplication.json +0 -183
  18. package/definitions/design.json +0 -1423
  19. package/definitions/document.json +0 -758
  20. package/definitions/email-settings.json +0 -2627
  21. package/definitions/email-template.json +0 -1419
  22. package/definitions/entity-mapping.json +0 -1642
  23. package/definitions/entity.json +0 -10074
  24. package/definitions/environments.json +0 -363
  25. package/definitions/erp-integration.json +0 -5845
  26. package/definitions/event-catalog.json +0 -1051
  27. package/definitions/file.json +0 -2842
  28. package/definitions/iban.json +0 -132
  29. package/definitions/journey.json +0 -2341
  30. package/definitions/kanban.json +0 -929
  31. package/definitions/message.json +0 -2660
  32. package/definitions/metering.json +0 -2321
  33. package/definitions/notes.json +0 -1531
  34. package/definitions/notification.json +0 -1425
  35. package/definitions/organization.json +0 -629
  36. package/definitions/partner-directory.json +0 -1718
  37. package/definitions/permissions.json +0 -1480
  38. package/definitions/pricing-tier.json +0 -105
  39. package/definitions/pricing.json +0 -9884
  40. package/definitions/purpose.json +0 -524
  41. package/definitions/sandbox.json +0 -453
  42. package/definitions/submission.json +0 -313
  43. package/definitions/targeting.json +0 -1474
  44. package/definitions/template-variables.json +0 -1408
  45. package/definitions/user.json +0 -2408
  46. package/definitions/validation-rules.json +0 -1491
  47. package/definitions/webhooks.json +0 -1525
  48. package/definitions/workflow-definition.json +0 -3417
  49. package/definitions/workflow.json +0 -4106
  50. package/dist/access-token-OG5AR7UB.js +0 -51
  51. package/dist/address-QUSMK5GV.js +0 -51
  52. package/dist/address-suggestions-E5SQNUS5.js +0 -51
  53. package/dist/ai-agents-PM42SJY3.js +0 -51
  54. package/dist/app-YTM3XAJL.js +0 -51
  55. package/dist/audit-logs-NXP7GFKX.js +0 -51
  56. package/dist/auth-CCBTXH5U.js +0 -113
  57. package/dist/auth-login-2ZIXM47J.js +0 -137
  58. package/dist/auth-token-OS4BEEVZ.js +0 -43
  59. package/dist/automation-TDJASTEV.js +0 -51
  60. package/dist/billing-M4MRBLEK.js +0 -51
  61. package/dist/bin/epilot.js +0 -104
  62. package/dist/blueprint-manifest-NQL7NRMV.js +0 -51
  63. package/dist/chunk-57PPARIW.js +0 -715
  64. package/dist/chunk-5WUPDZ5D.js +0 -76
  65. package/dist/chunk-IST42ZNL.js +0 -78
  66. package/dist/chunk-RC3GCXCI.js +0 -76
  67. package/dist/chunk-TKZLQD2B.js +0 -72
  68. package/dist/chunk-UJ6TU34M.js +0 -56
  69. package/dist/completion-GRQM2FJQ.js +0 -168
  70. package/dist/consent-KQ7MJAS6.js +0 -51
  71. package/dist/customer-portal-VUVSKWAQ.js +0 -51
  72. package/dist/dashboard-GVR4XNGR.js +0 -51
  73. package/dist/data-management-2RD3DLOS.js +0 -51
  74. package/dist/deduplication-PY77EINR.js +0 -51
  75. package/dist/design-M4FP2K5R.js +0 -51
  76. package/dist/document-P4QA7LEZ.js +0 -51
  77. package/dist/email-settings-7HGGRCCM.js +0 -51
  78. package/dist/email-template-3HXQI4CH.js +0 -51
  79. package/dist/entity-XUESZBPJ.js +0 -51
  80. package/dist/entity-mapping-JBKWWBH2.js +0 -51
  81. package/dist/environments-KKOS7ONY.js +0 -51
  82. package/dist/erp-integration-YTOWHCAW.js +0 -51
  83. package/dist/event-catalog-UKLZUGC4.js +0 -51
  84. package/dist/file-IFZNZ547.js +0 -51
  85. package/dist/iban-X2IW2NWU.js +0 -51
  86. package/dist/interactive-46ICLQKL.js +0 -16
  87. package/dist/journey-JU6X2KMX.js +0 -51
  88. package/dist/kanban-VHUU44PM.js +0 -51
  89. package/dist/message-AOUWJ4YX.js +0 -51
  90. package/dist/metering-RDS3XBD5.js +0 -51
  91. package/dist/notes-WE2UC75B.js +0 -51
  92. package/dist/notification-FKFNBHYZ.js +0 -51
  93. package/dist/organization-LMNFF6BX.js +0 -51
  94. package/dist/partner-directory-IIZVQDXJ.js +0 -51
  95. package/dist/permissions-AYCMVM7Y.js +0 -51
  96. package/dist/pricing-PS26FWBS.js +0 -51
  97. package/dist/pricing-tier-FBXWQ6T3.js +0 -51
  98. package/dist/profile-5Q5YARG7.js +0 -135
  99. package/dist/purpose-HE4E4SVU.js +0 -51
  100. package/dist/sandbox-Z7BU4UAD.js +0 -51
  101. package/dist/submission-MWVDF2ZB.js +0 -51
  102. package/dist/targeting-7NM5GDJ6.js +0 -51
  103. package/dist/template-variables-AJAR7PAV.js +0 -51
  104. package/dist/user-A26XQXG3.js +0 -51
  105. package/dist/validation-rules-VZTISEG2.js +0 -51
  106. package/dist/webhooks-RXH67WZ3.js +0 -51
  107. package/dist/workflow-G4FUUGZQ.js +0 -51
  108. package/dist/workflow-definition-LJYLMMGD.js +0 -51
@@ -1,1718 +0,0 @@
1
- {
2
- "openapi": "3.0.3",
3
- "info": {
4
- "title": "Partner API",
5
- "description": "Management of Partners in epilot",
6
- "version": "1.5.0"
7
- },
8
- "tags": [
9
- {
10
- "name": "partners",
11
- "x-displayName": "Partners",
12
- "description": "Partner operations"
13
- },
14
- {
15
- "name": "partner_users",
16
- "x-displayName": "Partner Users",
17
- "description": "Partner user management operations"
18
- },
19
- {
20
- "name": "partner_schema",
21
- "x-displayName": "Partner",
22
- "description": "<SchemaDefinition schemaRef=\"#/components/schemas/Partner\" />\n"
23
- }
24
- ],
25
- "x-tagGroups": [
26
- {
27
- "name": "APIs",
28
- "tags": [
29
- "partners",
30
- "partner_users"
31
- ]
32
- },
33
- {
34
- "name": "Schemas",
35
- "tags": [
36
- "partner_schema"
37
- ]
38
- }
39
- ],
40
- "security": [
41
- {
42
- "EpilotAuth": []
43
- },
44
- {
45
- "AsOrganization": []
46
- }
47
- ],
48
- "paths": {
49
- "/v1/partners/{id}/approve": {
50
- "post": {
51
- "operationId": "approvePartner",
52
- "summary": "approvePartner",
53
- "tags": [
54
- "partners"
55
- ],
56
- "description": "Approve partner request",
57
- "parameters": [
58
- {
59
- "in": "path",
60
- "name": "id",
61
- "schema": {
62
- "$ref": "#/components/schemas/PartnerId"
63
- },
64
- "required": true,
65
- "description": "The Id of partner"
66
- }
67
- ],
68
- "responses": {
69
- "201": {
70
- "description": "Approve successfully",
71
- "content": {
72
- "application/json": {
73
- "schema": {
74
- "$ref": "#/components/schemas/Partner"
75
- }
76
- }
77
- }
78
- },
79
- "400": {
80
- "description": "Unable to approve"
81
- }
82
- }
83
- }
84
- },
85
- "/v1/partners/{id}/reject": {
86
- "post": {
87
- "operationId": "rejectPartner",
88
- "summary": "rejectPartner",
89
- "tags": [
90
- "partners"
91
- ],
92
- "description": "Reject partner request",
93
- "parameters": [
94
- {
95
- "in": "path",
96
- "name": "id",
97
- "schema": {
98
- "$ref": "#/components/schemas/PartnerId"
99
- },
100
- "required": true,
101
- "description": "The Id of partner"
102
- }
103
- ],
104
- "responses": {
105
- "200": {
106
- "description": "Invited successfully",
107
- "content": {
108
- "application/json": {
109
- "schema": {
110
- "$ref": "#/components/schemas/Partner"
111
- }
112
- }
113
- }
114
- },
115
- "400": {
116
- "description": "Unable to reject"
117
- }
118
- }
119
- }
120
- },
121
- "/v1/partners/assignables:search": {
122
- "post": {
123
- "operationId": "searchAssignable",
124
- "summary": "searchAssignables",
125
- "description": "Search for assignable users/organizations from this organization and Partners\n\nResults can include:\n - Users in your organization\n - Users in partner organizations\n - Partner organizations\n",
126
- "tags": [
127
- "partners"
128
- ],
129
- "requestBody": {
130
- "content": {
131
- "application/json": {
132
- "schema": {
133
- "type": "object",
134
- "properties": {
135
- "q": {
136
- "description": "search query to filter results",
137
- "type": "string",
138
- "default": ""
139
- },
140
- "from": {
141
- "description": "start results from an offset for pagination",
142
- "type": "integer",
143
- "minimum": 0,
144
- "default": 0
145
- },
146
- "size": {
147
- "description": "limit number of results to return",
148
- "type": "integer",
149
- "minimum": 1,
150
- "maximum": 1000,
151
- "default": 25
152
- },
153
- "org_ids": {
154
- "description": "filter results to specific organizations. defaults to all orgs",
155
- "type": "array",
156
- "items": {
157
- "$ref": "#/components/schemas/OrganizationId"
158
- }
159
- },
160
- "portalUsersEntityIdScope": {
161
- "description": "Optional parameter if 'types' contains 'ecp' type user. Portal Users will only be fetched in the context of an entity, fetching the related ones through relations and not returning placeholders anymore.",
162
- "type": "string",
163
- "default": ""
164
- },
165
- "types": {
166
- "description": "filter results to specific types of assignables. defaults to all types",
167
- "type": "array",
168
- "default": [
169
- "user",
170
- "partner_user",
171
- "partner_organization",
172
- "ecp",
173
- "group"
174
- ],
175
- "items": {
176
- "type": "string",
177
- "enum": [
178
- "user",
179
- "partner_user",
180
- "partner_organization",
181
- "ecp",
182
- "group",
183
- "parent_organization_user"
184
- ]
185
- }
186
- }
187
- },
188
- "required": [
189
- "q"
190
- ]
191
- }
192
- }
193
- }
194
- },
195
- "responses": {
196
- "200": {
197
- "description": "List of assignable results",
198
- "content": {
199
- "application/json": {
200
- "schema": {
201
- "type": "object",
202
- "properties": {
203
- "hits": {
204
- "description": "total number of search results",
205
- "type": "integer",
206
- "example": 25
207
- },
208
- "results": {
209
- "type": "array",
210
- "items": {
211
- "$ref": "#/components/schemas/Assignable"
212
- }
213
- }
214
- }
215
- }
216
- }
217
- }
218
- }
219
- }
220
- }
221
- },
222
- "/v1/partners/assignables:batchGet": {
223
- "post": {
224
- "operationId": "batchGetAssignable",
225
- "summary": "batchGet",
226
- "description": "Search for assignable users from this organization by its ids\n",
227
- "tags": [
228
- "partners"
229
- ],
230
- "requestBody": {
231
- "content": {
232
- "application/json": {
233
- "schema": {
234
- "type": "array",
235
- "items": {
236
- "minItems": 1,
237
- "type": "object",
238
- "properties": {
239
- "user_id": {
240
- "description": "user id of assignable",
241
- "type": "string"
242
- },
243
- "org_id": {
244
- "description": "organization id of assignable (optional, defaults to caller org)",
245
- "type": "string"
246
- },
247
- "group_id": {
248
- "description": "group id of assignable (optional)",
249
- "type": "string"
250
- }
251
- }
252
- }
253
- }
254
- }
255
- }
256
- },
257
- "responses": {
258
- "200": {
259
- "description": "List of assignable results",
260
- "content": {
261
- "application/json": {
262
- "schema": {
263
- "type": "object",
264
- "properties": {
265
- "hits": {
266
- "description": "total number of search results",
267
- "type": "integer",
268
- "example": 25
269
- },
270
- "results": {
271
- "type": "array",
272
- "items": {
273
- "$ref": "#/components/schemas/Assignable"
274
- }
275
- }
276
- }
277
- }
278
- }
279
- }
280
- }
281
- }
282
- }
283
- },
284
- "/v1/partner-directory/public/getPartnerByToken": {
285
- "get": {
286
- "operationId": "getPartnerByToken",
287
- "summary": "getPartnerByToken",
288
- "description": "Get partner by token",
289
- "security": [],
290
- "tags": [
291
- "partners"
292
- ],
293
- "parameters": [
294
- {
295
- "in": "query",
296
- "name": "token",
297
- "schema": {
298
- "$ref": "#/components/schemas/InviteToken"
299
- },
300
- "required": true,
301
- "description": "Invite Token"
302
- }
303
- ],
304
- "responses": {
305
- "200": {
306
- "description": "Partner",
307
- "content": {
308
- "application/json": {
309
- "schema": {
310
- "$ref": "#/components/schemas/Partner"
311
- }
312
- }
313
- }
314
- },
315
- "404": {
316
- "description": "Token not found for the partner"
317
- }
318
- }
319
- }
320
- },
321
- "/v1/partner-directory/public/activate": {
322
- "post": {
323
- "operationId": "activatePartner",
324
- "summary": "activatePartner",
325
- "description": "Activate partner using an invite token",
326
- "security": [],
327
- "tags": [
328
- "partners"
329
- ],
330
- "parameters": [
331
- {
332
- "name": "token",
333
- "description": "Invite Token",
334
- "in": "query",
335
- "required": true,
336
- "schema": {
337
- "$ref": "#/components/schemas/InviteToken"
338
- }
339
- }
340
- ],
341
- "requestBody": {
342
- "content": {
343
- "application/json": {
344
- "schema": {
345
- "$ref": "#/components/schemas/ActivatePartnerPayload"
346
- }
347
- }
348
- }
349
- },
350
- "responses": {
351
- "200": {
352
- "description": "Activated successfully"
353
- },
354
- "404": {
355
- "description": "Token not found for the partner"
356
- }
357
- }
358
- }
359
- },
360
- "/v1/geolocation/text:search": {
361
- "post": {
362
- "operationId": "searchGeolocationForText",
363
- "summary": "searchGeolocationForText",
364
- "tags": [
365
- "partners"
366
- ],
367
- "description": "Converts a given string, in the format of an address, to geo-location latitude and longitude",
368
- "requestBody": {
369
- "content": {
370
- "application/json": {
371
- "schema": {
372
- "$ref": "#/components/schemas/SearchGeolocation"
373
- }
374
- }
375
- }
376
- },
377
- "responses": {
378
- "200": {
379
- "description": "Geo-location converted from text",
380
- "content": {
381
- "application/json": {
382
- "schema": {
383
- "$ref": "#/components/schemas/Geolocation"
384
- }
385
- }
386
- }
387
- },
388
- "400": {
389
- "description": "No text provided"
390
- },
391
- "404": {
392
- "description": "No geo-location found for text"
393
- }
394
- }
395
- }
396
- },
397
- "/v2/partners/{id}/invite": {
398
- "post": {
399
- "operationId": "invitePartnerV2",
400
- "summary": "invitePartnerV2",
401
- "tags": [
402
- "partners"
403
- ],
404
- "description": "Invite a partner into collaboration. It will send an email to partner and ask to join into collaboration",
405
- "parameters": [
406
- {
407
- "in": "path",
408
- "name": "id",
409
- "schema": {
410
- "$ref": "#/components/schemas/PartnerId"
411
- },
412
- "required": true,
413
- "description": "The Id of partner"
414
- }
415
- ],
416
- "requestBody": {
417
- "content": {
418
- "application/json": {
419
- "schema": {
420
- "$ref": "#/components/schemas/PartnerInvitationPayload"
421
- }
422
- }
423
- }
424
- },
425
- "responses": {
426
- "200": {
427
- "description": "Invited successfully",
428
- "content": {
429
- "application/json": {
430
- "schema": {
431
- "$ref": "#/components/schemas/Partner"
432
- }
433
- }
434
- }
435
- },
436
- "400": {
437
- "description": "Unable to invite"
438
- }
439
- }
440
- }
441
- },
442
- "/v2/partners/{orgId}/users": {
443
- "get": {
444
- "operationId": "getPartnerUsers",
445
- "summary": "getPartnerUsers",
446
- "tags": [
447
- "partner_users"
448
- ],
449
- "description": "Get all users for a partner organization with their roles",
450
- "parameters": [
451
- {
452
- "in": "path",
453
- "name": "orgId",
454
- "schema": {
455
- "$ref": "#/components/schemas/OrganizationId"
456
- },
457
- "required": true,
458
- "description": "The organization ID of the partner"
459
- }
460
- ],
461
- "responses": {
462
- "200": {
463
- "description": "List of partner users with roles",
464
- "content": {
465
- "application/json": {
466
- "schema": {
467
- "type": "object",
468
- "properties": {
469
- "results": {
470
- "type": "array",
471
- "items": {
472
- "$ref": "#/components/schemas/PartnerUser"
473
- }
474
- }
475
- }
476
- }
477
- }
478
- }
479
- },
480
- "400": {
481
- "description": "Unable to fetch partner users"
482
- },
483
- "500": {
484
- "description": "Internal server error"
485
- }
486
- }
487
- },
488
- "post": {
489
- "operationId": "createPartnerUser",
490
- "summary": "createPartnerUser",
491
- "tags": [
492
- "partner_users"
493
- ],
494
- "description": "Create a new user in a partner organization",
495
- "parameters": [
496
- {
497
- "in": "path",
498
- "name": "orgId",
499
- "schema": {
500
- "$ref": "#/components/schemas/OrganizationId"
501
- },
502
- "required": true,
503
- "description": "The Partner organization ID where the user should be created"
504
- }
505
- ],
506
- "requestBody": {
507
- "content": {
508
- "application/json": {
509
- "schema": {
510
- "$ref": "#/components/schemas/CreatePartnerUserPayload"
511
- }
512
- }
513
- }
514
- },
515
- "responses": {
516
- "201": {
517
- "description": "User created successfully",
518
- "content": {
519
- "application/json": {
520
- "schema": {
521
- "$ref": "#/components/schemas/User"
522
- }
523
- }
524
- }
525
- },
526
- "400": {
527
- "description": "Unable to create partner user"
528
- },
529
- "500": {
530
- "description": "Internal server error"
531
- }
532
- }
533
- }
534
- },
535
- "/v2/partners/{orgId}/users/{userId}": {
536
- "delete": {
537
- "operationId": "deletePartnerUser",
538
- "summary": "deletePartnerUser",
539
- "tags": [
540
- "partner_users"
541
- ],
542
- "description": "Delete a user from a partner organization",
543
- "parameters": [
544
- {
545
- "in": "path",
546
- "name": "orgId",
547
- "schema": {
548
- "$ref": "#/components/schemas/OrganizationId"
549
- },
550
- "required": true,
551
- "description": "The organization ID of the partner"
552
- },
553
- {
554
- "in": "path",
555
- "name": "userId",
556
- "schema": {
557
- "type": "string"
558
- },
559
- "required": true,
560
- "description": "The user ID to delete"
561
- }
562
- ],
563
- "responses": {
564
- "200": {
565
- "description": "User deleted successfully",
566
- "content": {
567
- "application/json": {
568
- "schema": {
569
- "type": "object"
570
- }
571
- }
572
- }
573
- },
574
- "400": {
575
- "description": "Unable to delete partner user"
576
- },
577
- "404": {
578
- "description": "User not found"
579
- },
580
- "500": {
581
- "description": "Internal server error"
582
- }
583
- }
584
- }
585
- },
586
- "/v2/partners/{orgId}/roles": {
587
- "get": {
588
- "operationId": "getPartnerRoles",
589
- "summary": "getPartnerRoles",
590
- "tags": [
591
- "partner_users"
592
- ],
593
- "description": "Get all roles for a partner organization",
594
- "parameters": [
595
- {
596
- "in": "path",
597
- "name": "orgId",
598
- "schema": {
599
- "$ref": "#/components/schemas/OrganizationId"
600
- },
601
- "required": true,
602
- "description": "The organization ID of the partner"
603
- }
604
- ],
605
- "responses": {
606
- "200": {
607
- "description": "List of partner roles",
608
- "content": {
609
- "application/json": {
610
- "schema": {
611
- "type": "object",
612
- "properties": {
613
- "results": {
614
- "type": "array",
615
- "items": {
616
- "$ref": "#/components/schemas/PartnerRole"
617
- }
618
- }
619
- }
620
- }
621
- }
622
- }
623
- },
624
- "400": {
625
- "description": "Unable to fetch partner roles"
626
- },
627
- "500": {
628
- "description": "Internal server error"
629
- }
630
- }
631
- },
632
- "post": {
633
- "operationId": "createPartnerRole",
634
- "summary": "createPartnerRole",
635
- "tags": [
636
- "partner_users"
637
- ],
638
- "description": "Create a role for a partner organization",
639
- "parameters": [
640
- {
641
- "in": "path",
642
- "name": "orgId",
643
- "schema": {
644
- "$ref": "#/components/schemas/OrganizationId"
645
- },
646
- "required": true,
647
- "description": "The organization ID of the partner"
648
- }
649
- ],
650
- "requestBody": {
651
- "content": {
652
- "application/json": {
653
- "schema": {
654
- "$ref": "#/components/schemas/CreatePartnerRolePayload"
655
- }
656
- }
657
- }
658
- },
659
- "responses": {
660
- "201": {
661
- "description": "Role created successfully",
662
- "content": {
663
- "application/json": {
664
- "schema": {
665
- "$ref": "#/components/schemas/PartnerRole"
666
- }
667
- }
668
- }
669
- },
670
- "400": {
671
- "description": "Unable to create partner role"
672
- },
673
- "500": {
674
- "description": "Internal server error"
675
- }
676
- }
677
- }
678
- },
679
- "/v2/partners/{orgId}/roles/{roleId}": {
680
- "put": {
681
- "operationId": "updatePartnerRole",
682
- "summary": "updatePartnerRole",
683
- "tags": [
684
- "partner_users"
685
- ],
686
- "description": "Update a role for a partner organization",
687
- "parameters": [
688
- {
689
- "in": "path",
690
- "name": "orgId",
691
- "schema": {
692
- "$ref": "#/components/schemas/OrganizationId"
693
- },
694
- "required": true,
695
- "description": "The organization ID of the partner"
696
- },
697
- {
698
- "in": "path",
699
- "name": "roleId",
700
- "schema": {
701
- "type": "string"
702
- },
703
- "required": true,
704
- "description": "The role ID to update"
705
- }
706
- ],
707
- "requestBody": {
708
- "content": {
709
- "application/json": {
710
- "schema": {
711
- "$ref": "#/components/schemas/UpdatePartnerRolePayload"
712
- }
713
- }
714
- }
715
- },
716
- "responses": {
717
- "200": {
718
- "description": "Role updated successfully",
719
- "content": {
720
- "application/json": {
721
- "schema": {
722
- "$ref": "#/components/schemas/PartnerRole"
723
- }
724
- }
725
- }
726
- },
727
- "400": {
728
- "description": "Unable to update partner role"
729
- },
730
- "500": {
731
- "description": "Internal server error"
732
- }
733
- }
734
- }
735
- },
736
- "/v2/partners/{orgId}/users/{userId}/roles": {
737
- "post": {
738
- "operationId": "assignPartnerUserRoles",
739
- "summary": "assignPartnerUserRoles",
740
- "tags": [
741
- "partner_users"
742
- ],
743
- "description": "Assign roles to a user in a partner organization",
744
- "parameters": [
745
- {
746
- "in": "path",
747
- "name": "orgId",
748
- "schema": {
749
- "$ref": "#/components/schemas/OrganizationId"
750
- },
751
- "required": true,
752
- "description": "The organization ID of the partner"
753
- },
754
- {
755
- "in": "path",
756
- "name": "userId",
757
- "schema": {
758
- "type": "string"
759
- },
760
- "required": true,
761
- "description": "The user ID"
762
- }
763
- ],
764
- "requestBody": {
765
- "content": {
766
- "application/json": {
767
- "schema": {
768
- "$ref": "#/components/schemas/AssignRolesPayload"
769
- }
770
- }
771
- }
772
- },
773
- "responses": {
774
- "200": {
775
- "description": "Roles assigned successfully",
776
- "content": {
777
- "application/json": {
778
- "schema": {
779
- "type": "object",
780
- "properties": {
781
- "results": {
782
- "type": "array",
783
- "items": {
784
- "type": "object",
785
- "properties": {
786
- "roleId": {
787
- "type": "string"
788
- },
789
- "success": {
790
- "type": "boolean"
791
- },
792
- "data": {
793
- "type": "object"
794
- },
795
- "error": {
796
- "type": "object"
797
- }
798
- }
799
- }
800
- }
801
- }
802
- }
803
- }
804
- }
805
- },
806
- "400": {
807
- "description": "Unable to assign roles"
808
- },
809
- "500": {
810
- "description": "Internal server error"
811
- }
812
- }
813
- },
814
- "delete": {
815
- "operationId": "unassignPartnerUserRoles",
816
- "summary": "unassignPartnerUserRoles",
817
- "tags": [
818
- "partner_users"
819
- ],
820
- "description": "Unassign roles from a user in a partner organization",
821
- "parameters": [
822
- {
823
- "in": "path",
824
- "name": "orgId",
825
- "schema": {
826
- "$ref": "#/components/schemas/OrganizationId"
827
- },
828
- "required": true,
829
- "description": "The organization ID of the partner"
830
- },
831
- {
832
- "in": "path",
833
- "name": "userId",
834
- "schema": {
835
- "type": "string"
836
- },
837
- "required": true,
838
- "description": "The user ID"
839
- }
840
- ],
841
- "requestBody": {
842
- "content": {
843
- "application/json": {
844
- "schema": {
845
- "$ref": "#/components/schemas/AssignRolesPayload"
846
- }
847
- }
848
- }
849
- },
850
- "responses": {
851
- "200": {
852
- "description": "Roles unassigned successfully",
853
- "content": {
854
- "application/json": {
855
- "schema": {
856
- "type": "object",
857
- "properties": {
858
- "results": {
859
- "type": "array",
860
- "items": {
861
- "type": "object",
862
- "properties": {
863
- "roleId": {
864
- "type": "string"
865
- },
866
- "success": {
867
- "type": "boolean"
868
- },
869
- "data": {
870
- "type": "object"
871
- },
872
- "error": {
873
- "type": "object"
874
- }
875
- }
876
- }
877
- }
878
- }
879
- }
880
- }
881
- }
882
- },
883
- "400": {
884
- "description": "Unable to unassign roles"
885
- },
886
- "500": {
887
- "description": "Internal server error"
888
- }
889
- }
890
- }
891
- }
892
- },
893
- "components": {
894
- "securitySchemes": {
895
- "EpilotAuth": {
896
- "type": "http",
897
- "scheme": "bearer",
898
- "description": "Authorization header with epilot OAuth2 bearer token",
899
- "bearerFormat": "JWT"
900
- },
901
- "AsOrganization": {
902
- "type": "apiKey",
903
- "in": "header",
904
- "name": "x-ivy-org-id",
905
- "description": "Set organization id when using internal auth"
906
- }
907
- },
908
- "schemas": {
909
- "InviteToken": {
910
- "type": "string"
911
- },
912
- "Partner": {
913
- "type": "object",
914
- "properties": {
915
- "id": {
916
- "$ref": "#/components/schemas/PartnerId"
917
- },
918
- "organization_id": {
919
- "$ref": "#/components/schemas/OrganizationId"
920
- },
921
- "created_at": {
922
- "type": "string",
923
- "example": "2022-02-08T04:44:32.246Z"
924
- },
925
- "description": {
926
- "type": "string",
927
- "description": "Description",
928
- "example": "Description"
929
- },
930
- "company_name": {
931
- "type": "string",
932
- "description": "Company name",
933
- "example": "Company name"
934
- },
935
- "invitation_token": {
936
- "description": "Invitation token",
937
- "type": "string"
938
- },
939
- "invitation_email": {
940
- "deprecated": true,
941
- "description": "Email using to receive invitation",
942
- "type": "string",
943
- "format": "email"
944
- },
945
- "email": {
946
- "description": "Email using to receive invitation",
947
- "type": "string",
948
- "format": "email"
949
- },
950
- "owner_email": {
951
- "description": "A separate email where the invitation should be sent",
952
- "type": "string",
953
- "format": "email"
954
- },
955
- "signed_up_email": {
956
- "description": "Email using to sign up",
957
- "type": "string",
958
- "format": "email"
959
- },
960
- "partner_org_id": {
961
- "description": "Target Organization",
962
- "type": "string",
963
- "example": 123456
964
- },
965
- "status": {
966
- "type": "string",
967
- "enum": [
968
- "Pending",
969
- "Request",
970
- "Deleted",
971
- "Invited",
972
- "Rejected"
973
- ]
974
- }
975
- }
976
- },
977
- "PartnerId": {
978
- "type": "string",
979
- "example": "e45a6dc2-3795-43a3-ae0f-6b6760f310fc"
980
- },
981
- "OrganizationId": {
982
- "type": "string",
983
- "example": "123"
984
- },
985
- "ActivatePartnerPayload": {
986
- "type": "object",
987
- "properties": {
988
- "company_name": {
989
- "type": "string",
990
- "description": "Company name",
991
- "example": "Company name"
992
- },
993
- "signed_up_email": {
994
- "description": "Email using to sign up",
995
- "type": "string",
996
- "format": "email"
997
- },
998
- "organization_id": {
999
- "description": "organization id",
1000
- "type": "string"
1001
- }
1002
- },
1003
- "required": [
1004
- "signed_up_email",
1005
- "organization_id"
1006
- ]
1007
- },
1008
- "PartnerInvitationPayload": {
1009
- "type": "object",
1010
- "properties": {
1011
- "language": {
1012
- "type": "string",
1013
- "description": "Language for partner invitation email",
1014
- "enum": [
1015
- "en",
1016
- "de"
1017
- ],
1018
- "default": "en"
1019
- }
1020
- }
1021
- },
1022
- "Assignable": {
1023
- "oneOf": [
1024
- {
1025
- "$ref": "#/components/schemas/AssignableUser"
1026
- },
1027
- {
1028
- "$ref": "#/components/schemas/AssignablePartnerUser"
1029
- },
1030
- {
1031
- "$ref": "#/components/schemas/AssignableOrganization"
1032
- },
1033
- {
1034
- "$ref": "#/components/schemas/AssignableEcpPlaceholder"
1035
- },
1036
- {
1037
- "$ref": "#/components/schemas/AssignableGroup"
1038
- }
1039
- ]
1040
- },
1041
- "BaseAssignable": {
1042
- "type": "object",
1043
- "properties": {
1044
- "type": {
1045
- "type": "string",
1046
- "example": "user"
1047
- },
1048
- "display_name": {
1049
- "type": "string",
1050
- "example": "Example User"
1051
- },
1052
- "image_uri": {
1053
- "type": "object",
1054
- "properties": {
1055
- "original": {
1056
- "type": "string",
1057
- "format": "uri",
1058
- "example": "https://epilot-staging-user-content.s3.eu-central-1.amazonaws.com/728/8043d909-71fc-4838-a363-1b15dc1d585c/epilot.png"
1059
- },
1060
- "thumbnail_32": {
1061
- "type": "string",
1062
- "format": "uri",
1063
- "example": "https://file.sls.epilot.io/v1/files/public/preview?w=32&h=32&key=/728/8043d909-71fc-4838-a363-1b15dc1d585c/epilot.png"
1064
- }
1065
- },
1066
- "required": [
1067
- "original"
1068
- ]
1069
- },
1070
- "org_id": {
1071
- "$ref": "#/components/schemas/OrganizationId"
1072
- },
1073
- "created_at": {
1074
- "type": "string",
1075
- "example": "2022-02-08T04:44:32.246Z"
1076
- },
1077
- "activated_at": {
1078
- "type": "string",
1079
- "example": "2022-02-08T04:44:32.246Z"
1080
- },
1081
- "status": {
1082
- "type": "string",
1083
- "enum": [
1084
- "Active",
1085
- "Pending",
1086
- "Deactivated",
1087
- "Deleted"
1088
- ]
1089
- }
1090
- },
1091
- "required": [
1092
- "type",
1093
- "display_name",
1094
- "org_id"
1095
- ]
1096
- },
1097
- "AssignableUser": {
1098
- "allOf": [
1099
- {
1100
- "$ref": "#/components/schemas/BaseAssignable"
1101
- },
1102
- {
1103
- "type": "object",
1104
- "properties": {
1105
- "type": {
1106
- "type": "string",
1107
- "enum": [
1108
- "user"
1109
- ],
1110
- "example": "user"
1111
- },
1112
- "display_name": {
1113
- "type": "string",
1114
- "example": "Example User"
1115
- },
1116
- "user_id": {
1117
- "type": "string",
1118
- "example": "456"
1119
- },
1120
- "email": {
1121
- "type": "string",
1122
- "example": "example@example.com"
1123
- }
1124
- }
1125
- }
1126
- ]
1127
- },
1128
- "AssignablePartnerUser": {
1129
- "allOf": [
1130
- {
1131
- "$ref": "#/components/schemas/BaseAssignable"
1132
- },
1133
- {
1134
- "type": "object",
1135
- "properties": {
1136
- "type": {
1137
- "type": "string",
1138
- "enum": [
1139
- "partner_user"
1140
- ],
1141
- "example": "partner_user"
1142
- },
1143
- "display_name": {
1144
- "type": "string",
1145
- "example": "Example Partner User"
1146
- },
1147
- "partner_id": {
1148
- "$ref": "#/components/schemas/PartnerId"
1149
- },
1150
- "user_id": {
1151
- "type": "string",
1152
- "example": "456"
1153
- },
1154
- "email": {
1155
- "type": "string",
1156
- "example": "example@example.com"
1157
- }
1158
- }
1159
- }
1160
- ]
1161
- },
1162
- "AssignableGroup": {
1163
- "allOf": [
1164
- {
1165
- "$ref": "#/components/schemas/BaseAssignable"
1166
- },
1167
- {
1168
- "type": "object",
1169
- "properties": {
1170
- "group_id": {
1171
- "type": "string",
1172
- "example": "456"
1173
- }
1174
- }
1175
- }
1176
- ]
1177
- },
1178
- "AssignableOrganization": {
1179
- "allOf": [
1180
- {
1181
- "$ref": "#/components/schemas/BaseAssignable"
1182
- },
1183
- {
1184
- "type": "object",
1185
- "properties": {
1186
- "type": {
1187
- "type": "string",
1188
- "enum": [
1189
- "partner_organization"
1190
- ],
1191
- "example": "partner_organization"
1192
- },
1193
- "display_name": {
1194
- "type": "string",
1195
- "example": "Example Partner Organization"
1196
- },
1197
- "partner_id": {
1198
- "$ref": "#/components/schemas/PartnerId"
1199
- },
1200
- "email": {
1201
- "type": "string",
1202
- "example": "Email of Partner Organization"
1203
- },
1204
- "geolocations": {
1205
- "type": "array",
1206
- "items": {
1207
- "$ref": "#/components/schemas/AddressGeolocation"
1208
- }
1209
- },
1210
- "phone": {
1211
- "type": "string",
1212
- "example": "Phone number of Partner"
1213
- },
1214
- "activity_radius": {
1215
- "type": "number",
1216
- "description": "Activity radius, in km, the partner is operating in",
1217
- "example": 50
1218
- }
1219
- },
1220
- "required": [
1221
- "type",
1222
- "display_name",
1223
- "partner_id"
1224
- ]
1225
- }
1226
- ]
1227
- },
1228
- "AssignableEcpPlaceholder": {
1229
- "allOf": [
1230
- {
1231
- "$ref": "#/components/schemas/BaseAssignable"
1232
- },
1233
- {
1234
- "type": "object",
1235
- "properties": {
1236
- "type": {
1237
- "type": "string",
1238
- "enum": [
1239
- "ecp"
1240
- ],
1241
- "example": "ecp"
1242
- },
1243
- "display_name": {
1244
- "type": "string",
1245
- "example": "Example Ecp Placeholder"
1246
- },
1247
- "user_id": {
1248
- "type": "string",
1249
- "example": "456"
1250
- },
1251
- "email": {
1252
- "type": "string",
1253
- "example": "Email of ECP Placeholder"
1254
- }
1255
- },
1256
- "required": [
1257
- "type",
1258
- "display_name",
1259
- "user_id"
1260
- ]
1261
- }
1262
- ]
1263
- },
1264
- "SearchGeolocation": {
1265
- "type": "object",
1266
- "properties": {
1267
- "address": {
1268
- "type": "string",
1269
- "description": "Address text to convert into geolocation coordinates",
1270
- "example": "Auweg 1, 93055 Regensburg, DE"
1271
- }
1272
- },
1273
- "required": [
1274
- "address"
1275
- ]
1276
- },
1277
- "Geolocation": {
1278
- "type": "object",
1279
- "properties": {
1280
- "lat": {
1281
- "type": "number",
1282
- "description": "Latitude",
1283
- "example": 49.013
1284
- },
1285
- "lng": {
1286
- "type": "number",
1287
- "description": "Longitude",
1288
- "example": 12.101
1289
- },
1290
- "addressLabel": {
1291
- "type": "string",
1292
- "description": "Full address label as returned by the location service"
1293
- },
1294
- "relevance": {
1295
- "type": "number",
1296
- "description": "Relevance of the result. A number between 0 and 1. Closer to 1 means more relevant"
1297
- }
1298
- },
1299
- "required": [
1300
- "lat",
1301
- "lng"
1302
- ]
1303
- },
1304
- "Address": {
1305
- "type": "object",
1306
- "properties": {
1307
- "street": {
1308
- "type": "string",
1309
- "description": "Street",
1310
- "example": "Auweg"
1311
- },
1312
- "street_number": {
1313
- "type": "string",
1314
- "description": "Street",
1315
- "example": "10"
1316
- },
1317
- "city": {
1318
- "type": "string",
1319
- "description": "City",
1320
- "example": "Regensburg"
1321
- },
1322
- "postal_code": {
1323
- "type": "string",
1324
- "description": "Postal code",
1325
- "example": "93055"
1326
- },
1327
- "country": {
1328
- "type": "string",
1329
- "description": "Country",
1330
- "example": "DE"
1331
- }
1332
- }
1333
- },
1334
- "AddressGeolocation": {
1335
- "type": "object",
1336
- "allOf": [
1337
- {
1338
- "type": "object",
1339
- "properties": {
1340
- "address": {
1341
- "$ref": "#/components/schemas/Address"
1342
- }
1343
- }
1344
- },
1345
- {
1346
- "$ref": "#/components/schemas/Geolocation"
1347
- }
1348
- ],
1349
- "required": [
1350
- "address"
1351
- ]
1352
- },
1353
- "PartnerUser": {
1354
- "type": "object",
1355
- "properties": {
1356
- "id": {
1357
- "type": "string",
1358
- "description": "User ID",
1359
- "example": "456"
1360
- },
1361
- "name": {
1362
- "type": "string",
1363
- "description": "User name",
1364
- "example": "John Doe"
1365
- },
1366
- "email": {
1367
- "type": "string",
1368
- "format": "email",
1369
- "description": "User email",
1370
- "example": "user@example.com"
1371
- },
1372
- "status": {
1373
- "type": "string",
1374
- "description": "User status",
1375
- "example": "Active"
1376
- },
1377
- "image": {
1378
- "type": "object",
1379
- "properties": {
1380
- "original": {
1381
- "type": "string",
1382
- "format": "uri",
1383
- "description": "Original image URI"
1384
- },
1385
- "thumbnail_32": {
1386
- "type": "string",
1387
- "format": "uri",
1388
- "description": "Thumbnail image URI (32x32)"
1389
- }
1390
- }
1391
- },
1392
- "roles": {
1393
- "type": "array",
1394
- "description": "List of roles assigned to the user",
1395
- "items": {
1396
- "type": "object",
1397
- "properties": {
1398
- "id": {
1399
- "type": "string",
1400
- "description": "Role ID",
1401
- "example": "role-123"
1402
- },
1403
- "slug": {
1404
- "type": "string",
1405
- "description": "Role slug",
1406
- "example": "admin"
1407
- },
1408
- "name": {
1409
- "type": "string",
1410
- "description": "Role name",
1411
- "example": "Administrator"
1412
- }
1413
- },
1414
- "required": [
1415
- "id",
1416
- "slug",
1417
- "name"
1418
- ]
1419
- }
1420
- }
1421
- },
1422
- "required": [
1423
- "id",
1424
- "email",
1425
- "status",
1426
- "roles"
1427
- ]
1428
- },
1429
- "CreatePartnerUserPayload": {
1430
- "type": "object",
1431
- "properties": {
1432
- "email": {
1433
- "type": "string",
1434
- "format": "email",
1435
- "description": "User email address",
1436
- "example": "user@example.com"
1437
- },
1438
- "language": {
1439
- "type": "string",
1440
- "enum": [
1441
- "en",
1442
- "de"
1443
- ],
1444
- "description": "User language",
1445
- "example": "en"
1446
- },
1447
- "roles": {
1448
- "type": "array",
1449
- "description": "Role IDs that should be automatically assigned to this user upon creation",
1450
- "items": {
1451
- "type": "string"
1452
- },
1453
- "example": [
1454
- "role-123",
1455
- "role-456"
1456
- ]
1457
- }
1458
- },
1459
- "required": [
1460
- "email"
1461
- ]
1462
- },
1463
- "CreatePartnerRolePayload": {
1464
- "type": "object",
1465
- "properties": {
1466
- "name": {
1467
- "type": "string",
1468
- "description": "Role name",
1469
- "example": "Partner Admin"
1470
- },
1471
- "slug": {
1472
- "type": "string",
1473
- "description": "Role slug",
1474
- "example": "partner_admin"
1475
- },
1476
- "grants": {
1477
- "type": "array",
1478
- "description": "Permission grants for the role",
1479
- "items": {
1480
- "$ref": "#/components/schemas/GrantWithDependencies"
1481
- }
1482
- }
1483
- },
1484
- "required": [
1485
- "name",
1486
- "slug",
1487
- "grants"
1488
- ]
1489
- },
1490
- "UpdatePartnerRolePayload": {
1491
- "allOf": [
1492
- {
1493
- "properties": {
1494
- "grants": {
1495
- "type": "array",
1496
- "items": {
1497
- "$ref": "#/components/schemas/GrantWithDependencies"
1498
- }
1499
- }
1500
- }
1501
- },
1502
- {
1503
- "$ref": "#/components/schemas/BaseRoleForCreate"
1504
- }
1505
- ]
1506
- },
1507
- "Grant": {
1508
- "type": "object",
1509
- "properties": {
1510
- "action": {
1511
- "type": "string",
1512
- "example": "entity-read"
1513
- },
1514
- "resource": {
1515
- "type": "string",
1516
- "example": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947"
1517
- },
1518
- "effect": {
1519
- "type": "string",
1520
- "default": "allow",
1521
- "enum": [
1522
- "allow",
1523
- "deny"
1524
- ]
1525
- },
1526
- "conditions": {
1527
- "type": "array",
1528
- "items": {
1529
- "$ref": "#/components/schemas/GrantCondition"
1530
- }
1531
- }
1532
- },
1533
- "required": [
1534
- "action"
1535
- ]
1536
- },
1537
- "GrantWithDependencies": {
1538
- "allOf": [
1539
- {
1540
- "$ref": "#/components/schemas/Grant"
1541
- },
1542
- {
1543
- "type": "object",
1544
- "properties": {
1545
- "dependencies": {
1546
- "description": "Provided additional dependencies, exploded when storing the role",
1547
- "type": "array",
1548
- "items": {
1549
- "$ref": "#/components/schemas/Grant"
1550
- }
1551
- }
1552
- }
1553
- }
1554
- ]
1555
- },
1556
- "GrantCondition": {
1557
- "allOf": [
1558
- {
1559
- "description": "An additional condition that must be met for the grant",
1560
- "type": "object",
1561
- "required": [
1562
- "operation"
1563
- ]
1564
- },
1565
- {
1566
- "anyOf": [
1567
- {
1568
- "$ref": "#/components/schemas/EqualsCondition"
1569
- }
1570
- ]
1571
- }
1572
- ]
1573
- },
1574
- "EqualsCondition": {
1575
- "description": "Check if attribute equals to any of the values",
1576
- "type": "object",
1577
- "properties": {
1578
- "attribute": {
1579
- "type": "string",
1580
- "example": "workflows.primary.task_name"
1581
- },
1582
- "operation": {
1583
- "type": "string",
1584
- "enum": [
1585
- "equals"
1586
- ]
1587
- },
1588
- "values": {
1589
- "type": "array",
1590
- "items": {
1591
- "example": "Qualification"
1592
- }
1593
- }
1594
- },
1595
- "required": [
1596
- "attribute",
1597
- "operation",
1598
- "values"
1599
- ]
1600
- },
1601
- "RoleId": {
1602
- "type": "string",
1603
- "example": "123:owner",
1604
- "description": "Format: <organization_id>:<slug>"
1605
- },
1606
- "BaseRoleForCreate": {
1607
- "type": "object",
1608
- "properties": {
1609
- "id": {
1610
- "$ref": "#/components/schemas/RoleId"
1611
- },
1612
- "name": {
1613
- "type": "string",
1614
- "example": "Owner",
1615
- "description": "Human-friendly name for the role"
1616
- },
1617
- "slug": {
1618
- "type": "string",
1619
- "example": "owner",
1620
- "description": "URL-friendly name for the role"
1621
- },
1622
- "grants": {
1623
- "type": "array",
1624
- "items": {
1625
- "$ref": "#/components/schemas/Grant"
1626
- },
1627
- "description": "List of grants (permissions) applied to the role"
1628
- }
1629
- },
1630
- "required": [
1631
- "name",
1632
- "slug",
1633
- "grants"
1634
- ]
1635
- },
1636
- "PartnerRole": {
1637
- "type": "object",
1638
- "properties": {
1639
- "id": {
1640
- "type": "string",
1641
- "description": "Role ID",
1642
- "example": "role-123"
1643
- },
1644
- "slug": {
1645
- "type": "string",
1646
- "description": "Role slug",
1647
- "example": "admin"
1648
- },
1649
- "name": {
1650
- "type": "string",
1651
- "description": "Role name",
1652
- "example": "Administrator"
1653
- },
1654
- "type": {
1655
- "type": "string",
1656
- "description": "Role type",
1657
- "example": "share_role"
1658
- }
1659
- },
1660
- "required": [
1661
- "id",
1662
- "slug",
1663
- "name"
1664
- ]
1665
- },
1666
- "AssignRolesPayload": {
1667
- "type": "object",
1668
- "properties": {
1669
- "roleIds": {
1670
- "type": "array",
1671
- "description": "Array of role IDs to assign/unassign",
1672
- "items": {
1673
- "type": "string"
1674
- },
1675
- "example": [
1676
- "role-123",
1677
- "role-456"
1678
- ]
1679
- }
1680
- },
1681
- "required": [
1682
- "roleIds"
1683
- ]
1684
- },
1685
- "User": {
1686
- "type": "object",
1687
- "properties": {
1688
- "id": {
1689
- "type": "string",
1690
- "description": "User ID",
1691
- "example": "456"
1692
- },
1693
- "email": {
1694
- "type": "string",
1695
- "format": "email",
1696
- "description": "User email",
1697
- "example": "user@example.com"
1698
- },
1699
- "display_name": {
1700
- "type": "string",
1701
- "description": "User display name",
1702
- "example": "John Doe"
1703
- },
1704
- "status": {
1705
- "type": "string",
1706
- "description": "User status",
1707
- "example": "Active"
1708
- }
1709
- }
1710
- }
1711
- }
1712
- },
1713
- "servers": [
1714
- {
1715
- "url": "https://partner-directory-api.sls.epilot.io"
1716
- }
1717
- ]
1718
- }