@epilot/sdk 2.1.1 → 2.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 (118) hide show
  1. package/definitions/partner-directory-runtime.json +1 -1
  2. package/definitions/partner-directory.json +795 -229
  3. package/dist/apis/access-token.cjs +6 -6
  4. package/dist/apis/access-token.js +1 -1
  5. package/dist/apis/address-suggestions.cjs +6 -6
  6. package/dist/apis/address-suggestions.js +1 -1
  7. package/dist/apis/address.cjs +6 -6
  8. package/dist/apis/address.js +1 -1
  9. package/dist/apis/ai-agents.cjs +6 -6
  10. package/dist/apis/ai-agents.js +1 -1
  11. package/dist/apis/app.cjs +6 -6
  12. package/dist/apis/app.js +1 -1
  13. package/dist/apis/audit-logs.cjs +6 -6
  14. package/dist/apis/audit-logs.js +1 -1
  15. package/dist/apis/automation.cjs +6 -6
  16. package/dist/apis/automation.js +1 -1
  17. package/dist/apis/billing.cjs +6 -6
  18. package/dist/apis/billing.js +1 -1
  19. package/dist/apis/blueprint-manifest.cjs +6 -6
  20. package/dist/apis/blueprint-manifest.js +1 -1
  21. package/dist/apis/consent.cjs +6 -6
  22. package/dist/apis/consent.js +1 -1
  23. package/dist/apis/customer-portal.cjs +6 -6
  24. package/dist/apis/customer-portal.js +1 -1
  25. package/dist/apis/dashboard.cjs +6 -6
  26. package/dist/apis/dashboard.js +1 -1
  27. package/dist/apis/data-management.cjs +6 -6
  28. package/dist/apis/data-management.js +1 -1
  29. package/dist/apis/deduplication.cjs +6 -6
  30. package/dist/apis/deduplication.js +1 -1
  31. package/dist/apis/design.cjs +6 -6
  32. package/dist/apis/design.js +1 -1
  33. package/dist/apis/document.cjs +6 -6
  34. package/dist/apis/document.js +1 -1
  35. package/dist/apis/email-settings.cjs +6 -6
  36. package/dist/apis/email-settings.js +1 -1
  37. package/dist/apis/email-template.cjs +6 -6
  38. package/dist/apis/email-template.js +1 -1
  39. package/dist/apis/entity-mapping.cjs +6 -6
  40. package/dist/apis/entity-mapping.js +1 -1
  41. package/dist/apis/entity.cjs +6 -6
  42. package/dist/apis/entity.js +1 -1
  43. package/dist/apis/environments.cjs +6 -6
  44. package/dist/apis/environments.js +1 -1
  45. package/dist/apis/erp-integration.cjs +6 -6
  46. package/dist/apis/erp-integration.js +1 -1
  47. package/dist/apis/event-catalog.cjs +6 -6
  48. package/dist/apis/event-catalog.js +1 -1
  49. package/dist/apis/file.cjs +6 -6
  50. package/dist/apis/file.js +1 -1
  51. package/dist/apis/iban.cjs +6 -6
  52. package/dist/apis/iban.js +1 -1
  53. package/dist/apis/journey.cjs +6 -6
  54. package/dist/apis/journey.js +1 -1
  55. package/dist/apis/kanban.cjs +6 -6
  56. package/dist/apis/kanban.js +1 -1
  57. package/dist/apis/message.cjs +6 -6
  58. package/dist/apis/message.js +1 -1
  59. package/dist/apis/metering.cjs +6 -6
  60. package/dist/apis/metering.js +1 -1
  61. package/dist/apis/notes.cjs +6 -6
  62. package/dist/apis/notes.js +1 -1
  63. package/dist/apis/notification.cjs +6 -6
  64. package/dist/apis/notification.js +1 -1
  65. package/dist/apis/organization.cjs +6 -6
  66. package/dist/apis/organization.js +1 -1
  67. package/dist/apis/partner-directory.cjs +8 -8
  68. package/dist/apis/partner-directory.d.cts +2 -2
  69. package/dist/apis/partner-directory.d.ts +2 -2
  70. package/dist/apis/partner-directory.js +2 -2
  71. package/dist/apis/permissions.cjs +6 -6
  72. package/dist/apis/permissions.js +1 -1
  73. package/dist/apis/pricing-tier.cjs +6 -6
  74. package/dist/apis/pricing-tier.js +1 -1
  75. package/dist/apis/pricing.cjs +6 -6
  76. package/dist/apis/pricing.js +1 -1
  77. package/dist/apis/purpose.cjs +6 -6
  78. package/dist/apis/purpose.js +1 -1
  79. package/dist/apis/sandbox.cjs +6 -6
  80. package/dist/apis/sandbox.js +1 -1
  81. package/dist/apis/submission.cjs +6 -6
  82. package/dist/apis/submission.js +1 -1
  83. package/dist/apis/targeting.cjs +6 -6
  84. package/dist/apis/targeting.js +1 -1
  85. package/dist/apis/template-variables.cjs +6 -6
  86. package/dist/apis/template-variables.js +1 -1
  87. package/dist/apis/user.cjs +6 -6
  88. package/dist/apis/user.js +1 -1
  89. package/dist/apis/validation-rules.cjs +6 -6
  90. package/dist/apis/validation-rules.js +1 -1
  91. package/dist/apis/webhooks.cjs +6 -6
  92. package/dist/apis/webhooks.js +1 -1
  93. package/dist/apis/workflow-definition.cjs +6 -6
  94. package/dist/apis/workflow-definition.js +1 -1
  95. package/dist/apis/workflow.cjs +6 -6
  96. package/dist/apis/workflow.js +1 -1
  97. package/dist/bin/cli.js +1 -1
  98. package/dist/{chunk-F5JVW2D5.cjs → chunk-BFUNXZRX.cjs} +1 -1
  99. package/dist/{chunk-AUH6NP6Y.js → chunk-I2XRA5AM.js} +1 -1
  100. package/dist/{chunk-NBYH536J.js → chunk-QTU4H6NQ.js} +2 -2
  101. package/dist/{chunk-WSZWUQDD.cjs → chunk-T7LQKRUK.cjs} +2 -2
  102. package/dist/index.cjs +10 -10
  103. package/dist/index.d.cts +1 -1
  104. package/dist/index.d.ts +1 -1
  105. package/dist/index.js +2 -2
  106. package/dist/{js-yaml-UPZKYVRY.js → js-yaml-DLCVPJ7G.js} +17 -15
  107. package/dist/partner-directory-THI7JEXK.js +7 -0
  108. package/dist/partner-directory-ZQIBKD5Q.cjs +7 -0
  109. package/dist/{partner-directory-runtime-RSONSDNJ.cjs → partner-directory-runtime-AUHVA5Q3.cjs} +2 -2
  110. package/dist/{partner-directory-runtime-QURDOO4Z.js → partner-directory-runtime-GNVT7U7R.js} +1 -1
  111. package/dist/partner-directory.d-BCIjHoGs.d.cts +2337 -0
  112. package/dist/partner-directory.d-BCIjHoGs.d.ts +2337 -0
  113. package/docs/partner-directory.md +295 -127
  114. package/package.json +1 -1
  115. package/dist/partner-directory-2XMPQWWX.js +0 -7
  116. package/dist/partner-directory-WHNTKQ5E.cjs +0 -7
  117. package/dist/partner-directory.d-CRNkDF8q.d.cts +0 -1510
  118. package/dist/partner-directory.d-CRNkDF8q.d.ts +0 -1510
@@ -1,4 +1,4 @@
1
- # Partner API
1
+ # Partner Directory API
2
2
 
3
3
  - **Base URL:** `https://partner-directory-api.sls.epilot.io`
4
4
  - **Full API Docs:** [https://docs.epilot.io/api/partner-directory](https://docs.epilot.io/api/partner-directory)
@@ -24,7 +24,7 @@ const { data } = await partnerDirectoryClient.approvePartner(...)
24
24
 
25
25
  ## Operations
26
26
 
27
- **partners**
27
+ **Partners**
28
28
  - [`approvePartner`](#approvepartner)
29
29
  - [`rejectPartner`](#rejectpartner)
30
30
  - [`searchAssignable`](#searchassignable)
@@ -34,13 +34,14 @@ const { data } = await partnerDirectoryClient.approvePartner(...)
34
34
  - [`searchGeolocationForText`](#searchgeolocationfortext)
35
35
  - [`invitePartnerV2`](#invitepartnerv2)
36
36
 
37
- **partner_users**
37
+ **Partner Users**
38
38
  - [`getPartnerUsers`](#getpartnerusers)
39
39
  - [`createPartnerUser`](#createpartneruser)
40
40
  - [`deletePartnerUser`](#deletepartneruser)
41
41
  - [`getPartnerRoles`](#getpartnerroles)
42
42
  - [`createPartnerRole`](#createpartnerrole)
43
43
  - [`updatePartnerRole`](#updatepartnerrole)
44
+ - [`deletePartnerRole`](#deletepartnerrole)
44
45
  - [`assignPartnerUserRoles`](#assignpartneruserroles)
45
46
  - [`unassignPartnerUserRoles`](#unassignpartneruserroles)
46
47
 
@@ -78,7 +79,7 @@ const { data } = await partnerDirectoryClient.approvePartner(...)
78
79
 
79
80
  ### `approvePartner`
80
81
 
81
- Approve partner request
82
+ Approves a pending partner request, allowing the partner to begin collaboration.
82
83
 
83
84
  `POST /v1/partners/{id}/approve`
84
85
 
@@ -96,14 +97,14 @@ const { data } = await client.approvePartner({
96
97
  "id": "e45a6dc2-3795-43a3-ae0f-6b6760f310fc",
97
98
  "organization_id": "123",
98
99
  "created_at": "2022-02-08T04:44:32.246Z",
99
- "description": "Description",
100
- "company_name": "Company name",
101
- "invitation_token": "string",
100
+ "description": "Regional solar installation partner for Bavaria",
101
+ "company_name": "Acme Solar GmbH",
102
+ "invitation_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
102
103
  "invitation_email": "user@example.com",
103
- "email": "user@example.com",
104
- "owner_email": "user@example.com",
105
- "signed_up_email": "user@example.com",
106
- "partner_org_id": 123456,
104
+ "email": "contact@acme-solar.de",
105
+ "owner_email": "owner@acme-solar.de",
106
+ "signed_up_email": "admin@acme-solar.de",
107
+ "partner_org_id": "456789",
107
108
  "status": "Pending"
108
109
  }
109
110
  ```
@@ -114,7 +115,7 @@ const { data } = await client.approvePartner({
114
115
 
115
116
  ### `rejectPartner`
116
117
 
117
- Reject partner request
118
+ Rejects a pending partner request, declining the partnership.
118
119
 
119
120
  `POST /v1/partners/{id}/reject`
120
121
 
@@ -132,14 +133,14 @@ const { data } = await client.rejectPartner({
132
133
  "id": "e45a6dc2-3795-43a3-ae0f-6b6760f310fc",
133
134
  "organization_id": "123",
134
135
  "created_at": "2022-02-08T04:44:32.246Z",
135
- "description": "Description",
136
- "company_name": "Company name",
137
- "invitation_token": "string",
136
+ "description": "Regional solar installation partner for Bavaria",
137
+ "company_name": "Acme Solar GmbH",
138
+ "invitation_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
138
139
  "invitation_email": "user@example.com",
139
- "email": "user@example.com",
140
- "owner_email": "user@example.com",
141
- "signed_up_email": "user@example.com",
142
- "partner_org_id": 123456,
140
+ "email": "contact@acme-solar.de",
141
+ "owner_email": "owner@acme-solar.de",
142
+ "signed_up_email": "admin@acme-solar.de",
143
+ "partner_org_id": "456789",
143
144
  "status": "Pending"
144
145
  }
145
146
  ```
@@ -150,7 +151,7 @@ const { data } = await client.rejectPartner({
150
151
 
151
152
  ### `searchAssignable`
152
153
 
153
- searchAssignables
154
+ Search for users and organizations that can be assigned to tasks, workflows, or entities.
154
155
 
155
156
  `POST /v1/partners/assignables:search`
156
157
 
@@ -158,11 +159,11 @@ searchAssignables
158
159
  const { data } = await client.searchAssignable(
159
160
  null,
160
161
  {
161
- q: '',
162
+ q: 'john',
162
163
  from: 0,
163
164
  size: 25,
164
- org_ids: ['123'],
165
- portalUsersEntityIdScope: '',
165
+ org_ids: ['123', '456'],
166
+ portalUsersEntityIdScope: 'f7c22299-ca72-4bca-8538-0a88eeefc947',
166
167
  types: ['user', 'partner_user', 'partner_organization', 'ecp', 'group']
167
168
  },
168
169
  )
@@ -173,11 +174,11 @@ const { data } = await client.searchAssignable(
173
174
 
174
175
  ```json
175
176
  {
176
- "hits": 25,
177
+ "hits": 42,
177
178
  "results": [
178
179
  {
179
180
  "type": "user",
180
- "display_name": "Example User",
181
+ "display_name": "John Smith",
181
182
  "image_uri": {
182
183
  "original": "https://epilot-staging-user-content.s3.eu-central-1.amazonaws.com/728/8043d909-71fc-4838-a363-1b15dc1d585c/epilot.png",
183
184
  "thumbnail_32": "https://file.sls.epilot.io/v1/files/public/preview?w=32&h=32&key=/728/8043d909-71fc-4838-a363-1b15dc1d585c/epilot.png"
@@ -187,7 +188,7 @@ const { data } = await client.searchAssignable(
187
188
  "activated_at": "2022-02-08T04:44:32.246Z",
188
189
  "status": "Active",
189
190
  "user_id": "456",
190
- "email": "example@example.com"
191
+ "email": "john.smith@example.com"
191
192
  }
192
193
  ]
193
194
  }
@@ -199,7 +200,7 @@ const { data } = await client.searchAssignable(
199
200
 
200
201
  ### `batchGetAssignable`
201
202
 
202
- batchGet
203
+ Retrieve multiple assignable users or groups by their IDs in a single request.
203
204
 
204
205
  `POST /v1/partners/assignables:batchGet`
205
206
 
@@ -208,9 +209,9 @@ const { data } = await client.batchGetAssignable(
208
209
  null,
209
210
  [
210
211
  {
211
- user_id: 'string',
212
- org_id: 'string',
213
- group_id: 'string'
212
+ user_id: '456',
213
+ org_id: '123',
214
+ group_id: 'group-789'
214
215
  }
215
216
  ],
216
217
  )
@@ -221,11 +222,11 @@ const { data } = await client.batchGetAssignable(
221
222
 
222
223
  ```json
223
224
  {
224
- "hits": 25,
225
+ "hits": 3,
225
226
  "results": [
226
227
  {
227
228
  "type": "user",
228
- "display_name": "Example User",
229
+ "display_name": "John Smith",
229
230
  "image_uri": {
230
231
  "original": "https://epilot-staging-user-content.s3.eu-central-1.amazonaws.com/728/8043d909-71fc-4838-a363-1b15dc1d585c/epilot.png",
231
232
  "thumbnail_32": "https://file.sls.epilot.io/v1/files/public/preview?w=32&h=32&key=/728/8043d909-71fc-4838-a363-1b15dc1d585c/epilot.png"
@@ -235,7 +236,7 @@ const { data } = await client.batchGetAssignable(
235
236
  "activated_at": "2022-02-08T04:44:32.246Z",
236
237
  "status": "Active",
237
238
  "user_id": "456",
238
- "email": "example@example.com"
239
+ "email": "john.smith@example.com"
239
240
  }
240
241
  ]
241
242
  }
@@ -247,7 +248,7 @@ const { data } = await client.batchGetAssignable(
247
248
 
248
249
  ### `getPartnerByToken`
249
250
 
250
- Get partner by token
251
+ Retrieves partner information using an invitation token.
251
252
 
252
253
  `GET /v1/partner-directory/public/getPartnerByToken`
253
254
 
@@ -265,14 +266,14 @@ const { data } = await client.getPartnerByToken({
265
266
  "id": "e45a6dc2-3795-43a3-ae0f-6b6760f310fc",
266
267
  "organization_id": "123",
267
268
  "created_at": "2022-02-08T04:44:32.246Z",
268
- "description": "Description",
269
- "company_name": "Company name",
270
- "invitation_token": "string",
269
+ "description": "Regional solar installation partner for Bavaria",
270
+ "company_name": "Acme Solar GmbH",
271
+ "invitation_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
271
272
  "invitation_email": "user@example.com",
272
- "email": "user@example.com",
273
- "owner_email": "user@example.com",
274
- "signed_up_email": "user@example.com",
275
- "partner_org_id": 123456,
273
+ "email": "contact@acme-solar.de",
274
+ "owner_email": "owner@acme-solar.de",
275
+ "signed_up_email": "admin@acme-solar.de",
276
+ "partner_org_id": "456789",
276
277
  "status": "Pending"
277
278
  }
278
279
  ```
@@ -283,7 +284,7 @@ const { data } = await client.getPartnerByToken({
283
284
 
284
285
  ### `activatePartner`
285
286
 
286
- Activate partner using an invite token
287
+ Activates a partner account using an invitation token.
287
288
 
288
289
  `POST /v1/partner-directory/public/activate`
289
290
 
@@ -293,9 +294,9 @@ const { data } = await client.activatePartner(
293
294
  token: 'example',
294
295
  },
295
296
  {
296
- company_name: 'Company name',
297
- signed_up_email: 'user@example.com',
298
- organization_id: 'string'
297
+ company_name: 'Acme Solar GmbH',
298
+ signed_up_email: 'admin@acme-solar.de',
299
+ organization_id: '456'
299
300
  },
300
301
  )
301
302
  ```
@@ -304,7 +305,7 @@ const { data } = await client.activatePartner(
304
305
 
305
306
  ### `searchGeolocationForText`
306
307
 
307
- Converts a given string, in the format of an address, to geo-location latitude and longitude
308
+ Converts an address string to geographic coordinates (latitude and longitude).
308
309
 
309
310
  `POST /v1/geolocation/text:search`
310
311
 
@@ -324,8 +325,8 @@ const { data } = await client.searchGeolocationForText(
324
325
  {
325
326
  "lat": 49.013,
326
327
  "lng": 12.101,
327
- "addressLabel": "string",
328
- "relevance": 0
328
+ "addressLabel": "Auweg 1, 93055 Regensburg, Germany",
329
+ "relevance": 0.95
329
330
  }
330
331
  ```
331
332
 
@@ -335,7 +336,7 @@ const { data } = await client.searchGeolocationForText(
335
336
 
336
337
  ### `invitePartnerV2`
337
338
 
338
- Invite a partner into collaboration. It will send an email to partner and ask to join into collaboration
339
+ Sends an invitation email to a partner organization to begin collaboration.
339
340
 
340
341
  `POST /v2/partners/{id}/invite`
341
342
 
@@ -345,7 +346,7 @@ const { data } = await client.invitePartnerV2(
345
346
  id: '123e4567-e89b-12d3-a456-426614174000',
346
347
  },
347
348
  {
348
- language: 'en'
349
+ language: 'de'
349
350
  },
350
351
  )
351
352
  ```
@@ -358,14 +359,14 @@ const { data } = await client.invitePartnerV2(
358
359
  "id": "e45a6dc2-3795-43a3-ae0f-6b6760f310fc",
359
360
  "organization_id": "123",
360
361
  "created_at": "2022-02-08T04:44:32.246Z",
361
- "description": "Description",
362
- "company_name": "Company name",
363
- "invitation_token": "string",
362
+ "description": "Regional solar installation partner for Bavaria",
363
+ "company_name": "Acme Solar GmbH",
364
+ "invitation_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
364
365
  "invitation_email": "user@example.com",
365
- "email": "user@example.com",
366
- "owner_email": "user@example.com",
367
- "signed_up_email": "user@example.com",
368
- "partner_org_id": 123456,
366
+ "email": "contact@acme-solar.de",
367
+ "owner_email": "owner@acme-solar.de",
368
+ "signed_up_email": "admin@acme-solar.de",
369
+ "partner_org_id": "456789",
369
370
  "status": "Pending"
370
371
  }
371
372
  ```
@@ -376,7 +377,7 @@ const { data } = await client.invitePartnerV2(
376
377
 
377
378
  ### `getPartnerUsers`
378
379
 
379
- Get all users for a partner organization with their roles
380
+ Retrieves all users belonging to a partner organization along with their assigned roles.
380
381
 
381
382
  `GET /v2/partners/{orgId}/users`
382
383
 
@@ -395,7 +396,7 @@ const { data } = await client.getPartnerUsers({
395
396
  {
396
397
  "id": "456",
397
398
  "name": "John Doe",
398
- "email": "user@example.com",
399
+ "email": "user@partner.com",
399
400
  "status": "Active",
400
401
  "image": {
401
402
  "original": "https://example.com/path",
@@ -403,9 +404,9 @@ const { data } = await client.getPartnerUsers({
403
404
  },
404
405
  "roles": [
405
406
  {
406
- "id": "role-123",
407
- "slug": "admin",
408
- "name": "Administrator"
407
+ "id": "123:partner_admin",
408
+ "slug": "partner_admin",
409
+ "name": "Partner Administrator"
409
410
  }
410
411
  ]
411
412
  }
@@ -419,7 +420,7 @@ const { data } = await client.getPartnerUsers({
419
420
 
420
421
  ### `createPartnerUser`
421
422
 
422
- Create a new user in a partner organization
423
+ Creates a new user in a partner organization.
423
424
 
424
425
  `POST /v2/partners/{orgId}/users`
425
426
 
@@ -429,9 +430,9 @@ const { data } = await client.createPartnerUser(
429
430
  orgId: 'example',
430
431
  },
431
432
  {
432
- email: 'user@example.com',
433
- language: 'en',
434
- roles: ['role-123', 'role-456']
433
+ email: 'newuser@partner.com',
434
+ language: 'de',
435
+ roles: ['123:partner_viewer']
435
436
  },
436
437
  )
437
438
  ```
@@ -454,7 +455,7 @@ const { data } = await client.createPartnerUser(
454
455
 
455
456
  ### `deletePartnerUser`
456
457
 
457
- Delete a user from a partner organization
458
+ Removes a user from a partner organization.
458
459
 
459
460
  `DELETE /v2/partners/{orgId}/users/{userId}`
460
461
 
@@ -478,7 +479,7 @@ const { data } = await client.deletePartnerUser({
478
479
 
479
480
  ### `getPartnerRoles`
480
481
 
481
- Get all roles for a partner organization
482
+ Retrieves all roles defined for a partner organization.
482
483
 
483
484
  `GET /v2/partners/{orgId}/roles`
484
485
 
@@ -495,10 +496,24 @@ const { data } = await client.getPartnerRoles({
495
496
  {
496
497
  "results": [
497
498
  {
498
- "id": "role-123",
499
- "slug": "admin",
500
- "name": "Administrator",
501
- "type": "share_role"
499
+ "id": "123:partner_admin",
500
+ "slug": "partner_admin",
501
+ "name": "Partner Administrator",
502
+ "type": "share_role",
503
+ "grants": [
504
+ {
505
+ "action": "entity-read",
506
+ "resource": "entity:123:contact:*",
507
+ "effect": "allow",
508
+ "conditions": [
509
+ {
510
+ "attribute": "workflows.primary.task_name",
511
+ "operation": "equals",
512
+ "values": ["Qualification"]
513
+ }
514
+ ]
515
+ }
516
+ ]
502
517
  }
503
518
  ]
504
519
  }
@@ -510,7 +525,7 @@ const { data } = await client.getPartnerRoles({
510
525
 
511
526
  ### `createPartnerRole`
512
527
 
513
- Create a role for a partner organization
528
+ Creates a new role for a partner organization.
514
529
 
515
530
  `POST /v2/partners/{orgId}/roles`
516
531
 
@@ -520,12 +535,12 @@ const { data } = await client.createPartnerRole(
520
535
  orgId: 'example',
521
536
  },
522
537
  {
523
- name: 'Partner Admin',
538
+ name: 'Partner Administrator',
524
539
  slug: 'partner_admin',
525
540
  grants: [
526
541
  {
527
542
  action: 'entity-read',
528
- resource: 'entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947',
543
+ resource: 'entity:123:contact:*',
529
544
  effect: 'allow',
530
545
  conditions: [
531
546
  {
@@ -537,7 +552,7 @@ const { data } = await client.createPartnerRole(
537
552
  dependencies: [
538
553
  {
539
554
  action: 'entity-read',
540
- resource: 'entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947',
555
+ resource: 'entity:123:contact:*',
541
556
  effect: 'allow',
542
557
  conditions: [
543
558
  {
@@ -559,10 +574,24 @@ const { data } = await client.createPartnerRole(
559
574
 
560
575
  ```json
561
576
  {
562
- "id": "role-123",
563
- "slug": "admin",
564
- "name": "Administrator",
565
- "type": "share_role"
577
+ "id": "123:partner_admin",
578
+ "slug": "partner_admin",
579
+ "name": "Partner Administrator",
580
+ "type": "share_role",
581
+ "grants": [
582
+ {
583
+ "action": "entity-read",
584
+ "resource": "entity:123:contact:*",
585
+ "effect": "allow",
586
+ "conditions": [
587
+ {
588
+ "attribute": "workflows.primary.task_name",
589
+ "operation": "equals",
590
+ "values": ["Qualification"]
591
+ }
592
+ ]
593
+ }
594
+ ]
566
595
  }
567
596
  ```
568
597
 
@@ -572,7 +601,7 @@ const { data } = await client.createPartnerRole(
572
601
 
573
602
  ### `updatePartnerRole`
574
603
 
575
- Update a role for a partner organization
604
+ Updates an existing role in a partner organization.
576
605
 
577
606
  `PUT /v2/partners/{orgId}/roles/{roleId}`
578
607
 
@@ -586,7 +615,7 @@ const { data } = await client.updatePartnerRole(
586
615
  grants: [
587
616
  {
588
617
  action: 'entity-read',
589
- resource: 'entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947',
618
+ resource: 'entity:123:contact:*',
590
619
  effect: 'allow',
591
620
  conditions: [
592
621
  {
@@ -598,7 +627,7 @@ const { data } = await client.updatePartnerRole(
598
627
  dependencies: [
599
628
  {
600
629
  action: 'entity-read',
601
- resource: 'entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947',
630
+ resource: 'entity:123:contact:*',
602
631
  effect: 'allow',
603
632
  conditions: [
604
633
  {
@@ -623,10 +652,67 @@ const { data } = await client.updatePartnerRole(
623
652
 
624
653
  ```json
625
654
  {
626
- "id": "role-123",
627
- "slug": "admin",
628
- "name": "Administrator",
629
- "type": "share_role"
655
+ "id": "123:partner_admin",
656
+ "slug": "partner_admin",
657
+ "name": "Partner Administrator",
658
+ "type": "share_role",
659
+ "grants": [
660
+ {
661
+ "action": "entity-read",
662
+ "resource": "entity:123:contact:*",
663
+ "effect": "allow",
664
+ "conditions": [
665
+ {
666
+ "attribute": "workflows.primary.task_name",
667
+ "operation": "equals",
668
+ "values": ["Qualification"]
669
+ }
670
+ ]
671
+ }
672
+ ]
673
+ }
674
+ ```
675
+
676
+ </details>
677
+
678
+ ---
679
+
680
+ ### `deletePartnerRole`
681
+
682
+ Delete a role from a partner organization
683
+
684
+ `DELETE /v2/partners/{orgId}/roles/{roleId}`
685
+
686
+ ```ts
687
+ const { data } = await client.deletePartnerRole({
688
+ orgId: 'example',
689
+ roleId: 'example',
690
+ })
691
+ ```
692
+
693
+ <details>
694
+ <summary>Response</summary>
695
+
696
+ ```json
697
+ {
698
+ "id": "123:partner_admin",
699
+ "slug": "partner_admin",
700
+ "name": "Partner Administrator",
701
+ "type": "share_role",
702
+ "grants": [
703
+ {
704
+ "action": "entity-read",
705
+ "resource": "entity:123:contact:*",
706
+ "effect": "allow",
707
+ "conditions": [
708
+ {
709
+ "attribute": "workflows.primary.task_name",
710
+ "operation": "equals",
711
+ "values": ["Qualification"]
712
+ }
713
+ ]
714
+ }
715
+ ]
630
716
  }
631
717
  ```
632
718
 
@@ -636,7 +722,7 @@ const { data } = await client.updatePartnerRole(
636
722
 
637
723
  ### `assignPartnerUserRoles`
638
724
 
639
- Assign roles to a user in a partner organization
725
+ Assigns one or more roles to a user in a partner organization.
640
726
 
641
727
  `POST /v2/partners/{orgId}/users/{userId}/roles`
642
728
 
@@ -647,7 +733,7 @@ const { data } = await client.assignPartnerUserRoles(
647
733
  userId: 'example',
648
734
  },
649
735
  {
650
- roleIds: ['role-123', 'role-456']
736
+ roleIds: ['123:partner_admin', '123:partner_viewer']
651
737
  },
652
738
  )
653
739
  ```
@@ -674,7 +760,7 @@ const { data } = await client.assignPartnerUserRoles(
674
760
 
675
761
  ### `unassignPartnerUserRoles`
676
762
 
677
- Unassign roles from a user in a partner organization
763
+ Removes one or more roles from a user in a partner organization.
678
764
 
679
765
  `DELETE /v2/partners/{orgId}/users/{userId}/roles`
680
766
 
@@ -685,7 +771,7 @@ const { data } = await client.unassignPartnerUserRoles(
685
771
  userId: 'example',
686
772
  },
687
773
  {
688
- roleIds: ['role-123', 'role-456']
774
+ roleIds: ['123:partner_admin', '123:partner_viewer']
689
775
  },
690
776
  )
691
777
  ```
@@ -714,17 +800,26 @@ const { data } = await client.unassignPartnerUserRoles(
714
800
 
715
801
  ### `InviteToken`
716
802
 
803
+ A secure token used for partner invitation and activation. Sent via email to the invited partner.
804
+
717
805
  ```ts
718
806
  type InviteToken = string
719
807
  ```
720
808
 
721
809
  ### `Partner`
722
810
 
811
+ Represents a partner organization in the partner directory.
812
+
813
+ Partners go through a lifecycle from invitation to active collaboration:
814
+ - **Pending**: Initial state when partner record is created
815
+ - **Invited**: Invitation email has been sent to the partner
816
+ - **Request**: Partner has requested to join
817
+
723
818
  ```ts
724
819
  type Partner = {
725
820
  id?: string
726
821
  organization_id?: string
727
- created_at?: string
822
+ created_at?: string // date-time
728
823
  description?: string
729
824
  company_name?: string
730
825
  invitation_token?: string
@@ -739,18 +834,24 @@ type Partner = {
739
834
 
740
835
  ### `PartnerId`
741
836
 
837
+ Unique identifier for a partner record (UUID format)
838
+
742
839
  ```ts
743
840
  type PartnerId = string
744
841
  ```
745
842
 
746
843
  ### `OrganizationId`
747
844
 
845
+ Unique identifier for an organization in the epilot platform
846
+
748
847
  ```ts
749
848
  type OrganizationId = string
750
849
  ```
751
850
 
752
851
  ### `ActivatePartnerPayload`
753
852
 
853
+ Payload for activating a partner account using an invitation token
854
+
754
855
  ```ts
755
856
  type ActivatePartnerPayload = {
756
857
  company_name?: string
@@ -761,6 +862,8 @@ type ActivatePartnerPayload = {
761
862
 
762
863
  ### `PartnerInvitationPayload`
763
864
 
865
+ Configuration options for sending a partner invitation
866
+
764
867
  ```ts
765
868
  type PartnerInvitationPayload = {
766
869
  language?: "en" | "de"
@@ -769,6 +872,10 @@ type PartnerInvitationPayload = {
769
872
 
770
873
  ### `Assignable`
771
874
 
875
+ A user, organization, or group that can be assigned to tasks, workflows, or entities.
876
+ The `type` field discriminates between different assignable types.
877
+
878
+
772
879
  ```ts
773
880
  type Assignable = {
774
881
  type: "user"
@@ -778,11 +885,11 @@ type Assignable = {
778
885
  thumbnail_32?: string // uri
779
886
  }
780
887
  org_id: string
781
- created_at?: string
782
- activated_at?: string
888
+ created_at?: string // date-time
889
+ activated_at?: string // date-time
783
890
  status?: "Active" | "Pending" | "Deactivated" | "Deleted"
784
891
  user_id?: string
785
- email?: string
892
+ email?: string // email
786
893
  } | {
787
894
  type: "partner_user"
788
895
  display_name: string
@@ -791,12 +898,12 @@ type Assignable = {
791
898
  thumbnail_32?: string // uri
792
899
  }
793
900
  org_id: string
794
- created_at?: string
795
- activated_at?: string
901
+ created_at?: string // date-time
902
+ activated_at?: string // date-time
796
903
  status?: "Active" | "Pending" | "Deactivated" | "Deleted"
797
904
  partner_id?: string
798
905
  user_id?: string
799
- email?: string
906
+ email?: string // email
800
907
  } | {
801
908
  type: "partner_organization"
802
909
  display_name: string
@@ -805,11 +912,11 @@ type Assignable = {
805
912
  thumbnail_32?: string // uri
806
913
  }
807
914
  org_id: string
808
- created_at?: string
809
- activated_at?: string
915
+ created_at?: string // date-time
916
+ activated_at?: string // date-time
810
917
  status?: "Active" | "Pending" | "Deactivated" | "Deleted"
811
918
  partner_id: string
812
- email?: string
919
+ email?: string // email
813
920
  geolocations?: Array<{
814
921
  address?: {
815
922
  street?: { ... }
@@ -833,21 +940,21 @@ type Assignable = {
833
940
  thumbnail_32?: string // uri
834
941
  }
835
942
  org_id: string
836
- created_at?: string
837
- activated_at?: string
943
+ created_at?: string // date-time
944
+ activated_at?: string // date-time
838
945
  status?: "Active" | "Pending" | "Deactivated" | "Deleted"
839
946
  user_id: string
840
- email?: string
947
+ email?: string // email
841
948
  } | {
842
- type: string
949
+ type: "group"
843
950
  display_name: string
844
951
  image_uri?: {
845
952
  original: string // uri
846
953
  thumbnail_32?: string // uri
847
954
  }
848
955
  org_id: string
849
- created_at?: string
850
- activated_at?: string
956
+ created_at?: string // date-time
957
+ activated_at?: string // date-time
851
958
  status?: "Active" | "Pending" | "Deactivated" | "Deleted"
852
959
  group_id?: string
853
960
  }
@@ -855,6 +962,8 @@ type Assignable = {
855
962
 
856
963
  ### `BaseAssignable`
857
964
 
965
+ Common properties shared by all assignable types
966
+
858
967
  ```ts
859
968
  type BaseAssignable = {
860
969
  type: string
@@ -864,14 +973,16 @@ type BaseAssignable = {
864
973
  thumbnail_32?: string // uri
865
974
  }
866
975
  org_id: string
867
- created_at?: string
868
- activated_at?: string
976
+ created_at?: string // date-time
977
+ activated_at?: string // date-time
869
978
  status?: "Active" | "Pending" | "Deactivated" | "Deleted"
870
979
  }
871
980
  ```
872
981
 
873
982
  ### `AssignableUser`
874
983
 
984
+ A user within the caller's organization that can be assigned to tasks or entities
985
+
875
986
  ```ts
876
987
  type AssignableUser = {
877
988
  type: "user"
@@ -881,16 +992,18 @@ type AssignableUser = {
881
992
  thumbnail_32?: string // uri
882
993
  }
883
994
  org_id: string
884
- created_at?: string
885
- activated_at?: string
995
+ created_at?: string // date-time
996
+ activated_at?: string // date-time
886
997
  status?: "Active" | "Pending" | "Deactivated" | "Deleted"
887
998
  user_id?: string
888
- email?: string
999
+ email?: string // email
889
1000
  }
890
1001
  ```
891
1002
 
892
1003
  ### `AssignablePartnerUser`
893
1004
 
1005
+ A user from a partner organization that can be assigned to shared tasks or entities
1006
+
894
1007
  ```ts
895
1008
  type AssignablePartnerUser = {
896
1009
  type: "partner_user"
@@ -900,28 +1013,30 @@ type AssignablePartnerUser = {
900
1013
  thumbnail_32?: string // uri
901
1014
  }
902
1015
  org_id: string
903
- created_at?: string
904
- activated_at?: string
1016
+ created_at?: string // date-time
1017
+ activated_at?: string // date-time
905
1018
  status?: "Active" | "Pending" | "Deactivated" | "Deleted"
906
1019
  partner_id?: string
907
1020
  user_id?: string
908
- email?: string
1021
+ email?: string // email
909
1022
  }
910
1023
  ```
911
1024
 
912
1025
  ### `AssignableGroup`
913
1026
 
1027
+ A user group that can be assigned to tasks or entities. All members of the group will be notified/assigned.
1028
+
914
1029
  ```ts
915
1030
  type AssignableGroup = {
916
- type: string
1031
+ type: "group"
917
1032
  display_name: string
918
1033
  image_uri?: {
919
1034
  original: string // uri
920
1035
  thumbnail_32?: string // uri
921
1036
  }
922
1037
  org_id: string
923
- created_at?: string
924
- activated_at?: string
1038
+ created_at?: string // date-time
1039
+ activated_at?: string // date-time
925
1040
  status?: "Active" | "Pending" | "Deactivated" | "Deleted"
926
1041
  group_id?: string
927
1042
  }
@@ -929,6 +1044,10 @@ type AssignableGroup = {
929
1044
 
930
1045
  ### `AssignableOrganization`
931
1046
 
1047
+ A partner organization that can be assigned to tasks or entities at the organization level.
1048
+ Useful when you want to assign work to a partner company rather than a specific individual.
1049
+
1050
+
932
1051
  ```ts
933
1052
  type AssignableOrganization = {
934
1053
  type: "partner_organization"
@@ -938,11 +1057,11 @@ type AssignableOrganization = {
938
1057
  thumbnail_32?: string // uri
939
1058
  }
940
1059
  org_id: string
941
- created_at?: string
942
- activated_at?: string
1060
+ created_at?: string // date-time
1061
+ activated_at?: string // date-time
943
1062
  status?: "Active" | "Pending" | "Deactivated" | "Deleted"
944
1063
  partner_id: string
945
- email?: string
1064
+ email?: string // email
946
1065
  geolocations?: Array<{
947
1066
  address?: {
948
1067
  street?: { ... }
@@ -963,6 +1082,10 @@ type AssignableOrganization = {
963
1082
 
964
1083
  ### `AssignableEcpPlaceholder`
965
1084
 
1085
+ An End Customer Portal (ECP) user that can be assigned to tasks or entities.
1086
+ These are external users who access the system through the customer portal.
1087
+
1088
+
966
1089
  ```ts
967
1090
  type AssignableEcpPlaceholder = {
968
1091
  type: "ecp"
@@ -972,16 +1095,18 @@ type AssignableEcpPlaceholder = {
972
1095
  thumbnail_32?: string // uri
973
1096
  }
974
1097
  org_id: string
975
- created_at?: string
976
- activated_at?: string
1098
+ created_at?: string // date-time
1099
+ activated_at?: string // date-time
977
1100
  status?: "Active" | "Pending" | "Deactivated" | "Deleted"
978
1101
  user_id: string
979
- email?: string
1102
+ email?: string // email
980
1103
  }
981
1104
  ```
982
1105
 
983
1106
  ### `SearchGeolocation`
984
1107
 
1108
+ Request payload for geocoding an address to coordinates
1109
+
985
1110
  ```ts
986
1111
  type SearchGeolocation = {
987
1112
  address: string
@@ -990,6 +1115,8 @@ type SearchGeolocation = {
990
1115
 
991
1116
  ### `Geolocation`
992
1117
 
1118
+ Geographic coordinates with optional metadata
1119
+
993
1120
  ```ts
994
1121
  type Geolocation = {
995
1122
  lat: number
@@ -1001,6 +1128,8 @@ type Geolocation = {
1001
1128
 
1002
1129
  ### `Address`
1003
1130
 
1131
+ Structured postal address
1132
+
1004
1133
  ```ts
1005
1134
  type Address = {
1006
1135
  street?: string
@@ -1013,6 +1142,8 @@ type Address = {
1013
1142
 
1014
1143
  ### `AddressGeolocation`
1015
1144
 
1145
+ Combined address and geographic coordinates for a location
1146
+
1016
1147
  ```ts
1017
1148
  type AddressGeolocation = {
1018
1149
  address?: {
@@ -1031,6 +1162,8 @@ type AddressGeolocation = {
1031
1162
 
1032
1163
  ### `PartnerUser`
1033
1164
 
1165
+ A user within a partner organization, including their assigned roles
1166
+
1034
1167
  ```ts
1035
1168
  type PartnerUser = {
1036
1169
  id: string
@@ -1051,6 +1184,8 @@ type PartnerUser = {
1051
1184
 
1052
1185
  ### `CreatePartnerUserPayload`
1053
1186
 
1187
+ Request payload for creating a new user in a partner organization
1188
+
1054
1189
  ```ts
1055
1190
  type CreatePartnerUserPayload = {
1056
1191
  email: string // email
@@ -1061,6 +1196,8 @@ type CreatePartnerUserPayload = {
1061
1196
 
1062
1197
  ### `CreatePartnerRolePayload`
1063
1198
 
1199
+ Request payload for creating a new role in a partner organization
1200
+
1064
1201
  ```ts
1065
1202
  type CreatePartnerRolePayload = {
1066
1203
  name: string
@@ -1082,6 +1219,8 @@ type CreatePartnerRolePayload = {
1082
1219
 
1083
1220
  ### `UpdatePartnerRolePayload`
1084
1221
 
1222
+ Request payload for updating an existing role in a partner organization
1223
+
1085
1224
  ```ts
1086
1225
  type UpdatePartnerRolePayload = {
1087
1226
  grants: Array<{
@@ -1098,6 +1237,11 @@ type UpdatePartnerRolePayload = {
1098
1237
 
1099
1238
  ### `Grant`
1100
1239
 
1240
+ A permission grant that allows or denies a specific action on a resource.
1241
+
1242
+ Grants are the building blocks of roles and define what users can do within the system.
1243
+
1244
+
1101
1245
  ```ts
1102
1246
  type Grant = {
1103
1247
  action: string
@@ -1109,6 +1253,8 @@ type Grant = {
1109
1253
 
1110
1254
  ### `GrantWithDependencies`
1111
1255
 
1256
+ A grant with optional dependent grants that are automatically included when this grant is assigned
1257
+
1112
1258
  ```ts
1113
1259
  type GrantWithDependencies = {
1114
1260
  action: string
@@ -1126,32 +1272,42 @@ type GrantWithDependencies = {
1126
1272
 
1127
1273
  ### `GrantCondition`
1128
1274
 
1275
+ An additional condition that must be met for a grant to apply.
1276
+ Conditions allow fine-grained control over when permissions are active.
1277
+
1278
+
1129
1279
  ```ts
1130
1280
  type GrantCondition = object
1131
1281
  ```
1132
1282
 
1133
1283
  ### `EqualsCondition`
1134
1284
 
1135
- Check if attribute equals to any of the values
1285
+ A condition that checks if an attribute equals one of the specified values.
1286
+ The grant only applies when the condition is satisfied.
1287
+
1136
1288
 
1137
1289
  ```ts
1138
1290
  type EqualsCondition = {
1139
1291
  attribute: string
1140
1292
  operation: "equals"
1141
- values: unknown[]
1293
+ values: string[]
1142
1294
  }
1143
1295
  ```
1144
1296
 
1145
1297
  ### `RoleId`
1146
1298
 
1299
+ Unique identifier for a role, combining organization ID and role slug.
1147
1300
  Format: `<organization_id>`:`<slug>`
1148
1301
 
1302
+
1149
1303
  ```ts
1150
1304
  type RoleId = string
1151
1305
  ```
1152
1306
 
1153
1307
  ### `BaseRoleForCreate`
1154
1308
 
1309
+ Base schema for creating or updating a role
1310
+
1155
1311
  ```ts
1156
1312
  type BaseRoleForCreate = {
1157
1313
  id?: string
@@ -1168,17 +1324,27 @@ type BaseRoleForCreate = {
1168
1324
 
1169
1325
  ### `PartnerRole`
1170
1326
 
1327
+ A role definition for users in a partner organization
1328
+
1171
1329
  ```ts
1172
1330
  type PartnerRole = {
1173
1331
  id: string
1174
1332
  slug: string
1175
1333
  name: string
1176
1334
  type?: string
1335
+ grants: Array<{
1336
+ action: string
1337
+ resource?: string
1338
+ effect?: "allow" | "deny"
1339
+ conditions?: object[]
1340
+ }>
1177
1341
  }
1178
1342
  ```
1179
1343
 
1180
1344
  ### `AssignRolesPayload`
1181
1345
 
1346
+ Request payload for assigning or unassigning roles to/from a user
1347
+
1182
1348
  ```ts
1183
1349
  type AssignRolesPayload = {
1184
1350
  roleIds: string[]
@@ -1187,11 +1353,13 @@ type AssignRolesPayload = {
1187
1353
 
1188
1354
  ### `User`
1189
1355
 
1356
+ A user account in the epilot platform
1357
+
1190
1358
  ```ts
1191
1359
  type User = {
1192
1360
  id?: string
1193
1361
  email?: string // email
1194
1362
  display_name?: string
1195
- status?: string
1363
+ status?: "Active" | "Pending" | "Deactivated"
1196
1364
  }
1197
1365
  ```